export type DeleteApiPricesArgs = {id?: unknown | undefined, product_id?: unknown | undefined, active?: unknown | undefined, description?: unknown | undefined, unit_amount?: unknown | undefined, currency?: unknown | undefined, type?: unknown | undefined, interval?: unknown | undefined, interval_count?: unknown | undefined, trial_period_days?: unknown | undefined, metadata?: unknown | undefined, Prefer?: ('return=representation' | 'return=minimal' | 'return=none') | undefined}; export type DeleteApiPricesOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /prices */ export const deleteApiPrices = async (args: DeleteApiPricesArgs, options?: DeleteApiPricesOptions) => { 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.product_id != null) query.append("product_id", String(args.product_id)) if (args.active != null) query.append("active", String(args.active)) if (args.description != null) query.append("description", String(args.description)) if (args.unit_amount != null) query.append("unit_amount", String(args.unit_amount)) if (args.currency != null) query.append("currency", String(args.currency)) if (args.type != null) query.append("type", String(args.type)) if (args.interval != null) query.append("interval", String(args.interval)) if (args.interval_count != null) query.append("interval_count", String(args.interval_count)) if (args.trial_period_days != null) query.append("trial_period_days", String(args.trial_period_days)) if (args.metadata != null) query.append("metadata", String(args.metadata)) if (args.Prefer != null) headers.set("Prefer", String(args.Prefer)) const url = `${baseUrl.replace(/\/+$/, '')}/prices${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 };