export type GetApiV21AccountsAccountIdUsersUserIdCustomSettingsArgs = {accountId: string, userId: string}; export type GetApiV21AccountsAccountIdUsersUserIdCustomSettingsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retrieves the custom user settings for a specified user. * * GET /v2.1/accounts/{accountId}/users/{userId}/custom_settings */ export const getApiV21AccountsAccountIdUsersUserIdCustomSettings = async (args: GetApiV21AccountsAccountIdUsersUserIdCustomSettingsArgs, options?: GetApiV21AccountsAccountIdUsersUserIdCustomSettingsOptions) => { 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))}/users/${encodeURIComponent(String(args.userId))}/custom_settings${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };