@frontegg/redux-store 7.27.0 → 7.28.0-alpha.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/ActivateAccountState/actions.js +4 -3
- package/auth/LoginState/actions/index.js +7 -7
- package/auth/LoginState/interfaces.d.ts +1 -1
- package/auth/SSOState/actions/index.d.ts +1 -1
- package/auth/SocialLoginState/actions.js +2 -2
- package/auth/interfaces.d.ts +12 -10
- package/auth/interfaces.js +6 -6
- package/index.js +1 -1
- package/mocks/auth-mocks/acceptInvitationActions.mocks.d.ts +2 -2
- package/mocks/auth-mocks/activateAccountActions.mocks.d.ts +2 -2
- package/mocks/auth-mocks/applicationsActions.mocks.d.ts +5 -5
- package/mocks/auth-mocks/loginActions.mocks.d.ts +29 -29
- package/mocks/auth-mocks/provisioningActions.mocks.d.ts +4 -4
- package/mocks/auth-mocks/resetPhoneNumberActions.mocks.d.ts +2 -2
- package/mocks/auth-mocks/rolesActions.mocks.d.ts +6 -6
- package/mocks/auth-mocks/smsActions.mocks.d.ts +4 -4
- package/mocks/auth-mocks/socialLoginActions.mocks.d.ts +1 -1
- package/mocks/auth-mocks/stepUpActions.mocks.d.ts +5 -5
- package/mocks/auth-mocks/tenantsActions.mocks.d.ts +1 -1
- package/mocks/connectivity-mocks/index.d.ts +2 -2
- package/mocks/dummy.js +1 -2
- package/mocks/index.d.ts +2 -2
- package/mocks/subscriptions-mocks/billingActions-mocks/paymentMethodActions.mocks.d.ts +1 -1
- package/node/auth/ActivateAccountState/actions.js +3 -2
- package/node/auth/LoginState/actions/index.js +6 -6
- package/node/auth/SocialLoginState/actions.js +1 -1
- package/node/auth/interfaces.js +8 -8
- package/node/index.js +1 -1
- package/node/mocks/dummy.js +1 -2
- package/node/valtio/utils/devtools.js +3 -1
- package/node/valtio/utils/proxyWithComputed.js +3 -1
- package/node/valtio/utils/proxyWithHistory.js +3 -2
- package/package.json +2 -2
- package/valtio/utils/devtools.js +6 -1
- package/valtio/utils/proxyWithComputed.js +3 -1
- package/valtio/utils/proxyWithHistory.js +3 -2
|
@@ -11,7 +11,7 @@ import { initialState } from './state';
|
|
|
11
11
|
import { ContextHolder } from '@frontegg/rest-api';
|
|
12
12
|
import { errorHandler, delay, deepResetState } from '../../helpers';
|
|
13
13
|
import { ActivateAccountStep } from './interfaces';
|
|
14
|
-
import {
|
|
14
|
+
import { UserVerifiedOriginTypes } from '../interfaces';
|
|
15
15
|
import { GTMEventAction, reportGTMEvent } from '../../helpers/gtm';
|
|
16
16
|
import { isMfaRequired } from '../helpers';
|
|
17
17
|
import { TeamStateKeys } from '../TeamState/interfaces';
|
|
@@ -93,7 +93,7 @@ export default ((store, api, sharedActions) => {
|
|
|
93
93
|
});
|
|
94
94
|
const userVerifiedPayload = {
|
|
95
95
|
email: user.email,
|
|
96
|
-
origin:
|
|
96
|
+
origin: UserVerifiedOriginTypes.ACTIVATION_LINK,
|
|
97
97
|
id: user.id,
|
|
98
98
|
tenantId: user.tenantId,
|
|
99
99
|
name: user.name,
|
|
@@ -173,7 +173,8 @@ export default ((store, api, sharedActions) => {
|
|
|
173
173
|
} catch (e) {
|
|
174
174
|
setActivateState({
|
|
175
175
|
loading: false,
|
|
176
|
-
error: errorHandler(e)
|
|
176
|
+
error: errorHandler(e),
|
|
177
|
+
step: ActivateAccountStep.activating
|
|
177
178
|
});
|
|
178
179
|
}
|
|
179
180
|
};
|
|
@@ -29,7 +29,7 @@ import { getSearchParam, isEmailPayload, TENANT_ID_PARAM_KEY } from '../helpers'
|
|
|
29
29
|
import { AuthStrategyEnum, ContextHolder, WebAuthnDeviceType } from '@frontegg/rest-api';
|
|
30
30
|
import hostedLoginAuthorizeActions from './hostedLoginAuthorize.actions';
|
|
31
31
|
import { FronteggNativeModule, isEntitlementsDeeplyEqual } from '../../../toolkit';
|
|
32
|
-
import {
|
|
32
|
+
import { UserVerifiedOriginTypes } from '../../interfaces';
|
|
33
33
|
import { authStrategyLoginStepMap } from '../consts';
|
|
34
34
|
import { GTMEventAction, reportGTMEvent } from '../../../helpers';
|
|
35
35
|
import { isMfaRequired } from '../../helpers';
|
|
@@ -72,7 +72,7 @@ export default ((store, api, sharedActions) => {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
const
|
|
75
|
+
const __shouldNavigateToRegisterQuickLogin = user => {
|
|
76
76
|
var _ref;
|
|
77
77
|
const {
|
|
78
78
|
routes,
|
|
@@ -107,7 +107,7 @@ export default ((store, api, sharedActions) => {
|
|
|
107
107
|
localStorage.setItem('userId', user.id);
|
|
108
108
|
}
|
|
109
109
|
const quickLoginToRegister = (_ref2 = localStorage.getItem('register-quick-login')) != null ? _ref2 : loginState.quickLoginToRegister;
|
|
110
|
-
const shouldNavigateToRegisterQuickLogin =
|
|
110
|
+
const shouldNavigateToRegisterQuickLogin = __shouldNavigateToRegisterQuickLogin(user);
|
|
111
111
|
const updatedUser = await __handleUnnecessaryEntitlementsUpdate(user);
|
|
112
112
|
actions.afterAuthenticationStateUpdate({
|
|
113
113
|
user: updatedUser,
|
|
@@ -156,7 +156,7 @@ export default ((store, api, sharedActions) => {
|
|
|
156
156
|
// @ts-ignore TODO: fix entitlements state type
|
|
157
157
|
const oldEntitlements = (_store$auth$user = store.auth.user) == null ? void 0 : _store$auth$user.entitlements;
|
|
158
158
|
if (isEntitlementsDeeplyEqual(oldEntitlements, updatedUser == null ? void 0 : updatedUser.entitlements)) {
|
|
159
|
-
// set the previous
|
|
159
|
+
// set the previous entitlements object
|
|
160
160
|
return _extends({}, updatedUser, {
|
|
161
161
|
entitlements: oldEntitlements
|
|
162
162
|
});
|
|
@@ -266,7 +266,7 @@ export default ((store, api, sharedActions) => {
|
|
|
266
266
|
calls.push(__refreshMetadata());
|
|
267
267
|
/*
|
|
268
268
|
We will load custom login routes only if custom login is enabled
|
|
269
|
-
|
|
269
|
+
to check if custom login is enabled without the tenant alias (search-param/subdomain)
|
|
270
270
|
we have to wait for the user state (refreshToken request)
|
|
271
271
|
*/
|
|
272
272
|
callsAfterRefresh.push(actions.loadCustomLoginRoutes());
|
|
@@ -712,7 +712,7 @@ export default ((store, api, sharedActions) => {
|
|
|
712
712
|
var _events$userVerified;
|
|
713
713
|
const userVerifiedPayload = {
|
|
714
714
|
email: user.email,
|
|
715
|
-
origin:
|
|
715
|
+
origin: UserVerifiedOriginTypes.PASSWORDLESS,
|
|
716
716
|
id: user.id,
|
|
717
717
|
tenantId: user.tenantId,
|
|
718
718
|
createdAt: new Date(),
|
|
@@ -1231,7 +1231,7 @@ export default ((store, api, sharedActions) => {
|
|
|
1231
1231
|
localStorage.setItem('userId', user.id);
|
|
1232
1232
|
}
|
|
1233
1233
|
const quickLoginToRegister = (_ref4 = localStorage.getItem('register-quick-login')) != null ? _ref4 : loginState.quickLoginToRegister;
|
|
1234
|
-
const shouldNavigateToRegisterQuickLogin =
|
|
1234
|
+
const shouldNavigateToRegisterQuickLogin = __shouldNavigateToRegisterQuickLogin(user);
|
|
1235
1235
|
actions.afterAuthenticationStateUpdate({
|
|
1236
1236
|
user: updatedUser,
|
|
1237
1237
|
tenants,
|
|
@@ -109,7 +109,7 @@ export type SetLoadingAction = ({ loading, error }: {
|
|
|
109
109
|
export declare enum LoginActionTypes {
|
|
110
110
|
'social-login' = "social-login",
|
|
111
111
|
'custom-social-login' = "custom-social-login",
|
|
112
|
-
|
|
112
|
+
direct = "direct"
|
|
113
113
|
}
|
|
114
114
|
export interface LoginDirectAction {
|
|
115
115
|
type: keyof typeof LoginActionTypes;
|
|
@@ -27,6 +27,6 @@ declare const _default: (store: FronteggState, api: RestApi, sharedActions: Shar
|
|
|
27
27
|
updateSSOAuthorizationRoles: (payload: import("../interfaces").UpdateSSOAuthorizationRolesPayload) => Promise<void>;
|
|
28
28
|
deleteSamlGroup: (payload: import("../interfaces").DeleteSamlGroupPayload) => Promise<void>;
|
|
29
29
|
createSamlGroup: (payload: import("../interfaces").CreateSamlGroupPayload) => Promise<void>;
|
|
30
|
-
oidcPostlogin: (payload: import("
|
|
30
|
+
oidcPostlogin: (payload: import("dist/@frontegg/rest-api").IOidcPostLogin) => Promise<void>;
|
|
31
31
|
};
|
|
32
32
|
export default _default;
|
|
@@ -4,7 +4,7 @@ const _excluded = ["authorizationUrl"],
|
|
|
4
4
|
_excluded2 = ["events", "url"];
|
|
5
5
|
import { deepResetState, errorHandler } from '../../helpers';
|
|
6
6
|
import { initialState } from './state';
|
|
7
|
-
import { AuthenticationTypes,
|
|
7
|
+
import { AuthenticationTypes, UserVerifiedOriginTypes } from '../interfaces';
|
|
8
8
|
import { GTMEventAction, reportGTMEvent } from '../../helpers/gtm';
|
|
9
9
|
export default ((store, api, sharedActions) => {
|
|
10
10
|
const actions = sharedActions;
|
|
@@ -126,7 +126,7 @@ export default ((store, api, sharedActions) => {
|
|
|
126
126
|
events == null ? void 0 : (_events$signUpComplet = events.signUpComplete) == null ? void 0 : _events$signUpComplet.call(events, signUpCompletePayload);
|
|
127
127
|
reportGTMEvent(GTMEventAction.SIGNUP_COMPLETED, signUpCompletePayload);
|
|
128
128
|
const userVerifiedPayload = _extends({}, basePayload, {
|
|
129
|
-
origin:
|
|
129
|
+
origin: UserVerifiedOriginTypes.SOCIAL_LOGIN,
|
|
130
130
|
name
|
|
131
131
|
});
|
|
132
132
|
events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, userVerifiedPayload);
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ export type AuthPageRoutes = {
|
|
|
118
118
|
*/
|
|
119
119
|
loginUrl: string;
|
|
120
120
|
/**
|
|
121
|
-
* the page whether you need to redirect in the case when a customer
|
|
121
|
+
* the page whether you need to redirect in the case when a customer asks to step up and the user doesn't step up already
|
|
122
122
|
*/
|
|
123
123
|
stepUpUrl: string;
|
|
124
124
|
/**
|
|
@@ -126,19 +126,19 @@ export type AuthPageRoutes = {
|
|
|
126
126
|
*/
|
|
127
127
|
logoutUrl: string;
|
|
128
128
|
/**
|
|
129
|
-
* the page whither need to redirect in the case when a user
|
|
129
|
+
* the page whither need to redirect in the case when a user wants to activate their account
|
|
130
130
|
*/
|
|
131
131
|
activateUrl: string;
|
|
132
132
|
/**
|
|
133
|
-
* the page whither need to redirect in the case when a user
|
|
133
|
+
* the page whither need to redirect in the case when a user wants to activate their account with code
|
|
134
134
|
*/
|
|
135
135
|
activateWithOTCUrl: string;
|
|
136
136
|
/**
|
|
137
|
-
* the page whither need to redirect in the case when a user
|
|
137
|
+
* the page whither need to redirect in the case when a user wants to impersonate another user
|
|
138
138
|
*/
|
|
139
139
|
impersonationUrl: string;
|
|
140
140
|
/**
|
|
141
|
-
* the page whether you need to redirect in the case when a user
|
|
141
|
+
* the page whether you need to redirect in the case when a user wants to accept invite to tenant
|
|
142
142
|
*/
|
|
143
143
|
acceptInvitationUrl: string;
|
|
144
144
|
/**
|
|
@@ -150,7 +150,7 @@ export type AuthPageRoutes = {
|
|
|
150
150
|
*/
|
|
151
151
|
forgetPasswordUrl: string;
|
|
152
152
|
/**
|
|
153
|
-
* the page in the case a user wants to reset
|
|
153
|
+
* the page in the case a user wants to reset their account phone number
|
|
154
154
|
*/
|
|
155
155
|
resetPhoneNumberUrl: string;
|
|
156
156
|
/**
|
|
@@ -178,11 +178,13 @@ export type AuthPageRoutes = {
|
|
|
178
178
|
*/
|
|
179
179
|
magicLinkCallbackUrl?: string;
|
|
180
180
|
/**
|
|
181
|
-
* after sign
|
|
181
|
+
* after sign-up success url, the order of urls read:
|
|
182
|
+
* (accountSignUpSuccessUrl or userSignUpSuccessUrl) / signupSuccessUrl / authenticationUrl
|
|
182
183
|
*/
|
|
183
184
|
signUpSuccessUrl?: string;
|
|
184
185
|
/**
|
|
185
|
-
* after account sign
|
|
186
|
+
* after account sign-up success url, the order of urls read:
|
|
187
|
+
* accountSignUpSuccessUrl / signupSuccessUrl / authenticationUrl
|
|
186
188
|
*/
|
|
187
189
|
accountSignUpSuccessUrl?: string;
|
|
188
190
|
/**
|
|
@@ -216,7 +218,7 @@ export type AuthPageRoutes = {
|
|
|
216
218
|
*/
|
|
217
219
|
mfaMobileAuthenticator?: string;
|
|
218
220
|
};
|
|
219
|
-
export declare enum
|
|
221
|
+
export declare enum UserVerifiedOriginTypes {
|
|
220
222
|
SOCIAL_LOGIN = "SOCIAL_LOGIN",
|
|
221
223
|
PASSWORDLESS = "PASSWORDLESS",
|
|
222
224
|
ACTIVATION_LINK = "ACTIVATION_LINK"
|
|
@@ -252,7 +254,7 @@ export interface CustomEventsOptions {
|
|
|
252
254
|
}
|
|
253
255
|
export interface IUserVerifiedPayload {
|
|
254
256
|
email: string;
|
|
255
|
-
origin:
|
|
257
|
+
origin: UserVerifiedOriginTypes;
|
|
256
258
|
createdAt?: Date;
|
|
257
259
|
tenantId?: string;
|
|
258
260
|
id?: string;
|
package/auth/interfaces.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export let
|
|
2
|
-
(function (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})(
|
|
1
|
+
export let UserVerifiedOriginTypes;
|
|
2
|
+
(function (UserVerifiedOriginTypes) {
|
|
3
|
+
UserVerifiedOriginTypes["SOCIAL_LOGIN"] = "SOCIAL_LOGIN";
|
|
4
|
+
UserVerifiedOriginTypes["PASSWORDLESS"] = "PASSWORDLESS";
|
|
5
|
+
UserVerifiedOriginTypes["ACTIVATION_LINK"] = "ACTIVATION_LINK";
|
|
6
|
+
})(UserVerifiedOriginTypes || (UserVerifiedOriginTypes = {}));
|
|
7
7
|
export let AuthenticationTypes;
|
|
8
8
|
(function (AuthenticationTypes) {
|
|
9
9
|
AuthenticationTypes["SOCIAL_LOGIN"] = "SOCIAL_LOGIN";
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { FronteggState, RestApi, SharedActions } from '../../interfaces';
|
|
|
2
2
|
declare const _default: (store: FronteggState, api: RestApi, actions: SharedActions) => {
|
|
3
3
|
setAcceptInvitationState: (state: Partial<import("../..").AcceptInvitationState>) => void;
|
|
4
4
|
resetAcceptInvitationState: () => void;
|
|
5
|
-
acceptInvitation: (payload: import("
|
|
6
|
-
acceptInvitationWithOTC: (payload: import("
|
|
5
|
+
acceptInvitation: (payload: import("dist/@frontegg/rest-api").IAcceptInvitation) => Promise<void>;
|
|
6
|
+
acceptInvitationWithOTC: (payload: import("dist/@frontegg/rest-api").IAcceptInvitationWithOTC) => Promise<void>;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
@@ -5,8 +5,8 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
|
|
|
5
5
|
setActivateStrategyState: (state: Partial<import("../..").ActivateAccountState["activationStrategy"]>) => void;
|
|
6
6
|
activateAccount: (_payload: import("../../interfaces").WithCallback<import("../..").IActivateAccountPayload>) => Promise<void>;
|
|
7
7
|
preActivateAccount: (payload: import("../..").IPreActivateAccount) => Promise<void>;
|
|
8
|
-
getActivateAccountStrategy: (payload: import("../../interfaces").WithCallback<import("
|
|
9
|
-
resendActivationEmail: (payload: import("../../interfaces").WithCallback<import("
|
|
8
|
+
getActivateAccountStrategy: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IGetActivateAccountStrategy, import("dist/@frontegg/rest-api").IGetActivateAccountStrategyResponse>) => Promise<void>;
|
|
9
|
+
resendActivationEmail: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IResendActivationEmail>) => Promise<void>;
|
|
10
10
|
activateAccountWithCode: (_payload: import("../../interfaces").WithCallback<import("../..").IActivateAccountWithOTCPayload>) => Promise<void>;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -6,18 +6,18 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
|
|
|
6
6
|
loadAccountApplications: () => Promise<void>;
|
|
7
7
|
loadMultipleUsersApplications: ({ userIds }: {
|
|
8
8
|
userIds: string[];
|
|
9
|
-
}) => Promise<Record<string, import("
|
|
9
|
+
}) => Promise<Record<string, import("dist/@frontegg/rest-api").IApplicationsResponse[]> | undefined>;
|
|
10
10
|
assignUserToApps: (payload: import("../../interfaces").WithCallback<import("../..").UserAppsAssignmentPayload>) => Promise<void>;
|
|
11
11
|
unassignUserFromApps: (payload: import("../../interfaces").WithCallback<import("../..").UserAppsAssignmentPayload>) => Promise<void>;
|
|
12
12
|
assignNewUserToApps: ({ appIds, user }: {
|
|
13
13
|
appIds?: string[];
|
|
14
|
-
user: import("
|
|
15
|
-
}) => Promise<((import("
|
|
14
|
+
user: import("dist/@frontegg/rest-api").ITeamUser;
|
|
15
|
+
}) => Promise<((import("dist/@frontegg/rest-api").IApplicationsResponse & {
|
|
16
16
|
userIds?: string[];
|
|
17
17
|
}) | never[])[] | undefined>;
|
|
18
18
|
mapUsersWithApplicationData: ({ shouldLoadApps, users, }: {
|
|
19
19
|
shouldLoadApps?: boolean;
|
|
20
|
-
users: import("
|
|
21
|
-
}) => Promise<import("
|
|
20
|
+
users: import("dist/@frontegg/rest-api").ITeamUser[];
|
|
21
|
+
}) => Promise<import("dist/@frontegg/rest-api").ITeamUser[]>;
|
|
22
22
|
};
|
|
23
23
|
export default _default;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { FronteggState, RestApi, SharedActions, WithCallback } from '../../interfaces';
|
|
2
2
|
declare const _default: (store: FronteggState, api: RestApi, sharedActions: SharedActions) => {
|
|
3
|
-
preVerifyMFAWebAuthn: ({ callback, deviceId, ...payload }: WithCallback<import("../..").WithDeviceId<import("
|
|
3
|
+
preVerifyMFAWebAuthn: ({ callback, deviceId, ...payload }: WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>, import("../..").IPreVerifyMFAWebAuthNForLoginResponse>, setLoadingAction: import("../..").SetLoadingAction) => Promise<void>;
|
|
4
4
|
verifyMFAWebAuthn: ({ callback, deviceId, ...payload }: import("../..").IVerifyMFAWebAuthnPayload, setLoadingAction: import("../..").SetLoadingAction, isStepUp: boolean) => Promise<void>;
|
|
5
|
-
preVerifyMFAWebAuthnForLogin: (payload: WithCallback<import("../..").WithDeviceId<import("
|
|
5
|
+
preVerifyMFAWebAuthnForLogin: (payload: WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>, import("../..").IPreVerifyMFAWebAuthNForLoginResponse>) => Promise<void>;
|
|
6
6
|
verifyMFAWebAuthnForLogin: (payload: import("../..").IVerifyMFAWebAuthnPayload) => Promise<void>;
|
|
7
|
-
preVerifyMFASMS: ({ callback, deviceId, ...payload }: WithCallback<import("../..").WithDeviceId<import("
|
|
8
|
-
verifyMFASMS: ({ callback, deviceId, ...payload }: WithCallback<import("../..").WithDeviceId<import("
|
|
9
|
-
preVerifyMFASMSForLogin: (payload: WithCallback<import("../..").WithDeviceId<import("
|
|
10
|
-
verifyMFASMSForLogin: (payload: WithCallback<import("../..").WithDeviceId<import("
|
|
11
|
-
preVerifyMFAEmailCode: ({ callback, ...payload }: WithCallback<import("
|
|
12
|
-
verifyMFAEmailCode: ({ callback, ...payload }: WithCallback<import("
|
|
13
|
-
preVerifyMFAEmailCodeForLogin: (payload: WithCallback<import("
|
|
14
|
-
verifyMFAEmailCodeForLogin: (payload: WithCallback<import("
|
|
15
|
-
mfaWithAuthenticator: ({ callback, ...loginWithMfaPayload }: WithCallback<import("
|
|
16
|
-
loginWithMfa: (payload: WithCallback<import("
|
|
7
|
+
preVerifyMFASMS: ({ callback, deviceId, ...payload }: WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>>, setLoadingAction: import("../..").SetLoadingAction) => Promise<void>;
|
|
8
|
+
verifyMFASMS: ({ callback, deviceId, ...payload }: WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IVerifyMFASMS>>, setLoadingAction: import("../..").SetLoadingAction, isStepUp?: boolean) => Promise<void>;
|
|
9
|
+
preVerifyMFASMSForLogin: (payload: WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>>) => Promise<void>;
|
|
10
|
+
verifyMFASMSForLogin: (payload: WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IVerifyMFASMS>>) => Promise<void>;
|
|
11
|
+
preVerifyMFAEmailCode: ({ callback, ...payload }: WithCallback<import("dist/@frontegg/rest-api").IPreVerifyMFA>, setLoadingAction?: import("../..").SetLoadingAction) => Promise<void>;
|
|
12
|
+
verifyMFAEmailCode: ({ callback, ...payload }: WithCallback<import("dist/@frontegg/rest-api").IVerifyMFAEmailCode>, setLoadingAction?: import("../..").SetLoadingAction) => Promise<void>;
|
|
13
|
+
preVerifyMFAEmailCodeForLogin: (payload: WithCallback<import("dist/@frontegg/rest-api").IPreVerifyMFA>) => Promise<void>;
|
|
14
|
+
verifyMFAEmailCodeForLogin: (payload: WithCallback<import("dist/@frontegg/rest-api").IVerifyMFAEmailCode>) => Promise<void>;
|
|
15
|
+
mfaWithAuthenticator: ({ callback, ...loginWithMfaPayload }: WithCallback<import("dist/@frontegg/rest-api").ILoginWithMfa>, setLoadingAction: import("../..").SetLoadingAction, isStepUp: boolean) => Promise<void>;
|
|
16
|
+
loginWithMfa: (payload: WithCallback<import("dist/@frontegg/rest-api").ILoginWithMfa>) => Promise<void>;
|
|
17
17
|
getMfaRequiredState: (user: import("../..").User | any) => Promise<Partial<import("../..").AuthState> & {
|
|
18
18
|
mfaState: Partial<import("../..").MFAState>;
|
|
19
19
|
loginState: Partial<import("../..").LoginState>;
|
|
20
20
|
}>;
|
|
21
21
|
postHandleVerifyMFAResponseForStepUp: () => Promise<void>;
|
|
22
22
|
postHandleVerifyMFAResponseForLogin: (isAuthenticated: boolean) => Promise<void>;
|
|
23
|
-
handleVerifyMFAResponse: (payload: import("
|
|
23
|
+
handleVerifyMFAResponse: (payload: import("dist/@frontegg/rest-api").ILoginResponseV3, isStepUp?: boolean) => Promise<void>;
|
|
24
24
|
getFeatureFlags: (flags: string[]) => Promise<boolean[]>;
|
|
25
25
|
afterAuthNavigationUtil: (resetStateAction: (() => void) | (() => Promise<void>), options?: import("../..").AfterAuthNavigationUtilOptions) => Promise<void>;
|
|
26
26
|
afterAuthNavigation: (payload?: Pick<import("../..").AfterAuthNavigationUtilOptions, "preventRedirectUrlOriginCleaning">) => Promise<void>;
|
|
27
27
|
afterStepUpAuthNavigation: () => Promise<void>;
|
|
28
|
-
afterAuthenticationStateUpdate: ({ user, tenants, activeTenant }: import("
|
|
28
|
+
afterAuthenticationStateUpdate: ({ user, tenants, activeTenant }: import("dist/@frontegg/rest-api").ILoginResponseV3, additionalUpdate?: Partial<import("../..").AuthState>) => void;
|
|
29
29
|
requestHostedLoginAuthorize: (additionalParams?: Record<string, string>) => Promise<void>;
|
|
30
30
|
requestHostedLoginAuthorizeV2: (payload?: {
|
|
31
31
|
additionalParams?: Record<string, string>;
|
|
@@ -40,35 +40,35 @@ declare const _default: (store: FronteggState, api: RestApi, sharedActions: Shar
|
|
|
40
40
|
resetLoginState: () => void;
|
|
41
41
|
requestAuthorize: (firstTime?: boolean) => Promise<void>;
|
|
42
42
|
requestAuthorizeSSR: (payload: import("../..").FronteggNextJSSession) => Promise<void>;
|
|
43
|
-
preLogin: (payload: WithCallback<import("
|
|
43
|
+
preLogin: (payload: WithCallback<import("dist/@frontegg/rest-api").IPreLogin & {
|
|
44
44
|
recaptchaToken?: string;
|
|
45
45
|
invitationToken?: string;
|
|
46
46
|
}, void>) => Promise<void>;
|
|
47
|
-
postLogin: (payload: import("
|
|
48
|
-
login: (payload: WithCallback<import("
|
|
47
|
+
postLogin: (payload: import("dist/@frontegg/rest-api").IPostLogin) => Promise<void>;
|
|
48
|
+
login: (payload: WithCallback<import("dist/@frontegg/rest-api").ILogin>) => Promise<void>;
|
|
49
49
|
logout: (payload?: () => void) => Promise<void>;
|
|
50
50
|
silentLogout: (payload?: WithCallback<{
|
|
51
51
|
callbackTimeout?: number;
|
|
52
52
|
}>) => Promise<void>;
|
|
53
53
|
recoverMfa: (payload: import("../..").IRecoverMFATokenPayload) => Promise<void>;
|
|
54
54
|
quickSmsPasswordlessPreLogin: (_payload: WithCallback<import("../..").IQuickSmsPasswordlessPreLoginPayload>) => Promise<void>;
|
|
55
|
-
changePhoneNumberWithVerification: (_payload: WithCallback<import("
|
|
56
|
-
verifyChangePhoneNumber: (_payload: WithCallback<import("
|
|
57
|
-
passwordlessPreLogin: (_payload: WithCallback<import("
|
|
55
|
+
changePhoneNumberWithVerification: (_payload: WithCallback<import("dist/@frontegg/rest-api").IChangePhoneNumberWithVerification>) => Promise<void>;
|
|
56
|
+
verifyChangePhoneNumber: (_payload: WithCallback<import("dist/@frontegg/rest-api").IVerifyChangePhoneNumber>) => Promise<void>;
|
|
57
|
+
passwordlessPreLogin: (_payload: WithCallback<import("dist/@frontegg/rest-api").IPasswordlessPreLogin, void>) => Promise<void>;
|
|
58
58
|
passwordlessPostLogin: (_payload: WithCallback<import("../..").IPasswordlessPostLoginPayload>) => Promise<void>;
|
|
59
|
-
verifyInviteToken: (payload: import("
|
|
60
|
-
webAuthnPrelogin: (payload: WithCallback<import("
|
|
59
|
+
verifyInviteToken: (payload: import("dist/@frontegg/rest-api").IVerifyInviteToken) => Promise<void>;
|
|
60
|
+
webAuthnPrelogin: (payload: WithCallback<import("dist/@frontegg/rest-api").IWebAuthnPreLogin, import("dist/@frontegg/rest-api").IWebAuthnPreLoginResponse | null>) => Promise<void>;
|
|
61
61
|
webAuthnPostLogin: (payload: import("../..").IWebAuthnPostLoginPayload) => Promise<void>;
|
|
62
|
-
webAuthnCreateNewDeviceSession: (payload: WithCallback<{}, import("
|
|
62
|
+
webAuthnCreateNewDeviceSession: (payload: WithCallback<{}, import("dist/@frontegg/rest-api").ICreateNewDeviceSessionResponse | null>) => Promise<void>;
|
|
63
63
|
webAuthnVerifyNewDeviceSession: (payload: import("../..").IVerifyNewWebAuthnDevicePayload) => Promise<void>;
|
|
64
64
|
getUserIP: (payload: WithCallback) => Promise<void>;
|
|
65
|
-
preEnrollMFAWebAuthnForLogin: (_payload: WithCallback<import("
|
|
65
|
+
preEnrollMFAWebAuthnForLogin: (_payload: WithCallback<import("dist/@frontegg/rest-api").IPreEnrollMFA, import("../..").IPreEnrollMFAWebAuthNForLoginResponse>) => Promise<void>;
|
|
66
66
|
enrollMFAWebAuthnForLogin: (_payload: import("../..").IEnrollMFAWebAuthnPayload) => Promise<void>;
|
|
67
|
-
enrollMFAAuthenticatorAppForLogin: (_payload: WithCallback<import("
|
|
68
|
-
preEnrollMFASMSForLogin: (_payload: WithCallback<import("
|
|
69
|
-
enrollMFASMSForLogin: (_payload: WithCallback<import("
|
|
70
|
-
handleEnrollMFAResponse: (payload: import("
|
|
71
|
-
resetBreachedPassword: (payload: import("
|
|
67
|
+
enrollMFAAuthenticatorAppForLogin: (_payload: WithCallback<import("dist/@frontegg/rest-api").IEnrollMFAAuthenticatorApp>) => Promise<void>;
|
|
68
|
+
preEnrollMFASMSForLogin: (_payload: WithCallback<import("dist/@frontegg/rest-api").IPreEnrollMFASMS>) => Promise<void>;
|
|
69
|
+
enrollMFASMSForLogin: (_payload: WithCallback<import("dist/@frontegg/rest-api").IEnrollMFASMS>) => Promise<void>;
|
|
70
|
+
handleEnrollMFAResponse: (payload: import("dist/@frontegg/rest-api").ILoginResponseV3) => Promise<void>;
|
|
71
|
+
resetBreachedPassword: (payload: import("dist/@frontegg/rest-api").IForgotPassword) => Promise<void>;
|
|
72
72
|
refreshTokenForSocialLogins: () => Promise<void>;
|
|
73
73
|
__refreshToken: () => Promise<void>;
|
|
74
74
|
};
|
|
@@ -2,18 +2,18 @@ import { FronteggState, RestApi, SharedActions } from '../../interfaces';
|
|
|
2
2
|
declare const _default: (store: FronteggState, api: RestApi, actions: SharedActions) => {
|
|
3
3
|
setProvisioningState: (state: Partial<import("../..").ProvisioningState>) => void;
|
|
4
4
|
resetProvisioningState: () => void;
|
|
5
|
-
__loadCountForConnection: (connection: import("
|
|
5
|
+
__loadCountForConnection: (connection: import("dist/@frontegg/rest-api").Scim2ConnectionConfigResponse) => Promise<{
|
|
6
6
|
count: number;
|
|
7
7
|
id: string;
|
|
8
8
|
connectionName: string;
|
|
9
|
-
source: import("
|
|
9
|
+
source: import("dist/@frontegg/rest-api").ScimConnectionSource;
|
|
10
10
|
syncToUserManagement: boolean;
|
|
11
11
|
createdAt: Date;
|
|
12
12
|
lastSync?: Date | null;
|
|
13
13
|
}>;
|
|
14
14
|
loadProvisionConnections: () => Promise<void>;
|
|
15
|
-
createProvisionConnection: (payload: import("../../interfaces").WithCallback<import("
|
|
15
|
+
createProvisionConnection: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").Scim2CreateConnectionConfigRequest, import("dist/@frontegg/rest-api").Scim2CreateConnectionConfigResponse>) => Promise<void>;
|
|
16
16
|
deleteProvisionConnection: (payload: import("../../interfaces").WithCallback<import("../../interfaces").WithId>) => Promise<void>;
|
|
17
|
-
updateProvisionConnection: (payload: import("../../interfaces").WithId<import("
|
|
17
|
+
updateProvisionConnection: (payload: import("../../interfaces").WithId<import("dist/@frontegg/rest-api").Scim2PatchConnectionConfigRequest>) => Promise<void>;
|
|
18
18
|
};
|
|
19
19
|
export default _default;
|
|
@@ -2,8 +2,8 @@ import { FronteggState, RestApi, SharedActions } from '../../interfaces';
|
|
|
2
2
|
declare const _default: (store: FronteggState, api: RestApi, actions: SharedActions) => {
|
|
3
3
|
setResetPhoneNumberState: (state: Partial<import("../..").ResetPhoneNumberState>) => void;
|
|
4
4
|
resetResetPhoneNumberState: () => void;
|
|
5
|
-
resetPhoneNumber: (payload: import("../../interfaces").WithCallback<import("
|
|
6
|
-
verifyResetPhoneNumber: (payload: import("../../interfaces").WithCallback<import("
|
|
5
|
+
resetPhoneNumber: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IResetPhoneNumber>) => Promise<void>;
|
|
6
|
+
verifyResetPhoneNumber: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IVerifyResetPhoneNumber>) => Promise<void>;
|
|
7
7
|
changePhoneNumber: (payload: import("../..").ChangePhoneNumberPayload) => Promise<void>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -5,11 +5,11 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
|
|
|
5
5
|
setRolesStateError: (payload: import("../../auth").RolesStateIndicator) => void;
|
|
6
6
|
resetRolesState: () => void;
|
|
7
7
|
loadRolesAndPermissions: (payload?: WithSilentLoad<{}>) => Promise<void>;
|
|
8
|
-
addRole: (payload: import("../../interfaces").WithCallback<import("
|
|
9
|
-
addRoleV2: (payload: import("../../interfaces").WithCallback<import("
|
|
10
|
-
updateRole: (payload: import("../../interfaces").WithCallback<import("
|
|
11
|
-
deleteRole: (payload: import("../../interfaces").WithCallback<import("
|
|
12
|
-
attachPermissionsToRole: (payload: import("../../interfaces").WithCallback<import("
|
|
13
|
-
attachPermissionToRoles: (payload: import("../../interfaces").WithCallback<import("
|
|
8
|
+
addRole: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IAddRole, import("dist/@frontegg/rest-api").IRole>) => Promise<void>;
|
|
9
|
+
addRoleV2: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IAddRoleV2, import("dist/@frontegg/rest-api").IRole>) => Promise<void>;
|
|
10
|
+
updateRole: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IUpdateRole, import("dist/@frontegg/rest-api").IRole>) => Promise<void>;
|
|
11
|
+
deleteRole: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IDeleteRole>) => Promise<void>;
|
|
12
|
+
attachPermissionsToRole: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IAttachPermissionsToRole, import("dist/@frontegg/rest-api").IRole>) => Promise<void>;
|
|
13
|
+
attachPermissionToRoles: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IAttachPermissionToRoles>) => Promise<void>;
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
|
@@ -3,10 +3,10 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
|
|
|
3
3
|
setSmsState: (state: Partial<import("../..").SmsState>) => void;
|
|
4
4
|
resetSmsState: () => void;
|
|
5
5
|
loadPhoneNumbers: () => Promise<void>;
|
|
6
|
-
setUpPhoneNumber: (_payload: import("../../interfaces").WithCallback<import("
|
|
7
|
-
verifyPhoneNumber: (_payload: import("../../interfaces").WithCallback<import("
|
|
6
|
+
setUpPhoneNumber: (_payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IUpdatePhoneNumber>) => Promise<void>;
|
|
7
|
+
verifyPhoneNumber: (_payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IVerifyPhoneNumber>) => Promise<void>;
|
|
8
8
|
deletePhoneNumber: (_payload: import("../../interfaces").WithCallback<import("../..").IPhoneId>) => Promise<void>;
|
|
9
|
-
verifyDeletePhoneNumber: (_payload: import("../../interfaces").WithCallback<import("../..").WithPhoneId<import("
|
|
10
|
-
preVerifyPhoneNumber: (_payload: import("../../interfaces").WithCallback<import("
|
|
9
|
+
verifyDeletePhoneNumber: (_payload: import("../../interfaces").WithCallback<import("../..").WithPhoneId<import("dist/@frontegg/rest-api").IVerifyPhoneNumber>>) => Promise<void>;
|
|
10
|
+
preVerifyPhoneNumber: (_payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IPreVerifyPhoneNumber>) => Promise<void>;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { FronteggState, RestApi, SharedActions } from '../../interfaces';
|
|
|
2
2
|
declare const _default: (store: FronteggState, api: RestApi, actions: SharedActions) => {
|
|
3
3
|
setSocialLoginsState: (state: Partial<import("../..").SocialLoginState>) => void;
|
|
4
4
|
resetSocialLoginsState: () => void;
|
|
5
|
-
setSocialLoginError: (payload: import("
|
|
5
|
+
setSocialLoginError: (payload: import("dist/@frontegg/rest-api").ISetSocialLoginError) => void;
|
|
6
6
|
loadSocialLoginsConfiguration: () => Promise<void>;
|
|
7
7
|
loadSocialLoginsConfigurationV2: (payload?: import("../../interfaces").WithCallback<{}, import("../..").SocialLoginState>) => Promise<void>;
|
|
8
8
|
loginViaSocialLogin: (_payload: import("../..").ILoginViaSocialLoginPayload) => Promise<void>;
|
|
@@ -5,11 +5,11 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
|
|
|
5
5
|
setStepUpState: (state: Partial<import("../..").StepUpState>) => void;
|
|
6
6
|
resetStepUpState: () => void;
|
|
7
7
|
stepUpWithAuthenticator: (payload: import("../../interfaces").WithCallback<import("../..").IStepUpWithAuthenticator>) => Promise<void>;
|
|
8
|
-
preVerifyMFASMSForStepUp: (payload: import("../../interfaces").WithCallback<import("../..").WithDeviceId<import("
|
|
9
|
-
verifyMFASMSForStepUp: (payload: import("../../interfaces").WithCallback<import("../..").WithDeviceId<import("
|
|
10
|
-
preVerifyMFAWebAuthnForStepUp: (payload: import("../../interfaces").WithCallback<import("../..").WithDeviceId<import("
|
|
8
|
+
preVerifyMFASMSForStepUp: (payload: import("../../interfaces").WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>>) => Promise<void>;
|
|
9
|
+
verifyMFASMSForStepUp: (payload: import("../../interfaces").WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IVerifyMFASMS>>) => Promise<void>;
|
|
10
|
+
preVerifyMFAWebAuthnForStepUp: (payload: import("../../interfaces").WithCallback<import("../..").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>, import("../..").IPreVerifyMFAWebAuthNForLoginResponse>) => Promise<void>;
|
|
11
11
|
verifyMFAWebAuthnForStepUp: (payload: import("../../interfaces").WithCallback<import("../..").IVerifyMFAWebAuthnPayload>) => Promise<void>;
|
|
12
|
-
preVerifyMFAEmailCodeForStepUp: (payload: import("../../interfaces").WithCallback<import("
|
|
13
|
-
verifyMFAEmailCodeForStepUp: (payload: import("../../interfaces").WithCallback<import("
|
|
12
|
+
preVerifyMFAEmailCodeForStepUp: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IPreVerifyMFA>) => Promise<void>;
|
|
13
|
+
verifyMFAEmailCodeForStepUp: (payload: import("../../interfaces").WithCallback<import("dist/@frontegg/rest-api").IVerifyMFAEmailCode>) => Promise<void>;
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
|
@@ -3,7 +3,7 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
|
|
|
3
3
|
setTenantsState: (state: Partial<import("../..").TenantsState>) => void;
|
|
4
4
|
resetTenantsState: () => void;
|
|
5
5
|
switchTenant: (payload: import("../../interfaces").WithCallback<import("../..").SwitchTenantOptions>) => Promise<void>;
|
|
6
|
-
loadTenants: (payload?: import("../../interfaces").WithCallback<{}, import("
|
|
6
|
+
loadTenants: (payload?: import("../../interfaces").WithCallback<{}, import("dist/@frontegg/rest-api").ITenantsResponse[]>) => Promise<void>;
|
|
7
7
|
loadSubTenants: (payload?: import("../../interfaces").WithCallback<{}>) => Promise<void>;
|
|
8
8
|
loadSubTenantsTree: (payload?: import("../../interfaces").WithCallback<{}>) => Promise<void>;
|
|
9
9
|
};
|
|
@@ -19,8 +19,8 @@ export declare const buildConnectivityActions: (store: FronteggState, api: RestA
|
|
|
19
19
|
deleteWebhookConfig: (payload: import("../../interfaces").WithCallback<{
|
|
20
20
|
webhookId: string;
|
|
21
21
|
}>) => Promise<void>;
|
|
22
|
-
postWebhookTestAction: (payload: import("
|
|
23
|
-
postWebhookTest: (payload: import("
|
|
22
|
+
postWebhookTestAction: (payload: import("dist/@frontegg/rest-api").IWebhookTest) => Promise<void>;
|
|
23
|
+
postWebhookTest: (payload: import("dist/@frontegg/rest-api").IWebhookTest) => Promise<void>;
|
|
24
24
|
postWebhookRetryAction: (payload: string) => Promise<void>;
|
|
25
25
|
postWebhookRetry: (payload: string) => Promise<void>;
|
|
26
26
|
loadWebhookLogsAction: (payload: {
|
package/mocks/dummy.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { AuthStrategyEnum, RestrictionType, GroupManagedByEnum, InsightCode, RecommendationSeverity, RecommendationCode, SecurityCategory, PermissionAssignmentTypeEnum } from '@frontegg/rest-api';
|
|
3
|
-
import { MachineToMachineAuthStrategy } from '../auth';
|
|
2
|
+
import { AuthStrategyEnum, RestrictionType, GroupManagedByEnum, InsightCode, RecommendationSeverity, RecommendationCode, SecurityCategory, PermissionAssignmentTypeEnum, MachineToMachineAuthStrategy } from '@frontegg/rest-api';
|
|
4
3
|
export const apiTokensDataDemo = {
|
|
5
4
|
clientId: 'CLIENT_ID_16806d3d-8fc3-4450-be97-abdaf66b723e',
|
|
6
5
|
secret: 'SECRET_16806d3d-8fc3-4450-be97-abdaf66b723e',
|
package/mocks/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ declare const buildMockActions: (store: FronteggState, api: RestApi, actions: Sh
|
|
|
23
23
|
deleteWebhookConfig: (payload: import("../interfaces").WithCallback<{
|
|
24
24
|
webhookId: string;
|
|
25
25
|
}>) => Promise<void>;
|
|
26
|
-
postWebhookTestAction: (payload: import("
|
|
27
|
-
postWebhookTest: (payload: import("
|
|
26
|
+
postWebhookTestAction: (payload: import("dist/@frontegg/rest-api").IWebhookTest) => Promise<void>;
|
|
27
|
+
postWebhookTest: (payload: import("dist/@frontegg/rest-api").IWebhookTest) => Promise<void>;
|
|
28
28
|
postWebhookRetryAction: (payload: string) => Promise<void>;
|
|
29
29
|
postWebhookRetry: (payload: string) => Promise<void>;
|
|
30
30
|
loadWebhookLogsAction: (payload: {
|
|
@@ -6,6 +6,6 @@ declare const _default: (store: FronteggState, api: RestApi, actions: SharedActi
|
|
|
6
6
|
submitPaymentMethod: () => Promise<void>;
|
|
7
7
|
submitPaymentMethodError: (error: string) => Promise<void>;
|
|
8
8
|
submitPaymentMethodSuccess: () => Promise<void>;
|
|
9
|
-
updatePaymentMethodBillingDetails: (payload: import("../../../interfaces").WithCallback<import("../../../interfaces").WithId<import("
|
|
9
|
+
updatePaymentMethodBillingDetails: (payload: import("../../../interfaces").WithCallback<import("../../../interfaces").WithId<import("dist/@frontegg/rest-api").ISubscriptionUpdatePaymentMethodBillingDetails>>) => Promise<void>;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -100,7 +100,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
100
100
|
});
|
|
101
101
|
const userVerifiedPayload = {
|
|
102
102
|
email: user.email,
|
|
103
|
-
origin: _interfaces2.
|
|
103
|
+
origin: _interfaces2.UserVerifiedOriginTypes.ACTIVATION_LINK,
|
|
104
104
|
id: user.id,
|
|
105
105
|
tenantId: user.tenantId,
|
|
106
106
|
name: user.name,
|
|
@@ -180,7 +180,8 @@ var _default = (store, api, sharedActions) => {
|
|
|
180
180
|
} catch (e) {
|
|
181
181
|
setActivateState({
|
|
182
182
|
loading: false,
|
|
183
|
-
error: (0, _helpers.errorHandler)(e)
|
|
183
|
+
error: (0, _helpers.errorHandler)(e),
|
|
184
|
+
step: _interfaces.ActivateAccountStep.activating
|
|
184
185
|
});
|
|
185
186
|
}
|
|
186
187
|
};
|
|
@@ -77,7 +77,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
const
|
|
80
|
+
const __shouldNavigateToRegisterQuickLogin = user => {
|
|
81
81
|
var _ref;
|
|
82
82
|
const {
|
|
83
83
|
routes,
|
|
@@ -112,7 +112,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
112
112
|
localStorage.setItem('userId', user.id);
|
|
113
113
|
}
|
|
114
114
|
const quickLoginToRegister = (_ref2 = localStorage.getItem('register-quick-login')) != null ? _ref2 : loginState.quickLoginToRegister;
|
|
115
|
-
const shouldNavigateToRegisterQuickLogin =
|
|
115
|
+
const shouldNavigateToRegisterQuickLogin = __shouldNavigateToRegisterQuickLogin(user);
|
|
116
116
|
const updatedUser = await __handleUnnecessaryEntitlementsUpdate(user);
|
|
117
117
|
actions.afterAuthenticationStateUpdate({
|
|
118
118
|
user: updatedUser,
|
|
@@ -161,7 +161,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
161
161
|
// @ts-ignore TODO: fix entitlements state type
|
|
162
162
|
const oldEntitlements = (_store$auth$user = store.auth.user) == null ? void 0 : _store$auth$user.entitlements;
|
|
163
163
|
if ((0, _toolkit.isEntitlementsDeeplyEqual)(oldEntitlements, updatedUser == null ? void 0 : updatedUser.entitlements)) {
|
|
164
|
-
// set the previous
|
|
164
|
+
// set the previous entitlements object
|
|
165
165
|
return (0, _extends2.default)({}, updatedUser, {
|
|
166
166
|
entitlements: oldEntitlements
|
|
167
167
|
});
|
|
@@ -271,7 +271,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
271
271
|
calls.push(__refreshMetadata());
|
|
272
272
|
/*
|
|
273
273
|
We will load custom login routes only if custom login is enabled
|
|
274
|
-
|
|
274
|
+
to check if custom login is enabled without the tenant alias (search-param/subdomain)
|
|
275
275
|
we have to wait for the user state (refreshToken request)
|
|
276
276
|
*/
|
|
277
277
|
callsAfterRefresh.push(actions.loadCustomLoginRoutes());
|
|
@@ -717,7 +717,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
717
717
|
var _events$userVerified;
|
|
718
718
|
const userVerifiedPayload = {
|
|
719
719
|
email: user.email,
|
|
720
|
-
origin: _interfaces2.
|
|
720
|
+
origin: _interfaces2.UserVerifiedOriginTypes.PASSWORDLESS,
|
|
721
721
|
id: user.id,
|
|
722
722
|
tenantId: user.tenantId,
|
|
723
723
|
createdAt: new Date(),
|
|
@@ -1236,7 +1236,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
1236
1236
|
localStorage.setItem('userId', user.id);
|
|
1237
1237
|
}
|
|
1238
1238
|
const quickLoginToRegister = (_ref4 = localStorage.getItem('register-quick-login')) != null ? _ref4 : loginState.quickLoginToRegister;
|
|
1239
|
-
const shouldNavigateToRegisterQuickLogin =
|
|
1239
|
+
const shouldNavigateToRegisterQuickLogin = __shouldNavigateToRegisterQuickLogin(user);
|
|
1240
1240
|
actions.afterAuthenticationStateUpdate({
|
|
1241
1241
|
user: updatedUser,
|
|
1242
1242
|
tenants,
|
|
@@ -133,7 +133,7 @@ var _default = (store, api, sharedActions) => {
|
|
|
133
133
|
events == null ? void 0 : (_events$signUpComplet = events.signUpComplete) == null ? void 0 : _events$signUpComplet.call(events, signUpCompletePayload);
|
|
134
134
|
(0, _gtm.reportGTMEvent)(_gtm.GTMEventAction.SIGNUP_COMPLETED, signUpCompletePayload);
|
|
135
135
|
const userVerifiedPayload = (0, _extends2.default)({}, basePayload, {
|
|
136
|
-
origin: _interfaces.
|
|
136
|
+
origin: _interfaces.UserVerifiedOriginTypes.SOCIAL_LOGIN,
|
|
137
137
|
name
|
|
138
138
|
});
|
|
139
139
|
events == null ? void 0 : (_events$userVerified = events.userVerified) == null ? void 0 : _events$userVerified.call(events, userVerifiedPayload);
|
package/node/auth/interfaces.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
let
|
|
8
|
-
exports.
|
|
9
|
-
(function (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})(
|
|
6
|
+
exports.UserVerifiedOriginTypes = exports.AuthenticationTypes = exports.AdminPortalPagesForEvents = exports.AdminPortalPages = void 0;
|
|
7
|
+
let UserVerifiedOriginTypes;
|
|
8
|
+
exports.UserVerifiedOriginTypes = UserVerifiedOriginTypes;
|
|
9
|
+
(function (UserVerifiedOriginTypes) {
|
|
10
|
+
UserVerifiedOriginTypes["SOCIAL_LOGIN"] = "SOCIAL_LOGIN";
|
|
11
|
+
UserVerifiedOriginTypes["PASSWORDLESS"] = "PASSWORDLESS";
|
|
12
|
+
UserVerifiedOriginTypes["ACTIVATION_LINK"] = "ACTIVATION_LINK";
|
|
13
|
+
})(UserVerifiedOriginTypes || (exports.UserVerifiedOriginTypes = UserVerifiedOriginTypes = {}));
|
|
14
14
|
let AuthenticationTypes;
|
|
15
15
|
exports.AuthenticationTypes = AuthenticationTypes;
|
|
16
16
|
(function (AuthenticationTypes) {
|
package/node/index.js
CHANGED
package/node/mocks/dummy.js
CHANGED
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
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.permissionsMock = exports.permissionsDemo = exports.permissionCategoriesMock = 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
|
-
var _auth = require("../auth");
|
|
11
10
|
const apiTokensDataDemo = {
|
|
12
11
|
clientId: 'CLIENT_ID_16806d3d-8fc3-4450-be97-abdaf66b723e',
|
|
13
12
|
secret: 'SECRET_16806d3d-8fc3-4450-be97-abdaf66b723e',
|
|
@@ -144,7 +143,7 @@ const publicSecurityPolicy = {
|
|
|
144
143
|
apiTokensEnabled: true,
|
|
145
144
|
forcePermissions: false,
|
|
146
145
|
authStrategy: _restApi.AuthStrategyEnum.EmailAndPassword,
|
|
147
|
-
machineToMachineAuthStrategy:
|
|
146
|
+
machineToMachineAuthStrategy: _restApi.MachineToMachineAuthStrategy.ClientCredentials
|
|
148
147
|
};
|
|
149
148
|
exports.publicSecurityPolicy = publicSecurityPolicy;
|
|
150
149
|
const policyMfaDemo = {
|
|
@@ -45,7 +45,9 @@ function devtools(proxyObject, options) {
|
|
|
45
45
|
}
|
|
46
46
|
if (!extension) {
|
|
47
47
|
// @ts-ignore
|
|
48
|
-
//
|
|
48
|
+
// if(enabled){
|
|
49
|
+
// TODO: console.warn('[Warning] Please install/enable Redux devtools extension');
|
|
50
|
+
// }
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
51
53
|
let isTimeTraveling = false;
|
|
@@ -11,7 +11,9 @@ var _valtio = require("../valtio");
|
|
|
11
11
|
* @deprecated Please follow "Computed Properties" guide in docs.
|
|
12
12
|
*/
|
|
13
13
|
function proxyWithComputed_DEPRECATED(initialObject, computedFns) {
|
|
14
|
-
//
|
|
14
|
+
// if (import.meta.env?.MODE !== 'production') {
|
|
15
|
+
// console.warn('proxyWithComputed is deprecated. Please follow "Computed Properties" guide in docs.');
|
|
16
|
+
// }
|
|
15
17
|
|
|
16
18
|
Object.keys(computedFns).forEach(key => {
|
|
17
19
|
if (Object.getOwnPropertyDescriptor(initialObject, key)) {
|
|
@@ -48,8 +48,9 @@ const deepClone = obj => {
|
|
|
48
48
|
* import { proxyWithHistory } from 'valtio-history'
|
|
49
49
|
*/
|
|
50
50
|
function proxyWithHistory_DEPRECATED(initialValue, skipSubscribe = false) {
|
|
51
|
-
//
|
|
52
|
-
|
|
51
|
+
// if (import.meta.env?.MODE !== 'production') {
|
|
52
|
+
// console.warn('proxyWithHistory is deprecated. Please use the "valtio-history" package; refer to the docs');
|
|
53
|
+
// }
|
|
53
54
|
const proxyObject = (0, _valtio.proxy)({
|
|
54
55
|
value: initialValue,
|
|
55
56
|
history: (0, _valtio.ref)({
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.28.0-alpha.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
9
|
"@frontegg/entitlements-javascript-commons": "1.1.2",
|
|
10
|
-
"@frontegg/rest-api": "
|
|
10
|
+
"@frontegg/rest-api": "7.28.0-alpha.0",
|
|
11
11
|
"fast-deep-equal": "3.1.3",
|
|
12
12
|
"get-value": "^3.0.1",
|
|
13
13
|
"proxy-compare": "^3.0.0",
|
package/valtio/utils/devtools.js
CHANGED
|
@@ -2,6 +2,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["enabled", "name"];
|
|
4
4
|
import { snapshot, subscribe } from '../valtio';
|
|
5
|
+
|
|
6
|
+
// FIXME https://github.com/reduxjs/redux-devtools/issues/1097
|
|
7
|
+
|
|
5
8
|
const DEVTOOLS = Symbol();
|
|
6
9
|
/**
|
|
7
10
|
* devtools
|
|
@@ -38,7 +41,9 @@ export function devtools(proxyObject, options) {
|
|
|
38
41
|
}
|
|
39
42
|
if (!extension) {
|
|
40
43
|
// @ts-ignore
|
|
41
|
-
//
|
|
44
|
+
// if(enabled){
|
|
45
|
+
// TODO: console.warn('[Warning] Please install/enable Redux devtools extension');
|
|
46
|
+
// }
|
|
42
47
|
return;
|
|
43
48
|
}
|
|
44
49
|
let isTimeTraveling = false;
|
|
@@ -5,7 +5,9 @@ import { proxy, snapshot } from '../valtio';
|
|
|
5
5
|
* @deprecated Please follow "Computed Properties" guide in docs.
|
|
6
6
|
*/
|
|
7
7
|
export function proxyWithComputed_DEPRECATED(initialObject, computedFns) {
|
|
8
|
-
//
|
|
8
|
+
// if (import.meta.env?.MODE !== 'production') {
|
|
9
|
+
// console.warn('proxyWithComputed is deprecated. Please follow "Computed Properties" guide in docs.');
|
|
10
|
+
// }
|
|
9
11
|
|
|
10
12
|
Object.keys(computedFns).forEach(key => {
|
|
11
13
|
if (Object.getOwnPropertyDescriptor(initialObject, key)) {
|
|
@@ -42,8 +42,9 @@ const deepClone = obj => {
|
|
|
42
42
|
* import { proxyWithHistory } from 'valtio-history'
|
|
43
43
|
*/
|
|
44
44
|
export function proxyWithHistory_DEPRECATED(initialValue, skipSubscribe = false) {
|
|
45
|
-
//
|
|
46
|
-
|
|
45
|
+
// if (import.meta.env?.MODE !== 'production') {
|
|
46
|
+
// console.warn('proxyWithHistory is deprecated. Please use the "valtio-history" package; refer to the docs');
|
|
47
|
+
// }
|
|
47
48
|
const proxyObject = proxy({
|
|
48
49
|
value: initialValue,
|
|
49
50
|
history: ref({
|