export type AltaEmpleadosRequest = {apellido_materno?: string | undefined, apellido_paterno?: string | undefined, desde_fecha?: string | undefined, desde_hora?: string | undefined, documento?: string | undefined, entro?: string | undefined, estatus?: string | undefined, foto?: string | undefined, full_access?: boolean | undefined, hasta_fecha?: string | undefined, hasta_hora?: string | undefined, id_inmueble?: number | undefined, ine?: string | undefined, nombre?: string | undefined, obra?: number | undefined, observaciones?: string | undefined, patron?: number | undefined, qr?: string | undefined, salio?: string | undefined, tipo_acceso?: string | undefined, tipo_empleado?: string | undefined, tipo_servicio_id?: number | undefined, usuario_id?: number | undefined}; export type UpdateApiApiEmpleadosIdArgs = {id: number, body: AltaEmpleadosRequest}; export type UpdateApiApiEmpleadosIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Actualiza registro de empelado * * PUT /api/empleados/{id} */ export const updateApiApiEmpleadosId = async (args: UpdateApiApiEmpleadosIdArgs, options: UpdateApiApiEmpleadosIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/empleados/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };