@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.
Files changed (139) hide show
  1. package/FronteggProvider/FronteggProvider.d.ts +12 -0
  2. package/FronteggProvider/FronteggProvider.js +134 -0
  3. package/FronteggProvider/index.d.ts +1 -12
  4. package/FronteggProvider/index.js +1 -133
  5. package/FronteggStoreContext/FronteggStoreContext.d.ts +9 -0
  6. package/FronteggStoreContext/FronteggStoreContext.js +16 -0
  7. package/FronteggStoreContext/index.d.ts +1 -13
  8. package/FronteggStoreContext/index.js +1 -14
  9. package/audits/auditLogs.d.ts +2 -4
  10. package/audits/auditLogs.js +8 -6
  11. package/audits/auditsMetadata.d.ts +2 -4
  12. package/audits/auditsMetadata.js +8 -6
  13. package/audits/hooks.d.ts +0 -8
  14. package/audits/hooks.js +6 -30
  15. package/auth/acceptInvitation.js +10 -5
  16. package/auth/activateAccount.js +10 -4
  17. package/auth/{MSP/allAccounts.d.ts → allAccounts.d.ts} +2 -4
  18. package/auth/allAccounts.js +20 -0
  19. package/auth/apiTokens.d.ts +0 -2
  20. package/auth/apiTokens.js +8 -6
  21. package/auth/customLogin.d.ts +2 -5
  22. package/auth/customLogin.js +10 -11
  23. package/auth/entitlements.d.ts +14 -14
  24. package/auth/entitlements.js +25 -21
  25. package/auth/forgotPassword.d.ts +0 -2
  26. package/auth/forgotPassword.js +8 -6
  27. package/auth/groups.d.ts +0 -4
  28. package/auth/groups.js +12 -13
  29. package/auth/hooks.d.ts +9 -11
  30. package/auth/hooks.js +27 -58
  31. package/auth/impersonate.d.ts +0 -2
  32. package/auth/impersonate.js +7 -6
  33. package/auth/index.d.ts +14 -17
  34. package/auth/index.js +15 -18
  35. package/auth/login.d.ts +1 -1
  36. package/auth/login.js +13 -4
  37. package/auth/mfa.d.ts +1 -1
  38. package/auth/mfa.js +13 -4
  39. package/auth/passkeys.d.ts +1 -4
  40. package/auth/passkeys.js +7 -6
  41. package/auth/profile.d.ts +2 -4
  42. package/auth/profile.js +9 -8
  43. package/auth/provisioning.d.ts +1 -3
  44. package/auth/provisioning.js +7 -6
  45. package/auth/resetPhoneNumber.d.ts +1 -3
  46. package/auth/resetPhoneNumber.js +7 -6
  47. package/auth/roles.d.ts +1 -3
  48. package/auth/roles.js +7 -6
  49. package/auth/security/index.d.ts +4 -0
  50. package/auth/security/index.js +4 -0
  51. package/auth/security/restrictions.d.ts +0 -2
  52. package/auth/security/restrictions.js +10 -10
  53. package/auth/security/securityCenter.d.ts +1 -4
  54. package/auth/security/securityCenter.js +8 -6
  55. package/auth/security/securityPolicy.d.ts +5 -11
  56. package/auth/security/securityPolicy.js +19 -30
  57. package/auth/security/sessionsPolicy.d.ts +1 -3
  58. package/auth/security/sessionsPolicy.js +8 -6
  59. package/auth/sessions.d.ts +1 -3
  60. package/auth/sessions.js +7 -6
  61. package/auth/signup.d.ts +1 -1
  62. package/auth/signup.js +13 -4
  63. package/auth/sms.d.ts +1 -4
  64. package/auth/sms.js +7 -6
  65. package/auth/socialLogin.d.ts +1 -1
  66. package/auth/socialLogin.js +10 -4
  67. package/auth/sso.d.ts +1 -1
  68. package/auth/sso.js +10 -4
  69. package/auth/{stepUp/stepUp.d.ts → stepUp.d.ts} +0 -2
  70. package/auth/{stepUp/stepUp.js → stepUp.js} +9 -6
  71. package/auth/team.d.ts +9 -1
  72. package/auth/team.js +22 -4
  73. package/auth/tenants.d.ts +1 -3
  74. package/auth/tenants.js +8 -6
  75. package/common/CustomComponentHolder.js +3 -1
  76. package/common/index.js +3 -3
  77. package/connectivity/hooks.d.ts +2 -5
  78. package/connectivity/hooks.js +6 -9
  79. package/index.d.ts +2 -2
  80. package/index.js +3 -3
  81. package/node/FronteggProvider/FronteggProvider.js +140 -0
  82. package/node/FronteggProvider/index.js +9 -134
  83. package/node/FronteggStoreContext/FronteggStoreContext.js +26 -0
  84. package/node/FronteggStoreContext/index.js +11 -35
  85. package/node/audits/auditLogs.js +8 -6
  86. package/node/audits/auditsMetadata.js +8 -6
  87. package/node/audits/hooks.js +7 -34
  88. package/node/auth/acceptInvitation.js +7 -5
  89. package/node/auth/activateAccount.js +7 -4
  90. package/node/auth/allAccounts.js +27 -0
  91. package/node/auth/apiTokens.js +8 -6
  92. package/node/auth/customLogin.js +11 -12
  93. package/node/auth/entitlements.js +24 -20
  94. package/node/auth/forgotPassword.js +8 -6
  95. package/node/auth/groups.js +12 -12
  96. package/node/auth/hooks.js +27 -61
  97. package/node/auth/impersonate.js +7 -6
  98. package/node/auth/index.js +84 -120
  99. package/node/auth/login.js +10 -4
  100. package/node/auth/mfa.js +10 -4
  101. package/node/auth/passkeys.js +7 -6
  102. package/node/auth/profile.js +10 -9
  103. package/node/auth/provisioning.js +7 -6
  104. package/node/auth/resetPhoneNumber.js +7 -6
  105. package/node/auth/roles.js +7 -6
  106. package/node/auth/security/index.js +49 -0
  107. package/node/auth/security/restrictions.js +10 -10
  108. package/node/auth/security/securityCenter.js +8 -6
  109. package/node/auth/security/securityPolicy.js +16 -30
  110. package/node/auth/security/sessionsPolicy.js +8 -6
  111. package/node/auth/sessions.js +7 -6
  112. package/node/auth/signup.js +10 -4
  113. package/node/auth/sms.js +7 -6
  114. package/node/auth/socialLogin.js +7 -4
  115. package/node/auth/sso.js +7 -4
  116. package/node/auth/{stepUp/stepUp.js → stepUp.js} +10 -7
  117. package/node/auth/team.js +25 -4
  118. package/node/auth/tenants.js +8 -6
  119. package/node/common/CustomComponentHolder.js +3 -1
  120. package/node/common/index.js +2 -2
  121. package/node/connectivity/hooks.js +5 -8
  122. package/node/index.js +16 -16
  123. package/node/subscriptions/hooks.js +84 -51
  124. package/node/vendor/hooks.js +5 -6
  125. package/package.json +3 -3
  126. package/subscriptions/hooks.d.ts +32 -10
  127. package/subscriptions/hooks.js +81 -49
  128. package/vendor/hooks.d.ts +0 -1
  129. package/vendor/hooks.js +9 -7
  130. package/auth/MSP/allAccounts.js +0 -15
  131. package/auth/stepUp/index.d.ts +0 -2
  132. package/auth/stepUp/index.js +0 -2
  133. package/auth/stepUp/interfaces.d.ts +0 -2
  134. package/auth/stepUp/interfaces.js +0 -1
  135. package/node/auth/MSP/allAccounts.js +0 -24
  136. package/node/auth/stepUp/index.js +0 -27
  137. package/node/auth/stepUp/interfaces.js +0 -5
  138. package/node/tests/hooks.tsc-test.js +0 -318
  139. package/tests/hooks.tsc-test.js +0 -317
@@ -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
- }