@frontegg/react-hooks 6.176.0 → 6.178.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/FronteggProvider/FronteggProvider.d.ts +12 -0
- package/FronteggProvider/FronteggProvider.js +134 -0
- package/FronteggProvider/index.d.ts +1 -12
- package/FronteggProvider/index.js +1 -133
- package/FronteggStoreContext/FronteggStoreContext.d.ts +9 -0
- package/FronteggStoreContext/FronteggStoreContext.js +16 -0
- package/FronteggStoreContext/index.d.ts +1 -13
- package/FronteggStoreContext/index.js +1 -14
- package/audits/auditLogs.d.ts +2 -4
- package/audits/auditLogs.js +8 -6
- package/audits/auditsMetadata.d.ts +2 -4
- package/audits/auditsMetadata.js +8 -6
- package/audits/hooks.d.ts +0 -8
- package/audits/hooks.js +6 -30
- package/auth/acceptInvitation.js +10 -5
- package/auth/activateAccount.js +10 -4
- package/auth/{MSP/allAccounts.d.ts → allAccounts.d.ts} +2 -4
- package/auth/allAccounts.js +20 -0
- package/auth/apiTokens.d.ts +0 -2
- package/auth/apiTokens.js +8 -6
- package/auth/customLogin.d.ts +2 -5
- package/auth/customLogin.js +10 -11
- package/auth/entitlements.d.ts +14 -14
- package/auth/entitlements.js +25 -21
- package/auth/forgotPassword.d.ts +0 -2
- package/auth/forgotPassword.js +8 -6
- package/auth/groups.d.ts +0 -4
- package/auth/groups.js +12 -13
- package/auth/hooks.d.ts +9 -11
- package/auth/hooks.js +27 -58
- package/auth/impersonate.d.ts +0 -2
- package/auth/impersonate.js +7 -6
- package/auth/index.d.ts +14 -17
- package/auth/index.js +15 -18
- package/auth/login.d.ts +1 -1
- package/auth/login.js +13 -4
- package/auth/mfa.d.ts +1 -1
- package/auth/mfa.js +13 -4
- package/auth/passkeys.d.ts +1 -4
- package/auth/passkeys.js +7 -6
- package/auth/profile.d.ts +2 -4
- package/auth/profile.js +9 -8
- package/auth/provisioning.d.ts +1 -3
- package/auth/provisioning.js +7 -6
- package/auth/resetPhoneNumber.d.ts +1 -3
- package/auth/resetPhoneNumber.js +7 -6
- package/auth/roles.d.ts +1 -3
- package/auth/roles.js +7 -6
- package/auth/security/index.d.ts +4 -0
- package/auth/security/index.js +4 -0
- package/auth/security/restrictions.d.ts +0 -2
- package/auth/security/restrictions.js +10 -10
- package/auth/security/securityCenter.d.ts +1 -4
- package/auth/security/securityCenter.js +8 -6
- package/auth/security/securityPolicy.d.ts +5 -11
- package/auth/security/securityPolicy.js +19 -30
- package/auth/security/sessionsPolicy.d.ts +1 -3
- package/auth/security/sessionsPolicy.js +8 -6
- package/auth/sessions.d.ts +1 -3
- package/auth/sessions.js +7 -6
- package/auth/signup.d.ts +1 -1
- package/auth/signup.js +13 -4
- package/auth/sms.d.ts +1 -4
- package/auth/sms.js +7 -6
- package/auth/socialLogin.d.ts +1 -1
- package/auth/socialLogin.js +10 -4
- package/auth/sso.d.ts +1 -1
- package/auth/sso.js +10 -4
- package/auth/{stepUp/stepUp.d.ts → stepUp.d.ts} +0 -2
- package/auth/{stepUp/stepUp.js → stepUp.js} +9 -6
- package/auth/team.d.ts +9 -1
- package/auth/team.js +22 -4
- package/auth/tenants.d.ts +1 -3
- package/auth/tenants.js +8 -6
- package/common/CustomComponentHolder.js +3 -1
- package/common/index.js +3 -3
- package/connectivity/hooks.d.ts +2 -5
- package/connectivity/hooks.js +6 -9
- package/index.d.ts +2 -2
- package/index.js +3 -3
- package/node/FronteggProvider/FronteggProvider.js +140 -0
- package/node/FronteggProvider/index.js +9 -134
- package/node/FronteggStoreContext/FronteggStoreContext.js +26 -0
- package/node/FronteggStoreContext/index.js +11 -35
- package/node/audits/auditLogs.js +8 -6
- package/node/audits/auditsMetadata.js +8 -6
- package/node/audits/hooks.js +7 -34
- package/node/auth/acceptInvitation.js +7 -5
- package/node/auth/activateAccount.js +7 -4
- package/node/auth/allAccounts.js +27 -0
- package/node/auth/apiTokens.js +8 -6
- package/node/auth/customLogin.js +11 -12
- package/node/auth/entitlements.js +24 -20
- package/node/auth/forgotPassword.js +8 -6
- package/node/auth/groups.js +12 -12
- package/node/auth/hooks.js +27 -61
- package/node/auth/impersonate.js +7 -6
- package/node/auth/index.js +84 -120
- package/node/auth/login.js +10 -4
- package/node/auth/mfa.js +10 -4
- package/node/auth/passkeys.js +7 -6
- package/node/auth/profile.js +10 -9
- package/node/auth/provisioning.js +7 -6
- package/node/auth/resetPhoneNumber.js +7 -6
- package/node/auth/roles.js +7 -6
- package/node/auth/security/index.js +49 -0
- package/node/auth/security/restrictions.js +10 -10
- package/node/auth/security/securityCenter.js +8 -6
- package/node/auth/security/securityPolicy.js +16 -30
- package/node/auth/security/sessionsPolicy.js +8 -6
- package/node/auth/sessions.js +7 -6
- package/node/auth/signup.js +10 -4
- package/node/auth/sms.js +7 -6
- package/node/auth/socialLogin.js +7 -4
- package/node/auth/sso.js +7 -4
- package/node/auth/{stepUp/stepUp.js → stepUp.js} +10 -7
- package/node/auth/team.js +25 -4
- package/node/auth/tenants.js +8 -6
- package/node/common/CustomComponentHolder.js +3 -1
- package/node/common/index.js +2 -2
- package/node/connectivity/hooks.js +5 -8
- package/node/index.js +16 -16
- package/node/subscriptions/hooks.js +84 -51
- package/node/vendor/hooks.js +5 -6
- package/package.json +3 -3
- package/subscriptions/hooks.d.ts +32 -10
- package/subscriptions/hooks.js +81 -49
- package/vendor/hooks.d.ts +0 -1
- package/vendor/hooks.js +9 -7
- package/auth/MSP/allAccounts.js +0 -15
- package/auth/stepUp/index.d.ts +0 -2
- package/auth/stepUp/index.js +0 -2
- package/auth/stepUp/interfaces.d.ts +0 -2
- package/auth/stepUp/interfaces.js +0 -1
- package/node/auth/MSP/allAccounts.js +0 -24
- package/node/auth/stepUp/index.js +0 -27
- package/node/auth/stepUp/interfaces.js +0 -5
- package/node/tests/hooks.tsc-test.js +0 -318
- package/tests/hooks.tsc-test.js +0 -317
package/tests/hooks.tsc-test.js
DELETED
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
// noinspection JSUnusedLocalSymbols
|
|
2
|
-
|
|
3
|
-
import { useAcceptInvitationActions, useAcceptInvitationState, useActivateAccountActions, useActivateAccountState, useApiTokensActions, useApiTokensState, useAuditsActions, useAuditsState, useAuth, useAuthActions, useConnectivityActions, useConnectivityState, useForgotPasswordActions, useForgotPasswordState, useLoginActions, useLoginState, useMfaActions, useMfaState, useProfileActions, useProfileState, useResetPhoneNumberActions, useResetPhoneNumberState, useRolesActions, useRolesState, useSecurityPolicyActions, useSecurityPolicyState, useSessionsActions, useSessionsPolicyActions, useSessionsPolicyState, useSessionsState, useSignUpActions, useSignUpState, useSocialLoginActions, useSocialLoginState, useSSOActions, useSSOState, useTenantsActions, useTenantsState, useVendorActions, useVendorState } from '../index';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* useAuth hook typescript tests
|
|
7
|
-
*/
|
|
8
|
-
{
|
|
9
|
-
const {
|
|
10
|
-
isAuthenticated,
|
|
11
|
-
isLoading
|
|
12
|
-
} = useAuth();
|
|
13
|
-
const isLoadingDirect = useAuth(state => state.isLoading);
|
|
14
|
-
isLoadingDirect.valueOf();
|
|
15
|
-
const {
|
|
16
|
-
user
|
|
17
|
-
} = useAuth(state => ({
|
|
18
|
-
user: state.user
|
|
19
|
-
}));
|
|
20
|
-
const {
|
|
21
|
-
loginUrl
|
|
22
|
-
} = useAuth(state => state.routes);
|
|
23
|
-
const {
|
|
24
|
-
loadProfile,
|
|
25
|
-
setLoginState
|
|
26
|
-
} = useAuthActions();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* useAcceptInvitationState hook typescript tests
|
|
31
|
-
*/
|
|
32
|
-
{
|
|
33
|
-
const {
|
|
34
|
-
step
|
|
35
|
-
} = useAcceptInvitationState();
|
|
36
|
-
const errorDirect = useAcceptInvitationState(state => state.error);
|
|
37
|
-
errorDirect == null ? void 0 : errorDirect.substring(0);
|
|
38
|
-
const {
|
|
39
|
-
acceptInvitation
|
|
40
|
-
} = useAcceptInvitationActions();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* useActivateAccountState hook typescript tests
|
|
45
|
-
*/
|
|
46
|
-
{
|
|
47
|
-
const {
|
|
48
|
-
step
|
|
49
|
-
} = useActivateAccountState();
|
|
50
|
-
const loadingDirect = useActivateAccountState(state => state.loading);
|
|
51
|
-
loadingDirect.valueOf();
|
|
52
|
-
const {
|
|
53
|
-
activateAccount
|
|
54
|
-
} = useActivateAccountActions();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* useApiTokensState hook typescript tests
|
|
59
|
-
*/
|
|
60
|
-
{
|
|
61
|
-
const {
|
|
62
|
-
roles
|
|
63
|
-
} = useApiTokensState();
|
|
64
|
-
const loadingDirect = useApiTokensState(state => state.loaders);
|
|
65
|
-
let m = loadingDirect.LOAD_API_TOKENS;
|
|
66
|
-
const {
|
|
67
|
-
loadUserApiTokens
|
|
68
|
-
} = useApiTokensActions();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* useForgotPasswordState hook typescript tests
|
|
73
|
-
*/
|
|
74
|
-
{
|
|
75
|
-
const {
|
|
76
|
-
step
|
|
77
|
-
} = useForgotPasswordState();
|
|
78
|
-
const emailDirect = useForgotPasswordState(state => state.email);
|
|
79
|
-
emailDirect.substring(0);
|
|
80
|
-
const {
|
|
81
|
-
forgotPassword
|
|
82
|
-
} = useForgotPasswordActions();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* useMfaState hook typescript tests
|
|
87
|
-
*/
|
|
88
|
-
{
|
|
89
|
-
const {
|
|
90
|
-
step
|
|
91
|
-
} = useMfaState();
|
|
92
|
-
const loadingDirect = useMfaState(state => state.loading);
|
|
93
|
-
loadingDirect.valueOf();
|
|
94
|
-
const {
|
|
95
|
-
enrollMfa
|
|
96
|
-
} = useMfaActions();
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* useLoginState hook typescript tests
|
|
101
|
-
*/
|
|
102
|
-
{
|
|
103
|
-
const {
|
|
104
|
-
step
|
|
105
|
-
} = useLoginState();
|
|
106
|
-
const loadingDirect = useLoginState(state => state.loading);
|
|
107
|
-
loadingDirect.valueOf();
|
|
108
|
-
const {
|
|
109
|
-
logout
|
|
110
|
-
} = useLoginActions();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* useLoginState hook typescript tests
|
|
115
|
-
*/
|
|
116
|
-
{
|
|
117
|
-
const {
|
|
118
|
-
profile
|
|
119
|
-
} = useProfileState();
|
|
120
|
-
const loadingDirect = useProfileState(state => state.loading);
|
|
121
|
-
loadingDirect.valueOf();
|
|
122
|
-
const {
|
|
123
|
-
loadProfile
|
|
124
|
-
} = useProfileActions();
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* useResetPhoneNumberState hook typescript tests
|
|
129
|
-
*/
|
|
130
|
-
{
|
|
131
|
-
const {
|
|
132
|
-
step
|
|
133
|
-
} = useResetPhoneNumberState();
|
|
134
|
-
const loadingDirect = useResetPhoneNumberState(state => state.loading);
|
|
135
|
-
loadingDirect.valueOf();
|
|
136
|
-
const {
|
|
137
|
-
resetPhoneNumber
|
|
138
|
-
} = useResetPhoneNumberActions();
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* useRolesState hook typescript tests
|
|
143
|
-
*/
|
|
144
|
-
{
|
|
145
|
-
const {
|
|
146
|
-
saving
|
|
147
|
-
} = useRolesState();
|
|
148
|
-
const loadingDirect = useRolesState(state => state.loading);
|
|
149
|
-
loadingDirect.valueOf();
|
|
150
|
-
const {
|
|
151
|
-
loadRolesAndPermissions
|
|
152
|
-
} = useRolesActions();
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* useSecurityPolicyState hook typescript tests
|
|
157
|
-
*/
|
|
158
|
-
{
|
|
159
|
-
const {
|
|
160
|
-
lockoutPolicy
|
|
161
|
-
} = useSecurityPolicyState();
|
|
162
|
-
const captchaPolicy = useSecurityPolicyState(state => state.captchaPolicy);
|
|
163
|
-
captchaPolicy.loading.valueOf();
|
|
164
|
-
const {
|
|
165
|
-
loadPublicSecurityPolicy
|
|
166
|
-
} = useSecurityPolicyActions();
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* useSessionsState hook typescript tests
|
|
171
|
-
*/
|
|
172
|
-
{
|
|
173
|
-
const {
|
|
174
|
-
sessions
|
|
175
|
-
} = useSessionsState();
|
|
176
|
-
const loadingDirect = useSessionsState(state => state.loading);
|
|
177
|
-
loadingDirect.valueOf();
|
|
178
|
-
const {
|
|
179
|
-
deleteUserSession
|
|
180
|
-
} = useSessionsActions();
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* useSessionsPolicyState hook typescript tests
|
|
185
|
-
*/
|
|
186
|
-
{
|
|
187
|
-
const {
|
|
188
|
-
configurations
|
|
189
|
-
} = useSessionsPolicyState();
|
|
190
|
-
const loadingDirect = useSessionsPolicyState(state => state.loading);
|
|
191
|
-
loadingDirect.valueOf();
|
|
192
|
-
const {
|
|
193
|
-
resetSessionsPolicyState
|
|
194
|
-
} = useSessionsPolicyActions();
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* useSSOState hook typescript tests
|
|
199
|
-
*/
|
|
200
|
-
{
|
|
201
|
-
const {
|
|
202
|
-
authorizationRoles
|
|
203
|
-
} = useSSOState();
|
|
204
|
-
const loadingDirect = useSSOState(state => state.loading);
|
|
205
|
-
loadingDirect.valueOf();
|
|
206
|
-
const {
|
|
207
|
-
loadSSOConfigurationsV2
|
|
208
|
-
} = useSSOActions();
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* useSignUpState hook typescript tests
|
|
213
|
-
*/
|
|
214
|
-
{
|
|
215
|
-
const {
|
|
216
|
-
stage
|
|
217
|
-
} = useSignUpState();
|
|
218
|
-
const loadingDirect = useSignUpState(state => state.loading);
|
|
219
|
-
loadingDirect.valueOf();
|
|
220
|
-
const {
|
|
221
|
-
setSignUpState
|
|
222
|
-
} = useSignUpActions();
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* useSocialLoginState hook typescript tests
|
|
227
|
-
*/
|
|
228
|
-
{
|
|
229
|
-
const {
|
|
230
|
-
socialLoginsConfig
|
|
231
|
-
} = useSocialLoginState();
|
|
232
|
-
const loadingDirect = useSocialLoginState(state => state.loading);
|
|
233
|
-
loadingDirect.valueOf();
|
|
234
|
-
const {
|
|
235
|
-
loadSocialLoginsConfiguration
|
|
236
|
-
} = useSocialLoginActions();
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* useSocialLoginState hook typescript tests
|
|
241
|
-
*/
|
|
242
|
-
{
|
|
243
|
-
const {
|
|
244
|
-
tenants
|
|
245
|
-
} = useTenantsState();
|
|
246
|
-
const loadingDirect = useTenantsState(state => state.loading);
|
|
247
|
-
loadingDirect.valueOf();
|
|
248
|
-
const {
|
|
249
|
-
loadTenants
|
|
250
|
-
} = useTenantsActions();
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* useVendorState hook typescript tests
|
|
255
|
-
*/
|
|
256
|
-
{
|
|
257
|
-
const {
|
|
258
|
-
loading
|
|
259
|
-
} = useVendorState();
|
|
260
|
-
const isLoadingDirect = useVendorState(state => state.loading);
|
|
261
|
-
isLoadingDirect.valueOf();
|
|
262
|
-
const {
|
|
263
|
-
whiteLabelMode
|
|
264
|
-
} = useVendorState(state => ({
|
|
265
|
-
whiteLabelMode: state.whiteLabelMode
|
|
266
|
-
}));
|
|
267
|
-
const {
|
|
268
|
-
loadVendorPublicInfo
|
|
269
|
-
} = useVendorActions();
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* useConnectivityState hook typescript tests
|
|
274
|
-
*/
|
|
275
|
-
{
|
|
276
|
-
const {
|
|
277
|
-
isLoading,
|
|
278
|
-
error
|
|
279
|
-
} = useConnectivityState();
|
|
280
|
-
const processIds = useConnectivityState(state => state.processIds);
|
|
281
|
-
processIds.map(id => id);
|
|
282
|
-
const {
|
|
283
|
-
email
|
|
284
|
-
} = useConnectivityState(state => {
|
|
285
|
-
var _state$email;
|
|
286
|
-
return {
|
|
287
|
-
email: (_state$email = state.email) != null ? _state$email : []
|
|
288
|
-
};
|
|
289
|
-
});
|
|
290
|
-
email.length;
|
|
291
|
-
const {
|
|
292
|
-
loadScope,
|
|
293
|
-
loadDataAction
|
|
294
|
-
} = useConnectivityActions();
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* useAuditsState hook typescript tests
|
|
299
|
-
*/
|
|
300
|
-
{
|
|
301
|
-
const {
|
|
302
|
-
auditLogsState
|
|
303
|
-
} = useAuditsState();
|
|
304
|
-
const {
|
|
305
|
-
columns
|
|
306
|
-
} = useAuditsState(state => state.auditsMetadataState);
|
|
307
|
-
const {
|
|
308
|
-
loading
|
|
309
|
-
} = useAuditsState(state => ({
|
|
310
|
-
loading: state.auditLogsState.loading
|
|
311
|
-
}));
|
|
312
|
-
loading.valueOf();
|
|
313
|
-
let x = columns == null ? void 0 : columns.length;
|
|
314
|
-
const {
|
|
315
|
-
loadAuditLogs
|
|
316
|
-
} = useAuditsActions();
|
|
317
|
-
}
|