@frontegg/redux-store 5.29.0 → 5.31.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/auth/index.js +1 -1
- package/node/auth/index.js +1 -1
- package/node/subscriptions/index.js +152 -133
- package/package.json +1 -1
- package/subscriptions/Billing/Information/saga.d.ts +19 -0
- package/subscriptions/Billing/Subscription/index.d.ts +4 -0
- package/subscriptions/Billing/Subscription/interfaces.d.ts +16 -0
- package/subscriptions/Billing/Subscription/saga.d.ts +2 -0
- package/subscriptions/Billing/index.d.ts +3 -0
- package/subscriptions/Billing/interfaces.d.ts +3 -0
- package/subscriptions/Stripe/index.d.ts +0 -1
- package/subscriptions/general.interfaces.d.ts +4 -5
- package/subscriptions/index.d.ts +3 -1
- package/subscriptions/index.js +153 -134
- package/subscriptions/reducer.d.ts +3 -1
|
@@ -1,2 +1,21 @@
|
|
|
1
|
+
import { IPlanResponse, ISubscriptionResponse, ISubscriptionSummariesResponse } from '@frontegg/rest-api';
|
|
2
|
+
import { BillingInformationState } from './interfaces';
|
|
1
3
|
export declare function subscriptionBillingInformationSagas(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
4
|
+
export declare function loadSummaries(tenantId: string): Generator<import("redux-saga/effects").PutEffect<{
|
|
5
|
+
payload: string | null;
|
|
6
|
+
type: string;
|
|
7
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
8
|
+
payload: boolean;
|
|
9
|
+
type: string;
|
|
10
|
+
}> | import("redux-saga/effects").CallEffect<ISubscriptionSummariesResponse> | import("redux-saga/effects").CallEffect<IPlanResponse[]> | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<ISubscriptionResponse> | import("redux-saga/effects").CallEffect<IPlanResponse[]>> | import("redux-saga/effects").PutEffect<{
|
|
11
|
+
payload: Partial<BillingInformationState>;
|
|
12
|
+
type: string;
|
|
13
|
+
}>, void, ISubscriptionSummariesResponse & [ISubscriptionResponse | null, IPlanResponse] & IPlanResponse>;
|
|
14
|
+
export declare function loadSummariesMock(): Generator<import("redux-saga/effects").PutEffect<{
|
|
15
|
+
payload: boolean;
|
|
16
|
+
type: string;
|
|
17
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
18
|
+
payload: Partial<BillingInformationState>;
|
|
19
|
+
type: string;
|
|
20
|
+
}> | import("redux-saga/effects").CallEffect<true>, void, unknown>;
|
|
2
21
|
export declare function subscriptionBillingInformationSagasMock(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PaymentProvider, Subscription } from '../../general.interfaces';
|
|
2
|
+
export interface SubscriptionState {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: string | null;
|
|
5
|
+
fetching: boolean;
|
|
6
|
+
subscription?: Subscription & {
|
|
7
|
+
paymentProvider: PaymentProvider;
|
|
8
|
+
plan: {
|
|
9
|
+
slug: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface SubscriptionActions {
|
|
15
|
+
load: () => void;
|
|
16
|
+
}
|
|
@@ -42,5 +42,8 @@ export declare const billingActions: {
|
|
|
42
42
|
id: string;
|
|
43
43
|
}, boolean>, string, never, never>;
|
|
44
44
|
};
|
|
45
|
+
subscription: {
|
|
46
|
+
load: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
47
|
+
};
|
|
45
48
|
};
|
|
46
49
|
export declare const billingReducer: import("redux").Reducer<import("redux").CombinedState<BillingState>, AnyAction>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BillingInformationActions, BillingInformationState } from './Information/interfaces';
|
|
2
2
|
import { PaymentMethodActions, PaymentMethodState } from './PaymentMethod/interfaces';
|
|
3
3
|
import { InvoicesActions, InvoicesState } from './Invoices/interfaces';
|
|
4
|
+
import { SubscriptionActions } from './Subscription/interfaces';
|
|
4
5
|
export interface BillingState {
|
|
5
6
|
information: BillingInformationState;
|
|
6
7
|
paymentMethod: PaymentMethodState;
|
|
@@ -10,7 +11,9 @@ export declare type BillingActions = {
|
|
|
10
11
|
information: BillingInformationActions;
|
|
11
12
|
paymentMethod: PaymentMethodActions;
|
|
12
13
|
invoices: InvoicesActions;
|
|
14
|
+
subscription: SubscriptionActions;
|
|
13
15
|
};
|
|
14
16
|
export * from './Information/interfaces';
|
|
15
17
|
export * from './PaymentMethod/interfaces';
|
|
16
18
|
export * from './Invoices/interfaces';
|
|
19
|
+
export * from './Subscription/interfaces';
|
|
@@ -2,7 +2,6 @@ import { StripeState } from './interfaces';
|
|
|
2
2
|
export declare const initialSubscriptionStripeState: StripeState;
|
|
3
3
|
declare const reducer: import("redux").Reducer<StripeState, import("redux").AnyAction>;
|
|
4
4
|
declare const actions: {
|
|
5
|
-
setStripeState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<StripeState>], Partial<StripeState>, string, never, never>;
|
|
6
5
|
setLoading: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[boolean], boolean, string, never, never>;
|
|
7
6
|
setError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string | null], string | null, string, never, never>;
|
|
8
7
|
setState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<StripeState>], Partial<StripeState>, string, never, never>;
|
|
@@ -19,13 +19,12 @@ export declare enum SubscriptionStatus {
|
|
|
19
19
|
export interface Subscription {
|
|
20
20
|
id: string;
|
|
21
21
|
externalId: string;
|
|
22
|
-
startDate:
|
|
23
|
-
currentPeriodStart:
|
|
24
|
-
currentPeriodEnd:
|
|
22
|
+
startDate: string;
|
|
23
|
+
currentPeriodStart: string;
|
|
24
|
+
currentPeriodEnd: string;
|
|
25
25
|
status: SubscriptionStatus;
|
|
26
26
|
cancellation: SubscriptionCancellation | null;
|
|
27
|
-
|
|
28
|
-
trialEnd: Date | null;
|
|
27
|
+
trialEnd: string | null;
|
|
29
28
|
}
|
|
30
29
|
export interface SubscriptionItem {
|
|
31
30
|
id: string;
|
package/subscriptions/index.d.ts
CHANGED
|
@@ -62,6 +62,9 @@ declare const _default: {
|
|
|
62
62
|
id: string;
|
|
63
63
|
}, boolean>, string, never, never>;
|
|
64
64
|
};
|
|
65
|
+
subscription: {
|
|
66
|
+
load: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
67
|
+
};
|
|
65
68
|
};
|
|
66
69
|
plans: {
|
|
67
70
|
setLoading: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[boolean], boolean, string, never, never>;
|
|
@@ -84,7 +87,6 @@ declare const _default: {
|
|
|
84
87
|
checkoutEvent: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("./interfaces").CheckoutEvent], import("./interfaces").CheckoutEvent, string, never, never>;
|
|
85
88
|
};
|
|
86
89
|
stripe: {
|
|
87
|
-
setStripeState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./interfaces").StripeState>], Partial<import("./interfaces").StripeState>, string, never, never>;
|
|
88
90
|
setLoading: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[boolean], boolean, string, never, never>;
|
|
89
91
|
setError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string | null], string | null, string, never, never>;
|
|
90
92
|
setState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./interfaces").StripeState>], Partial<import("./interfaces").StripeState>, string, never, never>;
|