export type DeleteApiAccountAccountIdBusinessProfileProfileIdArgs = {account_id: string, profile_id: string}; export type DeleteApiAccountAccountIdBusinessProfileProfileIdOptions = {baseUrl: string, adminApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Profile - Delete * * DELETE /account/{account_id}/business_profile/{profile_id} */ export const deleteApiAccountAccountIdBusinessProfileProfileId = async (args: DeleteApiAccountAccountIdBusinessProfileProfileIdArgs, options: DeleteApiAccountAccountIdBusinessProfileProfileIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, adminApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "text/plain") if (adminApiKey !== undefined) headers.set("api-key", adminApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/account/${encodeURIComponent(String(args.account_id))}/business_profile/${encodeURIComponent(String(args.profile_id))}${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 res.text() };