@frontegg/js 7.124.0 → 7.125.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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.124.0
1
+ /** @license Frontegg v7.125.0-alpha.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/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.124.0
1
+ /** @license Frontegg v7.125.0-alpha.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/node/version.js CHANGED
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- cdnVersion: '7.124.0'
8
+ cdnVersion: '7.125.0-alpha.0'
9
9
  };
10
10
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "7.124.0",
3
+ "version": "7.125.0-alpha.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/types": "7.124.0"
9
+ "@frontegg/types": "7.125.0-alpha.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -1927,7 +1927,7 @@ __webpack_require__.r(__webpack_exports__);
1927
1927
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1928
1928
  /* harmony export */ });
1929
1929
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1930
- cdnVersion: '7.124.0'
1930
+ cdnVersion: '7.125.0-alpha.0'
1931
1931
  });
1932
1932
 
1933
1933
  /***/ }),
@@ -14350,6 +14350,7 @@ const _excluded = ["callback"],
14350
14350
 
14351
14351
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
14352
14352
  const actions = sharedActions;
14353
+ let pendingRoleAssignmentPolicyRequest = null;
14353
14354
 
14354
14355
  /**
14355
14356
  * @protected
@@ -14443,6 +14444,9 @@ const _excluded = ["callback"],
14443
14444
  const setSecurityPolicyAuthStrategyPublicState = state => {
14444
14445
  Object.assign(store.auth.securityPolicyState.publicAuthStrategyPolicy, state);
14445
14446
  };
14447
+ const setRoleAssignmentPolicyState = state => {
14448
+ Object.assign(store.auth.securityPolicyState.roleAssignmentPolicy, state);
14449
+ };
14446
14450
  const resetSecurityPolicyState = () => {
14447
14451
  (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.deepResetState)(store, ['auth', 'securityPolicyState'], _state__WEBPACK_IMPORTED_MODULE_3__.initialState);
14448
14452
  };
@@ -14495,6 +14499,34 @@ const _excluded = ["callback"],
14495
14499
  });
14496
14500
  }
14497
14501
  };
14502
+ const loadRoleAssignmentPolicy = async payload => {
14503
+ // Several role pickers can mount at once, all before the first response lands.
14504
+ // Share the in-flight request so they do not each trigger their own call.
14505
+ if (pendingRoleAssignmentPolicyRequest) {
14506
+ return pendingRoleAssignmentPolicyRequest;
14507
+ }
14508
+ setRoleAssignmentPolicyState({
14509
+ loading: true,
14510
+ error: null
14511
+ });
14512
+ pendingRoleAssignmentPolicyRequest = (async () => {
14513
+ try {
14514
+ const policy = await (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.retryIfNeeded)(() => api.auth.getRoleAssignmentPolicy(), payload == null ? void 0 : payload.retryConfig);
14515
+ setRoleAssignmentPolicyState({
14516
+ policy,
14517
+ loading: false
14518
+ });
14519
+ } catch (e) {
14520
+ setRoleAssignmentPolicyState({
14521
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e),
14522
+ loading: false
14523
+ });
14524
+ } finally {
14525
+ pendingRoleAssignmentPolicyRequest = null;
14526
+ }
14527
+ })();
14528
+ return pendingRoleAssignmentPolicyRequest;
14529
+ };
14498
14530
  const loadVendorPasswordConfig = async payload => {
14499
14531
  setSecurityPolicyPasswordState({
14500
14532
  loading: true,
@@ -14809,10 +14841,12 @@ const _excluded = ["callback"],
14809
14841
  resetSecurityPolicyState,
14810
14842
  setSecurityPolicyPasswordState,
14811
14843
  setSecurityPolicyAuthStrategyPublicState,
14844
+ setRoleAssignmentPolicyState,
14812
14845
  // actions
14813
14846
  loadSecurityPolicy,
14814
14847
  loadGlobalSecurityPolicy,
14815
14848
  loadPublicSecurityPolicy,
14849
+ loadRoleAssignmentPolicy,
14816
14850
  loadVendorPasswordConfig,
14817
14851
  loadSecurityPolicyMfa,
14818
14852
  loadSecurityPolicyVendorMfa,
@@ -14894,6 +14928,9 @@ const initialState = {
14894
14928
  publicPolicy: {
14895
14929
  loading: false
14896
14930
  },
14931
+ roleAssignmentPolicy: {
14932
+ loading: false
14933
+ },
14897
14934
  vendorMfaPolicy: {
14898
14935
  loading: true
14899
14936
  },
@@ -21092,7 +21129,7 @@ __webpack_require__.r(__webpack_exports__);
21092
21129
  /* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
21093
21130
  /* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
21094
21131
  /* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
21095
- /** @license Frontegg v7.124.0
21132
+ /** @license Frontegg v7.125.0-alpha.0
21096
21133
  *
21097
21134
  * This source code is licensed under the MIT license found in the
21098
21135
  * LICENSE file in the root directory of this source tree.
@@ -23514,7 +23551,7 @@ const _excluded = ["callback"],
23514
23551
 
23515
23552
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, actions) => {
23516
23553
  const originalActions = (0,_auth_Security_SecurityPolicyState__WEBPACK_IMPORTED_MODULE_2__["default"])(store, api, actions);
23517
- const mockedActions = (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.mockActionsExpect)(originalActions, ['setSecurityPolicyState', 'setSecurityPolicyGlobalState', 'setSecurityPolicyPublicState', 'setSecurityPolicyMfaState', 'setSecurityPolicyVendorMfaState', 'setSecurityPolicyLockoutState', 'setSecurityPolicyVendorLockoutState', 'setSecurityPolicyCaptchaState', 'setSecurityPolicyPasswordHistoryState', 'setSecurityPolicyVendorPasswordHistoryState', 'resetSecurityPolicyState', 'setSecurityPolicyPasswordState', 'setSecurityPolicyAuthStrategyPublicState']);
23554
+ const mockedActions = (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.mockActionsExpect)(originalActions, ['setSecurityPolicyState', 'setSecurityPolicyGlobalState', 'setSecurityPolicyPublicState', 'setSecurityPolicyMfaState', 'setSecurityPolicyVendorMfaState', 'setSecurityPolicyLockoutState', 'setSecurityPolicyVendorLockoutState', 'setSecurityPolicyCaptchaState', 'setSecurityPolicyPasswordHistoryState', 'setSecurityPolicyVendorPasswordHistoryState', 'resetSecurityPolicyState', 'setSecurityPolicyPasswordState', 'setSecurityPolicyAuthStrategyPublicState', 'setRoleAssignmentPolicyState']);
23518
23555
  mockedActions.loadSecurityPolicy = async () => {
23519
23556
  mockedActions.setSecurityPolicyGlobalState({
23520
23557
  loading: true,
@@ -23544,6 +23581,25 @@ const _excluded = ["callback"],
23544
23581
  });
23545
23582
  }
23546
23583
  };
23584
+ mockedActions.loadRoleAssignmentPolicy = async () => {
23585
+ mockedActions.setRoleAssignmentPolicyState({
23586
+ loading: true,
23587
+ error: null
23588
+ });
23589
+ try {
23590
+ mockedActions.setRoleAssignmentPolicyState({
23591
+ policy: {
23592
+ restrictEqualLevelRoleAssignment: false
23593
+ },
23594
+ loading: false
23595
+ });
23596
+ } catch (e) {
23597
+ mockedActions.setRoleAssignmentPolicyState({
23598
+ error: (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.errorHandler)(e),
23599
+ loading: false
23600
+ });
23601
+ }
23602
+ };
23547
23603
  mockedActions.saveSecurityPolicyMfa = async payload => {
23548
23604
  var _newSecurityPolicy$id;
23549
23605
  const {
@@ -24720,6 +24776,7 @@ const publicSecurityPolicy = {
24720
24776
  allowNotVerifiedUsersLogin: false,
24721
24777
  apiTokensEnabled: true,
24722
24778
  forcePermissions: false,
24779
+ restrictEqualLevelRoleAssignment: false,
24723
24780
  authStrategy: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.AuthStrategyEnum.EmailAndPassword,
24724
24781
  machineToMachineAuthStrategy: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.MachineToMachineAuthStrategy.ClientCredentials
24725
24782
  };
@@ -30083,6 +30140,9 @@ class AuthenticationApi extends _BaseApiClient__WEBPACK_IMPORTED_MODULE_6__.Base
30083
30140
  this.getVendorConfig = async () => {
30084
30141
  return this.get(`${_constants__WEBPACK_IMPORTED_MODULE_11__.urls.identity.configurations.v1}/public`);
30085
30142
  };
30143
+ this.getRoleAssignmentPolicy = async () => {
30144
+ return this.get(`${_constants__WEBPACK_IMPORTED_MODULE_11__.urls.identity.configurations.v1}/role-assignment-policy`);
30145
+ };
30086
30146
  this.signUp = async (signUpUrl, body) => {
30087
30147
  const {
30088
30148
  shouldActivate,
@@ -31788,7 +31848,7 @@ __webpack_require__.r(__webpack_exports__);
31788
31848
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
31789
31849
  /* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
31790
31850
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./constants */ "../../dist/@frontegg/rest-api/constants.js");
31791
- /** @license Frontegg v7.124.0
31851
+ /** @license Frontegg v7.125.0-alpha.0
31792
31852
  *
31793
31853
  * This source code is licensed under the MIT license found in the
31794
31854
  * LICENSE file in the root directory of this source tree.
@@ -34630,7 +34690,7 @@ __webpack_require__.r(__webpack_exports__);
34630
34690
  /* harmony export */ });
34631
34691
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
34632
34692
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
34633
- /** @license Frontegg v7.124.0
34693
+ /** @license Frontegg v7.125.0-alpha.0
34634
34694
  *
34635
34695
  * This source code is licensed under the MIT license found in the
34636
34696
  * LICENSE file in the root directory of this source tree.