export type DeleteApiTaxRegistrationArgs = {id?: string | undefined, created_at?: unknown | undefined, country?: unknown | undefined, country_options?: unknown | undefined, expires_at?: unknown | undefined, status?: unknown | undefined, state?: unknown | undefined, stripe_tax_registration_id?: unknown | undefined, user_id?: string | undefined, account_id?: string | undefined, organization_id?: string | undefined, Prefer?: ('return=representation' | 'return=minimal' | 'return=none') | undefined}; export type DeleteApiTaxRegistrationOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /tax_registration */ export const deleteApiTaxRegistration = async (args: DeleteApiTaxRegistrationArgs, options?: DeleteApiTaxRegistrationOptions) => { 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.country != null) query.append("country", String(args.country)) if (args.country_options != null) query.append("country_options", String(args.country_options)) if (args.expires_at != null) query.append("expires_at", String(args.expires_at)) if (args.status != null) query.append("status", String(args.status)) if (args.state != null) query.append("state", String(args.state)) if (args.stripe_tax_registration_id != null) query.append("stripe_tax_registration_id", String(args.stripe_tax_registration_id)) if (args.user_id != null) query.append("user_id", String(args.user_id)) if (args.account_id != null) query.append("account_id", String(args.account_id)) if (args.organization_id != null) query.append("organization_id", String(args.organization_id)) if (args.Prefer != null) headers.set("Prefer", String(args.Prefer)) const url = `${baseUrl.replace(/\/+$/, '')}/tax_registration${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 };