export type DeleteApiV21AccountsAccountIdEnvelopesEnvelopeIdLockArgs = {accountId: string, envelopeId: string}; export type DeleteApiV21AccountsAccountIdEnvelopesEnvelopeIdLockOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes an envelope lock. * * DELETE /v2.1/accounts/{accountId}/envelopes/{envelopeId}/lock */ export const deleteApiV21AccountsAccountIdEnvelopesEnvelopeIdLock = async (args: DeleteApiV21AccountsAccountIdEnvelopesEnvelopeIdLockArgs, options?: DeleteApiV21AccountsAccountIdEnvelopesEnvelopeIdLockOptions) => { 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))}/envelopes/${encodeURIComponent(String(args.envelopeId))}/lock${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() };