export type DeleteApiV21AccountsAccountIdConnectLogsArgs = {accountId: string}; export type DeleteApiV21AccountsAccountIdConnectLogsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a list of Connect log entries. * * DELETE /v2.1/accounts/{accountId}/connect/logs */ export const deleteApiV21AccountsAccountIdConnectLogs = async (args: DeleteApiV21AccountsAccountIdConnectLogsArgs, options?: DeleteApiV21AccountsAccountIdConnectLogsOptions) => { 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/logs${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 };