@frontegg/redux-store 6.105.0-alpha.0 → 6.105.0-alpha.2
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/auth/LoginState/interfaces.d.ts +2 -1
- package/auth/LoginState/interfaces.js +1 -0
- package/auth/LoginState/saga.js +57 -56
- package/auth/MSP/AllAccountsState/allAccountsDialogsState.d.ts +15 -3
- package/auth/MSP/AllAccountsState/index.d.ts +54 -0
- package/auth/MSP/AllAccountsState/index.js +3 -2
- package/auth/MSP/AllAccountsState/saga.js +115 -88
- package/auth/MSP/AllAccountsState/types/dialogsStateTypes.d.ts +6 -7
- package/auth/MSP/AllAccountsState/utils/getAccountsWithUsersCount.d.ts +13 -0
- package/auth/MSP/AllAccountsState/utils/getAccountsWithUsersCount.js +19 -0
- package/auth/index.d.ts +10 -1
- package/auth/reducer.d.ts +10 -1
- package/index.js +1 -1
- package/node/auth/LoginState/interfaces.js +1 -0
- package/node/auth/LoginState/saga.js +57 -56
- package/node/auth/MSP/AllAccountsState/index.js +2 -1
- package/node/auth/MSP/AllAccountsState/saga.js +115 -88
- package/node/auth/MSP/AllAccountsState/utils/getAccountsWithUsersCount.js +26 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,8 @@ export declare enum LoginStep {
|
|
|
14
14
|
'success' = "success",
|
|
15
15
|
'forceTwoFactor' = "forceTwoFactor",
|
|
16
16
|
'recoverTwoFactor' = "recoverTwoFactor",
|
|
17
|
-
'promptPasskeys' = "promptPasskeys"
|
|
17
|
+
'promptPasskeys' = "promptPasskeys",
|
|
18
|
+
'breachedPassword' = "breachedPassword"
|
|
18
19
|
}
|
|
19
20
|
export declare enum LoginFlow {
|
|
20
21
|
Login = "login",
|
|
@@ -14,6 +14,7 @@ export let LoginStep;
|
|
|
14
14
|
LoginStep["forceTwoFactor"] = "forceTwoFactor";
|
|
15
15
|
LoginStep["recoverTwoFactor"] = "recoverTwoFactor";
|
|
16
16
|
LoginStep["promptPasskeys"] = "promptPasskeys";
|
|
17
|
+
LoginStep["breachedPassword"] = "breachedPassword";
|
|
17
18
|
})(LoginStep || (LoginStep = {}));
|
|
18
19
|
export let LoginFlow;
|
|
19
20
|
(function (LoginFlow) {
|
package/auth/LoginState/saga.js
CHANGED
|
@@ -492,11 +492,12 @@ function* loadCustomLoginRoutes() {
|
|
|
492
492
|
loginUrl
|
|
493
493
|
} = yield call(getPublicSettings);
|
|
494
494
|
if (applicationUrl && loginUrl) {
|
|
495
|
-
var
|
|
495
|
+
var _getSearchParamsFromU;
|
|
496
|
+
const searchParams = (_getSearchParamsFromU = getSearchParamsFromUrl(applicationUrl)) != null ? _getSearchParamsFromU : '';
|
|
496
497
|
yield put(actions.setState({
|
|
497
498
|
routes: _extends({}, routes, {
|
|
498
499
|
customLoginAuthenticatedUrl: loginUrl,
|
|
499
|
-
customLoginUrl:
|
|
500
|
+
customLoginUrl: routes.loginUrl + searchParams
|
|
500
501
|
})
|
|
501
502
|
}));
|
|
502
503
|
}
|
|
@@ -721,13 +722,13 @@ function* handleHostedLoginCallback({
|
|
|
721
722
|
yield afterAuthNavigation();
|
|
722
723
|
}
|
|
723
724
|
}
|
|
724
|
-
function* changePhoneNumberWithVerification(
|
|
725
|
+
function* changePhoneNumberWithVerification(_ref4) {
|
|
725
726
|
let {
|
|
726
727
|
payload: {
|
|
727
728
|
callback
|
|
728
729
|
}
|
|
729
|
-
} =
|
|
730
|
-
payload = _objectWithoutPropertiesLoose(
|
|
730
|
+
} = _ref4,
|
|
731
|
+
payload = _objectWithoutPropertiesLoose(_ref4.payload, _excluded);
|
|
731
732
|
try {
|
|
732
733
|
yield put(actions.setLoginState({
|
|
733
734
|
loading: true
|
|
@@ -748,13 +749,13 @@ function* changePhoneNumberWithVerification(_ref5) {
|
|
|
748
749
|
}));
|
|
749
750
|
}
|
|
750
751
|
}
|
|
751
|
-
function* verifyChangePhoneNumber(
|
|
752
|
+
function* verifyChangePhoneNumber(_ref5) {
|
|
752
753
|
let {
|
|
753
754
|
payload: {
|
|
754
755
|
callback
|
|
755
756
|
}
|
|
756
|
-
} =
|
|
757
|
-
payload = _objectWithoutPropertiesLoose(
|
|
757
|
+
} = _ref5,
|
|
758
|
+
payload = _objectWithoutPropertiesLoose(_ref5.payload, _excluded2);
|
|
758
759
|
try {
|
|
759
760
|
yield put(actions.setLoginState({
|
|
760
761
|
loading: true
|
|
@@ -771,13 +772,13 @@ function* verifyChangePhoneNumber(_ref6) {
|
|
|
771
772
|
}));
|
|
772
773
|
}
|
|
773
774
|
}
|
|
774
|
-
function* quickSmsPasswordlessPreLogin(
|
|
775
|
+
function* quickSmsPasswordlessPreLogin(_ref6) {
|
|
775
776
|
let {
|
|
776
777
|
payload: {
|
|
777
778
|
callback
|
|
778
779
|
}
|
|
779
|
-
} =
|
|
780
|
-
payload = _objectWithoutPropertiesLoose(
|
|
780
|
+
} = _ref6,
|
|
781
|
+
payload = _objectWithoutPropertiesLoose(_ref6.payload, _excluded3);
|
|
781
782
|
try {
|
|
782
783
|
yield put(actions.setLoginState({
|
|
783
784
|
loading: true
|
|
@@ -803,13 +804,13 @@ function* quickSmsPasswordlessPreLogin(_ref7) {
|
|
|
803
804
|
callback == null ? void 0 : callback(e);
|
|
804
805
|
}
|
|
805
806
|
}
|
|
806
|
-
function* passwordlessPreLogin(
|
|
807
|
+
function* passwordlessPreLogin(_ref7) {
|
|
807
808
|
let {
|
|
808
809
|
payload: {
|
|
809
810
|
callback
|
|
810
811
|
}
|
|
811
|
-
} =
|
|
812
|
-
payload = _objectWithoutPropertiesLoose(
|
|
812
|
+
} = _ref7,
|
|
813
|
+
payload = _objectWithoutPropertiesLoose(_ref7.payload, _excluded4);
|
|
813
814
|
try {
|
|
814
815
|
const {
|
|
815
816
|
onRedirectTo,
|
|
@@ -879,14 +880,14 @@ export function* shouldShowPromptPasskeys() {
|
|
|
879
880
|
return numOfDevices === 0;
|
|
880
881
|
}
|
|
881
882
|
}
|
|
882
|
-
function* passwordlessPostLogin(
|
|
883
|
+
function* passwordlessPostLogin(_ref8) {
|
|
883
884
|
let {
|
|
884
885
|
payload: {
|
|
885
886
|
callback,
|
|
886
887
|
events
|
|
887
888
|
}
|
|
888
|
-
} =
|
|
889
|
-
payload = _objectWithoutPropertiesLoose(
|
|
889
|
+
} = _ref8,
|
|
890
|
+
payload = _objectWithoutPropertiesLoose(_ref8.payload, _excluded5);
|
|
890
891
|
try {
|
|
891
892
|
yield put(actions.setLoginState({
|
|
892
893
|
loading: true
|
|
@@ -1054,11 +1055,11 @@ function* preLogin({
|
|
|
1054
1055
|
});
|
|
1055
1056
|
}
|
|
1056
1057
|
}
|
|
1057
|
-
function* ssoPreloginFailed(
|
|
1058
|
+
function* ssoPreloginFailed(_ref9) {
|
|
1058
1059
|
let {
|
|
1059
1060
|
callback
|
|
1060
|
-
} =
|
|
1061
|
-
body = _objectWithoutPropertiesLoose(
|
|
1061
|
+
} = _ref9,
|
|
1062
|
+
body = _objectWithoutPropertiesLoose(_ref9, _excluded6);
|
|
1062
1063
|
const publicPolicy = yield select(({
|
|
1063
1064
|
auth: {
|
|
1064
1065
|
securityPolicyState: {
|
|
@@ -1122,13 +1123,13 @@ function* webAuthnCreateNewDeviceSession({
|
|
|
1122
1123
|
}));
|
|
1123
1124
|
}
|
|
1124
1125
|
}
|
|
1125
|
-
function* webAuthnVerifyNewDeviceSession(
|
|
1126
|
+
function* webAuthnVerifyNewDeviceSession(_ref10) {
|
|
1126
1127
|
let {
|
|
1127
1128
|
payload: {
|
|
1128
1129
|
callback
|
|
1129
1130
|
}
|
|
1130
|
-
} =
|
|
1131
|
-
body = _objectWithoutPropertiesLoose(
|
|
1131
|
+
} = _ref10,
|
|
1132
|
+
body = _objectWithoutPropertiesLoose(_ref10.payload, _excluded7);
|
|
1132
1133
|
try {
|
|
1133
1134
|
yield put(actions.setLoginState({
|
|
1134
1135
|
loading: true
|
|
@@ -1152,13 +1153,13 @@ function* webAuthnVerifyNewDeviceSession(_ref11) {
|
|
|
1152
1153
|
}));
|
|
1153
1154
|
}
|
|
1154
1155
|
}
|
|
1155
|
-
function* webAuthnPrelogin(
|
|
1156
|
+
function* webAuthnPrelogin(_ref11) {
|
|
1156
1157
|
let {
|
|
1157
1158
|
payload: {
|
|
1158
1159
|
callback
|
|
1159
1160
|
}
|
|
1160
|
-
} =
|
|
1161
|
-
body = _objectWithoutPropertiesLoose(
|
|
1161
|
+
} = _ref11,
|
|
1162
|
+
body = _objectWithoutPropertiesLoose(_ref11.payload, _excluded8);
|
|
1162
1163
|
try {
|
|
1163
1164
|
var _options$allowCredent;
|
|
1164
1165
|
yield put(actions.setPasskeysState({
|
|
@@ -1192,13 +1193,13 @@ function* webAuthnPrelogin(_ref12) {
|
|
|
1192
1193
|
}));
|
|
1193
1194
|
}
|
|
1194
1195
|
}
|
|
1195
|
-
function* webAuthnPostLogin(
|
|
1196
|
+
function* webAuthnPostLogin(_ref12) {
|
|
1196
1197
|
let {
|
|
1197
1198
|
payload: {
|
|
1198
1199
|
callback
|
|
1199
1200
|
}
|
|
1200
|
-
} =
|
|
1201
|
-
body = _objectWithoutPropertiesLoose(
|
|
1201
|
+
} = _ref12,
|
|
1202
|
+
body = _objectWithoutPropertiesLoose(_ref12.payload, _excluded9);
|
|
1202
1203
|
try {
|
|
1203
1204
|
var _publicKey$response$u;
|
|
1204
1205
|
yield put(actions.setPasskeysState({
|
|
@@ -1557,13 +1558,13 @@ function* handleVerifyMFAResponse({
|
|
|
1557
1558
|
isAuthenticated: true
|
|
1558
1559
|
}));
|
|
1559
1560
|
}
|
|
1560
|
-
function* preEnrollMFASMSForLogin(
|
|
1561
|
+
function* preEnrollMFASMSForLogin(_ref13) {
|
|
1561
1562
|
let {
|
|
1562
1563
|
payload: {
|
|
1563
1564
|
callback
|
|
1564
1565
|
}
|
|
1565
|
-
} =
|
|
1566
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1566
|
+
} = _ref13,
|
|
1567
|
+
payload = _objectWithoutPropertiesLoose(_ref13.payload, _excluded10);
|
|
1567
1568
|
yield put(actions.setLoginState({
|
|
1568
1569
|
loading: true
|
|
1569
1570
|
}));
|
|
@@ -1586,13 +1587,13 @@ function* preEnrollMFASMSForLogin(_ref14) {
|
|
|
1586
1587
|
callback == null ? void 0 : callback(null);
|
|
1587
1588
|
}
|
|
1588
1589
|
}
|
|
1589
|
-
function* enrollMFASMSForLogin(
|
|
1590
|
+
function* enrollMFASMSForLogin(_ref14) {
|
|
1590
1591
|
let {
|
|
1591
1592
|
payload: {
|
|
1592
1593
|
callback
|
|
1593
1594
|
}
|
|
1594
|
-
} =
|
|
1595
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1595
|
+
} = _ref14,
|
|
1596
|
+
payload = _objectWithoutPropertiesLoose(_ref14.payload, _excluded11);
|
|
1596
1597
|
yield put(actions.setLoginState({
|
|
1597
1598
|
loading: true
|
|
1598
1599
|
}));
|
|
@@ -1612,13 +1613,13 @@ function* enrollMFASMSForLogin(_ref15) {
|
|
|
1612
1613
|
callback == null ? void 0 : callback(null);
|
|
1613
1614
|
}
|
|
1614
1615
|
}
|
|
1615
|
-
function* preEnrollMFAWebAuthnForLogin(
|
|
1616
|
+
function* preEnrollMFAWebAuthnForLogin(_ref15) {
|
|
1616
1617
|
let {
|
|
1617
1618
|
payload: {
|
|
1618
1619
|
callback
|
|
1619
1620
|
}
|
|
1620
|
-
} =
|
|
1621
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1621
|
+
} = _ref15,
|
|
1622
|
+
payload = _objectWithoutPropertiesLoose(_ref15.payload, _excluded12);
|
|
1622
1623
|
yield put(actions.setLoginState({
|
|
1623
1624
|
loading: true
|
|
1624
1625
|
}));
|
|
@@ -1649,13 +1650,13 @@ function* preEnrollMFAWebAuthnForLogin(_ref16) {
|
|
|
1649
1650
|
callback == null ? void 0 : callback(null);
|
|
1650
1651
|
}
|
|
1651
1652
|
}
|
|
1652
|
-
function* enrollMFAWebAuthnForLogin(
|
|
1653
|
+
function* enrollMFAWebAuthnForLogin(_ref16) {
|
|
1653
1654
|
let {
|
|
1654
1655
|
payload: {
|
|
1655
1656
|
callback
|
|
1656
1657
|
}
|
|
1657
|
-
} =
|
|
1658
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1658
|
+
} = _ref16,
|
|
1659
|
+
payload = _objectWithoutPropertiesLoose(_ref16.payload, _excluded13);
|
|
1659
1660
|
yield put(actions.setLoginState({
|
|
1660
1661
|
loading: true
|
|
1661
1662
|
}));
|
|
@@ -1678,13 +1679,13 @@ function* enrollMFAWebAuthnForLogin(_ref17) {
|
|
|
1678
1679
|
callback == null ? void 0 : callback(null);
|
|
1679
1680
|
}
|
|
1680
1681
|
}
|
|
1681
|
-
function* enrollMFAAuthenticatorAppForLogin(
|
|
1682
|
+
function* enrollMFAAuthenticatorAppForLogin(_ref17) {
|
|
1682
1683
|
let {
|
|
1683
1684
|
payload: {
|
|
1684
1685
|
callback
|
|
1685
1686
|
}
|
|
1686
|
-
} =
|
|
1687
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1687
|
+
} = _ref17,
|
|
1688
|
+
payload = _objectWithoutPropertiesLoose(_ref17.payload, _excluded14);
|
|
1688
1689
|
yield put(actions.setLoginState({
|
|
1689
1690
|
loading: true
|
|
1690
1691
|
}));
|
|
@@ -1704,14 +1705,14 @@ function* enrollMFAAuthenticatorAppForLogin(_ref18) {
|
|
|
1704
1705
|
callback == null ? void 0 : callback(null);
|
|
1705
1706
|
}
|
|
1706
1707
|
}
|
|
1707
|
-
function* preVerifyMFASMSForLogin(
|
|
1708
|
+
function* preVerifyMFASMSForLogin(_ref18) {
|
|
1708
1709
|
let {
|
|
1709
1710
|
payload: {
|
|
1710
1711
|
callback,
|
|
1711
1712
|
deviceId
|
|
1712
1713
|
}
|
|
1713
|
-
} =
|
|
1714
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1714
|
+
} = _ref18,
|
|
1715
|
+
payload = _objectWithoutPropertiesLoose(_ref18.payload, _excluded15);
|
|
1715
1716
|
yield put(actions.setLoginState({
|
|
1716
1717
|
loading: true
|
|
1717
1718
|
}));
|
|
@@ -1734,14 +1735,14 @@ function* preVerifyMFASMSForLogin(_ref19) {
|
|
|
1734
1735
|
callback == null ? void 0 : callback(null);
|
|
1735
1736
|
}
|
|
1736
1737
|
}
|
|
1737
|
-
function* verifyMFASMSForLogin(
|
|
1738
|
+
function* verifyMFASMSForLogin(_ref19) {
|
|
1738
1739
|
let {
|
|
1739
1740
|
payload: {
|
|
1740
1741
|
callback,
|
|
1741
1742
|
deviceId
|
|
1742
1743
|
}
|
|
1743
|
-
} =
|
|
1744
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1744
|
+
} = _ref19,
|
|
1745
|
+
payload = _objectWithoutPropertiesLoose(_ref19.payload, _excluded16);
|
|
1745
1746
|
yield put(actions.setLoginState({
|
|
1746
1747
|
loading: true
|
|
1747
1748
|
}));
|
|
@@ -1761,14 +1762,14 @@ function* verifyMFASMSForLogin(_ref20) {
|
|
|
1761
1762
|
callback == null ? void 0 : callback(null);
|
|
1762
1763
|
}
|
|
1763
1764
|
}
|
|
1764
|
-
function* preVerifyMFAWebAuthnForLogin(
|
|
1765
|
+
function* preVerifyMFAWebAuthnForLogin(_ref20) {
|
|
1765
1766
|
let {
|
|
1766
1767
|
payload: {
|
|
1767
1768
|
callback,
|
|
1768
1769
|
deviceId
|
|
1769
1770
|
}
|
|
1770
|
-
} =
|
|
1771
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1771
|
+
} = _ref20,
|
|
1772
|
+
payload = _objectWithoutPropertiesLoose(_ref20.payload, _excluded17);
|
|
1772
1773
|
yield put(actions.setLoginState({
|
|
1773
1774
|
loading: true
|
|
1774
1775
|
}));
|
|
@@ -1796,14 +1797,14 @@ function* preVerifyMFAWebAuthnForLogin(_ref21) {
|
|
|
1796
1797
|
callback == null ? void 0 : callback(null);
|
|
1797
1798
|
}
|
|
1798
1799
|
}
|
|
1799
|
-
function* verifyMFAWebAuthnForLogin(
|
|
1800
|
+
function* verifyMFAWebAuthnForLogin(_ref21) {
|
|
1800
1801
|
let {
|
|
1801
1802
|
payload: {
|
|
1802
1803
|
callback,
|
|
1803
1804
|
deviceId
|
|
1804
1805
|
}
|
|
1805
|
-
} =
|
|
1806
|
-
payload = _objectWithoutPropertiesLoose(
|
|
1806
|
+
} = _ref21,
|
|
1807
|
+
payload = _objectWithoutPropertiesLoose(_ref21.payload, _excluded18);
|
|
1807
1808
|
yield put(actions.setLoginState({
|
|
1808
1809
|
loading: true
|
|
1809
1810
|
}));
|
|
@@ -297,11 +297,23 @@ declare const reducers: {
|
|
|
297
297
|
loaderComponent?: any;
|
|
298
298
|
};
|
|
299
299
|
openDeleteSubAccountDialog: {
|
|
300
|
-
prepare: (payload: Partial<
|
|
301
|
-
|
|
300
|
+
prepare: (payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
|
|
301
|
+
accountName?: string | undefined;
|
|
302
|
+
accountId?: string | undefined;
|
|
303
|
+
parentAccountId?: string | undefined;
|
|
304
|
+
}, boolean>>) => {
|
|
305
|
+
payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
|
|
306
|
+
accountName?: string | undefined;
|
|
307
|
+
accountId?: string | undefined;
|
|
308
|
+
parentAccountId?: string | undefined;
|
|
309
|
+
}, boolean>>;
|
|
302
310
|
};
|
|
303
311
|
reducer: (state: import("../..").AuthState, { payload }: {
|
|
304
|
-
payload: Partial<
|
|
312
|
+
payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
|
|
313
|
+
accountName?: string | undefined;
|
|
314
|
+
accountId?: string | undefined;
|
|
315
|
+
parentAccountId?: string | undefined;
|
|
316
|
+
}, boolean>>;
|
|
305
317
|
type: string;
|
|
306
318
|
}) => {
|
|
307
319
|
onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
|
|
@@ -74,6 +74,59 @@ declare const reducers: {
|
|
|
74
74
|
loaderComponent?: any;
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
+
setSelectedAccountState: {
|
|
78
|
+
prepare: (payload: Partial<import("./types").ISelectedAccount>) => {
|
|
79
|
+
payload: Partial<import("./types").ISelectedAccount>;
|
|
80
|
+
};
|
|
81
|
+
reducer: (state: import("../..").AuthState, { payload }: {
|
|
82
|
+
payload: Partial<import("./types").ISelectedAccount>;
|
|
83
|
+
type: string;
|
|
84
|
+
}) => {
|
|
85
|
+
onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
|
|
86
|
+
error?: any;
|
|
87
|
+
isAuthenticated: boolean;
|
|
88
|
+
userIp?: string | undefined;
|
|
89
|
+
isLoading: boolean;
|
|
90
|
+
keepSessionAlive?: boolean | undefined;
|
|
91
|
+
user?: import("../..").User | null | undefined;
|
|
92
|
+
isSSOAuth: boolean;
|
|
93
|
+
ssoACS?: string | undefined;
|
|
94
|
+
includeQueryParam?: boolean | undefined;
|
|
95
|
+
loginState: import("../..").LoginState;
|
|
96
|
+
activateState: import("../..").ActivateAccountState;
|
|
97
|
+
acceptInvitationState: import("../..").AcceptInvitationState;
|
|
98
|
+
forgotPasswordState: import("../..").ForgotPasswordState;
|
|
99
|
+
resetPhoneNumberState: import("../..").ResetPhoneNumberState;
|
|
100
|
+
ssoState: import("../..").SSOState;
|
|
101
|
+
profileState: import("../..").ProfileState;
|
|
102
|
+
mfaState: import("../..").MFAState;
|
|
103
|
+
teamState: import("../..").TeamState;
|
|
104
|
+
groupsState: import("../..").GroupsState;
|
|
105
|
+
groupsDialogsState: import("../..").GroupsDialogsState;
|
|
106
|
+
socialLoginState: import("../..").SocialLoginState;
|
|
107
|
+
signUpState: import("../..").SignUpState;
|
|
108
|
+
apiTokensState: import("../..").ApiTokensState;
|
|
109
|
+
securityPolicyState: import("../..").SecurityPolicyState;
|
|
110
|
+
restrictionsState: import("../..").RestrictionsState;
|
|
111
|
+
provisioningState: import("../..").ProvisioningState;
|
|
112
|
+
accountSettingsState: import("../..").AccountSettingsState;
|
|
113
|
+
tenantsState: import("../..").TenantsState;
|
|
114
|
+
rolesState: import("../..").RolesState;
|
|
115
|
+
sessionsState: import("../..").SessionsState;
|
|
116
|
+
hostedLoginBox?: boolean | undefined;
|
|
117
|
+
disableSilentRefresh?: boolean | undefined;
|
|
118
|
+
sessionsPolicyState: import("../..").SessionsPolicyState;
|
|
119
|
+
impersonateState?: import("../..").ImpersonateState | undefined;
|
|
120
|
+
passkeysState?: import("../..").PasskeysState | undefined;
|
|
121
|
+
customLoginState?: import("../..").CustomLoginState | undefined;
|
|
122
|
+
allAccountsState?: IAllAccountsState | undefined;
|
|
123
|
+
allAccountsDialogsState?: import("./types").IAllAccountsDialogsState | undefined;
|
|
124
|
+
entitlementsState?: import("../..").EntitlementsState | undefined;
|
|
125
|
+
routes: import("../..").AuthPageRoutes;
|
|
126
|
+
header?: any;
|
|
127
|
+
loaderComponent?: any;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
77
130
|
resetAllAccountsState: (state: import("../..").AuthState) => {
|
|
78
131
|
onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
|
|
79
132
|
error?: any;
|
|
@@ -155,6 +208,7 @@ declare type DispatchedActions = {
|
|
|
155
208
|
setAllAccountsLoader: (payload: AllAccountsStateIndicator) => void;
|
|
156
209
|
setAllAccountsError: (payload: AllAccountsStateIndicator) => void;
|
|
157
210
|
setAllAccountsState: (payload: Partial<IAllAccountsState>) => void;
|
|
211
|
+
setSelectedAccountState: (payload: Partial<IAllAccountsState['selectedAccount']>) => void;
|
|
158
212
|
resetAllAccountsState: () => void;
|
|
159
213
|
loadAccounts: (payload: IAllAccountsStateActionsPayloads['loadAccounts']) => void;
|
|
160
214
|
searchAccounts: (payload: IAllAccountsStateActionsPayloads['searchAccounts']) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { authStoreName } from '../../../constants';
|
|
3
|
-
import { errorsReducerForKey, loadersReducerForKey, resetStateByKey, typeReducerForKey } from '../../utils';
|
|
3
|
+
import { errorsReducerForKey, loadersReducerForKey, resetStateByKey, typeReducerForKey, typeReducerNestedKey } from '../../utils';
|
|
4
4
|
import { SortByEnum, PaginationOrderEnum } from '@frontegg/rest-api';
|
|
5
5
|
export * from './types';
|
|
6
6
|
export const allAccountsInitialState = {
|
|
@@ -11,7 +11,7 @@ export const allAccountsInitialState = {
|
|
|
11
11
|
children: []
|
|
12
12
|
},
|
|
13
13
|
accountsQueryParams: {
|
|
14
|
-
_limit:
|
|
14
|
+
_limit: 2,
|
|
15
15
|
_offset: 0,
|
|
16
16
|
_filter: '',
|
|
17
17
|
_subTenantId: ''
|
|
@@ -43,6 +43,7 @@ const reducers = {
|
|
|
43
43
|
setAllAccountsLoader: loadersReducerForKey('allAccountsState'),
|
|
44
44
|
setAllAccountsError: errorsReducerForKey('allAccountsState'),
|
|
45
45
|
setAllAccountsState: typeReducerForKey('allAccountsState'),
|
|
46
|
+
setSelectedAccountState: typeReducerNestedKey('allAccountsState', 'selectedAccount'),
|
|
46
47
|
resetAllAccountsState: resetStateByKey('allAccountsState', {
|
|
47
48
|
allAccountsState: allAccountsInitialState
|
|
48
49
|
})
|