export type ErrorDetails = {errorCode?: string | undefined, message?: string | undefined}; export type NameValue = {errorDetails?: ErrorDetails | undefined, name?: string | undefined, originalValue?: string | undefined, value?: string | undefined}; export type CustomSettingsInformation = {customSettings?: Array | undefined}; export type DeleteApiV21AccountsAccountIdUsersUserIdCustomSettingsArgs = {accountId: string, userId: string, body: CustomSettingsInformation}; export type DeleteApiV21AccountsAccountIdUsersUserIdCustomSettingsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes custom user settings for a specified user. * * DELETE /v2.1/accounts/{accountId}/users/{userId}/custom_settings */ export const deleteApiV21AccountsAccountIdUsersUserIdCustomSettings = async (args: DeleteApiV21AccountsAccountIdUsersUserIdCustomSettingsArgs, options?: DeleteApiV21AccountsAccountIdUsersUserIdCustomSettingsOptions) => { 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))}/users/${encodeURIComponent(String(args.userId))}/custom_settings${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", 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() };