export type UpdateApiApiV1NotificationDeleteArgs = {body: BodyInit}; export type UpdateApiApiV1NotificationDeleteOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PUT /api/v1/notification/delete */ export const updateApiApiV1NotificationDelete = async (args: UpdateApiApiV1NotificationDeleteArgs, options: UpdateApiApiV1NotificationDeleteOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "*/*") headers.set('accept', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/notification/delete${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: args.body}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return (await res.json()) as unknown };