@frontegg/redux-store 7.75.0-alpha.0 → 7.75.0-alpha.1

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.
@@ -7,12 +7,5 @@ declare const _default: (store: FronteggState, api: RestApi, sharedActions: Shar
7
7
  loadProfile: () => Promise<void>;
8
8
  saveProfile: (_payload: SaveProfilePayload) => Promise<void>;
9
9
  changePassword: (payload: WithCallback<IChangePassword>) => Promise<void>;
10
- updateEmail: (payload: WithCallback<{
11
- email: string;
12
- }, boolean>) => Promise<void>;
13
- verifyEmail: (payload: WithCallback<{
14
- email: string;
15
- code: string;
16
- }, boolean>) => Promise<void>;
17
10
  };
18
11
  export default _default;
@@ -30,61 +30,6 @@ export default ((store, api, sharedActions) => {
30
30
  });
31
31
  }
32
32
  };
33
- const updateEmail = async payload => {
34
- const {
35
- email,
36
- callback
37
- } = payload;
38
- setProfileState({
39
- saving: true,
40
- error: null,
41
- loading: true
42
- });
43
- try {
44
- await api.teams.updateEmail(email);
45
- setProfileState({
46
- saving: false,
47
- error: null,
48
- loading: false
49
- });
50
- callback == null ? void 0 : callback(true);
51
- } catch (e) {
52
- setProfileState({
53
- saving: false,
54
- error: errorHandler(e),
55
- loading: false
56
- });
57
- callback == null ? void 0 : callback(null, e);
58
- }
59
- };
60
- const verifyEmail = async payload => {
61
- const {
62
- email,
63
- code,
64
- callback
65
- } = payload;
66
- setProfileState({
67
- saving: true,
68
- error: null,
69
- loading: true
70
- });
71
- try {
72
- await api.teams.verifyEmail(email, code);
73
- setProfileState({
74
- saving: false,
75
- error: null,
76
- loading: false
77
- });
78
- callback == null ? void 0 : callback(true);
79
- } catch (e) {
80
- setProfileState({
81
- saving: false,
82
- error: errorHandler(e),
83
- loading: false
84
- });
85
- callback == null ? void 0 : callback(null, e);
86
- }
87
- };
88
33
  const saveProfile = async _payload => {
89
34
  const {
90
35
  callback,
@@ -162,8 +107,6 @@ export default ((store, api, sharedActions) => {
162
107
  resetProfileState,
163
108
  loadProfile,
164
109
  saveProfile,
165
- changePassword,
166
- updateEmail,
167
- verifyEmail
110
+ changePassword
168
111
  };
169
112
  });
package/auth/index.d.ts CHANGED
@@ -32,7 +32,6 @@ import { buildSSOActions } from './SSOState';
32
32
  import { buildStepUpActions } from './StepUpState';
33
33
  import { buildTeamActions } from './TeamState';
34
34
  import { buildTenantsActions } from './TenantsState';
35
- import { buildUserEmailPolicyActions } from './UsersEmailsPolicyState';
36
35
  import { buildEntitlementsActions } from './Entitlements';
37
36
  export * from './AcceptInvitationState/interfaces';
38
37
  export * from './AccountSettingsState/interfaces';
@@ -68,7 +67,6 @@ export * from './SSOState/interfaces';
68
67
  export * from './StepUpState/interfaces';
69
68
  export * from './TeamState/interfaces';
70
69
  export * from './TenantsState/interfaces';
71
- export * from './UsersEmailsPolicyState/interfaces';
72
70
  export * from './interfaces';
73
71
  export declare const createAuthState: (_overrideState?: DeepPartial<AuthState>) => AuthState;
74
72
  export declare const buildAuthActions: (store: FronteggState, api: RestApi, actions: FronteggActions, snapshotAuthState: AuthState) => [AuthActions, AuthStateActions];
@@ -106,7 +104,6 @@ export type SSOActions = ReturnType<typeof buildSSOActions>;
106
104
  export type StepUpActions = ReturnType<typeof buildStepUpActions>;
107
105
  export type TeamActions = ReturnType<typeof buildTeamActions>;
108
106
  export type TenantsActions = ReturnType<typeof buildTenantsActions>;
109
- export type UsersEmailPolicyActions = ReturnType<typeof buildUserEmailPolicyActions>;
110
107
  export type AuthStateActions = {
111
108
  acceptInvitationActions: AcceptInvitationActions;
112
109
  accountSettingsActions: AccountSettingsActions;
@@ -142,7 +139,6 @@ export type AuthStateActions = {
142
139
  stepUpActions: StepUpActions;
143
140
  teamActions: TeamActions;
144
141
  tenantsActions: TenantsActions;
145
- usersEmailsPolicyActions: UsersEmailPolicyActions;
146
142
  };
147
143
  export type AuthActions = {
148
144
  /** @deprecated use setAuthState instead */
@@ -151,4 +147,4 @@ export type AuthActions = {
151
147
  setErrorByRequestName: (payload: SingleErrorByRequestDataPayload) => void;
152
148
  resetAuthState: (state?: Partial<AuthState>) => void;
153
149
  setUser: (user: User | null) => void;
154
- } & AcceptInvitationActions & AccountSettingsActions & UnlockAccountActions & ActivateAccountActions & ApiTokensActions & ApplicationsActions & CustomLoginActions & EntitlementsActions & ForgotPasswordActions & PasswordRotationActions & GroupsActions & GroupsDialogsActions & ImpersonateActions & LoginActions & MfaActions & AllAccountsActions & AllAccountsDialogActions & PasskeysActions & ProfileActions & ProvisioningActions & ResetPhoneNumberActions & RolesActions & RestrictionsActions & SecurityCenterActions & SecurityPolicyActions & SessionsPolicyActions & SessionsActions & SignUpActions & SmsActions & SocialLoginActions & SSOActions & StepUpActions & TeamActions & TenantsActions & UsersEmailPolicyActions;
150
+ } & AcceptInvitationActions & AccountSettingsActions & UnlockAccountActions & ActivateAccountActions & ApiTokensActions & ApplicationsActions & CustomLoginActions & EntitlementsActions & ForgotPasswordActions & PasswordRotationActions & GroupsActions & GroupsDialogsActions & ImpersonateActions & LoginActions & MfaActions & AllAccountsActions & AllAccountsDialogActions & PasskeysActions & ProfileActions & ProvisioningActions & ResetPhoneNumberActions & RolesActions & RestrictionsActions & SecurityCenterActions & SecurityPolicyActions & SessionsPolicyActions & SessionsActions & SignUpActions & SmsActions & SocialLoginActions & SSOActions & StepUpActions & TeamActions & TenantsActions;
package/auth/index.js CHANGED
@@ -34,7 +34,6 @@ import { buildSSOActions, createSSOState } from './SSOState';
34
34
  import { buildStepUpActions, createStepUpState } from './StepUpState';
35
35
  import { buildTeamActions, createTeamState } from './TeamState';
36
36
  import { buildTenantsActions, createTenantsState } from './TenantsState';
37
- import { buildUserEmailPolicyActions, createUserEmailPolicyState } from './UsersEmailsPolicyState';
38
37
  import { defaultFronteggRoutes } from './LoginState/consts';
39
38
  import { deepResetState, isProxy } from '../helpers';
40
39
  import { buildEntitlementsActions } from './Entitlements';
@@ -73,7 +72,6 @@ export * from './SSOState/interfaces';
73
72
  export * from './StepUpState/interfaces';
74
73
  export * from './TeamState/interfaces';
75
74
  export * from './TenantsState/interfaces';
76
- export * from './UsersEmailsPolicyState/interfaces';
77
75
  export * from './interfaces';
78
76
  export const createAuthState = _overrideState => {
79
77
  const _ref = _overrideState != null ? _overrideState : {},
@@ -128,8 +126,7 @@ export const createAuthState = _overrideState => {
128
126
  ssoState: createSSOState(overrideState == null ? void 0 : overrideState.ssoState),
129
127
  stepUpState: createStepUpState(overrideState == null ? void 0 : overrideState.stepUpState),
130
128
  teamState: createTeamState(overrideState == null ? void 0 : overrideState.teamState),
131
- tenantsState: createTenantsState(overrideState == null ? void 0 : overrideState.tenantsState),
132
- userEmailPolicyState: createUserEmailPolicyState(overrideState == null ? void 0 : overrideState.userEmailPolicyState)
129
+ tenantsState: createTenantsState(overrideState == null ? void 0 : overrideState.tenantsState)
133
130
  }));
134
131
  };
135
132
  export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
@@ -196,7 +193,6 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
196
193
  const stepUpActions = buildStepUpActions(store, api, actions);
197
194
  const teamActions = buildTeamActions(store, api, actions);
198
195
  const tenantsActions = buildTenantsActions(store, api, actions);
199
- const usersEmailsPolicyActions = buildUserEmailPolicyActions(store, api, actions);
200
196
  const stateActions = {
201
197
  acceptInvitationActions,
202
198
  accountSettingsActions,
@@ -231,8 +227,7 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
231
227
  ssoActions,
232
228
  stepUpActions,
233
229
  teamActions,
234
- tenantsActions,
235
- usersEmailsPolicyActions
230
+ tenantsActions
236
231
  };
237
232
  return [_extends({
238
233
  setAuthState,
@@ -31,7 +31,6 @@ import type { IAllAccountsDialogsState, IAllAccountsState } from './MSP/interfac
31
31
  import { ApplicationsState } from './ApplicationsState/interfaces';
32
32
  import { UnlockAccountState } from './UnlockAccountState/interfaces';
33
33
  import { PasswordRotationState } from '../toolkit';
34
- import { UserEmailPolicyState } from './UsersEmailsPolicyState/interfaces';
35
34
  export declare enum REQUEST_NAME {
36
35
  LOAD_FEATURE_FLAGS = "LOAD_FEATURE_FLAGS,",
37
36
  LOAD_ADMIN_BOX_METADATA = "LOAD_ADMIN_BOX_METADATA,",
@@ -108,7 +107,6 @@ export interface AuthState extends Routes, PluginOptions {
108
107
  teamState: TeamState;
109
108
  tenantsState: TenantsState;
110
109
  applicationsState: ApplicationsState;
111
- userEmailPolicyState: UserEmailPolicyState;
112
110
  }
113
111
  interface Actor {
114
112
  sub?: string;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.75.0-alpha.0
1
+ /** @license Frontegg v7.75.0-alpha.1
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.
@@ -37,7 +37,6 @@ import buildStepUpActions from './stepUpActions.mocks';
37
37
  import buildTeamActions from './teamActions.mocks';
38
38
  import buildTenantsActions from './tenantsActions.mocks';
39
39
  import buildUnlockAccountActions from './unlockAccountActions.mocks';
40
- import buildUserEmailPolicyActions from './usersEmailsPolicyActions.mocks';
41
40
  import { deepResetState, isProxy } from '../../helpers';
42
41
  export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
43
42
  const acceptInvitationActions = buildAcceptInvitationActions(store, api, actions);
@@ -74,7 +73,6 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
74
73
  const stepUpActions = buildStepUpActions(store, api, actions);
75
74
  const teamActions = buildTeamActions(store, api, actions);
76
75
  const tenantsActions = buildTenantsActions(store, api, actions);
77
- const usersEmailsPolicyActions = buildUserEmailPolicyActions(store, api, actions);
78
76
  const authStateActions = {
79
77
  acceptInvitationActions,
80
78
  accountSettingsActions,
@@ -109,8 +107,7 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
109
107
  ssoActions,
110
108
  stepUpActions,
111
109
  teamActions,
112
- tenantsActions,
113
- usersEmailsPolicyActions
110
+ tenantsActions
114
111
  };
115
112
  const setAuthState = state => {
116
113
  Object.keys(state).forEach(key => {
@@ -148,7 +145,7 @@ export const buildAuthActions = (store, api, actions, snapshotAuthState) => {
148
145
  setErrorByRequestName,
149
146
  resetAuthState,
150
147
  setUser
151
- }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, passwordRotationActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions, usersEmailsPolicyActions);
148
+ }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, passwordRotationActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions);
152
149
  return {
153
150
  authActions,
154
151
  authStateActions
@@ -7,12 +7,5 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
7
7
  loadProfile: () => Promise<void>;
8
8
  saveProfile: (_payload: SaveProfilePayload) => Promise<void>;
9
9
  changePassword: (payload: WithCallback<IChangePassword>) => Promise<void>;
10
- updateEmail: (payload: WithCallback<{
11
- email: string;
12
- }, boolean>) => Promise<void>;
13
- verifyEmail: (payload: WithCallback<{
14
- email: string;
15
- code: string;
16
- }, boolean>) => Promise<void>;
17
10
  };
18
11
  export default _default;
@@ -63,35 +63,5 @@ export default ((store, api, actions) => {
63
63
  });
64
64
  (_payload$callback = payload.callback) == null ? void 0 : _payload$callback.call(payload, true);
65
65
  };
66
- mockedActions.updateEmail = async payload => {
67
- var _payload$callback2;
68
- mockedActions.setProfileState({
69
- saving: true,
70
- error: null,
71
- loading: true
72
- });
73
- await delay();
74
- mockedActions.setProfileState({
75
- saving: false,
76
- error: null,
77
- loading: false
78
- });
79
- (_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, true);
80
- };
81
- mockedActions.verifyEmail = async payload => {
82
- var _payload$callback3;
83
- mockedActions.setProfileState({
84
- saving: true,
85
- error: null,
86
- loading: true
87
- });
88
- await delay();
89
- mockedActions.setProfileState({
90
- saving: false,
91
- error: null,
92
- loading: false
93
- });
94
- (_payload$callback3 = payload.callback) == null ? void 0 : _payload$callback3.call(payload, true);
95
- };
96
66
  return mockedActions;
97
67
  });
@@ -37,61 +37,6 @@ var _default = (store, api, sharedActions) => {
37
37
  });
38
38
  }
39
39
  };
40
- const updateEmail = async payload => {
41
- const {
42
- email,
43
- callback
44
- } = payload;
45
- setProfileState({
46
- saving: true,
47
- error: null,
48
- loading: true
49
- });
50
- try {
51
- await api.teams.updateEmail(email);
52
- setProfileState({
53
- saving: false,
54
- error: null,
55
- loading: false
56
- });
57
- callback == null ? void 0 : callback(true);
58
- } catch (e) {
59
- setProfileState({
60
- saving: false,
61
- error: (0, _helpers.errorHandler)(e),
62
- loading: false
63
- });
64
- callback == null ? void 0 : callback(null, e);
65
- }
66
- };
67
- const verifyEmail = async payload => {
68
- const {
69
- email,
70
- code,
71
- callback
72
- } = payload;
73
- setProfileState({
74
- saving: true,
75
- error: null,
76
- loading: true
77
- });
78
- try {
79
- await api.teams.verifyEmail(email, code);
80
- setProfileState({
81
- saving: false,
82
- error: null,
83
- loading: false
84
- });
85
- callback == null ? void 0 : callback(true);
86
- } catch (e) {
87
- setProfileState({
88
- saving: false,
89
- error: (0, _helpers.errorHandler)(e),
90
- loading: false
91
- });
92
- callback == null ? void 0 : callback(null, e);
93
- }
94
- };
95
40
  const saveProfile = async _payload => {
96
41
  const {
97
42
  callback,
@@ -169,9 +114,7 @@ var _default = (store, api, sharedActions) => {
169
114
  resetProfileState,
170
115
  loadProfile,
171
116
  saveProfile,
172
- changePassword,
173
- updateEmail,
174
- verifyEmail
117
+ changePassword
175
118
  };
176
119
  };
177
120
  exports.default = _default;
@@ -43,7 +43,6 @@ var _SSOState = require("./SSOState");
43
43
  var _StepUpState = require("./StepUpState");
44
44
  var _TeamState = require("./TeamState");
45
45
  var _TenantsState = require("./TenantsState");
46
- var _UsersEmailsPolicyState = require("./UsersEmailsPolicyState");
47
46
  var _consts = require("./LoginState/consts");
48
47
  var _helpers = require("../helpers");
49
48
  var _Entitlements = require("./Entitlements");
@@ -456,7 +455,7 @@ Object.keys(_interfaces33).forEach(function (key) {
456
455
  }
457
456
  });
458
457
  });
459
- var _interfaces34 = require("./UsersEmailsPolicyState/interfaces");
458
+ var _interfaces34 = require("./interfaces");
460
459
  Object.keys(_interfaces34).forEach(function (key) {
461
460
  if (key === "default" || key === "__esModule") return;
462
461
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -468,18 +467,6 @@ Object.keys(_interfaces34).forEach(function (key) {
468
467
  }
469
468
  });
470
469
  });
471
- var _interfaces35 = require("./interfaces");
472
- Object.keys(_interfaces35).forEach(function (key) {
473
- if (key === "default" || key === "__esModule") return;
474
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
475
- if (key in exports && exports[key] === _interfaces35[key]) return;
476
- Object.defineProperty(exports, key, {
477
- enumerable: true,
478
- get: function () {
479
- return _interfaces35[key];
480
- }
481
- });
482
- });
483
470
  const _excluded = ["routes"],
484
471
  _excluded2 = ["requestName"];
485
472
  const createAuthState = _overrideState => {
@@ -535,8 +522,7 @@ const createAuthState = _overrideState => {
535
522
  ssoState: (0, _SSOState.createSSOState)(overrideState == null ? void 0 : overrideState.ssoState),
536
523
  stepUpState: (0, _StepUpState.createStepUpState)(overrideState == null ? void 0 : overrideState.stepUpState),
537
524
  teamState: (0, _TeamState.createTeamState)(overrideState == null ? void 0 : overrideState.teamState),
538
- tenantsState: (0, _TenantsState.createTenantsState)(overrideState == null ? void 0 : overrideState.tenantsState),
539
- userEmailPolicyState: (0, _UsersEmailsPolicyState.createUserEmailPolicyState)(overrideState == null ? void 0 : overrideState.userEmailPolicyState)
525
+ tenantsState: (0, _TenantsState.createTenantsState)(overrideState == null ? void 0 : overrideState.tenantsState)
540
526
  }));
541
527
  };
542
528
  exports.createAuthState = createAuthState;
@@ -604,7 +590,6 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
604
590
  const stepUpActions = (0, _StepUpState.buildStepUpActions)(store, api, actions);
605
591
  const teamActions = (0, _TeamState.buildTeamActions)(store, api, actions);
606
592
  const tenantsActions = (0, _TenantsState.buildTenantsActions)(store, api, actions);
607
- const usersEmailsPolicyActions = (0, _UsersEmailsPolicyState.buildUserEmailPolicyActions)(store, api, actions);
608
593
  const stateActions = {
609
594
  acceptInvitationActions,
610
595
  accountSettingsActions,
@@ -639,8 +624,7 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
639
624
  ssoActions,
640
625
  stepUpActions,
641
626
  teamActions,
642
- tenantsActions,
643
- usersEmailsPolicyActions
627
+ tenantsActions
644
628
  };
645
629
  return [(0, _extends2.default)({
646
630
  setAuthState,
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.75.0-alpha.0
1
+ /** @license Frontegg v7.75.0-alpha.1
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.
@@ -41,7 +41,6 @@ var _stepUpActions = _interopRequireDefault(require("./stepUpActions.mocks"));
41
41
  var _teamActions = _interopRequireDefault(require("./teamActions.mocks"));
42
42
  var _tenantsActions = _interopRequireDefault(require("./tenantsActions.mocks"));
43
43
  var _unlockAccountActions = _interopRequireDefault(require("./unlockAccountActions.mocks"));
44
- var _usersEmailsPolicyActions = _interopRequireDefault(require("./usersEmailsPolicyActions.mocks"));
45
44
  var _helpers = require("../../helpers");
46
45
  const _excluded = ["requestName"];
47
46
  const buildAuthActions = (store, api, actions, snapshotAuthState) => {
@@ -79,7 +78,6 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
79
78
  const stepUpActions = (0, _stepUpActions.default)(store, api, actions);
80
79
  const teamActions = (0, _teamActions.default)(store, api, actions);
81
80
  const tenantsActions = (0, _tenantsActions.default)(store, api, actions);
82
- const usersEmailsPolicyActions = (0, _usersEmailsPolicyActions.default)(store, api, actions);
83
81
  const authStateActions = {
84
82
  acceptInvitationActions,
85
83
  accountSettingsActions,
@@ -114,8 +112,7 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
114
112
  ssoActions,
115
113
  stepUpActions,
116
114
  teamActions,
117
- tenantsActions,
118
- usersEmailsPolicyActions
115
+ tenantsActions
119
116
  };
120
117
  const setAuthState = state => {
121
118
  Object.keys(state).forEach(key => {
@@ -153,7 +150,7 @@ const buildAuthActions = (store, api, actions, snapshotAuthState) => {
153
150
  setErrorByRequestName,
154
151
  resetAuthState,
155
152
  setUser
156
- }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, passwordRotationActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions, usersEmailsPolicyActions);
153
+ }, acceptInvitationActions, accountSettingsActions, activateAccountActions, unlockAccountActions, allAccountsActions, allAccountsDialogActions, apiTokensActions, applicationsActions, customLoginActions, entitlementsActions, forgotPasswordActions, passwordRotationActions, groupsActions, groupsDialogsActions, impersonateActions, loginActions, mfaActions, passkeysActions, profileActions, provisioningActions, resetPhoneNumberActions, restrictionsActions, rolesActions, securityCenterActions, securityPolicyActions, sessionsActions, sessionsPolicyActions, signUpActions, smsActions, socialLoginActions, ssoActions, stepUpActions, teamActions, tenantsActions);
157
154
  return {
158
155
  authActions,
159
156
  authStateActions
@@ -70,36 +70,6 @@ var _default = (store, api, actions) => {
70
70
  });
71
71
  (_payload$callback = payload.callback) == null ? void 0 : _payload$callback.call(payload, true);
72
72
  };
73
- mockedActions.updateEmail = async payload => {
74
- var _payload$callback2;
75
- mockedActions.setProfileState({
76
- saving: true,
77
- error: null,
78
- loading: true
79
- });
80
- await (0, _helpers.delay)();
81
- mockedActions.setProfileState({
82
- saving: false,
83
- error: null,
84
- loading: false
85
- });
86
- (_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, true);
87
- };
88
- mockedActions.verifyEmail = async payload => {
89
- var _payload$callback3;
90
- mockedActions.setProfileState({
91
- saving: true,
92
- error: null,
93
- loading: true
94
- });
95
- await (0, _helpers.delay)();
96
- mockedActions.setProfileState({
97
- saving: false,
98
- error: null,
99
- loading: false
100
- });
101
- (_payload$callback3 = payload.callback) == null ? void 0 : _payload$callback3.call(payload, true);
102
- };
103
73
  return mockedActions;
104
74
  };
105
75
  exports.default = _default;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "7.75.0-alpha.0",
3
+ "version": "7.75.0-alpha.1",
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
9
  "@frontegg/entitlements-javascript-commons": "1.1.2",
10
- "@frontegg/rest-api": "7.75.0-alpha.0",
10
+ "@frontegg/rest-api": "7.75.0-alpha.1",
11
11
  "fast-deep-equal": "3.1.3",
12
12
  "get-value": "^3.0.1",
13
13
  "proxy-compare": "^3.0.0",
@@ -1,5 +0,0 @@
1
- import type { FronteggState, RestApi, SharedActions } from '../../interfaces';
2
- declare const _default: (store: FronteggState, api: RestApi, sharedActions: SharedActions) => {
3
- loadUserEmailPolicyState: () => Promise<void>;
4
- };
5
- export default _default;
@@ -1,26 +0,0 @@
1
- import { errorHandler } from '../../helpers';
2
- export default ((store, api, sharedActions) => {
3
- const setUserEmailPolicyState = payload => {
4
- Object.assign(store.auth.userEmailPolicyState, payload);
5
- };
6
- const loadUserEmailPolicyState = async () => {
7
- setUserEmailPolicyState({
8
- loading: true
9
- });
10
- try {
11
- const userEmailPolicyConfig = await api.userEmailPolicy.getUserEmailPolicyConfig();
12
- setUserEmailPolicyState({
13
- loading: false,
14
- userEmailPolicyConfig
15
- });
16
- } catch (e) {
17
- setUserEmailPolicyState({
18
- loading: false,
19
- error: errorHandler(e)
20
- });
21
- }
22
- };
23
- return {
24
- loadUserEmailPolicyState
25
- };
26
- });
@@ -1,3 +0,0 @@
1
- import createUserEmailPolicyState from './state';
2
- import buildUserEmailPolicyActions from './actions';
3
- export { createUserEmailPolicyState, buildUserEmailPolicyActions };
@@ -1,3 +0,0 @@
1
- import createUserEmailPolicyState from './state';
2
- import buildUserEmailPolicyActions from './actions';
3
- export { createUserEmailPolicyState, buildUserEmailPolicyActions };
@@ -1,8 +0,0 @@
1
- export interface UserEmailPolicyConfig {
2
- allowEmailChange: boolean;
3
- }
4
- export interface UserEmailPolicyState {
5
- userEmailPolicyConfig: Partial<UserEmailPolicyConfig> | null;
6
- loading: boolean;
7
- error?: any;
8
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { UserEmailPolicyState } from './interfaces';
2
- export declare const initialState: UserEmailPolicyState;
3
- declare const _default: (overrideState?: Partial<UserEmailPolicyState>) => UserEmailPolicyState;
4
- export default _default;
@@ -1,6 +0,0 @@
1
- import { createProxy } from '../../toolkit/proxy';
2
- export const initialState = {
3
- userEmailPolicyConfig: null,
4
- loading: false
5
- };
6
- export default (overrideState => createProxy(initialState, overrideState));
@@ -1,5 +0,0 @@
1
- import { FronteggState, RestApi, SharedActions } from '../../interfaces';
2
- declare const _default: (store: FronteggState, api: RestApi, sharedActions: SharedActions) => {
3
- loadUserEmailPolicyState: () => Promise<void>;
4
- };
5
- export default _default;
@@ -1,6 +0,0 @@
1
- import { buildUserEmailPolicyActions } from '../../auth/UsersEmailsPolicyState';
2
- import { mockActionsExpect } from '../helpers';
3
- export default ((store, api, sharedActions) => {
4
- const originalActions = buildUserEmailPolicyActions(store, api, sharedActions);
5
- return mockActionsExpect(originalActions, ['loadUserEmailPolicyState']);
6
- });
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _helpers = require("../../helpers");
8
- var _default = (store, api, sharedActions) => {
9
- const setUserEmailPolicyState = payload => {
10
- Object.assign(store.auth.userEmailPolicyState, payload);
11
- };
12
- const loadUserEmailPolicyState = async () => {
13
- setUserEmailPolicyState({
14
- loading: true
15
- });
16
- try {
17
- const userEmailPolicyConfig = await api.userEmailPolicy.getUserEmailPolicyConfig();
18
- setUserEmailPolicyState({
19
- loading: false,
20
- userEmailPolicyConfig
21
- });
22
- } catch (e) {
23
- setUserEmailPolicyState({
24
- loading: false,
25
- error: (0, _helpers.errorHandler)(e)
26
- });
27
- }
28
- };
29
- return {
30
- loadUserEmailPolicyState
31
- };
32
- };
33
- exports.default = _default;
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "buildUserEmailPolicyActions", {
8
- enumerable: true,
9
- get: function () {
10
- return _actions.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "createUserEmailPolicyState", {
14
- enumerable: true,
15
- get: function () {
16
- return _state.default;
17
- }
18
- });
19
- var _state = _interopRequireDefault(require("./state"));
20
- var _actions = _interopRequireDefault(require("./actions"));
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.initialState = exports.default = void 0;
7
- var _proxy = require("../../toolkit/proxy");
8
- const initialState = {
9
- userEmailPolicyConfig: null,
10
- loading: false
11
- };
12
- exports.initialState = initialState;
13
- var _default = overrideState => (0, _proxy.createProxy)(initialState, overrideState);
14
- exports.default = _default;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _UsersEmailsPolicyState = require("../../auth/UsersEmailsPolicyState");
8
- var _helpers = require("../helpers");
9
- var _default = (store, api, sharedActions) => {
10
- const originalActions = (0, _UsersEmailsPolicyState.buildUserEmailPolicyActions)(store, api, sharedActions);
11
- return (0, _helpers.mockActionsExpect)(originalActions, ['loadUserEmailPolicyState']);
12
- };
13
- exports.default = _default;