import { IRole, SubAccountAccessTypeEnum } from '@frontegg/rest-api'; import { TUserJwtPayload } from './stateTypes'; import { WithCallback } from '../../../interfaces'; export type BaseAllAccountsDialogState = { open?: boolean; loading?: boolean; error?: boolean; onClose?: (data?: any) => void; }; export type TCreateSubAccountDialogState = WithCallback; export type TUpdateAccountDialogState = TUserJwtPayload & BaseAllAccountsDialogState & { accountName: string; accountId: string; }; export type TUpdateSubAccountHierarchySettingsDialogState = TUserJwtPayload & BaseAllAccountsDialogState & { accountName: string; accountId: string; subAccountAccessType?: SubAccountAccessTypeEnum; }; export type TUpdateSubAccountManagementState = BaseAllAccountsDialogState & TUserJwtPayload & { accountName: string; accountId: string; } & { shouldUpdateSelectedAccount?: boolean; }; export type TDeleteSubAccountDialogState = WithCallback; export type TAddUsersToSubAccountDialogState = WithCallback; export type TDeleteUserFromSubAccountDialogState = WithCallback; export type TEditUserRolesDialogState = TUserJwtPayload & BaseAllAccountsDialogState & { accountId: string; userId: string; userName: string; userRoles?: IRole[]; }; export interface IAllAccountsDialogsState { updateSubAccountDialog: TUpdateAccountDialogState; deleteSubAccountDialog: TDeleteSubAccountDialogState; updateSubAccountHierarchySettingsDialog: TUpdateSubAccountHierarchySettingsDialogState; enableSubAccountManagementDialog: TUpdateSubAccountManagementState; disableSubAccountManagementDialog: TUpdateSubAccountManagementState; editUserRolesDialog: TEditUserRolesDialogState; createSubAccountDialog: TCreateSubAccountDialogState; addUsersToAccountDialog: TAddUsersToSubAccountDialogState; deleteUserFromAccountDialog: TDeleteUserFromSubAccountDialogState; }