export type DeleteApiV21AccountsAccountIdUsersUserIdProfileImageArgs = {accountId: string, userId: string}; export type DeleteApiV21AccountsAccountIdUsersUserIdProfileImageOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the user profile image for the specified user. * * DELETE /v2.1/accounts/{accountId}/users/{userId}/profile/image */ export const deleteApiV21AccountsAccountIdUsersUserIdProfileImage = async (args: DeleteApiV21AccountsAccountIdUsersUserIdProfileImageArgs, options?: DeleteApiV21AccountsAccountIdUsersUserIdProfileImageOptions) => { 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))}/users/${encodeURIComponent(String(args.userId))}/profile/image${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 };