export type DeleteApiStripeSubscriptionsArgs = {id?: unknown | undefined, customer?: unknown | undefined, currency?: unknown | undefined, current_period_start?: unknown | undefined, current_period_end?: unknown | undefined, attrs?: unknown | undefined, Prefer?: ('return=representation' | 'return=minimal' | 'return=none') | undefined}; export type DeleteApiStripeSubscriptionsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /stripe_subscriptions */ export const deleteApiStripeSubscriptions = async (args: DeleteApiStripeSubscriptionsArgs, options?: DeleteApiStripeSubscriptionsOptions) => { 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.customer != null) query.append("customer", String(args.customer)) if (args.currency != null) query.append("currency", String(args.currency)) if (args.current_period_start != null) query.append("current_period_start", String(args.current_period_start)) if (args.current_period_end != null) query.append("current_period_end", String(args.current_period_end)) 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_subscriptions${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 };