export type ErrorDetails = {errorCode?: string | undefined, message?: string | undefined}; export type CloudStorageProvider = {authenticationUrl?: string | undefined, errorDetails?: ErrorDetails | undefined, redirectUrl?: string | undefined, service?: string | undefined, serviceId?: string | undefined}; export type CloudStorageProviders = {storageProviders?: Array | undefined}; export type DeleteApiV21AccountsAccountIdUsersUserIdCloudStorageArgs = {accountId: string, userId: string, body: CloudStorageProviders}; export type DeleteApiV21AccountsAccountIdUsersUserIdCloudStorageOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the user authentication information for one or more cloud storage providers. * * DELETE /v2.1/accounts/{accountId}/users/{userId}/cloud_storage */ export const deleteApiV21AccountsAccountIdUsersUserIdCloudStorage = async (args: DeleteApiV21AccountsAccountIdUsersUserIdCloudStorageArgs, options?: DeleteApiV21AccountsAccountIdUsersUserIdCloudStorageOptions) => { 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))}/cloud_storage${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() };