@frontegg/redux-store 6.129.0-alpha.2 → 6.129.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.
Files changed (65) hide show
  1. package/auth/ActivateState/index.d.ts +12 -0
  2. package/auth/ApiTokensState/index.d.ts +8 -0
  3. package/auth/LoginState/saga.js +1 -1
  4. package/auth/SSOState/saga.v2.js +4 -9
  5. package/auth/Security/RestrictionsState/index.d.ts +214 -0
  6. package/auth/{RestrictionsState → Security/RestrictionsState}/index.js +2 -2
  7. package/auth/{RestrictionsState → Security/RestrictionsState}/interfaces.d.ts +1 -1
  8. package/auth/{RestrictionsState → Security/RestrictionsState}/saga.js +5 -5
  9. package/auth/Security/SecurityCenterState/index.d.ts +141 -0
  10. package/auth/{SecurityCenterState → Security/SecurityCenterState}/index.js +2 -2
  11. package/auth/{SecurityCenterState → Security/SecurityCenterState}/interfaces.d.ts +1 -1
  12. package/auth/{SecurityCenterState → Security/SecurityCenterState}/saga.js +4 -4
  13. package/auth/Security/SecurityPolicyState/index.d.ts +802 -0
  14. package/auth/{SecurityPolicyState → Security/SecurityPolicyState}/index.js +2 -2
  15. package/auth/{SecurityPolicyState → Security/SecurityPolicyState}/interfaces.d.ts +1 -1
  16. package/auth/{SecurityPolicyState → Security/SecurityPolicyState}/saga.d.ts +9 -9
  17. package/auth/{SecurityPolicyState → Security/SecurityPolicyState}/saga.js +5 -5
  18. package/auth/Security/SessionsPolicyState/index.d.ts +120 -0
  19. package/auth/{SessionsPolicyState → Security/SessionsPolicyState}/index.js +2 -2
  20. package/auth/{SessionsPolicyState → Security/SessionsPolicyState}/saga.js +2 -2
  21. package/auth/SignUp/saga.js +1 -1
  22. package/auth/index.d.ts +17 -17
  23. package/auth/index.js +9 -9
  24. package/auth/initialState.js +4 -4
  25. package/auth/interfaces.d.ts +4 -4
  26. package/auth/reducer.d.ts +3 -3
  27. package/auth/reducer.js +4 -4
  28. package/auth/saga.js +4 -4
  29. package/index.js +1 -1
  30. package/node/auth/LoginState/saga.js +1 -1
  31. package/node/auth/SSOState/saga.v2.js +3 -8
  32. package/node/auth/{RestrictionsState → Security/RestrictionsState}/index.js +2 -2
  33. package/node/auth/{RestrictionsState → Security/RestrictionsState}/saga.js +5 -5
  34. package/node/auth/{SecurityCenterState → Security/SecurityCenterState}/index.js +2 -2
  35. package/node/auth/{SecurityCenterState → Security/SecurityCenterState}/saga.js +4 -4
  36. package/node/auth/{SecurityPolicyState → Security/SecurityPolicyState}/index.js +2 -2
  37. package/node/auth/{SecurityPolicyState → Security/SecurityPolicyState}/saga.js +5 -5
  38. package/node/auth/{SessionsPolicyState → Security/SessionsPolicyState}/index.js +2 -2
  39. package/node/auth/{SessionsPolicyState → Security/SessionsPolicyState}/saga.js +2 -2
  40. package/node/auth/SignUp/saga.js +1 -1
  41. package/node/auth/index.js +9 -9
  42. package/node/auth/initialState.js +4 -4
  43. package/node/auth/reducer.js +4 -4
  44. package/node/auth/saga.js +4 -4
  45. package/node/index.js +1 -1
  46. package/package.json +2 -2
  47. package/auth/RestrictionsState/index.d.ts +0 -226
  48. package/auth/SecurityCenterState/index.d.ts +0 -141
  49. package/auth/SecurityPolicyState/index.d.ts +0 -802
  50. package/auth/SessionsPolicyState/index.d.ts +0 -120
  51. /package/auth/{RestrictionsState → Security/RestrictionsState}/interfaces.js +0 -0
  52. /package/auth/{RestrictionsState → Security/RestrictionsState}/saga.d.ts +0 -0
  53. /package/auth/{SecurityCenterState → Security/SecurityCenterState}/interfaces.js +0 -0
  54. /package/auth/{SecurityCenterState → Security/SecurityCenterState}/saga.d.ts +0 -0
  55. /package/auth/{SecurityCenterState → Security/SecurityCenterState}/types.d.ts +0 -0
  56. /package/auth/{SecurityCenterState → Security/SecurityCenterState}/types.js +0 -0
  57. /package/auth/{SecurityPolicyState → Security/SecurityPolicyState}/interfaces.js +0 -0
  58. /package/auth/{SessionsPolicyState → Security/SessionsPolicyState}/interfaces.d.ts +0 -0
  59. /package/auth/{SessionsPolicyState → Security/SessionsPolicyState}/interfaces.js +0 -0
  60. /package/auth/{SessionsPolicyState → Security/SessionsPolicyState}/saga.d.ts +0 -0
  61. /package/node/auth/{RestrictionsState → Security/RestrictionsState}/interfaces.js +0 -0
  62. /package/node/auth/{SecurityCenterState → Security/SecurityCenterState}/interfaces.js +0 -0
  63. /package/node/auth/{SecurityCenterState → Security/SecurityCenterState}/types.js +0 -0
  64. /package/node/auth/{SecurityPolicyState → Security/SecurityPolicyState}/interfaces.js +0 -0
  65. /package/node/auth/{SessionsPolicyState → Security/SessionsPolicyState}/interfaces.js +0 -0
@@ -12,6 +12,10 @@ declare const reducers: {
12
12
  type: string;
13
13
  }) => {
14
14
  onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
15
+ /**
16
+ * if you see error in matcher that's mean the DispatchAction does not
17
+ * contains the same functions in reducers and actions
18
+ */
15
19
  error?: any;
16
20
  isAuthenticated: boolean;
17
21
  userIp?: string | undefined;
@@ -58,6 +62,10 @@ declare const reducers: {
58
62
  };
59
63
  resetActivateState: (state: import("..").AuthState) => {
60
64
  onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
65
+ /**
66
+ * if you see error in matcher that's mean the DispatchAction does not
67
+ * contains the same functions in reducers and actions
68
+ */
61
69
  error?: any;
62
70
  isAuthenticated: boolean;
63
71
  userIp?: string | undefined;
@@ -110,6 +118,10 @@ declare const reducers: {
110
118
  type: string;
111
119
  }) => {
112
120
  onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
121
+ /**
122
+ * if you see error in matcher that's mean the DispatchAction does not
123
+ * contains the same functions in reducers and actions
124
+ */
113
125
  error?: any;
114
126
  isAuthenticated: boolean;
115
127
  userIp?: string | undefined;
@@ -49,6 +49,10 @@ declare const reducers: {
49
49
  teamState: import("..").TeamState;
50
50
  groupsState: import("..").GroupsState;
51
51
  groupsDialogsState: import("..").GroupsDialogsState;
52
+ /**
53
+ * if you see error in matcher that's mean the DispatchAction does not
54
+ * contains the same functions in reducers and actions
55
+ */
52
56
  socialLoginState: import("..").SocialLoginState;
53
57
  signUpState: import("..").SignUpState;
54
58
  apiTokensState: ApiTokensState;
@@ -95,6 +99,10 @@ declare const reducers: {
95
99
  teamState: import("..").TeamState;
96
100
  groupsState: import("..").GroupsState;
97
101
  groupsDialogsState: import("..").GroupsDialogsState;
102
+ /**
103
+ * if you see error in matcher that's mean the DispatchAction does not
104
+ * contains the same functions in reducers and actions
105
+ */
98
106
  socialLoginState: import("..").SocialLoginState;
99
107
  signUpState: import("..").SignUpState;
100
108
  apiTokensState: ApiTokensState;
@@ -35,7 +35,7 @@ import { loadVendorPublicInfo } from '../../vendor/saga';
35
35
  import { createRandomString, generateCodeChallenge, getFeatureFlags } from '../../helpers';
36
36
  import { ResetPhoneNumberStep } from '../ResetPhoneNumberState/interfaces';
37
37
  import { base64urlDecode, delay, publicKeyCredentialToJSON } from '../utils';
38
- import { loadPublicAuthStrategiesPolicy } from '../SecurityPolicyState/saga';
38
+ import { loadPublicAuthStrategiesPolicy } from '../Security/SecurityPolicyState/saga';
39
39
  import { getPasskeysVendorPolicy } from '../PasskeysState/helpers';
40
40
  import { getPathAndSearchParamsFromUrl, getRedirectUrl, getSearchParam, TENANT_ID_PARAM_KEY, getMfaStepForEnrolledUsers, getMfaStepForNotEnrolledUsers, isMfaRequired, isOauthCallbackRoute } from './utils';
41
41
  import { errorHandler } from '../../utils';
@@ -5,7 +5,7 @@ const _excluded = ["callback"],
5
5
  _excluded3 = ["callback", "ssoConfigId"],
6
6
  _excluded4 = ["callback", "ssoConfigId"];
7
7
  import { all, call, put, select, takeEvery } from 'redux-saga/effects';
8
- import { api, fetch } from '@frontegg/rest-api';
8
+ import { api } from '@frontegg/rest-api';
9
9
  import { actions } from '../reducer';
10
10
  import { SSOStateKeys } from './interfaces';
11
11
  import { readFileAsText } from '../../helpers';
@@ -466,22 +466,17 @@ function* saveSSOConfigurationByUrl({
466
466
  } = payload;
467
467
  const ssoConfigurations = yield select(state => state.auth.ssoState.ssoConfigurations);
468
468
  try {
469
- const metadata = yield call(fetch.Get, metadataUrl, undefined, {
470
- responseType: 'plain'
471
- });
472
-
473
- // TODO: remove any after adding configMetadata for @frontegg/rest-api
474
469
  const body = {
475
- metadata,
470
+ url: metadataUrl,
476
471
  configMetadata
477
472
  };
478
473
  let newSsoConfiguration;
479
474
  let newSsoConfigurations;
480
475
  if (ssoConfigId) {
481
- newSsoConfiguration = yield call(api.auth.updateSSOConfigurationByMetadata, ssoConfigId, body);
476
+ newSsoConfiguration = yield call(api.auth.updateSSOConfigurationByMetadataUrl, ssoConfigId, body);
482
477
  newSsoConfigurations = ssoConfigurations.map(ssoConfig => ssoConfig.id === ssoConfigId ? newSsoConfiguration : ssoConfig);
483
478
  } else {
484
- newSsoConfiguration = yield call(api.auth.createSSOConfigurationByMetadata, body);
479
+ newSsoConfiguration = yield call(api.auth.createSSOConfigurationByMetadataUrl, body);
485
480
  newSsoConfigurations = [newSsoConfiguration, ...ssoConfigurations];
486
481
  }
487
482
  yield put(actions.setSSOState({
@@ -0,0 +1,214 @@
1
+ import { WithCallback } from '../../../interfaces';
2
+ import { IPRestrictionsState, RestrictionsState, EmailDomainRestrictionsState, SaveEmailDomainRestrictionConfigPayload, SaveEmailDomainRestrictionsPayload } from './interfaces';
3
+ import { CreateIpRestriction, IPRestrictionsConfig } from '@frontegg/rest-api';
4
+ declare const restrictionsState: RestrictionsState;
5
+ declare const reducers: {
6
+ setRestrictionsState: {
7
+ prepare: (payload: Partial<RestrictionsState>) => {
8
+ payload: Partial<RestrictionsState>;
9
+ };
10
+ reducer: (state: import("../..").AuthState, { payload }: {
11
+ payload: Partial<RestrictionsState>;
12
+ type: string;
13
+ }) => {
14
+ onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
15
+ error?: any;
16
+ isAuthenticated: boolean;
17
+ userIp?: string | undefined;
18
+ isLoading: boolean;
19
+ keepSessionAlive?: boolean | undefined;
20
+ user?: import("../..").User | null | undefined;
21
+ isSSOAuth: boolean;
22
+ ssoACS?: string | undefined;
23
+ includeQueryParam?: boolean | undefined;
24
+ loginState: import("../..").LoginState;
25
+ activateState: import("../..").ActivateAccountState;
26
+ acceptInvitationState: import("../..").AcceptInvitationState;
27
+ forgotPasswordState: import("../..").ForgotPasswordState;
28
+ resetPhoneNumberState: import("../..").ResetPhoneNumberState;
29
+ ssoState: import("../..").SSOState;
30
+ profileState: import("../..").ProfileState;
31
+ mfaState: import("../..").MFAState;
32
+ teamState: import("../..").TeamState;
33
+ groupsState: import("../..").GroupsState;
34
+ groupsDialogsState: import("../..").GroupsDialogsState;
35
+ socialLoginState: import("../..").SocialLoginState;
36
+ signUpState: import("../..").SignUpState;
37
+ apiTokensState: import("../..").ApiTokensState;
38
+ securityPolicyState: import("../..").SecurityPolicyState;
39
+ restrictionsState: RestrictionsState;
40
+ provisioningState: import("../..").ProvisioningState;
41
+ accountSettingsState: import("../..").AccountSettingsState;
42
+ tenantsState: import("../..").TenantsState;
43
+ rolesState: import("../..").RolesState;
44
+ sessionsState: import("../..").SessionsState;
45
+ hostedLoginBox?: boolean | undefined;
46
+ disableSilentRefresh?: boolean | undefined;
47
+ sessionsPolicyState: import("../..").SessionsPolicyState;
48
+ impersonateState?: import("../..").ImpersonateState | undefined;
49
+ passkeysState?: import("../..").PasskeysState | undefined;
50
+ customLoginState?: import("../..").CustomLoginState | undefined;
51
+ allAccountsState?: import("../..").IAllAccountsState | undefined;
52
+ allAccountsDialogsState?: import("../..").IAllAccountsDialogsState | undefined;
53
+ securityCenterState?: import("../..").SecurityCenterState | undefined;
54
+ routes: import("../..").AuthPageRoutes;
55
+ header?: any;
56
+ loaderComponent?: any;
57
+ };
58
+ };
59
+ setIpRestrictionsState: {
60
+ prepare: (payload: Partial<IPRestrictionsState>) => {
61
+ payload: Partial<IPRestrictionsState>;
62
+ };
63
+ reducer: (state: import("../..").AuthState, { payload }: {
64
+ payload: Partial<IPRestrictionsState>;
65
+ type: string;
66
+ }) => {
67
+ onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
68
+ error?: any;
69
+ isAuthenticated: boolean;
70
+ userIp?: string | undefined;
71
+ isLoading: boolean;
72
+ keepSessionAlive?: boolean | undefined;
73
+ user?: import("../..").User | null | undefined;
74
+ isSSOAuth: boolean;
75
+ ssoACS?: string | undefined;
76
+ includeQueryParam?: boolean | undefined;
77
+ loginState: import("../..").LoginState;
78
+ activateState: import("../..").ActivateAccountState;
79
+ acceptInvitationState: import("../..").AcceptInvitationState;
80
+ forgotPasswordState: import("../..").ForgotPasswordState;
81
+ resetPhoneNumberState: import("../..").ResetPhoneNumberState;
82
+ ssoState: import("../..").SSOState;
83
+ profileState: import("../..").ProfileState;
84
+ mfaState: import("../..").MFAState;
85
+ teamState: import("../..").TeamState;
86
+ groupsState: import("../..").GroupsState;
87
+ groupsDialogsState: import("../..").GroupsDialogsState;
88
+ socialLoginState: import("../..").SocialLoginState;
89
+ signUpState: import("../..").SignUpState;
90
+ apiTokensState: import("../..").ApiTokensState;
91
+ securityPolicyState: import("../..").SecurityPolicyState;
92
+ restrictionsState: RestrictionsState;
93
+ provisioningState: import("../..").ProvisioningState;
94
+ accountSettingsState: import("../..").AccountSettingsState;
95
+ tenantsState: import("../..").TenantsState;
96
+ rolesState: import("../..").RolesState;
97
+ sessionsState: import("../..").SessionsState;
98
+ hostedLoginBox?: boolean | undefined;
99
+ disableSilentRefresh?: boolean | undefined;
100
+ sessionsPolicyState: import("../..").SessionsPolicyState;
101
+ impersonateState?: import("../..").ImpersonateState | undefined;
102
+ passkeysState?: import("../..").PasskeysState | undefined;
103
+ customLoginState?: import("../..").CustomLoginState | undefined;
104
+ allAccountsState?: import("../..").IAllAccountsState | undefined;
105
+ allAccountsDialogsState?: import("../..").IAllAccountsDialogsState | undefined;
106
+ securityCenterState?: import("../..").SecurityCenterState | undefined;
107
+ routes: import("../..").AuthPageRoutes;
108
+ header?: any;
109
+ loaderComponent?: any;
110
+ };
111
+ };
112
+ setEmailDomainRestrictionsState: {
113
+ prepare: (payload: Partial<EmailDomainRestrictionsState>) => {
114
+ payload: Partial<EmailDomainRestrictionsState>;
115
+ };
116
+ reducer: (state: import("../..").AuthState, { payload }: {
117
+ payload: Partial<EmailDomainRestrictionsState>;
118
+ type: string;
119
+ }) => {
120
+ onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
121
+ error?: any;
122
+ isAuthenticated: boolean;
123
+ userIp?: string | undefined;
124
+ isLoading: boolean;
125
+ keepSessionAlive?: boolean | undefined;
126
+ user?: import("../..").User | null | undefined;
127
+ isSSOAuth: boolean;
128
+ ssoACS?: string | undefined;
129
+ includeQueryParam?: boolean | undefined;
130
+ loginState: import("../..").LoginState;
131
+ activateState: import("../..").ActivateAccountState;
132
+ acceptInvitationState: import("../..").AcceptInvitationState;
133
+ forgotPasswordState: import("../..").ForgotPasswordState;
134
+ resetPhoneNumberState: import("../..").ResetPhoneNumberState;
135
+ ssoState: import("../..").SSOState;
136
+ profileState: import("../..").ProfileState;
137
+ mfaState: import("../..").MFAState;
138
+ teamState: import("../..").TeamState;
139
+ groupsState: import("../..").GroupsState;
140
+ groupsDialogsState: import("../..").GroupsDialogsState;
141
+ socialLoginState: import("../..").SocialLoginState;
142
+ signUpState: import("../..").SignUpState;
143
+ apiTokensState: import("../..").ApiTokensState;
144
+ securityPolicyState: import("../..").SecurityPolicyState;
145
+ restrictionsState: RestrictionsState;
146
+ provisioningState: import("../..").ProvisioningState;
147
+ accountSettingsState: import("../..").AccountSettingsState;
148
+ tenantsState: import("../..").TenantsState;
149
+ rolesState: import("../..").RolesState;
150
+ sessionsState: import("../..").SessionsState;
151
+ hostedLoginBox?: boolean | undefined;
152
+ disableSilentRefresh?: boolean | undefined;
153
+ sessionsPolicyState: import("../..").SessionsPolicyState;
154
+ impersonateState?: import("../..").ImpersonateState | undefined;
155
+ passkeysState?: import("../..").PasskeysState | undefined;
156
+ customLoginState?: import("../..").CustomLoginState | undefined;
157
+ allAccountsState?: import("../..").IAllAccountsState | undefined;
158
+ allAccountsDialogsState?: import("../..").IAllAccountsDialogsState | undefined;
159
+ securityCenterState?: import("../..").SecurityCenterState | undefined;
160
+ routes: import("../..").AuthPageRoutes;
161
+ header?: any;
162
+ loaderComponent?: any;
163
+ };
164
+ };
165
+ };
166
+ declare const actions: {
167
+ checkIfUserIpValid: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
168
+ addCurrentUserIpAndActivate: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
169
+ callback?: import("../../../interfaces").CallbackMethod<boolean> | undefined;
170
+ }], {
171
+ callback?: import("../../../interfaces").CallbackMethod<boolean> | undefined;
172
+ }, string, never, never>;
173
+ loadIpRestrictions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
174
+ saveIpRestriction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<CreateIpRestriction, boolean>], WithCallback<CreateIpRestriction, boolean>, string, never, never>;
175
+ saveIpRestrictionsConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPRestrictionsConfig, boolean>], WithCallback<IPRestrictionsConfig, boolean>, string, never, never>;
176
+ deleteIpRestriction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<{
177
+ id: string;
178
+ }, boolean>], WithCallback<{
179
+ id: string;
180
+ }, boolean>, string, never, never>;
181
+ loadEmailDomainRestrictions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
182
+ saveEmailDomainRestriction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<import("@frontegg/rest-api").CreateDomainRestriction, boolean>], WithCallback<import("@frontegg/rest-api").CreateDomainRestriction, boolean>, string, never, never>;
183
+ saveEmailDomainRestrictionsConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<import("@frontegg/rest-api").UpdateDomainRestrictionsConfig, boolean>], WithCallback<import("@frontegg/rest-api").UpdateDomainRestrictionsConfig, boolean>, string, never, never>;
184
+ deleteEmailDomainRestriction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
185
+ id: string;
186
+ }], {
187
+ id: string;
188
+ }, string, never, never>;
189
+ };
190
+ /**
191
+ * To be used for actions types after dispatch, and should contains
192
+ * the reducers and actions as standalone function
193
+ */
194
+ declare type DispatchedActions = {
195
+ setRestrictionsState: (state: Partial<RestrictionsState>) => void;
196
+ setIpRestrictionsState: (state: Partial<IPRestrictionsState>) => void;
197
+ loadIpRestrictions: () => void;
198
+ saveIpRestriction: (payload: WithCallback<CreateIpRestriction>) => void;
199
+ saveIpRestrictionsConfig: (payload: WithCallback<IPRestrictionsConfig>) => void;
200
+ deleteIpRestriction: (payload: WithCallback<{
201
+ id: string;
202
+ }>) => void;
203
+ checkIfUserIpValid: () => void;
204
+ addCurrentUserIpAndActivate: (payload: WithCallback) => void;
205
+ setEmailDomainRestrictionsState: (state: Partial<EmailDomainRestrictionsState>) => void;
206
+ loadEmailDomainRestrictions: () => void;
207
+ saveEmailDomainRestriction: (payload: SaveEmailDomainRestrictionsPayload) => void;
208
+ saveEmailDomainRestrictionsConfig: (payload: SaveEmailDomainRestrictionConfigPayload) => void;
209
+ deleteEmailDomainRestriction: (payload: {
210
+ id: string;
211
+ }) => void;
212
+ };
213
+ export declare type RestrictionsActions = DispatchedActions;
214
+ export { restrictionsState, reducers as restrictionsReducers, actions as restrictionsActions };
@@ -1,6 +1,6 @@
1
1
  import { createAction } from '@reduxjs/toolkit';
2
- import { typeReducerForKey, typeReducerNestedKey } from '../utils';
3
- import { authStoreName } from '../../constants';
2
+ import { typeReducerForKey, typeReducerNestedKey } from '../../utils';
3
+ import { authStoreName } from '../../../constants';
4
4
  import { RestrictionType } from '@frontegg/rest-api';
5
5
  const restrictionsState = {
6
6
  ipRestrictions: {
@@ -1,4 +1,4 @@
1
- import { WithStatus, WithCallback } from '../../interfaces';
1
+ import { WithStatus, WithCallback } from '../../../interfaces';
2
2
  import { IPRestrictionsConfig, IpRestriction, GetIPRestrictionsParams, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig } from '@frontegg/rest-api';
3
3
  export declare type IPRestrictionsState = WithStatus & {
4
4
  data?: {
@@ -10,12 +10,12 @@ const _excluded = ["callback"],
10
10
  _excluded8 = ["callback"];
11
11
  import { all, call, put, select as sagaSelect, takeEvery, takeLeading } from 'redux-saga/effects';
12
12
  import { api, RestrictionType } from '@frontegg/rest-api';
13
- import { actions } from '../reducer';
13
+ import { actions } from '../../reducer';
14
14
  import { v4 as uuid } from 'uuid';
15
- import { authStoreName } from '../../constants';
16
- import { dummyIpConfig, dummyIps } from '../dummy';
17
- import { delay } from '../utils';
18
- import { errorHandler } from '../../utils';
15
+ import { authStoreName } from '../../../constants';
16
+ import { dummyIpConfig, dummyIps } from '../../dummy';
17
+ import { delay } from '../../utils';
18
+ import { errorHandler } from '../../../utils';
19
19
  import { securityCenterSagaWrapper } from '../SecurityCenterState/saga';
20
20
  const selectIpRestrictionsState = () => sagaSelect(_ => _[authStoreName].restrictionsState.ipRestrictions);
21
21
  const selectUserIp = () => sagaSelect(_ => _[authStoreName].userIp);
@@ -0,0 +1,141 @@
1
+ import { SecurityCenterState } from './interfaces';
2
+ import { SecurityCenterStateIndicator } from './types';
3
+ declare const securityCenterState: SecurityCenterState;
4
+ declare const reducers: {
5
+ setSecurityCenterState: {
6
+ prepare: (payload: Partial<SecurityCenterState>) => {
7
+ payload: Partial<SecurityCenterState>;
8
+ };
9
+ reducer: (state: import("../..").AuthState, { payload }: {
10
+ payload: Partial<SecurityCenterState>;
11
+ type: string;
12
+ }) => {
13
+ onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
14
+ error?: any;
15
+ isAuthenticated: boolean;
16
+ userIp?: string | undefined;
17
+ isLoading: boolean;
18
+ keepSessionAlive?: boolean | undefined;
19
+ user?: import("../..").User | null | undefined;
20
+ isSSOAuth: boolean;
21
+ ssoACS?: string | undefined;
22
+ includeQueryParam?: boolean | undefined;
23
+ loginState: import("../..").LoginState;
24
+ activateState: import("../..").ActivateAccountState;
25
+ acceptInvitationState: import("../..").AcceptInvitationState;
26
+ forgotPasswordState: import("../..").ForgotPasswordState;
27
+ resetPhoneNumberState: import("../..").ResetPhoneNumberState;
28
+ ssoState: import("../..").SSOState;
29
+ profileState: import("../..").ProfileState;
30
+ mfaState: import("../..").MFAState;
31
+ teamState: import("../..").TeamState;
32
+ groupsState: import("../..").GroupsState;
33
+ groupsDialogsState: import("../..").GroupsDialogsState;
34
+ socialLoginState: import("../..").SocialLoginState;
35
+ signUpState: import("../..").SignUpState;
36
+ apiTokensState: import("../..").ApiTokensState;
37
+ securityPolicyState: import("../..").SecurityPolicyState;
38
+ restrictionsState: import("../..").RestrictionsState;
39
+ provisioningState: import("../..").ProvisioningState;
40
+ accountSettingsState: import("../..").AccountSettingsState;
41
+ tenantsState: import("../..").TenantsState;
42
+ rolesState: import("../..").RolesState;
43
+ sessionsState: import("../..").SessionsState;
44
+ hostedLoginBox?: boolean | undefined;
45
+ disableSilentRefresh?: boolean | undefined;
46
+ sessionsPolicyState: import("../..").SessionsPolicyState;
47
+ impersonateState?: import("../..").ImpersonateState | undefined;
48
+ passkeysState?: import("../..").PasskeysState | undefined;
49
+ customLoginState?: import("../..").CustomLoginState | undefined;
50
+ allAccountsState?: import("../..").IAllAccountsState | undefined;
51
+ allAccountsDialogsState?: import("../..").IAllAccountsDialogsState | undefined;
52
+ securityCenterState?: SecurityCenterState | undefined;
53
+ routes: import("../..").AuthPageRoutes;
54
+ header?: any;
55
+ loaderComponent?: any;
56
+ };
57
+ };
58
+ resetSecurityCenterState: (state: import("../..").AuthState) => {
59
+ onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
60
+ error?: any;
61
+ isAuthenticated: boolean;
62
+ userIp?: string | undefined;
63
+ isLoading: boolean;
64
+ keepSessionAlive?: boolean | undefined;
65
+ user?: import("../..").User | null | undefined;
66
+ isSSOAuth: boolean;
67
+ ssoACS?: string | undefined;
68
+ includeQueryParam?: boolean | undefined;
69
+ loginState: import("../..").LoginState;
70
+ activateState: import("../..").ActivateAccountState;
71
+ acceptInvitationState: import("../..").AcceptInvitationState;
72
+ forgotPasswordState: import("../..").ForgotPasswordState;
73
+ resetPhoneNumberState: import("../..").ResetPhoneNumberState;
74
+ ssoState: import("../..").SSOState;
75
+ profileState: import("../..").ProfileState;
76
+ mfaState: import("../..").MFAState;
77
+ teamState: import("../..").TeamState;
78
+ groupsState: import("../..").GroupsState;
79
+ groupsDialogsState: import("../..").GroupsDialogsState;
80
+ socialLoginState: import("../..").SocialLoginState;
81
+ signUpState: import("../..").SignUpState;
82
+ apiTokensState: import("../..").ApiTokensState;
83
+ securityPolicyState: import("../..").SecurityPolicyState;
84
+ restrictionsState: import("../..").RestrictionsState;
85
+ provisioningState: import("../..").ProvisioningState;
86
+ accountSettingsState: import("../..").AccountSettingsState;
87
+ tenantsState: import("../..").TenantsState;
88
+ rolesState: import("../..").RolesState;
89
+ sessionsState: import("../..").SessionsState;
90
+ hostedLoginBox?: boolean | undefined;
91
+ disableSilentRefresh?: boolean | undefined;
92
+ sessionsPolicyState: import("../..").SessionsPolicyState;
93
+ impersonateState?: import("../..").ImpersonateState | undefined;
94
+ passkeysState?: import("../..").PasskeysState | undefined;
95
+ customLoginState?: import("../..").CustomLoginState | undefined;
96
+ allAccountsState?: import("../..").IAllAccountsState | undefined;
97
+ allAccountsDialogsState?: import("../..").IAllAccountsDialogsState | undefined;
98
+ securityCenterState?: SecurityCenterState | undefined;
99
+ routes: import("../..").AuthPageRoutes;
100
+ header?: any;
101
+ loaderComponent?: any;
102
+ };
103
+ setSecurityCenterStateLoader: {
104
+ prepare: (payload: SecurityCenterStateIndicator) => {
105
+ payload: SecurityCenterStateIndicator;
106
+ };
107
+ reducer: (state: import("../..").AuthState, { payload }: {
108
+ payload: SecurityCenterStateIndicator;
109
+ type: string;
110
+ }) => import("../..").AuthState;
111
+ };
112
+ setSecurityCenterStateError: {
113
+ prepare: (payload: SecurityCenterStateIndicator) => {
114
+ payload: SecurityCenterStateIndicator;
115
+ };
116
+ reducer: (state: import("../..").AuthState, { payload }: {
117
+ payload: SecurityCenterStateIndicator;
118
+ type: string;
119
+ }) => import("../..").AuthState;
120
+ };
121
+ };
122
+ declare const actions: {
123
+ loadRecommendations: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
124
+ loadInsights: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
125
+ sendResetBreachedPasswordEmails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
126
+ };
127
+ /**
128
+ * To be used for actions types after dispatch, and should contains
129
+ * the reducers and actions as standalone function
130
+ */
131
+ declare type DispatchedActions = {
132
+ setSecurityCenterState: (state: Partial<SecurityCenterState>) => void;
133
+ resetSecurityCenterState: () => void;
134
+ loadRecommendations: () => void;
135
+ loadInsights: () => void;
136
+ sendResetBreachedPasswordEmails: () => void;
137
+ setSecurityCenterStateLoader: (payload: SecurityCenterStateIndicator) => void;
138
+ setSecurityCenterStateError: (payload: SecurityCenterStateIndicator) => void;
139
+ };
140
+ export declare type SecurityCenterActions = DispatchedActions;
141
+ export { securityCenterState, reducers as securityCenterReducers, actions as securityCenterActions };
@@ -1,6 +1,6 @@
1
1
  import { createAction } from '@reduxjs/toolkit';
2
- import { authStoreName } from '../../constants';
3
- import { errorsReducerForKey, loadersReducerForKey, resetStateByKey, typeReducerForKey } from '../utils';
2
+ import { authStoreName } from '../../../constants';
3
+ import { errorsReducerForKey, loadersReducerForKey, resetStateByKey, typeReducerForKey } from '../../utils';
4
4
  const securityCenterState = {
5
5
  loaders: {},
6
6
  errors: {},
@@ -1,5 +1,5 @@
1
1
  import { Insight, Recommendation } from '@frontegg/rest-api';
2
- import { ErrorsIndicatorState, LoaderIndicatorState } from '../../interfaces';
2
+ import { ErrorsIndicatorState, LoaderIndicatorState } from '../../../interfaces';
3
3
  import { SecurityCenterStateKeys } from './types';
4
4
  export interface SecurityCenterState {
5
5
  loaders: LoaderIndicatorState<SecurityCenterStateKeys>;
@@ -1,10 +1,10 @@
1
1
  import { call, delay, put, takeEvery } from 'redux-saga/effects';
2
- import { actions } from '../reducer';
3
- import { errorHandler } from '../../utils';
2
+ import { actions } from '../../reducer';
3
+ import { errorHandler } from '../../../utils';
4
4
  import { api } from '@frontegg/rest-api';
5
5
  import { SecurityCenterStateKeys } from './types';
6
- import { getFeatureFlags } from '../../index';
7
- import { securityCenterInsightsMock, securityCenterRecommendationsMock } from '../dummy';
6
+ import { getFeatureFlags } from '../../../index';
7
+ import { securityCenterInsightsMock, securityCenterRecommendationsMock } from '../../dummy';
8
8
 
9
9
  /**
10
10
  * This function is used to wrap sagas of the security page.