export type DeleteApiConnectedAccountsAccountIdArgs = {accountId: string}; export type DeleteApiConnectedAccountsAccountIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Disconnect connected account * * DELETE /connected_accounts/{accountId} */ export const deleteApiConnectedAccountsAccountId = async (args: DeleteApiConnectedAccountsAccountIdArgs, options?: DeleteApiConnectedAccountsAccountIdOptions) => { const {baseUrl = "https://api.fireblocks.io/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/connected_accounts/${encodeURIComponent(String(args.accountId))}${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 };