@frontegg/react-hooks 7.77.0 → 7.78.0-alpha.1
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/audits/auditLogs.d.ts +2 -3
- package/audits/auditLogs.js +8 -9
- package/audits/auditsMetadata.d.ts +2 -3
- package/audits/auditsMetadata.js +8 -9
- package/audits/hooks.d.ts +2 -9
- package/audits/hooks.js +10 -14
- package/auth/acceptInvitation.d.ts +7 -5
- package/auth/acceptInvitation.js +8 -13
- package/auth/activateAccount.d.ts +11 -5
- package/auth/activateAccount.js +8 -13
- package/auth/allAccounts.d.ts +47 -7
- package/auth/allAccounts.js +12 -20
- package/auth/apiTokens.d.ts +14 -3
- package/auth/apiTokens.js +8 -9
- package/auth/applications.d.ts +22 -3
- package/auth/applications.js +8 -9
- package/auth/customLogin.d.ts +9 -3
- package/auth/customLogin.js +9 -12
- package/auth/entitlements.d.ts +6 -25
- package/auth/entitlements.js +41 -73
- package/auth/forgotPassword.d.ts +12 -3
- package/auth/forgotPassword.js +10 -9
- package/auth/groups.d.ts +32 -5
- package/auth/groups.js +14 -14
- package/auth/impersonate.d.ts +6 -3
- package/auth/impersonate.js +8 -8
- package/auth/login.d.ts +74 -3
- package/auth/login.js +8 -8
- package/auth/passkeys.d.ts +10 -3
- package/auth/passkeys.js +8 -8
- package/auth/passwordRotation.d.ts +4 -3
- package/auth/passwordRotation.js +8 -9
- package/auth/profile.d.ts +19 -3
- package/auth/profile.js +17 -12
- package/auth/provisioning.d.ts +20 -3
- package/auth/provisioning.js +8 -8
- package/auth/resetPhoneNumber.d.ts +8 -3
- package/auth/resetPhoneNumber.js +8 -8
- package/auth/roles.d.ts +14 -3
- package/auth/roles.js +8 -8
- package/auth/security/restrictions.d.ts +21 -3
- package/auth/security/restrictions.js +20 -19
- package/auth/security/securityCenter.d.ts +15 -3
- package/auth/security/securityCenter.js +8 -9
- package/auth/security/securityPolicy.d.ts +35 -5
- package/auth/security/securityPolicy.js +16 -18
- package/auth/security/sessionsPolicy.d.ts +7 -3
- package/auth/security/sessionsPolicy.js +8 -9
- package/auth/sessions.d.ts +12 -3
- package/auth/sessions.js +8 -8
- package/auth/signup.d.ts +10 -5
- package/auth/signup.js +8 -16
- package/auth/sms.d.ts +13 -3
- package/auth/sms.js +8 -8
- package/auth/socialLogin.d.ts +9 -5
- package/auth/socialLogin.js +8 -13
- package/auth/sso.d.ts +31 -6
- package/auth/sso.js +8 -13
- package/auth/stepUp.d.ts +15 -14
- package/auth/stepUp.js +9 -22
- package/auth/team.d.ts +84 -13
- package/auth/team.js +12 -23
- package/auth/tenants.d.ts +9 -3
- package/auth/tenants.js +8 -9
- package/auth/unlockAccount.d.ts +6 -5
- package/auth/unlockAccount.js +8 -10
- package/auth/usernames.d.ts +7 -3
- package/auth/usernames.js +8 -8
- package/auth/usersEmailsPolicyState.d.ts +5 -5
- package/auth/usersEmailsPolicyState.js +8 -10
- package/connectivity/hooks.d.ts +41 -3
- package/connectivity/hooks.js +8 -9
- package/index.js +1 -1
- package/node/audits/auditLogs.js +11 -12
- package/node/audits/auditsMetadata.js +11 -12
- package/node/audits/hooks.js +13 -17
- package/node/auth/acceptInvitation.js +11 -13
- package/node/auth/activateAccount.js +11 -13
- package/node/auth/allAccounts.js +15 -20
- package/node/auth/apiTokens.js +11 -12
- package/node/auth/applications.js +11 -12
- package/node/auth/customLogin.js +11 -15
- package/node/auth/entitlements.js +41 -73
- package/node/auth/forgotPassword.js +13 -12
- package/node/auth/groups.js +17 -17
- package/node/auth/impersonate.js +11 -11
- package/node/auth/login.js +11 -11
- package/node/auth/passkeys.js +11 -11
- package/node/auth/passwordRotation.js +11 -12
- package/node/auth/profile.js +19 -13
- package/node/auth/provisioning.js +11 -11
- package/node/auth/resetPhoneNumber.js +11 -11
- package/node/auth/roles.js +11 -11
- package/node/auth/security/restrictions.js +22 -21
- package/node/auth/security/securityCenter.js +11 -12
- package/node/auth/security/securityPolicy.js +18 -17
- package/node/auth/security/sessionsPolicy.js +11 -12
- package/node/auth/sessions.js +11 -11
- package/node/auth/signup.js +11 -16
- package/node/auth/sms.js +11 -11
- package/node/auth/socialLogin.js +11 -13
- package/node/auth/sso.js +11 -13
- package/node/auth/stepUp.js +11 -24
- package/node/auth/team.js +16 -28
- package/node/auth/tenants.js +11 -12
- package/node/auth/unlockAccount.js +11 -13
- package/node/auth/usernames.js +11 -11
- package/node/auth/usersEmailsPolicyState.js +11 -13
- package/node/connectivity/hooks.js +11 -12
- package/node/index.js +1 -1
- package/node/subscriptions/hooks.js +86 -115
- package/node/useSnapshot/hookFactory.js +32 -0
- package/node/vendor/hooks.js +11 -14
- package/package.json +3 -3
- package/subscriptions/hooks.d.ts +48 -22
- package/subscriptions/hooks.js +77 -103
- package/useSnapshot/hookFactory.d.ts +18 -0
- package/useSnapshot/hookFactory.js +26 -0
- package/vendor/hooks.d.ts +2 -5
- package/vendor/hooks.js +8 -14
|
@@ -1,7 +1,37 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { SecurityPolicyState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useSecurityPolicyState: <S = SecurityPolicyState>(selector?: (s: SecurityPolicyState) => S) => S, useSecurityPolicyActions: () => {
|
|
3
|
+
setSecurityPolicyState: (state: Partial<SecurityPolicyState>) => void;
|
|
4
|
+
setSecurityPolicyGlobalState: (state: Partial<import("@frontegg/redux-store").GlobalPolicyState>) => void;
|
|
5
|
+
setSecurityPolicyPublicState: (state: Partial<import("@frontegg/redux-store").PublicPolicyState>) => void;
|
|
6
|
+
setSecurityPolicyMfaState: (state: Partial<import("@frontegg/redux-store").MfaPolicyState>) => void;
|
|
7
|
+
setSecurityPolicyVendorMfaState: (state: Partial<import("@frontegg/redux-store").MfaPolicyState>) => void;
|
|
8
|
+
setSecurityPolicyLockoutState: (state: Partial<import("@frontegg/redux-store").LockoutPolicyState>) => void;
|
|
9
|
+
setSecurityPolicyVendorLockoutState: (state: Partial<import("@frontegg/redux-store").LockoutPolicyState>) => void;
|
|
10
|
+
setSecurityPolicyCaptchaState: (state: Partial<import("@frontegg/redux-store").CaptchaPolicyState>) => void;
|
|
11
|
+
setSecurityPolicyPasswordHistoryState: (state: Partial<import("@frontegg/redux-store").PasswordHistoryPolicyState>) => void;
|
|
12
|
+
setSecurityPolicyVendorPasswordHistoryState: (state: Partial<import("@frontegg/redux-store").PasswordHistoryPolicyState>) => void;
|
|
13
|
+
setSecurityPolicyPasswordRotationState: (state: Partial<import("@frontegg/redux-store").PasswordRotationPolicyState>) => void;
|
|
14
|
+
resetSecurityPolicyState: () => void;
|
|
15
|
+
setSecurityPolicyPasswordState: (state: Partial<import("@frontegg/redux-store").PasswordPolicyState>) => void;
|
|
16
|
+
setSecurityPolicyAuthStrategyPublicState: (state: Partial<import("@frontegg/redux-store").PublicAuthStrategyPolicyState>) => void;
|
|
17
|
+
loadSecurityPolicy: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
18
|
+
loadGlobalSecurityPolicy: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
19
|
+
loadPublicSecurityPolicy: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
20
|
+
loadVendorPasswordConfig: (payload?: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithRetryConfig<{}>, Partial<import("dist/@frontegg/rest-api").TestConfig>>) => Promise<void>;
|
|
21
|
+
loadSecurityPolicyMfa: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
22
|
+
loadSecurityPolicyVendorMfa: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
23
|
+
loadSecurityPolicyLockout: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
24
|
+
loadSecurityPolicyVendorLockout: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
25
|
+
loadSecurityPolicyCaptcha: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
26
|
+
loadSecurityPolicyPasswordHistory: () => Promise<void>;
|
|
27
|
+
loadSecurityPolicyVendorPasswordHistory: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
28
|
+
loadSecurityPolicyPasswordRotation: () => Promise<void>;
|
|
29
|
+
loadPublicAuthStrategiesPolicy: (payload?: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithRetryConfig<{}>, import("dist/@frontegg/rest-api").IAuthStrategiesConfig>) => Promise<void>;
|
|
30
|
+
saveSecurityPolicyMfa: (payload: import("@frontegg/redux-store").SaveSecurityPolicyMfaPayload) => Promise<void>;
|
|
31
|
+
saveSecurityPolicyLockout: (payload: import("@frontegg/redux-store").SaveSecurityPolicyLockoutPayload) => Promise<void>;
|
|
32
|
+
saveSecurityPolicyPasswordHistory: (payload: import("@frontegg/redux-store").SaveSecurityPolicyPasswordHistoryPayload) => Promise<void>;
|
|
33
|
+
saveSecurityPolicyPasswordRotation: (payload: import("@frontegg/redux-store").SaveSecurityPolicyPasswordRotationPayload) => Promise<void>;
|
|
34
|
+
__getSecurityPolicyPublicStateWithCustomLogin: (securityPolicyPublicState?: import("dist/@frontegg/rest-api").IVendorConfig, retryConfig?: import("@frontegg/redux-store").RetryConfig) => Promise<import("dist/@frontegg/rest-api").IVendorConfig | undefined>;
|
|
35
|
+
};
|
|
6
36
|
export declare const usePublicPolicySettings: (loadOnMount?: boolean) => import("@frontegg/redux-store").PublicPolicyState;
|
|
7
37
|
export declare const usePublicAuthStrategiesPolicySettings: (loadOnMount?: boolean) => import("@frontegg/redux-store").PublicAuthStrategyPolicyState;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const state = useStore().store.auth.securityPolicyState;
|
|
11
|
-
return stateMapper(useSnapshot(state));
|
|
12
|
-
}
|
|
13
|
-
export const useSecurityPolicyActions = () => {
|
|
14
|
-
return useStore().stateActions.auth.securityPolicyActions;
|
|
15
|
-
};
|
|
2
|
+
import { createSliceHooks } from '../../useSnapshot/hookFactory';
|
|
3
|
+
export const {
|
|
4
|
+
useSliceState: useSecurityPolicyState,
|
|
5
|
+
useSliceActions: useSecurityPolicyActions
|
|
6
|
+
} = createSliceHooks({
|
|
7
|
+
getState: s => s.auth.securityPolicyState,
|
|
8
|
+
getActions: a => a.auth.securityPolicyActions
|
|
9
|
+
});
|
|
16
10
|
export const usePublicPolicySettings = (loadOnMount = false) => {
|
|
17
11
|
const {
|
|
18
12
|
publicPolicy
|
|
@@ -21,8 +15,10 @@ export const usePublicPolicySettings = (loadOnMount = false) => {
|
|
|
21
15
|
loadPublicSecurityPolicy
|
|
22
16
|
} = useSecurityPolicyActions();
|
|
23
17
|
useEffect(() => {
|
|
24
|
-
(loadOnMount || !publicPolicy.policy) &&
|
|
25
|
-
|
|
18
|
+
if ((loadOnMount || !publicPolicy.policy) && !publicPolicy.loading) {
|
|
19
|
+
loadPublicSecurityPolicy();
|
|
20
|
+
}
|
|
21
|
+
}, [loadOnMount, publicPolicy.policy, publicPolicy.loading, loadPublicSecurityPolicy]);
|
|
26
22
|
return publicPolicy;
|
|
27
23
|
};
|
|
28
24
|
export const usePublicAuthStrategiesPolicySettings = (loadOnMount = false) => {
|
|
@@ -33,7 +29,9 @@ export const usePublicAuthStrategiesPolicySettings = (loadOnMount = false) => {
|
|
|
33
29
|
loadPublicAuthStrategiesPolicy
|
|
34
30
|
} = useSecurityPolicyActions();
|
|
35
31
|
useEffect(() => {
|
|
36
|
-
(loadOnMount || !publicAuthStrategyPolicy.policy) && !publicAuthStrategyPolicy.error &&
|
|
37
|
-
|
|
32
|
+
if ((loadOnMount || !publicAuthStrategyPolicy.policy) && !publicAuthStrategyPolicy.error && !publicAuthStrategyPolicy.loading) {
|
|
33
|
+
loadPublicAuthStrategiesPolicy();
|
|
34
|
+
}
|
|
35
|
+
}, [loadOnMount, publicAuthStrategyPolicy.policy, publicAuthStrategyPolicy.error, publicAuthStrategyPolicy.loading, loadPublicAuthStrategiesPolicy]);
|
|
38
36
|
return publicAuthStrategyPolicy;
|
|
39
37
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import type { SessionsPolicyState
|
|
2
|
-
export declare
|
|
3
|
-
|
|
1
|
+
import type { SessionsPolicyState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useSessionsPolicyState: <S = SessionsPolicyState>(selector?: (s: SessionsPolicyState) => S) => S, useSessionsPolicyActions: () => {
|
|
3
|
+
setSessionsPolicyState: (state: Partial<SessionsPolicyState>) => void;
|
|
4
|
+
resetSessionsPolicyState: () => void;
|
|
5
|
+
loadSessionsPolicy: () => Promise<void>;
|
|
6
|
+
createOrUpdateSessionsPolicy: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").ISessionConfigurations>) => Promise<void>;
|
|
7
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
1
|
+
import { createSliceHooks } from '../../useSnapshot/hookFactory';
|
|
2
|
+
export const {
|
|
3
|
+
useSliceState: useSessionsPolicyState,
|
|
4
|
+
useSliceActions: useSessionsPolicyActions
|
|
5
|
+
} = createSliceHooks({
|
|
6
|
+
getState: s => s.auth.sessionsPolicyState,
|
|
7
|
+
getActions: a => a.auth.sessionsPolicyActions
|
|
8
|
+
});
|
package/auth/sessions.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
import type { SessionsState
|
|
2
|
-
export declare
|
|
3
|
-
|
|
1
|
+
import type { SessionsState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useSessionsState: <S = SessionsState>(selector?: (s: SessionsState) => S) => S, useSessionsActions: () => {
|
|
3
|
+
setSessionsState: (state: Partial<SessionsState>) => void;
|
|
4
|
+
resetSessionsState: () => void;
|
|
5
|
+
loadUserSessions: (payload?: import("@frontegg/redux-store").WithRetryConfig<{}>) => Promise<void>;
|
|
6
|
+
loadCurrentUserSession: () => Promise<void>;
|
|
7
|
+
deleteUserSession: (payload: import("@frontegg/redux-store").WithId) => Promise<void>;
|
|
8
|
+
deleteAllUserSessions: () => Promise<void>;
|
|
9
|
+
revokeUserSessions: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
10
|
+
userId: string;
|
|
11
|
+
}>) => Promise<void>;
|
|
12
|
+
};
|
package/auth/sessions.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
1
|
+
import { createSliceHooks } from '../useSnapshot/hookFactory';
|
|
2
|
+
export const {
|
|
3
|
+
useSliceState: useSessionsState,
|
|
4
|
+
useSliceActions: useSessionsActions
|
|
5
|
+
} = createSliceHooks({
|
|
6
|
+
getState: s => s.auth.sessionsState,
|
|
7
|
+
getActions: a => a.auth.sessionsActions
|
|
8
|
+
});
|
package/auth/signup.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type { SignUpState
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { SignUpState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useSignUpState: <S = SignUpState>(selector?: (s: SignUpState) => S) => S, useSignUpActions: () => {
|
|
3
|
+
setSignUpState: (state: Partial<SignUpState>) => void;
|
|
4
|
+
resetSignUpState: () => void;
|
|
5
|
+
resetSignUpStateSoft: () => void;
|
|
6
|
+
signUpUser: (_payload: import("@frontegg/redux-store").ISignUpUserPayload) => Promise<void>;
|
|
7
|
+
signUpUserWithPhoneNumber: (_payload: import("@frontegg/redux-store").ISignUpUserPayload) => Promise<void>;
|
|
8
|
+
loadAllowSignUps: (payload?: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithRetryConfig<{}>, import("dist/@frontegg/rest-api").IVendorConfig>) => Promise<void>;
|
|
9
|
+
loadSignUpStrategies: () => Promise<void>;
|
|
10
|
+
};
|
package/auth/signup.js
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const {
|
|
10
|
-
signUpState
|
|
11
|
-
} = useStore().store.auth;
|
|
12
|
-
return stateMapper(useSnapshot(signUpState));
|
|
13
|
-
}
|
|
14
|
-
export const useSignUpActions = () => {
|
|
15
|
-
return useStore().stateActions.auth.signUpActions;
|
|
16
|
-
};
|
|
1
|
+
import { createSliceHooks } from '../useSnapshot/hookFactory';
|
|
2
|
+
export const {
|
|
3
|
+
useSliceState: useSignUpState,
|
|
4
|
+
useSliceActions: useSignUpActions
|
|
5
|
+
} = createSliceHooks({
|
|
6
|
+
getState: s => s.auth.signUpState,
|
|
7
|
+
getActions: a => a.auth.signUpActions
|
|
8
|
+
});
|
package/auth/sms.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare
|
|
3
|
-
|
|
1
|
+
import type { SmsState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useSmsState: <S = SmsState>(selector?: (s: SmsState) => S) => S, useSmsActions: () => {
|
|
3
|
+
setSmsState: (state: Partial<SmsState>) => void;
|
|
4
|
+
resetSmsState: () => void;
|
|
5
|
+
loadPhoneNumbers: () => Promise<void>;
|
|
6
|
+
loadUserOwnPhoneNumbers: () => Promise<void>;
|
|
7
|
+
setUpPhoneNumber: (_payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IUpdatePhoneNumber>) => Promise<void>;
|
|
8
|
+
setUpOwnPhoneNumber: (_payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IUpdatePhoneNumber>) => Promise<void>;
|
|
9
|
+
verifyPhoneNumber: (_payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IVerifyPhoneNumber>) => Promise<void>;
|
|
10
|
+
deletePhoneNumber: (_payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").IPhoneId>) => Promise<void>;
|
|
11
|
+
verifyDeletePhoneNumber: (_payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithPhoneId<import("dist/@frontegg/rest-api").IVerifyPhoneNumber>>) => Promise<void>;
|
|
12
|
+
preVerifyPhoneNumber: (_payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IPreVerifyPhoneNumber>) => Promise<void>;
|
|
13
|
+
};
|
package/auth/sms.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
1
|
+
import { createSliceHooks } from '../useSnapshot/hookFactory';
|
|
2
|
+
export const {
|
|
3
|
+
useSliceState: useSmsState,
|
|
4
|
+
useSliceActions: useSmsActions
|
|
5
|
+
} = createSliceHooks({
|
|
6
|
+
getState: s => s.auth.smsState,
|
|
7
|
+
getActions: a => a.auth.smsActions
|
|
8
|
+
});
|
package/auth/socialLogin.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { SocialLoginState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useSocialLoginState: <S = SocialLoginState>(selector?: (s: SocialLoginState) => S) => S, useSocialLoginActions: () => {
|
|
3
|
+
setSocialLoginsState: (state: Partial<SocialLoginState>) => void;
|
|
4
|
+
resetSocialLoginsState: () => void;
|
|
5
|
+
setSocialLoginError: (payload: import("dist/@frontegg/rest-api").ISetSocialLoginError) => void;
|
|
6
|
+
loadSocialLoginsConfiguration: () => Promise<void>;
|
|
7
|
+
loadSocialLoginsConfigurationV2: (payload?: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithRetryConfig<{}>, SocialLoginState>) => Promise<void>;
|
|
8
|
+
loginViaSocialLogin: (_payload: import("@frontegg/redux-store").ILoginViaSocialLoginPayload) => Promise<void>;
|
|
9
|
+
};
|
package/auth/socialLogin.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return stateMapper(useSnapshot(useStore().store.auth.socialLoginState));
|
|
10
|
-
}
|
|
11
|
-
export const useSocialLoginActions = () => {
|
|
12
|
-
return useStore().stateActions.auth.socialLoginActions;
|
|
13
|
-
};
|
|
1
|
+
import { createSliceHooks } from '../useSnapshot/hookFactory';
|
|
2
|
+
export const {
|
|
3
|
+
useSliceState: useSocialLoginState,
|
|
4
|
+
useSliceActions: useSocialLoginActions
|
|
5
|
+
} = createSliceHooks({
|
|
6
|
+
getState: s => s.auth.socialLoginState,
|
|
7
|
+
getActions: a => a.auth.socialLoginActions
|
|
8
|
+
});
|
package/auth/sso.d.ts
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
import type { SSOState
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { SSOState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useSSOState: <S = SSOState>(selector?: (s: SSOState) => S) => S, useSSOActions: () => {
|
|
3
|
+
loadSSOConfigurationsV2: (payload?: import("dist/@frontegg/redux-store/interfaces").WithRetryConfig<{}>) => Promise<void>;
|
|
4
|
+
saveSSOConfigurationV2: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SaveSSOConfigurationPayloadV2) => Promise<void>;
|
|
5
|
+
updateSSOConfiguration: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").UpdateSSOConfigurationPayload) => Promise<void>;
|
|
6
|
+
deleteSSOConfiguration: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").DeleteSSOConfigurationPayload) => Promise<void>;
|
|
7
|
+
saveSSODomain: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SaveSSODomainPayload) => Promise<void>;
|
|
8
|
+
deleteSSODomain: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").ValidateSSODomainPayload) => Promise<void>;
|
|
9
|
+
validateSSODomainV2: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").ValidateSSODomainPayload) => Promise<void>;
|
|
10
|
+
setSSOGroups: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SetSSOGroupsPayload) => Promise<void>;
|
|
11
|
+
updateSSOGroups: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").UpdateSSOGroupsPayload) => Promise<void>;
|
|
12
|
+
setSSODefaultRoles: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").UpdateSSODefaultRolesPayload) => Promise<void>;
|
|
13
|
+
saveSSOConfigurationByMetadata: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SaveSSOConfigurationByMetadataPayload) => Promise<void>;
|
|
14
|
+
updateSSOConfigurationByMetadata: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").UpdateSSOConfigurationByMetadataPayload) => Promise<void>;
|
|
15
|
+
saveSSOConfigurationByUrl: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SaveSSOConfigurationByUrlPayload) => Promise<void>;
|
|
16
|
+
saveSSOConfigurationByData: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SaveSSOConfigurationByDataPayload) => Promise<void>;
|
|
17
|
+
setSSOState: (state: Partial<import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SSOState>) => void;
|
|
18
|
+
resetSSOState: () => void;
|
|
19
|
+
setSSOLoader: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SSOStateIndicator) => void;
|
|
20
|
+
setSSOError: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SSOStateIndicator) => void;
|
|
21
|
+
loadSSOConfigurations: () => Promise<void>;
|
|
22
|
+
saveSSOConfigurations: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SaveSSOConfigurationPayload) => Promise<void>;
|
|
23
|
+
saveSSOConfigurationsFile: (configFile: File[]) => Promise<void>;
|
|
24
|
+
saveSSOConfigurationsFileWithCallback: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").SaveSSOConfigurationFilePayload) => Promise<void>;
|
|
25
|
+
validateSSODomain: (payload?: import("dist/@frontegg/redux-store/interfaces").WithCallback) => Promise<void>;
|
|
26
|
+
loadSSOAuthorizationRoles: () => Promise<void>;
|
|
27
|
+
updateSSOAuthorizationRoles: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").UpdateSSOAuthorizationRolesPayload) => Promise<void>;
|
|
28
|
+
deleteSamlGroup: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").DeleteSamlGroupPayload) => Promise<void>;
|
|
29
|
+
createSamlGroup: (payload: import("dist/@frontegg/redux-store/auth/SSOState/interfaces").CreateSamlGroupPayload) => Promise<void>;
|
|
30
|
+
oidcPostlogin: (payload: import("dist/@frontegg/rest-api").IOidcPostLogin) => Promise<void>;
|
|
31
|
+
};
|
package/auth/sso.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return stateMapper(useSnapshot(useStore().store.auth.ssoState));
|
|
10
|
-
}
|
|
11
|
-
export const useSSOActions = () => {
|
|
12
|
-
return useStore().stateActions.auth.ssoActions;
|
|
13
|
-
};
|
|
1
|
+
import { createSliceHooks } from '../useSnapshot/hookFactory';
|
|
2
|
+
export const {
|
|
3
|
+
useSliceState: useSSOState,
|
|
4
|
+
useSliceActions: useSSOActions
|
|
5
|
+
} = createSliceHooks({
|
|
6
|
+
getState: s => s.auth.ssoState,
|
|
7
|
+
getActions: a => a.auth.ssoActions
|
|
8
|
+
});
|
package/auth/stepUp.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { StepUpState,
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { StepUpState, StepUpOptions, IsSteppedUpOptions } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useStepUpState: <S = StepUpState>(selector?: (s: StepUpState) => S) => S, useStepUpActions: () => {
|
|
3
|
+
stepUpHostedLogin: (payload: import("@frontegg/redux-store").IStepUpHostedLogin) => Promise<void>;
|
|
4
|
+
generateStepUpSession: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").IGenerateStepUpSession>) => Promise<void>;
|
|
5
|
+
setStepUpState: (state: Partial<StepUpState>) => void;
|
|
6
|
+
resetStepUpState: () => void;
|
|
7
|
+
stepUpWithAuthenticator: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").IStepUpWithAuthenticator>) => Promise<void>;
|
|
8
|
+
preVerifyMFASMSForStepUp: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>>) => Promise<void>;
|
|
9
|
+
verifyMFASMSForStepUp: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithDeviceId<import("dist/@frontegg/rest-api").IVerifyMFASMS>>) => Promise<void>;
|
|
10
|
+
preVerifyMFAWebAuthnForStepUp: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithDeviceId<import("dist/@frontegg/rest-api").IPreVerifyMFA>, import("@frontegg/redux-store").IPreVerifyMFAWebAuthNForLoginResponse>) => Promise<void>;
|
|
11
|
+
verifyMFAWebAuthnForStepUp: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").IVerifyMFAWebAuthnPayload>) => Promise<void>;
|
|
12
|
+
preVerifyMFAEmailCodeForStepUp: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IPreVerifyMFA>) => Promise<void>;
|
|
13
|
+
verifyMFAEmailCodeForStepUp: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IVerifyMFAEmailCode>) => Promise<void>;
|
|
14
|
+
};
|
|
7
15
|
export declare const getMaxAgeFromQueryParam: () => number | undefined;
|
|
8
|
-
|
|
9
|
-
* @returns step up function that redirects to the step up url with the max age param and set the redirect url in the local storage
|
|
10
|
-
*/
|
|
11
|
-
export declare const useStepUp: () => ((options?: StepUpOptions) => void);
|
|
12
|
-
/**
|
|
13
|
-
* @param options.maxAge - max age of step up
|
|
14
|
-
* @returns true when the user is stepped up, false otherwise
|
|
15
|
-
*/
|
|
16
|
+
export declare const useStepUp: () => (options?: StepUpOptions) => void;
|
|
16
17
|
export declare const useIsSteppedUp: (options?: IsSteppedUpOptions) => boolean;
|
package/auth/stepUp.js
CHANGED
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { STEP_UP_MAX_AGE_PARAM_NAME, getSearchParam, redirectByStepUpUrl, isSteppedUp } from '@frontegg/redux-store';
|
|
2
|
-
import { useSnapshot } from '../useSnapshot';
|
|
3
|
-
import { useStore } from '../FronteggStoreContext';
|
|
4
|
-
import { useAuth, useAuthRoutes, useAuthUserOrNull, useOnRedirectTo } from './hooks';
|
|
5
2
|
import { useCallback } from 'react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
3
|
+
import { createSliceHooks } from '../useSnapshot/hookFactory';
|
|
4
|
+
import { useAuth, useAuthRoutes, useAuthUserOrNull, useOnRedirectTo } from './hooks';
|
|
5
|
+
export const {
|
|
6
|
+
useSliceState: useStepUpState,
|
|
7
|
+
useSliceActions: useStepUpActions
|
|
8
|
+
} = createSliceHooks({
|
|
9
|
+
getState: s => s.auth.stepUpState,
|
|
10
|
+
getActions: a => a.auth.stepUpActions
|
|
11
|
+
});
|
|
16
12
|
export const getMaxAgeFromQueryParam = () => {
|
|
17
13
|
const str = getSearchParam(STEP_UP_MAX_AGE_PARAM_NAME);
|
|
18
14
|
return str === undefined ? undefined : +str;
|
|
19
15
|
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @returns step up function that redirects to the step up url with the max age param and set the redirect url in the local storage
|
|
23
|
-
*/
|
|
24
16
|
export const useStepUp = () => {
|
|
25
17
|
const {
|
|
26
18
|
stepUpUrl
|
|
@@ -40,11 +32,6 @@ export const useStepUp = () => {
|
|
|
40
32
|
redirectByStepUpUrl(stepUpUrl, onRedirectTo, options == null ? void 0 : options.maxAge);
|
|
41
33
|
}, [stepUpUrl, onRedirectTo, stepUpHostedLogin, hostedLoginBox]);
|
|
42
34
|
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @param options.maxAge - max age of step up
|
|
46
|
-
* @returns true when the user is stepped up, false otherwise
|
|
47
|
-
*/
|
|
48
35
|
export const useIsSteppedUp = (options = {}) => {
|
|
49
36
|
const user = useAuthUserOrNull();
|
|
50
37
|
return isSteppedUp(user, options);
|
package/auth/team.d.ts
CHANGED
|
@@ -1,13 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import type { TeamState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useTeamState: <S = TeamState>(selector?: (s: TeamState) => S) => S, useTeamActions: () => {
|
|
3
|
+
getInvitationLink: (payload?: import("dist/@frontegg/redux-store/interfaces").WithRetryConfig<{}>) => Promise<void>;
|
|
4
|
+
createInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").ICreateOrUpdateInviteUserLink, string>) => Promise<void>;
|
|
5
|
+
updateInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").ICreateOrUpdateInviteUserLink>) => Promise<void>;
|
|
6
|
+
deleteInvitationLink: (payload?: import("@frontegg/redux-store").WithCallback<{}, boolean>) => Promise<void>;
|
|
7
|
+
resendActivationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendActivationLink>) => Promise<void>;
|
|
8
|
+
resendInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendInvitationLink>) => Promise<void>;
|
|
9
|
+
resendInvitationEmail: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendInvitationEmail>) => Promise<void>;
|
|
10
|
+
resendInvitationLinkToAllSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendInvitationLink>) => Promise<void>;
|
|
11
|
+
loadAllSubTenantsUsers: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithSilentLoad<Partial<import("dist/@frontegg/rest-api").ILoadAllUsers>>, import("dist/@frontegg/rest-api").ISubTenantUser[]>) => Promise<void>;
|
|
12
|
+
setUserRolesForSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").UpdateUserRolesForSubTenantsRequestDto & {
|
|
13
|
+
userId: string;
|
|
14
|
+
}>) => Promise<void>;
|
|
15
|
+
deleteUserFromSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").RemoveUserFromSubTenantsRequest>) => Promise<void>;
|
|
16
|
+
addUserToSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").AddUserToSubTenantsRequest>) => Promise<void>;
|
|
17
|
+
loadRoles: (payload?: import("dist/@frontegg/redux-store/interfaces").WithRetryConfig<import("dist/@frontegg/redux-store/auth/TeamState/interfaces").LoadRolesAndPermissionsPayload>) => Promise<void>;
|
|
18
|
+
loadUsers: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithSilentLoad<import("dist/@frontegg/rest-api").ILoadUsers>, import("dist/@frontegg/rest-api").ITeamUser[]>) => Promise<void>;
|
|
19
|
+
loadUsersV2: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithRetryConfig<import("@frontegg/redux-store").WithSilentLoad<import("@frontegg/redux-store").IGetUsersV2Payload>>, import("dist/@frontegg/rest-api").ITeamUser[]>) => Promise<void>;
|
|
20
|
+
addUser: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").AddUserPayload, import("dist/@frontegg/rest-api").ITeamUser>) => Promise<void>;
|
|
21
|
+
addUsersBulk: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").IAddUsers, import("@frontegg/redux-store").BulkInvintationData>) => Promise<void>;
|
|
22
|
+
updateUser: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IUpdateUser, import("dist/@frontegg/rest-api").ITeamUser>) => Promise<void>;
|
|
23
|
+
deleteUser: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IDeleteUser>) => Promise<void>;
|
|
24
|
+
enableUser: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
25
|
+
userId: string;
|
|
26
|
+
}>) => Promise<void>;
|
|
27
|
+
disableUser: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
28
|
+
userId: string;
|
|
29
|
+
}>) => Promise<void>;
|
|
30
|
+
getTemporaryUsersConfig: (payload?: import("dist/@frontegg/redux-store/interfaces").WithRetryConfig<{}>) => Promise<void>;
|
|
31
|
+
updateUserExpirationTime: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IUpdateUserExpiration>) => Promise<void>;
|
|
32
|
+
setUserAsPermanent: (payload: import("@frontegg/redux-store").WithCallback<Pick<import("dist/@frontegg/rest-api").IUpdateUserExpiration, "userId">>) => Promise<void>;
|
|
33
|
+
setTeamLoader: (payload: import("@frontegg/redux-store").TeamStateIndicator) => void;
|
|
34
|
+
setTeamError: (payload: import("@frontegg/redux-store").TeamStateIndicator) => void;
|
|
35
|
+
setTeamState: (payload: Partial<TeamState>) => void;
|
|
36
|
+
resetTeamState: () => void;
|
|
37
|
+
openAddUserDialog: (payload?: import("@frontegg/redux-store").ISetAddUserDialog) => void;
|
|
38
|
+
closeAddUserDialog: (payload?: any) => void;
|
|
39
|
+
openDeleteUserDialog: (payload?: import("@frontegg/redux-store").ISetDeleteUserDialog) => void;
|
|
40
|
+
closeDeleteUserDialog: (payload?: any) => void;
|
|
41
|
+
lockUser: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IDeleteUser>) => Promise<void>;
|
|
42
|
+
};
|
|
43
|
+
export declare const useAuthTeamState: <S = TeamState>(selector?: (s: TeamState) => S) => S;
|
|
44
|
+
export declare const useAuthTeamActions: () => {
|
|
45
|
+
getInvitationLink: (payload?: import("dist/@frontegg/redux-store/interfaces").WithRetryConfig<{}>) => Promise<void>;
|
|
46
|
+
createInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").ICreateOrUpdateInviteUserLink, string>) => Promise<void>;
|
|
47
|
+
updateInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").ICreateOrUpdateInviteUserLink>) => Promise<void>;
|
|
48
|
+
deleteInvitationLink: (payload?: import("@frontegg/redux-store").WithCallback<{}, boolean>) => Promise<void>;
|
|
49
|
+
resendActivationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendActivationLink>) => Promise<void>;
|
|
50
|
+
resendInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendInvitationLink>) => Promise<void>;
|
|
51
|
+
resendInvitationEmail: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendInvitationEmail>) => Promise<void>;
|
|
52
|
+
resendInvitationLinkToAllSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IResendInvitationLink>) => Promise<void>;
|
|
53
|
+
loadAllSubTenantsUsers: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithSilentLoad<Partial<import("dist/@frontegg/rest-api").ILoadAllUsers>>, import("dist/@frontegg/rest-api").ISubTenantUser[]>) => Promise<void>;
|
|
54
|
+
setUserRolesForSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").UpdateUserRolesForSubTenantsRequestDto & {
|
|
55
|
+
userId: string;
|
|
56
|
+
}>) => Promise<void>;
|
|
57
|
+
deleteUserFromSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").RemoveUserFromSubTenantsRequest>) => Promise<void>;
|
|
58
|
+
addUserToSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").AddUserToSubTenantsRequest>) => Promise<void>;
|
|
59
|
+
loadRoles: (payload?: import("dist/@frontegg/redux-store/interfaces").WithRetryConfig<import("dist/@frontegg/redux-store/auth/TeamState/interfaces").LoadRolesAndPermissionsPayload>) => Promise<void>;
|
|
60
|
+
loadUsers: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithSilentLoad<import("dist/@frontegg/rest-api").ILoadUsers>, import("dist/@frontegg/rest-api").ITeamUser[]>) => Promise<void>;
|
|
61
|
+
loadUsersV2: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithRetryConfig<import("@frontegg/redux-store").WithSilentLoad<import("@frontegg/redux-store").IGetUsersV2Payload>>, import("dist/@frontegg/rest-api").ITeamUser[]>) => Promise<void>;
|
|
62
|
+
addUser: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").AddUserPayload, import("dist/@frontegg/rest-api").ITeamUser>) => Promise<void>;
|
|
63
|
+
addUsersBulk: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").IAddUsers, import("@frontegg/redux-store").BulkInvintationData>) => Promise<void>;
|
|
64
|
+
updateUser: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IUpdateUser, import("dist/@frontegg/rest-api").ITeamUser>) => Promise<void>;
|
|
65
|
+
deleteUser: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IDeleteUser>) => Promise<void>;
|
|
66
|
+
enableUser: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
67
|
+
userId: string;
|
|
68
|
+
}>) => Promise<void>;
|
|
69
|
+
disableUser: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
70
|
+
userId: string;
|
|
71
|
+
}>) => Promise<void>;
|
|
72
|
+
getTemporaryUsersConfig: (payload?: import("dist/@frontegg/redux-store/interfaces").WithRetryConfig<{}>) => Promise<void>;
|
|
73
|
+
updateUserExpirationTime: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IUpdateUserExpiration>) => Promise<void>;
|
|
74
|
+
setUserAsPermanent: (payload: import("@frontegg/redux-store").WithCallback<Pick<import("dist/@frontegg/rest-api").IUpdateUserExpiration, "userId">>) => Promise<void>;
|
|
75
|
+
setTeamLoader: (payload: import("@frontegg/redux-store").TeamStateIndicator) => void;
|
|
76
|
+
setTeamError: (payload: import("@frontegg/redux-store").TeamStateIndicator) => void;
|
|
77
|
+
setTeamState: (payload: Partial<TeamState>) => void;
|
|
78
|
+
resetTeamState: () => void;
|
|
79
|
+
openAddUserDialog: (payload?: import("@frontegg/redux-store").ISetAddUserDialog) => void;
|
|
80
|
+
closeAddUserDialog: (payload?: any) => void;
|
|
81
|
+
openDeleteUserDialog: (payload?: import("@frontegg/redux-store").ISetDeleteUserDialog) => void;
|
|
82
|
+
closeDeleteUserDialog: (payload?: any) => void;
|
|
83
|
+
lockUser: (payload: import("@frontegg/redux-store").WithCallback<import("dist/@frontegg/rest-api").IDeleteUser>) => Promise<void>;
|
|
84
|
+
};
|
package/auth/team.js
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
const defaultMapper = state => state;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated use useTeamState instead
|
|
13
|
-
*/
|
|
1
|
+
import { createSliceHooks } from '../useSnapshot/hookFactory';
|
|
2
|
+
export const {
|
|
3
|
+
useSliceState: useTeamState,
|
|
4
|
+
useSliceActions: useTeamActions
|
|
5
|
+
} = createSliceHooks({
|
|
6
|
+
getState: s => s.auth.teamState,
|
|
7
|
+
getActions: a => a.auth.teamActions
|
|
8
|
+
});
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
return stateMapper(useTeamState());
|
|
18
|
-
}
|
|
10
|
+
/* @deprecated use useTeamActions instead */
|
|
11
|
+
export const useAuthTeamState = useTeamState;
|
|
19
12
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
export const useAuthTeamActions = () => {
|
|
24
|
-
return useTeamActions();
|
|
25
|
-
};
|
|
13
|
+
/* @deprecated use useTeamActions instead */
|
|
14
|
+
export const useAuthTeamActions = useTeamActions;
|
package/auth/tenants.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import type { TenantsState
|
|
2
|
-
export declare
|
|
3
|
-
|
|
1
|
+
import type { TenantsState } from '@frontegg/redux-store';
|
|
2
|
+
export declare const useTenantsState: <S = TenantsState>(selector?: (s: TenantsState) => S) => S, useTenantsActions: () => {
|
|
3
|
+
setTenantsState: (state: Partial<TenantsState>) => void;
|
|
4
|
+
resetTenantsState: () => void;
|
|
5
|
+
switchTenant: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").SwitchTenantOptions>) => Promise<void>;
|
|
6
|
+
loadTenants: (payload?: import("@frontegg/redux-store").WithCallback<{}, import("dist/@frontegg/rest-api").ITenantsResponse[]>) => Promise<void>;
|
|
7
|
+
loadSubTenants: (payload?: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithRetryConfig<{}>>) => Promise<void>;
|
|
8
|
+
loadSubTenantsTree: (payload?: import("@frontegg/redux-store").WithCallback<{}>) => Promise<void>;
|
|
9
|
+
};
|