@frontegg/redux-store 7.0.0-alpha.1 → 7.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/audits/AuditLogsState/actions.d.ts +9 -0
- package/audits/AuditLogsState/actions.js +103 -0
- package/audits/AuditLogsState/index.d.ts +3 -47
- package/audits/AuditLogsState/index.js +3 -39
- package/audits/AuditLogsState/state.d.ts +4 -0
- package/audits/AuditLogsState/state.js +12 -0
- package/audits/AuditsMetadataState/actions.d.ts +8 -0
- package/audits/AuditsMetadataState/actions.js +36 -0
- package/audits/AuditsMetadataState/index.d.ts +3 -35
- package/audits/AuditsMetadataState/index.js +3 -29
- package/audits/AuditsMetadataState/state.d.ts +4 -0
- package/audits/AuditsMetadataState/state.js +5 -0
- package/audits/index.d.ts +19 -39
- package/audits/index.js +11 -21
- package/audits/interfaces.d.ts +2 -0
- package/audits/interfaces.js +2 -0
- package/audits-backward-compatibility/actions.d.ts +12 -0
- package/audits-backward-compatibility/actions.js +256 -0
- package/audits-backward-compatibility/index.d.ts +5 -0
- package/audits-backward-compatibility/index.js +6 -0
- package/audits-backward-compatibility/interfaces.d.ts +60 -0
- package/audits-backward-compatibility/package.json +6 -0
- package/audits-backward-compatibility/state.d.ts +5 -0
- package/audits-backward-compatibility/state.js +24 -0
- package/auth/AcceptInvitationState/actions.d.ts +12 -0
- package/auth/AcceptInvitationState/actions.js +43 -0
- package/auth/AcceptInvitationState/index.d.ts +3 -117
- package/auth/AcceptInvitationState/index.js +3 -31
- package/auth/AcceptInvitationState/state.d.ts +4 -0
- package/auth/AcceptInvitationState/state.js +6 -0
- package/auth/AccountSettingsState/actions.d.ts +23 -0
- package/auth/AccountSettingsState/actions.js +93 -0
- package/auth/AccountSettingsState/index.d.ts +3 -124
- package/auth/AccountSettingsState/index.js +3 -33
- package/auth/AccountSettingsState/state.d.ts +4 -0
- package/auth/AccountSettingsState/state.js +5 -0
- package/auth/ActivateAccountState/actions.d.ts +26 -0
- package/auth/ActivateAccountState/actions.js +192 -0
- package/auth/ActivateAccountState/index.d.ts +3 -0
- package/auth/ActivateAccountState/index.js +3 -0
- package/auth/ActivateAccountState/state.d.ts +4 -0
- package/auth/ActivateAccountState/state.js +11 -0
- package/auth/ApiTokensState/actions.d.ts +16 -0
- package/auth/ApiTokensState/actions.js +371 -0
- package/auth/ApiTokensState/index.d.ts +3 -171
- package/auth/ApiTokensState/index.js +3 -71
- package/auth/ApiTokensState/interfaces.d.ts +4 -1
- package/auth/ApiTokensState/state.d.ts +4 -0
- package/auth/ApiTokensState/state.js +23 -0
- package/auth/ApplicationsState/actions.d.ts +25 -0
- package/auth/ApplicationsState/actions.js +221 -0
- package/auth/ApplicationsState/helpers.d.ts +3 -0
- package/auth/ApplicationsState/helpers.js +13 -0
- package/auth/ApplicationsState/index.d.ts +3 -0
- package/auth/ApplicationsState/index.js +3 -0
- package/auth/ApplicationsState/interfaces.d.ts +12 -0
- package/auth/ApplicationsState/state.d.ts +4 -0
- package/auth/ApplicationsState/state.js +9 -0
- package/auth/CustomLoginState/actions.d.ts +11 -0
- package/auth/CustomLoginState/actions.js +116 -0
- package/auth/CustomLoginState/index.d.ts +3 -119
- package/auth/CustomLoginState/index.js +3 -32
- package/auth/CustomLoginState/state.d.ts +4 -0
- package/auth/CustomLoginState/state.js +6 -0
- package/auth/Entitlements/actions.d.ts +9 -0
- package/auth/Entitlements/actions.js +40 -0
- package/auth/Entitlements/helpers.d.ts +38 -0
- package/auth/Entitlements/helpers.js +66 -0
- package/auth/Entitlements/index.d.ts +6 -2
- package/auth/Entitlements/index.js +6 -3
- package/auth/ForgotPasswordState/actions.d.ts +11 -0
- package/auth/ForgotPasswordState/actions.js +84 -0
- package/auth/ForgotPasswordState/index.d.ts +3 -121
- package/auth/ForgotPasswordState/index.js +3 -40
- package/auth/ForgotPasswordState/interfaces.d.ts +2 -2
- package/auth/ForgotPasswordState/state.d.ts +4 -0
- package/auth/ForgotPasswordState/state.js +9 -0
- package/auth/GroupsDialogsState/actions.d.ts +17 -0
- package/auth/GroupsDialogsState/actions.js +77 -0
- package/auth/GroupsDialogsState/index.d.ts +3 -0
- package/auth/GroupsDialogsState/index.js +3 -0
- package/auth/GroupsDialogsState/interfaces.d.ts +32 -0
- package/auth/GroupsDialogsState/state.d.ts +4 -0
- package/auth/GroupsDialogsState/state.js +25 -0
- package/auth/GroupsState/actions.d.ts +21 -0
- package/auth/GroupsState/actions.js +403 -0
- package/auth/GroupsState/index.d.ts +3 -178
- package/auth/GroupsState/index.js +3 -58
- package/auth/GroupsState/interfaces.d.ts +1 -32
- package/auth/GroupsState/interfaces.js +2 -0
- package/auth/GroupsState/state.d.ts +4 -0
- package/auth/GroupsState/state.js +8 -0
- package/auth/ImpersonateState/actions.d.ts +8 -0
- package/auth/ImpersonateState/actions.js +52 -0
- package/auth/ImpersonateState/index.d.ts +3 -0
- package/auth/ImpersonateState/index.js +3 -0
- package/auth/ImpersonateState/interfaces.d.ts +14 -0
- package/auth/ImpersonateState/state.d.ts +4 -0
- package/auth/ImpersonateState/state.js +7 -0
- package/auth/LoginState/actions/afterAuthNavigation.actions.d.ts +11 -0
- package/auth/LoginState/actions/afterAuthNavigation.actions.js +183 -0
- package/auth/LoginState/actions/handleVerifyMFAResponse.actions.d.ts +8 -0
- package/auth/LoginState/actions/handleVerifyMFAResponse.actions.js +92 -0
- package/auth/LoginState/actions/hostedLoginAuthorize.actions.d.ts +15 -0
- package/auth/LoginState/actions/hostedLoginAuthorize.actions.js +203 -0
- package/auth/LoginState/actions/index.d.ts +79 -0
- package/auth/LoginState/actions/index.js +1298 -0
- package/auth/LoginState/actions/mfaRequiredState.actions.d.ts +11 -0
- package/auth/LoginState/actions/mfaRequiredState.actions.js +63 -0
- package/auth/LoginState/actions/mfaWithAuthenticator.actions.d.ts +8 -0
- package/auth/LoginState/actions/mfaWithAuthenticator.actions.js +137 -0
- package/auth/LoginState/actions/mfaWithEmailCode.actions.d.ts +10 -0
- package/auth/LoginState/actions/mfaWithEmailCode.actions.js +101 -0
- package/auth/LoginState/actions/mfaWithSMS.actions.d.ts +10 -0
- package/auth/LoginState/actions/mfaWithSMS.actions.js +108 -0
- package/auth/LoginState/actions/mfaWithWebAuthn.actions.d.ts +10 -0
- package/auth/LoginState/actions/mfaWithWebAuthn.actions.js +119 -0
- package/auth/LoginState/consts.d.ts +6 -22
- package/auth/LoginState/consts.js +7 -6
- package/auth/LoginState/helpers.d.ts +31 -0
- package/auth/LoginState/helpers.js +131 -0
- package/auth/LoginState/index.d.ts +3 -233
- package/auth/LoginState/index.js +3 -142
- package/auth/LoginState/interfaces.d.ts +29 -1
- package/auth/LoginState/interfaces.js +7 -1
- package/auth/LoginState/state.d.ts +4 -0
- package/auth/LoginState/state.js +10 -0
- package/auth/MSP/actions.d.ts +28 -0
- package/auth/MSP/actions.js +962 -0
- package/auth/MSP/dialogs/actions.d.ts +25 -0
- package/auth/MSP/dialogs/actions.js +124 -0
- package/auth/MSP/dialogs/state.d.ts +4 -0
- package/auth/MSP/dialogs/state.js +76 -0
- package/auth/MSP/helpers/appendChildrenToNode.d.ts +2 -0
- package/auth/MSP/helpers/getAccountsWithUsersCount.d.ts +15 -0
- package/auth/MSP/helpers/getAccountsWithUsersCount.js +21 -0
- package/auth/MSP/helpers/index.d.ts +5 -0
- package/auth/MSP/helpers/index.js +5 -0
- package/auth/MSP/helpers/removeNodeFromTree.d.ts +2 -0
- package/auth/MSP/helpers/updateNodeIsReseller.d.ts +2 -0
- package/auth/MSP/helpers/updateNodeIsReseller.js +14 -0
- package/auth/MSP/helpers/updateNodeName.d.ts +2 -0
- package/auth/MSP/helpers/updateNodeSubAccountAccessType.d.ts +3 -0
- package/auth/MSP/helpers/updateNodeSubAccountAccessType.js +13 -0
- package/auth/MSP/index.d.ts +5 -1
- package/auth/MSP/index.js +5 -1
- package/auth/MSP/interfaces/dialogsStateTypes.d.ts +63 -0
- package/auth/MSP/interfaces/stateTypes.d.ts +114 -0
- package/auth/MSP/interfaces/stateTypes.js +24 -0
- package/auth/MSP/state.d.ts +4 -0
- package/auth/MSP/state.js +38 -0
- package/auth/MfaState/actions.d.ts +24 -0
- package/auth/MfaState/actions.js +431 -0
- package/auth/MfaState/index.d.ts +3 -157
- package/auth/MfaState/index.js +3 -66
- package/auth/MfaState/interfaces.d.ts +5 -4
- package/auth/MfaState/interfaces.js +1 -0
- package/auth/MfaState/state.d.ts +4 -0
- package/auth/MfaState/state.js +8 -0
- package/auth/PasskeysState/actions.d.ts +12 -0
- package/auth/PasskeysState/actions.js +102 -0
- package/auth/PasskeysState/index.d.ts +3 -125
- package/auth/PasskeysState/index.js +3 -33
- package/auth/PasskeysState/state.d.ts +4 -0
- package/auth/PasskeysState/state.js +7 -0
- package/auth/ProfileState/actions.d.ts +11 -0
- package/auth/ProfileState/actions.js +112 -0
- package/auth/ProfileState/index.d.ts +3 -122
- package/auth/ProfileState/index.js +3 -35
- package/auth/ProfileState/state.d.ts +4 -0
- package/auth/ProfileState/state.js +6 -0
- package/auth/ProvisioningState/actions.d.ts +21 -0
- package/auth/ProvisioningState/actions.js +130 -0
- package/auth/ProvisioningState/index.d.ts +3 -0
- package/auth/ProvisioningState/index.js +3 -0
- package/auth/ProvisioningState/state.d.ts +4 -0
- package/auth/ProvisioningState/state.js +5 -0
- package/auth/ResetPhoneNumberState/actions.d.ts +11 -0
- package/auth/ResetPhoneNumberState/actions.js +115 -0
- package/auth/ResetPhoneNumberState/index.d.ts +3 -128
- package/auth/ResetPhoneNumberState/index.js +3 -38
- package/auth/ResetPhoneNumberState/state.d.ts +4 -0
- package/auth/ResetPhoneNumberState/state.js +7 -0
- package/auth/RolesState/actions.d.ts +24 -0
- package/auth/RolesState/actions.js +274 -0
- package/auth/RolesState/index.d.ts +3 -132
- package/auth/RolesState/index.js +3 -48
- package/auth/RolesState/interfaces.d.ts +17 -2
- package/auth/RolesState/interfaces.js +8 -1
- package/auth/RolesState/state.d.ts +4 -0
- package/auth/RolesState/state.js +9 -0
- package/auth/SSOState/actions/actions.v1.d.ts +20 -0
- package/auth/SSOState/actions/actions.v1.js +387 -0
- package/auth/SSOState/actions/actions.v2.d.ts +19 -0
- package/auth/SSOState/actions/actions.v2.js +359 -0
- package/auth/SSOState/actions/index.d.ts +75 -0
- package/auth/SSOState/actions/index.js +6 -0
- package/auth/SSOState/index.d.ts +3 -274
- package/auth/SSOState/index.js +3 -101
- package/auth/SSOState/state.d.ts +4 -0
- package/auth/SSOState/state.js +10 -0
- package/auth/Security/RestrictionsState/actions.d.ts +24 -0
- package/auth/Security/RestrictionsState/actions.js +444 -0
- package/auth/Security/RestrictionsState/index.d.ts +3 -214
- package/auth/Security/RestrictionsState/index.js +3 -63
- package/auth/Security/RestrictionsState/state.d.ts +4 -0
- package/auth/Security/RestrictionsState/state.js +18 -0
- package/auth/Security/SecurityCenterState/actions.d.ts +17 -0
- package/auth/Security/SecurityCenterState/actions.js +308 -0
- package/auth/Security/SecurityCenterState/index.d.ts +3 -156
- package/auth/Security/SecurityCenterState/index.js +3 -81
- package/auth/Security/SecurityCenterState/interfaces.d.ts +28 -1
- package/auth/Security/SecurityCenterState/interfaces.js +10 -1
- package/auth/Security/SecurityCenterState/state.d.ts +4 -0
- package/auth/Security/SecurityCenterState/state.js +40 -0
- package/auth/Security/SecurityPolicyState/actions.d.ts +35 -0
- package/auth/Security/SecurityPolicyState/actions.js +413 -0
- package/auth/Security/SecurityPolicyState/index.d.ts +3 -802
- package/auth/Security/SecurityPolicyState/index.js +3 -90
- package/auth/Security/SecurityPolicyState/interfaces.d.ts +1 -1
- package/auth/Security/SecurityPolicyState/state.d.ts +4 -0
- package/auth/Security/SecurityPolicyState/state.js +37 -0
- package/auth/Security/SessionsPolicyState/actions.d.ts +10 -0
- package/auth/Security/SessionsPolicyState/actions.js +57 -0
- package/auth/Security/SessionsPolicyState/index.d.ts +3 -120
- package/auth/Security/SessionsPolicyState/index.js +3 -32
- package/auth/Security/SessionsPolicyState/state.d.ts +4 -0
- package/auth/Security/SessionsPolicyState/state.js +6 -0
- package/auth/SessionsState/actions.d.ts +14 -0
- package/auth/SessionsState/actions.js +111 -0
- package/auth/SessionsState/index.d.ts +3 -137
- package/auth/SessionsState/index.js +3 -37
- package/auth/SessionsState/interfaces.d.ts +1 -0
- package/auth/SessionsState/state.d.ts +4 -0
- package/auth/SessionsState/state.js +6 -0
- package/auth/SignUpState/actions.d.ts +10 -0
- package/auth/SignUpState/actions.js +146 -0
- package/auth/SignUpState/index.d.ts +3 -0
- package/auth/SignUpState/index.js +3 -0
- package/auth/SignUpState/state.d.ts +4 -0
- package/auth/SignUpState/state.js +10 -0
- package/auth/SmsState/actions.d.ts +15 -0
- package/auth/SmsState/actions.js +181 -0
- package/auth/SmsState/index.d.ts +3 -0
- package/auth/SmsState/index.js +3 -0
- package/auth/SmsState/interfaces.d.ts +10 -0
- package/auth/SmsState/state.d.ts +4 -0
- package/auth/SmsState/state.js +7 -0
- package/auth/SocialLoginState/actions.d.ts +14 -0
- package/auth/SocialLoginState/actions.js +163 -0
- package/auth/SocialLoginState/index.d.ts +3 -0
- package/auth/SocialLoginState/index.js +3 -0
- package/auth/SocialLoginState/state.d.ts +4 -0
- package/auth/SocialLoginState/state.js +7 -0
- package/auth/StepUpState/actions/generateStepUpSession.actions.d.ts +6 -0
- package/auth/StepUpState/actions/generateStepUpSession.actions.js +104 -0
- package/auth/StepUpState/actions/index.d.ts +18 -0
- package/auth/StepUpState/actions/index.js +98 -0
- package/auth/StepUpState/actions/stepUpHostedLogin.actions.d.ts +6 -0
- package/auth/StepUpState/actions/stepUpHostedLogin.actions.js +32 -0
- package/auth/StepUpState/consts.d.ts +21 -0
- package/auth/StepUpState/consts.js +25 -0
- package/auth/StepUpState/helpers.d.ts +29 -0
- package/auth/StepUpState/helpers.js +54 -0
- package/auth/StepUpState/index.d.ts +3 -0
- package/auth/StepUpState/index.js +3 -0
- package/auth/StepUpState/interfaces.d.ts +36 -0
- package/auth/StepUpState/interfaces.js +1 -0
- package/auth/StepUpState/state.d.ts +4 -0
- package/auth/StepUpState/state.js +7 -0
- package/auth/TeamState/actions/activation-link.actions.d.ts +9 -0
- package/auth/TeamState/actions/activation-link.actions.js +84 -0
- package/auth/TeamState/actions/index.d.ts +52 -0
- package/auth/TeamState/actions/index.js +88 -0
- package/auth/TeamState/actions/invitation-link.actions.d.ts +11 -0
- package/auth/TeamState/actions/invitation-link.actions.js +131 -0
- package/auth/TeamState/actions/sub-tenants.actions.d.ts +11 -0
- package/auth/TeamState/actions/sub-tenants.actions.js +214 -0
- package/auth/TeamState/actions/users.actions.d.ts +27 -0
- package/auth/TeamState/actions/users.actions.js +580 -0
- package/auth/TeamState/index.d.ts +3 -211
- package/auth/TeamState/index.js +3 -133
- package/auth/TeamState/interfaces.d.ts +19 -2
- package/auth/TeamState/interfaces.js +2 -0
- package/auth/TeamState/state.d.ts +4 -0
- package/auth/TeamState/state.js +41 -0
- package/auth/TenantsState/actions.d.ts +18 -0
- package/auth/TenantsState/actions.js +109 -0
- package/auth/TenantsState/index.d.ts +3 -136
- package/auth/TenantsState/index.js +3 -42
- package/auth/TenantsState/interfaces.d.ts +3 -1
- package/auth/TenantsState/state.d.ts +4 -0
- package/auth/TenantsState/state.js +8 -0
- package/auth/helpers.d.ts +20 -0
- package/auth/helpers.js +55 -0
- package/auth/index.d.ts +134 -745
- package/auth/index.js +205 -67
- package/auth/interfaces.d.ts +101 -71
- package/auth/interfaces.js +2 -0
- package/connectivity/actions.d.ts +44 -0
- package/connectivity/actions.js +534 -0
- package/connectivity/consts.d.ts +0 -3
- package/connectivity/consts.js +3 -23
- package/connectivity/index.d.ts +4 -40
- package/connectivity/index.js +3 -16
- package/connectivity/interfaces.d.ts +6 -5
- package/connectivity/state.d.ts +4 -0
- package/connectivity/state.js +11 -0
- package/constants.d.ts +2 -6
- package/constants.js +2 -6
- package/helpers/common.d.ts +8 -0
- package/helpers/common.js +44 -0
- package/helpers/converters.d.ts +3 -0
- package/helpers/converters.js +64 -0
- package/helpers/encoders.d.ts +2 -0
- package/helpers/encoders.js +46 -0
- package/helpers/gtm.d.ts +27 -0
- package/helpers/gtm.js +25 -0
- package/helpers/index.d.ts +6 -0
- package/helpers/index.js +6 -0
- package/helpers/package.json +6 -0
- package/helpers/random.d.ts +4 -0
- package/helpers/random.js +28 -0
- package/helpers/sha256.d.ts +21 -0
- package/helpers/sha256.js +424 -0
- package/index.d.ts +11 -12
- package/index.js +13 -11
- package/interfaces.d.ts +80 -6
- package/mocks/audits-mocks/auditLogsActions.mocks.d.ts +13 -0
- package/mocks/audits-mocks/auditLogsActions.mocks.js +52 -0
- package/mocks/audits-mocks/auditsMetadataActions.mocks.d.ts +7 -0
- package/mocks/audits-mocks/auditsMetadataActions.mocks.js +28 -0
- package/mocks/audits-mocks/index.d.ts +15 -0
- package/mocks/audits-mocks/index.js +8 -0
- package/mocks/auth-mocks/acceptInvitationActions.mocks.d.ts +10 -0
- package/mocks/auth-mocks/acceptInvitationActions.mocks.js +6 -0
- package/mocks/auth-mocks/accountSettingsActions.mocks.d.ts +22 -0
- package/mocks/auth-mocks/accountSettingsActions.mocks.js +52 -0
- package/mocks/auth-mocks/activateAccountActions.mocks.d.ts +24 -0
- package/mocks/auth-mocks/activateAccountActions.mocks.js +7 -0
- package/mocks/auth-mocks/allAccountsActions.mocks.d.ts +37 -0
- package/mocks/auth-mocks/allAccountsActions.mocks.js +6 -0
- package/mocks/auth-mocks/apiTokensActions.mocks.d.ts +17 -0
- package/mocks/auth-mocks/apiTokensActions.mocks.js +127 -0
- package/mocks/auth-mocks/applicationsActions.mocks.d.ts +23 -0
- package/mocks/auth-mocks/applicationsActions.mocks.js +7 -0
- package/mocks/auth-mocks/customLoginActions.mocks.d.ts +11 -0
- package/mocks/auth-mocks/customLoginActions.mocks.js +32 -0
- package/mocks/auth-mocks/entitlementsActions.mocks.d.ts +7 -0
- package/mocks/auth-mocks/entitlementsActions.mocks.js +6 -0
- package/mocks/auth-mocks/forgotPasswordActions.mocks.d.ts +10 -0
- package/mocks/auth-mocks/forgotPasswordActions.mocks.js +30 -0
- package/mocks/auth-mocks/groupsActions.mocks.d.ts +33 -0
- package/mocks/auth-mocks/groupsActions.mocks.js +234 -0
- package/mocks/auth-mocks/impersonateActions.mocks.d.ts +7 -0
- package/mocks/auth-mocks/impersonateActions.mocks.js +6 -0
- package/mocks/auth-mocks/index.d.ts +6 -0
- package/mocks/auth-mocks/index.js +130 -0
- package/mocks/auth-mocks/loginActions.mocks.d.ts +77 -0
- package/mocks/auth-mocks/loginActions.mocks.js +39 -0
- package/mocks/auth-mocks/mfaActions.mocks.d.ts +29 -0
- package/mocks/auth-mocks/mfaActions.mocks.js +220 -0
- package/mocks/auth-mocks/passkeysActions.mocks.d.ts +11 -0
- package/mocks/auth-mocks/passkeysActions.mocks.js +6 -0
- package/mocks/auth-mocks/profileActions.mocks.d.ts +10 -0
- package/mocks/auth-mocks/profileActions.mocks.js +67 -0
- package/mocks/auth-mocks/provisioningActions.mocks.d.ts +19 -0
- package/mocks/auth-mocks/provisioningActions.mocks.js +6 -0
- package/mocks/auth-mocks/resetPhoneNumberActions.mocks.d.ts +12 -0
- package/mocks/auth-mocks/resetPhoneNumberActions.mocks.js +6 -0
- package/mocks/auth-mocks/rolesActions.mocks.d.ts +17 -0
- package/mocks/auth-mocks/rolesActions.mocks.js +33 -0
- package/mocks/auth-mocks/security/restrictionsActions.mocks.d.ts +23 -0
- package/mocks/auth-mocks/security/restrictionsActions.mocks.js +248 -0
- package/mocks/auth-mocks/security/securityCenterActions.mocks.d.ts +16 -0
- package/mocks/auth-mocks/security/securityCenterActions.mocks.js +102 -0
- package/mocks/auth-mocks/security/securityPolicyActions.mocks.d.ts +56 -0
- package/mocks/auth-mocks/security/securityPolicyActions.mocks.js +179 -0
- package/mocks/auth-mocks/security/sessionsPolicyActions.mocks.d.ts +10 -0
- package/mocks/auth-mocks/security/sessionsPolicyActions.mocks.js +35 -0
- package/mocks/auth-mocks/sessionsActions.mocks.d.ts +13 -0
- package/mocks/auth-mocks/sessionsActions.mocks.js +44 -0
- package/mocks/auth-mocks/signUpActions.mocks.d.ts +9 -0
- package/mocks/auth-mocks/signUpActions.mocks.js +6 -0
- package/mocks/auth-mocks/smsActions.mocks.d.ts +12 -0
- package/mocks/auth-mocks/smsActions.mocks.js +6 -0
- package/mocks/auth-mocks/socialLoginActions.mocks.d.ts +12 -0
- package/mocks/auth-mocks/socialLoginActions.mocks.js +6 -0
- package/mocks/auth-mocks/ssoActions.mocks.d.ts +77 -0
- package/mocks/auth-mocks/ssoActions.mocks.js +128 -0
- package/mocks/auth-mocks/stepUpActions.mocks.d.ts +15 -0
- package/mocks/auth-mocks/stepUpActions.mocks.js +6 -0
- package/mocks/auth-mocks/teamActions.mocks.d.ts +52 -0
- package/mocks/auth-mocks/teamActions.mocks.js +378 -0
- package/mocks/auth-mocks/tenantsActions.mocks.d.ts +16 -0
- package/mocks/auth-mocks/tenantsActions.mocks.js +18 -0
- package/mocks/connectivity-mocks/index.d.ts +41 -0
- package/mocks/connectivity-mocks/index.js +7 -0
- package/mocks/dummy.d.ts +41 -0
- package/mocks/dummy.js +965 -0
- package/mocks/helpers.d.ts +1 -0
- package/mocks/helpers.js +16 -0
- package/mocks/index.d.ts +68 -0
- package/mocks/index.js +25 -0
- package/mocks/package.json +6 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/index.d.ts +4 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/index.js +17 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/informationActions.mocks.d.ts +8 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/informationActions.mocks.js +36 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/invoicesActions.mocks.d.ts +10 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/invoicesActions.mocks.js +27 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/paymentMethodActions.mocks.d.ts +11 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/paymentMethodActions.mocks.js +20 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/subscriptionActions.mocks.d.ts +14 -0
- package/mocks/subscriptions-mocks/billingActions-mocks/subscriptionActions.mocks.js +21 -0
- package/mocks/subscriptions-mocks/checkoutActions.mocks.d.ts +11 -0
- package/mocks/subscriptions-mocks/checkoutActions.mocks.js +7 -0
- package/mocks/subscriptions-mocks/configActions.mocks.d.ts +7 -0
- package/mocks/subscriptions-mocks/configActions.mocks.js +23 -0
- package/mocks/subscriptions-mocks/index.d.ts +3 -0
- package/mocks/subscriptions-mocks/index.js +23 -0
- package/mocks/subscriptions-mocks/plansActions.mocks.d.ts +7 -0
- package/mocks/subscriptions-mocks/plansActions.mocks.js +28 -0
- package/mocks/subscriptions-mocks/stripeActions.mocks.d.ts +5 -0
- package/mocks/subscriptions-mocks/stripeActions.mocks.js +6 -0
- package/mocks/subscriptions-mocks/vendorPublicConfigActions.mocks.d.ts +9 -0
- package/mocks/subscriptions-mocks/vendorPublicConfigActions.mocks.js +18 -0
- package/mocks/vendor-mocks/index.d.ts +7 -0
- package/mocks/vendor-mocks/index.js +19 -0
- package/node/audits/AuditLogsState/actions.js +111 -0
- package/node/audits/AuditLogsState/index.js +14 -41
- package/node/audits/AuditLogsState/state.js +20 -0
- package/node/audits/AuditsMetadataState/actions.js +43 -0
- package/node/audits/AuditsMetadataState/index.js +14 -31
- package/node/audits/AuditsMetadataState/state.js +13 -0
- package/node/audits/index.js +13 -117
- package/node/audits/interfaces.js +22 -0
- package/node/audits-backward-compatibility/actions.js +265 -0
- package/node/audits-backward-compatibility/index.js +20 -0
- package/node/audits-backward-compatibility/state.js +32 -0
- package/node/auth/AcceptInvitationState/actions.js +50 -0
- package/node/auth/AcceptInvitationState/index.js +15 -33
- package/node/auth/AcceptInvitationState/state.js +14 -0
- package/node/auth/AccountSettingsState/actions.js +101 -0
- package/node/auth/AccountSettingsState/index.js +15 -35
- package/node/auth/AccountSettingsState/state.js +13 -0
- package/node/auth/ActivateAccountState/actions.js +200 -0
- package/node/auth/ActivateAccountState/index.js +20 -0
- package/node/auth/ActivateAccountState/state.js +19 -0
- package/node/auth/ApiTokensState/actions.js +379 -0
- package/node/auth/ApiTokensState/index.js +15 -73
- package/node/auth/ApiTokensState/state.js +31 -0
- package/node/auth/ApplicationsState/actions.js +229 -0
- package/node/auth/ApplicationsState/helpers.js +20 -0
- package/node/auth/ApplicationsState/index.js +20 -0
- package/node/auth/ApplicationsState/state.js +17 -0
- package/node/auth/CustomLoginState/actions.js +124 -0
- package/node/auth/CustomLoginState/index.js +15 -34
- package/node/auth/CustomLoginState/state.js +14 -0
- package/node/auth/Entitlements/actions.js +47 -0
- package/node/auth/Entitlements/helpers.js +77 -0
- package/node/auth/Entitlements/index.js +7 -21
- package/node/auth/ForgotPasswordState/actions.js +92 -0
- package/node/auth/ForgotPasswordState/index.js +15 -42
- package/node/auth/ForgotPasswordState/state.js +17 -0
- package/node/auth/GroupsDialogsState/actions.js +85 -0
- package/node/auth/GroupsDialogsState/index.js +20 -0
- package/node/auth/GroupsDialogsState/state.js +33 -0
- package/node/auth/GroupsState/actions.js +411 -0
- package/node/auth/GroupsState/index.js +15 -61
- package/node/auth/GroupsState/interfaces.js +1 -0
- package/node/auth/GroupsState/state.js +16 -0
- package/node/auth/ImpersonateState/actions.js +60 -0
- package/node/auth/ImpersonateState/index.js +20 -0
- package/node/auth/ImpersonateState/state.js +15 -0
- package/node/auth/LoginState/actions/afterAuthNavigation.actions.js +191 -0
- package/node/auth/LoginState/actions/handleVerifyMFAResponse.actions.js +98 -0
- package/node/auth/LoginState/actions/hostedLoginAuthorize.actions.js +211 -0
- package/node/auth/LoginState/actions/index.js +1304 -0
- package/node/auth/LoginState/actions/mfaRequiredState.actions.js +71 -0
- package/node/auth/LoginState/actions/mfaWithAuthenticator.actions.js +145 -0
- package/node/auth/LoginState/actions/mfaWithEmailCode.actions.js +109 -0
- package/node/auth/LoginState/actions/mfaWithSMS.actions.js +116 -0
- package/node/auth/LoginState/actions/mfaWithWebAuthn.actions.js +127 -0
- package/node/auth/LoginState/consts.js +7 -6
- package/node/auth/LoginState/helpers.js +150 -0
- package/node/auth/LoginState/index.js +11 -146
- package/node/auth/LoginState/interfaces.js +9 -2
- package/node/auth/LoginState/state.js +18 -0
- package/node/auth/MSP/actions.js +970 -0
- package/node/auth/MSP/dialogs/actions.js +132 -0
- package/node/auth/MSP/dialogs/state.js +84 -0
- package/node/auth/MSP/helpers/getAccountsWithUsersCount.js +28 -0
- package/node/auth/MSP/helpers/index.js +60 -0
- package/node/auth/MSP/helpers/updateNodeIsReseller.js +22 -0
- package/node/auth/MSP/helpers/updateNodeSubAccountAccessType.js +21 -0
- package/node/auth/MSP/index.js +29 -11
- package/node/auth/MSP/interfaces/stateTypes.js +29 -0
- package/node/auth/MSP/state.js +46 -0
- package/node/auth/MfaState/actions.js +439 -0
- package/node/auth/MfaState/index.js +15 -68
- package/node/auth/MfaState/interfaces.js +1 -0
- package/node/auth/MfaState/state.js +16 -0
- package/node/auth/PasskeysState/actions.js +109 -0
- package/node/auth/PasskeysState/index.js +15 -35
- package/node/auth/PasskeysState/state.js +15 -0
- package/node/auth/ProfileState/actions.js +120 -0
- package/node/auth/ProfileState/index.js +15 -37
- package/node/auth/ProfileState/state.js +14 -0
- package/node/auth/ProvisioningState/actions.js +138 -0
- package/node/auth/ProvisioningState/index.js +20 -0
- package/node/auth/ProvisioningState/state.js +13 -0
- package/node/auth/ResetPhoneNumberState/actions.js +123 -0
- package/node/auth/ResetPhoneNumberState/index.js +15 -40
- package/node/auth/ResetPhoneNumberState/state.js +15 -0
- package/node/auth/RolesState/actions.js +282 -0
- package/node/auth/RolesState/index.js +15 -50
- package/node/auth/RolesState/interfaces.js +11 -1
- package/node/auth/RolesState/state.js +17 -0
- package/node/auth/SSOState/actions/actions.v1.js +395 -0
- package/node/auth/SSOState/actions/actions.v2.js +367 -0
- package/node/auth/SSOState/actions/index.js +14 -0
- package/node/auth/SSOState/index.js +15 -103
- package/node/auth/SSOState/state.js +18 -0
- package/node/auth/Security/RestrictionsState/actions.js +452 -0
- package/node/auth/Security/RestrictionsState/index.js +14 -64
- package/node/auth/Security/RestrictionsState/state.js +26 -0
- package/node/auth/Security/SecurityCenterState/actions.js +316 -0
- package/node/auth/Security/SecurityCenterState/index.js +14 -82
- package/node/auth/Security/SecurityCenterState/interfaces.js +13 -1
- package/node/auth/Security/SecurityCenterState/state.js +48 -0
- package/node/auth/Security/SecurityPolicyState/actions.js +421 -0
- package/node/auth/Security/SecurityPolicyState/index.js +14 -91
- package/node/auth/Security/SecurityPolicyState/state.js +45 -0
- package/node/auth/Security/SessionsPolicyState/actions.js +65 -0
- package/node/auth/Security/SessionsPolicyState/index.js +15 -34
- package/node/auth/Security/SessionsPolicyState/state.js +14 -0
- package/node/auth/SessionsState/actions.js +118 -0
- package/node/auth/SessionsState/index.js +15 -39
- package/node/auth/SessionsState/state.js +14 -0
- package/node/auth/SignUpState/actions.js +154 -0
- package/node/auth/SignUpState/index.js +20 -0
- package/node/auth/SignUpState/state.js +18 -0
- package/node/auth/SmsState/actions.js +189 -0
- package/node/auth/SmsState/index.js +20 -0
- package/node/auth/SmsState/state.js +15 -0
- package/node/auth/SocialLoginState/actions.js +171 -0
- package/node/auth/SocialLoginState/index.js +20 -0
- package/node/auth/SocialLoginState/state.js +15 -0
- package/node/auth/StepUpState/actions/generateStepUpSession.actions.js +111 -0
- package/node/auth/StepUpState/actions/index.js +106 -0
- package/node/auth/StepUpState/actions/stepUpHostedLogin.actions.js +39 -0
- package/node/auth/StepUpState/consts.js +36 -0
- package/node/auth/StepUpState/helpers.js +63 -0
- package/node/auth/StepUpState/index.js +20 -0
- package/node/auth/StepUpState/interfaces.js +5 -0
- package/node/auth/StepUpState/state.js +15 -0
- package/node/auth/TeamState/actions/activation-link.actions.js +92 -0
- package/node/auth/TeamState/actions/index.js +96 -0
- package/node/auth/TeamState/actions/invitation-link.actions.js +139 -0
- package/node/auth/TeamState/actions/sub-tenants.actions.js +222 -0
- package/node/auth/TeamState/actions/users.actions.js +588 -0
- package/node/auth/TeamState/index.js +14 -134
- package/node/auth/TeamState/interfaces.js +2 -0
- package/node/auth/TeamState/state.js +49 -0
- package/node/auth/TenantsState/actions.js +116 -0
- package/node/auth/TenantsState/index.js +15 -44
- package/node/auth/TenantsState/state.js +16 -0
- package/node/auth/helpers.js +107 -0
- package/node/auth/index.js +237 -422
- package/node/auth/interfaces.js +1 -1
- package/node/connectivity/actions.js +542 -0
- package/node/connectivity/consts.js +4 -28
- package/node/connectivity/index.js +7 -55
- package/node/connectivity/state.js +19 -0
- package/node/constants.js +30 -14
- package/node/helpers/common.js +57 -0
- package/node/helpers/converters.js +73 -0
- package/node/helpers/encoders.js +54 -0
- package/node/helpers/gtm.js +31 -0
- package/node/helpers/index.js +71 -0
- package/node/helpers/random.js +37 -0
- package/node/index.js +90 -72
- package/node/mocks/audits-mocks/auditLogsActions.mocks.js +59 -0
- package/node/mocks/audits-mocks/auditsMetadataActions.mocks.js +35 -0
- package/node/mocks/audits-mocks/index.js +16 -0
- package/node/mocks/auth-mocks/acceptInvitationActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/accountSettingsActions.mocks.js +60 -0
- package/node/mocks/auth-mocks/activateAccountActions.mocks.js +14 -0
- package/node/mocks/auth-mocks/allAccountsActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/apiTokensActions.mocks.js +135 -0
- package/node/mocks/auth-mocks/applicationsActions.mocks.js +14 -0
- package/node/mocks/auth-mocks/customLoginActions.mocks.js +39 -0
- package/node/mocks/auth-mocks/entitlementsActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/forgotPasswordActions.mocks.js +37 -0
- package/node/mocks/auth-mocks/groupsActions.mocks.js +242 -0
- package/node/mocks/auth-mocks/impersonateActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/index.js +140 -0
- package/node/mocks/auth-mocks/loginActions.mocks.js +46 -0
- package/node/mocks/auth-mocks/mfaActions.mocks.js +228 -0
- package/node/mocks/auth-mocks/passkeysActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/profileActions.mocks.js +75 -0
- package/node/mocks/auth-mocks/provisioningActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/resetPhoneNumberActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/rolesActions.mocks.js +40 -0
- package/node/mocks/auth-mocks/security/restrictionsActions.mocks.js +256 -0
- package/node/mocks/auth-mocks/security/securityCenterActions.mocks.js +109 -0
- package/node/mocks/auth-mocks/security/securityPolicyActions.mocks.js +187 -0
- package/node/mocks/auth-mocks/security/sessionsPolicyActions.mocks.js +43 -0
- package/node/mocks/auth-mocks/sessionsActions.mocks.js +51 -0
- package/node/mocks/auth-mocks/signUpActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/smsActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/socialLoginActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/ssoActions.mocks.js +136 -0
- package/node/mocks/auth-mocks/stepUpActions.mocks.js +13 -0
- package/node/mocks/auth-mocks/teamActions.mocks.js +386 -0
- package/node/mocks/auth-mocks/tenantsActions.mocks.js +25 -0
- package/node/mocks/connectivity-mocks/index.js +14 -0
- package/node/mocks/dummy.js +1010 -0
- package/node/mocks/helpers.js +24 -0
- package/node/mocks/index.js +32 -0
- package/node/mocks/subscriptions-mocks/billingActions-mocks/index.js +25 -0
- package/node/mocks/subscriptions-mocks/billingActions-mocks/informationActions.mocks.js +44 -0
- package/node/mocks/subscriptions-mocks/billingActions-mocks/invoicesActions.mocks.js +35 -0
- package/node/mocks/subscriptions-mocks/billingActions-mocks/paymentMethodActions.mocks.js +27 -0
- package/node/mocks/subscriptions-mocks/billingActions-mocks/subscriptionActions.mocks.js +28 -0
- package/node/mocks/subscriptions-mocks/checkoutActions.mocks.js +14 -0
- package/node/mocks/subscriptions-mocks/configActions.mocks.js +30 -0
- package/node/mocks/subscriptions-mocks/index.js +31 -0
- package/node/mocks/subscriptions-mocks/plansActions.mocks.js +36 -0
- package/node/mocks/subscriptions-mocks/stripeActions.mocks.js +13 -0
- package/node/mocks/subscriptions-mocks/vendorPublicConfigActions.mocks.js +25 -0
- package/node/mocks/vendor-mocks/index.js +26 -0
- package/node/subscriptions/Billing/Information/actions.js +96 -0
- package/node/subscriptions/Billing/Information/index.js +13 -28
- package/node/subscriptions/Billing/Information/state.js +15 -0
- package/node/subscriptions/Billing/Invoices/actions.js +80 -0
- package/node/subscriptions/Billing/Invoices/index.js +11 -40
- package/node/subscriptions/Billing/Invoices/state.js +20 -0
- package/node/subscriptions/Billing/PaymentMethod/actions.js +92 -0
- package/node/subscriptions/Billing/PaymentMethod/index.js +11 -37
- package/node/subscriptions/Billing/PaymentMethod/interfaces.js +0 -1
- package/node/subscriptions/Billing/PaymentMethod/state.js +15 -0
- package/node/subscriptions/Billing/Subscription/actions.js +145 -0
- package/node/subscriptions/Billing/Subscription/index.js +11 -38
- package/node/subscriptions/Billing/Subscription/state.js +23 -0
- package/node/subscriptions/Billing/index.js +25 -22
- package/node/subscriptions/Checkout/actions.js +108 -0
- package/node/subscriptions/Checkout/index.js +13 -34
- package/node/subscriptions/Checkout/state.js +16 -0
- package/node/subscriptions/Config/actions.js +69 -0
- package/node/subscriptions/Config/index.js +13 -26
- package/node/subscriptions/Config/state.js +16 -0
- package/node/subscriptions/Plans/actions.js +56 -0
- package/node/subscriptions/Plans/index.js +13 -25
- package/node/subscriptions/Plans/state.js +16 -0
- package/node/subscriptions/Stripe/actions.js +50 -0
- package/node/subscriptions/Stripe/index.js +13 -26
- package/node/subscriptions/Stripe/state.js +15 -0
- package/node/subscriptions/VendorPublicConfig/actions.js +51 -0
- package/node/subscriptions/VendorPublicConfig/index.js +13 -24
- package/node/subscriptions/VendorPublicConfig/state.js +15 -0
- package/node/subscriptions/helpers.js +36 -0
- package/node/subscriptions/index.js +98 -55
- package/node/subscriptions/interfaces.js +20 -77
- package/node/toolkit/FronteggNativeModule.js +64 -0
- package/node/toolkit/index.js +22 -146
- package/node/toolkit/proxy.js +17 -0
- package/node/toolkit/store.js +233 -0
- package/node/vendor/actions.js +46 -0
- package/node/vendor/index.js +7 -55
- package/node/vendor/state.js +13 -0
- package/package.json +6 -5
- package/subscriptions/Billing/Information/actions.d.ts +9 -0
- package/subscriptions/Billing/Information/actions.js +88 -0
- package/subscriptions/Billing/Information/index.d.ts +3 -12
- package/subscriptions/Billing/Information/index.js +3 -26
- package/subscriptions/Billing/Information/interfaces.d.ts +1 -1
- package/subscriptions/Billing/Information/state.d.ts +4 -0
- package/subscriptions/Billing/Information/state.js +7 -0
- package/subscriptions/Billing/Invoices/actions.d.ts +11 -0
- package/subscriptions/Billing/Invoices/actions.js +73 -0
- package/subscriptions/Billing/Invoices/index.d.ts +3 -18
- package/subscriptions/Billing/Invoices/index.js +3 -40
- package/subscriptions/Billing/Invoices/interfaces.d.ts +1 -1
- package/subscriptions/Billing/Invoices/state.d.ts +4 -0
- package/subscriptions/Billing/Invoices/state.js +12 -0
- package/subscriptions/Billing/PaymentMethod/actions.d.ts +12 -0
- package/subscriptions/Billing/PaymentMethod/actions.js +84 -0
- package/subscriptions/Billing/PaymentMethod/index.d.ts +3 -20
- package/subscriptions/Billing/PaymentMethod/index.js +3 -37
- package/subscriptions/Billing/PaymentMethod/interfaces.d.ts +1 -1
- package/subscriptions/Billing/PaymentMethod/interfaces.js +0 -2
- package/subscriptions/Billing/PaymentMethod/state.d.ts +4 -0
- package/subscriptions/Billing/PaymentMethod/state.js +7 -0
- package/subscriptions/Billing/Subscription/actions.d.ts +14 -0
- package/subscriptions/Billing/Subscription/actions.js +138 -0
- package/subscriptions/Billing/Subscription/index.d.ts +3 -16
- package/subscriptions/Billing/Subscription/index.js +3 -38
- package/subscriptions/Billing/Subscription/interfaces.d.ts +0 -3
- package/subscriptions/Billing/Subscription/state.d.ts +4 -0
- package/subscriptions/Billing/Subscription/state.js +15 -0
- package/subscriptions/Billing/index.d.ts +13 -52
- package/subscriptions/Billing/index.js +25 -22
- package/subscriptions/Billing/interfaces.d.ts +4 -10
- package/subscriptions/Billing/interfaces.js +0 -2
- package/subscriptions/Checkout/actions.d.ts +12 -0
- package/subscriptions/Checkout/actions.js +100 -0
- package/subscriptions/Checkout/index.d.ts +3 -14
- package/subscriptions/Checkout/index.js +3 -32
- package/subscriptions/Checkout/interfaces.d.ts +0 -7
- package/subscriptions/Checkout/state.d.ts +4 -0
- package/subscriptions/Checkout/state.js +8 -0
- package/subscriptions/Config/actions.d.ts +8 -0
- package/subscriptions/Config/actions.js +62 -0
- package/subscriptions/Config/index.d.ts +3 -10
- package/subscriptions/Config/index.js +3 -24
- package/subscriptions/Config/interfaces.d.ts +1 -1
- package/subscriptions/Config/state.d.ts +4 -0
- package/subscriptions/Config/state.js +8 -0
- package/subscriptions/Plans/actions.d.ts +8 -0
- package/subscriptions/Plans/actions.js +49 -0
- package/subscriptions/Plans/index.d.ts +3 -10
- package/subscriptions/Plans/index.js +3 -23
- package/subscriptions/Plans/interfaces.d.ts +1 -4
- package/subscriptions/Plans/state.d.ts +4 -0
- package/subscriptions/Plans/state.js +8 -0
- package/subscriptions/Stripe/actions.d.ts +6 -0
- package/subscriptions/Stripe/actions.js +43 -0
- package/subscriptions/Stripe/index.d.ts +3 -11
- package/subscriptions/Stripe/index.js +3 -24
- package/subscriptions/Stripe/state.d.ts +4 -0
- package/subscriptions/Stripe/state.js +7 -0
- package/subscriptions/VendorPublicConfig/actions.d.ts +10 -0
- package/subscriptions/VendorPublicConfig/actions.js +44 -0
- package/subscriptions/VendorPublicConfig/index.d.ts +3 -10
- package/subscriptions/VendorPublicConfig/index.js +3 -22
- package/subscriptions/VendorPublicConfig/state.d.ts +4 -0
- package/subscriptions/VendorPublicConfig/state.js +7 -0
- package/subscriptions/helpers.d.ts +5 -0
- package/subscriptions/helpers.js +28 -0
- package/subscriptions/index.d.ts +28 -106
- package/subscriptions/index.js +40 -17
- package/subscriptions/interfaces.d.ts +56 -22
- package/subscriptions/interfaces.js +16 -8
- package/toolkit/FronteggNativeModule.d.ts +29 -0
- package/toolkit/FronteggNativeModule.js +57 -0
- package/toolkit/index.d.ts +5 -23
- package/toolkit/index.js +3 -128
- package/toolkit/proxy.d.ts +1 -0
- package/toolkit/proxy.js +9 -0
- package/toolkit/store.d.ts +59 -0
- package/toolkit/store.js +198 -0
- package/vendor/actions.d.ts +12 -0
- package/vendor/actions.js +38 -0
- package/vendor/index.d.ts +4 -17
- package/vendor/index.js +3 -16
- package/vendor/interfaces.d.ts +4 -1
- package/vendor/state.d.ts +4 -0
- package/vendor/state.js +5 -0
- package/audits/AuditLogsState/saga.d.ts +0 -2
- package/audits/AuditLogsState/saga.js +0 -153
- package/audits/AuditsMetadataState/saga.d.ts +0 -2
- package/audits/AuditsMetadataState/saga.js +0 -55
- package/audits/backward-compatibility/index.d.ts +0 -4
- package/audits/backward-compatibility/index.js +0 -4
- package/audits/backward-compatibility/initialState.d.ts +0 -2
- package/audits/backward-compatibility/initialState.js +0 -20
- package/audits/backward-compatibility/interfaces.d.ts +0 -55
- package/audits/backward-compatibility/reducer.d.ts +0 -35
- package/audits/backward-compatibility/reducer.js +0 -129
- package/audits/backward-compatibility/saga.d.ts +0 -1
- package/audits/backward-compatibility/saga.js +0 -173
- package/audits/initialState.d.ts +0 -2
- package/audits/initialState.js +0 -6
- package/audits/reducer.d.ts +0 -31
- package/audits/reducer.js +0 -21
- package/audits/saga.d.ts +0 -2
- package/audits/saga.js +0 -9
- package/audits/utils.d.ts +0 -14
- package/audits/utils.js +0 -13
- package/auth/AcceptInvitationState/saga.d.ts +0 -1
- package/auth/AcceptInvitationState/saga.js +0 -39
- package/auth/AccountSettingsState/saga.d.ts +0 -2
- package/auth/AccountSettingsState/saga.js +0 -127
- package/auth/ActivateState/index.d.ts +0 -190
- package/auth/ActivateState/index.js +0 -46
- package/auth/ActivateState/saga.d.ts +0 -1
- package/auth/ActivateState/saga.js +0 -191
- package/auth/ApiTokensState/saga.d.ts +0 -2
- package/auth/ApiTokensState/saga.js +0 -485
- package/auth/CustomLoginState/saga.d.ts +0 -20
- package/auth/CustomLoginState/saga.js +0 -152
- package/auth/CustomLoginState/utils.d.ts +0 -2
- package/auth/CustomLoginState/utils.js +0 -11
- package/auth/Entitlements/saga.d.ts +0 -30
- package/auth/Entitlements/saga.js +0 -51
- package/auth/Entitlements/utils.d.ts +0 -23
- package/auth/Entitlements/utils.js +0 -71
- package/auth/ForgotPasswordState/saga.d.ts +0 -8
- package/auth/ForgotPasswordState/saga.js +0 -81
- package/auth/GroupsState/groupsDialogsState.d.ts +0 -614
- package/auth/GroupsState/groupsDialogsState.js +0 -79
- package/auth/GroupsState/saga.d.ts +0 -2
- package/auth/GroupsState/saga.js +0 -640
- package/auth/Helpers/base64ToFormData.d.ts +0 -1
- package/auth/Helpers/base64ToFormData.js +0 -37
- package/auth/Helpers/index.d.ts +0 -2
- package/auth/Helpers/index.js +0 -2
- package/auth/Helpers/isAuthRoute.d.ts +0 -2
- package/auth/Helpers/isAuthRoute.js +0 -9
- package/auth/ImpersonationState/index.d.ts +0 -117
- package/auth/ImpersonationState/index.js +0 -32
- package/auth/ImpersonationState/interfaces.d.ts +0 -14
- package/auth/ImpersonationState/saga.d.ts +0 -1
- package/auth/ImpersonationState/saga.js +0 -37
- package/auth/LoginState/mfaRequiredState.saga.d.ts +0 -32
- package/auth/LoginState/mfaRequiredState.saga.js +0 -61
- package/auth/LoginState/saga.d.ts +0 -35
- package/auth/LoginState/saga.js +0 -1967
- package/auth/LoginState/utils.d.ts +0 -27
- package/auth/LoginState/utils.js +0 -126
- package/auth/MSP/AllAccountsState/allAccountsDialogsState.d.ts +0 -767
- package/auth/MSP/AllAccountsState/allAccountsDialogsState.js +0 -89
- package/auth/MSP/AllAccountsState/index.d.ts +0 -232
- package/auth/MSP/AllAccountsState/index.js +0 -101
- package/auth/MSP/AllAccountsState/saga.d.ts +0 -3
- package/auth/MSP/AllAccountsState/saga.js +0 -825
- package/auth/MSP/AllAccountsState/types/dialogsStateTypes.d.ts +0 -49
- package/auth/MSP/AllAccountsState/types/stateTypes.d.ts +0 -106
- package/auth/MSP/AllAccountsState/types/stateTypes.js +0 -22
- package/auth/MSP/AllAccountsState/utils/appendChildrenToNode.d.ts +0 -2
- package/auth/MSP/AllAccountsState/utils/getAccountsWithUsersCount.d.ts +0 -13
- package/auth/MSP/AllAccountsState/utils/getAccountsWithUsersCount.js +0 -19
- package/auth/MSP/AllAccountsState/utils/removeNodeFromTree.d.ts +0 -2
- package/auth/MSP/AllAccountsState/utils/updateNodeName.d.ts +0 -2
- package/auth/MfaState/saga.d.ts +0 -2
- package/auth/MfaState/saga.js +0 -673
- package/auth/PasskeysState/helpers.d.ts +0 -2
- package/auth/PasskeysState/helpers.js +0 -8
- package/auth/PasskeysState/saga.d.ts +0 -14
- package/auth/PasskeysState/saga.js +0 -56
- package/auth/ProfileState/saga.d.ts +0 -2
- package/auth/ProfileState/saga.js +0 -178
- package/auth/Provisioning/index.d.ts +0 -128
- package/auth/Provisioning/index.js +0 -37
- package/auth/Provisioning/saga.d.ts +0 -1
- package/auth/Provisioning/saga.js +0 -121
- package/auth/ResetPhoneNumberState/saga.d.ts +0 -17
- package/auth/ResetPhoneNumberState/saga.js +0 -119
- package/auth/RolesState/saga.d.ts +0 -2
- package/auth/RolesState/saga.js +0 -208
- package/auth/SSOState/saga.d.ts +0 -2
- package/auth/SSOState/saga.js +0 -478
- package/auth/SSOState/saga.v2.d.ts +0 -1
- package/auth/SSOState/saga.v2.js +0 -546
- package/auth/Security/RestrictionsState/saga.d.ts +0 -2
- package/auth/Security/RestrictionsState/saga.js +0 -698
- package/auth/Security/SecurityCenterState/saga.d.ts +0 -129
- package/auth/Security/SecurityCenterState/saga.js +0 -419
- package/auth/Security/SecurityCenterState/types.d.ts +0 -28
- package/auth/Security/SecurityCenterState/types.js +0 -10
- package/auth/Security/SecurityPolicyState/saga.d.ts +0 -50
- package/auth/Security/SecurityPolicyState/saga.js +0 -560
- package/auth/Security/SessionsPolicyState/saga.d.ts +0 -2
- package/auth/Security/SessionsPolicyState/saga.js +0 -87
- package/auth/SessionsState/saga.d.ts +0 -2
- package/auth/SessionsState/saga.js +0 -152
- package/auth/SignUp/index.d.ts +0 -118
- package/auth/SignUp/index.js +0 -36
- package/auth/SignUp/saga.d.ts +0 -64
- package/auth/SignUp/saga.js +0 -134
- package/auth/SocialLogins/index.d.ts +0 -123
- package/auth/SocialLogins/index.js +0 -37
- package/auth/SocialLogins/saga.d.ts +0 -11
- package/auth/SocialLogins/saga.js +0 -152
- package/auth/TeamState/saga.d.ts +0 -2
- package/auth/TeamState/saga.js +0 -1278
- package/auth/TenantsState/saga.d.ts +0 -2
- package/auth/TenantsState/saga.js +0 -125
- package/auth/dummy.d.ts +0 -45
- package/auth/dummy.js +0 -590
- package/auth/initialState.d.ts +0 -3
- package/auth/initialState.js +0 -66
- package/auth/reducer.d.ts +0 -720
- package/auth/reducer.js +0 -54
- package/auth/saga.d.ts +0 -2
- package/auth/saga.js +0 -41
- package/auth/utils.d.ts +0 -327
- package/auth/utils.js +0 -159
- package/connectivity/ConnectivityState/index.d.ts +0 -301
- package/connectivity/ConnectivityState/index.js +0 -101
- package/connectivity/reducer.d.ts +0 -31
- package/connectivity/reducer.js +0 -23
- package/connectivity/saga.d.ts +0 -1
- package/connectivity/saga.js +0 -562
- package/fronteggState.d.ts +0 -28
- package/helpers.d.ts +0 -8
- package/helpers.js +0 -56
- package/node/audits/AuditLogsState/saga.js +0 -161
- package/node/audits/AuditsMetadataState/saga.js +0 -62
- package/node/audits/backward-compatibility/index.js +0 -49
- package/node/audits/backward-compatibility/initialState.js +0 -27
- package/node/audits/backward-compatibility/reducer.js +0 -139
- package/node/audits/backward-compatibility/saga.js +0 -180
- package/node/audits/initialState.js +0 -13
- package/node/audits/reducer.js +0 -29
- package/node/audits/saga.js +0 -16
- package/node/audits/utils.js +0 -21
- package/node/auth/AcceptInvitationState/saga.js +0 -45
- package/node/auth/AccountSettingsState/saga.js +0 -135
- package/node/auth/ActivateState/index.js +0 -53
- package/node/auth/ActivateState/saga.js +0 -198
- package/node/auth/ApiTokensState/saga.js +0 -493
- package/node/auth/CustomLoginState/saga.js +0 -163
- package/node/auth/CustomLoginState/utils.js +0 -18
- package/node/auth/Entitlements/saga.js +0 -61
- package/node/auth/Entitlements/utils.js +0 -80
- package/node/auth/ForgotPasswordState/saga.js +0 -89
- package/node/auth/GroupsState/groupsDialogsState.js +0 -87
- package/node/auth/GroupsState/saga.js +0 -648
- package/node/auth/Helpers/base64ToFormData.js +0 -43
- package/node/auth/Helpers/index.js +0 -27
- package/node/auth/Helpers/isAuthRoute.js +0 -17
- package/node/auth/ImpersonationState/index.js +0 -39
- package/node/auth/ImpersonationState/saga.js +0 -44
- package/node/auth/LoginState/mfaRequiredState.saga.js +0 -68
- package/node/auth/LoginState/saga.js +0 -1981
- package/node/auth/LoginState/utils.js +0 -142
- package/node/auth/MSP/AllAccountsState/allAccountsDialogsState.js +0 -96
- package/node/auth/MSP/AllAccountsState/index.js +0 -126
- package/node/auth/MSP/AllAccountsState/saga.js +0 -835
- package/node/auth/MSP/AllAccountsState/types/stateTypes.js +0 -27
- package/node/auth/MSP/AllAccountsState/utils/getAccountsWithUsersCount.js +0 -26
- package/node/auth/MfaState/saga.js +0 -681
- package/node/auth/PasskeysState/helpers.js +0 -15
- package/node/auth/PasskeysState/saga.js +0 -64
- package/node/auth/ProfileState/saga.js +0 -186
- package/node/auth/Provisioning/index.js +0 -44
- package/node/auth/Provisioning/saga.js +0 -128
- package/node/auth/ResetPhoneNumberState/saga.js +0 -127
- package/node/auth/RolesState/saga.js +0 -216
- package/node/auth/SSOState/saga.js +0 -486
- package/node/auth/SSOState/saga.v2.js +0 -553
- package/node/auth/Security/RestrictionsState/saga.js +0 -706
- package/node/auth/Security/SecurityCenterState/saga.js +0 -441
- package/node/auth/Security/SecurityCenterState/types.js +0 -17
- package/node/auth/Security/SecurityPolicyState/saga.js +0 -574
- package/node/auth/Security/SessionsPolicyState/saga.js +0 -95
- package/node/auth/SessionsState/saga.js +0 -159
- package/node/auth/SignUp/index.js +0 -43
- package/node/auth/SignUp/saga.js +0 -144
- package/node/auth/SocialLogins/index.js +0 -44
- package/node/auth/SocialLogins/saga.js +0 -161
- package/node/auth/TeamState/saga.js +0 -1286
- package/node/auth/TenantsState/saga.js +0 -132
- package/node/auth/dummy.js +0 -633
- package/node/auth/initialState.js +0 -75
- package/node/auth/reducer.js +0 -62
- package/node/auth/saga.js +0 -48
- package/node/auth/utils.js +0 -178
- package/node/connectivity/ConnectivityState/index.js +0 -108
- package/node/connectivity/reducer.js +0 -32
- package/node/connectivity/saga.js +0 -567
- package/node/helpers.js +0 -70
- package/node/subscriptions/Billing/Information/saga.js +0 -122
- package/node/subscriptions/Billing/Invoices/saga.js +0 -85
- package/node/subscriptions/Billing/PaymentMethod/saga.js +0 -87
- package/node/subscriptions/Billing/Subscription/loadSubscription.saga.js +0 -26
- package/node/subscriptions/Billing/Subscription/saga.js +0 -101
- package/node/subscriptions/Billing/saga.js +0 -18
- package/node/subscriptions/Checkout/saga.js +0 -116
- package/node/subscriptions/Config/saga.js +0 -65
- package/node/subscriptions/Plans/saga.js +0 -66
- package/node/subscriptions/Stripe/saga.js +0 -37
- package/node/subscriptions/VendorPublicConfig/saga.js +0 -45
- package/node/subscriptions/general.interfaces.js +0 -25
- package/node/subscriptions/mapper.js +0 -40
- package/node/subscriptions/reducer.js +0 -48
- package/node/subscriptions/saga.js +0 -20
- package/node/subscriptions/utils.js +0 -62
- package/node/toolkit/redux-saga-tools.js +0 -56
- package/node/toolkit/redux.js +0 -42
- package/node/utils/gtm.js +0 -29
- package/node/utils/index.js +0 -38
- package/node/vendor/VendorState/index.js +0 -31
- package/node/vendor/reducer.js +0 -26
- package/node/vendor/saga.js +0 -52
- package/subscriptions/Billing/Information/saga.d.ts +0 -34
- package/subscriptions/Billing/Information/saga.js +0 -111
- package/subscriptions/Billing/Invoices/saga.d.ts +0 -13
- package/subscriptions/Billing/Invoices/saga.js +0 -76
- package/subscriptions/Billing/PaymentMethod/saga.d.ts +0 -13
- package/subscriptions/Billing/PaymentMethod/saga.js +0 -78
- package/subscriptions/Billing/Subscription/loadSubscription.saga.d.ts +0 -1
- package/subscriptions/Billing/Subscription/loadSubscription.saga.js +0 -21
- package/subscriptions/Billing/Subscription/saga.d.ts +0 -2
- package/subscriptions/Billing/Subscription/saga.js +0 -94
- package/subscriptions/Billing/saga.d.ts +0 -2
- package/subscriptions/Billing/saga.js +0 -11
- package/subscriptions/Checkout/saga.d.ts +0 -5
- package/subscriptions/Checkout/saga.js +0 -108
- package/subscriptions/Config/saga.d.ts +0 -2
- package/subscriptions/Config/saga.js +0 -58
- package/subscriptions/Plans/saga.d.ts +0 -2
- package/subscriptions/Plans/saga.js +0 -58
- package/subscriptions/Stripe/saga.d.ts +0 -1
- package/subscriptions/Stripe/saga.js +0 -31
- package/subscriptions/VendorPublicConfig/saga.d.ts +0 -2
- package/subscriptions/VendorPublicConfig/saga.js +0 -38
- package/subscriptions/general.interfaces.d.ts +0 -49
- package/subscriptions/general.interfaces.js +0 -16
- package/subscriptions/mapper.d.ts +0 -6
- package/subscriptions/mapper.js +0 -31
- package/subscriptions/reducer.d.ts +0 -99
- package/subscriptions/reducer.js +0 -33
- package/subscriptions/saga.d.ts +0 -2
- package/subscriptions/saga.js +0 -13
- package/subscriptions/utils.d.ts +0 -68
- package/subscriptions/utils.js +0 -52
- package/toolkit/interfaces.d.ts +0 -7
- package/toolkit/redux-saga-tools.d.ts +0 -4
- package/toolkit/redux-saga-tools.js +0 -3
- package/toolkit/redux-types.d.ts +0 -3
- package/toolkit/redux.d.ts +0 -4
- package/toolkit/redux.js +0 -1
- package/utils/gtm.d.ts +0 -28
- package/utils/gtm.js +0 -22
- package/utils/index.d.ts +0 -3
- package/utils/index.js +0 -3
- package/utils/package.json +0 -6
- package/utils/sha256.d.ts +0 -22
- package/utils/sha256.js +0 -425
- package/vendor/VendorState/index.d.ts +0 -21
- package/vendor/VendorState/index.js +0 -24
- package/vendor/reducer.d.ts +0 -8
- package/vendor/reducer.js +0 -17
- package/vendor/saga.d.ts +0 -8
- package/vendor/saga.js +0 -44
- /package/{audits/backward-compatibility → audits-backward-compatibility}/interfaces.js +0 -0
- /package/auth/{ActivateState → ActivateAccountState}/interfaces.d.ts +0 -0
- /package/auth/{ActivateState → ActivateAccountState}/interfaces.js +0 -0
- /package/auth/{Provisioning → ApplicationsState}/interfaces.js +0 -0
- /package/auth/{SocialLogins → GroupsDialogsState}/interfaces.js +0 -0
- /package/auth/{ImpersonationState → ImpersonateState}/interfaces.js +0 -0
- /package/auth/MSP/{AllAccountsState/utils → helpers}/appendChildrenToNode.js +0 -0
- /package/auth/MSP/{AllAccountsState/utils → helpers}/removeNodeFromTree.js +0 -0
- /package/auth/MSP/{AllAccountsState/utils → helpers}/updateNodeName.js +0 -0
- /package/auth/MSP/{AllAccountsState/types → interfaces}/dialogsStateTypes.js +0 -0
- /package/auth/MSP/{AllAccountsState/types → interfaces}/index.d.ts +0 -0
- /package/auth/MSP/{AllAccountsState/types → interfaces}/index.js +0 -0
- /package/auth/{Provisioning → ProvisioningState}/interfaces.d.ts +0 -0
- /package/{toolkit → auth/ProvisioningState}/interfaces.js +0 -0
- /package/auth/{SignUp → SignUpState}/interfaces.d.ts +0 -0
- /package/auth/{SignUp → SignUpState}/interfaces.js +0 -0
- /package/{fronteggState.js → auth/SmsState/interfaces.js} +0 -0
- /package/auth/{SocialLogins → SocialLoginState}/interfaces.d.ts +0 -0
- /package/{toolkit/redux-types.js → auth/SocialLoginState/interfaces.js} +0 -0
- /package/{utils/errorHandler.d.ts → helpers/handlers.d.ts} +0 -0
- /package/{utils/errorHandler.js → helpers/handlers.js} +0 -0
- /package/{audits → mocks/audits-mocks}/dummy.d.ts +0 -0
- /package/{audits → mocks/audits-mocks}/dummy.js +0 -0
- /package/{subscriptions → mocks/subscriptions-mocks}/dummy.d.ts +0 -0
- /package/{subscriptions → mocks/subscriptions-mocks}/dummy.js +0 -0
- /package/node/{audits/backward-compatibility → audits-backward-compatibility}/interfaces.js +0 -0
- /package/node/auth/{ActivateState → ActivateAccountState}/interfaces.js +0 -0
- /package/node/auth/{Provisioning → ApplicationsState}/interfaces.js +0 -0
- /package/node/auth/{SocialLogins → GroupsDialogsState}/interfaces.js +0 -0
- /package/node/auth/{ImpersonationState → ImpersonateState}/interfaces.js +0 -0
- /package/node/auth/MSP/{AllAccountsState/utils → helpers}/appendChildrenToNode.js +0 -0
- /package/node/auth/MSP/{AllAccountsState/utils → helpers}/removeNodeFromTree.js +0 -0
- /package/node/auth/MSP/{AllAccountsState/utils → helpers}/updateNodeName.js +0 -0
- /package/node/auth/MSP/{AllAccountsState/types → interfaces}/dialogsStateTypes.js +0 -0
- /package/node/auth/MSP/{AllAccountsState/types → interfaces}/index.js +0 -0
- /package/node/{toolkit → auth/ProvisioningState}/interfaces.js +0 -0
- /package/node/auth/{SignUp → SignUpState}/interfaces.js +0 -0
- /package/node/{fronteggState.js → auth/SmsState/interfaces.js} +0 -0
- /package/node/{toolkit/redux-types.js → auth/SocialLoginState/interfaces.js} +0 -0
- /package/node/{utils/errorHandler.js → helpers/handlers.js} +0 -0
- /package/node/{utils → helpers}/sha256.js +0 -0
- /package/node/{audits → mocks/audits-mocks}/dummy.js +0 -0
- /package/node/{subscriptions → mocks/subscriptions-mocks}/dummy.js +0 -0
|
@@ -1,1286 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.teamSagas = teamSagas;
|
|
8
|
-
exports.teamSagasMock = teamSagasMock;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var _effects = require("redux-saga/effects");
|
|
12
|
-
var _restApi = require("@frontegg/rest-api");
|
|
13
|
-
var _reducer = require("../reducer");
|
|
14
|
-
var _interfaces = require("./interfaces");
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
|
-
var _utils = require("../utils");
|
|
17
|
-
var _dummy = require("../dummy");
|
|
18
|
-
var _uuid = require("uuid");
|
|
19
|
-
var _interfaces2 = require("../GroupsState/interfaces");
|
|
20
|
-
var _utils2 = require("../../utils");
|
|
21
|
-
const _excluded = ["callback"],
|
|
22
|
-
_excluded2 = ["roles"],
|
|
23
|
-
_excluded3 = ["callback"],
|
|
24
|
-
_excluded4 = ["callback", "profileImage"],
|
|
25
|
-
_excluded5 = ["callback"],
|
|
26
|
-
_excluded6 = ["callback", "userId"],
|
|
27
|
-
_excluded7 = ["callback"],
|
|
28
|
-
_excluded8 = ["callback"],
|
|
29
|
-
_excluded9 = ["callback"],
|
|
30
|
-
_excluded10 = ["callback"],
|
|
31
|
-
_excluded11 = ["callback"],
|
|
32
|
-
_excluded12 = ["callback"],
|
|
33
|
-
_excluded13 = ["callback"],
|
|
34
|
-
_excluded14 = ["callback", "profileImage"],
|
|
35
|
-
_excluded15 = ["callback"],
|
|
36
|
-
_excluded16 = ["callback"],
|
|
37
|
-
_excluded17 = ["callback"],
|
|
38
|
-
_excluded18 = ["callback"],
|
|
39
|
-
_excluded19 = ["callback"],
|
|
40
|
-
_excluded20 = ["callback"];
|
|
41
|
-
const selectTeamState = () => (0, _effects.select)(_ => _[_constants.authStoreName].teamState);
|
|
42
|
-
function* getGroupsForUsers() {
|
|
43
|
-
try {
|
|
44
|
-
const {
|
|
45
|
-
groups
|
|
46
|
-
} = yield (0, _effects.call)(_restApi.api.groups.getGroups, {
|
|
47
|
-
_groupsRelations: _interfaces2.GroupRelations.roles
|
|
48
|
-
});
|
|
49
|
-
return groups;
|
|
50
|
-
} catch (e) {
|
|
51
|
-
return [];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
|
-
function* loadUsersV2({
|
|
57
|
-
payload
|
|
58
|
-
}) {
|
|
59
|
-
var _payload$pageSize, _payload$pageOffset, _payload$filter, _payload$sort, _payload$shouldShowSu;
|
|
60
|
-
const {
|
|
61
|
-
silentLoading,
|
|
62
|
-
callback
|
|
63
|
-
} = payload;
|
|
64
|
-
const teamState = yield selectTeamState();
|
|
65
|
-
const pageSize = (_payload$pageSize = payload.pageSize) != null ? _payload$pageSize : teamState.pageSize;
|
|
66
|
-
const pageOffset = (_payload$pageOffset = payload.pageOffset) != null ? _payload$pageOffset : teamState.pageOffset;
|
|
67
|
-
const filter = (_payload$filter = payload.filter) != null ? _payload$filter : teamState.filterV2;
|
|
68
|
-
const sort = (_payload$sort = payload.sort) != null ? _payload$sort : teamState.sortV2;
|
|
69
|
-
const shouldIncludeSubTenants = (_payload$shouldShowSu = payload == null ? void 0 : payload.shouldShowSubTenantUsersIfReseller) != null ? _payload$shouldShowSu : teamState == null ? void 0 : teamState.shouldShowSubTenantUsersIfReseller;
|
|
70
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
71
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
72
|
-
value: !silentLoading
|
|
73
|
-
}));
|
|
74
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
75
|
-
pageSize,
|
|
76
|
-
pageOffset,
|
|
77
|
-
filterV2: filter,
|
|
78
|
-
sortV2: sort
|
|
79
|
-
}));
|
|
80
|
-
try {
|
|
81
|
-
const [{
|
|
82
|
-
items: users,
|
|
83
|
-
_metadata: {
|
|
84
|
-
totalPages,
|
|
85
|
-
totalItems
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
items: roles
|
|
89
|
-
}, {
|
|
90
|
-
items: permissions
|
|
91
|
-
}, groups] = yield (0, _effects.all)([(0, _effects.call)(_restApi.api.users.getUsersV2, (0, _extends2.default)({}, (filter == null ? void 0 : filter.length) && {
|
|
92
|
-
_filter: filter
|
|
93
|
-
}, sort && {
|
|
94
|
-
_sortBy: sort
|
|
95
|
-
}, payload.order && {
|
|
96
|
-
_order: payload.order
|
|
97
|
-
}, {
|
|
98
|
-
_offset: pageOffset,
|
|
99
|
-
_limit: pageSize,
|
|
100
|
-
_includeSubTenants: shouldIncludeSubTenants
|
|
101
|
-
})), (0, _effects.call)(_restApi.api.teams.loadAvailableRoles), (0, _effects.call)(_restApi.api.teams.loadAvailablePermissions), (0, _effects.call)(getGroupsForUsers)]);
|
|
102
|
-
|
|
103
|
-
//TODO: extend users type with groups in rest-api
|
|
104
|
-
const usersWithGroups = users.map(user => {
|
|
105
|
-
var _user$groups;
|
|
106
|
-
const userGroupsFullData = user == null ? void 0 : (_user$groups = user.groups) == null ? void 0 : _user$groups.map(group => groups.filter(g => g.id === group.id)).flat();
|
|
107
|
-
return (0, _extends2.default)({}, user, {
|
|
108
|
-
groups: userGroupsFullData
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
112
|
-
users: usersWithGroups.map(user => (0, _extends2.default)({}, user, {
|
|
113
|
-
roleIds: user.roles.map(role => role.id)
|
|
114
|
-
})),
|
|
115
|
-
totalPages,
|
|
116
|
-
totalItems,
|
|
117
|
-
roles,
|
|
118
|
-
permissions
|
|
119
|
-
}));
|
|
120
|
-
callback == null ? void 0 : callback(users);
|
|
121
|
-
} catch (e) {
|
|
122
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
123
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
124
|
-
value: (0, _utils2.errorHandler)(e)
|
|
125
|
-
}));
|
|
126
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
127
|
-
totalPages: 0,
|
|
128
|
-
users: []
|
|
129
|
-
}));
|
|
130
|
-
callback == null ? void 0 : callback(null, e);
|
|
131
|
-
}
|
|
132
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
133
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
134
|
-
value: false
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
139
|
-
function* loadUsers({
|
|
140
|
-
payload
|
|
141
|
-
}) {
|
|
142
|
-
var _payload$pageSize2, _payload$pageOffset2, _payload$filter2, _payload$sort2;
|
|
143
|
-
const {
|
|
144
|
-
silentLoading,
|
|
145
|
-
callback
|
|
146
|
-
} = payload;
|
|
147
|
-
const teamState = yield selectTeamState();
|
|
148
|
-
const pageSize = (_payload$pageSize2 = payload.pageSize) != null ? _payload$pageSize2 : teamState.pageSize;
|
|
149
|
-
const pageOffset = (_payload$pageOffset2 = payload.pageOffset) != null ? _payload$pageOffset2 : teamState.pageOffset;
|
|
150
|
-
const filter = (_payload$filter2 = payload.filter) != null ? _payload$filter2 : teamState.filter;
|
|
151
|
-
const sort = (_payload$sort2 = payload.sort) != null ? _payload$sort2 : teamState.sort;
|
|
152
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
153
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
154
|
-
value: !silentLoading
|
|
155
|
-
}));
|
|
156
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
157
|
-
pageSize,
|
|
158
|
-
pageOffset,
|
|
159
|
-
filter: filter,
|
|
160
|
-
sort: sort
|
|
161
|
-
}));
|
|
162
|
-
try {
|
|
163
|
-
const [{
|
|
164
|
-
items: users,
|
|
165
|
-
totalPages,
|
|
166
|
-
totalItems
|
|
167
|
-
}, {
|
|
168
|
-
items: roles
|
|
169
|
-
}, {
|
|
170
|
-
items: permissions
|
|
171
|
-
}] = yield (0, _effects.all)([(0, _effects.call)(_restApi.api.teams.loadUsers, {
|
|
172
|
-
pageSize,
|
|
173
|
-
pageOffset,
|
|
174
|
-
filter,
|
|
175
|
-
sort
|
|
176
|
-
}), (0, _effects.call)(_restApi.api.teams.loadAvailableRoles), (0, _effects.call)(_restApi.api.teams.loadAvailablePermissions)]);
|
|
177
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
178
|
-
users,
|
|
179
|
-
totalPages,
|
|
180
|
-
totalItems,
|
|
181
|
-
roles,
|
|
182
|
-
permissions
|
|
183
|
-
}));
|
|
184
|
-
callback == null ? void 0 : callback(users);
|
|
185
|
-
} catch (e) {
|
|
186
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
187
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
188
|
-
value: e.message
|
|
189
|
-
}));
|
|
190
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
191
|
-
totalPages: 0,
|
|
192
|
-
users: []
|
|
193
|
-
}));
|
|
194
|
-
callback == null ? void 0 : callback(null, e);
|
|
195
|
-
}
|
|
196
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
197
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
198
|
-
value: false
|
|
199
|
-
}));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
203
|
-
function* loadAllSubTenantsUsers({
|
|
204
|
-
payload
|
|
205
|
-
}) {
|
|
206
|
-
var _payload$_limit, _payload$_offset, _payload$_filter, _payload$_sortBy, _payload$_order;
|
|
207
|
-
const {
|
|
208
|
-
silentLoading,
|
|
209
|
-
callback
|
|
210
|
-
} = payload;
|
|
211
|
-
const teamState = yield selectTeamState();
|
|
212
|
-
const _limit = (_payload$_limit = payload._limit) != null ? _payload$_limit : teamState.allUsersQueryParams._limit;
|
|
213
|
-
const _offset = (_payload$_offset = payload._offset) != null ? _payload$_offset : teamState.allUsersQueryParams._offset;
|
|
214
|
-
const _filter = (_payload$_filter = payload._filter) != null ? _payload$_filter : teamState.allUsersQueryParams._filter;
|
|
215
|
-
const _sortBy = (_payload$_sortBy = payload._sortBy) != null ? _payload$_sortBy : teamState.allUsersQueryParams._sortBy;
|
|
216
|
-
const _order = (_payload$_order = payload._order) != null ? _payload$_order : teamState.allUsersQueryParams._order;
|
|
217
|
-
const allUsersQueryParams = {
|
|
218
|
-
_limit: _limit || 20,
|
|
219
|
-
_offset: _offset || 0,
|
|
220
|
-
_filter: _filter || '',
|
|
221
|
-
_sortBy: _sortBy || 'name',
|
|
222
|
-
_order: _order || 'DESC'
|
|
223
|
-
};
|
|
224
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
225
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
226
|
-
value: !silentLoading
|
|
227
|
-
}));
|
|
228
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
229
|
-
allUsersQueryParams
|
|
230
|
-
}));
|
|
231
|
-
try {
|
|
232
|
-
const [{
|
|
233
|
-
items: users,
|
|
234
|
-
_metadata: {
|
|
235
|
-
totalPages,
|
|
236
|
-
totalItems
|
|
237
|
-
}
|
|
238
|
-
}, {
|
|
239
|
-
items: roles
|
|
240
|
-
}, {
|
|
241
|
-
items: permissions
|
|
242
|
-
}] = yield (0, _effects.all)([(0, _effects.call)(_restApi.api.subTenants.loadAllUsers, (0, _extends2.default)({}, allUsersQueryParams)), (0, _effects.call)(_restApi.api.teams.loadAvailableRoles), (0, _effects.call)(_restApi.api.teams.loadAvailablePermissions)]);
|
|
243
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
244
|
-
allUsers: users,
|
|
245
|
-
totalPages,
|
|
246
|
-
totalItems,
|
|
247
|
-
roles,
|
|
248
|
-
permissions
|
|
249
|
-
}));
|
|
250
|
-
callback == null ? void 0 : callback(users);
|
|
251
|
-
} catch (e) {
|
|
252
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
253
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
254
|
-
value: (0, _utils2.errorHandler)(e)
|
|
255
|
-
}));
|
|
256
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
257
|
-
totalPages: 0,
|
|
258
|
-
users: []
|
|
259
|
-
}));
|
|
260
|
-
callback == null ? void 0 : callback(null, e);
|
|
261
|
-
}
|
|
262
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
263
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
264
|
-
value: false
|
|
265
|
-
}));
|
|
266
|
-
}
|
|
267
|
-
function* loadRoles({
|
|
268
|
-
payload
|
|
269
|
-
}) {
|
|
270
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
271
|
-
key: _interfaces.TeamStateKeys.ROLES_AND_PERMISSIONS,
|
|
272
|
-
value: true
|
|
273
|
-
}));
|
|
274
|
-
try {
|
|
275
|
-
var _payload$callback;
|
|
276
|
-
const [{
|
|
277
|
-
items: roles
|
|
278
|
-
}, {
|
|
279
|
-
items: permissions
|
|
280
|
-
}] = yield (0, _effects.all)([(0, _effects.call)(_restApi.api.teams.loadAvailableRoles), (0, _effects.call)(_restApi.api.teams.loadAvailablePermissions)]);
|
|
281
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
282
|
-
roles,
|
|
283
|
-
permissions
|
|
284
|
-
}));
|
|
285
|
-
payload == null ? void 0 : (_payload$callback = payload.callback) == null ? void 0 : _payload$callback.call(payload, {
|
|
286
|
-
roles,
|
|
287
|
-
permissions
|
|
288
|
-
});
|
|
289
|
-
} catch (e) {
|
|
290
|
-
var _payload$callback2;
|
|
291
|
-
payload == null ? void 0 : (_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, null, e);
|
|
292
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
293
|
-
key: _interfaces.TeamStateKeys.ROLES_AND_PERMISSIONS,
|
|
294
|
-
value: (0, _utils2.errorHandler)(e)
|
|
295
|
-
}));
|
|
296
|
-
}
|
|
297
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
298
|
-
key: _interfaces.TeamStateKeys.ROLES_AND_PERMISSIONS,
|
|
299
|
-
value: true
|
|
300
|
-
}));
|
|
301
|
-
}
|
|
302
|
-
function* addUser({
|
|
303
|
-
payload
|
|
304
|
-
}) {
|
|
305
|
-
const {
|
|
306
|
-
callback
|
|
307
|
-
} = payload,
|
|
308
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded);
|
|
309
|
-
const teamState = yield selectTeamState();
|
|
310
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
311
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
312
|
-
loading: true
|
|
313
|
-
})
|
|
314
|
-
}));
|
|
315
|
-
try {
|
|
316
|
-
var _roles$map;
|
|
317
|
-
const res = yield (0, _effects.call)(_restApi.api.teams.addUser, body);
|
|
318
|
-
const {
|
|
319
|
-
roles
|
|
320
|
-
} = res,
|
|
321
|
-
userWithoutRoleIds = (0, _objectWithoutPropertiesLoose2.default)(res, _excluded2);
|
|
322
|
-
const roleIds = (_roles$map = roles == null ? void 0 : roles.map(role => role.id)) != null ? _roles$map : [];
|
|
323
|
-
const newUser = (0, _extends2.default)({}, userWithoutRoleIds, {
|
|
324
|
-
roleIds
|
|
325
|
-
});
|
|
326
|
-
callback == null ? void 0 : callback(newUser);
|
|
327
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
328
|
-
users: [newUser, ...teamState.users],
|
|
329
|
-
addUserDialogState: {
|
|
330
|
-
open: false,
|
|
331
|
-
loading: false
|
|
332
|
-
}
|
|
333
|
-
}));
|
|
334
|
-
} catch (e) {
|
|
335
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
336
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
337
|
-
loading: false,
|
|
338
|
-
error: (0, _utils2.errorHandler)(e)
|
|
339
|
-
})
|
|
340
|
-
}));
|
|
341
|
-
callback == null ? void 0 : callback(null, e);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
function* addUsersBulk({
|
|
345
|
-
payload
|
|
346
|
-
}) {
|
|
347
|
-
const {
|
|
348
|
-
callback
|
|
349
|
-
} = payload;
|
|
350
|
-
const teamState = yield selectTeamState();
|
|
351
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
352
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
353
|
-
loading: true
|
|
354
|
-
})
|
|
355
|
-
}));
|
|
356
|
-
const allowedEmails = [];
|
|
357
|
-
const unallowedEmails = [];
|
|
358
|
-
const bodies = payload.emails.map(email => ({
|
|
359
|
-
email,
|
|
360
|
-
roleIds: payload.roleIds
|
|
361
|
-
}));
|
|
362
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
363
|
-
addUserDialogState: {
|
|
364
|
-
open: true,
|
|
365
|
-
loading: true
|
|
366
|
-
}
|
|
367
|
-
}));
|
|
368
|
-
for (let i = 0; i < bodies.length; i++) {
|
|
369
|
-
const body = bodies.at(i);
|
|
370
|
-
try {
|
|
371
|
-
yield (0, _effects.call)(_restApi.api.teams.addUser, body);
|
|
372
|
-
allowedEmails.push(body.email);
|
|
373
|
-
} catch (e) {
|
|
374
|
-
unallowedEmails.push(body.email);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
const queryObject = {
|
|
378
|
-
pageOffset: 0,
|
|
379
|
-
pageSize: 10,
|
|
380
|
-
filter: '',
|
|
381
|
-
silentLoading: payload.emails.length > 0
|
|
382
|
-
};
|
|
383
|
-
yield (0, _effects.put)(_reducer.actions.loadUsersV2(queryObject));
|
|
384
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
385
|
-
addUserDialogState: {
|
|
386
|
-
loading: false
|
|
387
|
-
}
|
|
388
|
-
}));
|
|
389
|
-
callback == null ? void 0 : callback({
|
|
390
|
-
unallowedEmails,
|
|
391
|
-
allowedEmails
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
function* addUserToSubTenants({
|
|
395
|
-
payload
|
|
396
|
-
}) {
|
|
397
|
-
const {
|
|
398
|
-
callback
|
|
399
|
-
} = payload,
|
|
400
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded3);
|
|
401
|
-
const teamState = yield selectTeamState();
|
|
402
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
403
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
404
|
-
loading: true
|
|
405
|
-
})
|
|
406
|
-
}));
|
|
407
|
-
try {
|
|
408
|
-
yield (0, _effects.call)(_restApi.api.subTenants.addUserToTenantAndSubTenants, body);
|
|
409
|
-
const {
|
|
410
|
-
items: users,
|
|
411
|
-
_metadata: {
|
|
412
|
-
totalPages,
|
|
413
|
-
totalItems
|
|
414
|
-
}
|
|
415
|
-
} = yield (0, _effects.call)(_restApi.api.subTenants.loadAllUsers, {
|
|
416
|
-
_limit: 20,
|
|
417
|
-
_offset: 0,
|
|
418
|
-
_filter: '',
|
|
419
|
-
_sortBy: 'name',
|
|
420
|
-
_order: 'DESC'
|
|
421
|
-
});
|
|
422
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
423
|
-
allUsers: users,
|
|
424
|
-
totalPages,
|
|
425
|
-
totalItems,
|
|
426
|
-
addUserDialogState: {
|
|
427
|
-
open: false,
|
|
428
|
-
loading: false
|
|
429
|
-
}
|
|
430
|
-
}));
|
|
431
|
-
callback == null ? void 0 : callback(null);
|
|
432
|
-
} catch (e) {
|
|
433
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
434
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
435
|
-
loading: false,
|
|
436
|
-
error: (0, _utils2.errorHandler)(e)
|
|
437
|
-
})
|
|
438
|
-
}));
|
|
439
|
-
callback == null ? void 0 : callback(null, e);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
function* updateUser({
|
|
443
|
-
payload
|
|
444
|
-
}) {
|
|
445
|
-
const {
|
|
446
|
-
callback
|
|
447
|
-
} = payload,
|
|
448
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded4);
|
|
449
|
-
const {
|
|
450
|
-
id: userId
|
|
451
|
-
} = body;
|
|
452
|
-
const teamState = yield selectTeamState();
|
|
453
|
-
const oldUserData = teamState.users.find(user => user.id === body.id);
|
|
454
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
455
|
-
key: _interfaces.TeamStateKeys.UPDATE_USER,
|
|
456
|
-
value: userId || ''
|
|
457
|
-
}));
|
|
458
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
459
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
460
|
-
loading: true
|
|
461
|
-
})
|
|
462
|
-
}));
|
|
463
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
464
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
465
|
-
loading: true
|
|
466
|
-
}),
|
|
467
|
-
users: teamState.users.map(user => {
|
|
468
|
-
if (user.id === body.id) {
|
|
469
|
-
return (0, _extends2.default)({}, user, body);
|
|
470
|
-
}
|
|
471
|
-
return user;
|
|
472
|
-
})
|
|
473
|
-
}));
|
|
474
|
-
try {
|
|
475
|
-
var _body$roleIds;
|
|
476
|
-
if (oldUserData.roleIds.length > 0 && ((_body$roleIds = body.roleIds) == null ? void 0 : _body$roleIds.length) === 0) {
|
|
477
|
-
body.roleIds = [''];
|
|
478
|
-
}
|
|
479
|
-
const {
|
|
480
|
-
item: newUser
|
|
481
|
-
} = yield (0, _effects.call)(_restApi.api.teams.updateUser, body);
|
|
482
|
-
callback == null ? void 0 : callback(newUser);
|
|
483
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
484
|
-
users: teamState.users.map(user => {
|
|
485
|
-
return user.id === newUser.id ? (0, _extends2.default)({}, user, newUser, {
|
|
486
|
-
groups: user.groups,
|
|
487
|
-
createdAt: user.createdAt,
|
|
488
|
-
customData: user.customData,
|
|
489
|
-
lastLogin: user.lastLogin
|
|
490
|
-
}) : user;
|
|
491
|
-
})
|
|
492
|
-
}));
|
|
493
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
494
|
-
key: _interfaces.TeamStateKeys.UPDATE_USER,
|
|
495
|
-
value: false
|
|
496
|
-
}));
|
|
497
|
-
} catch (e) {
|
|
498
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
499
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
500
|
-
loading: false,
|
|
501
|
-
error: (0, _utils2.errorHandler)(e)
|
|
502
|
-
}),
|
|
503
|
-
users: teamState.users.map(user => user.id === body.id ? (0, _extends2.default)({}, user, oldUserData) : user)
|
|
504
|
-
}));
|
|
505
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
506
|
-
key: _interfaces.TeamStateKeys.UPDATE_USER,
|
|
507
|
-
value: false
|
|
508
|
-
}));
|
|
509
|
-
callback == null ? void 0 : callback(null, e);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
function* deleteUser({
|
|
513
|
-
payload
|
|
514
|
-
}) {
|
|
515
|
-
const {
|
|
516
|
-
callback
|
|
517
|
-
} = payload,
|
|
518
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded5);
|
|
519
|
-
const teamState = yield selectTeamState();
|
|
520
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
521
|
-
deleteUserDialogState: (0, _extends2.default)({}, teamState.deleteUserDialogState, {
|
|
522
|
-
loading: true
|
|
523
|
-
})
|
|
524
|
-
}));
|
|
525
|
-
try {
|
|
526
|
-
yield (0, _effects.call)(_restApi.api.teams.deleteUser, body);
|
|
527
|
-
callback == null ? void 0 : callback(true);
|
|
528
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
529
|
-
users: teamState.users.filter(user => user.id !== body.userId),
|
|
530
|
-
deleteUserDialogState: {
|
|
531
|
-
open: false,
|
|
532
|
-
loading: false
|
|
533
|
-
}
|
|
534
|
-
}));
|
|
535
|
-
} catch (e) {
|
|
536
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
537
|
-
deleteUserDialogState: (0, _extends2.default)({}, teamState.deleteUserDialogState, {
|
|
538
|
-
loading: false,
|
|
539
|
-
error: (0, _utils2.errorHandler)(e)
|
|
540
|
-
})
|
|
541
|
-
}));
|
|
542
|
-
callback == null ? void 0 : callback(null, e);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
function* setUserRolesForSubTenants({
|
|
546
|
-
payload
|
|
547
|
-
}) {
|
|
548
|
-
const {
|
|
549
|
-
callback,
|
|
550
|
-
userId
|
|
551
|
-
} = payload,
|
|
552
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded6);
|
|
553
|
-
const teamState = yield selectTeamState();
|
|
554
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
555
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
556
|
-
loading: true
|
|
557
|
-
})
|
|
558
|
-
}));
|
|
559
|
-
try {
|
|
560
|
-
yield (0, _effects.call)(_restApi.api.subTenants.setUserRolesForSubTenants, userId, body);
|
|
561
|
-
const updatedUser = teamState.allUsers.find(user => user.id === userId);
|
|
562
|
-
let newTenants = [];
|
|
563
|
-
if (updatedUser) {
|
|
564
|
-
newTenants = updatedUser.tenants.map(tenant => {
|
|
565
|
-
var _body$subTenantsRoles;
|
|
566
|
-
return (0, _extends2.default)({}, tenant, {
|
|
567
|
-
roles: ((_body$subTenantsRoles = body.subTenantsRoles.find(roleUpdate => roleUpdate.tenantId === tenant.tenantId)) == null ? void 0 : _body$subTenantsRoles.roleIds.map(roleId => {
|
|
568
|
-
const role = teamState.roles.find(({
|
|
569
|
-
id
|
|
570
|
-
}) => roleId === id);
|
|
571
|
-
return role;
|
|
572
|
-
}).filter(role => role)) || tenant.roles
|
|
573
|
-
});
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
577
|
-
allUsers: [...teamState.allUsers.filter(user => user.id !== userId), ...(updatedUser ? [(0, _extends2.default)({}, updatedUser, {
|
|
578
|
-
tenants: newTenants
|
|
579
|
-
})] : [])],
|
|
580
|
-
addUserDialogState: {
|
|
581
|
-
open: false,
|
|
582
|
-
loading: false
|
|
583
|
-
}
|
|
584
|
-
}));
|
|
585
|
-
callback == null ? void 0 : callback(true);
|
|
586
|
-
} catch (e) {
|
|
587
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
588
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
589
|
-
loading: false,
|
|
590
|
-
error: (0, _utils2.errorHandler)(e)
|
|
591
|
-
})
|
|
592
|
-
}));
|
|
593
|
-
callback == null ? void 0 : callback(null, e);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
function* deleteUserFromSubTenants({
|
|
597
|
-
payload
|
|
598
|
-
}) {
|
|
599
|
-
const {
|
|
600
|
-
callback
|
|
601
|
-
} = payload,
|
|
602
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded7);
|
|
603
|
-
const teamState = yield selectTeamState();
|
|
604
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
605
|
-
deleteUserDialogState: (0, _extends2.default)({}, teamState.deleteUserDialogState, {
|
|
606
|
-
loading: true
|
|
607
|
-
})
|
|
608
|
-
}));
|
|
609
|
-
try {
|
|
610
|
-
yield (0, _effects.call)(_restApi.api.subTenants.removeUserFromTenantAndSubTenants, body);
|
|
611
|
-
callback == null ? void 0 : callback(true);
|
|
612
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
613
|
-
allUsers: teamState.allUsers.filter(user => user.id !== body.userId && user.tenants.length === body.subTenants.length),
|
|
614
|
-
deleteUserDialogState: {
|
|
615
|
-
open: false,
|
|
616
|
-
loading: false
|
|
617
|
-
}
|
|
618
|
-
}));
|
|
619
|
-
} catch (e) {
|
|
620
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
621
|
-
deleteUserDialogState: (0, _extends2.default)({}, teamState.deleteUserDialogState, {
|
|
622
|
-
loading: false,
|
|
623
|
-
error: (0, _utils2.errorHandler)(e)
|
|
624
|
-
})
|
|
625
|
-
}));
|
|
626
|
-
callback == null ? void 0 : callback(null, e);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
function* resendActivationLink({
|
|
630
|
-
payload
|
|
631
|
-
}) {
|
|
632
|
-
const {
|
|
633
|
-
callback
|
|
634
|
-
} = payload,
|
|
635
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded8);
|
|
636
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
637
|
-
key: _interfaces.TeamStateKeys.RESEND_ACTIVATE_LINK,
|
|
638
|
-
value: body.userId
|
|
639
|
-
}));
|
|
640
|
-
try {
|
|
641
|
-
yield (0, _effects.call)(_restApi.api.teams.resendActivationLink, body);
|
|
642
|
-
callback == null ? void 0 : callback(true);
|
|
643
|
-
} catch (e) {
|
|
644
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
645
|
-
key: _interfaces.TeamStateKeys.RESEND_ACTIVATE_LINK,
|
|
646
|
-
value: (0, _utils2.errorHandler)(e)
|
|
647
|
-
}));
|
|
648
|
-
callback == null ? void 0 : callback(null, e);
|
|
649
|
-
}
|
|
650
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
651
|
-
key: _interfaces.TeamStateKeys.RESEND_ACTIVATE_LINK,
|
|
652
|
-
value: false
|
|
653
|
-
}));
|
|
654
|
-
}
|
|
655
|
-
function* resendInvitationLink({
|
|
656
|
-
payload
|
|
657
|
-
}) {
|
|
658
|
-
const {
|
|
659
|
-
callback
|
|
660
|
-
} = payload,
|
|
661
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded9);
|
|
662
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
663
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
664
|
-
value: body.email
|
|
665
|
-
}));
|
|
666
|
-
try {
|
|
667
|
-
yield (0, _effects.call)(_restApi.api.teams.resendInvitationLink, body);
|
|
668
|
-
callback == null ? void 0 : callback(true);
|
|
669
|
-
} catch (e) {
|
|
670
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
671
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
672
|
-
value: (0, _utils2.errorHandler)(e)
|
|
673
|
-
}));
|
|
674
|
-
callback == null ? void 0 : callback(null, e);
|
|
675
|
-
}
|
|
676
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
677
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
678
|
-
value: false
|
|
679
|
-
}));
|
|
680
|
-
}
|
|
681
|
-
function* resendInvitationEmail({
|
|
682
|
-
payload
|
|
683
|
-
}) {
|
|
684
|
-
const {
|
|
685
|
-
callback
|
|
686
|
-
} = payload,
|
|
687
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded10);
|
|
688
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
689
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
690
|
-
value: body.email
|
|
691
|
-
}));
|
|
692
|
-
try {
|
|
693
|
-
yield (0, _effects.call)(_restApi.api.auth.resendInvitationEmail, body);
|
|
694
|
-
callback == null ? void 0 : callback(true);
|
|
695
|
-
} catch (e) {
|
|
696
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
697
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
698
|
-
value: (0, _utils2.errorHandler)(e)
|
|
699
|
-
}));
|
|
700
|
-
callback == null ? void 0 : callback(null, e);
|
|
701
|
-
}
|
|
702
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
703
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
704
|
-
value: false
|
|
705
|
-
}));
|
|
706
|
-
}
|
|
707
|
-
function* resendInvitationLinkToAllSubTenants({
|
|
708
|
-
payload
|
|
709
|
-
}) {
|
|
710
|
-
const {
|
|
711
|
-
callback
|
|
712
|
-
} = payload,
|
|
713
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded11);
|
|
714
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
715
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
716
|
-
value: body.email
|
|
717
|
-
}));
|
|
718
|
-
try {
|
|
719
|
-
yield (0, _effects.call)(_restApi.api.teams.resendInvitationLinkToAllTenants, body);
|
|
720
|
-
callback == null ? void 0 : callback(true);
|
|
721
|
-
} catch (e) {
|
|
722
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
723
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
724
|
-
value: (0, _utils2.errorHandler)(e)
|
|
725
|
-
}));
|
|
726
|
-
callback == null ? void 0 : callback(null, e);
|
|
727
|
-
}
|
|
728
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
729
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
730
|
-
value: false
|
|
731
|
-
}));
|
|
732
|
-
}
|
|
733
|
-
function* getInvitationLinkConfig() {
|
|
734
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
735
|
-
key: _interfaces.TeamStateKeys.CONFIG_TOKEN_LINK,
|
|
736
|
-
value: false
|
|
737
|
-
}));
|
|
738
|
-
try {
|
|
739
|
-
const invitationLinkConfig = yield (0, _effects.call)(_restApi.api.teams.getInviteLinkConfiguration);
|
|
740
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
741
|
-
inviteTokenState: (0, _extends2.default)({}, invitationLinkConfig)
|
|
742
|
-
}));
|
|
743
|
-
} catch (e) {
|
|
744
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
745
|
-
key: _interfaces.TeamStateKeys.CONFIG_TOKEN_LINK,
|
|
746
|
-
value: (0, _utils2.errorHandler)(e)
|
|
747
|
-
}));
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
function* getInvitationLink() {
|
|
751
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
752
|
-
key: _interfaces.TeamStateKeys.GET_TOKEN_LINK,
|
|
753
|
-
value: false
|
|
754
|
-
}));
|
|
755
|
-
try {
|
|
756
|
-
yield (0, _effects.call)(getInvitationLinkConfig);
|
|
757
|
-
const data = yield (0, _effects.call)(_restApi.api.teams.getInviteUserLink);
|
|
758
|
-
const {
|
|
759
|
-
inviteTokenState
|
|
760
|
-
} = yield selectTeamState();
|
|
761
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
762
|
-
inviteTokenState: (0, _extends2.default)({}, inviteTokenState, data)
|
|
763
|
-
}));
|
|
764
|
-
} catch (e) {
|
|
765
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
766
|
-
key: _interfaces.TeamStateKeys.GET_TOKEN_LINK,
|
|
767
|
-
value: (0, _utils2.errorHandler)(e)
|
|
768
|
-
}));
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
function* createInvitationLink({
|
|
772
|
-
payload: {
|
|
773
|
-
callback
|
|
774
|
-
}
|
|
775
|
-
}) {
|
|
776
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
777
|
-
key: _interfaces.TeamStateKeys.CREATE_TOKEN_LINK,
|
|
778
|
-
value: false
|
|
779
|
-
}));
|
|
780
|
-
const {
|
|
781
|
-
inviteTokenState
|
|
782
|
-
} = yield selectTeamState();
|
|
783
|
-
try {
|
|
784
|
-
const data = yield (0, _effects.call)(_restApi.api.teams.createInviteUserLink, {
|
|
785
|
-
expiresInMinutes: 43200
|
|
786
|
-
});
|
|
787
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
788
|
-
inviteTokenState: (0, _extends2.default)({}, inviteTokenState, data)
|
|
789
|
-
}));
|
|
790
|
-
callback == null ? void 0 : callback(data.token);
|
|
791
|
-
} catch (e) {
|
|
792
|
-
callback == null ? void 0 : callback(null, e);
|
|
793
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
794
|
-
key: _interfaces.TeamStateKeys.CREATE_TOKEN_LINK,
|
|
795
|
-
value: (0, _utils2.errorHandler)(e)
|
|
796
|
-
}));
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
function* updateInvitationLink({
|
|
800
|
-
payload: {
|
|
801
|
-
callback,
|
|
802
|
-
expiresInMinutes,
|
|
803
|
-
shouldSendEmail
|
|
804
|
-
}
|
|
805
|
-
}) {
|
|
806
|
-
const {
|
|
807
|
-
inviteTokenState
|
|
808
|
-
} = yield selectTeamState();
|
|
809
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
810
|
-
key: _interfaces.TeamStateKeys.UPDATE_TOKEN_LINK,
|
|
811
|
-
value: false
|
|
812
|
-
}));
|
|
813
|
-
try {
|
|
814
|
-
const data = yield (0, _effects.call)(_restApi.api.teams.updateInviteUserLink, {
|
|
815
|
-
expiresInMinutes,
|
|
816
|
-
shouldSendEmail
|
|
817
|
-
});
|
|
818
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
819
|
-
inviteTokenState: (0, _extends2.default)({}, inviteTokenState, data)
|
|
820
|
-
}));
|
|
821
|
-
callback == null ? void 0 : callback(true);
|
|
822
|
-
} catch (e) {
|
|
823
|
-
callback == null ? void 0 : callback(null, e);
|
|
824
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
825
|
-
key: _interfaces.TeamStateKeys.UPDATE_TOKEN_LINK,
|
|
826
|
-
value: (0, _utils2.errorHandler)(e)
|
|
827
|
-
}));
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
function* deleteInvitationLink({
|
|
831
|
-
payload
|
|
832
|
-
}) {
|
|
833
|
-
const {
|
|
834
|
-
callback
|
|
835
|
-
} = payload != null ? payload : {};
|
|
836
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
837
|
-
key: _interfaces.TeamStateKeys.DELETE_TOKEN_LINK,
|
|
838
|
-
value: false
|
|
839
|
-
}));
|
|
840
|
-
try {
|
|
841
|
-
yield (0, _effects.call)(_restApi.api.teams.deleteInviteUserLink);
|
|
842
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
843
|
-
inviteTokenState: undefined
|
|
844
|
-
}));
|
|
845
|
-
callback == null ? void 0 : callback(true);
|
|
846
|
-
} catch (e) {
|
|
847
|
-
yield (0, _effects.put)(_reducer.actions.setTeamError({
|
|
848
|
-
key: _interfaces.TeamStateKeys.DELETE_TOKEN_LINK,
|
|
849
|
-
value: (0, _utils2.errorHandler)(e)
|
|
850
|
-
}));
|
|
851
|
-
callback == null ? void 0 : callback(false, e);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
function* openAddUserDialog({
|
|
855
|
-
payload
|
|
856
|
-
}) {
|
|
857
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
858
|
-
addUserDialogState: (0, _extends2.default)({
|
|
859
|
-
open: true,
|
|
860
|
-
loading: false,
|
|
861
|
-
error: false
|
|
862
|
-
}, payload)
|
|
863
|
-
}));
|
|
864
|
-
}
|
|
865
|
-
function* closeAddUserDialog({
|
|
866
|
-
payload
|
|
867
|
-
}) {
|
|
868
|
-
const teamState = yield selectTeamState();
|
|
869
|
-
const {
|
|
870
|
-
addUserDialogState: {
|
|
871
|
-
onClose
|
|
872
|
-
}
|
|
873
|
-
} = teamState;
|
|
874
|
-
onClose == null ? void 0 : onClose(payload);
|
|
875
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
876
|
-
addUserDialogState: {
|
|
877
|
-
loading: false,
|
|
878
|
-
error: false,
|
|
879
|
-
open: false
|
|
880
|
-
}
|
|
881
|
-
}));
|
|
882
|
-
}
|
|
883
|
-
function* openDeleteUserDialog({
|
|
884
|
-
payload
|
|
885
|
-
}) {
|
|
886
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
887
|
-
deleteUserDialogState: (0, _extends2.default)({
|
|
888
|
-
open: true,
|
|
889
|
-
loading: false,
|
|
890
|
-
error: false
|
|
891
|
-
}, payload)
|
|
892
|
-
}));
|
|
893
|
-
}
|
|
894
|
-
function* closeDeleteUserDialog({
|
|
895
|
-
payload
|
|
896
|
-
}) {
|
|
897
|
-
const teamState = yield selectTeamState();
|
|
898
|
-
const {
|
|
899
|
-
deleteUserDialogState: {
|
|
900
|
-
onClose
|
|
901
|
-
}
|
|
902
|
-
} = teamState;
|
|
903
|
-
onClose == null ? void 0 : onClose(payload);
|
|
904
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
905
|
-
deleteUserDialogState: {
|
|
906
|
-
loading: false,
|
|
907
|
-
error: false,
|
|
908
|
-
open: false
|
|
909
|
-
}
|
|
910
|
-
}));
|
|
911
|
-
}
|
|
912
|
-
function* teamSagas() {
|
|
913
|
-
yield (0, _effects.takeLatest)(_reducer.actions.loadUsers, loadUsers);
|
|
914
|
-
yield (0, _effects.takeLatest)(_reducer.actions.loadUsersV2, loadUsersV2);
|
|
915
|
-
yield (0, _effects.takeLatest)(_reducer.actions.loadAllSubTenantsUsers, loadAllSubTenantsUsers);
|
|
916
|
-
yield (0, _effects.takeLatest)(_reducer.actions.loadRoles, loadRoles);
|
|
917
|
-
yield (0, _effects.takeEvery)(_reducer.actions.addUser, addUser);
|
|
918
|
-
yield (0, _effects.takeEvery)(_reducer.actions.addUsersBulk, addUsersBulk);
|
|
919
|
-
yield (0, _effects.takeEvery)(_reducer.actions.addUserToSubTenants, addUserToSubTenants);
|
|
920
|
-
yield (0, _effects.takeEvery)(_reducer.actions.updateUser, updateUser);
|
|
921
|
-
yield (0, _effects.takeEvery)(_reducer.actions.setUserRolesForSubTenants, setUserRolesForSubTenants);
|
|
922
|
-
yield (0, _effects.takeEvery)(_reducer.actions.deleteUser, deleteUser);
|
|
923
|
-
yield (0, _effects.takeEvery)(_reducer.actions.deleteUserFromSubTenants, deleteUserFromSubTenants);
|
|
924
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendActivationLink, resendActivationLink);
|
|
925
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendInvitationLink, resendInvitationLink);
|
|
926
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendInvitationEmail, resendInvitationEmail);
|
|
927
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendInvitationLinkToAllSubTenants, resendInvitationLinkToAllSubTenants);
|
|
928
|
-
yield (0, _effects.takeEvery)(_reducer.actions.getInvitationLink, getInvitationLink);
|
|
929
|
-
yield (0, _effects.takeEvery)(_reducer.actions.createInvitationLink, createInvitationLink);
|
|
930
|
-
yield (0, _effects.takeEvery)(_reducer.actions.updateInvitationLink, updateInvitationLink);
|
|
931
|
-
yield (0, _effects.takeEvery)(_reducer.actions.deleteInvitationLink, deleteInvitationLink);
|
|
932
|
-
yield (0, _effects.takeEvery)(_reducer.actions.openAddUserDialog, openAddUserDialog);
|
|
933
|
-
yield (0, _effects.takeEvery)(_reducer.actions.closeAddUserDialog, closeAddUserDialog);
|
|
934
|
-
yield (0, _effects.takeEvery)(_reducer.actions.openDeleteUserDialog, openDeleteUserDialog);
|
|
935
|
-
yield (0, _effects.takeEvery)(_reducer.actions.closeDeleteUserDialog, closeDeleteUserDialog);
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
/*********************************
|
|
939
|
-
* Preview Sagas
|
|
940
|
-
*********************************/
|
|
941
|
-
|
|
942
|
-
function* loadUsersMock({
|
|
943
|
-
payload
|
|
944
|
-
}) {
|
|
945
|
-
var _payload$pageSize3, _payload$pageOffset3, _payload$filter3, _payload$sort3;
|
|
946
|
-
const {
|
|
947
|
-
silentLoading,
|
|
948
|
-
callback
|
|
949
|
-
} = payload;
|
|
950
|
-
const teamState = yield selectTeamState();
|
|
951
|
-
const pageSize = (_payload$pageSize3 = payload.pageSize) != null ? _payload$pageSize3 : teamState.pageSize;
|
|
952
|
-
const pageOffset = (_payload$pageOffset3 = payload.pageOffset) != null ? _payload$pageOffset3 : teamState.pageOffset;
|
|
953
|
-
const filter = (_payload$filter3 = payload.filter) != null ? _payload$filter3 : teamState.filterV2;
|
|
954
|
-
const sort = (_payload$sort3 = payload.sort) != null ? _payload$sort3 : teamState.sortV2;
|
|
955
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
956
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
957
|
-
value: !silentLoading
|
|
958
|
-
}));
|
|
959
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
960
|
-
pageSize,
|
|
961
|
-
pageOffset,
|
|
962
|
-
filterV2: filter,
|
|
963
|
-
sortV2: sort
|
|
964
|
-
}));
|
|
965
|
-
const totalPages = 2;
|
|
966
|
-
const totalItems = 10;
|
|
967
|
-
yield (0, _utils.delay)();
|
|
968
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
969
|
-
users: _dummy.usersDemo,
|
|
970
|
-
totalPages,
|
|
971
|
-
totalItems,
|
|
972
|
-
roles: _dummy.rolesDemo,
|
|
973
|
-
permissions: _dummy.permissionsDemo
|
|
974
|
-
}));
|
|
975
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
976
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
977
|
-
value: false
|
|
978
|
-
}));
|
|
979
|
-
callback == null ? void 0 : callback(_dummy.usersDemo);
|
|
980
|
-
}
|
|
981
|
-
function* loadAllSubTenantsUsersMock({
|
|
982
|
-
payload
|
|
983
|
-
}) {
|
|
984
|
-
var _payload$_limit2, _payload$_offset2, _payload$_filter2, _payload$_sortBy2, _payload$_order2;
|
|
985
|
-
const {
|
|
986
|
-
silentLoading,
|
|
987
|
-
callback
|
|
988
|
-
} = payload;
|
|
989
|
-
const teamState = yield selectTeamState();
|
|
990
|
-
const _limit = (_payload$_limit2 = payload._limit) != null ? _payload$_limit2 : teamState.allUsersQueryParams._limit;
|
|
991
|
-
const _offset = (_payload$_offset2 = payload._offset) != null ? _payload$_offset2 : teamState.allUsersQueryParams._offset;
|
|
992
|
-
const _filter = (_payload$_filter2 = payload._filter) != null ? _payload$_filter2 : teamState.allUsersQueryParams._filter;
|
|
993
|
-
const _sortBy = (_payload$_sortBy2 = payload._sortBy) != null ? _payload$_sortBy2 : teamState.allUsersQueryParams._sortBy;
|
|
994
|
-
const _order = (_payload$_order2 = payload._order) != null ? _payload$_order2 : teamState.allUsersQueryParams._order;
|
|
995
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
996
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
997
|
-
value: !silentLoading
|
|
998
|
-
}));
|
|
999
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1000
|
-
allUsersQueryParams: {
|
|
1001
|
-
_limit,
|
|
1002
|
-
_offset,
|
|
1003
|
-
_filter,
|
|
1004
|
-
_sortBy,
|
|
1005
|
-
_order
|
|
1006
|
-
}
|
|
1007
|
-
}));
|
|
1008
|
-
const totalPages = 2;
|
|
1009
|
-
const totalItems = 10;
|
|
1010
|
-
yield (0, _utils.delay)();
|
|
1011
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1012
|
-
allUsers: _dummy.allUsersDemo,
|
|
1013
|
-
totalPages,
|
|
1014
|
-
totalItems,
|
|
1015
|
-
roles: _dummy.rolesDemo,
|
|
1016
|
-
permissions: _dummy.permissionsDemo
|
|
1017
|
-
}));
|
|
1018
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1019
|
-
key: _interfaces.TeamStateKeys.USERS,
|
|
1020
|
-
value: false
|
|
1021
|
-
}));
|
|
1022
|
-
callback == null ? void 0 : callback(_dummy.allUsersDemo);
|
|
1023
|
-
}
|
|
1024
|
-
function* loadRolesMock({
|
|
1025
|
-
payload
|
|
1026
|
-
}) {
|
|
1027
|
-
var _payload$callback3;
|
|
1028
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1029
|
-
key: _interfaces.TeamStateKeys.ROLES_AND_PERMISSIONS,
|
|
1030
|
-
value: true
|
|
1031
|
-
}));
|
|
1032
|
-
yield (0, _utils.delay)();
|
|
1033
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1034
|
-
roles: _dummy.rolesDemo,
|
|
1035
|
-
permissions: _dummy.permissionsDemo
|
|
1036
|
-
}));
|
|
1037
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1038
|
-
key: _interfaces.TeamStateKeys.ROLES_AND_PERMISSIONS,
|
|
1039
|
-
value: true
|
|
1040
|
-
}));
|
|
1041
|
-
payload == null ? void 0 : (_payload$callback3 = payload.callback) == null ? void 0 : _payload$callback3.call(payload, {
|
|
1042
|
-
roles: _dummy.rolesDemo,
|
|
1043
|
-
permissions: _dummy.permissionsDemo
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
function* addUserMock({
|
|
1047
|
-
payload
|
|
1048
|
-
}) {
|
|
1049
|
-
const {
|
|
1050
|
-
callback
|
|
1051
|
-
} = payload,
|
|
1052
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded12);
|
|
1053
|
-
const teamState = yield selectTeamState();
|
|
1054
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1055
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
1056
|
-
loading: true
|
|
1057
|
-
})
|
|
1058
|
-
}));
|
|
1059
|
-
yield (0, _utils.delay)();
|
|
1060
|
-
const newUser = (0, _extends2.default)({}, _dummy.userTeamDemo, {
|
|
1061
|
-
groups: []
|
|
1062
|
-
}, body, {
|
|
1063
|
-
id: `${(0, _uuid.v4)()}`
|
|
1064
|
-
});
|
|
1065
|
-
callback == null ? void 0 : callback(newUser);
|
|
1066
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1067
|
-
users: [newUser, ...teamState.users],
|
|
1068
|
-
addUserDialogState: {
|
|
1069
|
-
open: false,
|
|
1070
|
-
loading: false
|
|
1071
|
-
}
|
|
1072
|
-
}));
|
|
1073
|
-
}
|
|
1074
|
-
function* addUserToSubTenantsMock({
|
|
1075
|
-
payload
|
|
1076
|
-
}) {
|
|
1077
|
-
const {
|
|
1078
|
-
callback
|
|
1079
|
-
} = payload,
|
|
1080
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded13);
|
|
1081
|
-
const teamState = yield selectTeamState();
|
|
1082
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1083
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
1084
|
-
loading: true
|
|
1085
|
-
})
|
|
1086
|
-
}));
|
|
1087
|
-
yield (0, _utils.delay)();
|
|
1088
|
-
const newUser = (0, _extends2.default)({}, _dummy.userTeamDemo, body, {
|
|
1089
|
-
id: `${(0, _uuid.v4)()}`
|
|
1090
|
-
});
|
|
1091
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1092
|
-
users: [newUser, ...teamState.users],
|
|
1093
|
-
addUserDialogState: {
|
|
1094
|
-
open: false,
|
|
1095
|
-
loading: false
|
|
1096
|
-
}
|
|
1097
|
-
}));
|
|
1098
|
-
callback == null ? void 0 : callback(null);
|
|
1099
|
-
}
|
|
1100
|
-
function* updateUserMock({
|
|
1101
|
-
payload
|
|
1102
|
-
}) {
|
|
1103
|
-
var _body$roleIds2;
|
|
1104
|
-
const {
|
|
1105
|
-
callback
|
|
1106
|
-
} = payload,
|
|
1107
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded14);
|
|
1108
|
-
const {
|
|
1109
|
-
id: userId
|
|
1110
|
-
} = body;
|
|
1111
|
-
const teamState = yield selectTeamState();
|
|
1112
|
-
const oldUserData = teamState.users.find(user => user.id === body.id);
|
|
1113
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1114
|
-
key: _interfaces.TeamStateKeys.UPDATE_USER,
|
|
1115
|
-
value: userId || ''
|
|
1116
|
-
}));
|
|
1117
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1118
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
1119
|
-
loading: true
|
|
1120
|
-
})
|
|
1121
|
-
}));
|
|
1122
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1123
|
-
addUserDialogState: (0, _extends2.default)({}, teamState.addUserDialogState, {
|
|
1124
|
-
loading: true
|
|
1125
|
-
}),
|
|
1126
|
-
users: teamState.users.map(user => {
|
|
1127
|
-
if (user.id === body.id) {
|
|
1128
|
-
return (0, _extends2.default)({}, user, body);
|
|
1129
|
-
}
|
|
1130
|
-
return user;
|
|
1131
|
-
})
|
|
1132
|
-
}));
|
|
1133
|
-
if (oldUserData.roleIds.length > 0 && ((_body$roleIds2 = body.roleIds) == null ? void 0 : _body$roleIds2.length) === 0) {
|
|
1134
|
-
body.roleIds = [''];
|
|
1135
|
-
}
|
|
1136
|
-
yield (0, _utils.delay)();
|
|
1137
|
-
const newUser = (0, _extends2.default)({}, oldUserData, body);
|
|
1138
|
-
callback == null ? void 0 : callback(newUser);
|
|
1139
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1140
|
-
users: teamState.users.map(user => user.id === newUser.id ? (0, _extends2.default)({}, user, newUser, {
|
|
1141
|
-
createdAt: user.createdAt,
|
|
1142
|
-
customData: user.customData,
|
|
1143
|
-
lastLogin: user.lastLogin
|
|
1144
|
-
}) : user)
|
|
1145
|
-
}));
|
|
1146
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1147
|
-
key: _interfaces.TeamStateKeys.UPDATE_USER,
|
|
1148
|
-
value: false
|
|
1149
|
-
}));
|
|
1150
|
-
}
|
|
1151
|
-
function* deleteUserMock({
|
|
1152
|
-
payload
|
|
1153
|
-
}) {
|
|
1154
|
-
const {
|
|
1155
|
-
callback
|
|
1156
|
-
} = payload,
|
|
1157
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded15);
|
|
1158
|
-
const teamState = yield selectTeamState();
|
|
1159
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1160
|
-
deleteUserDialogState: (0, _extends2.default)({}, teamState.deleteUserDialogState, {
|
|
1161
|
-
loading: true
|
|
1162
|
-
})
|
|
1163
|
-
}));
|
|
1164
|
-
yield (0, _utils.delay)();
|
|
1165
|
-
callback == null ? void 0 : callback(true);
|
|
1166
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1167
|
-
users: teamState.users.filter(user => user.id !== body.userId),
|
|
1168
|
-
deleteUserDialogState: {
|
|
1169
|
-
open: false,
|
|
1170
|
-
loading: false
|
|
1171
|
-
}
|
|
1172
|
-
}));
|
|
1173
|
-
}
|
|
1174
|
-
function* deleteUserFromSubTenantsMock({
|
|
1175
|
-
payload
|
|
1176
|
-
}) {
|
|
1177
|
-
const {
|
|
1178
|
-
callback
|
|
1179
|
-
} = payload,
|
|
1180
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded16);
|
|
1181
|
-
const teamState = yield selectTeamState();
|
|
1182
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1183
|
-
deleteUserDialogState: (0, _extends2.default)({}, teamState.deleteUserDialogState, {
|
|
1184
|
-
loading: true
|
|
1185
|
-
})
|
|
1186
|
-
}));
|
|
1187
|
-
yield (0, _utils.delay)();
|
|
1188
|
-
callback == null ? void 0 : callback(true);
|
|
1189
|
-
yield (0, _effects.put)(_reducer.actions.setTeamState({
|
|
1190
|
-
allUsers: teamState.allUsers.filter(user => user.id !== body.userId),
|
|
1191
|
-
deleteUserDialogState: {
|
|
1192
|
-
open: false,
|
|
1193
|
-
loading: false
|
|
1194
|
-
}
|
|
1195
|
-
}));
|
|
1196
|
-
}
|
|
1197
|
-
function* resendActivationLinkMock({
|
|
1198
|
-
payload
|
|
1199
|
-
}) {
|
|
1200
|
-
const {
|
|
1201
|
-
callback
|
|
1202
|
-
} = payload,
|
|
1203
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded17);
|
|
1204
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1205
|
-
key: _interfaces.TeamStateKeys.RESEND_ACTIVATE_LINK,
|
|
1206
|
-
value: body.userId
|
|
1207
|
-
}));
|
|
1208
|
-
yield (0, _utils.delay)();
|
|
1209
|
-
callback == null ? void 0 : callback(true);
|
|
1210
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1211
|
-
key: _interfaces.TeamStateKeys.RESEND_ACTIVATE_LINK,
|
|
1212
|
-
value: false
|
|
1213
|
-
}));
|
|
1214
|
-
}
|
|
1215
|
-
function* resendInvitationLinkMock({
|
|
1216
|
-
payload
|
|
1217
|
-
}) {
|
|
1218
|
-
const {
|
|
1219
|
-
callback
|
|
1220
|
-
} = payload,
|
|
1221
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded18);
|
|
1222
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1223
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
1224
|
-
value: body.email
|
|
1225
|
-
}));
|
|
1226
|
-
yield (0, _utils.delay)();
|
|
1227
|
-
callback == null ? void 0 : callback(true);
|
|
1228
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1229
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
1230
|
-
value: false
|
|
1231
|
-
}));
|
|
1232
|
-
}
|
|
1233
|
-
function* resendInvitationEmailMock({
|
|
1234
|
-
payload
|
|
1235
|
-
}) {
|
|
1236
|
-
const {
|
|
1237
|
-
callback
|
|
1238
|
-
} = payload,
|
|
1239
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded19);
|
|
1240
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1241
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
1242
|
-
value: body.email
|
|
1243
|
-
}));
|
|
1244
|
-
yield (0, _utils.delay)();
|
|
1245
|
-
callback == null ? void 0 : callback(true);
|
|
1246
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1247
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
1248
|
-
value: false
|
|
1249
|
-
}));
|
|
1250
|
-
}
|
|
1251
|
-
function* resendInvitationLinkToAllSubTenantsMock({
|
|
1252
|
-
payload
|
|
1253
|
-
}) {
|
|
1254
|
-
const {
|
|
1255
|
-
callback
|
|
1256
|
-
} = payload,
|
|
1257
|
-
body = (0, _objectWithoutPropertiesLoose2.default)(payload, _excluded20);
|
|
1258
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1259
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
1260
|
-
value: body.email
|
|
1261
|
-
}));
|
|
1262
|
-
yield (0, _utils.delay)();
|
|
1263
|
-
callback == null ? void 0 : callback(true);
|
|
1264
|
-
yield (0, _effects.put)(_reducer.actions.setTeamLoader({
|
|
1265
|
-
key: _interfaces.TeamStateKeys.RESEND_INVITATION_LINK,
|
|
1266
|
-
value: false
|
|
1267
|
-
}));
|
|
1268
|
-
}
|
|
1269
|
-
function* teamSagasMock() {
|
|
1270
|
-
yield (0, _effects.takeLatest)(_reducer.actions.loadUsersV2, loadUsersMock);
|
|
1271
|
-
yield (0, _effects.takeLatest)(_reducer.actions.loadAllSubTenantsUsers, loadAllSubTenantsUsersMock);
|
|
1272
|
-
yield (0, _effects.takeLatest)(_reducer.actions.loadRoles, loadRolesMock);
|
|
1273
|
-
yield (0, _effects.takeEvery)(_reducer.actions.addUser, addUserMock);
|
|
1274
|
-
yield (0, _effects.takeEvery)(_reducer.actions.addUserToSubTenants, addUserToSubTenantsMock);
|
|
1275
|
-
yield (0, _effects.takeEvery)(_reducer.actions.updateUser, updateUserMock);
|
|
1276
|
-
yield (0, _effects.takeEvery)(_reducer.actions.deleteUser, deleteUserMock);
|
|
1277
|
-
yield (0, _effects.takeEvery)(_reducer.actions.deleteUserFromSubTenants, deleteUserFromSubTenantsMock);
|
|
1278
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendActivationLink, resendActivationLinkMock);
|
|
1279
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendInvitationLink, resendInvitationLinkMock);
|
|
1280
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendInvitationEmail, resendInvitationEmailMock);
|
|
1281
|
-
yield (0, _effects.takeEvery)(_reducer.actions.resendInvitationLinkToAllSubTenants, resendInvitationLinkToAllSubTenantsMock);
|
|
1282
|
-
yield (0, _effects.takeEvery)(_reducer.actions.openAddUserDialog, openAddUserDialog);
|
|
1283
|
-
yield (0, _effects.takeEvery)(_reducer.actions.closeAddUserDialog, closeAddUserDialog);
|
|
1284
|
-
yield (0, _effects.takeEvery)(_reducer.actions.openDeleteUserDialog, openDeleteUserDialog);
|
|
1285
|
-
yield (0, _effects.takeEvery)(_reducer.actions.closeDeleteUserDialog, closeDeleteUserDialog);
|
|
1286
|
-
}
|