export type DeleteApiStripeProductsArgs = {id?: unknown | undefined, name?: unknown | undefined, active?: unknown | undefined, default_price?: unknown | undefined, description?: unknown | undefined, created?: unknown | undefined, updated?: unknown | undefined, attrs?: unknown | undefined, Prefer?: ('return=representation' | 'return=minimal' | 'return=none') | undefined}; export type DeleteApiStripeProductsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /stripe_products */ export const deleteApiStripeProducts = async (args: DeleteApiStripeProductsArgs, options?: DeleteApiStripeProductsOptions) => { 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.name != null) query.append("name", String(args.name)) if (args.active != null) query.append("active", String(args.active)) if (args.default_price != null) query.append("default_price", String(args.default_price)) if (args.description != null) query.append("description", String(args.description)) if (args.created != null) query.append("created", String(args.created)) if (args.updated != null) query.append("updated", String(args.updated)) if (args.attrs != null) query.append("attrs", String(args.attrs)) if (args.Prefer != null) headers.set("Prefer", String(args.Prefer)) const url = `${baseUrl.replace(/\/+$/, '')}/stripe_products${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 };