@frontegg/redux-store 6.50.0 → 6.51.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/AcceptInvitationState/index.d.ts +2 -0
- package/auth/AccountSettingsState/index.d.ts +2 -8
- package/auth/ActivateState/index.d.ts +15 -0
- package/auth/ApiTokensState/index.d.ts +2 -0
- package/auth/ForgotPasswordState/index.d.ts +2 -0
- package/auth/LoginState/index.d.ts +2 -0
- package/auth/MfaState/index.d.ts +2 -0
- package/auth/ProfileState/index.d.ts +2 -0
- package/auth/Provisioning/index.d.ts +110 -0
- package/auth/Provisioning/index.js +37 -0
- package/auth/Provisioning/interfaces.d.ts +6 -0
- package/auth/Provisioning/interfaces.js +1 -0
- package/auth/Provisioning/saga.d.ts +1 -0
- package/auth/Provisioning/saga.js +132 -0
- package/auth/ResetPhoneNumberState/index.d.ts +2 -0
- package/auth/RestrictionsState/index.d.ts +3 -0
- package/auth/RestrictionsState/saga.js +18 -11
- package/auth/RolesState/index.d.ts +2 -0
- package/auth/SSOState/index.d.ts +2 -0
- package/auth/SecurityPolicyState/index.d.ts +11 -0
- package/auth/SessionsPolicyState/index.d.ts +2 -0
- package/auth/SessionsState/index.d.ts +2 -0
- package/auth/SignUp/index.d.ts +2 -0
- package/auth/SocialLogins/index.d.ts +2 -0
- package/auth/TeamState/index.d.ts +2 -0
- package/auth/TenantsState/index.d.ts +2 -0
- package/auth/index.d.ts +12 -0
- package/auth/index.js +2 -0
- package/auth/initialState.js +3 -1
- package/auth/interfaces.d.ts +2 -0
- package/auth/reducer.d.ts +12 -1
- package/auth/reducer.js +3 -2
- package/auth/saga.js +2 -1
- package/auth/utils.d.ts +4 -0
- package/index.js +1 -1
- package/interfaces.d.ts +3 -0
- package/node/auth/Provisioning/index.js +49 -0
- package/node/auth/Provisioning/interfaces.js +5 -0
- package/node/auth/Provisioning/saga.js +144 -0
- package/node/auth/RestrictionsState/saga.js +19 -11
- package/node/auth/index.js +28 -0
- package/node/auth/initialState.js +4 -1
- package/node/auth/reducer.js +4 -2
- package/node/auth/saga.js +3 -1
- package/node/index.js +1 -1
- package/package.json +2 -2
- package/toolkit/index.d.ts +1 -1
|
@@ -32,6 +32,7 @@ declare const reducers: {
|
|
|
32
32
|
apiTokensState: import("..").ApiTokensState;
|
|
33
33
|
securityPolicyState: SecurityPolicyState;
|
|
34
34
|
restrictionsState: import("..").RestrictionsState;
|
|
35
|
+
provisioningState: import("..").ProvisioningState;
|
|
35
36
|
accountSettingsState: import("..").AccountSettingsState;
|
|
36
37
|
tenantsState: import("..").TenantsState;
|
|
37
38
|
rolesState: import("..").RolesState;
|
|
@@ -81,6 +82,7 @@ declare const reducers: {
|
|
|
81
82
|
apiTokensState: import("..").ApiTokensState;
|
|
82
83
|
securityPolicyState: SecurityPolicyState;
|
|
83
84
|
restrictionsState: import("..").RestrictionsState;
|
|
85
|
+
provisioningState: import("..").ProvisioningState;
|
|
84
86
|
accountSettingsState: import("..").AccountSettingsState;
|
|
85
87
|
tenantsState: import("..").TenantsState;
|
|
86
88
|
rolesState: import("..").RolesState;
|
|
@@ -130,6 +132,7 @@ declare const reducers: {
|
|
|
130
132
|
apiTokensState: import("..").ApiTokensState;
|
|
131
133
|
securityPolicyState: SecurityPolicyState;
|
|
132
134
|
restrictionsState: import("..").RestrictionsState;
|
|
135
|
+
provisioningState: import("..").ProvisioningState;
|
|
133
136
|
accountSettingsState: import("..").AccountSettingsState;
|
|
134
137
|
tenantsState: import("..").TenantsState;
|
|
135
138
|
rolesState: import("..").RolesState;
|
|
@@ -179,6 +182,7 @@ declare const reducers: {
|
|
|
179
182
|
apiTokensState: import("..").ApiTokensState;
|
|
180
183
|
securityPolicyState: SecurityPolicyState;
|
|
181
184
|
restrictionsState: import("..").RestrictionsState;
|
|
185
|
+
provisioningState: import("..").ProvisioningState;
|
|
182
186
|
accountSettingsState: import("..").AccountSettingsState;
|
|
183
187
|
tenantsState: import("..").TenantsState;
|
|
184
188
|
rolesState: import("..").RolesState;
|
|
@@ -228,6 +232,7 @@ declare const reducers: {
|
|
|
228
232
|
apiTokensState: import("..").ApiTokensState;
|
|
229
233
|
securityPolicyState: SecurityPolicyState;
|
|
230
234
|
restrictionsState: import("..").RestrictionsState;
|
|
235
|
+
provisioningState: import("..").ProvisioningState;
|
|
231
236
|
accountSettingsState: import("..").AccountSettingsState;
|
|
232
237
|
tenantsState: import("..").TenantsState;
|
|
233
238
|
rolesState: import("..").RolesState;
|
|
@@ -277,6 +282,7 @@ declare const reducers: {
|
|
|
277
282
|
apiTokensState: import("..").ApiTokensState;
|
|
278
283
|
securityPolicyState: SecurityPolicyState;
|
|
279
284
|
restrictionsState: import("..").RestrictionsState;
|
|
285
|
+
provisioningState: import("..").ProvisioningState;
|
|
280
286
|
accountSettingsState: import("..").AccountSettingsState;
|
|
281
287
|
tenantsState: import("..").TenantsState;
|
|
282
288
|
rolesState: import("..").RolesState;
|
|
@@ -326,6 +332,7 @@ declare const reducers: {
|
|
|
326
332
|
apiTokensState: import("..").ApiTokensState;
|
|
327
333
|
securityPolicyState: SecurityPolicyState;
|
|
328
334
|
restrictionsState: import("..").RestrictionsState;
|
|
335
|
+
provisioningState: import("..").ProvisioningState;
|
|
329
336
|
accountSettingsState: import("..").AccountSettingsState;
|
|
330
337
|
tenantsState: import("..").TenantsState;
|
|
331
338
|
rolesState: import("..").RolesState;
|
|
@@ -375,6 +382,7 @@ declare const reducers: {
|
|
|
375
382
|
apiTokensState: import("..").ApiTokensState;
|
|
376
383
|
securityPolicyState: SecurityPolicyState;
|
|
377
384
|
restrictionsState: import("..").RestrictionsState;
|
|
385
|
+
provisioningState: import("..").ProvisioningState;
|
|
378
386
|
accountSettingsState: import("..").AccountSettingsState;
|
|
379
387
|
tenantsState: import("..").TenantsState;
|
|
380
388
|
rolesState: import("..").RolesState;
|
|
@@ -424,6 +432,7 @@ declare const reducers: {
|
|
|
424
432
|
apiTokensState: import("..").ApiTokensState;
|
|
425
433
|
securityPolicyState: SecurityPolicyState;
|
|
426
434
|
restrictionsState: import("..").RestrictionsState;
|
|
435
|
+
provisioningState: import("..").ProvisioningState;
|
|
427
436
|
accountSettingsState: import("..").AccountSettingsState;
|
|
428
437
|
tenantsState: import("..").TenantsState;
|
|
429
438
|
rolesState: import("..").RolesState;
|
|
@@ -473,6 +482,7 @@ declare const reducers: {
|
|
|
473
482
|
apiTokensState: import("..").ApiTokensState;
|
|
474
483
|
securityPolicyState: SecurityPolicyState;
|
|
475
484
|
restrictionsState: import("..").RestrictionsState;
|
|
485
|
+
provisioningState: import("..").ProvisioningState;
|
|
476
486
|
accountSettingsState: import("..").AccountSettingsState;
|
|
477
487
|
tenantsState: import("..").TenantsState;
|
|
478
488
|
rolesState: import("..").RolesState;
|
|
@@ -509,6 +519,7 @@ declare const reducers: {
|
|
|
509
519
|
apiTokensState: import("..").ApiTokensState;
|
|
510
520
|
securityPolicyState: SecurityPolicyState;
|
|
511
521
|
restrictionsState: import("..").RestrictionsState;
|
|
522
|
+
provisioningState: import("..").ProvisioningState;
|
|
512
523
|
accountSettingsState: import("..").AccountSettingsState;
|
|
513
524
|
tenantsState: import("..").TenantsState;
|
|
514
525
|
rolesState: import("..").RolesState;
|
|
@@ -34,6 +34,7 @@ declare const reducers: {
|
|
|
34
34
|
apiTokensState: import("..").ApiTokensState;
|
|
35
35
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
36
36
|
restrictionsState: import("..").RestrictionsState;
|
|
37
|
+
provisioningState: import("..").ProvisioningState;
|
|
37
38
|
accountSettingsState: import("..").AccountSettingsState;
|
|
38
39
|
tenantsState: import("..").TenantsState;
|
|
39
40
|
rolesState: import("..").RolesState;
|
|
@@ -70,6 +71,7 @@ declare const reducers: {
|
|
|
70
71
|
apiTokensState: import("..").ApiTokensState;
|
|
71
72
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
72
73
|
restrictionsState: import("..").RestrictionsState;
|
|
74
|
+
provisioningState: import("..").ProvisioningState;
|
|
73
75
|
accountSettingsState: import("..").AccountSettingsState;
|
|
74
76
|
tenantsState: import("..").TenantsState;
|
|
75
77
|
rolesState: import("..").RolesState;
|
|
@@ -33,6 +33,7 @@ declare const reducers: {
|
|
|
33
33
|
apiTokensState: import("..").ApiTokensState;
|
|
34
34
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
35
35
|
restrictionsState: import("..").RestrictionsState;
|
|
36
|
+
provisioningState: import("..").ProvisioningState;
|
|
36
37
|
accountSettingsState: import("..").AccountSettingsState;
|
|
37
38
|
tenantsState: import("..").TenantsState;
|
|
38
39
|
rolesState: import("..").RolesState;
|
|
@@ -69,6 +70,7 @@ declare const reducers: {
|
|
|
69
70
|
apiTokensState: import("..").ApiTokensState;
|
|
70
71
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
71
72
|
restrictionsState: import("..").RestrictionsState;
|
|
73
|
+
provisioningState: import("..").ProvisioningState;
|
|
72
74
|
accountSettingsState: import("..").AccountSettingsState;
|
|
73
75
|
tenantsState: import("..").TenantsState;
|
|
74
76
|
rolesState: import("..").RolesState;
|
package/auth/SignUp/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare const reducers: {
|
|
|
32
32
|
apiTokensState: import("..").ApiTokensState;
|
|
33
33
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
34
34
|
restrictionsState: import("..").RestrictionsState;
|
|
35
|
+
provisioningState: import("..").ProvisioningState;
|
|
35
36
|
accountSettingsState: import("..").AccountSettingsState;
|
|
36
37
|
tenantsState: import("..").TenantsState;
|
|
37
38
|
rolesState: import("..").RolesState;
|
|
@@ -68,6 +69,7 @@ declare const reducers: {
|
|
|
68
69
|
apiTokensState: import("..").ApiTokensState;
|
|
69
70
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
70
71
|
restrictionsState: import("..").RestrictionsState;
|
|
72
|
+
provisioningState: import("..").ProvisioningState;
|
|
71
73
|
accountSettingsState: import("..").AccountSettingsState;
|
|
72
74
|
tenantsState: import("..").TenantsState;
|
|
73
75
|
rolesState: import("..").RolesState;
|
|
@@ -33,6 +33,7 @@ declare const reducers: {
|
|
|
33
33
|
apiTokensState: import("..").ApiTokensState;
|
|
34
34
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
35
35
|
restrictionsState: import("..").RestrictionsState;
|
|
36
|
+
provisioningState: import("..").ProvisioningState;
|
|
36
37
|
accountSettingsState: import("..").AccountSettingsState;
|
|
37
38
|
tenantsState: import("..").TenantsState;
|
|
38
39
|
rolesState: import("..").RolesState;
|
|
@@ -69,6 +70,7 @@ declare const reducers: {
|
|
|
69
70
|
apiTokensState: import("..").ApiTokensState;
|
|
70
71
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
71
72
|
restrictionsState: import("..").RestrictionsState;
|
|
73
|
+
provisioningState: import("..").ProvisioningState;
|
|
72
74
|
accountSettingsState: import("..").AccountSettingsState;
|
|
73
75
|
tenantsState: import("..").TenantsState;
|
|
74
76
|
rolesState: import("..").RolesState;
|
|
@@ -52,6 +52,7 @@ declare const reducers: {
|
|
|
52
52
|
apiTokensState: import("..").ApiTokensState;
|
|
53
53
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
54
54
|
restrictionsState: import("..").RestrictionsState;
|
|
55
|
+
provisioningState: import("..").ProvisioningState;
|
|
55
56
|
accountSettingsState: import("..").AccountSettingsState;
|
|
56
57
|
tenantsState: import("..").TenantsState;
|
|
57
58
|
rolesState: import("..").RolesState;
|
|
@@ -88,6 +89,7 @@ declare const reducers: {
|
|
|
88
89
|
apiTokensState: import("..").ApiTokensState;
|
|
89
90
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
90
91
|
restrictionsState: import("..").RestrictionsState;
|
|
92
|
+
provisioningState: import("..").ProvisioningState;
|
|
91
93
|
accountSettingsState: import("..").AccountSettingsState;
|
|
92
94
|
tenantsState: import("..").TenantsState;
|
|
93
95
|
rolesState: import("..").RolesState;
|
|
@@ -34,6 +34,7 @@ declare const reducers: {
|
|
|
34
34
|
apiTokensState: import("..").ApiTokensState;
|
|
35
35
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
36
36
|
restrictionsState: import("..").RestrictionsState;
|
|
37
|
+
provisioningState: import("..").ProvisioningState;
|
|
37
38
|
accountSettingsState: import("..").AccountSettingsState;
|
|
38
39
|
tenantsState: TenantsState;
|
|
39
40
|
rolesState: import("..").RolesState;
|
|
@@ -70,6 +71,7 @@ declare const reducers: {
|
|
|
70
71
|
apiTokensState: import("..").ApiTokensState;
|
|
71
72
|
securityPolicyState: import("..").SecurityPolicyState;
|
|
72
73
|
restrictionsState: import("..").RestrictionsState;
|
|
74
|
+
provisioningState: import("..").ProvisioningState;
|
|
73
75
|
accountSettingsState: import("..").AccountSettingsState;
|
|
74
76
|
tenantsState: TenantsState;
|
|
75
77
|
rolesState: import("..").RolesState;
|
package/auth/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export * from './SessionsPolicyState';
|
|
|
41
41
|
export * from './SessionsPolicyState/interfaces';
|
|
42
42
|
export * from './RestrictionsState';
|
|
43
43
|
export * from './RestrictionsState/interfaces';
|
|
44
|
+
export * from './Provisioning';
|
|
45
|
+
export * from './Provisioning/interfaces';
|
|
44
46
|
export type { AuthActions } from './reducer';
|
|
45
47
|
export { sagas as authSagas, mockSagas as authMockSagas, reducer as authReducers, actions as authActions, initialState as authInitialState, storeName as authStoreName, };
|
|
46
48
|
declare const _default: {
|
|
@@ -50,6 +52,14 @@ declare const _default: {
|
|
|
50
52
|
initialState: import("./interfaces").AuthState;
|
|
51
53
|
reducer: import("redux").Reducer<import("./interfaces").AuthState, import("redux").AnyAction>;
|
|
52
54
|
actions: {
|
|
55
|
+
loadProvisionConnections: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
56
|
+
createProvisionConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("@frontegg/rest-api").Scim2CreateConnectionConfigRequest, import("@frontegg/rest-api").Scim2CreateConnectionConfigResponse>], import("..").WithCallback<import("@frontegg/rest-api").Scim2CreateConnectionConfigRequest, import("@frontegg/rest-api").Scim2CreateConnectionConfigResponse>, string, never, never>;
|
|
57
|
+
deleteProvisionConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<{
|
|
58
|
+
id: string;
|
|
59
|
+
}, boolean>], import("..").WithCallback<{
|
|
60
|
+
id: string;
|
|
61
|
+
}, boolean>, string, never, never>;
|
|
62
|
+
updateProvisionConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithId<import("@frontegg/rest-api").Scim2PatchConnectionConfigRequest>], import("../interfaces").WithId<import("@frontegg/rest-api").Scim2PatchConnectionConfigRequest>, string, never, never>;
|
|
53
63
|
checkIfUserIpValid: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
54
64
|
addCurrentUserIpAndActivate: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
|
|
55
65
|
callback?: ((data: boolean | null, error?: string | undefined) => void) | undefined;
|
|
@@ -399,6 +409,8 @@ declare const _default: {
|
|
|
399
409
|
verifyMFAWebAuthnForLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("./LoginState/interfaces").IVerifyMFAWebAuthnPayload], import("./LoginState/interfaces").IVerifyMFAWebAuthnPayload, string, never, never>;
|
|
400
410
|
preVerifyMFASMSForLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("./LoginState/interfaces").WithDeviceId<import("@frontegg/rest-api").IPreVerifyMFA>, boolean>], import("..").WithCallback<import("./LoginState/interfaces").WithDeviceId<import("@frontegg/rest-api").IPreVerifyMFA>, boolean>, string, never, never>;
|
|
401
411
|
verifyMFASMSForLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("./LoginState/interfaces").WithDeviceId<import("@frontegg/rest-api").IVerifyMFASMS>, boolean>], import("..").WithCallback<import("./LoginState/interfaces").WithDeviceId<import("@frontegg/rest-api").IVerifyMFASMS>, boolean>, string, never, never>;
|
|
412
|
+
setProvisioningState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./Provisioning/interfaces").ProvisioningState>], Partial<import("./Provisioning/interfaces").ProvisioningState>, string, never, never>;
|
|
413
|
+
resetProvisioningState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
402
414
|
setRestrictionsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./RestrictionsState/interfaces").RestrictionsState>], Partial<import("./RestrictionsState/interfaces").RestrictionsState>, string, never, never>;
|
|
403
415
|
setIpRestrictionsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./RestrictionsState/interfaces").IPRestrictionsState>], Partial<import("./RestrictionsState/interfaces").IPRestrictionsState>, string, never, never>;
|
|
404
416
|
setEmailDomainRestrictionsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./RestrictionsState/interfaces").EmailDomainRestrictionsState>], Partial<import("./RestrictionsState/interfaces").EmailDomainRestrictionsState>, string, never, never>;
|
package/auth/index.js
CHANGED
|
@@ -42,6 +42,8 @@ export * from './SessionsPolicyState';
|
|
|
42
42
|
export * from './SessionsPolicyState/interfaces';
|
|
43
43
|
export * from './RestrictionsState';
|
|
44
44
|
export * from './RestrictionsState/interfaces';
|
|
45
|
+
export * from './Provisioning';
|
|
46
|
+
export * from './Provisioning/interfaces';
|
|
45
47
|
export { sagas as authSagas, mockSagas as authMockSagas, reducer as authReducers, actions as authActions, initialState as authInitialState, storeName as authStoreName }; // export store
|
|
46
48
|
|
|
47
49
|
export default {
|
package/auth/initialState.js
CHANGED
|
@@ -18,6 +18,7 @@ import { rolesState } from './RolesState';
|
|
|
18
18
|
import { sessionsState } from './SessionsState';
|
|
19
19
|
import { sessionsPolicyState } from './SessionsPolicyState';
|
|
20
20
|
import { restrictionsState } from './RestrictionsState';
|
|
21
|
+
import { provisioningState } from './Provisioning';
|
|
21
22
|
export const reinitializeState = {
|
|
22
23
|
isAuthenticated: false,
|
|
23
24
|
isLoading: true,
|
|
@@ -41,7 +42,8 @@ export const reinitializeState = {
|
|
|
41
42
|
resetPhoneNumberState,
|
|
42
43
|
sessionsState,
|
|
43
44
|
sessionsPolicyState,
|
|
44
|
-
restrictionsState
|
|
45
|
+
restrictionsState,
|
|
46
|
+
provisioningState
|
|
45
47
|
};
|
|
46
48
|
export const initialState = _extends({
|
|
47
49
|
routes: {
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { ResetPhoneNumberState } from './ResetPhoneNumberState/interfaces';
|
|
|
18
18
|
import { SessionsState } from './SessionsState/interfaces';
|
|
19
19
|
import { SessionsPolicyState } from './SessionsPolicyState/interfaces';
|
|
20
20
|
import { RestrictionsState } from './RestrictionsState/interfaces';
|
|
21
|
+
import { ProvisioningState } from './Provisioning/interfaces';
|
|
21
22
|
export interface User extends IUserProfile {
|
|
22
23
|
accessToken: string;
|
|
23
24
|
refreshToken?: string;
|
|
@@ -56,6 +57,7 @@ export interface AuthState extends Routes, PluginOptions {
|
|
|
56
57
|
apiTokensState: ApiTokensState;
|
|
57
58
|
securityPolicyState: SecurityPolicyState;
|
|
58
59
|
restrictionsState: RestrictionsState;
|
|
60
|
+
provisioningState: ProvisioningState;
|
|
59
61
|
accountSettingsState: AccountSettingsState;
|
|
60
62
|
tenantsState: TenantsState;
|
|
61
63
|
rolesState: RolesState;
|
package/auth/reducer.d.ts
CHANGED
|
@@ -17,8 +17,17 @@ import { RolesActions } from './RolesState';
|
|
|
17
17
|
import { ResetPhoneNumberActions } from './ResetPhoneNumberState';
|
|
18
18
|
import { SessionsActions } from './SessionsState';
|
|
19
19
|
import { RestrictionsActions } from './RestrictionsState';
|
|
20
|
+
import { ProvisioningActions } from './Provisioning';
|
|
20
21
|
declare const reducer: import("redux").Reducer<AuthState, import("redux").AnyAction>;
|
|
21
22
|
declare const actions: {
|
|
23
|
+
loadProvisionConnections: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
24
|
+
createProvisionConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("@frontegg/rest-api").Scim2CreateConnectionConfigRequest, import("@frontegg/rest-api").Scim2CreateConnectionConfigResponse>], import("..").WithCallback<import("@frontegg/rest-api").Scim2CreateConnectionConfigRequest, import("@frontegg/rest-api").Scim2CreateConnectionConfigResponse>, string, never, never>;
|
|
25
|
+
deleteProvisionConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<{
|
|
26
|
+
id: string;
|
|
27
|
+
}, boolean>], import("..").WithCallback<{
|
|
28
|
+
id: string;
|
|
29
|
+
}, boolean>, string, never, never>;
|
|
30
|
+
updateProvisionConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithId<import("@frontegg/rest-api").Scim2PatchConnectionConfigRequest>], import("../interfaces").WithId<import("@frontegg/rest-api").Scim2PatchConnectionConfigRequest>, string, never, never>;
|
|
22
31
|
checkIfUserIpValid: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
23
32
|
addCurrentUserIpAndActivate: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
|
|
24
33
|
callback?: ((data: boolean | null, error?: string | undefined) => void) | undefined;
|
|
@@ -368,6 +377,8 @@ declare const actions: {
|
|
|
368
377
|
verifyMFAWebAuthnForLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import(".").IVerifyMFAWebAuthnPayload], import(".").IVerifyMFAWebAuthnPayload, string, never, never>;
|
|
369
378
|
preVerifyMFASMSForLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import(".").WithDeviceId<import("@frontegg/rest-api").IPreVerifyMFA>, boolean>], import("..").WithCallback<import(".").WithDeviceId<import("@frontegg/rest-api").IPreVerifyMFA>, boolean>, string, never, never>;
|
|
370
379
|
verifyMFASMSForLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import(".").WithDeviceId<import("@frontegg/rest-api").IVerifyMFASMS>, boolean>], import("..").WithCallback<import(".").WithDeviceId<import("@frontegg/rest-api").IVerifyMFASMS>, boolean>, string, never, never>;
|
|
380
|
+
setProvisioningState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import(".").ProvisioningState>], Partial<import(".").ProvisioningState>, string, never, never>;
|
|
381
|
+
resetProvisioningState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
371
382
|
setRestrictionsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import(".").RestrictionsState>], Partial<import(".").RestrictionsState>, string, never, never>;
|
|
372
383
|
setIpRestrictionsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import(".").IPRestrictionsState>], Partial<import(".").IPRestrictionsState>, string, never, never>;
|
|
373
384
|
setEmailDomainRestrictionsState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import(".").EmailDomainRestrictionsState>], Partial<import(".").EmailDomainRestrictionsState>, string, never, never>;
|
|
@@ -468,5 +479,5 @@ export declare type RootActions = {
|
|
|
468
479
|
resetState: () => void;
|
|
469
480
|
setUser: (user: User) => void;
|
|
470
481
|
};
|
|
471
|
-
export declare type AuthActions = RootActions & LoginActions & SocialLoginActions & ActivateAccountActions & AcceptInvitationActions & ForgotPasswordActions & ResetPhoneNumberActions & SignUpActions & ProfileActions & SSOActions & MfaActions & TeamActions & ApiTokensActions & SecurityPolicyActions & AccountSettingsActions & TenantsActions & RolesActions & SessionsActions & RestrictionsActions;
|
|
482
|
+
export declare type AuthActions = RootActions & LoginActions & SocialLoginActions & ActivateAccountActions & AcceptInvitationActions & ForgotPasswordActions & ResetPhoneNumberActions & SignUpActions & ProfileActions & SSOActions & MfaActions & TeamActions & ApiTokensActions & SecurityPolicyActions & AccountSettingsActions & TenantsActions & RolesActions & SessionsActions & RestrictionsActions & ProvisioningActions;
|
|
472
483
|
export { reducer, actions };
|
package/auth/reducer.js
CHANGED
|
@@ -22,6 +22,7 @@ import { resetPhoneNumberActions, resetPhoneNumberReducers } from './ResetPhoneN
|
|
|
22
22
|
import { sessionsActions, sessionsReducers } from './SessionsState';
|
|
23
23
|
import { sessionsPolicyActions, sessionsPolicyReducers } from './SessionsPolicyState';
|
|
24
24
|
import { restrictionsActions, restrictionsReducers } from './RestrictionsState';
|
|
25
|
+
import { provisioningActions, provisioningReducers } from './Provisioning';
|
|
25
26
|
const {
|
|
26
27
|
reducer,
|
|
27
28
|
actions: sliceActions
|
|
@@ -34,9 +35,9 @@ const {
|
|
|
34
35
|
payload
|
|
35
36
|
}) => _extends({}, state, payload),
|
|
36
37
|
setUser: typeReducer('user')
|
|
37
|
-
}, loginReducers, socialLoginsReducer, activateAccountReducers, acceptInvitationReducers, forgotPasswordReducers, resetPhoneNumberReducers, signUpReducers, profileReducers, ssoReducers, mfaReducers, teamReducers, apiTokensReducers, securityPolicyReducers, accountSettingsReducers, tenantsReducers, rolesReducers, sessionsReducers, sessionsPolicyReducers, restrictionsReducers)
|
|
38
|
+
}, loginReducers, socialLoginsReducer, activateAccountReducers, acceptInvitationReducers, forgotPasswordReducers, resetPhoneNumberReducers, signUpReducers, profileReducers, ssoReducers, mfaReducers, teamReducers, apiTokensReducers, securityPolicyReducers, accountSettingsReducers, tenantsReducers, rolesReducers, sessionsReducers, sessionsPolicyReducers, restrictionsReducers, provisioningReducers)
|
|
38
39
|
});
|
|
39
40
|
|
|
40
|
-
const actions = _extends({}, sliceActions, loginActions, socialLoginsActions, activateAccountActions, acceptInvitationActions, forgotPasswordActions, resetPhoneNumberActions, signUpActions, profileActions, ssoActions, mfaActions, teamActions, apiTokensActions, securityPolicyActions, accountSettingsActions, tenantsActions, rolesActions, sessionsActions, sessionsPolicyActions, restrictionsActions);
|
|
41
|
+
const actions = _extends({}, sliceActions, loginActions, socialLoginsActions, activateAccountActions, acceptInvitationActions, forgotPasswordActions, resetPhoneNumberActions, signUpActions, profileActions, ssoActions, mfaActions, teamActions, apiTokensActions, securityPolicyActions, accountSettingsActions, tenantsActions, rolesActions, sessionsActions, sessionsPolicyActions, restrictionsActions, provisioningActions);
|
|
41
42
|
|
|
42
43
|
export { reducer, actions };
|
package/auth/saga.js
CHANGED
|
@@ -19,8 +19,9 @@ import { resetPhoneNumberSagas } from './ResetPhoneNumberState/saga';
|
|
|
19
19
|
import { sessionsSaga, sessionsSagaMock } from './SessionsState/saga';
|
|
20
20
|
import { sessionsPolicySaga, sessionsPolicySagaMock } from './SessionsPolicyState/saga';
|
|
21
21
|
import { restrictionsSagaMock, restrictionsSagas } from './RestrictionsState/saga';
|
|
22
|
+
import { provisionSagas } from './Provisioning/saga';
|
|
22
23
|
export function* sagas() {
|
|
23
|
-
yield all([call(loginSagas), call(activateSagas), call(acceptInvitationSagas), call(forgotPasswordSagas), call(resetPhoneNumberSagas), call(ssoSagas), call(ssoSagasV2), call(profileSagas), call(mfaSagas), call(teamSagas), call(socialLoginsSaga), call(signUpSaga), call(apiTokensSaga), call(securityPolicySagas), call(accountSettingsSaga), call(tenantsSagas), call(rolesSagas), call(sessionsSaga), call(sessionsPolicySaga), call(restrictionsSagas)]);
|
|
24
|
+
yield all([call(loginSagas), call(activateSagas), call(acceptInvitationSagas), call(forgotPasswordSagas), call(resetPhoneNumberSagas), call(ssoSagas), call(ssoSagasV2), call(profileSagas), call(mfaSagas), call(teamSagas), call(socialLoginsSaga), call(signUpSaga), call(apiTokensSaga), call(securityPolicySagas), call(accountSettingsSaga), call(tenantsSagas), call(rolesSagas), call(sessionsSaga), call(sessionsPolicySaga), call(restrictionsSagas), call(provisionSagas)]);
|
|
24
25
|
}
|
|
25
26
|
export function* mockSagas() {
|
|
26
27
|
yield all([call(loginSagasMock), // call(activateSagas),
|
package/auth/utils.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const resetStateByKey: <T>(key: keyof AuthState, initialState: Pa
|
|
|
24
24
|
apiTokensState: import(".").ApiTokensState;
|
|
25
25
|
securityPolicyState: import(".").SecurityPolicyState;
|
|
26
26
|
restrictionsState: import(".").RestrictionsState;
|
|
27
|
+
provisioningState: import(".").ProvisioningState;
|
|
27
28
|
accountSettingsState: import(".").AccountSettingsState;
|
|
28
29
|
tenantsState: import(".").TenantsState;
|
|
29
30
|
rolesState: import(".").RolesState;
|
|
@@ -62,6 +63,7 @@ export declare const typeReducer: <T>(key: keyof AuthState) => (state: AuthState
|
|
|
62
63
|
apiTokensState: import(".").ApiTokensState;
|
|
63
64
|
securityPolicyState: import(".").SecurityPolicyState;
|
|
64
65
|
restrictionsState: import(".").RestrictionsState;
|
|
66
|
+
provisioningState: import(".").ProvisioningState;
|
|
65
67
|
accountSettingsState: import(".").AccountSettingsState;
|
|
66
68
|
tenantsState: import(".").TenantsState;
|
|
67
69
|
rolesState: import(".").RolesState;
|
|
@@ -104,6 +106,7 @@ export declare const typeReducerForKey: <T>(key: keyof AuthState) => {
|
|
|
104
106
|
apiTokensState: import(".").ApiTokensState;
|
|
105
107
|
securityPolicyState: import(".").SecurityPolicyState;
|
|
106
108
|
restrictionsState: import(".").RestrictionsState;
|
|
109
|
+
provisioningState: import(".").ProvisioningState;
|
|
107
110
|
accountSettingsState: import(".").AccountSettingsState;
|
|
108
111
|
tenantsState: import(".").TenantsState;
|
|
109
112
|
rolesState: import(".").RolesState;
|
|
@@ -147,6 +150,7 @@ export declare const typeReducerNestedKey: <T, K>(key: keyof AuthState, nestedKe
|
|
|
147
150
|
apiTokensState: import(".").ApiTokensState;
|
|
148
151
|
securityPolicyState: import(".").SecurityPolicyState;
|
|
149
152
|
restrictionsState: import(".").RestrictionsState;
|
|
153
|
+
provisioningState: import(".").ProvisioningState;
|
|
150
154
|
accountSettingsState: import(".").AccountSettingsState;
|
|
151
155
|
tenantsState: import(".").TenantsState;
|
|
152
156
|
rolesState: import(".").RolesState;
|
package/index.js
CHANGED
package/interfaces.d.ts
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.provisioningState = exports.provisioningReducers = exports.provisioningActions = void 0;
|
|
7
|
+
|
|
8
|
+
var _toolkit = require("@reduxjs/toolkit");
|
|
9
|
+
|
|
10
|
+
var _utils = require("../utils");
|
|
11
|
+
|
|
12
|
+
var _constants = require("../../constants");
|
|
13
|
+
|
|
14
|
+
const provisioningState = {
|
|
15
|
+
loading: false
|
|
16
|
+
};
|
|
17
|
+
exports.provisioningState = provisioningState;
|
|
18
|
+
const reducers = {
|
|
19
|
+
setProvisioningState: (0, _utils.typeReducerForKey)('provisioningState'),
|
|
20
|
+
resetProvisioningState: (0, _utils.resetStateByKey)('provisioningState', {
|
|
21
|
+
provisioningState
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
exports.provisioningReducers = reducers;
|
|
25
|
+
const actions = {
|
|
26
|
+
loadProvisionConnections: (0, _toolkit.createAction)(`${_constants.authStoreName}/loadProvisionConnections`),
|
|
27
|
+
createProvisionConnection: (0, _toolkit.createAction)(`${_constants.authStoreName}/createProvisionConnection`, payload => ({
|
|
28
|
+
payload
|
|
29
|
+
})),
|
|
30
|
+
deleteProvisionConnection: (0, _toolkit.createAction)(`${_constants.authStoreName}/deleteProvisionConnection`, payload => ({
|
|
31
|
+
payload
|
|
32
|
+
})),
|
|
33
|
+
updateProvisionConnection: (0, _toolkit.createAction)(`${_constants.authStoreName}/updateProvisionConnection`, payload => ({
|
|
34
|
+
payload
|
|
35
|
+
}))
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* To be used for actions types after dispatch, and should contains
|
|
39
|
+
* the reducers and actions as standalone function
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
exports.provisioningActions = actions;
|
|
43
|
+
// noinspection JSUnusedLocalSymbols
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* if you see error in matcher that's mean the DispatchAction does not
|
|
47
|
+
* contains the same functions in reducers and actions
|
|
48
|
+
*/
|
|
49
|
+
const Matcher = {};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.provisionSagas = provisionSagas;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _effects = require("redux-saga/effects");
|
|
15
|
+
|
|
16
|
+
var _restApi = require("@frontegg/rest-api");
|
|
17
|
+
|
|
18
|
+
var _reducer = require("../reducer");
|
|
19
|
+
|
|
20
|
+
const _excluded = ["callback"],
|
|
21
|
+
_excluded2 = ["id"];
|
|
22
|
+
|
|
23
|
+
function* loadCountForConnection(connection) {
|
|
24
|
+
const {
|
|
25
|
+
count
|
|
26
|
+
} = yield (0, _effects.call)(_restApi.api.directory.countConfigurationUsers, connection.id);
|
|
27
|
+
return (0, _extends2.default)({}, connection, {
|
|
28
|
+
count
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function* loadScim2Connections() {
|
|
33
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
34
|
+
loading: true,
|
|
35
|
+
error: null
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const connections = yield (0, _effects.call)(_restApi.api.directory.getConfigs);
|
|
40
|
+
const connectionsWithCount = yield (0, _effects.all)(connections.map(connection => loadCountForConnection(connection)));
|
|
41
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
42
|
+
connections: connectionsWithCount,
|
|
43
|
+
loading: false
|
|
44
|
+
}));
|
|
45
|
+
} catch (e) {
|
|
46
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
47
|
+
error: e.message,
|
|
48
|
+
loading: false
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function* createScim2Connection(_ref) {
|
|
54
|
+
let {
|
|
55
|
+
payload: {
|
|
56
|
+
callback
|
|
57
|
+
}
|
|
58
|
+
} = _ref,
|
|
59
|
+
newConnectionBody = (0, _objectWithoutPropertiesLoose2.default)(_ref.payload, _excluded);
|
|
60
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
61
|
+
loading: true,
|
|
62
|
+
error: null
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
try {
|
|
66
|
+
const newConnectionResponse = yield (0, _effects.call)(_restApi.api.directory.createConfiguration, newConnectionBody);
|
|
67
|
+
const connections = yield (0, _effects.call)(_restApi.api.directory.getConfigs);
|
|
68
|
+
const connectionsWithCount = yield (0, _effects.all)(connections.map(connection => loadCountForConnection(connection)));
|
|
69
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
70
|
+
connections: connectionsWithCount,
|
|
71
|
+
loading: false
|
|
72
|
+
}));
|
|
73
|
+
callback == null ? void 0 : callback(newConnectionResponse);
|
|
74
|
+
} catch (e) {
|
|
75
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
76
|
+
error: e.message,
|
|
77
|
+
loading: false
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function* updateScim2Connection(_ref2) {
|
|
83
|
+
let {
|
|
84
|
+
payload: {
|
|
85
|
+
id
|
|
86
|
+
}
|
|
87
|
+
} = _ref2,
|
|
88
|
+
updateRequest = (0, _objectWithoutPropertiesLoose2.default)(_ref2.payload, _excluded2);
|
|
89
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
90
|
+
loading: true,
|
|
91
|
+
error: null
|
|
92
|
+
}));
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
yield (0, _effects.call)(_restApi.api.directory.updateConfiguration, id, updateRequest);
|
|
96
|
+
const connections = yield (0, _effects.call)(_restApi.api.directory.getConfigs);
|
|
97
|
+
const connectionsWithCount = yield (0, _effects.all)(connections.map(connection => loadCountForConnection(connection)));
|
|
98
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
99
|
+
connections: connectionsWithCount,
|
|
100
|
+
loading: false
|
|
101
|
+
}));
|
|
102
|
+
} catch (e) {
|
|
103
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
104
|
+
error: e.message,
|
|
105
|
+
loading: false
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function* deleteScim2Connection({
|
|
111
|
+
payload: {
|
|
112
|
+
id,
|
|
113
|
+
callback
|
|
114
|
+
}
|
|
115
|
+
}) {
|
|
116
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
117
|
+
loading: true,
|
|
118
|
+
error: null
|
|
119
|
+
}));
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
yield (0, _effects.call)(_restApi.api.directory.deleteConfiguration, id);
|
|
123
|
+
const connections = yield (0, _effects.call)(_restApi.api.directory.getConfigs);
|
|
124
|
+
const connectionsWithCount = yield (0, _effects.all)(connections.map(connection => loadCountForConnection(connection)));
|
|
125
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
126
|
+
connections: connectionsWithCount,
|
|
127
|
+
loading: false
|
|
128
|
+
}));
|
|
129
|
+
callback == null ? void 0 : callback(true);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
yield (0, _effects.put)(_reducer.actions.setProvisioningState({
|
|
132
|
+
error: e.message,
|
|
133
|
+
loading: false
|
|
134
|
+
}));
|
|
135
|
+
callback == null ? void 0 : callback(false, e);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function* provisionSagas() {
|
|
140
|
+
yield (0, _effects.takeLeading)(_reducer.actions.loadProvisionConnections, loadScim2Connections);
|
|
141
|
+
yield (0, _effects.takeEvery)(_reducer.actions.createProvisionConnection, createScim2Connection);
|
|
142
|
+
yield (0, _effects.takeEvery)(_reducer.actions.deleteProvisionConnection, deleteScim2Connection);
|
|
143
|
+
yield (0, _effects.takeEvery)(_reducer.actions.updateProvisionConnection, updateScim2Connection);
|
|
144
|
+
}
|