@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
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* THIS IS CUSTOM VERSION OF JS-SHA256 that will be used only
|
|
5
|
+
* on non-secure domain due to the native `crypto.subtle.digest`
|
|
6
|
+
* isn't accessible from non-secure domains.
|
|
7
|
+
*
|
|
8
|
+
* NOTE: Changes from 0.9.0:
|
|
9
|
+
* - Remove any usage of eval scripts
|
|
10
|
+
* - Remove support for UMD and AMD exports
|
|
11
|
+
* - Remove support for CommonJS
|
|
12
|
+
* - Make it typescript
|
|
13
|
+
*
|
|
14
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
15
|
+
*
|
|
16
|
+
* @version 0.9.0
|
|
17
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
18
|
+
* @copyright Chen, Yi-Cyuan 2014-2017
|
|
19
|
+
* @license MIT
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const ERROR = 'input is invalid type';
|
|
23
|
+
const ARRAY_BUFFER = typeof ArrayBuffer !== 'undefined';
|
|
24
|
+
const HEX_CHARS = '0123456789abcdef'.split('');
|
|
25
|
+
const EXTRA = [-2147483648, 8388608, 32768, 128];
|
|
26
|
+
const SHIFT = [24, 16, 8, 0];
|
|
27
|
+
const K = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];
|
|
28
|
+
const OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];
|
|
29
|
+
const blocks = [];
|
|
30
|
+
if (!Array.isArray) {
|
|
31
|
+
Array.isArray = function (arg) {
|
|
32
|
+
return Object.prototype.toString.call(arg) === '[object Array]';
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (ARRAY_BUFFER && !ArrayBuffer.isView) {
|
|
36
|
+
ArrayBuffer.isView = function (arg) {
|
|
37
|
+
return typeof arg === 'object' && arg.buffer && arg.buffer.constructor === ArrayBuffer;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const createOutputMethod = function (outputType) {
|
|
41
|
+
return function (message) {
|
|
42
|
+
const instance = new Sha256(true);
|
|
43
|
+
const sha256MessageInstance = instance.update(message);
|
|
44
|
+
return sha256MessageInstance == null ? void 0 : sha256MessageInstance[outputType]();
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const createMethod = function () {
|
|
48
|
+
const method = createOutputMethod('hex');
|
|
49
|
+
method.create = function () {
|
|
50
|
+
return new Sha256();
|
|
51
|
+
};
|
|
52
|
+
method.update = function (message) {
|
|
53
|
+
return method.create().update(message);
|
|
54
|
+
};
|
|
55
|
+
for (let i = 0; i < OUTPUT_TYPES.length; ++i) {
|
|
56
|
+
const type = OUTPUT_TYPES[i];
|
|
57
|
+
method[type] = createOutputMethod(type);
|
|
58
|
+
}
|
|
59
|
+
return method;
|
|
60
|
+
};
|
|
61
|
+
const createHmacOutputMethod = function (outputType) {
|
|
62
|
+
return function (key, message) {
|
|
63
|
+
const instance = new HmacSha256(key, true);
|
|
64
|
+
const hmacMessageInstance = instance.update(message);
|
|
65
|
+
return hmacMessageInstance == null ? void 0 : hmacMessageInstance[outputType]();
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
const createHmacMethod = function () {
|
|
69
|
+
const method = createHmacOutputMethod('hex');
|
|
70
|
+
method.create = function (key) {
|
|
71
|
+
return new HmacSha256(key);
|
|
72
|
+
};
|
|
73
|
+
method.update = function (key, message) {
|
|
74
|
+
return method.create(key).update(message);
|
|
75
|
+
};
|
|
76
|
+
for (let i = 0; i < OUTPUT_TYPES.length; ++i) {
|
|
77
|
+
const type = OUTPUT_TYPES[i];
|
|
78
|
+
method[type] = createHmacOutputMethod(type);
|
|
79
|
+
}
|
|
80
|
+
return method;
|
|
81
|
+
};
|
|
82
|
+
class Sha256 {
|
|
83
|
+
constructor(sharedMemory = false) {
|
|
84
|
+
this.blocks = void 0;
|
|
85
|
+
this.h0 = void 0;
|
|
86
|
+
this.h1 = void 0;
|
|
87
|
+
this.h2 = void 0;
|
|
88
|
+
this.h3 = void 0;
|
|
89
|
+
this.h4 = void 0;
|
|
90
|
+
this.h5 = void 0;
|
|
91
|
+
this.h6 = void 0;
|
|
92
|
+
this.h7 = void 0;
|
|
93
|
+
this.block = void 0;
|
|
94
|
+
this.start = void 0;
|
|
95
|
+
this.bytes = void 0;
|
|
96
|
+
this.hBytes = void 0;
|
|
97
|
+
this.finalized = void 0;
|
|
98
|
+
this.hashed = void 0;
|
|
99
|
+
this.first = void 0;
|
|
100
|
+
this.lastByteIndex = void 0;
|
|
101
|
+
this.sharedMemory = false;
|
|
102
|
+
this.toString = () => this.hex();
|
|
103
|
+
this.array = () => Sha256.prototype.digest();
|
|
104
|
+
if (sharedMemory) {
|
|
105
|
+
blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
|
|
106
|
+
this.blocks = blocks;
|
|
107
|
+
} else {
|
|
108
|
+
this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
109
|
+
}
|
|
110
|
+
this.h0 = 0x6a09e667;
|
|
111
|
+
this.h1 = 0xbb67ae85;
|
|
112
|
+
this.h2 = 0x3c6ef372;
|
|
113
|
+
this.h3 = 0xa54ff53a;
|
|
114
|
+
this.h4 = 0x510e527f;
|
|
115
|
+
this.h5 = 0x9b05688c;
|
|
116
|
+
this.h6 = 0x1f83d9ab;
|
|
117
|
+
this.h7 = 0x5be0cd19;
|
|
118
|
+
this.block = this.start = this.bytes = this.hBytes = 0;
|
|
119
|
+
this.finalized = this.hashed = false;
|
|
120
|
+
this.first = true;
|
|
121
|
+
this.sharedMemory = sharedMemory;
|
|
122
|
+
}
|
|
123
|
+
update(message) {
|
|
124
|
+
if (this.finalized) {
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
let notString;
|
|
128
|
+
const type = typeof message;
|
|
129
|
+
if (type !== 'string') {
|
|
130
|
+
if (type === 'object') {
|
|
131
|
+
if (message === null) {
|
|
132
|
+
throw new Error(ERROR);
|
|
133
|
+
} else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
|
|
134
|
+
message = new Uint8Array(message);
|
|
135
|
+
} else if (!Array.isArray(message)) {
|
|
136
|
+
if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
|
|
137
|
+
throw new Error(ERROR);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
} else {
|
|
141
|
+
throw new Error(ERROR);
|
|
142
|
+
}
|
|
143
|
+
notString = true;
|
|
144
|
+
}
|
|
145
|
+
let code,
|
|
146
|
+
index = 0,
|
|
147
|
+
i;
|
|
148
|
+
const length = message.length;
|
|
149
|
+
const blocks = this.blocks;
|
|
150
|
+
while (index < length) {
|
|
151
|
+
if (this.hashed) {
|
|
152
|
+
this.hashed = false;
|
|
153
|
+
blocks[0] = this.block;
|
|
154
|
+
blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
|
|
155
|
+
}
|
|
156
|
+
if (notString) {
|
|
157
|
+
for (i = this.start; index < length && i < 64; ++index) {
|
|
158
|
+
blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
for (i = this.start; index < length && i < 64; ++index) {
|
|
162
|
+
code = message.charCodeAt(index);
|
|
163
|
+
if (code < 0x80) {
|
|
164
|
+
blocks[i >> 2] |= code << SHIFT[i++ & 3];
|
|
165
|
+
} else if (code < 0x800) {
|
|
166
|
+
blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[i++ & 3];
|
|
167
|
+
blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];
|
|
168
|
+
} else if (code < 0xd800 || code >= 0xe000) {
|
|
169
|
+
blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[i++ & 3];
|
|
170
|
+
blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];
|
|
171
|
+
blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];
|
|
172
|
+
} else {
|
|
173
|
+
code = 0x10000 + ((code & 0x3ff) << 10 | message.charCodeAt(++index) & 0x3ff);
|
|
174
|
+
blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[i++ & 3];
|
|
175
|
+
blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[i++ & 3];
|
|
176
|
+
blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];
|
|
177
|
+
blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
this.lastByteIndex = i;
|
|
182
|
+
this.bytes += i - this.start;
|
|
183
|
+
if (i >= 64) {
|
|
184
|
+
this.block = blocks[16];
|
|
185
|
+
this.start = i - 64;
|
|
186
|
+
this.hash();
|
|
187
|
+
this.hashed = true;
|
|
188
|
+
} else {
|
|
189
|
+
this.start = i;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (this.bytes > 4294967295) {
|
|
193
|
+
this.hBytes += this.bytes / 4294967296 << 0;
|
|
194
|
+
this.bytes = this.bytes % 4294967296;
|
|
195
|
+
}
|
|
196
|
+
return this;
|
|
197
|
+
}
|
|
198
|
+
finalize() {
|
|
199
|
+
if (this.finalized) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
this.finalized = true;
|
|
203
|
+
const blocks = this.blocks,
|
|
204
|
+
i = this.lastByteIndex;
|
|
205
|
+
blocks[16] = this.block;
|
|
206
|
+
blocks[i >> 2] |= EXTRA[i & 3];
|
|
207
|
+
this.block = blocks[16];
|
|
208
|
+
if (i >= 56) {
|
|
209
|
+
if (!this.hashed) {
|
|
210
|
+
this.hash();
|
|
211
|
+
}
|
|
212
|
+
blocks[0] = this.block;
|
|
213
|
+
blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
|
|
214
|
+
}
|
|
215
|
+
blocks[14] = this.hBytes << 3 | this.bytes >>> 29;
|
|
216
|
+
blocks[15] = this.bytes << 3;
|
|
217
|
+
this.hash();
|
|
218
|
+
}
|
|
219
|
+
hash() {
|
|
220
|
+
let a = this.h0,
|
|
221
|
+
b = this.h1,
|
|
222
|
+
c = this.h2,
|
|
223
|
+
d = this.h3,
|
|
224
|
+
e = this.h4,
|
|
225
|
+
f = this.h5,
|
|
226
|
+
g = this.h6,
|
|
227
|
+
h = this.h7,
|
|
228
|
+
j,
|
|
229
|
+
s0,
|
|
230
|
+
s1,
|
|
231
|
+
maj,
|
|
232
|
+
t1,
|
|
233
|
+
t2,
|
|
234
|
+
ch,
|
|
235
|
+
ab,
|
|
236
|
+
da,
|
|
237
|
+
cd,
|
|
238
|
+
bc;
|
|
239
|
+
const blocks = this.blocks;
|
|
240
|
+
for (j = 16; j < 64; ++j) {
|
|
241
|
+
// rightrotate
|
|
242
|
+
t1 = blocks[j - 15];
|
|
243
|
+
s0 = (t1 >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3;
|
|
244
|
+
t1 = blocks[j - 2];
|
|
245
|
+
s1 = (t1 >>> 17 | t1 << 15) ^ (t1 >>> 19 | t1 << 13) ^ t1 >>> 10;
|
|
246
|
+
blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;
|
|
247
|
+
}
|
|
248
|
+
bc = b & c;
|
|
249
|
+
for (j = 0; j < 64; j += 4) {
|
|
250
|
+
if (this.first) {
|
|
251
|
+
ab = 704751109;
|
|
252
|
+
t1 = blocks[0] - 210244248;
|
|
253
|
+
h = t1 - 1521486534 << 0;
|
|
254
|
+
d = t1 + 143694565 << 0;
|
|
255
|
+
this.first = false;
|
|
256
|
+
} else {
|
|
257
|
+
s0 = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10);
|
|
258
|
+
s1 = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
|
|
259
|
+
ab = a & b;
|
|
260
|
+
maj = ab ^ a & c ^ bc;
|
|
261
|
+
ch = e & f ^ ~e & g;
|
|
262
|
+
t1 = h + s1 + ch + K[j] + blocks[j];
|
|
263
|
+
t2 = s0 + maj;
|
|
264
|
+
h = d + t1 << 0;
|
|
265
|
+
d = t1 + t2 << 0;
|
|
266
|
+
}
|
|
267
|
+
s0 = (d >>> 2 | d << 30) ^ (d >>> 13 | d << 19) ^ (d >>> 22 | d << 10);
|
|
268
|
+
s1 = (h >>> 6 | h << 26) ^ (h >>> 11 | h << 21) ^ (h >>> 25 | h << 7);
|
|
269
|
+
da = d & a;
|
|
270
|
+
maj = da ^ d & b ^ ab;
|
|
271
|
+
ch = h & e ^ ~h & f;
|
|
272
|
+
t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];
|
|
273
|
+
t2 = s0 + maj;
|
|
274
|
+
g = c + t1 << 0;
|
|
275
|
+
c = t1 + t2 << 0;
|
|
276
|
+
s0 = (c >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10);
|
|
277
|
+
s1 = (g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7);
|
|
278
|
+
cd = c & d;
|
|
279
|
+
maj = cd ^ c & a ^ da;
|
|
280
|
+
ch = g & h ^ ~g & e;
|
|
281
|
+
t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];
|
|
282
|
+
t2 = s0 + maj;
|
|
283
|
+
f = b + t1 << 0;
|
|
284
|
+
b = t1 + t2 << 0;
|
|
285
|
+
s0 = (b >>> 2 | b << 30) ^ (b >>> 13 | b << 19) ^ (b >>> 22 | b << 10);
|
|
286
|
+
s1 = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7);
|
|
287
|
+
bc = b & c;
|
|
288
|
+
maj = bc ^ b & d ^ cd;
|
|
289
|
+
ch = f & g ^ ~f & h;
|
|
290
|
+
t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];
|
|
291
|
+
t2 = s0 + maj;
|
|
292
|
+
e = a + t1 << 0;
|
|
293
|
+
a = t1 + t2 << 0;
|
|
294
|
+
}
|
|
295
|
+
this.h0 = this.h0 + a << 0;
|
|
296
|
+
this.h1 = this.h1 + b << 0;
|
|
297
|
+
this.h2 = this.h2 + c << 0;
|
|
298
|
+
this.h3 = this.h3 + d << 0;
|
|
299
|
+
this.h4 = this.h4 + e << 0;
|
|
300
|
+
this.h5 = this.h5 + f << 0;
|
|
301
|
+
this.h6 = this.h6 + g << 0;
|
|
302
|
+
this.h7 = this.h7 + h << 0;
|
|
303
|
+
}
|
|
304
|
+
hex() {
|
|
305
|
+
this.finalize();
|
|
306
|
+
const h0 = this.h0,
|
|
307
|
+
h1 = this.h1,
|
|
308
|
+
h2 = this.h2,
|
|
309
|
+
h3 = this.h3,
|
|
310
|
+
h4 = this.h4,
|
|
311
|
+
h5 = this.h5,
|
|
312
|
+
h6 = this.h6,
|
|
313
|
+
h7 = this.h7;
|
|
314
|
+
let hex = HEX_CHARS[h0 >> 28 & 0x0f] + HEX_CHARS[h0 >> 24 & 0x0f] + HEX_CHARS[h0 >> 20 & 0x0f] + HEX_CHARS[h0 >> 16 & 0x0f] + HEX_CHARS[h0 >> 12 & 0x0f] + HEX_CHARS[h0 >> 8 & 0x0f] + HEX_CHARS[h0 >> 4 & 0x0f] + HEX_CHARS[h0 & 0x0f] + HEX_CHARS[h1 >> 28 & 0x0f] + HEX_CHARS[h1 >> 24 & 0x0f] + HEX_CHARS[h1 >> 20 & 0x0f] + HEX_CHARS[h1 >> 16 & 0x0f] + HEX_CHARS[h1 >> 12 & 0x0f] + HEX_CHARS[h1 >> 8 & 0x0f] + HEX_CHARS[h1 >> 4 & 0x0f] + HEX_CHARS[h1 & 0x0f] + HEX_CHARS[h2 >> 28 & 0x0f] + HEX_CHARS[h2 >> 24 & 0x0f] + HEX_CHARS[h2 >> 20 & 0x0f] + HEX_CHARS[h2 >> 16 & 0x0f] + HEX_CHARS[h2 >> 12 & 0x0f] + HEX_CHARS[h2 >> 8 & 0x0f] + HEX_CHARS[h2 >> 4 & 0x0f] + HEX_CHARS[h2 & 0x0f] + HEX_CHARS[h3 >> 28 & 0x0f] + HEX_CHARS[h3 >> 24 & 0x0f] + HEX_CHARS[h3 >> 20 & 0x0f] + HEX_CHARS[h3 >> 16 & 0x0f] + HEX_CHARS[h3 >> 12 & 0x0f] + HEX_CHARS[h3 >> 8 & 0x0f] + HEX_CHARS[h3 >> 4 & 0x0f] + HEX_CHARS[h3 & 0x0f] + HEX_CHARS[h4 >> 28 & 0x0f] + HEX_CHARS[h4 >> 24 & 0x0f] + HEX_CHARS[h4 >> 20 & 0x0f] + HEX_CHARS[h4 >> 16 & 0x0f] + HEX_CHARS[h4 >> 12 & 0x0f] + HEX_CHARS[h4 >> 8 & 0x0f] + HEX_CHARS[h4 >> 4 & 0x0f] + HEX_CHARS[h4 & 0x0f] + HEX_CHARS[h5 >> 28 & 0x0f] + HEX_CHARS[h5 >> 24 & 0x0f] + HEX_CHARS[h5 >> 20 & 0x0f] + HEX_CHARS[h5 >> 16 & 0x0f] + HEX_CHARS[h5 >> 12 & 0x0f] + HEX_CHARS[h5 >> 8 & 0x0f] + HEX_CHARS[h5 >> 4 & 0x0f] + HEX_CHARS[h5 & 0x0f] + HEX_CHARS[h6 >> 28 & 0x0f] + HEX_CHARS[h6 >> 24 & 0x0f] + HEX_CHARS[h6 >> 20 & 0x0f] + HEX_CHARS[h6 >> 16 & 0x0f] + HEX_CHARS[h6 >> 12 & 0x0f] + HEX_CHARS[h6 >> 8 & 0x0f] + HEX_CHARS[h6 >> 4 & 0x0f] + HEX_CHARS[h6 & 0x0f];
|
|
315
|
+
hex += HEX_CHARS[h7 >> 28 & 0x0f] + HEX_CHARS[h7 >> 24 & 0x0f] + HEX_CHARS[h7 >> 20 & 0x0f] + HEX_CHARS[h7 >> 16 & 0x0f] + HEX_CHARS[h7 >> 12 & 0x0f] + HEX_CHARS[h7 >> 8 & 0x0f] + HEX_CHARS[h7 >> 4 & 0x0f] + HEX_CHARS[h7 & 0x0f];
|
|
316
|
+
return hex;
|
|
317
|
+
}
|
|
318
|
+
digest() {
|
|
319
|
+
this.finalize();
|
|
320
|
+
const h0 = this.h0,
|
|
321
|
+
h1 = this.h1,
|
|
322
|
+
h2 = this.h2,
|
|
323
|
+
h3 = this.h3,
|
|
324
|
+
h4 = this.h4,
|
|
325
|
+
h5 = this.h5,
|
|
326
|
+
h6 = this.h6,
|
|
327
|
+
h7 = this.h7;
|
|
328
|
+
const arr = [h0 >> 24 & 0xff, h0 >> 16 & 0xff, h0 >> 8 & 0xff, h0 & 0xff, h1 >> 24 & 0xff, h1 >> 16 & 0xff, h1 >> 8 & 0xff, h1 & 0xff, h2 >> 24 & 0xff, h2 >> 16 & 0xff, h2 >> 8 & 0xff, h2 & 0xff, h3 >> 24 & 0xff, h3 >> 16 & 0xff, h3 >> 8 & 0xff, h3 & 0xff, h4 >> 24 & 0xff, h4 >> 16 & 0xff, h4 >> 8 & 0xff, h4 & 0xff, h5 >> 24 & 0xff, h5 >> 16 & 0xff, h5 >> 8 & 0xff, h5 & 0xff, h6 >> 24 & 0xff, h6 >> 16 & 0xff, h6 >> 8 & 0xff, h6 & 0xff];
|
|
329
|
+
arr.push(h7 >> 24 & 0xff, h7 >> 16 & 0xff, h7 >> 8 & 0xff, h7 & 0xff);
|
|
330
|
+
return arr;
|
|
331
|
+
}
|
|
332
|
+
arrayBuffer() {
|
|
333
|
+
this.finalize();
|
|
334
|
+
const buffer = new ArrayBuffer(32);
|
|
335
|
+
const dataView = new DataView(buffer);
|
|
336
|
+
dataView.setUint32(0, this.h0);
|
|
337
|
+
dataView.setUint32(4, this.h1);
|
|
338
|
+
dataView.setUint32(8, this.h2);
|
|
339
|
+
dataView.setUint32(12, this.h3);
|
|
340
|
+
dataView.setUint32(16, this.h4);
|
|
341
|
+
dataView.setUint32(20, this.h5);
|
|
342
|
+
dataView.setUint32(24, this.h6);
|
|
343
|
+
dataView.setUint32(28, this.h7);
|
|
344
|
+
return buffer;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
class HmacSha256 extends Sha256 {
|
|
348
|
+
constructor(key, sharedMemory = false) {
|
|
349
|
+
super(sharedMemory);
|
|
350
|
+
this.inner = void 0;
|
|
351
|
+
this.oKeyPad = void 0;
|
|
352
|
+
let i;
|
|
353
|
+
const type = typeof key;
|
|
354
|
+
if (type === 'string') {
|
|
355
|
+
const bytes = [],
|
|
356
|
+
length = key.length;
|
|
357
|
+
let index = 0,
|
|
358
|
+
code;
|
|
359
|
+
for (i = 0; i < length; ++i) {
|
|
360
|
+
code = key.charCodeAt(i);
|
|
361
|
+
if (code < 0x80) {
|
|
362
|
+
bytes[index++] = code;
|
|
363
|
+
} else if (code < 0x800) {
|
|
364
|
+
bytes[index++] = 0xc0 | code >> 6;
|
|
365
|
+
bytes[index++] = 0x80 | code & 0x3f;
|
|
366
|
+
} else if (code < 0xd800 || code >= 0xe000) {
|
|
367
|
+
bytes[index++] = 0xe0 | code >> 12;
|
|
368
|
+
bytes[index++] = 0x80 | code >> 6 & 0x3f;
|
|
369
|
+
bytes[index++] = 0x80 | code & 0x3f;
|
|
370
|
+
} else {
|
|
371
|
+
code = 0x10000 + ((code & 0x3ff) << 10 | key.charCodeAt(++i) & 0x3ff);
|
|
372
|
+
bytes[index++] = 0xf0 | code >> 18;
|
|
373
|
+
bytes[index++] = 0x80 | code >> 12 & 0x3f;
|
|
374
|
+
bytes[index++] = 0x80 | code >> 6 & 0x3f;
|
|
375
|
+
bytes[index++] = 0x80 | code & 0x3f;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
key = bytes;
|
|
379
|
+
} else {
|
|
380
|
+
if (type === 'object') {
|
|
381
|
+
if (key === null) {
|
|
382
|
+
throw new Error(ERROR);
|
|
383
|
+
} else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {
|
|
384
|
+
key = new Uint8Array(key);
|
|
385
|
+
} else if (!Array.isArray(key)) {
|
|
386
|
+
if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {
|
|
387
|
+
throw new Error(ERROR);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
} else {
|
|
391
|
+
throw new Error(ERROR);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
if (key.length > 64) {
|
|
395
|
+
var _Sha256$update;
|
|
396
|
+
key = (_Sha256$update = new Sha256(true).update(key)) == null ? void 0 : _Sha256$update.array();
|
|
397
|
+
}
|
|
398
|
+
const oKeyPad = [],
|
|
399
|
+
iKeyPad = [];
|
|
400
|
+
for (i = 0; i < 64; ++i) {
|
|
401
|
+
const b = key[i] || 0;
|
|
402
|
+
oKeyPad[i] = 0x5c ^ b;
|
|
403
|
+
iKeyPad[i] = 0x36 ^ b;
|
|
404
|
+
}
|
|
405
|
+
Sha256.call(this, sharedMemory);
|
|
406
|
+
this.update(iKeyPad);
|
|
407
|
+
this.oKeyPad = oKeyPad;
|
|
408
|
+
this.inner = true;
|
|
409
|
+
this.sharedMemory = sharedMemory;
|
|
410
|
+
}
|
|
411
|
+
finalize() {
|
|
412
|
+
super.finalize();
|
|
413
|
+
if (this.inner) {
|
|
414
|
+
this.inner = false;
|
|
415
|
+
const innerHash = this.array();
|
|
416
|
+
Sha256.call(this, this.sharedMemory);
|
|
417
|
+
this.update(this.oKeyPad);
|
|
418
|
+
this.update(innerHash);
|
|
419
|
+
Sha256.prototype.finalize.call(this);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
export const sha256 = createMethod();
|
|
424
|
+
export const hmac = createHmacMethod();
|
package/index.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export * from './toolkit';
|
|
2
|
+
export * from './constants';
|
|
3
|
+
export * from './helpers';
|
|
4
|
+
export * from './auth/helpers';
|
|
5
|
+
export * from './interfaces';
|
|
6
6
|
export * from './auth';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './audits/backward-compatibility';
|
|
7
|
+
export * from './auth/interfaces';
|
|
9
8
|
export * from './connectivity';
|
|
9
|
+
export * from './connectivity/interfaces';
|
|
10
10
|
export * from './subscriptions';
|
|
11
|
+
export * from './subscriptions/interfaces';
|
|
11
12
|
export * from './vendor';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export type { WithCallback, WithSilentLoad, CallbackMethod } from './interfaces';
|
|
13
|
+
export * from './vendor/interfaces';
|
|
14
|
+
export * from './audits';
|
|
15
|
+
export * from './audits/interfaces';
|
|
16
16
|
export type { NotEntitledJustification } from '@frontegg/rest-api';
|
|
17
|
-
export type { FronteggState } from './fronteggState';
|
package/index.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
/** @license Frontegg v7.0.0-alpha.
|
|
1
|
+
/** @license Frontegg v7.0.0-alpha.10
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
6
|
+
export * from './toolkit';
|
|
7
|
+
export * from './constants';
|
|
8
|
+
export * from './helpers';
|
|
9
|
+
export * from './auth/helpers';
|
|
10
|
+
export * from './interfaces';
|
|
11
11
|
export * from './auth';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './audits/backward-compatibility';
|
|
12
|
+
export * from './auth/interfaces';
|
|
14
13
|
export * from './connectivity';
|
|
14
|
+
export * from './connectivity/interfaces';
|
|
15
15
|
export * from './subscriptions';
|
|
16
|
+
export * from './subscriptions/interfaces';
|
|
16
17
|
export * from './vendor';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
18
|
+
export * from './vendor/interfaces';
|
|
19
|
+
export * from './audits';
|
|
20
|
+
export * from './audits/interfaces';
|
|
21
|
+
export {};
|
package/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { api, ContextOptions, fetch } from '@frontegg/rest-api';
|
|
2
|
+
import { AuthActions, AuthStateActions } from './auth';
|
|
3
|
+
import type { AuthState } from './auth/interfaces';
|
|
4
|
+
import type { ConnectivityActions } from './connectivity';
|
|
5
|
+
import type { ConnectivityState } from './connectivity/interfaces';
|
|
6
|
+
import { SubscriptionsActions, SubscriptionsStateActions } from './subscriptions';
|
|
7
|
+
import type { SubscriptionsState } from './subscriptions/interfaces';
|
|
8
|
+
import type { VendorActions } from './vendor';
|
|
9
|
+
import type { VendorState } from './vendor/interfaces';
|
|
10
|
+
import { AuditsState } from './audits/interfaces';
|
|
11
|
+
import { AuditsActions } from './audits';
|
|
12
|
+
import { OldAuditsState } from './audits-backward-compatibility/interfaces';
|
|
13
|
+
import { OldAuditsActions } from './audits-backward-compatibility';
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated use FronteggStore instead
|
|
16
|
+
*/
|
|
17
|
+
export declare type EnhancedStore = FronteggStore;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated use direct actions instead
|
|
20
|
+
*/
|
|
21
|
+
export declare type Dispatch = (action: {
|
|
22
|
+
type: string;
|
|
23
|
+
payload?: any;
|
|
24
|
+
}) => void;
|
|
25
|
+
export interface FronteggStore {
|
|
26
|
+
dispatch: Dispatch;
|
|
27
|
+
getState: () => FronteggState;
|
|
28
|
+
subscribe: (callback: () => void) => () => void;
|
|
29
|
+
store: FronteggState;
|
|
30
|
+
actions: FronteggActions;
|
|
31
|
+
stateActions: FronteggStateActions;
|
|
32
|
+
}
|
|
33
|
+
export interface RootState {
|
|
34
|
+
appName: string;
|
|
35
|
+
context: ContextOptions;
|
|
36
|
+
urlStrategy?: 'hash' | 'path';
|
|
37
|
+
previewMode?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare type FronteggState = {
|
|
40
|
+
root: RootState;
|
|
41
|
+
auth: AuthState;
|
|
42
|
+
connectivity: ConnectivityState;
|
|
43
|
+
subscriptions: SubscriptionsState;
|
|
44
|
+
vendor: VendorState;
|
|
45
|
+
auditLogs: AuditsState;
|
|
46
|
+
/** @deprecated use auditLogs instead of audits */
|
|
47
|
+
audits: OldAuditsState;
|
|
48
|
+
};
|
|
49
|
+
export declare type PartialFronteggState = Partial<{
|
|
50
|
+
root: DeepPartial<RootState>;
|
|
51
|
+
auth: DeepPartial<AuthState>;
|
|
52
|
+
connectivity: Partial<ConnectivityState>;
|
|
53
|
+
subscriptions: DeepPartial<SubscriptionsState>;
|
|
54
|
+
vendor: DeepPartial<VendorState>;
|
|
55
|
+
auditLogs: DeepPartial<AuditsState>;
|
|
56
|
+
/** @deprecated use auditLogs instead of audits */
|
|
57
|
+
audits: Partial<OldAuditsState>;
|
|
58
|
+
}>;
|
|
59
|
+
export declare type FronteggActions = AuthActions & ConnectivityActions & SubscriptionsActions & VendorActions & AuditsActions;
|
|
60
|
+
export declare type FronteggStateActions = {
|
|
61
|
+
auth: AuthStateActions;
|
|
62
|
+
connectivity: ConnectivityActions;
|
|
63
|
+
subscriptions: SubscriptionsStateActions;
|
|
64
|
+
vendor: VendorActions;
|
|
65
|
+
auditLogs: AuditsActions;
|
|
66
|
+
/** @deprecated use auditLogs instead of audits */
|
|
67
|
+
audits: OldAuditsActions;
|
|
68
|
+
};
|
|
69
|
+
export declare type SharedActions = any;
|
|
70
|
+
export declare type RestApi = typeof api & {
|
|
71
|
+
fetch: typeof fetch;
|
|
72
|
+
};
|
|
73
|
+
export declare type CallbackMethod<R = boolean> = (data: R | null, error?: string | any | unknown) => void;
|
|
74
|
+
export declare type WithCallback<T = object, R = boolean> = T & {
|
|
3
75
|
callback?: CallbackMethod<R>;
|
|
4
76
|
};
|
|
5
77
|
export declare type WithStatus = {
|
|
@@ -7,16 +79,18 @@ export declare type WithStatus = {
|
|
|
7
79
|
error?: any;
|
|
8
80
|
saving?: boolean;
|
|
9
81
|
};
|
|
10
|
-
export declare type WithId<T =
|
|
82
|
+
export declare type WithId<T = object> = T & {
|
|
11
83
|
id: string;
|
|
12
84
|
};
|
|
85
|
+
export declare type WithSilentLoad<T = {}> = T & {
|
|
86
|
+
silentLoading?: boolean;
|
|
87
|
+
};
|
|
13
88
|
export declare type LoaderIndicatorState<T extends string> = Partial<{
|
|
14
89
|
[key in T]: string | boolean;
|
|
15
90
|
}>;
|
|
16
91
|
export declare type ErrorsIndicatorState<T extends string> = Partial<{
|
|
17
92
|
[key in T]: string | boolean;
|
|
18
93
|
}>;
|
|
19
|
-
export declare type
|
|
20
|
-
|
|
94
|
+
export declare type DeepPartial<T> = {
|
|
95
|
+
[P in keyof T]?: T[P] extends any[] | undefined ? T[P] : T[P] extends Function ? T[P] : T[P] extends object | undefined ? Partial<T[P]> : T[P];
|
|
21
96
|
};
|
|
22
|
-
export declare type ActionDispatchMatcher<Reducers, Actions, DispatchedActions> = Omit<Reducers & Actions, keyof DispatchedActions> & Omit<DispatchedActions, keyof (Actions & Reducers)>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FronteggState, RestApi, SharedActions } from '../../interfaces';
|
|
2
|
+
declare const _default: (store: FronteggState, api: RestApi, actions: SharedActions) => {
|
|
3
|
+
setAuditLogsState: (state: Partial<import("../../audits/AuditLogsState/interfaces").AuditLogsState>) => void;
|
|
4
|
+
resetAuditLogsState: () => void;
|
|
5
|
+
exportAuditsCsv: () => Promise<void>;
|
|
6
|
+
loadAuditLogs: (payload: import("../../interfaces").WithSilentLoad<import("../../interfaces").WithCallback<{
|
|
7
|
+
pageOffset: number;
|
|
8
|
+
pageSize?: number | undefined;
|
|
9
|
+
filter?: import("@frontegg/rest-api").QueryFilter[] | undefined;
|
|
10
|
+
sort?: import("@frontegg/rest-api").QuerySort[] | undefined;
|
|
11
|
+
}, boolean>>) => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { mockActionsExpect } from '../helpers';
|
|
2
|
+
import { buildAuditLogsActions } from '../../audits/AuditLogsState';
|
|
3
|
+
import { errorHandler } from '../../helpers';
|
|
4
|
+
import { auditsLogsFilterAndSort } from './dummy';
|
|
5
|
+
export default ((store, api, actions) => {
|
|
6
|
+
const originalActions = buildAuditLogsActions(store, api, actions);
|
|
7
|
+
const mockedActions = mockActionsExpect(originalActions, ['setAuditLogsState', 'resetAuditLogsState']);
|
|
8
|
+
mockedActions.loadAuditLogs = async payload => {
|
|
9
|
+
mockedActions.setAuditLogsState({
|
|
10
|
+
loading: !payload.silentLoading,
|
|
11
|
+
error: null
|
|
12
|
+
});
|
|
13
|
+
const state = store.auditLogs.auditLogsState;
|
|
14
|
+
const {
|
|
15
|
+
columns
|
|
16
|
+
} = store.auditLogs.auditsMetadataState;
|
|
17
|
+
try {
|
|
18
|
+
var _payload$pageSize, _payload$pageOffset, _payload$filter, _payload$sort, _payload$callback;
|
|
19
|
+
const pageSize = (_payload$pageSize = payload.pageSize) != null ? _payload$pageSize : state.pageSize;
|
|
20
|
+
const pageOffset = (_payload$pageOffset = payload.pageOffset) != null ? _payload$pageOffset : state.pageOffset;
|
|
21
|
+
const filter = (_payload$filter = payload.filter) != null ? _payload$filter : state.filter;
|
|
22
|
+
const sort = (_payload$sort = payload.sort) != null ? _payload$sort : state.sort;
|
|
23
|
+
mockedActions.setAuditLogsState({
|
|
24
|
+
pageSize,
|
|
25
|
+
pageOffset,
|
|
26
|
+
filter,
|
|
27
|
+
sort
|
|
28
|
+
});
|
|
29
|
+
if (!columns) {
|
|
30
|
+
await actions.loadAuditsMetadata();
|
|
31
|
+
}
|
|
32
|
+
const {
|
|
33
|
+
data,
|
|
34
|
+
total
|
|
35
|
+
} = auditsLogsFilterAndSort(filter, sort);
|
|
36
|
+
mockedActions.setAuditLogsState({
|
|
37
|
+
loading: false,
|
|
38
|
+
logs: data != null ? data : [],
|
|
39
|
+
totalPages: +Math.ceil(total / pageSize)
|
|
40
|
+
});
|
|
41
|
+
payload == null ? void 0 : (_payload$callback = payload.callback) == null ? void 0 : _payload$callback.call(payload, true);
|
|
42
|
+
} catch (e) {
|
|
43
|
+
var _payload$callback2;
|
|
44
|
+
mockedActions.setAuditLogsState({
|
|
45
|
+
loading: false,
|
|
46
|
+
error: errorHandler(e)
|
|
47
|
+
});
|
|
48
|
+
payload == null ? void 0 : (_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, null, e);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return mockedActions;
|
|
52
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FronteggState, RestApi, SharedActions } from '../../interfaces';
|
|
2
|
+
declare const _default: (store: FronteggState, api: RestApi, actions: SharedActions) => {
|
|
3
|
+
setAuditsMetadataState: (state: Partial<import("../..").AuditsMetadataState>) => void;
|
|
4
|
+
resetAuditsMetadataState: () => void;
|
|
5
|
+
loadAuditsMetadata: () => Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|