@frontegg/redux-store 6.101.0 → 6.103.0-alpha.0
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/saga.js +3 -2
- package/auth/AcceptInvitationState/index.d.ts +4 -2
- package/auth/AcceptInvitationState/saga.js +2 -1
- package/auth/AccountSettingsState/index.d.ts +4 -2
- package/auth/AccountSettingsState/saga.js +3 -2
- package/auth/ActivateState/index.d.ts +6 -15
- package/auth/ActivateState/saga.js +6 -5
- package/auth/ApiTokensState/index.d.ts +4 -2
- package/auth/ApiTokensState/saga.js +8 -7
- package/auth/CustomLoginState/index.d.ts +4 -2
- package/auth/CustomLoginState/saga.js +4 -6
- package/auth/ForgotPasswordState/index.d.ts +4 -2
- package/auth/ForgotPasswordState/saga.js +4 -3
- package/auth/GroupsState/groupsDialogsState.d.ts +24 -12
- package/auth/GroupsState/index.d.ts +4 -2
- package/auth/GroupsState/saga.js +13 -12
- package/auth/ImpersonationState/index.d.ts +4 -2
- package/auth/ImpersonationState/saga.js +2 -1
- package/auth/LoginState/index.d.ts +4 -2
- package/auth/LoginState/saga.d.ts +2 -2
- package/auth/LoginState/saga.js +23 -35
- package/auth/MSP/AllAccountsState/allAccountsDialogsState.d.ts +699 -0
- package/auth/MSP/AllAccountsState/allAccountsDialogsState.js +74 -0
- package/auth/MSP/AllAccountsState/index.d.ts +176 -0
- package/auth/MSP/AllAccountsState/index.js +105 -0
- package/auth/MSP/AllAccountsState/saga.d.ts +4 -0
- package/auth/MSP/AllAccountsState/saga.js +611 -0
- package/auth/MSP/AllAccountsState/types/dialogsStateTypes.d.ts +53 -0
- package/auth/MSP/AllAccountsState/types/index.d.ts +2 -0
- package/auth/MSP/AllAccountsState/types/index.js +2 -0
- package/auth/MSP/AllAccountsState/types/stateTypes.d.ts +85 -0
- package/auth/MSP/AllAccountsState/types/stateTypes.js +22 -0
- package/auth/MSP/AllAccountsState/utils/appendChildrenToNode.d.ts +2 -0
- package/auth/MSP/AllAccountsState/utils/appendChildrenToNode.js +18 -0
- package/auth/MSP/AllAccountsState/utils/removeNodeFromTree.d.ts +2 -0
- package/auth/MSP/AllAccountsState/utils/removeNodeFromTree.js +10 -0
- package/auth/MSP/AllAccountsState/utils/updateNodeName.d.ts +2 -0
- package/auth/MSP/AllAccountsState/utils/updateNodeName.js +13 -0
- package/auth/MSP/index.d.ts +1 -0
- package/auth/MSP/index.js +1 -0
- package/auth/MfaState/index.d.ts +4 -2
- package/auth/MfaState/saga.js +16 -15
- package/auth/PasskeysState/index.d.ts +4 -2
- package/auth/PasskeysState/saga.js +3 -2
- package/auth/ProfileState/index.d.ts +4 -2
- package/auth/ProfileState/saga.js +4 -3
- package/auth/Provisioning/index.d.ts +4 -2
- package/auth/Provisioning/saga.js +5 -4
- package/auth/ResetPhoneNumberState/index.d.ts +4 -2
- package/auth/ResetPhoneNumberState/saga.js +4 -3
- package/auth/RestrictionsState/index.d.ts +6 -3
- package/auth/RestrictionsState/saga.js +11 -10
- package/auth/RolesState/index.d.ts +12 -2
- package/auth/RolesState/saga.js +8 -7
- package/auth/SSOState/index.d.ts +4 -2
- package/auth/SSOState/saga.js +12 -12
- package/auth/SSOState/saga.v2.js +13 -12
- package/auth/SecurityPolicyState/index.d.ts +26 -13
- package/auth/SecurityPolicyState/saga.js +16 -15
- package/auth/SessionsPolicyState/index.d.ts +4 -2
- package/auth/SessionsState/index.d.ts +4 -2
- package/auth/SignUp/index.d.ts +4 -2
- package/auth/SignUp/saga.js +3 -2
- package/auth/SocialLogins/index.d.ts +4 -2
- package/auth/SocialLogins/saga.js +4 -4
- package/auth/TeamState/index.d.ts +4 -2
- package/auth/TeamState/interfaces.d.ts +2 -2
- package/auth/TeamState/saga.js +19 -18
- package/auth/TenantsState/index.d.ts +4 -2
- package/auth/index.d.ts +52 -4
- package/auth/index.js +3 -2
- package/auth/initialState.js +4 -2
- package/auth/interfaces.d.ts +5 -3
- package/auth/interfaces.js +3 -1
- package/auth/reducer.d.ts +52 -4
- package/auth/reducer.js +4 -3
- package/auth/saga.js +2 -2
- package/auth/utils.d.ts +12 -6
- package/auth/utils.js +6 -6
- package/connectivity/saga.js +3 -3
- package/index.d.ts +1 -0
- package/index.js +3 -2
- package/node/audits/AuditLogsState/saga.js +3 -2
- package/node/auth/AcceptInvitationState/saga.js +2 -1
- package/node/auth/AccountSettingsState/saga.js +3 -2
- package/node/auth/ActivateState/saga.js +6 -5
- package/node/auth/ApiTokensState/saga.js +8 -7
- package/node/auth/CustomLoginState/saga.js +4 -6
- package/node/auth/ForgotPasswordState/saga.js +4 -3
- package/node/auth/GroupsState/saga.js +13 -12
- package/node/auth/ImpersonationState/saga.js +2 -1
- package/node/auth/LoginState/saga.js +23 -35
- package/node/auth/MSP/AllAccountsState/allAccountsDialogsState.js +81 -0
- package/node/auth/MSP/AllAccountsState/index.js +129 -0
- package/node/auth/MSP/AllAccountsState/saga.js +622 -0
- package/node/auth/MSP/AllAccountsState/types/index.js +27 -0
- package/node/auth/MSP/AllAccountsState/types/stateTypes.js +26 -0
- package/node/auth/MSP/AllAccountsState/utils/appendChildrenToNode.js +25 -0
- package/node/auth/MSP/AllAccountsState/utils/removeNodeFromTree.js +17 -0
- package/node/auth/MSP/AllAccountsState/utils/updateNodeName.js +21 -0
- package/node/auth/MSP/index.js +16 -0
- package/node/auth/MfaState/saga.js +16 -15
- package/node/auth/PasskeysState/saga.js +3 -2
- package/node/auth/ProfileState/saga.js +4 -3
- package/node/auth/Provisioning/saga.js +5 -4
- package/node/auth/ResetPhoneNumberState/saga.js +4 -3
- package/node/auth/RestrictionsState/saga.js +11 -10
- package/node/auth/RolesState/saga.js +8 -7
- package/node/auth/SSOState/saga.js +12 -12
- package/node/auth/SSOState/saga.v2.js +13 -12
- package/node/auth/SecurityPolicyState/saga.js +16 -15
- package/node/auth/SignUp/saga.js +3 -2
- package/node/auth/SocialLogins/saga.js +4 -4
- package/node/auth/TeamState/saga.js +19 -18
- package/node/auth/index.js +30 -18
- package/node/auth/initialState.js +4 -2
- package/node/auth/interfaces.js +3 -1
- package/node/auth/reducer.js +4 -3
- package/node/auth/saga.js +7 -7
- package/node/auth/utils.js +6 -6
- package/node/connectivity/saga.js +3 -3
- package/node/index.js +13 -1
- package/node/subscriptions/Billing/Information/saga.js +2 -1
- package/node/subscriptions/Billing/Invoices/saga.js +3 -2
- package/node/subscriptions/Billing/PaymentMethod/saga.js +3 -2
- package/node/subscriptions/Billing/Subscription/saga.js +3 -2
- package/node/subscriptions/Checkout/saga.js +2 -1
- package/node/subscriptions/Config/saga.js +3 -2
- package/node/subscriptions/Plans/saga.js +2 -1
- package/node/subscriptions/Stripe/saga.js +2 -1
- package/node/subscriptions/VendorPublicConfig/saga.js +2 -1
- package/node/utils/errorHandler.js +24 -0
- package/node/utils/index.js +27 -0
- package/package.json +2 -2
- package/subscriptions/Billing/Information/saga.js +2 -1
- package/subscriptions/Billing/Invoices/saga.js +3 -2
- package/subscriptions/Billing/PaymentMethod/saga.js +3 -2
- package/subscriptions/Billing/Subscription/saga.js +3 -2
- package/subscriptions/Checkout/saga.js +2 -1
- package/subscriptions/Config/saga.js +3 -2
- package/subscriptions/Plans/saga.js +2 -1
- package/subscriptions/Stripe/saga.js +2 -1
- package/subscriptions/VendorPublicConfig/saga.js +2 -1
- package/toolkit/index.d.ts +1 -1
- package/utils/errorHandler.d.ts +1 -0
- package/utils/errorHandler.js +17 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +2 -0
- package/utils/package.json +6 -0
- package/auth/EntitlementsState/index.d.ts +0 -70
- package/auth/EntitlementsState/index.js +0 -29
- package/auth/EntitlementsState/interfaces.d.ts +0 -9
- package/auth/EntitlementsState/saga.d.ts +0 -9
- package/auth/EntitlementsState/saga.js +0 -28
- package/auth/EntitlementsState/utils.d.ts +0 -8
- package/auth/EntitlementsState/utils.js +0 -8
- package/node/auth/EntitlementsState/index.js +0 -59
- package/node/auth/EntitlementsState/saga.js +0 -34
- package/node/auth/EntitlementsState/utils.js +0 -15
- /package/auth/{EntitlementsState/interfaces.js → MSP/AllAccountsState/types/dialogsStateTypes.js} +0 -0
- /package/node/auth/{EntitlementsState/interfaces.js → MSP/AllAccountsState/types/dialogsStateTypes.js} +0 -0
|
@@ -4,6 +4,7 @@ import { api } from '@frontegg/rest-api';
|
|
|
4
4
|
import { actions } from '../reducer';
|
|
5
5
|
import { auditsStoreName } from '../../constants';
|
|
6
6
|
import { auditsLogsFilterAndSort } from '../dummy';
|
|
7
|
+
import { errorHandler } from '../../utils';
|
|
7
8
|
const select = () => sagaSelect(_ => _[auditsStoreName].auditLogsState);
|
|
8
9
|
const selectMetadata = () => sagaSelect(_ => _[auditsStoreName].auditsMetadataState);
|
|
9
10
|
function* exportAuditsCsv() {
|
|
@@ -88,7 +89,7 @@ function* loadAuditLogs({
|
|
|
88
89
|
var _payload$callback2;
|
|
89
90
|
yield put(actions.setAuditLogsState({
|
|
90
91
|
loading: false,
|
|
91
|
-
error: e
|
|
92
|
+
error: errorHandler(e)
|
|
92
93
|
}));
|
|
93
94
|
payload == null ? void 0 : (_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, null, e);
|
|
94
95
|
}
|
|
@@ -142,7 +143,7 @@ function* loadAuditLogsMock({
|
|
|
142
143
|
var _payload$callback4;
|
|
143
144
|
yield put(actions.setAuditLogsState({
|
|
144
145
|
loading: false,
|
|
145
|
-
error: e
|
|
146
|
+
error: errorHandler(e)
|
|
146
147
|
}));
|
|
147
148
|
payload == null ? void 0 : (_payload$callback4 = payload.callback) == null ? void 0 : _payload$callback4.call(payload, null, e);
|
|
148
149
|
}
|
|
@@ -47,7 +47,8 @@ declare const reducers: {
|
|
|
47
47
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
48
48
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
49
49
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
50
|
-
|
|
50
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
51
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
51
52
|
routes: import("..").AuthPageRoutes;
|
|
52
53
|
header?: any;
|
|
53
54
|
loaderComponent?: any;
|
|
@@ -91,7 +92,8 @@ declare const reducers: {
|
|
|
91
92
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
92
93
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
93
94
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
94
|
-
|
|
95
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
96
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
95
97
|
routes: import("..").AuthPageRoutes;
|
|
96
98
|
header?: any;
|
|
97
99
|
loaderComponent?: any;
|
|
@@ -2,6 +2,7 @@ import { call, put, takeLeading } from 'redux-saga/effects';
|
|
|
2
2
|
import { actions } from '../reducer';
|
|
3
3
|
import { api } from '@frontegg/rest-api';
|
|
4
4
|
import { AcceptInvitationStep } from './interfaces';
|
|
5
|
+
import { errorHandler } from '../../utils';
|
|
5
6
|
function* acceptInvitation({
|
|
6
7
|
payload
|
|
7
8
|
}) {
|
|
@@ -29,7 +30,7 @@ function* acceptInvitation({
|
|
|
29
30
|
} catch (e) {
|
|
30
31
|
yield put(actions.setAcceptInvitationState({
|
|
31
32
|
step: AcceptInvitationStep.failed,
|
|
32
|
-
error: e
|
|
33
|
+
error: errorHandler(e)
|
|
33
34
|
}));
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -48,7 +48,8 @@ declare const reducers: {
|
|
|
48
48
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
49
49
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
50
50
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
51
|
-
|
|
51
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
52
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
52
53
|
routes: import("..").AuthPageRoutes;
|
|
53
54
|
header?: any;
|
|
54
55
|
loaderComponent?: any;
|
|
@@ -92,7 +93,8 @@ declare const reducers: {
|
|
|
92
93
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
93
94
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
94
95
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
95
|
-
|
|
96
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
97
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
96
98
|
routes: import("..").AuthPageRoutes;
|
|
97
99
|
header?: any;
|
|
98
100
|
loaderComponent?: any;
|
|
@@ -3,6 +3,7 @@ import { call, put, select, takeLeading } from 'redux-saga/effects';
|
|
|
3
3
|
import { actions } from '../reducer';
|
|
4
4
|
import { api } from '@frontegg/rest-api';
|
|
5
5
|
import { delay } from '../utils';
|
|
6
|
+
import { errorHandler } from '../../utils';
|
|
6
7
|
function* saveAccountSettings({
|
|
7
8
|
payload
|
|
8
9
|
}) {
|
|
@@ -38,7 +39,7 @@ function* saveAccountSettings({
|
|
|
38
39
|
var _payload$callback2;
|
|
39
40
|
yield put(actions.setAccountSettingsState({
|
|
40
41
|
loading: false,
|
|
41
|
-
error: e
|
|
42
|
+
error: errorHandler(e)
|
|
42
43
|
}));
|
|
43
44
|
(_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, null, e);
|
|
44
45
|
}
|
|
@@ -58,7 +59,7 @@ function* loadAccountSettings({
|
|
|
58
59
|
} catch (e) {
|
|
59
60
|
yield put(actions.setAccountSettingsState({
|
|
60
61
|
loading: false,
|
|
61
|
-
error: e
|
|
62
|
+
error: errorHandler(e)
|
|
62
63
|
}));
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -16,10 +16,6 @@ declare const reducers: {
|
|
|
16
16
|
isAuthenticated: boolean;
|
|
17
17
|
userIp?: string | undefined;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
21
|
-
* contains the same functions in reducers and actions
|
|
22
|
-
*/
|
|
23
19
|
keepSessionAlive?: boolean | undefined;
|
|
24
20
|
user?: import("..").User | null | undefined;
|
|
25
21
|
isSSOAuth: boolean;
|
|
@@ -52,7 +48,8 @@ declare const reducers: {
|
|
|
52
48
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
53
49
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
54
50
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
55
|
-
|
|
51
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
52
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
56
53
|
routes: import("..").AuthPageRoutes;
|
|
57
54
|
header?: any;
|
|
58
55
|
loaderComponent?: any;
|
|
@@ -64,10 +61,6 @@ declare const reducers: {
|
|
|
64
61
|
isAuthenticated: boolean;
|
|
65
62
|
userIp?: string | undefined;
|
|
66
63
|
isLoading: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
69
|
-
* contains the same functions in reducers and actions
|
|
70
|
-
*/
|
|
71
64
|
keepSessionAlive?: boolean | undefined;
|
|
72
65
|
user?: import("..").User | null | undefined;
|
|
73
66
|
isSSOAuth: boolean;
|
|
@@ -100,7 +93,8 @@ declare const reducers: {
|
|
|
100
93
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
101
94
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
102
95
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
103
|
-
|
|
96
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
97
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
104
98
|
routes: import("..").AuthPageRoutes;
|
|
105
99
|
header?: any;
|
|
106
100
|
loaderComponent?: any;
|
|
@@ -118,10 +112,6 @@ declare const reducers: {
|
|
|
118
112
|
isAuthenticated: boolean;
|
|
119
113
|
userIp?: string | undefined;
|
|
120
114
|
isLoading: boolean;
|
|
121
|
-
/**
|
|
122
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
123
|
-
* contains the same functions in reducers and actions
|
|
124
|
-
*/
|
|
125
115
|
keepSessionAlive?: boolean | undefined;
|
|
126
116
|
user?: import("..").User | null | undefined;
|
|
127
117
|
isSSOAuth: boolean;
|
|
@@ -154,7 +144,8 @@ declare const reducers: {
|
|
|
154
144
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
155
145
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
156
146
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
157
|
-
|
|
147
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
148
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
158
149
|
routes: import("..").AuthPageRoutes;
|
|
159
150
|
header?: any;
|
|
160
151
|
loaderComponent?: any;
|
|
@@ -9,6 +9,7 @@ import { afterAuthNavigation, getMfaRequiredState, isMfaRequired } from '../Logi
|
|
|
9
9
|
import { UserVeirifedOriginTypes } from '../interfaces';
|
|
10
10
|
import { ActivateAccountStep } from './interfaces';
|
|
11
11
|
import { TeamStateKeys } from '../TeamState/interfaces';
|
|
12
|
+
import { errorHandler } from '../../utils';
|
|
12
13
|
function* preActivateAccount({
|
|
13
14
|
payload: {
|
|
14
15
|
userId,
|
|
@@ -44,7 +45,7 @@ function* preActivateAccount({
|
|
|
44
45
|
} catch (e) {
|
|
45
46
|
yield put(actions.setActivateState({
|
|
46
47
|
loading: false,
|
|
47
|
-
error: e
|
|
48
|
+
error: errorHandler(e)
|
|
48
49
|
}));
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -112,7 +113,7 @@ function* activateAccount(_ref) {
|
|
|
112
113
|
} catch (e) {
|
|
113
114
|
yield put(actions.setActivateState({
|
|
114
115
|
loading: false,
|
|
115
|
-
error: e
|
|
116
|
+
error: errorHandler(e)
|
|
116
117
|
}));
|
|
117
118
|
}
|
|
118
119
|
}
|
|
@@ -137,7 +138,7 @@ function* getActivateAccountStrategy({
|
|
|
137
138
|
} catch (e) {
|
|
138
139
|
yield put(actions.setActivateStrategyState({
|
|
139
140
|
loading: false,
|
|
140
|
-
error: e
|
|
141
|
+
error: errorHandler(e)
|
|
141
142
|
}));
|
|
142
143
|
}
|
|
143
144
|
}
|
|
@@ -166,11 +167,11 @@ function* resendActivationEmailFunction({
|
|
|
166
167
|
} catch (e) {
|
|
167
168
|
yield put(actions.setActivateState({
|
|
168
169
|
loading: false,
|
|
169
|
-
error: e
|
|
170
|
+
error: errorHandler(e)
|
|
170
171
|
}));
|
|
171
172
|
yield put(actions.setTeamError({
|
|
172
173
|
key: TeamStateKeys.RESEND_ACTIVATE_LINK,
|
|
173
|
-
value: e
|
|
174
|
+
value: errorHandler(e)
|
|
174
175
|
}));
|
|
175
176
|
callback == null ? void 0 : callback(null, e.message);
|
|
176
177
|
}
|
|
@@ -65,7 +65,8 @@ declare const reducers: {
|
|
|
65
65
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
66
66
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
67
67
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
68
|
-
|
|
68
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
69
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
69
70
|
routes: import("..").AuthPageRoutes;
|
|
70
71
|
header?: any;
|
|
71
72
|
loaderComponent?: any;
|
|
@@ -109,7 +110,8 @@ declare const reducers: {
|
|
|
109
110
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
110
111
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
111
112
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
112
|
-
|
|
113
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
114
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
113
115
|
routes: import("..").AuthPageRoutes;
|
|
114
116
|
header?: any;
|
|
115
117
|
loaderComponent?: any;
|
|
@@ -5,6 +5,7 @@ import { actions } from '../reducer';
|
|
|
5
5
|
import { ApiStateKeys } from './interfaces';
|
|
6
6
|
import { apiTokensDataDemo, apiTokensDataTenantDemo } from '../dummy';
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
|
+
import { errorHandler } from '../../utils';
|
|
8
9
|
function* addUserApiToken({
|
|
9
10
|
payload
|
|
10
11
|
}) {
|
|
@@ -58,7 +59,7 @@ function* addUserApiToken({
|
|
|
58
59
|
} catch (e) {
|
|
59
60
|
yield put(actions.setApiTokensError({
|
|
60
61
|
key: ApiStateKeys.ADD_API_TOKEN,
|
|
61
|
-
value: e
|
|
62
|
+
value: errorHandler(e)
|
|
62
63
|
}));
|
|
63
64
|
yield put(actions.setApiTokensLoader({
|
|
64
65
|
key: ApiStateKeys.ADD_API_TOKEN,
|
|
@@ -123,7 +124,7 @@ function* addTenantApiToken({
|
|
|
123
124
|
} catch (e) {
|
|
124
125
|
yield put(actions.setApiTokensError({
|
|
125
126
|
key: ApiStateKeys.ADD_API_TOKEN,
|
|
126
|
-
value: e
|
|
127
|
+
value: errorHandler(e)
|
|
127
128
|
}));
|
|
128
129
|
yield put(actions.setApiTokensLoader({
|
|
129
130
|
key: ApiStateKeys.ADD_API_TOKEN,
|
|
@@ -174,7 +175,7 @@ function* deleteUserApiToken({
|
|
|
174
175
|
} catch (e) {
|
|
175
176
|
yield put(actions.setApiTokensError({
|
|
176
177
|
key: ApiStateKeys.DELETE_API_TOKEN,
|
|
177
|
-
value: e
|
|
178
|
+
value: errorHandler(e)
|
|
178
179
|
}));
|
|
179
180
|
yield put(actions.setApiTokensLoader({
|
|
180
181
|
key: ApiStateKeys.DELETE_API_TOKEN,
|
|
@@ -220,7 +221,7 @@ function* deleteTenantApiToken({
|
|
|
220
221
|
} catch (e) {
|
|
221
222
|
yield put(actions.setApiTokensError({
|
|
222
223
|
key: ApiStateKeys.DELETE_API_TOKEN,
|
|
223
|
-
value: e
|
|
224
|
+
value: errorHandler(e)
|
|
224
225
|
}));
|
|
225
226
|
yield put(actions.setApiTokensLoader({
|
|
226
227
|
key: ApiStateKeys.DELETE_API_TOKEN,
|
|
@@ -253,7 +254,7 @@ function* loadApiTokens({
|
|
|
253
254
|
var _payload$callback2;
|
|
254
255
|
yield put(actions.setApiTokensError({
|
|
255
256
|
key: ApiStateKeys.LOAD_API_TOKENS,
|
|
256
|
-
value: e
|
|
257
|
+
value: errorHandler(e)
|
|
257
258
|
}));
|
|
258
259
|
yield put(actions.setApiTokensLoader({
|
|
259
260
|
key: ApiStateKeys.LOAD_API_TOKENS,
|
|
@@ -290,7 +291,7 @@ function* loadUserApiTokens({
|
|
|
290
291
|
var _payload$callback4;
|
|
291
292
|
yield put(actions.setApiTokensError({
|
|
292
293
|
key: ApiStateKeys.LOAD_API_TOKENS,
|
|
293
|
-
value: e
|
|
294
|
+
value: errorHandler(e)
|
|
294
295
|
}));
|
|
295
296
|
yield put(actions.setApiTokensLoader({
|
|
296
297
|
key: ApiStateKeys.LOAD_API_TOKENS,
|
|
@@ -327,7 +328,7 @@ function* loadTenantApiTokens({
|
|
|
327
328
|
var _payload$callback6;
|
|
328
329
|
yield put(actions.setApiTokensError({
|
|
329
330
|
key: ApiStateKeys.LOAD_API_TOKENS,
|
|
330
|
-
value: e
|
|
331
|
+
value: errorHandler(e)
|
|
331
332
|
}));
|
|
332
333
|
yield put(actions.setApiTokensLoader({
|
|
333
334
|
key: ApiStateKeys.LOAD_API_TOKENS,
|
|
@@ -47,7 +47,8 @@ declare const reducers: {
|
|
|
47
47
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
48
48
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
49
49
|
customLoginState?: CustomLoginState | undefined;
|
|
50
|
-
|
|
50
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
51
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
51
52
|
routes: import("..").AuthPageRoutes;
|
|
52
53
|
header?: any;
|
|
53
54
|
loaderComponent?: any;
|
|
@@ -91,7 +92,8 @@ declare const reducers: {
|
|
|
91
92
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
92
93
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
93
94
|
customLoginState?: CustomLoginState | undefined;
|
|
94
|
-
|
|
95
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
96
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
95
97
|
routes: import("..").AuthPageRoutes;
|
|
96
98
|
header?: any;
|
|
97
99
|
loaderComponent?: any;
|
|
@@ -6,6 +6,7 @@ import { call, put, takeLeading } from 'redux-saga/effects';
|
|
|
6
6
|
import { actions } from '../reducer';
|
|
7
7
|
import { delay } from '../utils';
|
|
8
8
|
import { mapMetaDataObjectToActions } from './utils';
|
|
9
|
+
import { errorHandler } from '../../utils';
|
|
9
10
|
export function* loadTenantMetadata() {
|
|
10
11
|
yield put(actions.setCustomLoginState({
|
|
11
12
|
loading: true
|
|
@@ -19,7 +20,7 @@ export function* loadTenantMetadata() {
|
|
|
19
20
|
} catch (e) {
|
|
20
21
|
yield put(actions.setCustomLoginState({
|
|
21
22
|
loading: false,
|
|
22
|
-
error: e
|
|
23
|
+
error: errorHandler(e)
|
|
23
24
|
}));
|
|
24
25
|
}
|
|
25
26
|
}
|
|
@@ -35,12 +36,9 @@ function* updateTenantMetadata(_ref) {
|
|
|
35
36
|
error: null,
|
|
36
37
|
saving: true
|
|
37
38
|
}));
|
|
38
|
-
if (!state.loginBox) {
|
|
39
|
-
throw new Error('no changes to update');
|
|
40
|
-
}
|
|
41
39
|
const requestActions = mapMetaDataObjectToActions(state);
|
|
42
40
|
if (requestActions.length === 0) {
|
|
43
|
-
throw new Error('
|
|
41
|
+
throw new Error('No changes to update');
|
|
44
42
|
}
|
|
45
43
|
yield call(updateAdminBoxMetadata, {
|
|
46
44
|
actions: requestActions
|
|
@@ -53,7 +51,7 @@ function* updateTenantMetadata(_ref) {
|
|
|
53
51
|
callback == null ? void 0 : callback(true);
|
|
54
52
|
} catch (e) {
|
|
55
53
|
yield put(actions.setCustomLoginState({
|
|
56
|
-
error: e
|
|
54
|
+
error: errorHandler(e, 'No changes to update'),
|
|
57
55
|
saving: false
|
|
58
56
|
}));
|
|
59
57
|
callback == null ? void 0 : callback(null, e);
|
|
@@ -47,7 +47,8 @@ declare const reducers: {
|
|
|
47
47
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
48
48
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
49
49
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
50
|
-
|
|
50
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
51
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
51
52
|
routes: import("..").AuthPageRoutes;
|
|
52
53
|
header?: any;
|
|
53
54
|
loaderComponent?: any;
|
|
@@ -91,7 +92,8 @@ declare const reducers: {
|
|
|
91
92
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
92
93
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
93
94
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
94
|
-
|
|
95
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
96
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
95
97
|
routes: import("..").AuthPageRoutes;
|
|
96
98
|
header?: any;
|
|
97
99
|
loaderComponent?: any;
|
|
@@ -4,6 +4,7 @@ import { call, put, takeLeading } from 'redux-saga/effects';
|
|
|
4
4
|
import { api } from '@frontegg/rest-api';
|
|
5
5
|
import { actions } from '../reducer';
|
|
6
6
|
import { ForgotPasswordStep } from './interfaces';
|
|
7
|
+
import { errorHandler } from '../../utils';
|
|
7
8
|
function* forgotPassword({
|
|
8
9
|
payload
|
|
9
10
|
}) {
|
|
@@ -23,7 +24,7 @@ function* forgotPassword({
|
|
|
23
24
|
var _payload$callback2;
|
|
24
25
|
yield put(actions.setForgotPasswordState({
|
|
25
26
|
loading: false,
|
|
26
|
-
error: e
|
|
27
|
+
error: errorHandler(e, 'Unknown error occurred')
|
|
27
28
|
}));
|
|
28
29
|
(_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, false, e);
|
|
29
30
|
}
|
|
@@ -49,7 +50,7 @@ function* resetPassword(_ref) {
|
|
|
49
50
|
} catch (e) {
|
|
50
51
|
yield put(actions.setForgotPasswordState({
|
|
51
52
|
loading: false,
|
|
52
|
-
error: e
|
|
53
|
+
error: errorHandler(e)
|
|
53
54
|
}));
|
|
54
55
|
callback == null ? void 0 : callback(false, e);
|
|
55
56
|
}
|
|
@@ -69,7 +70,7 @@ export function* loadPasswordConfig({
|
|
|
69
70
|
} catch (e) {
|
|
70
71
|
yield put(actions.setForgotPasswordState({
|
|
71
72
|
loading: false,
|
|
72
|
-
error: e
|
|
73
|
+
error: errorHandler(e)
|
|
73
74
|
}));
|
|
74
75
|
}
|
|
75
76
|
}
|
|
@@ -46,7 +46,8 @@ declare const reducers: {
|
|
|
46
46
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
47
47
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
48
48
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
49
|
-
|
|
49
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
50
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
50
51
|
routes: import("..").AuthPageRoutes;
|
|
51
52
|
header?: any;
|
|
52
53
|
loaderComponent?: any;
|
|
@@ -90,7 +91,8 @@ declare const reducers: {
|
|
|
90
91
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
91
92
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
92
93
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
93
|
-
|
|
94
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
95
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
94
96
|
routes: import("..").AuthPageRoutes;
|
|
95
97
|
header?: any;
|
|
96
98
|
loaderComponent?: any;
|
|
@@ -133,7 +135,8 @@ declare const reducers: {
|
|
|
133
135
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
134
136
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
135
137
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
136
|
-
|
|
138
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
139
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
137
140
|
routes: import("..").AuthPageRoutes;
|
|
138
141
|
header?: any;
|
|
139
142
|
loaderComponent?: any;
|
|
@@ -176,7 +179,8 @@ declare const reducers: {
|
|
|
176
179
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
177
180
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
178
181
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
179
|
-
|
|
182
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
183
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
180
184
|
routes: import("..").AuthPageRoutes;
|
|
181
185
|
header?: any;
|
|
182
186
|
loaderComponent?: any;
|
|
@@ -226,7 +230,8 @@ declare const reducers: {
|
|
|
226
230
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
227
231
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
228
232
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
229
|
-
|
|
233
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
234
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
230
235
|
routes: import("..").AuthPageRoutes;
|
|
231
236
|
header?: any;
|
|
232
237
|
loaderComponent?: any;
|
|
@@ -270,7 +275,8 @@ declare const reducers: {
|
|
|
270
275
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
271
276
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
272
277
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
273
|
-
|
|
278
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
279
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
274
280
|
routes: import("..").AuthPageRoutes;
|
|
275
281
|
header?: any;
|
|
276
282
|
loaderComponent?: any;
|
|
@@ -341,7 +347,8 @@ declare const reducers: {
|
|
|
341
347
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
342
348
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
343
349
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
344
|
-
|
|
350
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
351
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
345
352
|
routes: import("..").AuthPageRoutes;
|
|
346
353
|
header?: any;
|
|
347
354
|
loaderComponent?: any;
|
|
@@ -385,7 +392,8 @@ declare const reducers: {
|
|
|
385
392
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
386
393
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
387
394
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
388
|
-
|
|
395
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
396
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
389
397
|
routes: import("..").AuthPageRoutes;
|
|
390
398
|
header?: any;
|
|
391
399
|
loaderComponent?: any;
|
|
@@ -428,7 +436,8 @@ declare const reducers: {
|
|
|
428
436
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
429
437
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
430
438
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
431
|
-
|
|
439
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
440
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
432
441
|
routes: import("..").AuthPageRoutes;
|
|
433
442
|
header?: any;
|
|
434
443
|
loaderComponent?: any;
|
|
@@ -471,7 +480,8 @@ declare const reducers: {
|
|
|
471
480
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
472
481
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
473
482
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
474
|
-
|
|
483
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
484
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
475
485
|
routes: import("..").AuthPageRoutes;
|
|
476
486
|
header?: any;
|
|
477
487
|
loaderComponent?: any;
|
|
@@ -521,7 +531,8 @@ declare const reducers: {
|
|
|
521
531
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
522
532
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
523
533
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
524
|
-
|
|
534
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
535
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
525
536
|
routes: import("..").AuthPageRoutes;
|
|
526
537
|
header?: any;
|
|
527
538
|
loaderComponent?: any;
|
|
@@ -565,7 +576,8 @@ declare const reducers: {
|
|
|
565
576
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
566
577
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
567
578
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
568
|
-
|
|
579
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
580
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
569
581
|
routes: import("..").AuthPageRoutes;
|
|
570
582
|
header?: any;
|
|
571
583
|
loaderComponent?: any;
|
|
@@ -64,7 +64,8 @@ declare const reducers: {
|
|
|
64
64
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
65
65
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
66
66
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
67
|
-
|
|
67
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
68
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
68
69
|
routes: import("..").AuthPageRoutes;
|
|
69
70
|
header?: any;
|
|
70
71
|
loaderComponent?: any;
|
|
@@ -108,7 +109,8 @@ declare const reducers: {
|
|
|
108
109
|
impersonateState?: import("..").ImpersonateState | undefined;
|
|
109
110
|
passkeysState?: import("..").PasskeysState | undefined;
|
|
110
111
|
customLoginState?: import("..").CustomLoginState | undefined;
|
|
111
|
-
|
|
112
|
+
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
113
|
+
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
112
114
|
routes: import("..").AuthPageRoutes;
|
|
113
115
|
header?: any;
|
|
114
116
|
loaderComponent?: any;
|