@frontegg/redux-store 5.21.0 → 5.24.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/AcceptInvitationState/index.d.ts +2 -0
- package/auth/AccountSettingsState/index.d.ts +10 -0
- package/auth/ActivateState/index.d.ts +3 -0
- package/auth/ApiTokensState/index.d.ts +2 -0
- package/auth/ForgotPasswordState/index.d.ts +2 -0
- package/auth/LoginState/index.d.ts +2 -0
- package/auth/LoginState/interfaces.d.ts +2 -0
- package/auth/LoginState/saga.d.ts +2 -0
- package/auth/MfaState/index.d.ts +6 -6
- package/auth/ProfileState/index.d.ts +2 -0
- package/auth/ResetPhoneNumberState/index.d.ts +96 -0
- package/auth/ResetPhoneNumberState/interfaces.d.ts +18 -0
- package/auth/ResetPhoneNumberState/saga.d.ts +17 -0
- package/auth/RolesState/index.d.ts +2 -0
- package/auth/SSOState/index.d.ts +2 -0
- package/auth/SecurityPolicyState/index.d.ts +9 -0
- package/auth/SignUp/index.d.ts +2 -0
- package/auth/SocialLogins/index.d.ts +2 -8
- package/auth/TeamState/index.d.ts +2 -0
- package/auth/TenantsState/index.d.ts +2 -8
- package/auth/index.d.ts +13 -0
- package/auth/index.js +105 -15
- package/auth/interfaces.d.ts +15 -1
- package/auth/reducer.d.ts +13 -1
- package/auth/utils.d.ts +4 -0
- package/index.js +2 -2
- package/node/auth/index.js +115 -22
- package/node/index.js +15 -0
- package/node/subscriptions/index.js +187 -151
- package/package.json +2 -2
- package/subscriptions/ManagedSubscriptions/index.d.ts +10 -0
- package/subscriptions/ManagedSubscriptions/interfaces.d.ts +28 -0
- package/subscriptions/ManagedSubscriptions/saga.d.ts +1 -0
- package/subscriptions/index.d.ts +7 -0
- package/subscriptions/index.js +188 -152
- package/subscriptions/interfaces.d.ts +4 -0
- package/subscriptions/reducer.d.ts +7 -0
- package/toolkit/index.d.ts +1 -1
package/subscriptions/index.js
CHANGED
|
@@ -39,12 +39,12 @@ const plansInitialState = {
|
|
|
39
39
|
fetching: true,
|
|
40
40
|
plans: [],
|
|
41
41
|
};
|
|
42
|
-
const { actions: sliceActions$
|
|
42
|
+
const { actions: sliceActions$2, reducer: reducer$8, name: name$7 } = createSlice({
|
|
43
43
|
name: `${subscriptionsStoreName}/plans`,
|
|
44
44
|
initialState: plansInitialState,
|
|
45
45
|
reducers: Object.assign({}, createModuleCaseReducers()),
|
|
46
46
|
});
|
|
47
|
-
const actions$
|
|
47
|
+
const actions$8 = Object.assign({ loadPlans: createAction(`${name$7}/loadPlans`) }, sliceActions$2);
|
|
48
48
|
|
|
49
49
|
const configInitialState = {
|
|
50
50
|
loading: false,
|
|
@@ -52,13 +52,13 @@ const configInitialState = {
|
|
|
52
52
|
fetching: true,
|
|
53
53
|
config: null,
|
|
54
54
|
};
|
|
55
|
-
const reducers$
|
|
56
|
-
const { actions: configActions, reducer: reducer$
|
|
55
|
+
const reducers$6 = Object.assign({}, createModuleCaseReducers());
|
|
56
|
+
const { actions: configActions, reducer: reducer$7, name: name$6, } = createSlice({
|
|
57
57
|
name: `${subscriptionsStoreName}/config`,
|
|
58
58
|
initialState: configInitialState,
|
|
59
|
-
reducers: reducers$
|
|
59
|
+
reducers: reducers$6,
|
|
60
60
|
});
|
|
61
|
-
const actions$
|
|
61
|
+
const actions$7 = Object.assign({ loadPaymentConfiguration: createAction(`${name$6}/loadPaymentConfiguration`) }, configActions);
|
|
62
62
|
|
|
63
63
|
const initialBillingInformationState = {
|
|
64
64
|
loading: false,
|
|
@@ -75,32 +75,32 @@ const initialBillingInformationState = {
|
|
|
75
75
|
error: null,
|
|
76
76
|
},
|
|
77
77
|
};
|
|
78
|
-
const reducers$
|
|
78
|
+
const reducers$5 = Object.assign(Object.assign({}, createModuleCaseReducers()), { setBillingInformation: {
|
|
79
79
|
prepare: (payload) => ({ payload }),
|
|
80
80
|
reducer: (state, action) => (Object.assign(Object.assign({}, state), action.payload)),
|
|
81
81
|
}, setCancellationLoading: createKeyCaseLoadingReducer('cancellation'), setCancellationError: createKeyCaseErrorReducer('cancellation'), setRenewalLoading: createKeyCaseLoadingReducer('renewal'), setRenewalError: createKeyCaseErrorReducer('renewal') });
|
|
82
|
-
const { reducer: reducer$
|
|
82
|
+
const { reducer: reducer$6, actions: overviewActions, name: name$5, } = createSlice({
|
|
83
83
|
name: `${subscriptionsStoreName}/billing/information`,
|
|
84
84
|
initialState: initialBillingInformationState,
|
|
85
|
-
reducers: reducers$
|
|
85
|
+
reducers: reducers$5,
|
|
86
86
|
});
|
|
87
|
-
const actions$
|
|
87
|
+
const actions$6 = Object.assign({ loadBillingInformation: createAction(`${name$5}/loadBillingInformation`), cancelSubscription: createAction(`${name$5}/cancelSubscription`), renewSubscription: createAction(`${name$5}/renewSubscription`) }, overviewActions);
|
|
88
88
|
|
|
89
89
|
const initialPaymentMethodState = {
|
|
90
90
|
loading: false,
|
|
91
91
|
error: null,
|
|
92
92
|
fetching: true,
|
|
93
93
|
};
|
|
94
|
-
const reducers$
|
|
94
|
+
const reducers$4 = Object.assign(Object.assign({}, createModuleCaseReducers()), { setState: {
|
|
95
95
|
prepare: (payload) => ({ payload }),
|
|
96
96
|
reducer: (state, action) => (Object.assign(Object.assign({}, state), action.payload)),
|
|
97
97
|
} });
|
|
98
|
-
const { reducer: reducer$
|
|
98
|
+
const { reducer: reducer$5, actions: paymentActions, name: name$4, } = createSlice({
|
|
99
99
|
name: `${subscriptionsStoreName}/billing/payment`,
|
|
100
100
|
initialState: initialPaymentMethodState,
|
|
101
|
-
reducers: reducers$
|
|
101
|
+
reducers: reducers$4,
|
|
102
102
|
});
|
|
103
|
-
const actions$
|
|
103
|
+
const actions$5 = Object.assign({ loadPaymentMethod: createAction(`${name$4}/loadPaymentMethod`), submitPaymentMethod: createAction(`${name$4}/submitPaymentMethod`), submitPaymentMethodError: createAction(`${name$4}/submitPaymentMethodError`), submitPaymentMethodSuccess: createAction(`${name$4}/submitPaymentMethodSuccess`), updatePaymentMethodBillingDetails: createAction(`${name$4}/updateBillingDetails`, (payload) => ({ payload })) }, paymentActions);
|
|
104
104
|
|
|
105
105
|
const initialInvoicesState = {
|
|
106
106
|
loading: false,
|
|
@@ -112,16 +112,16 @@ const initialInvoicesState = {
|
|
|
112
112
|
error: null
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
const reducers$
|
|
115
|
+
const reducers$3 = Object.assign(Object.assign({}, createModuleCaseReducers()), { setInvoiceDownloadState: {
|
|
116
116
|
prepare: (payload) => ({ payload }),
|
|
117
117
|
reducer: (state, action) => (Object.assign(Object.assign({}, state), { invoiceDownload: Object.assign(Object.assign({}, state.invoiceDownload), action.payload) })),
|
|
118
118
|
} });
|
|
119
|
-
const { reducer: reducer$
|
|
119
|
+
const { reducer: reducer$4, actions: sliceActions$1, name: name$3, } = createSlice({
|
|
120
120
|
name: `${subscriptionsStoreName}/billing/invoices`,
|
|
121
121
|
initialState: initialInvoicesState,
|
|
122
|
-
reducers: reducers$
|
|
122
|
+
reducers: reducers$3,
|
|
123
123
|
});
|
|
124
|
-
const actions$
|
|
124
|
+
const actions$4 = Object.assign({ loadInvoices: createAction(`${name$3}/loadInvoices`), downloadInvoice: createAction(`${name$3}/downloadInvoice`, (payload) => ({ payload })) }, sliceActions$1);
|
|
125
125
|
|
|
126
126
|
const billingInitialState = {
|
|
127
127
|
information: initialBillingInformationState,
|
|
@@ -129,14 +129,14 @@ const billingInitialState = {
|
|
|
129
129
|
paymentMethod: initialPaymentMethodState,
|
|
130
130
|
};
|
|
131
131
|
const billingActions = {
|
|
132
|
-
invoices: actions$
|
|
133
|
-
information: actions$
|
|
134
|
-
paymentMethod: actions$
|
|
132
|
+
invoices: actions$4,
|
|
133
|
+
information: actions$6,
|
|
134
|
+
paymentMethod: actions$5,
|
|
135
135
|
};
|
|
136
136
|
const billingReducer = combineReducers({
|
|
137
|
-
invoices: reducer$
|
|
138
|
-
information: reducer$
|
|
139
|
-
paymentMethod: reducer$
|
|
137
|
+
invoices: reducer$4,
|
|
138
|
+
information: reducer$6,
|
|
139
|
+
paymentMethod: reducer$5,
|
|
140
140
|
});
|
|
141
141
|
|
|
142
142
|
var CheckoutStatus;
|
|
@@ -162,35 +162,49 @@ const checkoutInitialState = {
|
|
|
162
162
|
status: CheckoutStatus.SELECTION,
|
|
163
163
|
checkoutPlanId: null,
|
|
164
164
|
};
|
|
165
|
-
const reducers$
|
|
165
|
+
const reducers$2 = Object.assign(Object.assign({}, createModuleCaseReducers()), { setStatus: {
|
|
166
166
|
prepare: (payload) => ({ payload }),
|
|
167
167
|
reducer: (state, action) => (Object.assign(Object.assign({}, state), { status: action.payload })),
|
|
168
168
|
}, selectPlan: {
|
|
169
169
|
prepare: (payload) => ({ payload }),
|
|
170
170
|
reducer: (state, action) => (Object.assign(Object.assign({}, state), { checkoutPlanId: action.payload })),
|
|
171
171
|
} });
|
|
172
|
-
const { actions: checkoutActions, reducer: reducer$
|
|
172
|
+
const { actions: checkoutActions, reducer: reducer$3, name: name$2 } = createSlice({
|
|
173
173
|
name: `${subscriptionsStoreName}/checkout`,
|
|
174
174
|
initialState: checkoutInitialState,
|
|
175
|
-
reducers: reducers$
|
|
175
|
+
reducers: reducers$2,
|
|
176
176
|
});
|
|
177
|
-
const actions$
|
|
177
|
+
const actions$3 = Object.assign({ checkoutPlan: createAction(`${name$2}/checkoutPlan`, (payload) => ({ payload })), resetCheckout: createAction(`${name$2}/resetCheckout`), confirmCheckout: createAction(`${name$2}/confirmCheckout`, (payload) => ({ payload, })), cancelCheckout: createAction(`${name$2}/cancelCheckout`), submitCheckout: createAction(`${name$2}/submitCheckout`), errorCheckout: createAction(`${name$2}/errorCheckout`, (payload) => ({ payload, })), checkoutEvent: createAction(`${name$2}/checkoutEvent`, (payload) => ({ payload, })) }, checkoutActions);
|
|
178
178
|
|
|
179
179
|
const initialSubscriptionStripeState = {
|
|
180
180
|
loading: false,
|
|
181
181
|
error: null,
|
|
182
182
|
cardSetupIntentSecret: null,
|
|
183
183
|
};
|
|
184
|
-
const reducers = Object.assign(Object.assign({}, createModuleCaseReducers()), { setStripeState: {
|
|
184
|
+
const reducers$1 = Object.assign(Object.assign({}, createModuleCaseReducers()), { setStripeState: {
|
|
185
185
|
prepare: (payload) => ({ payload }),
|
|
186
186
|
reducer: (state, action) => (Object.assign(Object.assign({}, state), action.payload)),
|
|
187
187
|
} });
|
|
188
|
-
const { reducer: reducer$
|
|
188
|
+
const { reducer: reducer$2, actions: reducerActions, name: name$1, } = createSlice({
|
|
189
189
|
name: `${subscriptionsStoreName}/stripe`,
|
|
190
190
|
initialState: initialSubscriptionStripeState,
|
|
191
|
+
reducers: reducers$1,
|
|
192
|
+
});
|
|
193
|
+
const actions$2 = Object.assign({ loadCustomer: createAction(`${name$1}/loadCustomer`), createCardSetupIntentSecret: createAction(`${name$1}/createCardSetupIntentSecret`) }, reducerActions);
|
|
194
|
+
|
|
195
|
+
const managedSubscriptionsInitialState = {
|
|
196
|
+
loading: false,
|
|
197
|
+
error: null,
|
|
198
|
+
fetching: true,
|
|
199
|
+
managedSubscriptions: [],
|
|
200
|
+
};
|
|
201
|
+
const reducers = Object.assign({}, createModuleCaseReducers());
|
|
202
|
+
const { reducer: reducer$1, actions: sliceActions, name } = createSlice({
|
|
203
|
+
name: `${subscriptionsStoreName}/managedSubscriptions`,
|
|
204
|
+
initialState: managedSubscriptionsInitialState,
|
|
191
205
|
reducers,
|
|
192
206
|
});
|
|
193
|
-
const actions$1 = Object.assign({
|
|
207
|
+
const actions$1 = Object.assign({ loadManagedSubscriptions: createAction(`${name}/loadManagedSubscriptions`) }, sliceActions);
|
|
194
208
|
|
|
195
209
|
const initialState = {
|
|
196
210
|
config: configInitialState,
|
|
@@ -198,20 +212,23 @@ const initialState = {
|
|
|
198
212
|
checkout: checkoutInitialState,
|
|
199
213
|
billing: billingInitialState,
|
|
200
214
|
stripe: initialSubscriptionStripeState,
|
|
215
|
+
managedSubscriptions: managedSubscriptionsInitialState,
|
|
201
216
|
};
|
|
202
217
|
const actions = {
|
|
203
|
-
config: actions$
|
|
218
|
+
config: actions$7,
|
|
204
219
|
billing: billingActions,
|
|
205
|
-
plans: actions$
|
|
206
|
-
checkout: actions$
|
|
207
|
-
stripe: actions$
|
|
220
|
+
plans: actions$8,
|
|
221
|
+
checkout: actions$3,
|
|
222
|
+
stripe: actions$2,
|
|
223
|
+
managedSubscriptions: actions$1,
|
|
208
224
|
};
|
|
209
225
|
const reducer = combineReducers({
|
|
210
|
-
config: reducer$
|
|
226
|
+
config: reducer$7,
|
|
211
227
|
billing: billingReducer,
|
|
212
|
-
plans: reducer$
|
|
213
|
-
checkout: reducer$
|
|
214
|
-
stripe: reducer$
|
|
228
|
+
plans: reducer$8,
|
|
229
|
+
checkout: reducer$3,
|
|
230
|
+
stripe: reducer$2,
|
|
231
|
+
managedSubscriptions: reducer$1,
|
|
215
232
|
});
|
|
216
233
|
|
|
217
234
|
var PaymentProvider;
|
|
@@ -344,34 +361,34 @@ const paymentMethodsMock = [
|
|
|
344
361
|
];
|
|
345
362
|
|
|
346
363
|
function* subscriptionBillingInformationSagas() {
|
|
347
|
-
yield takeEvery(actions$
|
|
348
|
-
yield takeEvery(actions$
|
|
349
|
-
yield takeEvery(actions$
|
|
350
|
-
yield takeEvery(actions$
|
|
364
|
+
yield takeEvery(actions$6.loadBillingInformation, loadBillingInformation);
|
|
365
|
+
yield takeEvery(actions$6.cancelSubscription, cancelSubscription);
|
|
366
|
+
yield takeEvery(actions$6.renewSubscription, renewSubscription);
|
|
367
|
+
yield takeEvery(actions$3.checkoutEvent, checkoutEvent$2);
|
|
351
368
|
}
|
|
352
369
|
function* loadBillingInformation() {
|
|
353
370
|
const paymentProvider = yield select((state) => { var _a; return (_a = state.subscriptions.config.config) === null || _a === void 0 ? void 0 : _a.paymentProvider; });
|
|
354
371
|
const tenantId = yield select((state) => { var _a, _b, _c; return (_c = (_b = (_a = state.auth) === null || _a === void 0 ? void 0 : _a.profileState) === null || _b === void 0 ? void 0 : _b.profile) === null || _c === void 0 ? void 0 : _c.tenantId; });
|
|
355
|
-
yield put(actions$
|
|
372
|
+
yield put(actions$6.setLoading(true));
|
|
356
373
|
if (!paymentProvider || !tenantId) {
|
|
357
|
-
yield put(actions$
|
|
374
|
+
yield put(actions$6.setError(!paymentProvider ? 'Internal feature failure' : 'Not authorized'));
|
|
358
375
|
return;
|
|
359
376
|
}
|
|
360
377
|
try {
|
|
361
378
|
yield loadSummaries(tenantId);
|
|
362
379
|
}
|
|
363
380
|
catch (e) {
|
|
364
|
-
yield put(actions$
|
|
381
|
+
yield put(actions$6.setError(e.message));
|
|
365
382
|
}
|
|
366
383
|
}
|
|
367
384
|
function* loadSummaries(tenantId) {
|
|
368
385
|
var _a, _b;
|
|
369
|
-
yield put(actions$
|
|
386
|
+
yield put(actions$6.setLoading(true));
|
|
370
387
|
try {
|
|
371
388
|
const { currentPlanId, subscriptionId, externallyManaged, defaultPlanId } = yield call(api.subscriptions.getSubscriptionSummaries, tenantId);
|
|
372
389
|
const subscriptionResponse = yield call(api.subscriptions.getSubscription, subscriptionId);
|
|
373
390
|
const planResponse = yield call(api.subscriptions.getSubscriptionPlan, currentPlanId);
|
|
374
|
-
yield put(actions$
|
|
391
|
+
yield put(actions$6.setBillingInformation(Object.assign(Object.assign({ loading: false, fetching: false, externallyManaged,
|
|
375
392
|
defaultPlanId }, (subscriptionResponse
|
|
376
393
|
? {
|
|
377
394
|
subscription: {
|
|
@@ -402,7 +419,7 @@ function* loadSummaries(tenantId) {
|
|
|
402
419
|
: {}))));
|
|
403
420
|
}
|
|
404
421
|
catch (e) {
|
|
405
|
-
yield put(actions$
|
|
422
|
+
yield put(actions$6.setError(e.message));
|
|
406
423
|
}
|
|
407
424
|
}
|
|
408
425
|
function* cancelSubscription() {
|
|
@@ -411,24 +428,24 @@ function* cancelSubscription() {
|
|
|
411
428
|
return;
|
|
412
429
|
}
|
|
413
430
|
if (overview.externallyManaged) {
|
|
414
|
-
yield put(actions$
|
|
431
|
+
yield put(actions$6.setCancellationError('Billing is externally managed'));
|
|
415
432
|
return;
|
|
416
433
|
}
|
|
417
434
|
const { id: subscriptionId, cancellation, status } = overview.subscription || {};
|
|
418
435
|
const isCancellable = !cancellation && status === SubscriptionStatus.ACTIVE;
|
|
419
436
|
if (isCancellable) {
|
|
420
437
|
try {
|
|
421
|
-
yield put(actions$
|
|
438
|
+
yield put(actions$6.setCancellationLoading(true));
|
|
422
439
|
yield call(api.subscriptions.cancelSubscription, subscriptionId);
|
|
423
|
-
yield put(actions$
|
|
440
|
+
yield put(actions$6.setBillingInformation({
|
|
424
441
|
subscription: Object.assign(Object.assign({}, overview.subscription), { cancellation: {
|
|
425
442
|
policy: SubscriptionCancellationPolicy.AT_PERIOD_END,
|
|
426
443
|
} }),
|
|
427
444
|
}));
|
|
428
|
-
yield put(actions$
|
|
445
|
+
yield put(actions$6.setCancellationLoading(false));
|
|
429
446
|
}
|
|
430
447
|
catch (e) {
|
|
431
|
-
yield put(actions$
|
|
448
|
+
yield put(actions$6.setCancellationError(e.message));
|
|
432
449
|
}
|
|
433
450
|
}
|
|
434
451
|
}
|
|
@@ -438,22 +455,22 @@ function* renewSubscription() {
|
|
|
438
455
|
return;
|
|
439
456
|
}
|
|
440
457
|
if (overview.externallyManaged) {
|
|
441
|
-
yield put(actions$
|
|
458
|
+
yield put(actions$6.setCancellationError('Billing is externally managed'));
|
|
442
459
|
return;
|
|
443
460
|
}
|
|
444
461
|
const { id: subscriptionId, cancellation } = overview.subscription || {};
|
|
445
462
|
const renewable = (cancellation === null || cancellation === void 0 ? void 0 : cancellation.policy) === SubscriptionCancellationPolicy.AT_PERIOD_END;
|
|
446
463
|
if (renewable) {
|
|
447
464
|
try {
|
|
448
|
-
yield put(actions$
|
|
465
|
+
yield put(actions$6.setRenewalLoading(true));
|
|
449
466
|
yield call(api.subscriptions.renewSubscription, subscriptionId);
|
|
450
|
-
yield put(actions$
|
|
467
|
+
yield put(actions$6.setBillingInformation({
|
|
451
468
|
subscription: Object.assign(Object.assign({}, overview.subscription), { cancellation: null }),
|
|
452
469
|
}));
|
|
453
|
-
yield put(actions$
|
|
470
|
+
yield put(actions$6.setRenewalLoading(false));
|
|
454
471
|
}
|
|
455
472
|
catch (e) {
|
|
456
|
-
yield put(actions$
|
|
473
|
+
yield put(actions$6.setCancellationError(e.message));
|
|
457
474
|
}
|
|
458
475
|
}
|
|
459
476
|
}
|
|
@@ -466,14 +483,14 @@ function* checkoutEvent$2({ payload }) {
|
|
|
466
483
|
* Preview Sagas
|
|
467
484
|
*********************************/
|
|
468
485
|
function* loadBillingInformationMock() {
|
|
469
|
-
yield put(actions$
|
|
486
|
+
yield put(actions$6.setLoading(true));
|
|
470
487
|
yield loadSummariesMock();
|
|
471
488
|
}
|
|
472
489
|
function* loadSummariesMock() {
|
|
473
490
|
var _a, _b;
|
|
474
|
-
yield put(actions$
|
|
491
|
+
yield put(actions$6.setLoading(true));
|
|
475
492
|
yield delay(500);
|
|
476
|
-
yield put(actions$
|
|
493
|
+
yield put(actions$6.setBillingInformation({
|
|
477
494
|
loading: false,
|
|
478
495
|
fetching: false,
|
|
479
496
|
externallyManaged: false,
|
|
@@ -482,30 +499,30 @@ function* loadSummariesMock() {
|
|
|
482
499
|
}));
|
|
483
500
|
}
|
|
484
501
|
function* subscriptionBillingInformationSagasMock() {
|
|
485
|
-
yield takeEvery(actions$
|
|
502
|
+
yield takeEvery(actions$6.loadBillingInformation, loadBillingInformationMock);
|
|
486
503
|
}
|
|
487
504
|
|
|
488
505
|
function* subscriptionsPaymentMethodSagas() {
|
|
489
|
-
yield takeEvery(actions$
|
|
490
|
-
yield takeEvery(actions$
|
|
491
|
-
yield takeEvery(actions$
|
|
492
|
-
yield takeEvery(actions$
|
|
493
|
-
yield takeEvery(actions$
|
|
494
|
-
yield takeEvery(actions$
|
|
506
|
+
yield takeEvery(actions$5.loadPaymentMethod, loadPaymentMethod);
|
|
507
|
+
yield takeEvery(actions$5.submitPaymentMethod, submitPaymentMethod);
|
|
508
|
+
yield takeEvery(actions$5.submitPaymentMethodError, submitPaymentMethodError);
|
|
509
|
+
yield takeEvery(actions$5.submitPaymentMethodSuccess, submitPaymentMethodSuccess);
|
|
510
|
+
yield takeEvery(actions$5.updatePaymentMethodBillingDetails, updateBillingDetails);
|
|
511
|
+
yield takeEvery(actions$3.checkoutEvent, checkoutEvent$1);
|
|
495
512
|
}
|
|
496
513
|
function* loadPaymentMethod() {
|
|
497
|
-
yield put(actions$
|
|
514
|
+
yield put(actions$5.setLoading(true));
|
|
498
515
|
try {
|
|
499
516
|
const paymentMethods = yield call(api.subscriptions.getPaymentMethods);
|
|
500
517
|
const paymentMethod = paymentMethods[0];
|
|
501
|
-
yield put(actions$
|
|
518
|
+
yield put(actions$5.setState({
|
|
502
519
|
paymentMethod,
|
|
503
520
|
loading: false,
|
|
504
521
|
fetching: false,
|
|
505
522
|
}));
|
|
506
523
|
}
|
|
507
524
|
catch (e) {
|
|
508
|
-
yield put(actions$
|
|
525
|
+
yield put(actions$5.setError(e.message));
|
|
509
526
|
}
|
|
510
527
|
}
|
|
511
528
|
function* checkoutEvent$1({ payload }) {
|
|
@@ -514,7 +531,7 @@ function* checkoutEvent$1({ payload }) {
|
|
|
514
531
|
}
|
|
515
532
|
}
|
|
516
533
|
function* updateBillingDetails({ payload, }) {
|
|
517
|
-
yield put(actions$
|
|
534
|
+
yield put(actions$5.setLoading(true));
|
|
518
535
|
const { id, email, address, callback } = payload;
|
|
519
536
|
try {
|
|
520
537
|
yield call(api.subscriptions.updatePaymentMethodBillingDetails, id, Object.assign({ email }, address));
|
|
@@ -522,44 +539,44 @@ function* updateBillingDetails({ payload, }) {
|
|
|
522
539
|
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
523
540
|
}
|
|
524
541
|
catch (e) {
|
|
525
|
-
yield put(actions$
|
|
542
|
+
yield put(actions$5.setError(e.message));
|
|
526
543
|
callback === null || callback === void 0 ? void 0 : callback(false);
|
|
527
544
|
}
|
|
528
|
-
yield put(actions$
|
|
545
|
+
yield put(actions$5.setLoading(false));
|
|
529
546
|
}
|
|
530
547
|
function* submitPaymentMethod() {
|
|
531
|
-
yield put(actions$
|
|
548
|
+
yield put(actions$5.setLoading(true));
|
|
532
549
|
}
|
|
533
550
|
function* submitPaymentMethodError({ payload: error }) {
|
|
534
|
-
yield put(actions$
|
|
551
|
+
yield put(actions$5.setError(error));
|
|
535
552
|
}
|
|
536
553
|
function* submitPaymentMethodSuccess() {
|
|
537
|
-
yield put(actions$
|
|
554
|
+
yield put(actions$5.loadPaymentMethod());
|
|
538
555
|
}
|
|
539
556
|
/*********************************
|
|
540
557
|
* Preview Sagas
|
|
541
558
|
*********************************/
|
|
542
559
|
function* loadPaymentMethodMock() {
|
|
543
|
-
yield put(actions$
|
|
560
|
+
yield put(actions$5.setLoading(true));
|
|
544
561
|
yield delay(500);
|
|
545
562
|
const paymentMethod = paymentMethodsMock[0];
|
|
546
|
-
yield put(actions$
|
|
563
|
+
yield put(actions$5.setState({
|
|
547
564
|
paymentMethod,
|
|
548
565
|
loading: false,
|
|
549
566
|
fetching: false,
|
|
550
567
|
}));
|
|
551
568
|
}
|
|
552
569
|
function* subscriptionsPaymentMethodSagasMock() {
|
|
553
|
-
yield takeEvery(actions$
|
|
570
|
+
yield takeEvery(actions$5.loadPaymentMethod, loadPaymentMethodMock);
|
|
554
571
|
}
|
|
555
572
|
|
|
556
573
|
function* subscriptionInvoicesSagas() {
|
|
557
|
-
yield takeEvery(actions$
|
|
558
|
-
yield takeEvery(actions$
|
|
559
|
-
yield takeEvery(actions$
|
|
574
|
+
yield takeEvery(actions$4.loadInvoices, loadInvoices);
|
|
575
|
+
yield takeEvery(actions$4.downloadInvoice, downloadInvoice);
|
|
576
|
+
yield takeEvery(actions$3.checkoutEvent, checkoutEvent);
|
|
560
577
|
}
|
|
561
578
|
function* loadInvoices() {
|
|
562
|
-
yield put(actions$
|
|
579
|
+
yield put(actions$4.setLoading(true));
|
|
563
580
|
try {
|
|
564
581
|
const responseInvoices = yield call(api.subscriptions.getSubscriptionInvoices);
|
|
565
582
|
const invoices = responseInvoices.map((invoice) => ({
|
|
@@ -572,24 +589,24 @@ function* loadInvoices() {
|
|
|
572
589
|
paid: invoice.paid || false,
|
|
573
590
|
receiptNumber: invoice.receiptNumber,
|
|
574
591
|
}));
|
|
575
|
-
yield put(actions$
|
|
592
|
+
yield put(actions$4.setState({
|
|
576
593
|
loading: false,
|
|
577
594
|
fetching: false,
|
|
578
595
|
invoices,
|
|
579
596
|
}));
|
|
580
597
|
}
|
|
581
598
|
catch (e) {
|
|
582
|
-
yield put(actions$
|
|
599
|
+
yield put(actions$4.setError(e.message));
|
|
583
600
|
}
|
|
584
601
|
}
|
|
585
602
|
function* downloadInvoice({ payload }) {
|
|
586
|
-
yield put(actions$
|
|
603
|
+
yield put(actions$4.setInvoiceDownloadState({ loading: true, error: null }));
|
|
587
604
|
try {
|
|
588
605
|
yield call(api.subscriptions.getSubscriptionInvoicePdf, payload.invoiceId, payload.filename);
|
|
589
|
-
yield put(actions$
|
|
606
|
+
yield put(actions$4.setInvoiceDownloadState({ loading: false, error: null }));
|
|
590
607
|
}
|
|
591
608
|
catch (e) {
|
|
592
|
-
yield put(actions$
|
|
609
|
+
yield put(actions$4.setInvoiceDownloadState({ loading: false, error: e.message || null }));
|
|
593
610
|
}
|
|
594
611
|
}
|
|
595
612
|
function* checkoutEvent({ payload }) {
|
|
@@ -601,18 +618,18 @@ function* checkoutEvent({ payload }) {
|
|
|
601
618
|
* Preview Sagas
|
|
602
619
|
*********************************/
|
|
603
620
|
function* loadInvoicesMock() {
|
|
604
|
-
yield put(actions$
|
|
621
|
+
yield put(actions$4.setLoading(true));
|
|
605
622
|
yield delay(500);
|
|
606
623
|
const selectPlanTitle = 'Premium';
|
|
607
|
-
yield put(actions$
|
|
624
|
+
yield put(actions$4.setState({
|
|
608
625
|
loading: false,
|
|
609
626
|
fetching: false,
|
|
610
627
|
invoices: invoicesMock.map((invoice) => (Object.assign(Object.assign({}, invoice), { selectedPlan: selectPlanTitle, paymentDate: new Date(Date.parse(invoice.paymentDate)), totalAmount: +((invoice.totalAmount || 0) / 100).toFixed(2) }))),
|
|
611
628
|
}));
|
|
612
|
-
yield put(actions$
|
|
629
|
+
yield put(actions$4.setLoading(false));
|
|
613
630
|
}
|
|
614
631
|
function* subscriptionInvoicesSagasMock() {
|
|
615
|
-
yield takeEvery(actions$
|
|
632
|
+
yield takeEvery(actions$4.loadInvoices, loadInvoicesMock);
|
|
616
633
|
}
|
|
617
634
|
|
|
618
635
|
function* billingSagas() {
|
|
@@ -631,15 +648,15 @@ function* billingSagasMock() {
|
|
|
631
648
|
}
|
|
632
649
|
|
|
633
650
|
function* checkoutSagas() {
|
|
634
|
-
yield takeEvery(actions$
|
|
635
|
-
yield takeEvery(actions$
|
|
636
|
-
yield takeEvery(actions$
|
|
637
|
-
yield takeEvery(actions$
|
|
638
|
-
yield takeEvery(actions$
|
|
639
|
-
yield takeEvery(actions$
|
|
651
|
+
yield takeEvery(actions$3.checkoutPlan, checkoutPlan);
|
|
652
|
+
yield takeEvery(actions$3.resetCheckout, resetCheckout);
|
|
653
|
+
yield takeEvery(actions$3.confirmCheckout, confirmPlan);
|
|
654
|
+
yield takeEvery(actions$3.cancelCheckout, cancelPlan);
|
|
655
|
+
yield takeEvery(actions$3.submitCheckout, submitCheckout);
|
|
656
|
+
yield takeEvery(actions$3.errorCheckout, errorCheckout);
|
|
640
657
|
}
|
|
641
658
|
function* checkoutPlan({ payload: planId }) {
|
|
642
|
-
yield put(actions$
|
|
659
|
+
yield put(actions$3.setState({
|
|
643
660
|
checkoutPlanId: planId,
|
|
644
661
|
loading: false,
|
|
645
662
|
error: null,
|
|
@@ -647,70 +664,62 @@ function* checkoutPlan({ payload: planId }) {
|
|
|
647
664
|
}));
|
|
648
665
|
}
|
|
649
666
|
function* resetCheckout() {
|
|
650
|
-
yield put(actions$
|
|
667
|
+
yield put(actions$3.setState({
|
|
651
668
|
checkoutPlanId: null,
|
|
652
669
|
loading: false,
|
|
653
670
|
status: CheckoutStatus.SELECTION,
|
|
654
671
|
}));
|
|
655
672
|
}
|
|
656
673
|
function* confirmPlan({ payload: paymentMethodId }) {
|
|
657
|
-
|
|
658
|
-
const { subscription, status, checkoutPlanId } = yield select(({ subscriptions: { billing: { information }, checkout, }, }) => ({
|
|
674
|
+
const { subscription, status, planId } = yield select(({ subscriptions: { billing: { information }, checkout, }, }) => ({
|
|
659
675
|
subscription: information.subscription,
|
|
660
676
|
status: checkout.status,
|
|
661
|
-
|
|
677
|
+
planId: checkout.checkoutPlanId,
|
|
662
678
|
}));
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
if (!checkoutPlanId || !subscriptionId || !subscriptionItemId) {
|
|
666
|
-
yield put(actions$2.setState({
|
|
679
|
+
if (!planId || !subscription) {
|
|
680
|
+
yield put(actions$3.setState({
|
|
667
681
|
loading: false,
|
|
668
682
|
status: CheckoutStatus.ERROR,
|
|
669
683
|
}));
|
|
670
684
|
return;
|
|
671
685
|
}
|
|
672
686
|
if (status === CheckoutStatus.CHECKOUT) {
|
|
673
|
-
yield put(actions$
|
|
687
|
+
yield put(actions$3.setState({
|
|
674
688
|
loading: true,
|
|
675
689
|
error: null,
|
|
676
690
|
}));
|
|
677
691
|
try {
|
|
678
|
-
yield call(api.subscriptions.updateSubscription,
|
|
692
|
+
yield call(api.subscriptions.updateSubscription, subscription.id, {
|
|
679
693
|
paymentMethodId,
|
|
680
|
-
|
|
681
|
-
{
|
|
682
|
-
id: subscriptionItemId,
|
|
683
|
-
planId: checkoutPlanId,
|
|
684
|
-
},
|
|
685
|
-
],
|
|
694
|
+
planId,
|
|
686
695
|
});
|
|
687
|
-
yield put(actions$
|
|
696
|
+
yield put(actions$3.setState({
|
|
688
697
|
checkoutPlanId: null,
|
|
689
698
|
loading: false,
|
|
690
699
|
status: CheckoutStatus.CONFIRM,
|
|
691
700
|
}));
|
|
692
|
-
yield put(actions$
|
|
701
|
+
yield put(actions$3.checkoutEvent(CheckoutEvent.CONFIRMED));
|
|
693
702
|
}
|
|
694
703
|
catch (e) {
|
|
695
|
-
yield put(actions$
|
|
704
|
+
yield put(actions$3.setState({
|
|
696
705
|
loading: false,
|
|
697
706
|
error: e.message,
|
|
698
707
|
status: CheckoutStatus.ERROR,
|
|
699
708
|
}));
|
|
700
|
-
yield put(actions$
|
|
709
|
+
yield put(actions$3.checkoutEvent(CheckoutEvent.ERROR));
|
|
701
710
|
}
|
|
702
711
|
}
|
|
703
712
|
}
|
|
704
713
|
function* cancelPlan() {
|
|
705
714
|
const { status } = yield select((state) => state.subscriptions.checkout);
|
|
706
715
|
if (status === CheckoutStatus.CHECKOUT) {
|
|
707
|
-
yield put(actions$
|
|
716
|
+
yield put(actions$3.setState({
|
|
708
717
|
checkoutPlanId: null,
|
|
709
718
|
loading: false,
|
|
710
719
|
error: null,
|
|
711
720
|
status: CheckoutStatus.CANCEL,
|
|
712
721
|
}));
|
|
713
|
-
yield put(actions$
|
|
722
|
+
yield put(actions$3.checkoutEvent(CheckoutEvent.CANCEL));
|
|
714
723
|
}
|
|
715
724
|
}
|
|
716
725
|
/**
|
|
@@ -719,35 +728,35 @@ function* cancelPlan() {
|
|
|
719
728
|
function* submitCheckout() {
|
|
720
729
|
const { paymentProvider } = yield select((state) => state.subscriptions.config.config);
|
|
721
730
|
if (paymentProvider === PaymentProvider.STRIPE) {
|
|
722
|
-
yield put(actions$
|
|
731
|
+
yield put(actions$3.setState({
|
|
723
732
|
loading: true,
|
|
724
733
|
error: null,
|
|
725
734
|
}));
|
|
726
|
-
yield put(actions$
|
|
735
|
+
yield put(actions$3.checkoutEvent(CheckoutEvent.SUBMITTED));
|
|
727
736
|
}
|
|
728
737
|
}
|
|
729
738
|
function* errorCheckout({ payload }) {
|
|
730
|
-
yield put(actions$
|
|
739
|
+
yield put(actions$3.setState({
|
|
731
740
|
loading: false,
|
|
732
741
|
error: payload,
|
|
733
742
|
status: CheckoutStatus.ERROR,
|
|
734
743
|
}));
|
|
735
|
-
yield put(actions$
|
|
744
|
+
yield put(actions$3.checkoutEvent(CheckoutEvent.ERROR));
|
|
736
745
|
}
|
|
737
746
|
/*********************************
|
|
738
747
|
* Preview Sagas
|
|
739
748
|
*********************************/
|
|
740
749
|
function* checkoutSagasMock() {
|
|
741
|
-
yield takeEvery(actions$
|
|
742
|
-
yield takeEvery(actions$
|
|
743
|
-
yield takeEvery(actions$
|
|
750
|
+
yield takeEvery(actions$3.checkoutPlan, checkoutPlan);
|
|
751
|
+
yield takeEvery(actions$3.resetCheckout, resetCheckout);
|
|
752
|
+
yield takeEvery(actions$3.cancelCheckout, cancelPlan);
|
|
744
753
|
}
|
|
745
754
|
|
|
746
755
|
function* plansSagas() {
|
|
747
|
-
yield takeEvery(actions$
|
|
756
|
+
yield takeEvery(actions$8.loadPlans, loadPlans);
|
|
748
757
|
}
|
|
749
758
|
function* loadPlans() {
|
|
750
|
-
yield put(actions$
|
|
759
|
+
yield put(actions$8.setLoading(true));
|
|
751
760
|
try {
|
|
752
761
|
const products = yield call(api.subscriptions.getSubscriptionPlans);
|
|
753
762
|
const plans = products.map((item) => {
|
|
@@ -761,23 +770,23 @@ function* loadPlans() {
|
|
|
761
770
|
recurringInterval: 'month',
|
|
762
771
|
});
|
|
763
772
|
});
|
|
764
|
-
yield put(actions$
|
|
773
|
+
yield put(actions$8.setState({
|
|
765
774
|
fetching: false,
|
|
766
775
|
loading: false,
|
|
767
776
|
plans,
|
|
768
777
|
}));
|
|
769
778
|
}
|
|
770
779
|
catch (e) {
|
|
771
|
-
yield put(actions$
|
|
780
|
+
yield put(actions$8.setError(e.message));
|
|
772
781
|
}
|
|
773
782
|
}
|
|
774
783
|
/*********************************
|
|
775
784
|
* Preview Sagas
|
|
776
785
|
*********************************/
|
|
777
786
|
function* loadPlansMock() {
|
|
778
|
-
yield put(actions$
|
|
787
|
+
yield put(actions$8.setLoading(true));
|
|
779
788
|
yield delay(500);
|
|
780
|
-
yield put(actions$
|
|
789
|
+
yield put(actions$8.setState({
|
|
781
790
|
fetching: false,
|
|
782
791
|
loading: false,
|
|
783
792
|
plans: planResponseMock.map((item) => {
|
|
@@ -787,7 +796,7 @@ function* loadPlansMock() {
|
|
|
787
796
|
}));
|
|
788
797
|
}
|
|
789
798
|
function* plansSagasMock() {
|
|
790
|
-
yield takeEvery(actions$
|
|
799
|
+
yield takeEvery(actions$8.loadPlans, loadPlansMock);
|
|
791
800
|
}
|
|
792
801
|
|
|
793
802
|
var PaymentMethodType;
|
|
@@ -796,11 +805,20 @@ var PaymentMethodType;
|
|
|
796
805
|
PaymentMethodType["CARD"] = "card";
|
|
797
806
|
})(PaymentMethodType || (PaymentMethodType = {}));
|
|
798
807
|
|
|
808
|
+
var ManagedSubscriptionStatus;
|
|
809
|
+
(function (ManagedSubscriptionStatus) {
|
|
810
|
+
ManagedSubscriptionStatus["ACTIVE"] = "ACTIVE";
|
|
811
|
+
ManagedSubscriptionStatus["CANCELED"] = "CANCELED";
|
|
812
|
+
ManagedSubscriptionStatus["INCOMPLETE"] = "INCOMPLETE";
|
|
813
|
+
ManagedSubscriptionStatus["EXPIRED"] = "EXPIRED";
|
|
814
|
+
ManagedSubscriptionStatus["TRIALING"] = "TRIALING";
|
|
815
|
+
})(ManagedSubscriptionStatus || (ManagedSubscriptionStatus = {}));
|
|
816
|
+
|
|
799
817
|
function* configSagas() {
|
|
800
|
-
yield takeEvery(actions$
|
|
818
|
+
yield takeEvery(actions$7.loadPaymentConfiguration, loadPaymentConfiguration);
|
|
801
819
|
}
|
|
802
820
|
function* loadPaymentConfiguration() {
|
|
803
|
-
yield put(actions$
|
|
821
|
+
yield put(actions$7.setLoading(true));
|
|
804
822
|
try {
|
|
805
823
|
const response = yield call(api.subscriptions.getPaymentProviders) || [];
|
|
806
824
|
const stripePaymentProvider = response.find((paymentProvider) => paymentProvider.status === '1' && paymentProvider.providerType === ProviderType.Stripe);
|
|
@@ -808,18 +826,18 @@ function* loadPaymentConfiguration() {
|
|
|
808
826
|
yield loadStripePaymentConfiguration();
|
|
809
827
|
}
|
|
810
828
|
else {
|
|
811
|
-
yield put(actions$
|
|
829
|
+
yield put(actions$7.setError('Payment provider not configured'));
|
|
812
830
|
}
|
|
813
831
|
}
|
|
814
832
|
catch (e) {
|
|
815
|
-
yield put(actions$
|
|
833
|
+
yield put(actions$7.setError(e.message));
|
|
816
834
|
}
|
|
817
835
|
}
|
|
818
836
|
function* loadStripePaymentConfiguration() {
|
|
819
|
-
yield put(actions$
|
|
837
|
+
yield put(actions$7.setLoading(true));
|
|
820
838
|
try {
|
|
821
839
|
const response = yield call(api.subscriptions.getStripePaymentProviderConfiguration);
|
|
822
|
-
yield put(actions$
|
|
840
|
+
yield put(actions$7.setState({
|
|
823
841
|
loading: false,
|
|
824
842
|
fetching: false,
|
|
825
843
|
config: {
|
|
@@ -829,16 +847,16 @@ function* loadStripePaymentConfiguration() {
|
|
|
829
847
|
}));
|
|
830
848
|
}
|
|
831
849
|
catch (e) {
|
|
832
|
-
yield put(actions$
|
|
850
|
+
yield put(actions$7.setError(e.message));
|
|
833
851
|
}
|
|
834
852
|
}
|
|
835
853
|
/*********************************
|
|
836
854
|
* Preview Sagas
|
|
837
855
|
*********************************/
|
|
838
856
|
function* loadPaymentConfigurationMock() {
|
|
839
|
-
yield put(actions$
|
|
857
|
+
yield put(actions$7.setLoading(true));
|
|
840
858
|
yield delay(500);
|
|
841
|
-
yield put(actions$
|
|
859
|
+
yield put(actions$7.setState({
|
|
842
860
|
loading: false,
|
|
843
861
|
fetching: false,
|
|
844
862
|
config: {
|
|
@@ -848,14 +866,14 @@ function* loadPaymentConfigurationMock() {
|
|
|
848
866
|
}));
|
|
849
867
|
}
|
|
850
868
|
function* configSagasMock() {
|
|
851
|
-
yield takeEvery(actions$
|
|
869
|
+
yield takeEvery(actions$7.loadPaymentConfiguration, loadPaymentConfigurationMock);
|
|
852
870
|
}
|
|
853
871
|
|
|
854
872
|
function* subscriptionStripeSagas() {
|
|
855
|
-
yield takeEvery(actions$
|
|
873
|
+
yield takeEvery(actions$2.createCardSetupIntentSecret, createCardSetupIntentSecret);
|
|
856
874
|
}
|
|
857
875
|
function* createCardSetupIntentSecret({ payload }) {
|
|
858
|
-
yield put(actions$
|
|
876
|
+
yield put(actions$2.setStripeState({
|
|
859
877
|
loading: true,
|
|
860
878
|
error: null,
|
|
861
879
|
cardSetupIntentSecret: null
|
|
@@ -864,18 +882,36 @@ function* createCardSetupIntentSecret({ payload }) {
|
|
|
864
882
|
const { setupIntentSecret } = yield call(api.subscriptions.createStripePaymentMethodSetupIntentSecret, {
|
|
865
883
|
paymentMethodId: payload || undefined
|
|
866
884
|
});
|
|
867
|
-
yield put(actions$
|
|
885
|
+
yield put(actions$2.setStripeState({
|
|
868
886
|
cardSetupIntentSecret: setupIntentSecret,
|
|
869
887
|
loading: false
|
|
870
888
|
}));
|
|
871
889
|
}
|
|
890
|
+
catch (e) {
|
|
891
|
+
yield put(actions$2.setError(e.message));
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
function* loadManagedSubscriptions() {
|
|
896
|
+
yield put(actions$1.setLoading(true));
|
|
897
|
+
try {
|
|
898
|
+
const managedSubscriptions = yield call(api.subscriptions.getManagedSubscriptions);
|
|
899
|
+
yield put(actions$1.setState({
|
|
900
|
+
fetching: false,
|
|
901
|
+
loading: false,
|
|
902
|
+
managedSubscriptions,
|
|
903
|
+
}));
|
|
904
|
+
}
|
|
872
905
|
catch (e) {
|
|
873
906
|
yield put(actions$1.setError(e.message));
|
|
874
907
|
}
|
|
908
|
+
}
|
|
909
|
+
function* managedSubscriptionsSagas() {
|
|
910
|
+
yield takeEvery(actions$1.loadManagedSubscriptions, loadManagedSubscriptions);
|
|
875
911
|
}
|
|
876
912
|
|
|
877
913
|
function* sagas() {
|
|
878
|
-
yield all([call(billingSagas), call(checkoutSagas), call(plansSagas), call(configSagas), call(subscriptionStripeSagas)]);
|
|
914
|
+
yield all([call(billingSagas), call(checkoutSagas), call(plansSagas), call(configSagas), call(subscriptionStripeSagas), call(managedSubscriptionsSagas)]);
|
|
879
915
|
}
|
|
880
916
|
function* mockSagas() {
|
|
881
917
|
yield all([call(billingSagasMock), call(checkoutSagasMock), call(plansSagasMock), call(configSagasMock)]);
|
|
@@ -892,4 +928,4 @@ var subscriptionsStore = {
|
|
|
892
928
|
storeName: subscriptionsStoreName,
|
|
893
929
|
};
|
|
894
930
|
|
|
895
|
-
export { CheckoutEvent, CheckoutStatus, PaymentMethodType, PaymentProvider, SubscriptionCancellationPolicy, SubscriptionStatus, subscriptionsStore as default, actions as subscriptionActions, initialState as subscriptionInitialState, reducer as subscriptionReducers, sagas as subscriptionSagas, mockSagas as subscriptionSagasMock };
|
|
931
|
+
export { CheckoutEvent, CheckoutStatus, ManagedSubscriptionStatus, PaymentMethodType, PaymentProvider, SubscriptionCancellationPolicy, SubscriptionStatus, subscriptionsStore as default, actions as subscriptionActions, initialState as subscriptionInitialState, reducer as subscriptionReducers, sagas as subscriptionSagas, mockSagas as subscriptionSagasMock };
|