export type Archivo = {height?: number | undefined, timestamp?: string | undefined, uri?: (string | null) | undefined, fileName?: (string | null) | undefined, data?: (string | null) | undefined}; export type UsuarioUpdateCMSRqs = {empleadoID?: string | undefined, nombres?: (string | null) | undefined, apellidos?: (string | null) | undefined, email?: (string | null) | undefined, documento?: (string | null) | undefined, telefono?: (string | null) | undefined, genero?: (string | null) | undefined, password?: (string | null) | undefined, language?: (string | null) | undefined, paisID?: (number | null) | undefined, rolUsuarioID?: (number | null) | undefined, fechaNacimiento?: string | undefined, storeID?: (number | null) | undefined, storeRecibePremiosID?: (number | null) | undefined, accountID?: (number | null) | undefined, imagenPerfil?: Archivo | undefined, imagenDocumento?: Archivo | undefined, imagenDocumento2?: Archivo | undefined}; export type PatchApiV1ApiEmpleadosUpdateEmpleadoArgs = {body: UsuarioUpdateCMSRqs}; export type PatchApiV1ApiEmpleadosUpdateEmpleadoOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * PATCH /v1/api/Empleados/UpdateEmpleado */ export const patchApiV1ApiEmpleadosUpdateEmpleado = async (args: PatchApiV1ApiEmpleadosUpdateEmpleadoArgs, options: PatchApiV1ApiEmpleadosUpdateEmpleadoOptions) => { 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/UpdateEmpleado${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 };