export type DeleteApiV21AccountsAccountIdTabDefinitionsCustomTabIdArgs = {accountId: string, customTabId: string}; export type DeleteApiV21AccountsAccountIdTabDefinitionsCustomTabIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes custom tab information. * * DELETE /v2.1/accounts/{accountId}/tab_definitions/{customTabId} */ export const deleteApiV21AccountsAccountIdTabDefinitionsCustomTabId = async (args: DeleteApiV21AccountsAccountIdTabDefinitionsCustomTabIdArgs, options?: DeleteApiV21AccountsAccountIdTabDefinitionsCustomTabIdOptions) => { 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))}/tab_definitions/${encodeURIComponent(String(args.customTabId))}${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 };