@frontegg/redux-store 6.3.0 → 6.5.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/backward-compatibility/reducer.d.ts +1 -1
- package/audits/backward-compatibility/saga.js +4 -1
- package/audits/index.d.ts +1 -1
- package/audits/reducer.d.ts +1 -1
- package/auth/ApiTokensState/index.d.ts +14 -2
- package/auth/ApiTokensState/index.js +6 -0
- package/auth/ApiTokensState/saga.js +128 -2
- package/auth/LoginState/saga.js +9 -5
- package/auth/MfaState/saga.js +1 -1
- package/auth/SSOState/saga.js +1 -1
- package/auth/SecurityPolicyState/saga.d.ts +3 -2
- package/auth/SocialLogins/saga.d.ts +2 -2
- package/auth/index.d.ts +11 -1
- package/auth/reducer.d.ts +11 -1
- package/connectivity/index.d.ts +1 -1
- package/connectivity/reducer.d.ts +1 -1
- package/connectivity/saga.js +31 -10
- package/index.js +1 -1
- package/node/audits/backward-compatibility/saga.js +4 -1
- package/node/auth/ApiTokensState/index.js +6 -0
- package/node/auth/ApiTokensState/saga.js +128 -2
- package/node/auth/LoginState/saga.js +9 -5
- package/node/auth/MfaState/saga.js +1 -1
- package/node/auth/SSOState/saga.js +1 -1
- package/node/connectivity/saga.js +31 -10
- package/node/index.js +1 -1
- package/node/subscriptions/Billing/Information/saga.js +1 -1
- package/node/subscriptions/Billing/Subscription/saga.js +1 -2
- package/node/subscriptions/Checkout/saga.js +1 -3
- package/node/vendor/reducer.js +1 -1
- package/node/vendor/saga.js +9 -1
- package/package.json +5 -5
- package/subscriptions/Billing/Information/index.d.ts +1 -1
- package/subscriptions/Billing/Information/saga.d.ts +8 -26
- package/subscriptions/Billing/Information/saga.js +1 -1
- package/subscriptions/Billing/Invoices/index.d.ts +1 -1
- package/subscriptions/Billing/PaymentMethod/index.d.ts +1 -1
- package/subscriptions/Billing/Subscription/index.d.ts +1 -1
- package/subscriptions/Billing/Subscription/saga.d.ts +1 -11
- package/subscriptions/Billing/Subscription/saga.js +1 -2
- package/subscriptions/Billing/index.d.ts +1 -1
- package/subscriptions/Checkout/index.d.ts +1 -1
- package/subscriptions/Checkout/saga.js +1 -2
- package/subscriptions/Config/index.d.ts +1 -1
- package/subscriptions/Plans/index.d.ts +1 -1
- package/subscriptions/Stripe/index.d.ts +1 -1
- package/subscriptions/VendorPublicConfig/index.d.ts +1 -1
- package/subscriptions/index.d.ts +3 -3
- package/subscriptions/reducer.d.ts +3 -3
- package/toolkit/redux.d.ts +1 -1
- package/vendor/VendorState/index.d.ts +2 -1
- package/vendor/index.d.ts +1 -1
- package/vendor/interfaces.d.ts +2 -1
- package/vendor/reducer.d.ts +1 -1
- package/vendor/reducer.js +1 -1
- package/vendor/saga.d.ts +2 -2
- package/vendor/saga.js +9 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StripeState } from './interfaces';
|
|
2
2
|
export declare const initialSubscriptionStripeState: StripeState;
|
|
3
|
-
declare const reducer: import("
|
|
3
|
+
declare const reducer: import("redux").Reducer<StripeState, import("redux").AnyAction>;
|
|
4
4
|
declare const actions: {
|
|
5
5
|
setLoading: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[boolean], boolean, string, never, never>;
|
|
6
6
|
setError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string | null], string | null, string, never, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VendorPublicConfigurationState } from './interfaces';
|
|
2
2
|
export declare const vendorPublicConfigInitialState: VendorPublicConfigurationState;
|
|
3
|
-
declare const reducer: import("
|
|
3
|
+
declare const reducer: import("redux").Reducer<VendorPublicConfigurationState, import("redux").AnyAction>;
|
|
4
4
|
declare const actions: {
|
|
5
5
|
setLoading: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[boolean], boolean, string, never, never>;
|
|
6
6
|
setError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string | null], string | null, string, never, never>;
|
package/subscriptions/index.d.ts
CHANGED
|
@@ -6,14 +6,14 @@ export { sagas as subscriptionSagas, mockSagas as subscriptionSagasMock, reducer
|
|
|
6
6
|
declare const _default: {
|
|
7
7
|
sagas: typeof sagas;
|
|
8
8
|
mockSagas: typeof mockSagas;
|
|
9
|
-
reducer: import("
|
|
9
|
+
reducer: import("redux").Reducer<import("redux").CombinedState<{
|
|
10
10
|
config: import("./interfaces").PaymentProviderConfigState;
|
|
11
|
-
billing: import("
|
|
11
|
+
billing: import("redux").CombinedState<import("./interfaces").BillingState>;
|
|
12
12
|
plans: import("./interfaces").PlansState;
|
|
13
13
|
checkout: import("./interfaces").CheckoutState;
|
|
14
14
|
stripe: import("./interfaces").StripeState;
|
|
15
15
|
vendorPublicConfig: import("./interfaces").VendorPublicConfigurationState;
|
|
16
|
-
}>, import("
|
|
16
|
+
}>, import("redux").AnyAction>;
|
|
17
17
|
actions: {
|
|
18
18
|
config: {
|
|
19
19
|
setLoading: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[boolean], boolean, string, never, never>;
|
|
@@ -88,12 +88,12 @@ declare const actions: {
|
|
|
88
88
|
loadVendorPublicConfiguration: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
-
declare const reducer: import("
|
|
91
|
+
declare const reducer: import("redux").Reducer<import("redux").CombinedState<{
|
|
92
92
|
config: import("./interfaces").PaymentProviderConfigState;
|
|
93
|
-
billing: import("
|
|
93
|
+
billing: import("redux").CombinedState<import("./interfaces").BillingState>;
|
|
94
94
|
plans: import("./interfaces").PlansState;
|
|
95
95
|
checkout: import("./interfaces").CheckoutState;
|
|
96
96
|
stripe: import("./interfaces").StripeState;
|
|
97
97
|
vendorPublicConfig: import("./interfaces").VendorPublicConfigurationState;
|
|
98
|
-
}>, import("
|
|
98
|
+
}>, import("redux").AnyAction>;
|
|
99
99
|
export { subscriptionsStoreName as name, reducer, actions };
|
package/toolkit/redux.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Middleware } from 'redux';
|
|
1
|
+
export type { Middleware, Action, AnyAction } from 'redux';
|
|
2
2
|
export { getDefaultMiddleware, combineReducers, configureStore, bindActionCreators, createSelector, createSlice } from '@reduxjs/toolkit';
|
|
3
3
|
export type { PayloadAction, Reducer, Dispatch, } from '@reduxjs/toolkit';
|
|
4
4
|
export type { EnhancedStore, } from './redux-types';
|
|
@@ -2,7 +2,8 @@ import { VendorState } from '../interfaces';
|
|
|
2
2
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
3
3
|
declare const reducers: {
|
|
4
4
|
setVendorState: (state: VendorState, { payload }: PayloadAction<Partial<VendorState>>) => {
|
|
5
|
-
whiteLabelMode
|
|
5
|
+
whiteLabelMode?: boolean | undefined;
|
|
6
|
+
loading: boolean;
|
|
6
7
|
};
|
|
7
8
|
};
|
|
8
9
|
declare const actions: {
|
package/vendor/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare const _default: {
|
|
|
8
8
|
sagas: typeof sagas;
|
|
9
9
|
storeName: string;
|
|
10
10
|
initialState: import("./interfaces").VendorState;
|
|
11
|
-
reducer: import("
|
|
11
|
+
reducer: import("redux").Reducer<import("./interfaces").VendorState, import("redux").AnyAction>;
|
|
12
12
|
actions: {
|
|
13
13
|
loadVendorPublicInfo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
14
14
|
setVendorState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<import("./interfaces").VendorState>, string>;
|
package/vendor/interfaces.d.ts
CHANGED
package/vendor/reducer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VendorState } from './interfaces';
|
|
2
2
|
export declare const initialState: VendorState;
|
|
3
|
-
declare const reducer: import("
|
|
3
|
+
declare const reducer: import("redux").Reducer<VendorState, import("redux").AnyAction>;
|
|
4
4
|
declare const actions: {
|
|
5
5
|
loadVendorPublicInfo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
6
6
|
setVendorState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<VendorState>, string>;
|
package/vendor/reducer.js
CHANGED
package/vendor/saga.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare function loadVendorPublicInfo(): Generator<
|
|
1
|
+
export declare function loadVendorPublicInfo(): Generator<import("redux-saga/effects").PutEffect<{
|
|
2
2
|
payload: Partial<import("./interfaces").VendorState>;
|
|
3
3
|
type: string;
|
|
4
|
-
}>, void, {
|
|
4
|
+
}> | Promise<import("@frontegg/rest-api").IVendorPublicInfoResponse>, void, {
|
|
5
5
|
whiteLabelMode?: false | undefined;
|
|
6
6
|
}>;
|
|
7
7
|
export declare function vendorSagasMock(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
package/vendor/saga.js
CHANGED
|
@@ -3,14 +3,22 @@ import { api } from '@frontegg/rest-api';
|
|
|
3
3
|
import { actions } from './reducer';
|
|
4
4
|
import { delay } from '../auth/utils';
|
|
5
5
|
export function* loadVendorPublicInfo() {
|
|
6
|
+
yield put(actions.setVendorState({
|
|
7
|
+
loading: true
|
|
8
|
+
}));
|
|
9
|
+
|
|
6
10
|
try {
|
|
7
11
|
const {
|
|
8
12
|
whiteLabelMode = false
|
|
9
13
|
} = yield api.vendor.getVendorPublicInfo();
|
|
10
14
|
yield put(actions.setVendorState({
|
|
11
|
-
whiteLabelMode
|
|
15
|
+
whiteLabelMode,
|
|
16
|
+
loading: false
|
|
12
17
|
}));
|
|
13
18
|
} catch (e) {
|
|
19
|
+
yield put(actions.setVendorState({
|
|
20
|
+
loading: false
|
|
21
|
+
}));
|
|
14
22
|
console.error('failed to getVendorPublicInfo - ', e);
|
|
15
23
|
}
|
|
16
24
|
}
|