@frontegg/redux-store 6.138.0-alpha.0 → 6.138.0-alpha.2
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/Security/SecurityCenterState/saga.d.ts +28 -7
- package/auth/Security/SecurityCenterState/saga.js +67 -1
- package/auth/Security/SecurityCenterState/types.d.ts +3 -5
- package/auth/TeamState/interfaces.d.ts +4 -1
- package/auth/dummy.d.ts +8 -1
- package/auth/dummy.js +60 -0
- package/index.js +1 -1
- package/node/auth/Security/SecurityCenterState/saga.js +69 -0
- package/node/auth/dummy.js +68 -2
- package/node/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetRecommendationsResponse, GetInsightsResponse, ISearchUserQueryParamsV3, FronteggPaginationWrapper, IRole, GetUserRolesResponse, IBaseGetUserResponse } from '@frontegg/rest-api';
|
|
2
|
-
import { ISecurityCenterTable, LoadUsersTableSecurityCenter
|
|
3
|
-
import { PayloadAction, WithCallback } from '../../../index';
|
|
2
|
+
import { ISecurityCenterTable, LoadUsersTableSecurityCenter } from './types';
|
|
3
|
+
import { IUserV3, PayloadAction, WithCallback } from '../../../index';
|
|
4
4
|
/**
|
|
5
5
|
* This function is used to wrap sagas of the security page.
|
|
6
6
|
* This function returns function,
|
|
@@ -46,7 +46,7 @@ export declare function sendBulkResetBreachedPasswordEmails({ payload: { callbac
|
|
|
46
46
|
* and returns the combined object of those users with their roles.
|
|
47
47
|
* @param users - array of users
|
|
48
48
|
*/
|
|
49
|
-
export declare function getUsersWithRoles(users: IBaseGetUserResponse[]): Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>,
|
|
49
|
+
export declare function getUsersWithRoles(users: IBaseGetUserResponse[]): Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>, IUserV3[], IRole[] & GetUserRolesResponse[]>;
|
|
50
50
|
/**
|
|
51
51
|
* This function is doing the logic needed in order to display a table in a generic way.
|
|
52
52
|
* It calls getUsersV3 based on the params, combined the response of users with roles,
|
|
@@ -66,28 +66,28 @@ export declare function loadUsersTableSecurityCenter({ key, tableState, updateSt
|
|
|
66
66
|
}> | import("redux-saga/effects").PutEffect<{
|
|
67
67
|
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
68
68
|
type: string;
|
|
69
|
-
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>,
|
|
69
|
+
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>, IUserV3[], IRole[] & GetUserRolesResponse[]> | import("redux-saga/effects").CallEffect<FronteggPaginationWrapper<IBaseGetUserResponse>>, void, FronteggPaginationWrapper<IBaseGetUserResponse> & IUserV3[]>;
|
|
70
70
|
export declare function loadBreachedPasswordUsers({ payload }: PayloadAction<ISearchUserQueryParamsV3>): Generator<import("redux-saga/effects").SelectEffect | Generator<import("redux-saga/effects").PutEffect<{
|
|
71
71
|
payload: import("./types").SecurityCenterStateIndicator;
|
|
72
72
|
type: string;
|
|
73
73
|
}> | import("redux-saga/effects").PutEffect<{
|
|
74
74
|
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
75
75
|
type: string;
|
|
76
|
-
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>,
|
|
76
|
+
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>, IUserV3[], IRole[] & GetUserRolesResponse[]> | import("redux-saga/effects").CallEffect<FronteggPaginationWrapper<IBaseGetUserResponse>>, void, FronteggPaginationWrapper<IBaseGetUserResponse> & IUserV3[]>, void, ISecurityCenterTable>;
|
|
77
77
|
export declare function loadUnenrolledMfaUsers({ payload }: PayloadAction<ISearchUserQueryParamsV3>): Generator<import("redux-saga/effects").SelectEffect | Generator<import("redux-saga/effects").PutEffect<{
|
|
78
78
|
payload: import("./types").SecurityCenterStateIndicator;
|
|
79
79
|
type: string;
|
|
80
80
|
}> | import("redux-saga/effects").PutEffect<{
|
|
81
81
|
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
82
82
|
type: string;
|
|
83
|
-
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>,
|
|
83
|
+
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>, IUserV3[], IRole[] & GetUserRolesResponse[]> | import("redux-saga/effects").CallEffect<FronteggPaginationWrapper<IBaseGetUserResponse>>, void, FronteggPaginationWrapper<IBaseGetUserResponse> & IUserV3[]>, void, ISecurityCenterTable>;
|
|
84
84
|
export declare function loadInactiveUsers({ payload }: PayloadAction<ISearchUserQueryParamsV3>): Generator<import("redux-saga/effects").SelectEffect | Generator<import("redux-saga/effects").PutEffect<{
|
|
85
85
|
payload: import("./types").SecurityCenterStateIndicator;
|
|
86
86
|
type: string;
|
|
87
87
|
}> | import("redux-saga/effects").PutEffect<{
|
|
88
88
|
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
89
89
|
type: string;
|
|
90
|
-
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>,
|
|
90
|
+
}> | Generator<import("redux-saga/effects").CallEffect<IRole[]> | import("redux-saga/effects").CallEffect<GetUserRolesResponse[]>, IUserV3[], IRole[] & GetUserRolesResponse[]> | import("redux-saga/effects").CallEffect<FronteggPaginationWrapper<IBaseGetUserResponse>>, void, FronteggPaginationWrapper<IBaseGetUserResponse> & IUserV3[]>, void, ISecurityCenterTable>;
|
|
91
91
|
export declare function securityCenterSagas(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
92
92
|
export declare function loadRecommendationsMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
93
93
|
payload: import("./types").SecurityCenterStateIndicator;
|
|
@@ -103,4 +103,25 @@ export declare function loadInsightsMock(): Generator<import("redux-saga/effects
|
|
|
103
103
|
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
104
104
|
type: string;
|
|
105
105
|
}> | import("redux-saga/effects").CallEffect<true>, void, unknown>;
|
|
106
|
+
export declare function loadBreachedPasswordUsersMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
107
|
+
payload: import("./types").SecurityCenterStateIndicator;
|
|
108
|
+
type: string;
|
|
109
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
110
|
+
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
111
|
+
type: string;
|
|
112
|
+
}> | import("redux-saga/effects").CallEffect<true>, void, unknown>;
|
|
113
|
+
export declare function loadUnenrolledMfaUsersMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
114
|
+
payload: import("./types").SecurityCenterStateIndicator;
|
|
115
|
+
type: string;
|
|
116
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
117
|
+
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
118
|
+
type: string;
|
|
119
|
+
}> | import("redux-saga/effects").CallEffect<true>, void, unknown>;
|
|
120
|
+
export declare function loadInactiveUsersMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
121
|
+
payload: import("./types").SecurityCenterStateIndicator;
|
|
122
|
+
type: string;
|
|
123
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
124
|
+
payload: Partial<import("./interfaces").SecurityCenterState>;
|
|
125
|
+
type: string;
|
|
126
|
+
}> | import("redux-saga/effects").CallEffect<true>, void, unknown>;
|
|
106
127
|
export declare function securityCenterSagasMock(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
@@ -7,7 +7,7 @@ import { errorHandler } from '../../../utils';
|
|
|
7
7
|
import { api, GetUsersFilterPreset } from '@frontegg/rest-api';
|
|
8
8
|
import { SecurityCenterStateKeys } from './types';
|
|
9
9
|
import { getFeatureFlags } from '../../../index';
|
|
10
|
-
import { securityCenterInsightsMock, securityCenterRecommendationsMock } from '../../dummy';
|
|
10
|
+
import { securityCenterBreachedPasswordUsersMock, securityCenterInactivityPasswordUsersMock, securityCenterInsightsMock, securityCenterRecommendationsMock, securityCenterUnenrolledMfaUsersMock } from '../../dummy';
|
|
11
11
|
/**
|
|
12
12
|
* This function is used to wrap sagas of the security page.
|
|
13
13
|
* This function returns function,
|
|
@@ -347,7 +347,73 @@ export function* loadInsightsMock() {
|
|
|
347
347
|
value: false
|
|
348
348
|
}));
|
|
349
349
|
}
|
|
350
|
+
export function* loadBreachedPasswordUsersMock() {
|
|
351
|
+
const key = SecurityCenterStateKeys.BREACHED_PASSWORD_USERS_TABLE;
|
|
352
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
353
|
+
key,
|
|
354
|
+
value: true
|
|
355
|
+
}));
|
|
356
|
+
yield delay(500);
|
|
357
|
+
yield put(actions.setSecurityCenterState({
|
|
358
|
+
breachedPasswordUsersTable: securityCenterBreachedPasswordUsersMock
|
|
359
|
+
}));
|
|
360
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
361
|
+
key,
|
|
362
|
+
value: false
|
|
363
|
+
}));
|
|
364
|
+
}
|
|
365
|
+
export function* loadUnenrolledMfaUsersMock() {
|
|
366
|
+
const key = SecurityCenterStateKeys.UNENROLLED_MFA_USERS_TABLE;
|
|
367
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
368
|
+
key,
|
|
369
|
+
value: true
|
|
370
|
+
}));
|
|
371
|
+
yield delay(500);
|
|
372
|
+
yield put(actions.setSecurityCenterState({
|
|
373
|
+
unenrolledMfaUsersTable: securityCenterUnenrolledMfaUsersMock
|
|
374
|
+
}));
|
|
375
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
376
|
+
key,
|
|
377
|
+
value: false
|
|
378
|
+
}));
|
|
379
|
+
}
|
|
380
|
+
export function* loadInactiveUsersMock() {
|
|
381
|
+
const key = SecurityCenterStateKeys.INACTIVE_USERS_TABLE;
|
|
382
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
383
|
+
key,
|
|
384
|
+
value: true
|
|
385
|
+
}));
|
|
386
|
+
yield delay(500);
|
|
387
|
+
yield put(actions.setSecurityCenterState({
|
|
388
|
+
inactiveUsersTable: securityCenterInactivityPasswordUsersMock
|
|
389
|
+
}));
|
|
390
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
391
|
+
key,
|
|
392
|
+
value: false
|
|
393
|
+
}));
|
|
394
|
+
}
|
|
395
|
+
function* sendResetBreachedPasswordEmailMock({
|
|
396
|
+
payload: {
|
|
397
|
+
callback
|
|
398
|
+
}
|
|
399
|
+
}) {
|
|
400
|
+
const key = SecurityCenterStateKeys.SEND_BREACHED_PASSWORD_EMAIL;
|
|
401
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
402
|
+
key,
|
|
403
|
+
value: true
|
|
404
|
+
}));
|
|
405
|
+
yield delay(500);
|
|
406
|
+
callback == null ? void 0 : callback(true);
|
|
407
|
+
yield put(actions.setSecurityCenterStateLoader({
|
|
408
|
+
key,
|
|
409
|
+
value: false
|
|
410
|
+
}));
|
|
411
|
+
}
|
|
350
412
|
export function* securityCenterSagasMock() {
|
|
351
413
|
yield takeEvery(actions.loadRecommendations, loadRecommendationsMock);
|
|
352
414
|
yield takeEvery(actions.loadInsights, loadInsightsMock);
|
|
415
|
+
yield takeEvery(actions.loadBreachedPasswordUsers, loadBreachedPasswordUsersMock);
|
|
416
|
+
yield takeEvery(actions.loadUnenrolledMfaUsers, loadUnenrolledMfaUsersMock);
|
|
417
|
+
yield takeEvery(actions.loadInactiveUsers, loadInactiveUsersMock);
|
|
418
|
+
yield takeEvery(actions.sendResetBreachedPasswordEmail, sendResetBreachedPasswordEmailMock);
|
|
353
419
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISearchUserQueryParamsV3 } from '@frontegg/rest-api';
|
|
2
|
+
import { IUserV3 } from '../../TeamState/interfaces';
|
|
2
3
|
export declare enum SecurityCenterStateKeys {
|
|
3
4
|
RECOMMENDATIONS = "recommendations",
|
|
4
5
|
INSIGHTS = "insights",
|
|
@@ -12,11 +13,8 @@ export declare type SecurityCenterStateIndicator = {
|
|
|
12
13
|
key: SecurityCenterStateKeys;
|
|
13
14
|
value: boolean | string;
|
|
14
15
|
};
|
|
15
|
-
export declare type TUser = IUsersV3Data & {
|
|
16
|
-
roles?: IRole[];
|
|
17
|
-
};
|
|
18
16
|
export interface ISecurityCenterTable {
|
|
19
|
-
users?:
|
|
17
|
+
users?: IUserV3[];
|
|
20
18
|
totalUsersItems?: number;
|
|
21
19
|
totalUsersPages?: number;
|
|
22
20
|
usersPageOffset?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITeamUserRole, ITeamUser, ITeamUserPermission, ISubTenantUser, SortByEnum, ISearchUserQueryParamsV2, QueryFilter, QuerySort } from '@frontegg/rest-api';
|
|
1
|
+
import { ITeamUserRole, ITeamUser, ITeamUserPermission, ISubTenantUser, SortByEnum, ISearchUserQueryParamsV2, QueryFilter, QuerySort, IRole, IUsersV3Data } from '@frontegg/rest-api';
|
|
2
2
|
import { GroupsState } from '../GroupsState/interfaces';
|
|
3
3
|
import { LoaderIndicatorState, WithCallback } from '../../interfaces';
|
|
4
4
|
export declare enum TeamStateKeys {
|
|
@@ -98,4 +98,7 @@ export interface IGetUsersV2Payload {
|
|
|
98
98
|
order?: ISearchUserQueryParamsV2['_order'];
|
|
99
99
|
shouldShowSubTenantUsersIfReseller?: ISearchUserQueryParamsV2['_includeSubTenants'];
|
|
100
100
|
}
|
|
101
|
+
export interface IUserV3 extends IUsersV3Data {
|
|
102
|
+
roles?: IRole[];
|
|
103
|
+
}
|
|
101
104
|
export {};
|
package/auth/dummy.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { IGroup } from '../auth/GroupsState/interfaces';
|
|
|
4
4
|
import { User } from './interfaces';
|
|
5
5
|
import { ProfileState } from './ProfileState/interfaces';
|
|
6
6
|
import { SSOState } from './SSOState/interfaces';
|
|
7
|
-
import { ITeamStateUser } from './TeamState/interfaces';
|
|
7
|
+
import { ITeamStateUser, IUserV3 } from './TeamState/interfaces';
|
|
8
|
+
import { ISecurityCenterTable } from './Security/SecurityCenterState/types';
|
|
8
9
|
export declare const apiTokensDataDemo: IApiTokensData;
|
|
9
10
|
export declare const apiTokensDataTenantDemo: ITenantApiTokensData;
|
|
10
11
|
export declare const rolesAdminViewerDemo: IRole[];
|
|
@@ -24,9 +25,12 @@ export declare const rolesDemo: ITeamUserRole[];
|
|
|
24
25
|
export declare const ssoStateDemo: SSOState;
|
|
25
26
|
export declare const permissionsDemo: ITeamUserPermission[];
|
|
26
27
|
export declare const userTeamDemo2: ITeamStateUser;
|
|
28
|
+
export declare const userTeamDemo2V3: IUserV3;
|
|
27
29
|
export declare const userTeamDemo: ITeamStateUser;
|
|
30
|
+
export declare const userTeamDemoV3: IUserV3;
|
|
28
31
|
export declare const userSubTenantDemo: ISubTenantUser;
|
|
29
32
|
export declare const usersDemo: ITeamUser[];
|
|
33
|
+
export declare const usersDemoV3: IUserV3[];
|
|
30
34
|
export declare const allUsersDemo: ISubTenantUser[];
|
|
31
35
|
export declare const tenantsDemo: ITenantsResponse[];
|
|
32
36
|
export declare const sessionsMock: ISessionResponse[];
|
|
@@ -36,3 +40,6 @@ export declare const dummyIps: IpRestriction[];
|
|
|
36
40
|
export declare const allGroupsDummy: IGroup[];
|
|
37
41
|
export declare const securityCenterRecommendationsMock: GetRecommendationsResponse;
|
|
38
42
|
export declare const securityCenterInsightsMock: GetInsightsResponse;
|
|
43
|
+
export declare const securityCenterBreachedPasswordUsersMock: ISecurityCenterTable;
|
|
44
|
+
export declare const securityCenterInactivityPasswordUsersMock: ISecurityCenterTable;
|
|
45
|
+
export declare const securityCenterUnenrolledMfaUsersMock: ISecurityCenterTable;
|
package/auth/dummy.js
CHANGED
|
@@ -227,6 +227,24 @@ export const userTeamDemo2 = {
|
|
|
227
227
|
}]
|
|
228
228
|
}; // TODO add verified to ITeamUser
|
|
229
229
|
|
|
230
|
+
export const userTeamDemo2V3 = {
|
|
231
|
+
id: userTeamDemo2.id,
|
|
232
|
+
email: userTeamDemo2.email,
|
|
233
|
+
name: userTeamDemo2.name,
|
|
234
|
+
phoneNumber: undefined,
|
|
235
|
+
profileImage: undefined,
|
|
236
|
+
tenantId: 'tenantId',
|
|
237
|
+
activatedForTenant: true,
|
|
238
|
+
createdAt: new Date(2022, 4, 1),
|
|
239
|
+
verified: true,
|
|
240
|
+
lastLogin: new Date(2022, 5, 25),
|
|
241
|
+
mfaEnrolled: false,
|
|
242
|
+
roles: [rolesAdminViewerDemo[1]],
|
|
243
|
+
tenantIds: [],
|
|
244
|
+
metadata: '',
|
|
245
|
+
sub: '',
|
|
246
|
+
tenants: []
|
|
247
|
+
};
|
|
230
248
|
export const userTeamDemo = {
|
|
231
249
|
id: 'id',
|
|
232
250
|
email: 'demo-user@frontegg.com',
|
|
@@ -252,6 +270,24 @@ export const userTeamDemo = {
|
|
|
252
270
|
managedBy: GroupManagedByEnum.FRONTEGG
|
|
253
271
|
}]
|
|
254
272
|
};
|
|
273
|
+
export const userTeamDemoV3 = {
|
|
274
|
+
id: userTeamDemo.id,
|
|
275
|
+
email: userTeamDemo.email,
|
|
276
|
+
name: userTeamDemo.name,
|
|
277
|
+
phoneNumber: undefined,
|
|
278
|
+
profileImage: undefined,
|
|
279
|
+
tenantId: 'tenantId',
|
|
280
|
+
activatedForTenant: true,
|
|
281
|
+
createdAt: new Date(2022, 4, 1),
|
|
282
|
+
verified: true,
|
|
283
|
+
lastLogin: new Date(2022, 5, 25),
|
|
284
|
+
mfaEnrolled: false,
|
|
285
|
+
roles: [rolesAdminViewerDemo[1]],
|
|
286
|
+
tenantIds: [],
|
|
287
|
+
metadata: '',
|
|
288
|
+
sub: '',
|
|
289
|
+
tenants: []
|
|
290
|
+
};
|
|
255
291
|
export const userSubTenantDemo = {
|
|
256
292
|
metadata: '',
|
|
257
293
|
mfaEnrolled: false,
|
|
@@ -267,6 +303,7 @@ export const userSubTenantDemo = {
|
|
|
267
303
|
createdAt: new Date()
|
|
268
304
|
};
|
|
269
305
|
export const usersDemo = [userTeamDemo, userTeamDemo2];
|
|
306
|
+
export const usersDemoV3 = [userTeamDemoV3, userTeamDemo2V3];
|
|
270
307
|
export const allUsersDemo = [userSubTenantDemo];
|
|
271
308
|
export const tenantsDemo = [{
|
|
272
309
|
id: 'my-tenant-id',
|
|
@@ -529,4 +566,27 @@ export const securityCenterInsightsMock = {
|
|
|
529
566
|
}
|
|
530
567
|
}]
|
|
531
568
|
}
|
|
569
|
+
};
|
|
570
|
+
export const securityCenterBreachedPasswordUsersMock = {
|
|
571
|
+
users: usersDemoV3,
|
|
572
|
+
totalUsersItems: 2,
|
|
573
|
+
totalUsersPages: 1,
|
|
574
|
+
usersPageOffset: 0
|
|
575
|
+
};
|
|
576
|
+
export const securityCenterInactivityPasswordUsersMock = {
|
|
577
|
+
users: [usersDemoV3[0]],
|
|
578
|
+
totalUsersItems: 1,
|
|
579
|
+
totalUsersPages: 1,
|
|
580
|
+
usersPageOffset: 0,
|
|
581
|
+
queryParams: {
|
|
582
|
+
_presetParams: {
|
|
583
|
+
_maxInactiveSeconds: 7776000
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
export const securityCenterUnenrolledMfaUsersMock = {
|
|
588
|
+
users: [usersDemoV3[1]],
|
|
589
|
+
totalUsersItems: 1,
|
|
590
|
+
totalUsersPages: 1,
|
|
591
|
+
usersPageOffset: 0
|
|
532
592
|
};
|
package/index.js
CHANGED
|
@@ -6,12 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getUsersWithRoles = getUsersWithRoles;
|
|
8
8
|
exports.loadBreachedPasswordUsers = loadBreachedPasswordUsers;
|
|
9
|
+
exports.loadBreachedPasswordUsersMock = loadBreachedPasswordUsersMock;
|
|
9
10
|
exports.loadInactiveUsers = loadInactiveUsers;
|
|
11
|
+
exports.loadInactiveUsersMock = loadInactiveUsersMock;
|
|
10
12
|
exports.loadInsights = loadInsights;
|
|
11
13
|
exports.loadInsightsMock = loadInsightsMock;
|
|
12
14
|
exports.loadRecommendations = loadRecommendations;
|
|
13
15
|
exports.loadRecommendationsMock = loadRecommendationsMock;
|
|
14
16
|
exports.loadUnenrolledMfaUsers = loadUnenrolledMfaUsers;
|
|
17
|
+
exports.loadUnenrolledMfaUsersMock = loadUnenrolledMfaUsersMock;
|
|
15
18
|
exports.loadUsersTableSecurityCenter = loadUsersTableSecurityCenter;
|
|
16
19
|
exports.securityCenterSagaWrapper = securityCenterSagaWrapper;
|
|
17
20
|
exports.securityCenterSagas = securityCenterSagas;
|
|
@@ -366,7 +369,73 @@ function* loadInsightsMock() {
|
|
|
366
369
|
value: false
|
|
367
370
|
}));
|
|
368
371
|
}
|
|
372
|
+
function* loadBreachedPasswordUsersMock() {
|
|
373
|
+
const key = _types.SecurityCenterStateKeys.BREACHED_PASSWORD_USERS_TABLE;
|
|
374
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
375
|
+
key,
|
|
376
|
+
value: true
|
|
377
|
+
}));
|
|
378
|
+
yield (0, _effects.delay)(500);
|
|
379
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterState({
|
|
380
|
+
breachedPasswordUsersTable: _dummy.securityCenterBreachedPasswordUsersMock
|
|
381
|
+
}));
|
|
382
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
383
|
+
key,
|
|
384
|
+
value: false
|
|
385
|
+
}));
|
|
386
|
+
}
|
|
387
|
+
function* loadUnenrolledMfaUsersMock() {
|
|
388
|
+
const key = _types.SecurityCenterStateKeys.UNENROLLED_MFA_USERS_TABLE;
|
|
389
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
390
|
+
key,
|
|
391
|
+
value: true
|
|
392
|
+
}));
|
|
393
|
+
yield (0, _effects.delay)(500);
|
|
394
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterState({
|
|
395
|
+
unenrolledMfaUsersTable: _dummy.securityCenterUnenrolledMfaUsersMock
|
|
396
|
+
}));
|
|
397
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
398
|
+
key,
|
|
399
|
+
value: false
|
|
400
|
+
}));
|
|
401
|
+
}
|
|
402
|
+
function* loadInactiveUsersMock() {
|
|
403
|
+
const key = _types.SecurityCenterStateKeys.INACTIVE_USERS_TABLE;
|
|
404
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
405
|
+
key,
|
|
406
|
+
value: true
|
|
407
|
+
}));
|
|
408
|
+
yield (0, _effects.delay)(500);
|
|
409
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterState({
|
|
410
|
+
inactiveUsersTable: _dummy.securityCenterInactivityPasswordUsersMock
|
|
411
|
+
}));
|
|
412
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
413
|
+
key,
|
|
414
|
+
value: false
|
|
415
|
+
}));
|
|
416
|
+
}
|
|
417
|
+
function* sendResetBreachedPasswordEmailMock({
|
|
418
|
+
payload: {
|
|
419
|
+
callback
|
|
420
|
+
}
|
|
421
|
+
}) {
|
|
422
|
+
const key = _types.SecurityCenterStateKeys.SEND_BREACHED_PASSWORD_EMAIL;
|
|
423
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
424
|
+
key,
|
|
425
|
+
value: true
|
|
426
|
+
}));
|
|
427
|
+
yield (0, _effects.delay)(500);
|
|
428
|
+
callback == null ? void 0 : callback(true);
|
|
429
|
+
yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
|
|
430
|
+
key,
|
|
431
|
+
value: false
|
|
432
|
+
}));
|
|
433
|
+
}
|
|
369
434
|
function* securityCenterSagasMock() {
|
|
370
435
|
yield (0, _effects.takeEvery)(_reducer.actions.loadRecommendations, loadRecommendationsMock);
|
|
371
436
|
yield (0, _effects.takeEvery)(_reducer.actions.loadInsights, loadInsightsMock);
|
|
437
|
+
yield (0, _effects.takeEvery)(_reducer.actions.loadBreachedPasswordUsers, loadBreachedPasswordUsersMock);
|
|
438
|
+
yield (0, _effects.takeEvery)(_reducer.actions.loadUnenrolledMfaUsers, loadUnenrolledMfaUsersMock);
|
|
439
|
+
yield (0, _effects.takeEvery)(_reducer.actions.loadInactiveUsers, loadInactiveUsersMock);
|
|
440
|
+
yield (0, _effects.takeEvery)(_reducer.actions.sendResetBreachedPasswordEmail, sendResetBreachedPasswordEmailMock);
|
|
372
441
|
}
|
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.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;
|
|
7
|
+
exports.usersDemoV3 = exports.usersDemo = exports.userTeamDemoV3 = exports.userTeamDemo2V3 = exports.userTeamDemo2 = exports.userTeamDemo = exports.userSubTenantDemo = exports.userProfileDemo = exports.userDemo = exports.tenantsDemo = exports.ssoStateDemo = exports.sessionsMock = exports.sessionsConfigDummies = exports.securityCenterUnenrolledMfaUsersMock = exports.securityCenterRecommendationsMock = exports.securityCenterInsightsMock = exports.securityCenterInactivityPasswordUsersMock = exports.securityCenterBreachedPasswordUsersMock = 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");
|
|
@@ -252,6 +252,25 @@ const userTeamDemo2 = {
|
|
|
252
252
|
}]
|
|
253
253
|
}; // TODO add verified to ITeamUser
|
|
254
254
|
exports.userTeamDemo2 = userTeamDemo2;
|
|
255
|
+
const userTeamDemo2V3 = {
|
|
256
|
+
id: userTeamDemo2.id,
|
|
257
|
+
email: userTeamDemo2.email,
|
|
258
|
+
name: userTeamDemo2.name,
|
|
259
|
+
phoneNumber: undefined,
|
|
260
|
+
profileImage: undefined,
|
|
261
|
+
tenantId: 'tenantId',
|
|
262
|
+
activatedForTenant: true,
|
|
263
|
+
createdAt: new Date(2022, 4, 1),
|
|
264
|
+
verified: true,
|
|
265
|
+
lastLogin: new Date(2022, 5, 25),
|
|
266
|
+
mfaEnrolled: false,
|
|
267
|
+
roles: [rolesAdminViewerDemo[1]],
|
|
268
|
+
tenantIds: [],
|
|
269
|
+
metadata: '',
|
|
270
|
+
sub: '',
|
|
271
|
+
tenants: []
|
|
272
|
+
};
|
|
273
|
+
exports.userTeamDemo2V3 = userTeamDemo2V3;
|
|
255
274
|
const userTeamDemo = {
|
|
256
275
|
id: 'id',
|
|
257
276
|
email: 'demo-user@frontegg.com',
|
|
@@ -278,6 +297,25 @@ const userTeamDemo = {
|
|
|
278
297
|
}]
|
|
279
298
|
};
|
|
280
299
|
exports.userTeamDemo = userTeamDemo;
|
|
300
|
+
const userTeamDemoV3 = {
|
|
301
|
+
id: userTeamDemo.id,
|
|
302
|
+
email: userTeamDemo.email,
|
|
303
|
+
name: userTeamDemo.name,
|
|
304
|
+
phoneNumber: undefined,
|
|
305
|
+
profileImage: undefined,
|
|
306
|
+
tenantId: 'tenantId',
|
|
307
|
+
activatedForTenant: true,
|
|
308
|
+
createdAt: new Date(2022, 4, 1),
|
|
309
|
+
verified: true,
|
|
310
|
+
lastLogin: new Date(2022, 5, 25),
|
|
311
|
+
mfaEnrolled: false,
|
|
312
|
+
roles: [rolesAdminViewerDemo[1]],
|
|
313
|
+
tenantIds: [],
|
|
314
|
+
metadata: '',
|
|
315
|
+
sub: '',
|
|
316
|
+
tenants: []
|
|
317
|
+
};
|
|
318
|
+
exports.userTeamDemoV3 = userTeamDemoV3;
|
|
281
319
|
const userSubTenantDemo = {
|
|
282
320
|
metadata: '',
|
|
283
321
|
mfaEnrolled: false,
|
|
@@ -295,6 +333,8 @@ const userSubTenantDemo = {
|
|
|
295
333
|
exports.userSubTenantDemo = userSubTenantDemo;
|
|
296
334
|
const usersDemo = [userTeamDemo, userTeamDemo2];
|
|
297
335
|
exports.usersDemo = usersDemo;
|
|
336
|
+
const usersDemoV3 = [userTeamDemoV3, userTeamDemo2V3];
|
|
337
|
+
exports.usersDemoV3 = usersDemoV3;
|
|
298
338
|
const allUsersDemo = [userSubTenantDemo];
|
|
299
339
|
exports.allUsersDemo = allUsersDemo;
|
|
300
340
|
const tenantsDemo = [{
|
|
@@ -566,4 +606,30 @@ const securityCenterInsightsMock = {
|
|
|
566
606
|
}]
|
|
567
607
|
}
|
|
568
608
|
};
|
|
569
|
-
exports.securityCenterInsightsMock = securityCenterInsightsMock;
|
|
609
|
+
exports.securityCenterInsightsMock = securityCenterInsightsMock;
|
|
610
|
+
const securityCenterBreachedPasswordUsersMock = {
|
|
611
|
+
users: usersDemoV3,
|
|
612
|
+
totalUsersItems: 2,
|
|
613
|
+
totalUsersPages: 1,
|
|
614
|
+
usersPageOffset: 0
|
|
615
|
+
};
|
|
616
|
+
exports.securityCenterBreachedPasswordUsersMock = securityCenterBreachedPasswordUsersMock;
|
|
617
|
+
const securityCenterInactivityPasswordUsersMock = {
|
|
618
|
+
users: [usersDemoV3[0]],
|
|
619
|
+
totalUsersItems: 1,
|
|
620
|
+
totalUsersPages: 1,
|
|
621
|
+
usersPageOffset: 0,
|
|
622
|
+
queryParams: {
|
|
623
|
+
_presetParams: {
|
|
624
|
+
_maxInactiveSeconds: 7776000
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
exports.securityCenterInactivityPasswordUsersMock = securityCenterInactivityPasswordUsersMock;
|
|
629
|
+
const securityCenterUnenrolledMfaUsersMock = {
|
|
630
|
+
users: [usersDemoV3[1]],
|
|
631
|
+
totalUsersItems: 1,
|
|
632
|
+
totalUsersPages: 1,
|
|
633
|
+
usersPageOffset: 0
|
|
634
|
+
};
|
|
635
|
+
exports.securityCenterUnenrolledMfaUsersMock = securityCenterUnenrolledMfaUsersMock;
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
|
-
"version": "6.138.0-alpha.
|
|
3
|
+
"version": "6.138.0-alpha.2",
|
|
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.18",
|
|
10
10
|
"@reduxjs/toolkit": "1.8.5",
|
|
11
11
|
"fast-deep-equal": "3.1.3",
|
|
12
12
|
"redux-saga": "^1.2.1",
|