@frontegg/redux-store 6.111.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.
@@ -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?: string | undefined;
302
- accountId?: string | undefined;
303
- parentAccountId?: string | undefined;
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?: string | undefined;
308
- accountId?: string | undefined;
309
- parentAccountId?: string | undefined;
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?: string | undefined;
316
- accountId?: string | undefined;
317
- parentAccountId?: string | undefined;
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?: string;
21
- accountId?: string;
22
- parentAccountId?: string;
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
- accountName?: string;
39
- accountId?: string;
40
- parentAccountId?: string;
41
- userId?: string;
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 tenants = yield call(api.tenants.getTenants);
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?: string | undefined;
529
- accountId?: string | undefined;
530
- parentAccountId?: string | undefined;
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?: string | undefined;
534
- accountId?: string | undefined;
535
- parentAccountId?: string | undefined;
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?: string | undefined;
490
- accountId?: string | undefined;
491
- parentAccountId?: string | undefined;
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?: string | undefined;
495
- accountId?: string | undefined;
496
- parentAccountId?: string | undefined;
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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.111.0
1
+ /** @license Frontegg v6.112.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.
@@ -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 tenants = yield (0, _effects.call)(_restApi.api.tenants.getTenants);
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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.111.0
1
+ /** @license Frontegg v6.112.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.111.0",
3
+ "version": "6.112.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",