@frontegg/js 6.163.0 → 6.164.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 v6.163.0
1
+ /** @license Frontegg v6.164.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 v6.163.0
1
+ /** @license Frontegg v6.164.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.
@@ -10,6 +10,7 @@ var mockFlagsList = {
10
10
  'new-mfa-pages': 'on',
11
11
  'show-passkeys-new': 'on',
12
12
  'groups-admin-box-new': 'on',
13
- 'msp-all-accounts-new': 'on'
13
+ 'msp-all-accounts-new': 'on',
14
+ 'temporary-users': 'on'
14
15
  };
15
16
  exports.mockFlagsList = mockFlagsList;
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: '6.163.0'
8
+ cdnVersion: '6.164.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": "6.163.0",
3
+ "version": "6.164.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": "6.163.0"
9
+ "@frontegg/types": "6.164.0-alpha.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -1399,7 +1399,8 @@ var mockFlagsList = {
1399
1399
  'new-mfa-pages': 'on',
1400
1400
  'show-passkeys-new': 'on',
1401
1401
  'groups-admin-box-new': 'on',
1402
- 'msp-all-accounts-new': 'on'
1402
+ 'msp-all-accounts-new': 'on',
1403
+ 'temporary-users': 'on'
1403
1404
  };
1404
1405
 
1405
1406
  /***/ }),
@@ -1416,7 +1417,7 @@ __webpack_require__.r(__webpack_exports__);
1416
1417
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1417
1418
  /* harmony export */ });
1418
1419
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1419
- cdnVersion: '6.163.0'
1420
+ cdnVersion: '6.164.0-alpha.0'
1420
1421
  });
1421
1422
 
1422
1423
  /***/ }),
@@ -16799,6 +16800,13 @@ const actions = {
16799
16800
  resendInvitationLinkToAllSubTenants: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/resendInvitationLinkToAllSubTenants`, payload => ({
16800
16801
  payload
16801
16802
  })),
16803
+ getTemporaryUsersConfig: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/getTemporaryUsersConfig`),
16804
+ updateUserExpirationTime: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/updateUserExpirationTime`, payload => ({
16805
+ payload
16806
+ })),
16807
+ setUserAsPermanent: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/setUserAsPermanent`, payload => ({
16808
+ payload
16809
+ })),
16802
16810
  getInvitationLink: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/getInvitationLink`),
16803
16811
  createInvitationLink: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/createInvitationLink`, payload => ({
16804
16812
  payload
@@ -16869,6 +16877,8 @@ let TeamStateKeys;
16869
16877
  TeamStateKeys["UPDATE_TOKEN_LINK"] = "UPDATE_TOKEN_LINK";
16870
16878
  TeamStateKeys["DELETE_TOKEN_LINK"] = "DELETE_TOKEN_LINK";
16871
16879
  TeamStateKeys["CONFIG_TOKEN_LINK"] = "CONFIG_TOKEN_LINK";
16880
+ TeamStateKeys["CONFIG_TEMPORARY_USERS"] = "CONFIG_TEMPORARY_USERS";
16881
+ TeamStateKeys["UPDATE_USER_EXPIRATION_TIME"] = "UPDATE_USER_EXPIRATION_TIME";
16872
16882
  })(TeamStateKeys || (TeamStateKeys = {}));
16873
16883
 
16874
16884
  /***/ }),
@@ -16897,6 +16907,7 @@ __webpack_require__.r(__webpack_exports__);
16897
16907
  /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/v4.js");
16898
16908
  /* harmony import */ var _GroupsState_interfaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../GroupsState/interfaces */ "../../dist/@frontegg/redux-store/auth/GroupsState/interfaces.js");
16899
16909
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "../../dist/@frontegg/redux-store/utils/errorHandler.js");
16910
+ /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! date-fns */ "../../node_modules/date-fns/esm/addSeconds/index.js");
16900
16911
 
16901
16912
 
16902
16913
  const _excluded = ["callback"],
@@ -16912,13 +16923,18 @@ const _excluded = ["callback"],
16912
16923
  _excluded11 = ["callback"],
16913
16924
  _excluded12 = ["callback"],
16914
16925
  _excluded13 = ["callback"],
16915
- _excluded14 = ["callback", "profileImage"],
16926
+ _excluded14 = ["callback"],
16916
16927
  _excluded15 = ["callback"],
16917
- _excluded16 = ["callback"],
16928
+ _excluded16 = ["callback", "profileImage"],
16918
16929
  _excluded17 = ["callback"],
16919
16930
  _excluded18 = ["callback"],
16920
16931
  _excluded19 = ["callback"],
16921
- _excluded20 = ["callback"];
16932
+ _excluded20 = ["callback"],
16933
+ _excluded21 = ["callback"],
16934
+ _excluded22 = ["callback"],
16935
+ _excluded23 = ["callback"],
16936
+ _excluded24 = ["callback"];
16937
+
16922
16938
 
16923
16939
 
16924
16940
 
@@ -17246,9 +17262,11 @@ function* addUsersBulk({
17246
17262
  }));
17247
17263
  const allowedEmails = [];
17248
17264
  const unallowedEmails = [];
17249
- const bodies = payload.emails.map(email => ({
17265
+ const bodies = payload.emails.map(email => (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({
17250
17266
  email,
17251
17267
  roleIds: payload.roleIds
17268
+ }, payload.expirationInSeconds && {
17269
+ expirationInSeconds: payload.expirationInSeconds
17252
17270
  }));
17253
17271
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
17254
17272
  addUserDialogState: {
@@ -17638,6 +17656,93 @@ function* getInvitationLinkConfig() {
17638
17656
  }));
17639
17657
  }
17640
17658
  }
17659
+ function* getTemporaryUsersConfig() {
17660
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamError({
17661
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.CONFIG_TEMPORARY_USERS,
17662
+ value: false
17663
+ }));
17664
+ try {
17665
+ const temporaryUsersConfig = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.api.teams.getTemporaryUserConfiguration);
17666
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
17667
+ temporaryUsersConfig
17668
+ }));
17669
+ } catch (e) {
17670
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamError({
17671
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.CONFIG_TEMPORARY_USERS,
17672
+ value: (0,_utils__WEBPACK_IMPORTED_MODULE_8__.errorHandler)(e)
17673
+ }));
17674
+ }
17675
+ }
17676
+ function* updateUserExpirationTime({
17677
+ payload
17678
+ }) {
17679
+ const {
17680
+ callback
17681
+ } = payload,
17682
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded12);
17683
+ const teamState = yield selectTeamState();
17684
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
17685
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
17686
+ value: true
17687
+ }));
17688
+ try {
17689
+ const res = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.api.teams.updateUserExpirationTime, body);
17690
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
17691
+ users: teamState.users.map(user => {
17692
+ return user.id === body.userId ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, user, {
17693
+ temporaryExpirationDate: new Date(res.temporaryExpirationDate)
17694
+ }) : user;
17695
+ })
17696
+ }));
17697
+ callback == null ? void 0 : callback(true);
17698
+ } catch (e) {
17699
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamError({
17700
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
17701
+ value: (0,_utils__WEBPACK_IMPORTED_MODULE_8__.errorHandler)(e)
17702
+ }));
17703
+ callback == null ? void 0 : callback(null, e);
17704
+ } finally {
17705
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
17706
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
17707
+ value: false
17708
+ }));
17709
+ }
17710
+ }
17711
+ function* setUserAsPermanent({
17712
+ payload
17713
+ }) {
17714
+ const {
17715
+ callback
17716
+ } = payload,
17717
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded13);
17718
+ const teamState = yield selectTeamState();
17719
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
17720
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
17721
+ value: true
17722
+ }));
17723
+ try {
17724
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.api.teams.setPermanentUser, body.userId);
17725
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
17726
+ users: teamState.users.map(user => {
17727
+ return user.id === body.userId ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, user, {
17728
+ temporaryExpirationDate: undefined
17729
+ }) : user;
17730
+ })
17731
+ }));
17732
+ callback == null ? void 0 : callback(true);
17733
+ } catch (e) {
17734
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamError({
17735
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
17736
+ value: (0,_utils__WEBPACK_IMPORTED_MODULE_8__.errorHandler)(e)
17737
+ }));
17738
+ callback == null ? void 0 : callback(null, e);
17739
+ } finally {
17740
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
17741
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
17742
+ value: false
17743
+ }));
17744
+ }
17745
+ }
17641
17746
  function* getInvitationLink() {
17642
17747
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamError({
17643
17748
  key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.GET_TOKEN_LINK,
@@ -17816,6 +17921,9 @@ function* teamSagas() {
17816
17921
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.resendInvitationLink, resendInvitationLink);
17817
17922
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.resendInvitationEmail, resendInvitationEmail);
17818
17923
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.resendInvitationLinkToAllSubTenants, resendInvitationLinkToAllSubTenants);
17924
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.getTemporaryUsersConfig, getTemporaryUsersConfig);
17925
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.updateUserExpirationTime, updateUserExpirationTime);
17926
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setUserAsPermanent, setUserAsPermanent);
17819
17927
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.getInvitationLink, getInvitationLink);
17820
17928
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.createInvitationLink, createInvitationLink);
17821
17929
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.updateInvitationLink, updateInvitationLink);
@@ -17940,7 +18048,7 @@ function* addUserMock({
17940
18048
  const {
17941
18049
  callback
17942
18050
  } = payload,
17943
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded12);
18051
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded14);
17944
18052
  const teamState = yield selectTeamState();
17945
18053
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
17946
18054
  addUserDialogState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, teamState.addUserDialogState, {
@@ -17951,7 +18059,8 @@ function* addUserMock({
17951
18059
  const newUser = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, _dummy__WEBPACK_IMPORTED_MODULE_10__.userTeamDemo, {
17952
18060
  groups: []
17953
18061
  }, body, {
17954
- id: `${(0,uuid__WEBPACK_IMPORTED_MODULE_11__["default"])()}`
18062
+ id: `${(0,uuid__WEBPACK_IMPORTED_MODULE_11__["default"])()}`,
18063
+ temporaryExpirationDate: body.expirationInSeconds ? (0,date_fns__WEBPACK_IMPORTED_MODULE_12__["default"])(new Date(), body.expirationInSeconds) : undefined
17955
18064
  });
17956
18065
  callback == null ? void 0 : callback(newUser);
17957
18066
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
@@ -17968,7 +18077,7 @@ function* addUserToSubTenantsMock({
17968
18077
  const {
17969
18078
  callback
17970
18079
  } = payload,
17971
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded13);
18080
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded15);
17972
18081
  const teamState = yield selectTeamState();
17973
18082
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
17974
18083
  addUserDialogState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, teamState.addUserDialogState, {
@@ -17995,7 +18104,7 @@ function* updateUserMock({
17995
18104
  const {
17996
18105
  callback
17997
18106
  } = payload,
17998
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded14);
18107
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded16);
17999
18108
  const {
18000
18109
  id: userId
18001
18110
  } = body;
@@ -18045,7 +18154,7 @@ function* deleteUserMock({
18045
18154
  const {
18046
18155
  callback
18047
18156
  } = payload,
18048
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded15);
18157
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded17);
18049
18158
  const teamState = yield selectTeamState();
18050
18159
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
18051
18160
  deleteUserDialogState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, teamState.deleteUserDialogState, {
@@ -18068,7 +18177,7 @@ function* deleteUserFromSubTenantsMock({
18068
18177
  const {
18069
18178
  callback
18070
18179
  } = payload,
18071
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded16);
18180
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded18);
18072
18181
  const teamState = yield selectTeamState();
18073
18182
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
18074
18183
  deleteUserDialogState: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, teamState.deleteUserDialogState, {
@@ -18091,7 +18200,7 @@ function* resendActivationLinkMock({
18091
18200
  const {
18092
18201
  callback
18093
18202
  } = payload,
18094
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded17);
18203
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded19);
18095
18204
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18096
18205
  key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.RESEND_ACTIVATE_LINK,
18097
18206
  value: body.userId
@@ -18109,7 +18218,7 @@ function* resendInvitationLinkMock({
18109
18218
  const {
18110
18219
  callback
18111
18220
  } = payload,
18112
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded18);
18221
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded20);
18113
18222
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18114
18223
  key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.RESEND_INVITATION_LINK,
18115
18224
  value: body.email
@@ -18127,7 +18236,7 @@ function* resendInvitationEmailMock({
18127
18236
  const {
18128
18237
  callback
18129
18238
  } = payload,
18130
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded19);
18239
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded21);
18131
18240
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18132
18241
  key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.RESEND_INVITATION_LINK,
18133
18242
  value: body.email
@@ -18145,7 +18254,7 @@ function* resendInvitationLinkToAllSubTenantsMock({
18145
18254
  const {
18146
18255
  callback
18147
18256
  } = payload,
18148
- body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded20);
18257
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded22);
18149
18258
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18150
18259
  key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.RESEND_INVITATION_LINK,
18151
18260
  value: body.email
@@ -18157,6 +18266,58 @@ function* resendInvitationLinkToAllSubTenantsMock({
18157
18266
  value: false
18158
18267
  }));
18159
18268
  }
18269
+ function* updateUserExpirationTimeMock({
18270
+ payload
18271
+ }) {
18272
+ const {
18273
+ callback
18274
+ } = payload,
18275
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded23);
18276
+ const teamState = yield selectTeamState();
18277
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18278
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
18279
+ value: true
18280
+ }));
18281
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
18282
+ users: teamState.users.map(user => {
18283
+ return user.id === body.userId ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, user, {
18284
+ temporaryExpirationDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_12__["default"])(new Date(), payload.expirationInSeconds + 1)
18285
+ }) : user;
18286
+ })
18287
+ }));
18288
+ yield (0,_utils__WEBPACK_IMPORTED_MODULE_9__.delay)();
18289
+ callback == null ? void 0 : callback(true);
18290
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18291
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
18292
+ value: false
18293
+ }));
18294
+ }
18295
+ function* setUserAsPermanentMock({
18296
+ payload
18297
+ }) {
18298
+ const {
18299
+ callback
18300
+ } = payload,
18301
+ body = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded24);
18302
+ const teamState = yield selectTeamState();
18303
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18304
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
18305
+ value: true
18306
+ }));
18307
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
18308
+ users: teamState.users.map(user => {
18309
+ return user.id === body.userId ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, user, {
18310
+ temporaryExpirationDate: undefined
18311
+ }) : user;
18312
+ })
18313
+ }));
18314
+ yield (0,_utils__WEBPACK_IMPORTED_MODULE_9__.delay)();
18315
+ callback == null ? void 0 : callback(true);
18316
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamLoader({
18317
+ key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
18318
+ value: false
18319
+ }));
18320
+ }
18160
18321
  function* teamSagasMock() {
18161
18322
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeLatest)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.loadUsersV2, loadUsersMock);
18162
18323
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeLatest)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.loadAllSubTenantsUsers, loadAllSubTenantsUsersMock);
@@ -18165,6 +18326,8 @@ function* teamSagasMock() {
18165
18326
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.addUserToSubTenants, addUserToSubTenantsMock);
18166
18327
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.updateUser, updateUserMock);
18167
18328
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.deleteUser, deleteUserMock);
18329
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.updateUserExpirationTime, updateUserExpirationTimeMock);
18330
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setUserAsPermanent, setUserAsPermanentMock);
18168
18331
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.deleteUserFromSubTenants, deleteUserFromSubTenantsMock);
18169
18332
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.resendActivationLink, resendActivationLinkMock);
18170
18333
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.takeEvery)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.resendInvitationLink, resendInvitationLinkMock);
@@ -24406,7 +24569,7 @@ __webpack_require__.r(__webpack_exports__);
24406
24569
  /* harmony export */ });
24407
24570
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
24408
24571
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
24409
- /** @license Frontegg v6.163.0
24572
+ /** @license Frontegg v6.164.0-alpha.0
24410
24573
  *
24411
24574
  * This source code is licensed under the MIT license found in the
24412
24575
  * LICENSE file in the root directory of this source tree.
@@ -34941,6 +35104,208 @@ var createStructuredSelector = function createStructuredSelector(selectors, sele
34941
35104
 
34942
35105
  /***/ }),
34943
35106
 
35107
+ /***/ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js":
35108
+ /*!******************************************************************!*\
35109
+ !*** ../../node_modules/date-fns/esm/_lib/requiredArgs/index.js ***!
35110
+ \******************************************************************/
35111
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35112
+
35113
+ "use strict";
35114
+ __webpack_require__.r(__webpack_exports__);
35115
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35116
+ /* harmony export */ "default": () => (/* binding */ requiredArgs)
35117
+ /* harmony export */ });
35118
+ function requiredArgs(required, args) {
35119
+ if (args.length < required) {
35120
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
35121
+ }
35122
+ }
35123
+
35124
+ /***/ }),
35125
+
35126
+ /***/ "../../node_modules/date-fns/esm/_lib/toInteger/index.js":
35127
+ /*!***************************************************************!*\
35128
+ !*** ../../node_modules/date-fns/esm/_lib/toInteger/index.js ***!
35129
+ \***************************************************************/
35130
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35131
+
35132
+ "use strict";
35133
+ __webpack_require__.r(__webpack_exports__);
35134
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35135
+ /* harmony export */ "default": () => (/* binding */ toInteger)
35136
+ /* harmony export */ });
35137
+ function toInteger(dirtyNumber) {
35138
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
35139
+ return NaN;
35140
+ }
35141
+
35142
+ var number = Number(dirtyNumber);
35143
+
35144
+ if (isNaN(number)) {
35145
+ return number;
35146
+ }
35147
+
35148
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
35149
+ }
35150
+
35151
+ /***/ }),
35152
+
35153
+ /***/ "../../node_modules/date-fns/esm/addMilliseconds/index.js":
35154
+ /*!****************************************************************!*\
35155
+ !*** ../../node_modules/date-fns/esm/addMilliseconds/index.js ***!
35156
+ \****************************************************************/
35157
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35158
+
35159
+ "use strict";
35160
+ __webpack_require__.r(__webpack_exports__);
35161
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35162
+ /* harmony export */ "default": () => (/* binding */ addMilliseconds)
35163
+ /* harmony export */ });
35164
+ /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ "../../node_modules/date-fns/esm/_lib/toInteger/index.js");
35165
+ /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ "../../node_modules/date-fns/esm/toDate/index.js");
35166
+ /* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js");
35167
+
35168
+
35169
+
35170
+ /**
35171
+ * @name addMilliseconds
35172
+ * @category Millisecond Helpers
35173
+ * @summary Add the specified number of milliseconds to the given date.
35174
+ *
35175
+ * @description
35176
+ * Add the specified number of milliseconds to the given date.
35177
+ *
35178
+ * @param {Date|Number} date - the date to be changed
35179
+ * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
35180
+ * @returns {Date} the new date with the milliseconds added
35181
+ * @throws {TypeError} 2 arguments required
35182
+ *
35183
+ * @example
35184
+ * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
35185
+ * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
35186
+ * //=> Thu Jul 10 2014 12:45:30.750
35187
+ */
35188
+
35189
+ function addMilliseconds(dirtyDate, dirtyAmount) {
35190
+ (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(2, arguments);
35191
+ var timestamp = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate).getTime();
35192
+ var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(dirtyAmount);
35193
+ return new Date(timestamp + amount);
35194
+ }
35195
+
35196
+ /***/ }),
35197
+
35198
+ /***/ "../../node_modules/date-fns/esm/addSeconds/index.js":
35199
+ /*!***********************************************************!*\
35200
+ !*** ../../node_modules/date-fns/esm/addSeconds/index.js ***!
35201
+ \***********************************************************/
35202
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35203
+
35204
+ "use strict";
35205
+ __webpack_require__.r(__webpack_exports__);
35206
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35207
+ /* harmony export */ "default": () => (/* binding */ addSeconds)
35208
+ /* harmony export */ });
35209
+ /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ "../../node_modules/date-fns/esm/_lib/toInteger/index.js");
35210
+ /* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../addMilliseconds/index.js */ "../../node_modules/date-fns/esm/addMilliseconds/index.js");
35211
+ /* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js");
35212
+
35213
+
35214
+
35215
+ /**
35216
+ * @name addSeconds
35217
+ * @category Second Helpers
35218
+ * @summary Add the specified number of seconds to the given date.
35219
+ *
35220
+ * @description
35221
+ * Add the specified number of seconds to the given date.
35222
+ *
35223
+ * @param {Date|Number} date - the date to be changed
35224
+ * @param {Number} amount - the amount of seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
35225
+ * @returns {Date} the new date with the seconds added
35226
+ * @throws {TypeError} 2 arguments required
35227
+ *
35228
+ * @example
35229
+ * // Add 30 seconds to 10 July 2014 12:45:00:
35230
+ * const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
35231
+ * //=> Thu Jul 10 2014 12:45:30
35232
+ */
35233
+
35234
+ function addSeconds(dirtyDate, dirtyAmount) {
35235
+ (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(2, arguments);
35236
+ var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyAmount);
35237
+ return (0,_addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(dirtyDate, amount * 1000);
35238
+ }
35239
+
35240
+ /***/ }),
35241
+
35242
+ /***/ "../../node_modules/date-fns/esm/toDate/index.js":
35243
+ /*!*******************************************************!*\
35244
+ !*** ../../node_modules/date-fns/esm/toDate/index.js ***!
35245
+ \*******************************************************/
35246
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35247
+
35248
+ "use strict";
35249
+ __webpack_require__.r(__webpack_exports__);
35250
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35251
+ /* harmony export */ "default": () => (/* binding */ toDate)
35252
+ /* harmony export */ });
35253
+ /* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js");
35254
+
35255
+ /**
35256
+ * @name toDate
35257
+ * @category Common Helpers
35258
+ * @summary Convert the given argument to an instance of Date.
35259
+ *
35260
+ * @description
35261
+ * Convert the given argument to an instance of Date.
35262
+ *
35263
+ * If the argument is an instance of Date, the function returns its clone.
35264
+ *
35265
+ * If the argument is a number, it is treated as a timestamp.
35266
+ *
35267
+ * If the argument is none of the above, the function returns Invalid Date.
35268
+ *
35269
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
35270
+ *
35271
+ * @param {Date|Number} argument - the value to convert
35272
+ * @returns {Date} the parsed date in the local time zone
35273
+ * @throws {TypeError} 1 argument required
35274
+ *
35275
+ * @example
35276
+ * // Clone the date:
35277
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
35278
+ * //=> Tue Feb 11 2014 11:30:30
35279
+ *
35280
+ * @example
35281
+ * // Convert the timestamp to date:
35282
+ * const result = toDate(1392098430000)
35283
+ * //=> Tue Feb 11 2014 11:30:30
35284
+ */
35285
+
35286
+ function toDate(argument) {
35287
+ (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments);
35288
+ var argStr = Object.prototype.toString.call(argument); // Clone the date
35289
+
35290
+ if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
35291
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
35292
+ return new Date(argument.getTime());
35293
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
35294
+ return new Date(argument);
35295
+ } else {
35296
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
35297
+ // eslint-disable-next-line no-console
35298
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console
35299
+
35300
+ console.warn(new Error().stack);
35301
+ }
35302
+
35303
+ return new Date(NaN);
35304
+ }
35305
+ }
35306
+
35307
+ /***/ }),
35308
+
34944
35309
  /***/ "../../node_modules/deepmerge/dist/cjs.js":
34945
35310
  /*!************************************************!*\
34946
35311
  !*** ../../node_modules/deepmerge/dist/cjs.js ***!