export type AltaEmpleadosDeObra = {apellidoMaterno?: string | undefined, apellidoPaterno?: string | undefined, estatus?: string | undefined, fecha?: string | undefined, foto?: string | undefined, idAreaTrabajo?: number | undefined, idEmpleadoObra?: number | undefined, idPatron?: number | undefined, nombre?: string | undefined, observaciones?: string | undefined, tipoAcceso?: string | undefined, tipoServicio?: number | undefined}; export type UpdateApiApiActualizaEmpleadoObraArgs = {body: AltaEmpleadosDeObra}; export type UpdateApiApiActualizaEmpleadoObraOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Actualiza el registro del patron responsable * * PUT /api/actualizaEmpleadoObra */ export const updateApiApiActualizaEmpleadoObra = async (args: UpdateApiApiActualizaEmpleadoObraArgs, options: UpdateApiApiActualizaEmpleadoObraOptions) => { 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/actualizaEmpleadoObra${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() };