export type Tutores = {alumno?: number | undefined, alumno_name?: string | undefined, apellidos?: string | undefined, clase?: string | undefined, clase_name?: string | undefined, edad?: number | undefined, estatus?: string | undefined, fecha_aceptacion?: string | undefined, fecha_creacion?: string | undefined, id?: number | undefined, imagen?: string | undefined, inmueble?: number | undefined, inmueble_name?: string | undefined, nombre?: string | undefined, parentezco?: string | undefined}; export type UpdateApiApiTutorArgs = {body: Tutores}; export type UpdateApiApiTutorOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * updateTutor * * PUT /api/tutor */ export const updateApiApiTutor = async (args: UpdateApiApiTutorArgs, options: UpdateApiApiTutorOptions) => { 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/tutor${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() };