export type DeleteApiV21AccountsAccountIdConnectConnectIdArgs = {accountId: string, connectId: string}; export type DeleteApiV21AccountsAccountIdConnectConnectIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the specified Connect configuration. * * DELETE /v2.1/accounts/{accountId}/connect/{connectId} */ export const deleteApiV21AccountsAccountIdConnectConnectId = async (args: DeleteApiV21AccountsAccountIdConnectConnectIdArgs, options?: DeleteApiV21AccountsAccountIdConnectConnectIdOptions) => { const {baseUrl = "https://www.docusign.net/restapi", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v2.1/accounts/${encodeURIComponent(String(args.accountId))}/connect/${encodeURIComponent(String(args.connectId))}${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 };