export type PartnerPortalOperationsDTO = {viewPartnerSettingsPage?: boolean | undefined, viewBillingPage?: boolean | undefined, viewBillingNotification?: boolean | undefined, viewDashboard?: boolean | undefined, viewSecurityAuditPage?: boolean | undefined, addNewAccounts?: boolean | undefined, subscribeAccounts?: boolean | undefined, manageNotifications?: boolean | undefined, exportUsageReport?: boolean | undefined}; export type AccountOperationsDTO = {viewAccountSettingsPage?: boolean | undefined, viewAccountBillingPage?: boolean | undefined, viewSupportPage?: boolean | undefined, viewAccountActivity?: boolean | undefined, viewAccountSecurityAuditPage?: boolean | undefined, manageAccountNotifications?: boolean | undefined, viewBackupsPage?: boolean | undefined, activateNewBackupTasks?: boolean | undefined, modifyBackupTasks?: boolean | undefined, deleteBackupTasks?: boolean | undefined, pauseBackupTasks?: boolean | undefined, executeBackupTasks?: boolean | undefined, cancelBackupTasks?: boolean | undefined, viewBackupTasks?: boolean | undefined, previewBackedUpData?: boolean | undefined, restoreBackups?: boolean | undefined, exportBackups?: boolean | undefined, deleteBackupItemsGDPR?: boolean | undefined}; export type EnabledServicesDTO = {exchange?: boolean | undefined, msGroupsTeams?: boolean | undefined, sharepoint?: boolean | undefined, onedrive?: boolean | undefined, salesforce?: boolean | undefined, dropbox?: boolean | undefined, box?: boolean | undefined, googleWorkspace?: boolean | undefined, googleSharedDrives?: boolean | undefined}; export type PermissionsDTO = {partnerPortalOperations?: PartnerPortalOperationsDTO | undefined, accountOperations?: AccountOperationsDTO | undefined, enabledServices?: EnabledServicesDTO | undefined}; export type AccessibleAccountsDTO = {accessType: string, accountIds?: Array | undefined}; export type CreateCustomRoleUserDTO = {email: string, password: string, role: string, permissions?: PermissionsDTO | undefined, accessibleAccounts: AccessibleAccountsDTO}; export type CreateApiV2DistributorsUsersArgs = {body: CreateCustomRoleUserDTO}; export type CreateApiV2DistributorsUsersOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * createPartnerUser * * POST /v2/distributors/users */ export const createApiV2DistributorsUsers = async (args: CreateApiV2DistributorsUsersArgs, options?: CreateApiV2DistributorsUsersOptions) => { const {baseUrl = "https://api.cloudally.com", 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/distributors/users${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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() };