export type DeleteApiV21AccountsAccountIdBulkSendListsBulkSendListIdArgs = {accountId: string, bulkSendListId: string}; export type DeleteApiV21AccountsAccountIdBulkSendListsBulkSendListIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a bulk send list. * * DELETE /v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId} */ export const deleteApiV21AccountsAccountIdBulkSendListsBulkSendListId = async (args: DeleteApiV21AccountsAccountIdBulkSendListsBulkSendListIdArgs, options?: DeleteApiV21AccountsAccountIdBulkSendListsBulkSendListIdOptions) => { const {baseUrl = "https://www.docusign.net/restapi", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v2.1/accounts/${encodeURIComponent(String(args.accountId))}/bulk_send_lists/${encodeURIComponent(String(args.bulkSendListId))}${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.blob() };