@frontegg/redux-store 6.112.0 → 6.113.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.
@@ -87,8 +87,9 @@ function* activateAccount(_ref) {
87
87
  }));
88
88
  const {
89
89
  user,
90
- tenants
91
- } = yield call(api.auth.generateLoginResponseV2, data);
90
+ tenants,
91
+ activeTenant
92
+ } = yield call(api.auth.generateLoginResponseV3, data);
92
93
  events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, {
93
94
  email: user.email,
94
95
  origin: UserVeirifedOriginTypes.ACTIVATION_LINK,
@@ -99,6 +100,7 @@ function* activateAccount(_ref) {
99
100
  });
100
101
  yield put(actions.setTenantsState({
101
102
  tenants,
103
+ activeTenant,
102
104
  loading: false
103
105
  }));
104
106
  yield put(actions.setState({
@@ -1508,7 +1508,8 @@ function* silentLogout({
1508
1508
  }
1509
1509
  function* handleEnrollMFAResponse({
1510
1510
  user,
1511
- tenants
1511
+ tenants,
1512
+ activeTenant
1512
1513
  }) {
1513
1514
  const mfaState = {
1514
1515
  step: MFAStep.recoveryCode,
@@ -1523,6 +1524,7 @@ function* handleEnrollMFAResponse({
1523
1524
  yield put(actions.setUser(user));
1524
1525
  yield put(actions.setTenantsState({
1525
1526
  tenants,
1527
+ activeTenant,
1526
1528
  loading: false
1527
1529
  }));
1528
1530
  if (user.id) {
@@ -1603,7 +1605,7 @@ function* enrollMFASMSForLogin(_ref14) {
1603
1605
  }));
1604
1606
  try {
1605
1607
  const data = yield call(api.auth.enrollMFASMSForLogin, payload);
1606
- const response = yield call(api.auth.generateLoginResponseV2, data);
1608
+ const response = yield call(api.auth.generateLoginResponseV3, data);
1607
1609
  yield handleEnrollMFAResponse(response);
1608
1610
  yield put(actions.setLoginState({
1609
1611
  loading: false
@@ -1669,7 +1671,7 @@ function* enrollMFAWebAuthnForLogin(_ref16) {
1669
1671
  const data = yield call(api.auth.enrollMFAWebAuthnForLogin, _extends({}, payload, {
1670
1672
  options: publicKey
1671
1673
  }));
1672
- const response = yield call(api.auth.generateLoginResponseV2, data);
1674
+ const response = yield call(api.auth.generateLoginResponseV3, data);
1673
1675
  yield handleEnrollMFAResponse(response);
1674
1676
  yield put(actions.setLoginState({
1675
1677
  loading: false
@@ -1695,7 +1697,7 @@ function* enrollMFAAuthenticatorAppForLogin(_ref17) {
1695
1697
  }));
1696
1698
  try {
1697
1699
  const data = yield call(api.auth.enrollMFAAuthenticatorAppForLogin, payload);
1698
- const response = yield call(api.auth.generateLoginResponseV2, data);
1700
+ const response = yield call(api.auth.generateLoginResponseV3, data);
1699
1701
  yield handleEnrollMFAResponse(response);
1700
1702
  yield put(actions.setLoginState({
1701
1703
  loading: false
@@ -1752,7 +1754,7 @@ function* verifyMFASMSForLogin(_ref19) {
1752
1754
  }));
1753
1755
  try {
1754
1756
  const data = yield call(api.auth.verifyMFASMSForLogin, deviceId, payload);
1755
- const response = yield call(api.auth.generateLoginResponseV2, data);
1757
+ const response = yield call(api.auth.generateLoginResponseV3, data);
1756
1758
  yield handleVerifyMFAResponse(response);
1757
1759
  yield put(actions.setLoginState({
1758
1760
  loading: false
@@ -1817,7 +1819,7 @@ function* verifyMFAWebAuthnForLogin(_ref21) {
1817
1819
  const data = yield call(api.auth.verifyMFAWebAuthnForLogin, deviceId, _extends({}, payload, {
1818
1820
  options: publicKey
1819
1821
  }));
1820
- const response = yield call(api.auth.generateLoginResponseV2, data);
1822
+ const response = yield call(api.auth.generateLoginResponseV3, data);
1821
1823
  yield handleVerifyMFAResponse(response);
1822
1824
  yield put(actions.setLoginState({
1823
1825
  loading: false
@@ -101,11 +101,23 @@ declare const reducers: {
101
101
  loaderComponent?: any;
102
102
  };
103
103
  openCreateSubAccountDialog: {
104
- prepare: (payload: Partial<TCreateSubAccountDialogState>) => {
105
- payload: Partial<TCreateSubAccountDialogState>;
104
+ prepare: (payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
105
+ accountName?: string | undefined;
106
+ parentAccountId?: string | undefined;
107
+ canSelectParentAccount?: boolean | undefined;
108
+ }, boolean>>) => {
109
+ payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
110
+ accountName?: string | undefined;
111
+ parentAccountId?: string | undefined;
112
+ canSelectParentAccount?: boolean | undefined;
113
+ }, boolean>>;
106
114
  };
107
115
  reducer: (state: import("../..").AuthState, { payload }: {
108
- payload: Partial<TCreateSubAccountDialogState>;
116
+ payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
117
+ accountName?: string | undefined;
118
+ parentAccountId?: string | undefined;
119
+ canSelectParentAccount?: boolean | undefined;
120
+ }, boolean>>;
109
121
  type: string;
110
122
  }) => {
111
123
  onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
@@ -407,11 +419,23 @@ declare const reducers: {
407
419
  loaderComponent?: any;
408
420
  };
409
421
  openAddUsersToAccountDialog: {
410
- prepare: (payload: Partial<TAddUsersToSubAccountDialogState>) => {
411
- payload: Partial<TAddUsersToSubAccountDialogState>;
422
+ prepare: (payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
423
+ accountName: string;
424
+ accountId: string;
425
+ permissionToGiveAccessToSubAccounts: boolean;
426
+ }, boolean>>) => {
427
+ payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
428
+ accountName: string;
429
+ accountId: string;
430
+ permissionToGiveAccessToSubAccounts: boolean;
431
+ }, boolean>>;
412
432
  };
413
433
  reducer: (state: import("../..").AuthState, { payload }: {
414
- payload: Partial<TAddUsersToSubAccountDialogState>;
434
+ payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
435
+ accountName: string;
436
+ accountId: string;
437
+ permissionToGiveAccessToSubAccounts: boolean;
438
+ }, boolean>>;
415
439
  type: string;
416
440
  }) => {
417
441
  onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
@@ -505,11 +529,29 @@ declare const reducers: {
505
529
  loaderComponent?: any;
506
530
  };
507
531
  openDeleteUserFromAccountDialog: {
508
- prepare: (payload: Partial<TDeleteUserFromSubAccountDialogState>) => {
509
- payload: Partial<TDeleteUserFromSubAccountDialogState>;
532
+ prepare: (payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
533
+ accountName?: string | undefined;
534
+ accountId: string;
535
+ parentAccountId?: string | undefined;
536
+ userId: string;
537
+ userName: string;
538
+ }, boolean>>) => {
539
+ payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
540
+ accountName?: string | undefined;
541
+ accountId: string;
542
+ parentAccountId?: string | undefined;
543
+ userId: string;
544
+ userName: string;
545
+ }, boolean>>;
510
546
  };
511
547
  reducer: (state: import("../..").AuthState, { payload }: {
512
- payload: Partial<TDeleteUserFromSubAccountDialogState>;
548
+ payload: Partial<import("../../../interfaces").WithCallback<import("./types").TUserJwtPayload & import("./types").BaseAllAccountsDialogState & {
549
+ accountName?: string | undefined;
550
+ accountId: string;
551
+ parentAccountId?: string | undefined;
552
+ userId: string;
553
+ userName: string;
554
+ }, boolean>>;
513
555
  type: string;
514
556
  }) => {
515
557
  onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
@@ -11,7 +11,7 @@ export const allAccountsInitialState = {
11
11
  children: []
12
12
  },
13
13
  accountsQueryParams: {
14
- _limit: 2,
14
+ _limit: 50,
15
15
  _offset: 0,
16
16
  _filter: '',
17
17
  _subTenantId: ''
@@ -202,7 +202,8 @@ function* getUserJwtForSubAccount({
202
202
  tenantId
203
203
  });
204
204
  yield put(actions.setSelectedAccountState({
205
- userJwt
205
+ userJwt,
206
+ accessPermission: true
206
207
  }));
207
208
  callback == null ? void 0 : callback(true);
208
209
  } catch (e) {
@@ -210,6 +211,9 @@ function* getUserJwtForSubAccount({
210
211
  key,
211
212
  value: errorHandler(e)
212
213
  }));
214
+ yield put(actions.setSelectedAccountState({
215
+ accessPermission: false
216
+ }));
213
217
  callback == null ? void 0 : callback(false);
214
218
  } finally {
215
219
  yield put(actions.setAllAccountsLoader({
@@ -7,11 +7,11 @@ export declare type BaseAllAccountsDialogState = {
7
7
  error?: boolean;
8
8
  onClose?: (data?: any) => void;
9
9
  };
10
- export declare type TCreateSubAccountDialogState = TUserJwtPayload & BaseAllAccountsDialogState & {
10
+ export declare type TCreateSubAccountDialogState = WithCallback<TUserJwtPayload & BaseAllAccountsDialogState & {
11
11
  accountName?: string;
12
12
  parentAccountId?: string;
13
13
  canSelectParentAccount?: boolean;
14
- };
14
+ }>;
15
15
  export declare type TUpdateAccountDialogState = TUserJwtPayload & BaseAllAccountsDialogState & {
16
16
  accountName: string;
17
17
  accountId: string;
@@ -21,18 +21,18 @@ export declare type TDeleteSubAccountDialogState = WithCallback<TUserJwtPayload
21
21
  accountId: string;
22
22
  isParentAccount: boolean;
23
23
  }>;
24
- export declare type TAddUsersToSubAccountDialogState = TUserJwtPayload & BaseAllAccountsDialogState & {
24
+ export declare type TAddUsersToSubAccountDialogState = WithCallback<TUserJwtPayload & BaseAllAccountsDialogState & {
25
25
  accountName: string;
26
26
  accountId: string;
27
27
  permissionToGiveAccessToSubAccounts: boolean;
28
- };
29
- export declare type TDeleteUserFromSubAccountDialogState = TUserJwtPayload & BaseAllAccountsDialogState & {
28
+ }>;
29
+ export declare type TDeleteUserFromSubAccountDialogState = WithCallback<TUserJwtPayload & BaseAllAccountsDialogState & {
30
30
  accountName?: string;
31
31
  accountId: string;
32
32
  parentAccountId?: string;
33
33
  userId: string;
34
34
  userName: string;
35
- };
35
+ }>;
36
36
  export declare type TEditUserRolesDialogState = TUserJwtPayload & BaseAllAccountsDialogState & {
37
37
  accountId: string;
38
38
  userId: string;
@@ -44,6 +44,7 @@ export interface ISelectedAccount extends Omit<TAccountsTree, 'numberOfUsers' |
44
44
  totalUsersPages?: number;
45
45
  usersPageOffset?: number;
46
46
  userJwt?: TUserJwt;
47
+ accessPermission?: boolean;
47
48
  usersQueryParams?: IUsersQueryParams;
48
49
  parentsAccounts?: IParentTenant[];
49
50
  accountSettings?: TAccountSettings;
@@ -18,10 +18,6 @@ declare const reducers: {
18
18
  isLoading: boolean;
19
19
  keepSessionAlive?: boolean | undefined;
20
20
  user?: import("..").User | null | undefined;
21
- /**
22
- * To be used for actions types after dispatch, and should contains
23
- * the reducers and actions as standalone function
24
- */
25
21
  isSSOAuth: boolean;
26
22
  ssoACS?: string | undefined;
27
23
  includeQueryParam?: boolean | undefined;
@@ -51,7 +47,14 @@ declare const reducers: {
51
47
  sessionsPolicyState: import("..").SessionsPolicyState;
52
48
  impersonateState?: import("..").ImpersonateState | undefined;
53
49
  passkeysState?: import("..").PasskeysState | undefined;
54
- customLoginState?: import("..").CustomLoginState | undefined;
50
+ /**
51
+ * if you see error in matcher that's mean the DispatchAction does not
52
+ * contains the same functions in reducers and actions
53
+ */
54
+ customLoginState?: import("..").CustomLoginState | undefined; /**
55
+ * if you see error in matcher that's mean the DispatchAction does not
56
+ * contains the same functions in reducers and actions
57
+ */
55
58
  allAccountsState?: import("..").IAllAccountsState | undefined;
56
59
  allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
57
60
  entitlementsState?: import("..").EntitlementsState | undefined;
@@ -75,10 +78,6 @@ declare const reducers: {
75
78
  isLoading: boolean;
76
79
  keepSessionAlive?: boolean | undefined;
77
80
  user?: import("..").User | null | undefined;
78
- /**
79
- * To be used for actions types after dispatch, and should contains
80
- * the reducers and actions as standalone function
81
- */
82
81
  isSSOAuth: boolean;
83
82
  ssoACS?: string | undefined;
84
83
  includeQueryParam?: boolean | undefined;
@@ -108,7 +107,14 @@ declare const reducers: {
108
107
  sessionsPolicyState: import("..").SessionsPolicyState;
109
108
  impersonateState?: import("..").ImpersonateState | undefined;
110
109
  passkeysState?: import("..").PasskeysState | undefined;
111
- customLoginState?: import("..").CustomLoginState | undefined;
110
+ /**
111
+ * if you see error in matcher that's mean the DispatchAction does not
112
+ * contains the same functions in reducers and actions
113
+ */
114
+ customLoginState?: import("..").CustomLoginState | undefined; /**
115
+ * if you see error in matcher that's mean the DispatchAction does not
116
+ * contains the same functions in reducers and actions
117
+ */
112
118
  allAccountsState?: import("..").IAllAccountsState | undefined;
113
119
  allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
114
120
  entitlementsState?: import("..").EntitlementsState | undefined;
@@ -132,10 +138,6 @@ declare const reducers: {
132
138
  isLoading: boolean;
133
139
  keepSessionAlive?: boolean | undefined;
134
140
  user?: import("..").User | null | undefined;
135
- /**
136
- * To be used for actions types after dispatch, and should contains
137
- * the reducers and actions as standalone function
138
- */
139
141
  isSSOAuth: boolean;
140
142
  ssoACS?: string | undefined;
141
143
  includeQueryParam?: boolean | undefined;
@@ -165,7 +167,14 @@ declare const reducers: {
165
167
  sessionsPolicyState: import("..").SessionsPolicyState;
166
168
  impersonateState?: import("..").ImpersonateState | undefined;
167
169
  passkeysState?: import("..").PasskeysState | undefined;
168
- customLoginState?: import("..").CustomLoginState | undefined;
170
+ /**
171
+ * if you see error in matcher that's mean the DispatchAction does not
172
+ * contains the same functions in reducers and actions
173
+ */
174
+ customLoginState?: import("..").CustomLoginState | undefined; /**
175
+ * if you see error in matcher that's mean the DispatchAction does not
176
+ * contains the same functions in reducers and actions
177
+ */
169
178
  allAccountsState?: import("..").IAllAccountsState | undefined;
170
179
  allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
171
180
  entitlementsState?: import("..").EntitlementsState | undefined;
package/auth/index.d.ts CHANGED
@@ -520,7 +520,15 @@ declare const _default: {
520
520
  setEntitlementsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./EntitlementsState/interfaces").EntitlementsState>], Partial<import("./EntitlementsState/interfaces").EntitlementsState>, string, never, never>;
521
521
  setAllAccountDialogsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").IAllAccountsDialogsState>], Partial<import("./MSP/AllAccountsState").IAllAccountsDialogsState>, string, never, never>;
522
522
  resetAllAccountDialogsState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
523
- openCreateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TCreateSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TCreateSubAccountDialogState>, string, never, never>;
523
+ openCreateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
524
+ accountName?: string | undefined;
525
+ parentAccountId?: string | undefined;
526
+ canSelectParentAccount?: boolean | undefined;
527
+ }, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
528
+ accountName?: string | undefined;
529
+ parentAccountId?: string | undefined;
530
+ canSelectParentAccount?: boolean | undefined;
531
+ }, boolean>>, string, never, never>;
524
532
  closeCreateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
525
533
  openUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>], Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>, string, never, never>;
526
534
  closeUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
@@ -534,9 +542,29 @@ declare const _default: {
534
542
  isParentAccount: boolean;
535
543
  }, boolean>>, string, never, never>;
536
544
  closeDeleteSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
537
- openAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>, string, never, never>;
545
+ openAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
546
+ accountName: string;
547
+ accountId: string;
548
+ permissionToGiveAccessToSubAccounts: boolean;
549
+ }, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
550
+ accountName: string;
551
+ accountId: string;
552
+ permissionToGiveAccessToSubAccounts: boolean;
553
+ }, boolean>>, string, never, never>;
538
554
  closeAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
539
- openDeleteUserFromAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TDeleteUserFromSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TDeleteUserFromSubAccountDialogState>, string, never, never>;
555
+ openDeleteUserFromAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
556
+ accountName?: string | undefined;
557
+ accountId: string;
558
+ parentAccountId?: string | undefined;
559
+ userId: string;
560
+ userName: string;
561
+ }, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
562
+ accountName?: string | undefined;
563
+ accountId: string;
564
+ parentAccountId?: string | undefined;
565
+ userId: string;
566
+ userName: string;
567
+ }, boolean>>, string, never, never>;
540
568
  closeDeleteUserFromAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
541
569
  openEditUserRolesDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TEditUserRolesDialogState>], Partial<import("./MSP/AllAccountsState").TEditUserRolesDialogState>, string, never, never>;
542
570
  closeEditUserRolesDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
@@ -35,6 +35,7 @@ export interface User extends IUserProfile {
35
35
  expires: string;
36
36
  sid?: string;
37
37
  act?: Actor;
38
+ subAccountAccessAllowed?: boolean;
38
39
  }
39
40
  export interface Routes {
40
41
  routes: AuthPageRoutes;
@@ -1,4 +1,4 @@
1
- //TODO: move act to IUserProfile in rest-api
1
+ //TODO: move act and subAccountAccessAllowed to IUserProfile in rest-api
2
2
 
3
3
  export let UserVeirifedOriginTypes;
4
4
  (function (UserVeirifedOriginTypes) {
package/auth/reducer.d.ts CHANGED
@@ -481,7 +481,15 @@ declare const actions: {
481
481
  setEntitlementsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import(".").EntitlementsState>], Partial<import(".").EntitlementsState>, string, never, never>;
482
482
  setAllAccountDialogsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").IAllAccountsDialogsState>], Partial<import("./MSP/AllAccountsState").IAllAccountsDialogsState>, string, never, never>;
483
483
  resetAllAccountDialogsState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
484
- openCreateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TCreateSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TCreateSubAccountDialogState>, string, never, never>;
484
+ openCreateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
485
+ accountName?: string | undefined;
486
+ parentAccountId?: string | undefined;
487
+ canSelectParentAccount?: boolean | undefined;
488
+ }, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
489
+ accountName?: string | undefined;
490
+ parentAccountId?: string | undefined;
491
+ canSelectParentAccount?: boolean | undefined;
492
+ }, boolean>>, string, never, never>;
485
493
  closeCreateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
486
494
  openUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>], Partial<import("./MSP/AllAccountsState").TUpdateAccountDialogState>, string, never, never>;
487
495
  closeUpdateSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
@@ -495,9 +503,29 @@ declare const actions: {
495
503
  isParentAccount: boolean;
496
504
  }, boolean>>, string, never, never>;
497
505
  closeDeleteSubAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
498
- openAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TAddUsersToSubAccountDialogState>, string, never, never>;
506
+ openAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
507
+ accountName: string;
508
+ accountId: string;
509
+ permissionToGiveAccessToSubAccounts: boolean;
510
+ }, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
511
+ accountName: string;
512
+ accountId: string;
513
+ permissionToGiveAccessToSubAccounts: boolean;
514
+ }, boolean>>, string, never, never>;
499
515
  closeAddUsersToAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
500
- openDeleteUserFromAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TDeleteUserFromSubAccountDialogState>], Partial<import("./MSP/AllAccountsState").TDeleteUserFromSubAccountDialogState>, string, never, never>;
516
+ openDeleteUserFromAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
517
+ accountName?: string | undefined;
518
+ accountId: string;
519
+ parentAccountId?: string | undefined;
520
+ userId: string;
521
+ userName: string;
522
+ }, boolean>>], Partial<import("..").WithCallback<import("./MSP/AllAccountsState").TUserJwtPayload & import("./MSP/AllAccountsState").BaseAllAccountsDialogState & {
523
+ accountName?: string | undefined;
524
+ accountId: string;
525
+ parentAccountId?: string | undefined;
526
+ userId: string;
527
+ userName: string;
528
+ }, boolean>>, string, never, never>;
501
529
  closeDeleteUserFromAccountDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
502
530
  openEditUserRolesDialog: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./MSP/AllAccountsState").TEditUserRolesDialogState>], Partial<import("./MSP/AllAccountsState").TEditUserRolesDialogState>, string, never, never>;
503
531
  closeEditUserRolesDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.112.0
1
+ /** @license Frontegg v6.113.0
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.
@@ -94,8 +94,9 @@ function* activateAccount(_ref) {
94
94
  }));
95
95
  const {
96
96
  user,
97
- tenants
98
- } = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV2, data);
97
+ tenants,
98
+ activeTenant
99
+ } = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV3, data);
99
100
  events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, {
100
101
  email: user.email,
101
102
  origin: _interfaces.UserVeirifedOriginTypes.ACTIVATION_LINK,
@@ -106,6 +107,7 @@ function* activateAccount(_ref) {
106
107
  });
107
108
  yield (0, _effects.put)(_reducer.actions.setTenantsState({
108
109
  tenants,
110
+ activeTenant,
109
111
  loading: false
110
112
  }));
111
113
  yield (0, _effects.put)(_reducer.actions.setState({
@@ -1525,7 +1525,8 @@ function* silentLogout({
1525
1525
  }
1526
1526
  function* handleEnrollMFAResponse({
1527
1527
  user,
1528
- tenants
1528
+ tenants,
1529
+ activeTenant
1529
1530
  }) {
1530
1531
  const mfaState = {
1531
1532
  step: _interfaces3.MFAStep.recoveryCode,
@@ -1540,6 +1541,7 @@ function* handleEnrollMFAResponse({
1540
1541
  yield (0, _effects.put)(_reducer.actions.setUser(user));
1541
1542
  yield (0, _effects.put)(_reducer.actions.setTenantsState({
1542
1543
  tenants,
1544
+ activeTenant,
1543
1545
  loading: false
1544
1546
  }));
1545
1547
  if (user.id) {
@@ -1620,7 +1622,7 @@ function* enrollMFASMSForLogin(_ref14) {
1620
1622
  }));
1621
1623
  try {
1622
1624
  const data = yield (0, _effects.call)(_restApi.api.auth.enrollMFASMSForLogin, payload);
1623
- const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV2, data);
1625
+ const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV3, data);
1624
1626
  yield handleEnrollMFAResponse(response);
1625
1627
  yield (0, _effects.put)(_reducer.actions.setLoginState({
1626
1628
  loading: false
@@ -1686,7 +1688,7 @@ function* enrollMFAWebAuthnForLogin(_ref16) {
1686
1688
  const data = yield (0, _effects.call)(_restApi.api.auth.enrollMFAWebAuthnForLogin, (0, _extends2.default)({}, payload, {
1687
1689
  options: publicKey
1688
1690
  }));
1689
- const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV2, data);
1691
+ const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV3, data);
1690
1692
  yield handleEnrollMFAResponse(response);
1691
1693
  yield (0, _effects.put)(_reducer.actions.setLoginState({
1692
1694
  loading: false
@@ -1712,7 +1714,7 @@ function* enrollMFAAuthenticatorAppForLogin(_ref17) {
1712
1714
  }));
1713
1715
  try {
1714
1716
  const data = yield (0, _effects.call)(_restApi.api.auth.enrollMFAAuthenticatorAppForLogin, payload);
1715
- const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV2, data);
1717
+ const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV3, data);
1716
1718
  yield handleEnrollMFAResponse(response);
1717
1719
  yield (0, _effects.put)(_reducer.actions.setLoginState({
1718
1720
  loading: false
@@ -1769,7 +1771,7 @@ function* verifyMFASMSForLogin(_ref19) {
1769
1771
  }));
1770
1772
  try {
1771
1773
  const data = yield (0, _effects.call)(_restApi.api.auth.verifyMFASMSForLogin, deviceId, payload);
1772
- const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV2, data);
1774
+ const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV3, data);
1773
1775
  yield handleVerifyMFAResponse(response);
1774
1776
  yield (0, _effects.put)(_reducer.actions.setLoginState({
1775
1777
  loading: false
@@ -1834,7 +1836,7 @@ function* verifyMFAWebAuthnForLogin(_ref21) {
1834
1836
  const data = yield (0, _effects.call)(_restApi.api.auth.verifyMFAWebAuthnForLogin, deviceId, (0, _extends2.default)({}, payload, {
1835
1837
  options: publicKey
1836
1838
  }));
1837
- const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV2, data);
1839
+ const response = yield (0, _effects.call)(_restApi.api.auth.generateLoginResponseV3, data);
1838
1840
  yield handleVerifyMFAResponse(response);
1839
1841
  yield (0, _effects.put)(_reducer.actions.setLoginState({
1840
1842
  loading: false
@@ -34,7 +34,7 @@ const allAccountsInitialState = {
34
34
  children: []
35
35
  },
36
36
  accountsQueryParams: {
37
- _limit: 2,
37
+ _limit: 50,
38
38
  _offset: 0,
39
39
  _filter: '',
40
40
  _subTenantId: ''
@@ -213,7 +213,8 @@ function* getUserJwtForSubAccount({
213
213
  tenantId
214
214
  });
215
215
  yield (0, _effects.put)(_reducer.actions.setSelectedAccountState({
216
- userJwt
216
+ userJwt,
217
+ accessPermission: true
217
218
  }));
218
219
  callback == null ? void 0 : callback(true);
219
220
  } catch (e) {
@@ -221,6 +222,9 @@ function* getUserJwtForSubAccount({
221
222
  key,
222
223
  value: (0, _utils.errorHandler)(e)
223
224
  }));
225
+ yield (0, _effects.put)(_reducer.actions.setSelectedAccountState({
226
+ accessPermission: false
227
+ }));
224
228
  callback == null ? void 0 : callback(false);
225
229
  } finally {
226
230
  yield (0, _effects.put)(_reducer.actions.setAllAccountsLoader({
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.UserVeirifedOriginTypes = exports.AuthenticationTypes = exports.AdminPortalPagesForEvents = exports.AdminPortalPages = void 0;
7
- //TODO: move act to IUserProfile in rest-api
7
+ //TODO: move act and subAccountAccessAllowed to IUserProfile in rest-api
8
8
  let UserVeirifedOriginTypes;
9
9
  exports.UserVeirifedOriginTypes = UserVeirifedOriginTypes;
10
10
  (function (UserVeirifedOriginTypes) {
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.112.0
1
+ /** @license Frontegg v6.113.0
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "6.112.0",
3
+ "version": "6.113.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",