export type ConnectFailureFilter = {envelopeIds?: Array | undefined, synchronous?: string | undefined}; export type UpdateApiV21AccountsAccountIdConnectEnvelopesRetryQueueArgs = {accountId: string, body: ConnectFailureFilter}; export type UpdateApiV21AccountsAccountIdConnectEnvelopesRetryQueueOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Republishes Connect information for multiple envelopes. * * PUT /v2.1/accounts/{accountId}/connect/envelopes/retry_queue */ export const updateApiV21AccountsAccountIdConnectEnvelopesRetryQueue = async (args: UpdateApiV21AccountsAccountIdConnectEnvelopesRetryQueueArgs, options?: UpdateApiV21AccountsAccountIdConnectEnvelopesRetryQueueOptions) => { const {baseUrl = "https://www.docusign.net/restapi", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v2.1/accounts/${encodeURIComponent(String(args.accountId))}/connect/envelopes/retry_queue${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };