export type Photo = {height?: number | undefined, timestamp?: string | undefined, uri?: (string | null) | undefined, fileName?: (string | null) | undefined, data?: (string | null) | undefined}; export type EmpleadoFirmaContrato = {empleadoID?: string | undefined, imagenFirma?: Photo | undefined}; export type PatchApiV1ApiEmpleadosFirmarContratoArgs = {body: EmpleadoFirmaContrato}; export type PatchApiV1ApiEmpleadosFirmarContratoOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * PATCH /v1/api/Empleados/FirmarContrato */ export const patchApiV1ApiEmpleadosFirmarContrato = async (args: PatchApiV1ApiEmpleadosFirmarContratoArgs, options: PatchApiV1ApiEmpleadosFirmarContratoOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/v1/api/Empleados/FirmarContrato${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 undefined };