@frontegg/redux-store 6.120.0 → 6.121.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/ApiTokensState/index.d.ts +2 -8
- package/auth/CustomLoginState/saga.js +4 -4
- package/auth/LoginState/saga.js +1 -2
- package/auth/ProfileState/index.d.ts +1 -1
- package/auth/ProfileState/saga.js +2 -1
- package/auth/RestrictionsState/index.d.ts +9 -18
- package/auth/dummy.d.ts +2 -2
- package/auth/dummy.js +6 -5
- package/auth/index.d.ts +1 -1
- package/auth/interfaces.js +0 -2
- package/auth/reducer.d.ts +1 -1
- package/index.js +1 -1
- package/node/auth/CustomLoginState/saga.js +4 -4
- package/node/auth/LoginState/saga.js +1 -2
- package/node/auth/ProfileState/saga.js +2 -1
- package/node/auth/dummy.js +6 -5
- package/node/auth/interfaces.js +0 -1
- package/node/index.js +1 -1
- package/package.json +2 -2
|
@@ -47,10 +47,7 @@ declare const reducers: {
|
|
|
47
47
|
profileState: import("..").ProfileState;
|
|
48
48
|
mfaState: import("..").MFAState;
|
|
49
49
|
teamState: import("..").TeamState;
|
|
50
|
-
groupsState: import("..").GroupsState;
|
|
51
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
52
|
-
* contains the same functions in reducers and actions
|
|
53
|
-
*/
|
|
50
|
+
groupsState: import("..").GroupsState;
|
|
54
51
|
groupsDialogsState: import("..").GroupsDialogsState;
|
|
55
52
|
socialLoginState: import("..").SocialLoginState;
|
|
56
53
|
signUpState: import("..").SignUpState;
|
|
@@ -97,10 +94,7 @@ declare const reducers: {
|
|
|
97
94
|
profileState: import("..").ProfileState;
|
|
98
95
|
mfaState: import("..").MFAState;
|
|
99
96
|
teamState: import("..").TeamState;
|
|
100
|
-
groupsState: import("..").GroupsState;
|
|
101
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
102
|
-
* contains the same functions in reducers and actions
|
|
103
|
-
*/
|
|
97
|
+
groupsState: import("..").GroupsState;
|
|
104
98
|
groupsDialogsState: import("..").GroupsDialogsState;
|
|
105
99
|
socialLoginState: import("..").SocialLoginState;
|
|
106
100
|
signUpState: import("..").SignUpState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
const _excluded = ["callback"],
|
|
3
3
|
_excluded2 = ["callback"];
|
|
4
|
-
import {
|
|
4
|
+
import { api } from '@frontegg/rest-api';
|
|
5
5
|
import { call, put, takeLeading } from 'redux-saga/effects';
|
|
6
6
|
import { actions } from '../reducer';
|
|
7
7
|
import { delay } from '../utils';
|
|
@@ -12,7 +12,7 @@ export function* loadTenantMetadata() {
|
|
|
12
12
|
loading: true
|
|
13
13
|
}));
|
|
14
14
|
try {
|
|
15
|
-
const tenantMetadata = yield call(getAdminBoxMetadata);
|
|
15
|
+
const tenantMetadata = yield call(api.metadata.getAdminBoxMetadata);
|
|
16
16
|
yield put(actions.setCustomLoginState({
|
|
17
17
|
tenantMetadata,
|
|
18
18
|
loading: false
|
|
@@ -40,10 +40,10 @@ function* updateTenantMetadata(_ref) {
|
|
|
40
40
|
if (requestActions.length === 0) {
|
|
41
41
|
throw new Error('No changes to update');
|
|
42
42
|
}
|
|
43
|
-
yield call(updateAdminBoxMetadata, {
|
|
43
|
+
yield call(api.metadata.updateAdminBoxMetadata, {
|
|
44
44
|
actions: requestActions
|
|
45
45
|
});
|
|
46
|
-
const tenantMetadata = yield call(getAdminBoxMetadata);
|
|
46
|
+
const tenantMetadata = yield call(api.metadata.getAdminBoxMetadata);
|
|
47
47
|
yield put(actions.setCustomLoginState({
|
|
48
48
|
tenantMetadata,
|
|
49
49
|
saving: false
|
package/auth/LoginState/saga.js
CHANGED
|
@@ -38,7 +38,6 @@ import { base64urlDecode, delay, publicKeyCredentialToJSON } from '../utils';
|
|
|
38
38
|
import { loadPublicAuthStrategiesPolicy } from '../SecurityPolicyState/saga';
|
|
39
39
|
import { getPasskeysVendorPolicy } from '../PasskeysState/helpers';
|
|
40
40
|
import { getPathAndSearchParamsFromUrl, getRedirectUrl, getSearchParamsFromUrl, getSearchParam, TENANT_ID_PARAM_KEY, getMfaStepForEnrolledUsers, getMfaStepForNotEnrolledUsers, isMfaRequired } from './utils';
|
|
41
|
-
import { getPublicSettings } from '@frontegg/rest-api/account-settings';
|
|
42
41
|
import { errorHandler } from '../../utils';
|
|
43
42
|
import { loadEntitlements } from '../EntitlementsState/saga';
|
|
44
43
|
import { authStrategyLoginStepMap } from './consts';
|
|
@@ -457,7 +456,7 @@ function* loadCustomLoginRoutes() {
|
|
|
457
456
|
const {
|
|
458
457
|
applicationUrl,
|
|
459
458
|
loginUrl
|
|
460
|
-
} = yield call(getPublicSettings);
|
|
459
|
+
} = yield call(api.accountSettings.getPublicSettings);
|
|
461
460
|
if (applicationUrl && loginUrl) {
|
|
462
461
|
var _getSearchParamsFromU;
|
|
463
462
|
const searchParams = (_getSearchParamsFromU = getSearchParamsFromUrl(applicationUrl)) != null ? _getSearchParamsFromU : '';
|
|
@@ -106,7 +106,7 @@ declare const reducers: {
|
|
|
106
106
|
};
|
|
107
107
|
declare const actions: {
|
|
108
108
|
loadProfile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
109
|
-
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<WithCallback<import("@frontegg/rest-api").
|
|
109
|
+
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<WithCallback<import("@frontegg/rest-api").IGetUsersV2Response, import("@frontegg/rest-api").IGetUsersV2Response>>], Partial<WithCallback<import("@frontegg/rest-api").IGetUsersV2Response, import("@frontegg/rest-api").IGetUsersV2Response>>, string, never, never>;
|
|
110
110
|
changePassword: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IChangePassword, boolean>], WithCallback<IChangePassword, boolean>, string, never, never>;
|
|
111
111
|
};
|
|
112
112
|
/**
|
|
@@ -60,7 +60,8 @@ function* saveProfile(_ref) {
|
|
|
60
60
|
const newProfileData = _extends({}, oldProfileData, payload, {
|
|
61
61
|
profilePictureUrl: newProfilePictureUrl
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
//TODO: change the payload type to IUpdateUserProfile which is the right type to send, currently we send more data then actually needed.
|
|
64
|
+
const profile = yield call(api.users.updateUserProfileV2, newProfileData);
|
|
64
65
|
const currentUser = yield select(state => state.auth.user);
|
|
65
66
|
yield put(actions.setUser(_extends({}, currentUser, profile)));
|
|
66
67
|
yield put(actions.setProfileState({
|
|
@@ -45,16 +45,13 @@ declare const reducers: {
|
|
|
45
45
|
hostedLoginBox?: boolean | undefined;
|
|
46
46
|
disableSilentRefresh?: boolean | undefined;
|
|
47
47
|
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
48
|
+
impersonateState?: import("..").ImpersonateState | undefined;
|
|
49
|
+
passkeysState?: import("..").PasskeysState | undefined;
|
|
50
|
+
customLoginState?: import("..").CustomLoginState | undefined;
|
|
48
51
|
/**
|
|
49
52
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
50
53
|
* contains the same functions in reducers and actions
|
|
51
54
|
*/
|
|
52
|
-
impersonateState?: import("..").ImpersonateState | undefined; /**
|
|
53
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
54
|
-
* contains the same functions in reducers and actions
|
|
55
|
-
*/
|
|
56
|
-
passkeysState?: import("..").PasskeysState | undefined;
|
|
57
|
-
customLoginState?: import("..").CustomLoginState | undefined;
|
|
58
55
|
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
59
56
|
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
60
57
|
entitlementsState?: import("..").EntitlementsState | undefined;
|
|
@@ -106,16 +103,13 @@ declare const reducers: {
|
|
|
106
103
|
hostedLoginBox?: boolean | undefined;
|
|
107
104
|
disableSilentRefresh?: boolean | undefined;
|
|
108
105
|
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
106
|
+
impersonateState?: import("..").ImpersonateState | undefined;
|
|
107
|
+
passkeysState?: import("..").PasskeysState | undefined;
|
|
108
|
+
customLoginState?: import("..").CustomLoginState | undefined;
|
|
109
109
|
/**
|
|
110
110
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
111
111
|
* contains the same functions in reducers and actions
|
|
112
112
|
*/
|
|
113
|
-
impersonateState?: import("..").ImpersonateState | undefined; /**
|
|
114
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
115
|
-
* contains the same functions in reducers and actions
|
|
116
|
-
*/
|
|
117
|
-
passkeysState?: import("..").PasskeysState | undefined;
|
|
118
|
-
customLoginState?: import("..").CustomLoginState | undefined;
|
|
119
113
|
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
120
114
|
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
121
115
|
entitlementsState?: import("..").EntitlementsState | undefined;
|
|
@@ -167,16 +161,13 @@ declare const reducers: {
|
|
|
167
161
|
hostedLoginBox?: boolean | undefined;
|
|
168
162
|
disableSilentRefresh?: boolean | undefined;
|
|
169
163
|
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
164
|
+
impersonateState?: import("..").ImpersonateState | undefined;
|
|
165
|
+
passkeysState?: import("..").PasskeysState | undefined;
|
|
166
|
+
customLoginState?: import("..").CustomLoginState | undefined;
|
|
170
167
|
/**
|
|
171
168
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
172
169
|
* contains the same functions in reducers and actions
|
|
173
170
|
*/
|
|
174
|
-
impersonateState?: import("..").ImpersonateState | undefined; /**
|
|
175
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
176
|
-
* contains the same functions in reducers and actions
|
|
177
|
-
*/
|
|
178
|
-
passkeysState?: import("..").PasskeysState | undefined;
|
|
179
|
-
customLoginState?: import("..").CustomLoginState | undefined;
|
|
180
171
|
allAccountsState?: import("..").IAllAccountsState | undefined;
|
|
181
172
|
allAccountsDialogsState?: import("..").IAllAccountsDialogsState | undefined;
|
|
182
173
|
entitlementsState?: import("..").EntitlementsState | undefined;
|
package/auth/dummy.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRole,
|
|
1
|
+
import { IRole, ISamlConfiguration, ISamlMetadata, ISecurityPolicy, ISecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyPasswordHistory, ITeamUser, ITeamUserPermission, ITeamUserRole, ITenantsResponse, IVendorConfig, ISubTenantUser, ISessionConfigurations, IpRestriction, IPRestrictionsConfig, ISessionResponse, IUserProfile } 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';
|
|
@@ -9,7 +9,7 @@ export declare const apiTokensDataDemo: IApiTokensData;
|
|
|
9
9
|
export declare const apiTokensDataTenantDemo: ITenantApiTokensData;
|
|
10
10
|
export declare const rolesAdminViewerDemo: IRole[];
|
|
11
11
|
export declare const roleDemo: IRole[];
|
|
12
|
-
export declare const rolePermissionDemo:
|
|
12
|
+
export declare const rolePermissionDemo: ITeamUserPermission[];
|
|
13
13
|
export declare const userProfileDemo: IUserProfile;
|
|
14
14
|
export declare const userDemo: User;
|
|
15
15
|
export declare const profileStateDemo: ProfileState;
|
package/auth/dummy.js
CHANGED
|
@@ -51,18 +51,20 @@ export const rolePermissionDemo = [{
|
|
|
51
51
|
id: 'adminPermissionId',
|
|
52
52
|
key: 'fe.*',
|
|
53
53
|
name: 'General Admin',
|
|
54
|
-
description:
|
|
54
|
+
description: 'description',
|
|
55
55
|
categoryId: 'category',
|
|
56
56
|
fePermission: true,
|
|
57
57
|
createdAt: new Date(),
|
|
58
|
-
updatedAt: new Date()
|
|
58
|
+
updatedAt: new Date(),
|
|
59
|
+
roleIds: []
|
|
59
60
|
}];
|
|
60
61
|
export const userProfileDemo = {
|
|
62
|
+
sub: '',
|
|
63
|
+
tenants: [],
|
|
61
64
|
id: 'testId',
|
|
62
65
|
name: 'Demo User Name',
|
|
63
66
|
email: 'demo-user@frontegg.com',
|
|
64
67
|
mfaEnrolled: true,
|
|
65
|
-
profileImage: undefined,
|
|
66
68
|
profilePictureUrl: 'https://www.gravatar.com/avatar/42b2ad2bad6fc9b9db5086dfcf8072ac?d=https://ui-avatars.com/api/fe/128/random?t=1617261890875?t=1617261917434',
|
|
67
69
|
roles: roleDemo,
|
|
68
70
|
permissions: rolePermissionDemo,
|
|
@@ -77,8 +79,7 @@ export const userProfileDemo = {
|
|
|
77
79
|
country: 'Israel'
|
|
78
80
|
}
|
|
79
81
|
}),
|
|
80
|
-
|
|
81
|
-
verified: undefined
|
|
82
|
+
verified: false
|
|
82
83
|
};
|
|
83
84
|
export const userDemo = _extends({}, userProfileDemo, {
|
|
84
85
|
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1MTY5YmY0Zi02YmI5LTQ5NGMtOGNkZS05MDc4NDQ0NWY4MDciLCJuYW1lIjoiRHVtbXkgVXNlciIsImVtYWlsIjoiZHVtbXlAZnJvbnRlZ2cuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsIm1ldGFkYXRhIjp7fSwicm9sZXMiOlsiYWRtaW4iXSwicGVybWlzc2lvbnMiOlsiZmUuKiJdLCJ0ZW5hbnRJZCI6Im15LXRlbmFudC1pZCIsInRlbmFudElkcyI6WyJteS10ZW5hbnQtaWQiXSwicHJvZmlsZVBpY3R1cmVVcmwiOiJodHRwczovL3d3dy5ncmF2YXRhci5jb20vYXZhdGFyLzQyYjJhZDJiYWQ2ZmM5YjlkYjUwODZkZmNmODA3MmFjP2Q9aHR0cHM6Ly91aS1hdmF0YXJzLmNvbS9hcGkvZmUvMTI4L3JhbmRvbT90PTE2MTcyNjE4OTA4NzU_dD0xNjE3MjYxOTE3NDM0IiwidHlwZSI6InVzZXJUb2tlbiIsImlhdCI6MTYxNzkwNjMyNCwiZXhwIjoxNjE3OTkyNzI0LCJpc3MiOiJmcm9udGVnZyJ9.paaXLkpWEWbQmUtoK2P8IwXCxK4WJp7XhXonvzF8g1I',
|
package/auth/index.d.ts
CHANGED
|
@@ -443,7 +443,7 @@ declare const _default: {
|
|
|
443
443
|
loadTenantMetadata: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
444
444
|
updateTenantMetadata: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<Partial<import("./CustomLoginState/interfaces").UpdateTenantMetadataRequest>, boolean>], import("..").WithCallback<Partial<import("./CustomLoginState/interfaces").UpdateTenantMetadataRequest>, boolean>, string, never, never>;
|
|
445
445
|
loadProfile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
446
|
-
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("@frontegg/rest-api").
|
|
446
|
+
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("@frontegg/rest-api").IGetUsersV2Response, import("@frontegg/rest-api").IGetUsersV2Response>>], Partial<import("..").WithCallback<import("@frontegg/rest-api").IGetUsersV2Response, import("@frontegg/rest-api").IGetUsersV2Response>>, string, never, never>;
|
|
447
447
|
changePassword: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>], import("..").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>, string, never, never>;
|
|
448
448
|
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("./SignUp/interfaces").ISignUpUserPayload], import("./SignUp/interfaces").ISignUpUserPayload, string, never, never>;
|
|
449
449
|
resetSignUpStateSoft: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
package/auth/interfaces.js
CHANGED
package/auth/reducer.d.ts
CHANGED
|
@@ -403,7 +403,7 @@ declare const actions: {
|
|
|
403
403
|
loadTenantMetadata: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
404
404
|
updateTenantMetadata: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<Partial<import(".").UpdateTenantMetadataRequest>, boolean>], import("..").WithCallback<Partial<import(".").UpdateTenantMetadataRequest>, boolean>, string, never, never>;
|
|
405
405
|
loadProfile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
406
|
-
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("@frontegg/rest-api").
|
|
406
|
+
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("..").WithCallback<import("@frontegg/rest-api").IGetUsersV2Response, import("@frontegg/rest-api").IGetUsersV2Response>>], Partial<import("..").WithCallback<import("@frontegg/rest-api").IGetUsersV2Response, import("@frontegg/rest-api").IGetUsersV2Response>>, string, never, never>;
|
|
407
407
|
changePassword: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>], import("..").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>, string, never, never>;
|
|
408
408
|
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import(".").ISignUpUserPayload], import(".").ISignUpUserPayload, string, never, never>;
|
|
409
409
|
resetSignUpStateSoft: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.customLoginSagas = customLoginSagas;
|
|
|
8
8
|
exports.customLoginSagasMock = customLoginSagasMock;
|
|
9
9
|
exports.loadTenantMetadata = loadTenantMetadata;
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
-
var
|
|
11
|
+
var _restApi = require("@frontegg/rest-api");
|
|
12
12
|
var _effects = require("redux-saga/effects");
|
|
13
13
|
var _reducer = require("../reducer");
|
|
14
14
|
var _utils = require("../utils");
|
|
@@ -21,7 +21,7 @@ function* loadTenantMetadata() {
|
|
|
21
21
|
loading: true
|
|
22
22
|
}));
|
|
23
23
|
try {
|
|
24
|
-
const tenantMetadata = yield (0, _effects.call)(
|
|
24
|
+
const tenantMetadata = yield (0, _effects.call)(_restApi.api.metadata.getAdminBoxMetadata);
|
|
25
25
|
yield (0, _effects.put)(_reducer.actions.setCustomLoginState({
|
|
26
26
|
tenantMetadata,
|
|
27
27
|
loading: false
|
|
@@ -49,10 +49,10 @@ function* updateTenantMetadata(_ref) {
|
|
|
49
49
|
if (requestActions.length === 0) {
|
|
50
50
|
throw new Error('No changes to update');
|
|
51
51
|
}
|
|
52
|
-
yield (0, _effects.call)(
|
|
52
|
+
yield (0, _effects.call)(_restApi.api.metadata.updateAdminBoxMetadata, {
|
|
53
53
|
actions: requestActions
|
|
54
54
|
});
|
|
55
|
-
const tenantMetadata = yield (0, _effects.call)(
|
|
55
|
+
const tenantMetadata = yield (0, _effects.call)(_restApi.api.metadata.getAdminBoxMetadata);
|
|
56
56
|
yield (0, _effects.put)(_reducer.actions.setCustomLoginState({
|
|
57
57
|
tenantMetadata,
|
|
58
58
|
saving: false
|
|
@@ -33,7 +33,6 @@ var _utils = require("../utils");
|
|
|
33
33
|
var _saga3 = require("../SecurityPolicyState/saga");
|
|
34
34
|
var _helpers2 = require("../PasskeysState/helpers");
|
|
35
35
|
var _utils2 = require("./utils");
|
|
36
|
-
var _accountSettings = require("@frontegg/rest-api/account-settings");
|
|
37
36
|
var _utils3 = require("../../utils");
|
|
38
37
|
var _saga4 = require("../EntitlementsState/saga");
|
|
39
38
|
var _consts = require("./consts");
|
|
@@ -473,7 +472,7 @@ function* loadCustomLoginRoutes() {
|
|
|
473
472
|
const {
|
|
474
473
|
applicationUrl,
|
|
475
474
|
loginUrl
|
|
476
|
-
} = yield (0, _effects.call)(
|
|
475
|
+
} = yield (0, _effects.call)(_restApi.api.accountSettings.getPublicSettings);
|
|
477
476
|
if (applicationUrl && loginUrl) {
|
|
478
477
|
var _getSearchParamsFromU;
|
|
479
478
|
const searchParams = (_getSearchParamsFromU = (0, _utils2.getSearchParamsFromUrl)(applicationUrl)) != null ? _getSearchParamsFromU : '';
|
|
@@ -68,7 +68,8 @@ function* saveProfile(_ref) {
|
|
|
68
68
|
const newProfileData = (0, _extends2.default)({}, oldProfileData, payload, {
|
|
69
69
|
profilePictureUrl: newProfilePictureUrl
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
//TODO: change the payload type to IUpdateUserProfile which is the right type to send, currently we send more data then actually needed.
|
|
72
|
+
const profile = yield (0, _effects.call)(_restApi.api.users.updateUserProfileV2, newProfileData);
|
|
72
73
|
const currentUser = yield (0, _effects.select)(state => state.auth.user);
|
|
73
74
|
yield (0, _effects.put)(_reducer.actions.setUser((0, _extends2.default)({}, currentUser, profile)));
|
|
74
75
|
yield (0, _effects.put)(_reducer.actions.setProfileState({
|
package/node/auth/dummy.js
CHANGED
|
@@ -62,19 +62,21 @@ const rolePermissionDemo = [{
|
|
|
62
62
|
id: 'adminPermissionId',
|
|
63
63
|
key: 'fe.*',
|
|
64
64
|
name: 'General Admin',
|
|
65
|
-
description:
|
|
65
|
+
description: 'description',
|
|
66
66
|
categoryId: 'category',
|
|
67
67
|
fePermission: true,
|
|
68
68
|
createdAt: new Date(),
|
|
69
|
-
updatedAt: new Date()
|
|
69
|
+
updatedAt: new Date(),
|
|
70
|
+
roleIds: []
|
|
70
71
|
}];
|
|
71
72
|
exports.rolePermissionDemo = rolePermissionDemo;
|
|
72
73
|
const userProfileDemo = {
|
|
74
|
+
sub: '',
|
|
75
|
+
tenants: [],
|
|
73
76
|
id: 'testId',
|
|
74
77
|
name: 'Demo User Name',
|
|
75
78
|
email: 'demo-user@frontegg.com',
|
|
76
79
|
mfaEnrolled: true,
|
|
77
|
-
profileImage: undefined,
|
|
78
80
|
profilePictureUrl: 'https://www.gravatar.com/avatar/42b2ad2bad6fc9b9db5086dfcf8072ac?d=https://ui-avatars.com/api/fe/128/random?t=1617261890875?t=1617261917434',
|
|
79
81
|
roles: roleDemo,
|
|
80
82
|
permissions: rolePermissionDemo,
|
|
@@ -89,8 +91,7 @@ const userProfileDemo = {
|
|
|
89
91
|
country: 'Israel'
|
|
90
92
|
}
|
|
91
93
|
}),
|
|
92
|
-
|
|
93
|
-
verified: undefined
|
|
94
|
+
verified: false
|
|
94
95
|
};
|
|
95
96
|
exports.userProfileDemo = userProfileDemo;
|
|
96
97
|
const userDemo = (0, _extends2.default)({}, userProfileDemo, {
|
package/node/auth/interfaces.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UserVeirifedOriginTypes = exports.AuthenticationTypes = exports.AdminPortalPagesForEvents = exports.AdminPortalPages = void 0;
|
|
7
|
-
//TODO: move act and subAccountAccessAllowed to IUserProfile in rest-api
|
|
8
7
|
let UserVeirifedOriginTypes;
|
|
9
8
|
exports.UserVeirifedOriginTypes = UserVeirifedOriginTypes;
|
|
10
9
|
(function (UserVeirifedOriginTypes) {
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.121.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.
|
|
9
|
+
"@frontegg/rest-api": "3.1.5",
|
|
10
10
|
"@reduxjs/toolkit": "1.8.5",
|
|
11
11
|
"fast-deep-equal": "3.1.3",
|
|
12
12
|
"redux-saga": "^1.2.1",
|