export type DeleteApiNotificationArgs = {id?: string | undefined, created_at?: unknown | undefined, user_id?: string | undefined, read_at?: unknown | undefined, organization_id?: string | undefined, status?: unknown | undefined, type?: unknown | undefined, expires_at?: unknown | undefined, message?: unknown | undefined, Prefer?: ('return=representation' | 'return=minimal' | 'return=none') | undefined}; export type DeleteApiNotificationOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /notification */ export const deleteApiNotification = async (args: DeleteApiNotificationArgs, options?: DeleteApiNotificationOptions) => { const {baseUrl = "https://vnaabuozknwgxuvnfwjo.supabase.co:443", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.id != null) query.append("id", String(args.id)) if (args.created_at != null) query.append("created_at", String(args.created_at)) if (args.user_id != null) query.append("user_id", String(args.user_id)) if (args.read_at != null) query.append("read_at", String(args.read_at)) if (args.organization_id != null) query.append("organization_id", String(args.organization_id)) if (args.status != null) query.append("status", String(args.status)) if (args.type != null) query.append("type", String(args.type)) if (args.expires_at != null) query.append("expires_at", String(args.expires_at)) if (args.message != null) query.append("message", String(args.message)) if (args.Prefer != null) headers.set("Prefer", String(args.Prefer)) const url = `${baseUrl.replace(/\/+$/, '')}/notification${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };