@frontegg/redux-store 6.110.0 → 6.112.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/auth/LoginState/saga.js +8 -4
- package/auth/MSP/AllAccountsState/allAccountsDialogsState.d.ts +9 -12
- package/auth/MSP/AllAccountsState/allAccountsDialogsState.js +8 -1
- package/auth/MSP/AllAccountsState/types/dialogsStateTypes.d.ts +7 -10
- package/auth/TenantsState/interfaces.d.ts +1 -0
- package/auth/TenantsState/saga.js +3 -2
- package/auth/index.d.ts +6 -8
- package/auth/reducer.d.ts +6 -8
- package/index.js +1 -1
- package/node/auth/LoginState/saga.js +8 -4
- package/node/auth/MSP/AllAccountsState/allAccountsDialogsState.js +8 -1
- package/node/auth/TenantsState/saga.js +3 -2
- package/node/index.js +1 -1
- package/package.json +2 -2
package/auth/LoginState/saga.js
CHANGED
|
@@ -335,8 +335,9 @@ function* refreshTokenEmbedded() {
|
|
|
335
335
|
} = yield select(state => state.auth);
|
|
336
336
|
const {
|
|
337
337
|
user,
|
|
338
|
-
tenants
|
|
339
|
-
|
|
338
|
+
tenants,
|
|
339
|
+
activeTenant
|
|
340
|
+
} = yield call(api.auth.refreshTokenV3);
|
|
340
341
|
if (isMfaRequired(user)) {
|
|
341
342
|
const mfaRequiredState = yield getMfaRequiredState(user);
|
|
342
343
|
yield put(actions.setState(mfaRequiredState));
|
|
@@ -352,6 +353,7 @@ function* refreshTokenEmbedded() {
|
|
|
352
353
|
const shouldNavigateToRegisterQuickLogin = yield shouldNevigateToRegisterQuickLogin(user);
|
|
353
354
|
yield put(actions.setTenantsState({
|
|
354
355
|
tenants,
|
|
356
|
+
activeTenant,
|
|
355
357
|
loading: false
|
|
356
358
|
}));
|
|
357
359
|
yield put(actions.setState({
|
|
@@ -382,8 +384,9 @@ function* refreshTokenEmbeddedSocialLogins() {
|
|
|
382
384
|
} = yield select(state => state.auth);
|
|
383
385
|
const {
|
|
384
386
|
user,
|
|
385
|
-
tenants
|
|
386
|
-
|
|
387
|
+
tenants,
|
|
388
|
+
activeTenant
|
|
389
|
+
} = yield call(api.auth.refreshTokenV3);
|
|
387
390
|
if (isMfaRequired(user)) {
|
|
388
391
|
const mfaRequiredState = yield getMfaRequiredState(user);
|
|
389
392
|
yield put(actions.setState(mfaRequiredState));
|
|
@@ -399,6 +402,7 @@ function* refreshTokenEmbeddedSocialLogins() {
|
|
|
399
402
|
}));
|
|
400
403
|
yield put(actions.setTenantsState({
|
|
401
404
|
tenants,
|
|
405
|
+
activeTenant,
|
|
402
406
|
loading: false
|
|
403
407
|
}));
|
|
404
408
|
yield put(actions.setState({
|
|
@@ -298,24 +298,21 @@ declare const reducers: {
|
|
|
298
298
|
};
|
|
299
299
|
openDeleteSubAccountDialog: {
|
|
300
300
|
prepare: (payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
|
|
301
|
-
accountName
|
|
302
|
-
accountId
|
|
303
|
-
|
|
304
|
-
isParentAccount?: boolean | undefined;
|
|
301
|
+
accountName: string;
|
|
302
|
+
accountId: string;
|
|
303
|
+
isParentAccount: boolean;
|
|
305
304
|
}, boolean>>) => {
|
|
306
305
|
payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
|
|
307
|
-
accountName
|
|
308
|
-
accountId
|
|
309
|
-
|
|
310
|
-
isParentAccount?: boolean | undefined;
|
|
306
|
+
accountName: string;
|
|
307
|
+
accountId: string;
|
|
308
|
+
isParentAccount: boolean;
|
|
311
309
|
}, boolean>>;
|
|
312
310
|
};
|
|
313
311
|
reducer: (state: import("../..").AuthState, { payload }: {
|
|
314
312
|
payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
|
|
315
|
-
accountName
|
|
316
|
-
accountId
|
|
317
|
-
|
|
318
|
-
isParentAccount?: boolean | undefined;
|
|
313
|
+
accountName: string;
|
|
314
|
+
accountId: string;
|
|
315
|
+
isParentAccount: boolean;
|
|
319
316
|
}, boolean>>;
|
|
320
317
|
type: string;
|
|
321
318
|
}) => {
|
|
@@ -16,6 +16,9 @@ const allAccountsDialogsState = {
|
|
|
16
16
|
jwt: ''
|
|
17
17
|
},
|
|
18
18
|
deleteSubAccountDialog: {
|
|
19
|
+
accountId: '',
|
|
20
|
+
accountName: '',
|
|
21
|
+
isParentAccount: false,
|
|
19
22
|
loading: false,
|
|
20
23
|
open: false,
|
|
21
24
|
error: false,
|
|
@@ -40,7 +43,11 @@ const allAccountsDialogsState = {
|
|
|
40
43
|
editUserRolesDialog: {
|
|
41
44
|
loading: false,
|
|
42
45
|
open: false,
|
|
43
|
-
jwt: ''
|
|
46
|
+
jwt: '',
|
|
47
|
+
accountId: '',
|
|
48
|
+
userId: '',
|
|
49
|
+
userName: '',
|
|
50
|
+
userRoles: []
|
|
44
51
|
}
|
|
45
52
|
};
|
|
46
53
|
const reducers = {
|
|
@@ -17,10 +17,9 @@ export declare type TUpdateAccountDialogState = TUserJwtPayload & BaseAllAccount
|
|
|
17
17
|
accountId: string;
|
|
18
18
|
};
|
|
19
19
|
export declare type TDeleteSubAccountDialogState = WithCallback<TUserJwtPayload & BaseAllAccountsDialogState & {
|
|
20
|
-
accountName
|
|
21
|
-
accountId
|
|
22
|
-
|
|
23
|
-
isParentAccount?: boolean;
|
|
20
|
+
accountName: string;
|
|
21
|
+
accountId: string;
|
|
22
|
+
isParentAccount: boolean;
|
|
24
23
|
}>;
|
|
25
24
|
export declare type TAddUsersToSubAccountDialogState = TUserJwtPayload & BaseAllAccountsDialogState & {
|
|
26
25
|
accountName: string;
|
|
@@ -35,12 +34,10 @@ export declare type TDeleteUserFromSubAccountDialogState = TUserJwtPayload & Bas
|
|
|
35
34
|
userName: string;
|
|
36
35
|
};
|
|
37
36
|
export declare type TEditUserRolesDialogState = TUserJwtPayload & BaseAllAccountsDialogState & {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
userName?: string;
|
|
43
|
-
roles?: IRole[];
|
|
37
|
+
accountId: string;
|
|
38
|
+
userId: string;
|
|
39
|
+
userName: string;
|
|
40
|
+
userRoles?: IRole[];
|
|
44
41
|
};
|
|
45
42
|
export interface IAllAccountsDialogsState {
|
|
46
43
|
updateSubAccountDialog: TUpdateAccountDialogState;
|
|
@@ -39,9 +39,10 @@ function* loadTenants({
|
|
|
39
39
|
}));
|
|
40
40
|
try {
|
|
41
41
|
var _payload$callback;
|
|
42
|
-
const
|
|
42
|
+
const userTenantsResponse = yield call(api.users.getCurrentUserTenantsV3);
|
|
43
43
|
yield put(actions.setTenantsState({
|
|
44
|
-
tenants,
|
|
44
|
+
tenants: userTenantsResponse.tenants,
|
|
45
|
+
activeTenant: userTenantsResponse.activeTenant,
|
|
45
46
|
loading: false
|
|
46
47
|
}));
|
|
47
48
|
payload == null ? void 0 : (_payload$callback = payload.callback) == null ? void 0 : _payload$callback.call(payload, []);
|
package/auth/index.d.ts
CHANGED
|
@@ -525,15 +525,13 @@ declare const _default: {
|
|
|
525
525
|
openUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>], Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>, string, never, never>;
|
|
526
526
|
closeUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
527
527
|
openDeleteSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
|
|
528
|
-
accountName
|
|
529
|
-
accountId
|
|
530
|
-
|
|
531
|
-
isParentAccount?: boolean | undefined;
|
|
528
|
+
accountName: string;
|
|
529
|
+
accountId: string;
|
|
530
|
+
isParentAccount: boolean;
|
|
532
531
|
}, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
|
|
533
|
-
accountName
|
|
534
|
-
accountId
|
|
535
|
-
|
|
536
|
-
isParentAccount?: boolean | undefined;
|
|
532
|
+
accountName: string;
|
|
533
|
+
accountId: string;
|
|
534
|
+
isParentAccount: boolean;
|
|
537
535
|
}, boolean>>, string, never, never>;
|
|
538
536
|
closeDeleteSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
539
537
|
openAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>, string, never, never>;
|
package/auth/reducer.d.ts
CHANGED
|
@@ -486,15 +486,13 @@ declare const actions: {
|
|
|
486
486
|
openUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>], Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>, string, never, never>;
|
|
487
487
|
closeUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
488
488
|
openDeleteSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
|
|
489
|
-
accountName
|
|
490
|
-
accountId
|
|
491
|
-
|
|
492
|
-
isParentAccount?: boolean | undefined;
|
|
489
|
+
accountName: string;
|
|
490
|
+
accountId: string;
|
|
491
|
+
isParentAccount: boolean;
|
|
493
492
|
}, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
|
|
494
|
-
accountName
|
|
495
|
-
accountId
|
|
496
|
-
|
|
497
|
-
isParentAccount?: boolean | undefined;
|
|
493
|
+
accountName: string;
|
|
494
|
+
accountId: string;
|
|
495
|
+
isParentAccount: boolean;
|
|
498
496
|
}, boolean>>, string, never, never>;
|
|
499
497
|
closeDeleteSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
500
498
|
openAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>, string, never, never>;
|
package/index.js
CHANGED
|
@@ -352,8 +352,9 @@ function* refreshTokenEmbedded() {
|
|
|
352
352
|
} = yield (0, _effects.select)(state => state.auth);
|
|
353
353
|
const {
|
|
354
354
|
user,
|
|
355
|
-
tenants
|
|
356
|
-
|
|
355
|
+
tenants,
|
|
356
|
+
activeTenant
|
|
357
|
+
} = yield (0, _effects.call)(_restApi.api.auth.refreshTokenV3);
|
|
357
358
|
if (isMfaRequired(user)) {
|
|
358
359
|
const mfaRequiredState = yield getMfaRequiredState(user);
|
|
359
360
|
yield (0, _effects.put)(_reducer.actions.setState(mfaRequiredState));
|
|
@@ -369,6 +370,7 @@ function* refreshTokenEmbedded() {
|
|
|
369
370
|
const shouldNavigateToRegisterQuickLogin = yield shouldNevigateToRegisterQuickLogin(user);
|
|
370
371
|
yield (0, _effects.put)(_reducer.actions.setTenantsState({
|
|
371
372
|
tenants,
|
|
373
|
+
activeTenant,
|
|
372
374
|
loading: false
|
|
373
375
|
}));
|
|
374
376
|
yield (0, _effects.put)(_reducer.actions.setState({
|
|
@@ -399,8 +401,9 @@ function* refreshTokenEmbeddedSocialLogins() {
|
|
|
399
401
|
} = yield (0, _effects.select)(state => state.auth);
|
|
400
402
|
const {
|
|
401
403
|
user,
|
|
402
|
-
tenants
|
|
403
|
-
|
|
404
|
+
tenants,
|
|
405
|
+
activeTenant
|
|
406
|
+
} = yield (0, _effects.call)(_restApi.api.auth.refreshTokenV3);
|
|
404
407
|
if (isMfaRequired(user)) {
|
|
405
408
|
const mfaRequiredState = yield getMfaRequiredState(user);
|
|
406
409
|
yield (0, _effects.put)(_reducer.actions.setState(mfaRequiredState));
|
|
@@ -416,6 +419,7 @@ function* refreshTokenEmbeddedSocialLogins() {
|
|
|
416
419
|
}));
|
|
417
420
|
yield (0, _effects.put)(_reducer.actions.setTenantsState({
|
|
418
421
|
tenants,
|
|
422
|
+
activeTenant,
|
|
419
423
|
loading: false
|
|
420
424
|
}));
|
|
421
425
|
yield (0, _effects.put)(_reducer.actions.setState({
|
|
@@ -22,6 +22,9 @@ const allAccountsDialogsState = {
|
|
|
22
22
|
jwt: ''
|
|
23
23
|
},
|
|
24
24
|
deleteSubAccountDialog: {
|
|
25
|
+
accountId: '',
|
|
26
|
+
accountName: '',
|
|
27
|
+
isParentAccount: false,
|
|
25
28
|
loading: false,
|
|
26
29
|
open: false,
|
|
27
30
|
error: false,
|
|
@@ -46,7 +49,11 @@ const allAccountsDialogsState = {
|
|
|
46
49
|
editUserRolesDialog: {
|
|
47
50
|
loading: false,
|
|
48
51
|
open: false,
|
|
49
|
-
jwt: ''
|
|
52
|
+
jwt: '',
|
|
53
|
+
accountId: '',
|
|
54
|
+
userId: '',
|
|
55
|
+
userName: '',
|
|
56
|
+
userRoles: []
|
|
50
57
|
}
|
|
51
58
|
};
|
|
52
59
|
exports.allAccountsDialogsState = allAccountsDialogsState;
|
|
@@ -46,9 +46,10 @@ function* loadTenants({
|
|
|
46
46
|
}));
|
|
47
47
|
try {
|
|
48
48
|
var _payload$callback;
|
|
49
|
-
const
|
|
49
|
+
const userTenantsResponse = yield (0, _effects.call)(_restApi.api.users.getCurrentUserTenantsV3);
|
|
50
50
|
yield (0, _effects.put)(_reducer.actions.setTenantsState({
|
|
51
|
-
tenants,
|
|
51
|
+
tenants: userTenantsResponse.tenants,
|
|
52
|
+
activeTenant: userTenantsResponse.activeTenant,
|
|
52
53
|
loading: false
|
|
53
54
|
}));
|
|
54
55
|
payload == null ? void 0 : (_payload$callback = payload.callback) == null ? void 0 : _payload$callback.call(payload, []);
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.112.0",
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontegg LTD",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/runtime": "^7.18.6",
|
|
9
|
-
"@frontegg/rest-api": "^3.0.
|
|
9
|
+
"@frontegg/rest-api": "^3.0.123",
|
|
10
10
|
"@reduxjs/toolkit": "1.8.5",
|
|
11
11
|
"redux-saga": "^1.2.1",
|
|
12
12
|
"uuid": "^8.3.2"
|