export type UpdateApiApiActualizaLeidoIdMensajeBoleanoArgs = {boleano: boolean, id_mensaje: number}; export type UpdateApiApiActualizaLeidoIdMensajeBoleanoOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * actualiza * * PUT /api/actualiza_leido/{id_mensaje}/{boleano} */ export const updateApiApiActualizaLeidoIdMensajeBoleano = async (args: UpdateApiApiActualizaLeidoIdMensajeBoleanoArgs, options: UpdateApiApiActualizaLeidoIdMensajeBoleanoOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/actualiza_leido/${encodeURIComponent(String(args.id_mensaje))}/${encodeURIComponent(String(args.boleano))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };