@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
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/react-hooks",
3
- "version": "6.176.0",
3
+ "version": "6.178.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
- "@frontegg/redux-store": "6.176.0",
10
- "@frontegg/types": "6.176.0",
9
+ "@frontegg/redux-store": "6.178.0-alpha.0",
10
+ "@frontegg/types": "6.178.0-alpha.0",
11
11
  "@types/react": "*",
12
12
  "get-value": "^3.0.1",
13
13
  "react-redux": "^7.x"
@@ -1,21 +1,43 @@
1
- import { CheckoutActions, CheckoutState, PaymentProviderConfigActions, PaymentProviderConfigState, PlansActions, PlansState, StripeActions, StripeState, SubscriptionActions, SubscriptionState, VendorPublicConfigurationActions, VendorPublicConfigurationState } from '@frontegg/redux-store';
1
+ import { CheckoutActions, CheckoutState, PaymentProviderConfigActions, PaymentProviderConfigState, PlansActions, PlansState, StripeActions, StripeState, SubscriptionState, BillingInformationState, InvoicesState, PaymentMethodState, BillingStateActions, VendorPublicConfigurationState, VendorPublicConfigurationActions } from '@frontegg/redux-store';
2
2
  export declare const usePaymentProvider: () => PaymentProviderConfigState;
3
3
  export declare const usePaymentProviderActions: () => PaymentProviderConfigActions;
4
4
  export declare const usePlans: () => PlansState;
5
5
  export declare const usePlansActions: () => PlansActions;
6
6
  export declare const useCheckout: () => CheckoutState;
7
7
  export declare const useCheckoutActions: () => CheckoutActions;
8
- export declare const useBillingInformation: () => import("@frontegg/redux-store").BillingInformationState;
9
- export declare const useBillingInformationActions: () => import("@frontegg/redux-store").BillingInformationActions;
10
- export declare const usePaymentMethod: () => import("@frontegg/redux-store").PaymentMethodState;
11
- export declare const usePaymentMethodActions: () => import("@frontegg/redux-store").PaymentMethodActions;
12
- export declare const useInvoices: () => import("@frontegg/redux-store").InvoicesState;
13
- export declare const useInvoicesActions: () => import("@frontegg/redux-store").InvoicesActions;
14
- export declare const useStripeState: () => StripeState;
15
- export declare const useStripeActions: () => StripeActions;
8
+ export declare const useBillingInformation: () => BillingInformationState;
9
+ export declare const useBillingInformationActions: () => {
10
+ setBillingInformationState: (state: Partial<BillingInformationState>) => void;
11
+ resetBillingInformationState: () => void;
12
+ loadSummaries: (tenantId: string, forceActive?: boolean | undefined) => Promise<void>;
13
+ loadBillingInformation: (forceActive?: boolean | undefined) => Promise<void>;
14
+ };
15
+ export declare const usePaymentMethod: () => PaymentMethodState;
16
+ export declare const usePaymentMethodActions: () => {
17
+ setBillingPaymentMethodState: (state: Partial<{}>) => void;
18
+ resetBillingPaymentMethodState: () => void;
19
+ loadPaymentMethod: () => Promise<void>;
20
+ submitPaymentMethod: () => Promise<void>;
21
+ submitPaymentMethodError: (error: string) => Promise<void>;
22
+ submitPaymentMethodSuccess: () => Promise<void>;
23
+ updatePaymentMethodBillingDetails: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithId<import("@frontegg/rest-api").ISubscriptionUpdatePaymentMethodBillingDetails>, boolean>) => Promise<void>;
24
+ };
25
+ export declare const useInvoices: () => InvoicesState;
26
+ export declare const useInvoicesActions: () => {
27
+ setBillingInvoiceState: (state: Partial<InvoicesState>) => void;
28
+ resetBillingInvoiceState: () => void;
29
+ loadInvoices: () => Promise<void>;
30
+ loadBillingInvoices: () => Promise<void>;
31
+ downloadInvoice: (payload: import("@frontegg/redux-store").DownloadInvoiceActionPayload) => Promise<void>;
32
+ downloadBillingInvoice: (payload: import("@frontegg/redux-store").DownloadInvoiceActionPayload) => Promise<void>;
33
+ };
16
34
  export declare const useSubscriptionCancellation: () => SubscriptionState['cancellation'];
17
35
  export declare const useSubscriptionRenewal: () => SubscriptionState['renewal'];
18
36
  export declare const useSubscription: () => SubscriptionState;
19
- export declare const useSubscriptionActions: () => SubscriptionActions;
37
+ export declare const useSubscriptionActions: () => BillingStateActions['subscription'] & {
38
+ load: () => void;
39
+ };
40
+ export declare const useStripeState: () => StripeState;
41
+ export declare const useStripeActions: () => StripeActions;
20
42
  export declare const useVendorPublicConfig: () => VendorPublicConfigurationState;
21
43
  export declare const useVendorPublicConfigActions: () => VendorPublicConfigurationActions;
@@ -1,77 +1,109 @@
1
- import { bindActionCreators, subscriptionActions, subscriptionsStoreName } from '@frontegg/redux-store';
2
- import { useDispatch, useSelector } from '../FronteggStoreContext';
3
- import { shallowEqual } from 'react-redux';
4
- import { useMemo } from 'react';
5
- function getSubscriptionState(state) {
6
- return state[subscriptionsStoreName];
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import { useStore } from '../FronteggStoreContext';
3
+ import { useSnapshot } from 'valtio/react';
4
+ function getSubscriptionsState() {
5
+ // eslint-disable-next-line react-hooks/rules-of-hooks
6
+ return useStore().store.subscriptions;
7
7
  }
8
8
  export const usePaymentProvider = () => {
9
- return useSelector(state => getSubscriptionState(state).config, shallowEqual);
9
+ const {
10
+ config
11
+ } = getSubscriptionsState();
12
+ return useSnapshot(config);
10
13
  };
11
14
  export const usePaymentProviderActions = () => {
12
- const dispatch = useDispatch();
13
- return useMemo(() => bindActionCreators(subscriptionActions.config, dispatch), [dispatch]);
15
+ return useStore().stateActions.subscriptions.config;
14
16
  };
15
17
  export const usePlans = () => {
16
- return useSelector(state => getSubscriptionState(state).plans, shallowEqual);
18
+ const {
19
+ plans
20
+ } = getSubscriptionsState();
21
+ return useSnapshot(plans);
17
22
  };
18
23
  export const usePlansActions = () => {
19
- const dispatch = useDispatch();
20
- return useMemo(() => bindActionCreators(subscriptionActions.plans, dispatch), [dispatch]);
24
+ return useStore().stateActions.subscriptions.plans;
21
25
  };
22
26
  export const useCheckout = () => {
23
- return useSelector(state => getSubscriptionState(state).checkout, shallowEqual);
27
+ const {
28
+ checkout
29
+ } = getSubscriptionsState();
30
+ return useSnapshot(checkout);
24
31
  };
25
32
  export const useCheckoutActions = () => {
26
- const dispatch = useDispatch();
27
- return useMemo(() => bindActionCreators(subscriptionActions.checkout, dispatch), [dispatch]);
33
+ return useStore().stateActions.subscriptions.checkout;
28
34
  };
29
35
  const useBillingActions = billingKey => {
30
- const dispatch = useDispatch();
31
- return useMemo(() => bindActionCreators(subscriptionActions.billing[billingKey], dispatch), [billingKey, dispatch]);
32
- };
33
- export const useBillingInformation = () => useSelector(state => getSubscriptionState(state).billing.information, shallowEqual);
34
- export const useBillingInformationActions = () => useBillingActions('information');
35
- export const usePaymentMethod = () => useSelector(state => getSubscriptionState(state).billing.paymentMethod, shallowEqual);
36
- export const usePaymentMethodActions = () => useBillingActions('paymentMethod');
37
- export const useInvoices = () => useSelector(state => getSubscriptionState(state).billing.invoices, shallowEqual);
38
- export const useInvoicesActions = () => useBillingActions('invoices');
39
- export const useStripeState = () => {
40
- return useSelector(state => getSubscriptionState(state).stripe, shallowEqual);
36
+ return useStore().stateActions.subscriptions.billing[billingKey];
41
37
  };
42
- export const useStripeActions = () => {
43
- const dispatch = useDispatch();
44
- return useMemo(() => bindActionCreators(subscriptionActions.stripe, dispatch), [dispatch]);
38
+ export const useBillingInformation = () => {
39
+ const {
40
+ billing
41
+ } = getSubscriptionsState();
42
+ return useSnapshot(billing.information);
43
+ };
44
+ export const useBillingInformationActions = () => {
45
+ return useBillingActions('information');
46
+ };
47
+ export const usePaymentMethod = () => {
48
+ const {
49
+ billing
50
+ } = getSubscriptionsState();
51
+ return useSnapshot(billing.paymentMethod);
52
+ };
53
+ export const usePaymentMethodActions = () => {
54
+ return useBillingActions('paymentMethod');
55
+ };
56
+ export const useInvoices = () => {
57
+ const {
58
+ billing
59
+ } = getSubscriptionsState();
60
+ return useSnapshot(billing.invoices);
61
+ };
62
+ export const useInvoicesActions = () => {
63
+ return useBillingActions('invoices');
45
64
  };
46
65
  export const useSubscriptionCancellation = () => {
47
- return useSelector(state => getSubscriptionState(state).billing.subscription.cancellation, shallowEqual);
66
+ const {
67
+ billing
68
+ } = getSubscriptionsState();
69
+ const {
70
+ cancellation
71
+ } = useSnapshot(billing.subscription);
72
+ return cancellation;
48
73
  };
49
74
  export const useSubscriptionRenewal = () => {
50
- return useSelector(state => getSubscriptionState(state).billing.subscription.renewal, shallowEqual);
75
+ const {
76
+ billing
77
+ } = getSubscriptionsState();
78
+ const {
79
+ renewal
80
+ } = useSnapshot(billing.subscription);
81
+ return renewal;
51
82
  };
52
83
  export const useSubscription = () => {
53
- return useSelector(state => {
54
- const {
55
- billing: {
56
- subscription
57
- }
58
- } = getSubscriptionState(state);
59
- return subscription;
60
- }, shallowEqual);
84
+ const {
85
+ billing
86
+ } = getSubscriptionsState();
87
+ return useSnapshot(billing.subscription);
61
88
  };
62
89
  export const useSubscriptionActions = () => {
63
- const dispatch = useDispatch();
64
- return useMemo(() => bindActionCreators(subscriptionActions.billing.subscription, dispatch), [dispatch]);
90
+ const actions = useStore().stateActions.subscriptions.billing.subscription;
91
+ return _extends({}, actions, {
92
+ load: actions.loadSubscription
93
+ });
94
+ };
95
+ export const useStripeState = () => {
96
+ const {
97
+ stripe
98
+ } = getSubscriptionsState();
99
+ return useSnapshot(stripe);
100
+ };
101
+ export const useStripeActions = () => {
102
+ return useStore().stateActions.subscriptions.stripe;
65
103
  };
66
104
  export const useVendorPublicConfig = () => {
67
- return useSelector(state => {
68
- const {
69
- vendorPublicConfig
70
- } = getSubscriptionState(state);
71
- return vendorPublicConfig;
72
- }, shallowEqual);
105
+ return useSnapshot(useStore().store.subscriptions.vendorPublicConfig);
73
106
  };
74
107
  export const useVendorPublicConfigActions = () => {
75
- const dispatch = useDispatch();
76
- return useMemo(() => bindActionCreators(subscriptionActions.vendorPublicConfig, dispatch), [dispatch]);
108
+ return useStore().stateActions.subscriptions.vendorPublicConfig;
77
109
  };
package/vendor/hooks.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { VendorActions, VendorState } from '@frontegg/redux-store';
2
2
  export declare type VendorStateMapper<S> = (state: VendorState) => S;
3
- export declare type StateHookFunction<T> = (() => T) & (<S extends object>(mapper: (state: T) => S) => S);
4
3
  export declare function useVendorState(): VendorState;
5
4
  export declare function useVendorState<S>(stateMapper: VendorStateMapper<S>): S;
6
5
  export declare const useVendorActions: () => VendorActions;
package/vendor/hooks.js CHANGED
@@ -1,12 +1,14 @@
1
- import { useMemo } from 'react';
2
- import { bindActionCreators, vendorActions, vendorStoreName } from '@frontegg/redux-store';
3
- import { shallowEqual } from 'react-redux';
4
- import { useSelector, useDispatch } from '../FronteggStoreContext';
1
+ import { useStore } from '../FronteggStoreContext';
2
+ import { useSnapshot } from 'valtio/react';
3
+
4
+ // TODO: remove useless stateMapper, valtio already does this
5
+
5
6
  const defaultMapper = state => state;
7
+ // @deprecated use useVendorState() instead
6
8
  export function useVendorState(stateMapper = defaultMapper) {
7
- return useSelector(state => stateMapper(state[vendorStoreName]), shallowEqual);
9
+ const state = useStore().store.vendor;
10
+ return stateMapper(useSnapshot(state));
8
11
  }
9
12
  export const useVendorActions = () => {
10
- const dispatch = useDispatch();
11
- return useMemo(() => bindActionCreators(vendorActions, dispatch), [vendorActions]);
13
+ return useStore().stateActions.vendor;
12
14
  };
@@ -1,15 +0,0 @@
1
- import { allAccountsActions, allAccountsReducers, allAccountsDialogsReducers } from '@frontegg/redux-store';
2
- import { reducerActionsGenerator, stateHookGenerator } from '../hooks';
3
- const defaultMapper = state => state;
4
- export function useAllAccountsState(stateMapper = defaultMapper) {
5
- return stateHookGenerator(stateMapper, 'allAccountsState');
6
- }
7
- export const useAllAccountsActions = () => reducerActionsGenerator(allAccountsActions, allAccountsReducers);
8
-
9
- //dialogs
10
-
11
- const defaultDialogsMapper = state => state;
12
- export function useAllAccountsDialogsState(stateMapper = defaultDialogsMapper) {
13
- return stateHookGenerator(stateMapper, 'allAccountsDialogsState');
14
- }
15
- export const useAllAccountsDialogsActions = () => reducerActionsGenerator({}, allAccountsDialogsReducers);
@@ -1,2 +0,0 @@
1
- export * from './stepUp';
2
- export * from './interfaces';
@@ -1,2 +0,0 @@
1
- export * from './stepUp';
2
- export * from './interfaces';
@@ -1,2 +0,0 @@
1
- import { StepUpState } from '@frontegg/redux-store';
2
- export declare type StepUpStateMapper<S> = (state: StepUpState) => S;
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useAllAccountsDialogsActions = exports.useAllAccountsActions = void 0;
7
- exports.useAllAccountsDialogsState = useAllAccountsDialogsState;
8
- exports.useAllAccountsState = useAllAccountsState;
9
- var _reduxStore = require("@frontegg/redux-store");
10
- var _hooks = require("../hooks");
11
- const defaultMapper = state => state;
12
- function useAllAccountsState(stateMapper = defaultMapper) {
13
- return (0, _hooks.stateHookGenerator)(stateMapper, 'allAccountsState');
14
- }
15
- const useAllAccountsActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.allAccountsActions, _reduxStore.allAccountsReducers);
16
-
17
- //dialogs
18
- exports.useAllAccountsActions = useAllAccountsActions;
19
- const defaultDialogsMapper = state => state;
20
- function useAllAccountsDialogsState(stateMapper = defaultDialogsMapper) {
21
- return (0, _hooks.stateHookGenerator)(stateMapper, 'allAccountsDialogsState');
22
- }
23
- const useAllAccountsDialogsActions = () => (0, _hooks.reducerActionsGenerator)({}, _reduxStore.allAccountsDialogsReducers);
24
- exports.useAllAccountsDialogsActions = useAllAccountsDialogsActions;
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _stepUp = require("./stepUp");
7
- Object.keys(_stepUp).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _stepUp[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _stepUp[key];
14
- }
15
- });
16
- });
17
- var _interfaces = require("./interfaces");
18
- Object.keys(_interfaces).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _interfaces[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _interfaces[key];
25
- }
26
- });
27
- });
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,318 +0,0 @@
1
- "use strict";
2
-
3
- var _index = require("../index");
4
- // noinspection JSUnusedLocalSymbols
5
-
6
- /**
7
- * useAuth hook typescript tests
8
- */
9
- {
10
- const {
11
- isAuthenticated,
12
- isLoading
13
- } = (0, _index.useAuth)();
14
- const isLoadingDirect = (0, _index.useAuth)(state => state.isLoading);
15
- isLoadingDirect.valueOf();
16
- const {
17
- user
18
- } = (0, _index.useAuth)(state => ({
19
- user: state.user
20
- }));
21
- const {
22
- loginUrl
23
- } = (0, _index.useAuth)(state => state.routes);
24
- const {
25
- loadProfile,
26
- setLoginState
27
- } = (0, _index.useAuthActions)();
28
- }
29
-
30
- /**
31
- * useAcceptInvitationState hook typescript tests
32
- */
33
- {
34
- const {
35
- step
36
- } = (0, _index.useAcceptInvitationState)();
37
- const errorDirect = (0, _index.useAcceptInvitationState)(state => state.error);
38
- errorDirect == null ? void 0 : errorDirect.substring(0);
39
- const {
40
- acceptInvitation
41
- } = (0, _index.useAcceptInvitationActions)();
42
- }
43
-
44
- /**
45
- * useActivateAccountState hook typescript tests
46
- */
47
- {
48
- const {
49
- step
50
- } = (0, _index.useActivateAccountState)();
51
- const loadingDirect = (0, _index.useActivateAccountState)(state => state.loading);
52
- loadingDirect.valueOf();
53
- const {
54
- activateAccount
55
- } = (0, _index.useActivateAccountActions)();
56
- }
57
-
58
- /**
59
- * useApiTokensState hook typescript tests
60
- */
61
- {
62
- const {
63
- roles
64
- } = (0, _index.useApiTokensState)();
65
- const loadingDirect = (0, _index.useApiTokensState)(state => state.loaders);
66
- let m = loadingDirect.LOAD_API_TOKENS;
67
- const {
68
- loadUserApiTokens
69
- } = (0, _index.useApiTokensActions)();
70
- }
71
-
72
- /**
73
- * useForgotPasswordState hook typescript tests
74
- */
75
- {
76
- const {
77
- step
78
- } = (0, _index.useForgotPasswordState)();
79
- const emailDirect = (0, _index.useForgotPasswordState)(state => state.email);
80
- emailDirect.substring(0);
81
- const {
82
- forgotPassword
83
- } = (0, _index.useForgotPasswordActions)();
84
- }
85
-
86
- /**
87
- * useMfaState hook typescript tests
88
- */
89
- {
90
- const {
91
- step
92
- } = (0, _index.useMfaState)();
93
- const loadingDirect = (0, _index.useMfaState)(state => state.loading);
94
- loadingDirect.valueOf();
95
- const {
96
- enrollMfa
97
- } = (0, _index.useMfaActions)();
98
- }
99
-
100
- /**
101
- * useLoginState hook typescript tests
102
- */
103
- {
104
- const {
105
- step
106
- } = (0, _index.useLoginState)();
107
- const loadingDirect = (0, _index.useLoginState)(state => state.loading);
108
- loadingDirect.valueOf();
109
- const {
110
- logout
111
- } = (0, _index.useLoginActions)();
112
- }
113
-
114
- /**
115
- * useLoginState hook typescript tests
116
- */
117
- {
118
- const {
119
- profile
120
- } = (0, _index.useProfileState)();
121
- const loadingDirect = (0, _index.useProfileState)(state => state.loading);
122
- loadingDirect.valueOf();
123
- const {
124
- loadProfile
125
- } = (0, _index.useProfileActions)();
126
- }
127
-
128
- /**
129
- * useResetPhoneNumberState hook typescript tests
130
- */
131
- {
132
- const {
133
- step
134
- } = (0, _index.useResetPhoneNumberState)();
135
- const loadingDirect = (0, _index.useResetPhoneNumberState)(state => state.loading);
136
- loadingDirect.valueOf();
137
- const {
138
- resetPhoneNumber
139
- } = (0, _index.useResetPhoneNumberActions)();
140
- }
141
-
142
- /**
143
- * useRolesState hook typescript tests
144
- */
145
- {
146
- const {
147
- saving
148
- } = (0, _index.useRolesState)();
149
- const loadingDirect = (0, _index.useRolesState)(state => state.loading);
150
- loadingDirect.valueOf();
151
- const {
152
- loadRolesAndPermissions
153
- } = (0, _index.useRolesActions)();
154
- }
155
-
156
- /**
157
- * useSecurityPolicyState hook typescript tests
158
- */
159
- {
160
- const {
161
- lockoutPolicy
162
- } = (0, _index.useSecurityPolicyState)();
163
- const captchaPolicy = (0, _index.useSecurityPolicyState)(state => state.captchaPolicy);
164
- captchaPolicy.loading.valueOf();
165
- const {
166
- loadPublicSecurityPolicy
167
- } = (0, _index.useSecurityPolicyActions)();
168
- }
169
-
170
- /**
171
- * useSessionsState hook typescript tests
172
- */
173
- {
174
- const {
175
- sessions
176
- } = (0, _index.useSessionsState)();
177
- const loadingDirect = (0, _index.useSessionsState)(state => state.loading);
178
- loadingDirect.valueOf();
179
- const {
180
- deleteUserSession
181
- } = (0, _index.useSessionsActions)();
182
- }
183
-
184
- /**
185
- * useSessionsPolicyState hook typescript tests
186
- */
187
- {
188
- const {
189
- configurations
190
- } = (0, _index.useSessionsPolicyState)();
191
- const loadingDirect = (0, _index.useSessionsPolicyState)(state => state.loading);
192
- loadingDirect.valueOf();
193
- const {
194
- resetSessionsPolicyState
195
- } = (0, _index.useSessionsPolicyActions)();
196
- }
197
-
198
- /**
199
- * useSSOState hook typescript tests
200
- */
201
- {
202
- const {
203
- authorizationRoles
204
- } = (0, _index.useSSOState)();
205
- const loadingDirect = (0, _index.useSSOState)(state => state.loading);
206
- loadingDirect.valueOf();
207
- const {
208
- loadSSOConfigurationsV2
209
- } = (0, _index.useSSOActions)();
210
- }
211
-
212
- /**
213
- * useSignUpState hook typescript tests
214
- */
215
- {
216
- const {
217
- stage
218
- } = (0, _index.useSignUpState)();
219
- const loadingDirect = (0, _index.useSignUpState)(state => state.loading);
220
- loadingDirect.valueOf();
221
- const {
222
- setSignUpState
223
- } = (0, _index.useSignUpActions)();
224
- }
225
-
226
- /**
227
- * useSocialLoginState hook typescript tests
228
- */
229
- {
230
- const {
231
- socialLoginsConfig
232
- } = (0, _index.useSocialLoginState)();
233
- const loadingDirect = (0, _index.useSocialLoginState)(state => state.loading);
234
- loadingDirect.valueOf();
235
- const {
236
- loadSocialLoginsConfiguration
237
- } = (0, _index.useSocialLoginActions)();
238
- }
239
-
240
- /**
241
- * useSocialLoginState hook typescript tests
242
- */
243
- {
244
- const {
245
- tenants
246
- } = (0, _index.useTenantsState)();
247
- const loadingDirect = (0, _index.useTenantsState)(state => state.loading);
248
- loadingDirect.valueOf();
249
- const {
250
- loadTenants
251
- } = (0, _index.useTenantsActions)();
252
- }
253
-
254
- /**
255
- * useVendorState hook typescript tests
256
- */
257
- {
258
- const {
259
- loading
260
- } = (0, _index.useVendorState)();
261
- const isLoadingDirect = (0, _index.useVendorState)(state => state.loading);
262
- isLoadingDirect.valueOf();
263
- const {
264
- whiteLabelMode
265
- } = (0, _index.useVendorState)(state => ({
266
- whiteLabelMode: state.whiteLabelMode
267
- }));
268
- const {
269
- loadVendorPublicInfo
270
- } = (0, _index.useVendorActions)();
271
- }
272
-
273
- /**
274
- * useConnectivityState hook typescript tests
275
- */
276
- {
277
- const {
278
- isLoading,
279
- error
280
- } = (0, _index.useConnectivityState)();
281
- const processIds = (0, _index.useConnectivityState)(state => state.processIds);
282
- processIds.map(id => id);
283
- const {
284
- email
285
- } = (0, _index.useConnectivityState)(state => {
286
- var _state$email;
287
- return {
288
- email: (_state$email = state.email) != null ? _state$email : []
289
- };
290
- });
291
- email.length;
292
- const {
293
- loadScope,
294
- loadDataAction
295
- } = (0, _index.useConnectivityActions)();
296
- }
297
-
298
- /**
299
- * useAuditsState hook typescript tests
300
- */
301
- {
302
- const {
303
- auditLogsState
304
- } = (0, _index.useAuditsState)();
305
- const {
306
- columns
307
- } = (0, _index.useAuditsState)(state => state.auditsMetadataState);
308
- const {
309
- loading
310
- } = (0, _index.useAuditsState)(state => ({
311
- loading: state.auditLogsState.loading
312
- }));
313
- loading.valueOf();
314
- let x = columns == null ? void 0 : columns.length;
315
- const {
316
- loadAuditLogs
317
- } = (0, _index.useAuditsActions)();
318
- }