export type Profesor = {apellido?: string | undefined, clase_id?: number | undefined, edad?: number | undefined, id?: number | undefined, imagen?: string | undefined, nombre?: string | undefined, nombre_clase?: string | undefined, tipo?: string | undefined}; export type UpdateApiApiClaseProfesorArgs = {body: Profesor}; export type UpdateApiApiClaseProfesorOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * updateProfeso * * PUT /api/clase/profesor */ export const updateApiApiClaseProfesor = async (args: UpdateApiApiClaseProfesorArgs, options: UpdateApiApiClaseProfesorOptions) => { 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/clase/profesor${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() };