@frontegg/redux-store 6.127.0-alpha.0 → 6.127.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/auth/RestrictionsState/saga.js +11 -10
- package/auth/SecurityCenterState/saga.d.ts +39 -2
- package/auth/SecurityCenterState/saga.js +63 -2
- package/auth/SecurityPolicyState/saga.js +4 -3
- package/auth/SessionsPolicyState/saga.js +2 -1
- package/auth/dummy.d.ts +3 -1
- package/auth/dummy.js +59 -2
- package/auth/saga.js +3 -2
- package/index.js +1 -1
- package/node/auth/RestrictionsState/saga.js +11 -10
- package/node/auth/SecurityCenterState/saga.js +65 -1
- package/node/auth/SecurityPolicyState/saga.js +4 -3
- package/node/auth/SessionsPolicyState/saga.js +2 -1
- package/node/auth/dummy.js +61 -2
- package/node/auth/saga.js +3 -2
- package/node/index.js +1 -1
- package/package.json +2 -2
- package/subscriptions/Billing/Information/saga.d.ts +2 -2
|
@@ -16,6 +16,7 @@ import { authStoreName } from '../../constants';
|
|
|
16
16
|
import { dummyIpConfig, dummyIps } from '../dummy';
|
|
17
17
|
import { delay } from '../utils';
|
|
18
18
|
import { errorHandler } from '../../utils';
|
|
19
|
+
import { securityCenterSagaWrapper } from '../SecurityCenterState/saga';
|
|
19
20
|
const selectIpRestrictionsState = () => sagaSelect(_ => _[authStoreName].restrictionsState.ipRestrictions);
|
|
20
21
|
const selectUserIp = () => sagaSelect(_ => _[authStoreName].userIp);
|
|
21
22
|
const selectEmailDomainRestrictionsState = () => sagaSelect(_ => _[authStoreName].restrictionsState.emailDomainRestrictions);
|
|
@@ -388,16 +389,16 @@ function* deleteIpRestriction({
|
|
|
388
389
|
}
|
|
389
390
|
}
|
|
390
391
|
export function* restrictionsSagas() {
|
|
391
|
-
yield takeLeading(actions.loadIpRestrictions, loadIpRestrictions);
|
|
392
|
-
yield takeLeading(actions.loadEmailDomainRestrictions, loadEmailDomainRestrictions);
|
|
393
|
-
yield takeEvery(actions.saveIpRestriction, saveIpRestriction);
|
|
394
|
-
yield takeEvery(actions.saveIpRestrictionsConfig, saveIpRestrictionsConfig);
|
|
395
|
-
yield takeEvery(actions.deleteIpRestriction, deleteIpRestriction);
|
|
396
|
-
yield takeEvery(actions.checkIfUserIpValid, checkIfUserIpValid);
|
|
397
|
-
yield takeEvery(actions.addCurrentUserIpAndActivate, addCurrentUserIpAndActivate);
|
|
398
|
-
yield takeEvery(actions.saveEmailDomainRestriction, saveEmailDomainRestriction);
|
|
399
|
-
yield takeEvery(actions.saveEmailDomainRestrictionsConfig, saveEmailDomainRestrictionConfig);
|
|
400
|
-
yield takeEvery(actions.deleteEmailDomainRestriction, deleteEmailDomainRestriction);
|
|
392
|
+
yield takeLeading(actions.loadIpRestrictions, securityCenterSagaWrapper(loadIpRestrictions));
|
|
393
|
+
yield takeLeading(actions.loadEmailDomainRestrictions, securityCenterSagaWrapper(loadEmailDomainRestrictions));
|
|
394
|
+
yield takeEvery(actions.saveIpRestriction, securityCenterSagaWrapper(saveIpRestriction));
|
|
395
|
+
yield takeEvery(actions.saveIpRestrictionsConfig, securityCenterSagaWrapper(saveIpRestrictionsConfig));
|
|
396
|
+
yield takeEvery(actions.deleteIpRestriction, securityCenterSagaWrapper(deleteIpRestriction));
|
|
397
|
+
yield takeEvery(actions.checkIfUserIpValid, securityCenterSagaWrapper(checkIfUserIpValid));
|
|
398
|
+
yield takeEvery(actions.addCurrentUserIpAndActivate, securityCenterSagaWrapper(addCurrentUserIpAndActivate));
|
|
399
|
+
yield takeEvery(actions.saveEmailDomainRestriction, securityCenterSagaWrapper(saveEmailDomainRestriction));
|
|
400
|
+
yield takeEvery(actions.saveEmailDomainRestrictionsConfig, securityCenterSagaWrapper(saveEmailDomainRestrictionConfig));
|
|
401
|
+
yield takeEvery(actions.deleteEmailDomainRestriction, securityCenterSagaWrapper(deleteEmailDomainRestriction));
|
|
401
402
|
}
|
|
402
403
|
|
|
403
404
|
/*********************************
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import { GetRecommendationsResponse, GetInsightsResponse } from '@frontegg/rest-api';
|
|
2
|
+
/**
|
|
3
|
+
* This function is used to wrap sagas of the security page.
|
|
4
|
+
* This function returns function,
|
|
5
|
+
* that execute the saga it gets as a parameter,
|
|
6
|
+
* and after it execute loadRecommendations and loadInsights sagas.
|
|
7
|
+
* We need to call loadRecommendations and loadInsights after all change in the security page,
|
|
8
|
+
* in order to keep the recommendations and insights updated.
|
|
9
|
+
* @param action - saga to execute
|
|
10
|
+
*/
|
|
11
|
+
export declare function securityCenterSagaWrapper<T>(action: (props: T) => void): (props: T) => Generator<void | import("redux-saga/effects").CallEffect<boolean[]> | Generator<import("redux-saga/effects").PutEffect<{
|
|
12
|
+
payload: import("./types").SecurityCenterStateIndicator;
|
|
13
|
+
type: string;
|
|
14
|
+
}> | import("redux-saga/effects").CallEffect<GetRecommendationsResponse> | import("redux-saga/effects").PutEffect<{
|
|
15
|
+
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
16
|
+
type: string;
|
|
17
|
+
}>, void, GetRecommendationsResponse> | Generator<import("redux-saga/effects").PutEffect<{
|
|
18
|
+
payload: import("./types").SecurityCenterStateIndicator;
|
|
19
|
+
type: string;
|
|
20
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
21
|
+
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
22
|
+
type: string;
|
|
23
|
+
}> | import("redux-saga/effects").CallEffect<GetInsightsResponse>, void, GetInsightsResponse>, void, boolean[]>;
|
|
2
24
|
export declare function loadRecommendations(): Generator<import("redux-saga/effects").PutEffect<{
|
|
3
25
|
payload: import("./types").SecurityCenterStateIndicator;
|
|
4
26
|
type: string;
|
|
@@ -13,8 +35,23 @@ export declare function loadInsights(): Generator<import("redux-saga/effects").P
|
|
|
13
35
|
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
14
36
|
type: string;
|
|
15
37
|
}> | import("redux-saga/effects").CallEffect<GetInsightsResponse>, void, GetInsightsResponse>;
|
|
16
|
-
export declare function sendResetBreachedPasswordEmails(): Generator<import("redux-saga/effects").
|
|
38
|
+
export declare function sendResetBreachedPasswordEmails(): Generator<import("redux-saga/effects").PutEffect<{
|
|
17
39
|
payload: import("./types").SecurityCenterStateIndicator;
|
|
18
40
|
type: string;
|
|
19
|
-
}>, void, unknown>;
|
|
41
|
+
}> | import("redux-saga/effects").CallEffect<void>, void, unknown>;
|
|
20
42
|
export declare function securityCenterSagas(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
43
|
+
export declare function loadRecommendationsMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
44
|
+
payload: import("./types").SecurityCenterStateIndicator;
|
|
45
|
+
type: string;
|
|
46
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
47
|
+
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
48
|
+
type: string;
|
|
49
|
+
}> | import("redux-saga/effects").CallEffect<true>, void, unknown>;
|
|
50
|
+
export declare function loadInsightsMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
51
|
+
payload: import("./types").SecurityCenterStateIndicator;
|
|
52
|
+
type: string;
|
|
53
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
54
|
+
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
55
|
+
type: string;
|
|
56
|
+
}> | import("redux-saga/effects").CallEffect<true>, void, unknown>;
|
|
57
|
+
export declare function securityCenterSagasMock(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
import { call, put, takeEvery } from 'redux-saga/effects';
|
|
1
|
+
import { call, delay, put, takeEvery } from 'redux-saga/effects';
|
|
2
2
|
import { actions } from '../reducer';
|
|
3
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';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This function is used to wrap sagas of the security page.
|
|
11
|
+
* This function returns function,
|
|
12
|
+
* that execute the saga it gets as a parameter,
|
|
13
|
+
* and after it execute loadRecommendations and loadInsights sagas.
|
|
14
|
+
* We need to call loadRecommendations and loadInsights after all change in the security page,
|
|
15
|
+
* in order to keep the recommendations and insights updated.
|
|
16
|
+
* @param action - saga to execute
|
|
17
|
+
*/
|
|
18
|
+
export function securityCenterSagaWrapper(action) {
|
|
19
|
+
return function* (props) {
|
|
20
|
+
const [securityCenterFeatureFlag] = yield call(getFeatureFlags, ['admin-portal-new-security-center-page']);
|
|
21
|
+
yield action(props);
|
|
22
|
+
if (securityCenterFeatureFlag) {
|
|
23
|
+
yield loadRecommendations();
|
|
24
|
+
yield loadInsights();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
6
28
|
export function* loadRecommendations() {
|
|
7
29
|
const key = SecurityCenterStateKeys.RECOMMENDATIONS;
|
|
8
30
|
yield put(actions.setSecurityCenterStateLoader({
|
|
@@ -10,13 +32,14 @@ export function* loadRecommendations() {
|
|
|
10
32
|
value: true
|
|
11
33
|
}));
|
|
12
34
|
try {
|
|
35
|
+
var _scoring$score;
|
|
13
36
|
const {
|
|
14
37
|
recommendations,
|
|
15
38
|
scoring
|
|
16
39
|
} = yield call(api.securityCenter.getRecommendations);
|
|
17
40
|
yield put(actions.setSecurityCenterState({
|
|
18
41
|
recommendations: recommendations.items,
|
|
19
|
-
score: scoring.score
|
|
42
|
+
score: (_scoring$score = scoring == null ? void 0 : scoring.score) != null ? _scoring$score : 0
|
|
20
43
|
}));
|
|
21
44
|
} catch (e) {
|
|
22
45
|
yield put(actions.setSecurityCenterStateError({
|
|
@@ -79,4 +102,42 @@ export function* securityCenterSagas() {
|
|
|
79
102
|
yield takeEvery(actions.loadRecommendations, loadRecommendations);
|
|
80
103
|
yield takeEvery(actions.loadInsights, loadInsights);
|
|
81
104
|
yield takeEvery(actions.sendResetBreachedPasswordEmails, sendResetBreachedPasswordEmails);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
//MOCK SAGAS
|
|
108
|
+
|
|
109
|
+
export function* loadRecommendationsMock() {
|
|
110
|
+
const key = SecurityCenterStateKeys.RECOMMENDATIONS;
|
|
111
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
112
|
+
key,
|
|
113
|
+
value: true
|
|
114
|
+
}));
|
|
115
|
+
yield delay(500);
|
|
116
|
+
yield put(actions.setSecurityCenterState({
|
|
117
|
+
recommendations: securityCenterRecommendationsMock.recommendations.items,
|
|
118
|
+
score: securityCenterRecommendationsMock.scoring.score
|
|
119
|
+
}));
|
|
120
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
121
|
+
key,
|
|
122
|
+
value: false
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
export function* loadInsightsMock() {
|
|
126
|
+
const key = SecurityCenterStateKeys.INSIGHTS;
|
|
127
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
128
|
+
key,
|
|
129
|
+
value: true
|
|
130
|
+
}));
|
|
131
|
+
yield delay(500);
|
|
132
|
+
yield put(actions.setSecurityCenterState({
|
|
133
|
+
insights: securityCenterInsightsMock.insights.items
|
|
134
|
+
}));
|
|
135
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
136
|
+
key,
|
|
137
|
+
value: false
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
export function* securityCenterSagasMock() {
|
|
141
|
+
yield takeEvery(actions.loadRecommendations, loadRecommendationsMock);
|
|
142
|
+
yield takeEvery(actions.loadInsights, loadInsightsMock);
|
|
82
143
|
}
|
|
@@ -13,6 +13,7 @@ import { delay } from '../utils';
|
|
|
13
13
|
import { policyDemo, policyMfaDemo, policyLockoutDemo, policyPasswordHistoryDemo, publicSecurityPolicy } from '../dummy';
|
|
14
14
|
import { errorHandler } from '../../utils';
|
|
15
15
|
import { customLoginEnabled } from '../CustomLoginState/saga';
|
|
16
|
+
import { securityCenterSagaWrapper } from '../SecurityCenterState/saga';
|
|
16
17
|
function* loadSecurityPolicy() {
|
|
17
18
|
yield put(actions.setSecurityPolicyGlobalState({
|
|
18
19
|
loading: true,
|
|
@@ -347,14 +348,14 @@ function* loadVendorPasswordConfig() {
|
|
|
347
348
|
}
|
|
348
349
|
export function* securityPolicySagas() {
|
|
349
350
|
yield takeLeading(actions.loadSecurityPolicy, loadSecurityPolicy);
|
|
350
|
-
yield takeEvery(actions.saveSecurityPolicyMfa, saveSecurityPolicyMfa);
|
|
351
|
+
yield takeEvery(actions.saveSecurityPolicyMfa, securityCenterSagaWrapper(saveSecurityPolicyMfa));
|
|
351
352
|
yield takeEvery(actions.loadSecurityPolicyMfa, loadSecurityPolicyMfa);
|
|
352
353
|
yield takeEvery(actions.loadSecurityPolicyVendorMfa, loadSecurityPolicyVendorMfa);
|
|
353
|
-
yield takeEvery(actions.saveSecurityPolicyLockout, saveSecurityPolicyLockout);
|
|
354
|
+
yield takeEvery(actions.saveSecurityPolicyLockout, securityCenterSagaWrapper(saveSecurityPolicyLockout));
|
|
354
355
|
yield takeEvery(actions.loadSecurityPolicyLockout, loadSecurityPolicyLockout);
|
|
355
356
|
yield takeEvery(actions.loadSecurityPolicyVendorLockout, loadSecurityPolicyVendorLockout);
|
|
356
357
|
yield takeEvery(actions.loadSecurityPolicyCaptcha, loadSecurityPolicyCaptcha);
|
|
357
|
-
yield takeEvery(actions.saveSecurityPolicyPasswordHistory, saveSecurityPolicyPasswordHistory);
|
|
358
|
+
yield takeEvery(actions.saveSecurityPolicyPasswordHistory, securityCenterSagaWrapper(saveSecurityPolicyPasswordHistory));
|
|
358
359
|
yield takeEvery(actions.loadSecurityPolicyPasswordHistory, loadSecurityPolicyPasswordHistory);
|
|
359
360
|
yield takeEvery(actions.loadSecurityPolicyVendorPasswordHistory, loadSecurityPolicyVendorPasswordHistory);
|
|
360
361
|
yield takeEvery(actions.loadVendorPasswordConfig, loadVendorPasswordConfig);
|
|
@@ -6,6 +6,7 @@ import { takeLatest, put, call, takeLeading, select } from 'redux-saga/effects';
|
|
|
6
6
|
import { api } from '@frontegg/rest-api';
|
|
7
7
|
import { actions } from '../reducer';
|
|
8
8
|
import { sessionsConfigDummies } from '../dummy';
|
|
9
|
+
import { securityCenterSagaWrapper } from '../SecurityCenterState/saga';
|
|
9
10
|
function* loadSessionPolicyState() {
|
|
10
11
|
yield put(actions.setSessionsPolicyState({
|
|
11
12
|
loading: true,
|
|
@@ -48,7 +49,7 @@ function* createOrUpdateSessionsPolicy({
|
|
|
48
49
|
}
|
|
49
50
|
export function* sessionsPolicySaga() {
|
|
50
51
|
yield takeLeading(actions.loadSessionsPolicy, loadSessionPolicyState);
|
|
51
|
-
yield takeLatest(actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicy);
|
|
52
|
+
yield takeLatest(actions.createOrUpdateSessionsPolicy, securityCenterSagaWrapper(createOrUpdateSessionsPolicy));
|
|
52
53
|
}
|
|
53
54
|
function* loadSessionPolicyStateMock() {
|
|
54
55
|
yield put(actions.setSessionsPolicyState({
|
package/auth/dummy.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRole, ISamlConfiguration, ISamlMetadata, ISecurityPolicy, ISecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyPasswordHistory, ITeamUser, ITeamUserPermission, ITeamUserRole, ITenantsResponse, IVendorConfig, ISubTenantUser, ISessionConfigurations, IpRestriction, IPRestrictionsConfig, ISessionResponse, IUserProfile } from '@frontegg/rest-api';
|
|
1
|
+
import { IRole, ISamlConfiguration, ISamlMetadata, ISecurityPolicy, ISecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyPasswordHistory, ITeamUser, ITeamUserPermission, ITeamUserRole, ITenantsResponse, IVendorConfig, ISubTenantUser, ISessionConfigurations, IpRestriction, IPRestrictionsConfig, ISessionResponse, IUserProfile, GetRecommendationsResponse, GetInsightsResponse } from '@frontegg/rest-api';
|
|
2
2
|
import { IApiTokensData, ITenantApiTokensData } from './ApiTokensState/interfaces';
|
|
3
3
|
import { IGroup } from '../auth/GroupsState/interfaces';
|
|
4
4
|
import { User } from './interfaces';
|
|
@@ -34,3 +34,5 @@ export declare const sessionsConfigDummies: ISessionConfigurations;
|
|
|
34
34
|
export declare const dummyIpConfig: IPRestrictionsConfig;
|
|
35
35
|
export declare const dummyIps: IpRestriction[];
|
|
36
36
|
export declare const allGroupsDummy: IGroup[];
|
|
37
|
+
export declare const securityCenterRecommendationsMock: GetRecommendationsResponse;
|
|
38
|
+
export declare const securityCenterInsightsMock: GetInsightsResponse;
|
package/auth/dummy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { AuthStrategyEnum, RestrictionType, GroupManagedByEnum } from '@frontegg/rest-api';
|
|
2
|
+
import { AuthStrategyEnum, RestrictionType, GroupManagedByEnum, InsightCode, RecommendationSeverity, RecommendationCode, SecurityCategory } from '@frontegg/rest-api';
|
|
3
3
|
import { MachineToMachineAuthStrategy } from './ApiTokensState/interfaces';
|
|
4
4
|
export const apiTokensDataDemo = {
|
|
5
5
|
clientId: 'CLIENT_ID_16806d3d-8fc3-4450-be97-abdaf66b723e',
|
|
@@ -472,4 +472,61 @@ export const allGroupsDummy = [{
|
|
|
472
472
|
users: generateGroupUsers(4),
|
|
473
473
|
roles: [generateRoleByName('Viewer')],
|
|
474
474
|
managedBy: GroupManagedByEnum.FRONTEGG
|
|
475
|
-
}];
|
|
475
|
+
}];
|
|
476
|
+
export const securityCenterRecommendationsMock = {
|
|
477
|
+
scoring: {
|
|
478
|
+
score: 79
|
|
479
|
+
},
|
|
480
|
+
recommendations: {
|
|
481
|
+
items: [{
|
|
482
|
+
code: RecommendationCode.FORCE_MFA,
|
|
483
|
+
severity: RecommendationSeverity.WARNING,
|
|
484
|
+
category: SecurityCategory.MFA
|
|
485
|
+
}, {
|
|
486
|
+
code: RecommendationCode.ENABLE_FORCE_RELOGIN,
|
|
487
|
+
severity: RecommendationSeverity.WARNING,
|
|
488
|
+
category: SecurityCategory.SESSIONS
|
|
489
|
+
}]
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
export const securityCenterInsightsMock = {
|
|
493
|
+
insights: {
|
|
494
|
+
items: [{
|
|
495
|
+
category: SecurityCategory.MFA,
|
|
496
|
+
code: InsightCode.PARTIALLY_FORCED_MFA,
|
|
497
|
+
metadata: {
|
|
498
|
+
totalUsers: 2,
|
|
499
|
+
mfa: {
|
|
500
|
+
enrolledUsersCount: 1
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}, {
|
|
504
|
+
category: SecurityCategory.SESSIONS,
|
|
505
|
+
code: InsightCode.PARTIAL_SESSION_SETTINGS,
|
|
506
|
+
metadata: {
|
|
507
|
+
totalUsers: 2,
|
|
508
|
+
sessions: {
|
|
509
|
+
idleTimeoutRecommendation: 1800
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}, {
|
|
513
|
+
category: SecurityCategory.PASSWORD,
|
|
514
|
+
code: InsightCode.IMPROVE_PASSWORD_HISTORY_POLICY,
|
|
515
|
+
metadata: {
|
|
516
|
+
password: {
|
|
517
|
+
userLockoutRecommendation: 5,
|
|
518
|
+
historyRecommendations: 5
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}, {
|
|
522
|
+
category: SecurityCategory.DOMAIN,
|
|
523
|
+
code: InsightCode.NO_IP_RESTRICTIONS,
|
|
524
|
+
metadata: {
|
|
525
|
+
restrictions: {
|
|
526
|
+
ipsCount: 1,
|
|
527
|
+
domainsCount: 1
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}]
|
|
531
|
+
}
|
|
532
|
+
};
|
package/auth/saga.js
CHANGED
|
@@ -26,8 +26,9 @@ import { groupsSagas, groupsSagasMock } from './GroupsState/saga';
|
|
|
26
26
|
import { customLoginSagas } from './CustomLoginState/saga';
|
|
27
27
|
import { allAccountsSagas } from './MSP/AllAccountsState/saga';
|
|
28
28
|
import { entitlementsSagas } from './Entitlements/saga';
|
|
29
|
+
import { securityCenterSagas, securityCenterSagasMock } from './SecurityCenterState/saga';
|
|
29
30
|
export function* sagas() {
|
|
30
|
-
yield all([call(loginSagas), call(activateSagas), call(acceptInvitationSagas), call(forgotPasswordSagas), call(resetPhoneNumberSagas), call(ssoSagas), call(ssoSagasV2), call(profileSagas), call(customLoginSagas), call(mfaSagas), call(teamSagas), call(groupsSagas), call(socialLoginsSaga), call(signUpSaga), call(apiTokensSaga), call(securityPolicySagas), call(accountSettingsSaga), call(tenantsSagas), call(rolesSagas), call(sessionsSaga), call(sessionsPolicySaga), call(restrictionsSagas), call(provisionSagas), call(impersonateSagas), call(passkeysSagas), call(allAccountsSagas), call(entitlementsSagas)]);
|
|
31
|
+
yield all([call(loginSagas), call(activateSagas), call(acceptInvitationSagas), call(forgotPasswordSagas), call(resetPhoneNumberSagas), call(ssoSagas), call(ssoSagasV2), call(profileSagas), call(customLoginSagas), call(mfaSagas), call(teamSagas), call(groupsSagas), call(socialLoginsSaga), call(signUpSaga), call(apiTokensSaga), call(securityPolicySagas), call(accountSettingsSaga), call(tenantsSagas), call(rolesSagas), call(sessionsSaga), call(sessionsPolicySaga), call(restrictionsSagas), call(provisionSagas), call(impersonateSagas), call(passkeysSagas), call(allAccountsSagas), call(entitlementsSagas), call(securityCenterSagas)]);
|
|
31
32
|
}
|
|
32
33
|
export function* mockSagas() {
|
|
33
34
|
yield all([call(loginSagasMock),
|
|
@@ -36,5 +37,5 @@ export function* mockSagas() {
|
|
|
36
37
|
// call(forgotPasswordSagas),
|
|
37
38
|
// call(socialLoginsSaga),
|
|
38
39
|
// call(signUpSaga),
|
|
39
|
-
call(ssoSagasMock), call(profileSagasMock), call(mfaSagasMock), call(teamSagasMock), call(apiTokensSagaMock), call(securityPolicySagasMock), call(sessionsSagaMock), call(accountSettingsSagaMock), call(tenantsSagasMock), call(sessionsPolicySagaMock), call(restrictionsSagaMock), call(rolesSagasMock), call(groupsSagasMock)]);
|
|
40
|
+
call(ssoSagasMock), call(profileSagasMock), call(mfaSagasMock), call(teamSagasMock), call(apiTokensSagaMock), call(securityPolicySagasMock), call(sessionsSagaMock), call(accountSettingsSagaMock), call(tenantsSagasMock), call(sessionsPolicySagaMock), call(restrictionsSagaMock), call(rolesSagasMock), call(groupsSagasMock), call(securityCenterSagasMock)]);
|
|
40
41
|
}
|
package/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var _constants = require("../../constants");
|
|
|
16
16
|
var _dummy = require("../dummy");
|
|
17
17
|
var _utils = require("../utils");
|
|
18
18
|
var _utils2 = require("../../utils");
|
|
19
|
+
var _saga = require("../SecurityCenterState/saga");
|
|
19
20
|
const _excluded = ["callback"],
|
|
20
21
|
_excluded2 = ["callback"],
|
|
21
22
|
_excluded3 = ["callback"],
|
|
@@ -396,16 +397,16 @@ function* deleteIpRestriction({
|
|
|
396
397
|
}
|
|
397
398
|
}
|
|
398
399
|
function* restrictionsSagas() {
|
|
399
|
-
yield (0, _effects.takeLeading)(_reducer.actions.loadIpRestrictions, loadIpRestrictions);
|
|
400
|
-
yield (0, _effects.takeLeading)(_reducer.actions.loadEmailDomainRestrictions, loadEmailDomainRestrictions);
|
|
401
|
-
yield (0, _effects.takeEvery)(_reducer.actions.saveIpRestriction, saveIpRestriction);
|
|
402
|
-
yield (0, _effects.takeEvery)(_reducer.actions.saveIpRestrictionsConfig, saveIpRestrictionsConfig);
|
|
403
|
-
yield (0, _effects.takeEvery)(_reducer.actions.deleteIpRestriction, deleteIpRestriction);
|
|
404
|
-
yield (0, _effects.takeEvery)(_reducer.actions.checkIfUserIpValid, checkIfUserIpValid);
|
|
405
|
-
yield (0, _effects.takeEvery)(_reducer.actions.addCurrentUserIpAndActivate, addCurrentUserIpAndActivate);
|
|
406
|
-
yield (0, _effects.takeEvery)(_reducer.actions.saveEmailDomainRestriction, saveEmailDomainRestriction);
|
|
407
|
-
yield (0, _effects.takeEvery)(_reducer.actions.saveEmailDomainRestrictionsConfig, saveEmailDomainRestrictionConfig);
|
|
408
|
-
yield (0, _effects.takeEvery)(_reducer.actions.deleteEmailDomainRestriction, deleteEmailDomainRestriction);
|
|
400
|
+
yield (0, _effects.takeLeading)(_reducer.actions.loadIpRestrictions, (0, _saga.securityCenterSagaWrapper)(loadIpRestrictions));
|
|
401
|
+
yield (0, _effects.takeLeading)(_reducer.actions.loadEmailDomainRestrictions, (0, _saga.securityCenterSagaWrapper)(loadEmailDomainRestrictions));
|
|
402
|
+
yield (0, _effects.takeEvery)(_reducer.actions.saveIpRestriction, (0, _saga.securityCenterSagaWrapper)(saveIpRestriction));
|
|
403
|
+
yield (0, _effects.takeEvery)(_reducer.actions.saveIpRestrictionsConfig, (0, _saga.securityCenterSagaWrapper)(saveIpRestrictionsConfig));
|
|
404
|
+
yield (0, _effects.takeEvery)(_reducer.actions.deleteIpRestriction, (0, _saga.securityCenterSagaWrapper)(deleteIpRestriction));
|
|
405
|
+
yield (0, _effects.takeEvery)(_reducer.actions.checkIfUserIpValid, (0, _saga.securityCenterSagaWrapper)(checkIfUserIpValid));
|
|
406
|
+
yield (0, _effects.takeEvery)(_reducer.actions.addCurrentUserIpAndActivate, (0, _saga.securityCenterSagaWrapper)(addCurrentUserIpAndActivate));
|
|
407
|
+
yield (0, _effects.takeEvery)(_reducer.actions.saveEmailDomainRestriction, (0, _saga.securityCenterSagaWrapper)(saveEmailDomainRestriction));
|
|
408
|
+
yield (0, _effects.takeEvery)(_reducer.actions.saveEmailDomainRestrictionsConfig, (0, _saga.securityCenterSagaWrapper)(saveEmailDomainRestrictionConfig));
|
|
409
|
+
yield (0, _effects.takeEvery)(_reducer.actions.deleteEmailDomainRestriction, (0, _saga.securityCenterSagaWrapper)(deleteEmailDomainRestriction));
|
|
409
410
|
}
|
|
410
411
|
|
|
411
412
|
/*********************************
|
|
@@ -4,14 +4,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.loadInsights = loadInsights;
|
|
7
|
+
exports.loadInsightsMock = loadInsightsMock;
|
|
7
8
|
exports.loadRecommendations = loadRecommendations;
|
|
9
|
+
exports.loadRecommendationsMock = loadRecommendationsMock;
|
|
10
|
+
exports.securityCenterSagaWrapper = securityCenterSagaWrapper;
|
|
8
11
|
exports.securityCenterSagas = securityCenterSagas;
|
|
12
|
+
exports.securityCenterSagasMock = securityCenterSagasMock;
|
|
9
13
|
exports.sendResetBreachedPasswordEmails = sendResetBreachedPasswordEmails;
|
|
10
14
|
var _effects = require("redux-saga/effects");
|
|
11
15
|
var _reducer = require("../reducer");
|
|
12
16
|
var _utils = require("../../utils");
|
|
13
17
|
var _restApi = require("@frontegg/rest-api");
|
|
14
18
|
var _types = require("./types");
|
|
19
|
+
var _index = require("../../index");
|
|
20
|
+
var _dummy = require("../dummy");
|
|
21
|
+
/**
|
|
22
|
+
* This function is used to wrap sagas of the security page.
|
|
23
|
+
* This function returns function,
|
|
24
|
+
* that execute the saga it gets as a parameter,
|
|
25
|
+
* and after it execute loadRecommendations and loadInsights sagas.
|
|
26
|
+
* We need to call loadRecommendations and loadInsights after all change in the security page,
|
|
27
|
+
* in order to keep the recommendations and insights updated.
|
|
28
|
+
* @param action - saga to execute
|
|
29
|
+
*/
|
|
30
|
+
function securityCenterSagaWrapper(action) {
|
|
31
|
+
return function* (props) {
|
|
32
|
+
const [securityCenterFeatureFlag] = yield (0, _effects.call)(_index.getFeatureFlags, ['admin-portal-new-security-center-page']);
|
|
33
|
+
yield action(props);
|
|
34
|
+
if (securityCenterFeatureFlag) {
|
|
35
|
+
yield loadRecommendations();
|
|
36
|
+
yield loadInsights();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
15
40
|
function* loadRecommendations() {
|
|
16
41
|
const key = _types.SecurityCenterStateKeys.RECOMMENDATIONS;
|
|
17
42
|
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
@@ -19,13 +44,14 @@ function* loadRecommendations() {
|
|
|
19
44
|
value: true
|
|
20
45
|
}));
|
|
21
46
|
try {
|
|
47
|
+
var _scoring$score;
|
|
22
48
|
const {
|
|
23
49
|
recommendations,
|
|
24
50
|
scoring
|
|
25
51
|
} = yield (0, _effects.call)(_restApi.api.securityCenter.getRecommendations);
|
|
26
52
|
yield (0, _effects.put)(_reducer.actions.setSecurityCenterState({
|
|
27
53
|
recommendations: recommendations.items,
|
|
28
|
-
score: scoring.score
|
|
54
|
+
score: (_scoring$score = scoring == null ? void 0 : scoring.score) != null ? _scoring$score : 0
|
|
29
55
|
}));
|
|
30
56
|
} catch (e) {
|
|
31
57
|
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateError({
|
|
@@ -88,4 +114,42 @@ function* securityCenterSagas() {
|
|
|
88
114
|
yield (0, _effects.takeEvery)(_reducer.actions.loadRecommendations, loadRecommendations);
|
|
89
115
|
yield (0, _effects.takeEvery)(_reducer.actions.loadInsights, loadInsights);
|
|
90
116
|
yield (0, _effects.takeEvery)(_reducer.actions.sendResetBreachedPasswordEmails, sendResetBreachedPasswordEmails);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//MOCK SAGAS
|
|
120
|
+
|
|
121
|
+
function* loadRecommendationsMock() {
|
|
122
|
+
const key = _types.SecurityCenterStateKeys.RECOMMENDATIONS;
|
|
123
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
124
|
+
key,
|
|
125
|
+
value: true
|
|
126
|
+
}));
|
|
127
|
+
yield (0, _effects.delay)(500);
|
|
128
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterState({
|
|
129
|
+
recommendations: _dummy.securityCenterRecommendationsMock.recommendations.items,
|
|
130
|
+
score: _dummy.securityCenterRecommendationsMock.scoring.score
|
|
131
|
+
}));
|
|
132
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
133
|
+
key,
|
|
134
|
+
value: false
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
function* loadInsightsMock() {
|
|
138
|
+
const key = _types.SecurityCenterStateKeys.INSIGHTS;
|
|
139
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
140
|
+
key,
|
|
141
|
+
value: true
|
|
142
|
+
}));
|
|
143
|
+
yield (0, _effects.delay)(500);
|
|
144
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterState({
|
|
145
|
+
insights: _dummy.securityCenterInsightsMock.insights.items
|
|
146
|
+
}));
|
|
147
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
148
|
+
key,
|
|
149
|
+
value: false
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
function* securityCenterSagasMock() {
|
|
153
|
+
yield (0, _effects.takeEvery)(_reducer.actions.loadRecommendations, loadRecommendationsMock);
|
|
154
|
+
yield (0, _effects.takeEvery)(_reducer.actions.loadInsights, loadInsightsMock);
|
|
91
155
|
}
|
|
@@ -21,6 +21,7 @@ var _utils = require("../utils");
|
|
|
21
21
|
var _dummy = require("../dummy");
|
|
22
22
|
var _utils2 = require("../../utils");
|
|
23
23
|
var _saga = require("../CustomLoginState/saga");
|
|
24
|
+
var _saga2 = require("../SecurityCenterState/saga");
|
|
24
25
|
const _excluded = ["callback"],
|
|
25
26
|
_excluded2 = ["callback"],
|
|
26
27
|
_excluded3 = ["callback"],
|
|
@@ -361,14 +362,14 @@ function* loadVendorPasswordConfig() {
|
|
|
361
362
|
}
|
|
362
363
|
function* securityPolicySagas() {
|
|
363
364
|
yield (0, _effects.takeLeading)(_reducer.actions.loadSecurityPolicy, loadSecurityPolicy);
|
|
364
|
-
yield (0, _effects.takeEvery)(_reducer.actions.saveSecurityPolicyMfa, saveSecurityPolicyMfa);
|
|
365
|
+
yield (0, _effects.takeEvery)(_reducer.actions.saveSecurityPolicyMfa, (0, _saga2.securityCenterSagaWrapper)(saveSecurityPolicyMfa));
|
|
365
366
|
yield (0, _effects.takeEvery)(_reducer.actions.loadSecurityPolicyMfa, loadSecurityPolicyMfa);
|
|
366
367
|
yield (0, _effects.takeEvery)(_reducer.actions.loadSecurityPolicyVendorMfa, loadSecurityPolicyVendorMfa);
|
|
367
|
-
yield (0, _effects.takeEvery)(_reducer.actions.saveSecurityPolicyLockout, saveSecurityPolicyLockout);
|
|
368
|
+
yield (0, _effects.takeEvery)(_reducer.actions.saveSecurityPolicyLockout, (0, _saga2.securityCenterSagaWrapper)(saveSecurityPolicyLockout));
|
|
368
369
|
yield (0, _effects.takeEvery)(_reducer.actions.loadSecurityPolicyLockout, loadSecurityPolicyLockout);
|
|
369
370
|
yield (0, _effects.takeEvery)(_reducer.actions.loadSecurityPolicyVendorLockout, loadSecurityPolicyVendorLockout);
|
|
370
371
|
yield (0, _effects.takeEvery)(_reducer.actions.loadSecurityPolicyCaptcha, loadSecurityPolicyCaptcha);
|
|
371
|
-
yield (0, _effects.takeEvery)(_reducer.actions.saveSecurityPolicyPasswordHistory, saveSecurityPolicyPasswordHistory);
|
|
372
|
+
yield (0, _effects.takeEvery)(_reducer.actions.saveSecurityPolicyPasswordHistory, (0, _saga2.securityCenterSagaWrapper)(saveSecurityPolicyPasswordHistory));
|
|
372
373
|
yield (0, _effects.takeEvery)(_reducer.actions.loadSecurityPolicyPasswordHistory, loadSecurityPolicyPasswordHistory);
|
|
373
374
|
yield (0, _effects.takeEvery)(_reducer.actions.loadSecurityPolicyVendorPasswordHistory, loadSecurityPolicyVendorPasswordHistory);
|
|
374
375
|
yield (0, _effects.takeEvery)(_reducer.actions.loadVendorPasswordConfig, loadVendorPasswordConfig);
|
|
@@ -12,6 +12,7 @@ var _effects = require("redux-saga/effects");
|
|
|
12
12
|
var _restApi = require("@frontegg/rest-api");
|
|
13
13
|
var _reducer = require("../reducer");
|
|
14
14
|
var _dummy = require("../dummy");
|
|
15
|
+
var _saga = require("../SecurityCenterState/saga");
|
|
15
16
|
const _excluded = ["callback"],
|
|
16
17
|
_excluded2 = ["callback"];
|
|
17
18
|
function* loadSessionPolicyState() {
|
|
@@ -56,7 +57,7 @@ function* createOrUpdateSessionsPolicy({
|
|
|
56
57
|
}
|
|
57
58
|
function* sessionsPolicySaga() {
|
|
58
59
|
yield (0, _effects.takeLeading)(_reducer.actions.loadSessionsPolicy, loadSessionPolicyState);
|
|
59
|
-
yield (0, _effects.takeLatest)(_reducer.actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicy);
|
|
60
|
+
yield (0, _effects.takeLatest)(_reducer.actions.createOrUpdateSessionsPolicy, (0, _saga.securityCenterSagaWrapper)(createOrUpdateSessionsPolicy));
|
|
60
61
|
}
|
|
61
62
|
function* loadSessionPolicyStateMock() {
|
|
62
63
|
yield (0, _effects.put)(_reducer.actions.setSessionsPolicyState({
|
package/node/auth/dummy.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.usersDemo = exports.userTeamDemo2 = exports.userTeamDemo = exports.userSubTenantDemo = exports.userProfileDemo = exports.userDemo = exports.tenantsDemo = exports.ssoStateDemo = exports.sessionsMock = exports.sessionsConfigDummies = exports.samlMetadataDemo = exports.samlConfigurationDemo = exports.rolesDemo = exports.rolesAdminViewerDemo = exports.rolePermissionDemo = exports.roleDemo = exports.publicSecurityPolicy = exports.profileStateDemo = exports.policyPasswordHistoryDemo = exports.policyMfaDemo = exports.policyLockoutDemo = exports.policyDemo = exports.permissionsDemo = exports.dummyIps = exports.dummyIpConfig = exports.apiTokensDataTenantDemo = exports.apiTokensDataDemo = exports.allUsersDemo = exports.allGroupsDummy = void 0;
|
|
7
|
+
exports.usersDemo = exports.userTeamDemo2 = exports.userTeamDemo = exports.userSubTenantDemo = exports.userProfileDemo = exports.userDemo = exports.tenantsDemo = exports.ssoStateDemo = exports.sessionsMock = exports.sessionsConfigDummies = exports.securityCenterRecommendationsMock = exports.securityCenterInsightsMock = exports.samlMetadataDemo = exports.samlConfigurationDemo = exports.rolesDemo = exports.rolesAdminViewerDemo = exports.rolePermissionDemo = exports.roleDemo = exports.publicSecurityPolicy = exports.profileStateDemo = exports.policyPasswordHistoryDemo = exports.policyMfaDemo = exports.policyLockoutDemo = exports.policyDemo = exports.permissionsDemo = exports.dummyIps = exports.dummyIpConfig = exports.apiTokensDataTenantDemo = exports.apiTokensDataDemo = exports.allUsersDemo = exports.allGroupsDummy = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _restApi = require("@frontegg/rest-api");
|
|
10
10
|
var _interfaces = require("./ApiTokensState/interfaces");
|
|
@@ -507,4 +507,63 @@ const allGroupsDummy = [{
|
|
|
507
507
|
roles: [generateRoleByName('Viewer')],
|
|
508
508
|
managedBy: _restApi.GroupManagedByEnum.FRONTEGG
|
|
509
509
|
}];
|
|
510
|
-
exports.allGroupsDummy = allGroupsDummy;
|
|
510
|
+
exports.allGroupsDummy = allGroupsDummy;
|
|
511
|
+
const securityCenterRecommendationsMock = {
|
|
512
|
+
scoring: {
|
|
513
|
+
score: 79
|
|
514
|
+
},
|
|
515
|
+
recommendations: {
|
|
516
|
+
items: [{
|
|
517
|
+
code: _restApi.RecommendationCode.FORCE_MFA,
|
|
518
|
+
severity: _restApi.RecommendationSeverity.WARNING,
|
|
519
|
+
category: _restApi.SecurityCategory.MFA
|
|
520
|
+
}, {
|
|
521
|
+
code: _restApi.RecommendationCode.ENABLE_FORCE_RELOGIN,
|
|
522
|
+
severity: _restApi.RecommendationSeverity.WARNING,
|
|
523
|
+
category: _restApi.SecurityCategory.SESSIONS
|
|
524
|
+
}]
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
exports.securityCenterRecommendationsMock = securityCenterRecommendationsMock;
|
|
528
|
+
const securityCenterInsightsMock = {
|
|
529
|
+
insights: {
|
|
530
|
+
items: [{
|
|
531
|
+
category: _restApi.SecurityCategory.MFA,
|
|
532
|
+
code: _restApi.InsightCode.PARTIALLY_FORCED_MFA,
|
|
533
|
+
metadata: {
|
|
534
|
+
totalUsers: 2,
|
|
535
|
+
mfa: {
|
|
536
|
+
enrolledUsersCount: 1
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}, {
|
|
540
|
+
category: _restApi.SecurityCategory.SESSIONS,
|
|
541
|
+
code: _restApi.InsightCode.PARTIAL_SESSION_SETTINGS,
|
|
542
|
+
metadata: {
|
|
543
|
+
totalUsers: 2,
|
|
544
|
+
sessions: {
|
|
545
|
+
idleTimeoutRecommendation: 1800
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}, {
|
|
549
|
+
category: _restApi.SecurityCategory.PASSWORD,
|
|
550
|
+
code: _restApi.InsightCode.IMPROVE_PASSWORD_HISTORY_POLICY,
|
|
551
|
+
metadata: {
|
|
552
|
+
password: {
|
|
553
|
+
userLockoutRecommendation: 5,
|
|
554
|
+
historyRecommendations: 5
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}, {
|
|
558
|
+
category: _restApi.SecurityCategory.DOMAIN,
|
|
559
|
+
code: _restApi.InsightCode.NO_IP_RESTRICTIONS,
|
|
560
|
+
metadata: {
|
|
561
|
+
restrictions: {
|
|
562
|
+
ipsCount: 1,
|
|
563
|
+
domainsCount: 1
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}]
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
exports.securityCenterInsightsMock = securityCenterInsightsMock;
|
package/node/auth/saga.js
CHANGED
|
@@ -33,8 +33,9 @@ var _saga24 = require("./GroupsState/saga");
|
|
|
33
33
|
var _saga25 = require("./CustomLoginState/saga");
|
|
34
34
|
var _saga26 = require("./MSP/AllAccountsState/saga");
|
|
35
35
|
var _saga27 = require("./Entitlements/saga");
|
|
36
|
+
var _saga28 = require("./SecurityCenterState/saga");
|
|
36
37
|
function* sagas() {
|
|
37
|
-
yield (0, _effects.all)([(0, _effects.call)(_saga8.loginSagas), (0, _effects.call)(_saga6.activateSagas), (0, _effects.call)(_saga7.acceptInvitationSagas), (0, _effects.call)(_saga5.forgotPasswordSagas), (0, _effects.call)(_saga17.resetPhoneNumberSagas), (0, _effects.call)(_saga.ssoSagas), (0, _effects.call)(_saga2.ssoSagas), (0, _effects.call)(_saga3.profileSagas), (0, _effects.call)(_saga25.customLoginSagas), (0, _effects.call)(_saga4.mfaSagas), (0, _effects.call)(_saga9.teamSagas), (0, _effects.call)(_saga24.groupsSagas), (0, _effects.call)(_saga10.socialLoginsSaga), (0, _effects.call)(_saga11.signUpSaga), (0, _effects.call)(_saga12.apiTokensSaga), (0, _effects.call)(_saga13.securityPolicySagas), (0, _effects.call)(_saga14.accountSettingsSaga), (0, _effects.call)(_saga15.tenantsSagas), (0, _effects.call)(_saga16.rolesSagas), (0, _effects.call)(_saga18.sessionsSaga), (0, _effects.call)(_saga19.sessionsPolicySaga), (0, _effects.call)(_saga20.restrictionsSagas), (0, _effects.call)(_saga21.provisionSagas), (0, _effects.call)(_saga22.impersonateSagas), (0, _effects.call)(_saga23.passkeysSagas), (0, _effects.call)(_saga26.allAccountsSagas), (0, _effects.call)(_saga27.entitlementsSagas)]);
|
|
38
|
+
yield (0, _effects.all)([(0, _effects.call)(_saga8.loginSagas), (0, _effects.call)(_saga6.activateSagas), (0, _effects.call)(_saga7.acceptInvitationSagas), (0, _effects.call)(_saga5.forgotPasswordSagas), (0, _effects.call)(_saga17.resetPhoneNumberSagas), (0, _effects.call)(_saga.ssoSagas), (0, _effects.call)(_saga2.ssoSagas), (0, _effects.call)(_saga3.profileSagas), (0, _effects.call)(_saga25.customLoginSagas), (0, _effects.call)(_saga4.mfaSagas), (0, _effects.call)(_saga9.teamSagas), (0, _effects.call)(_saga24.groupsSagas), (0, _effects.call)(_saga10.socialLoginsSaga), (0, _effects.call)(_saga11.signUpSaga), (0, _effects.call)(_saga12.apiTokensSaga), (0, _effects.call)(_saga13.securityPolicySagas), (0, _effects.call)(_saga14.accountSettingsSaga), (0, _effects.call)(_saga15.tenantsSagas), (0, _effects.call)(_saga16.rolesSagas), (0, _effects.call)(_saga18.sessionsSaga), (0, _effects.call)(_saga19.sessionsPolicySaga), (0, _effects.call)(_saga20.restrictionsSagas), (0, _effects.call)(_saga21.provisionSagas), (0, _effects.call)(_saga22.impersonateSagas), (0, _effects.call)(_saga23.passkeysSagas), (0, _effects.call)(_saga26.allAccountsSagas), (0, _effects.call)(_saga27.entitlementsSagas), (0, _effects.call)(_saga28.securityCenterSagas)]);
|
|
38
39
|
}
|
|
39
40
|
function* mockSagas() {
|
|
40
41
|
yield (0, _effects.all)([(0, _effects.call)(_saga8.loginSagasMock),
|
|
@@ -43,5 +44,5 @@ function* mockSagas() {
|
|
|
43
44
|
// call(forgotPasswordSagas),
|
|
44
45
|
// call(socialLoginsSaga),
|
|
45
46
|
// call(signUpSaga),
|
|
46
|
-
(0, _effects.call)(_saga.ssoSagasMock), (0, _effects.call)(_saga3.profileSagasMock), (0, _effects.call)(_saga4.mfaSagasMock), (0, _effects.call)(_saga9.teamSagasMock), (0, _effects.call)(_saga12.apiTokensSagaMock), (0, _effects.call)(_saga13.securityPolicySagasMock), (0, _effects.call)(_saga18.sessionsSagaMock), (0, _effects.call)(_saga14.accountSettingsSagaMock), (0, _effects.call)(_saga15.tenantsSagasMock), (0, _effects.call)(_saga19.sessionsPolicySagaMock), (0, _effects.call)(_saga20.restrictionsSagaMock), (0, _effects.call)(_saga16.rolesSagasMock), (0, _effects.call)(_saga24.groupsSagasMock)]);
|
|
47
|
+
(0, _effects.call)(_saga.ssoSagasMock), (0, _effects.call)(_saga3.profileSagasMock), (0, _effects.call)(_saga4.mfaSagasMock), (0, _effects.call)(_saga9.teamSagasMock), (0, _effects.call)(_saga12.apiTokensSagaMock), (0, _effects.call)(_saga13.securityPolicySagasMock), (0, _effects.call)(_saga18.sessionsSagaMock), (0, _effects.call)(_saga14.accountSettingsSagaMock), (0, _effects.call)(_saga15.tenantsSagasMock), (0, _effects.call)(_saga19.sessionsPolicySagaMock), (0, _effects.call)(_saga20.restrictionsSagaMock), (0, _effects.call)(_saga16.rolesSagasMock), (0, _effects.call)(_saga24.groupsSagasMock), (0, _effects.call)(_saga28.securityCenterSagasMock)]);
|
|
47
48
|
}
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
|
-
"version": "6.127.0
|
|
3
|
+
"version": "6.127.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/rest-api": "3.1.
|
|
9
|
+
"@frontegg/rest-api": "3.1.9",
|
|
10
10
|
"@reduxjs/toolkit": "1.8.5",
|
|
11
11
|
"fast-deep-equal": "3.1.3",
|
|
12
12
|
"redux-saga": "^1.2.1",
|
|
@@ -24,10 +24,10 @@ export declare function loadSummaries(tenantId: string, forceActive?: boolean):
|
|
|
24
24
|
payload: string | null;
|
|
25
25
|
type: string;
|
|
26
26
|
}>, void, ISubscriptionSummariesResponse & [undefined, IPlanResponse] & ISubscriptionResponse & IPlanResponse>;
|
|
27
|
-
export declare function loadSummariesMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
27
|
+
export declare function loadSummariesMock(): Generator<import("redux-saga/effects").CallEffect<true> | import("redux-saga/effects").PutEffect<{
|
|
28
28
|
payload: boolean;
|
|
29
29
|
type: string;
|
|
30
|
-
}> | import("redux-saga/effects").
|
|
30
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
31
31
|
payload: Partial<import("./interfaces").BillingInformationState>;
|
|
32
32
|
type: string;
|
|
33
33
|
}>, void, unknown>;
|