@frontegg/redux-store 5.23.0 → 5.26.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.
|
@@ -22,6 +22,10 @@ declare const reducers: {
|
|
|
22
22
|
loginState: import("..").LoginState;
|
|
23
23
|
activateState: import("..").ActivateAccountState;
|
|
24
24
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
25
|
+
/**
|
|
26
|
+
* if you see error in matcher that's mean the DispatchAction does not
|
|
27
|
+
* contains the same functions in reducers and actions
|
|
28
|
+
*/
|
|
25
29
|
forgotPasswordState: import("..").ForgotPasswordState;
|
|
26
30
|
resetPhoneNumberState: ResetPhoneNumberState;
|
|
27
31
|
ssoState: import("..").SSOState;
|
|
@@ -52,6 +56,10 @@ declare const reducers: {
|
|
|
52
56
|
loginState: import("..").LoginState;
|
|
53
57
|
activateState: import("..").ActivateAccountState;
|
|
54
58
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
59
|
+
/**
|
|
60
|
+
* if you see error in matcher that's mean the DispatchAction does not
|
|
61
|
+
* contains the same functions in reducers and actions
|
|
62
|
+
*/
|
|
55
63
|
forgotPasswordState: import("..").ForgotPasswordState;
|
|
56
64
|
resetPhoneNumberState: ResetPhoneNumberState;
|
|
57
65
|
ssoState: import("..").SSOState;
|
|
@@ -89,8 +97,8 @@ declare type DispatchedActions = {
|
|
|
89
97
|
setResetPhoneNumberState: (state: Partial<ResetPhoneNumberState>) => void;
|
|
90
98
|
resetResetPhoneNumberState: () => void;
|
|
91
99
|
resetPhoneNumber: (payload: WithCallback<IResetPhoneNumber>) => void;
|
|
92
|
-
verifyResetPhoneNumber: (payload
|
|
93
|
-
changePhoneNumber: (payload
|
|
100
|
+
verifyResetPhoneNumber: (payload: WithCallback<IVerifyResetPhoneNumber>) => void;
|
|
101
|
+
changePhoneNumber: (payload: ChangePhoneNumberPayload) => void;
|
|
94
102
|
};
|
|
95
103
|
export declare type ResetPhoneNumberActions = DispatchedActions;
|
|
96
104
|
export { resetPhoneNumberState, reducers as resetPhoneNumberReducers, actions as resetPhoneNumberActions };
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { AcceptInvitationStep, ActivateAccountStep, ApiStateKeys, ForgotPasswordStep, LoginStep, MFAStep, ResetPhoneNumberStep, SSOStateKeys, SamlVendors, SignUpStage, TeamStateKeys, acceptInvitationActions, acceptInvitationReducers, acceptInvitationState, accountSettingsActions, accountSettingsReducers, accountSettingsState, activateAccountActions, activateAccountReducers, activateState, apiTokensActions, apiTokensReducers, apiTokensState, default as auth, authActions, authInitialState, authMockSagas, authReducers, authSagas, forgotPasswordActions, forgotPasswordReducers, forgotPasswordState, loginActions, loginReducers, loginState, mfaActions, mfaReducers, mfaState, profileActions, profileReducers, profileState, resetPhoneNumberActions, resetPhoneNumberReducers, resetPhoneNumberState, rolesActions, rolesReducers, rolesState, securityPolicyActions, securityPolicyReducers, securityPolicyState, signUpActions, signUpReducers, signUpState, socialLoginState, socialLoginsActions, socialLoginsReducer, ssoActions, ssoReducers, ssoState, teamActions, teamReducers, teamState, tenantsActions, tenantsReducers, tenantsState } from './auth/index.js';
|
|
2
2
|
export { auditLogsActions, auditLogsReducers, auditLogsState, default as audits, auditsActions, auditsInitialState, auditsMetadataActions, auditsMetadataReducers, auditsMetadataState, auditsMockSagas, auditsReducers, auditsSagas } from './audits/index.js';
|
|
3
3
|
export { default as connectivity, connectivityActions, connectivityInitialState, connectivityReducers, connectivitySagas } from './connectivity/index.js';
|
|
4
|
-
export { CheckoutEvent, CheckoutStatus,
|
|
4
|
+
export { CheckoutEvent, CheckoutStatus, PaymentMethodType, PaymentProvider, SubscriptionCancellationPolicy, SubscriptionStatus, subscriptionActions, subscriptionInitialState, subscriptionReducers, subscriptionSagas, subscriptionSagasMock, default as subscriptions } from './subscriptions/index.js';
|
|
5
5
|
export { default as vendor } from './vendor/index.js';
|
|
6
6
|
export { createFronteggStore } from './toolkit/index.js';
|
|
7
7
|
export { AuthStrategyEnum } from '@frontegg/rest-api';
|
package/node/index.js
CHANGED
|
@@ -173,12 +173,6 @@ Object.defineProperty(exports, 'CheckoutStatus', {
|
|
|
173
173
|
return subscriptions_index.CheckoutStatus;
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
|
-
Object.defineProperty(exports, 'ManagedSubscriptionStatus', {
|
|
177
|
-
enumerable: true,
|
|
178
|
-
get: function () {
|
|
179
|
-
return subscriptions_index.ManagedSubscriptionStatus;
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
176
|
Object.defineProperty(exports, 'PaymentMethodType', {
|
|
183
177
|
enumerable: true,
|
|
184
178
|
get: function () {
|
|
@@ -674,15 +674,12 @@ function* resetCheckout() {
|
|
|
674
674
|
}));
|
|
675
675
|
}
|
|
676
676
|
function* confirmPlan({ payload: paymentMethodId }) {
|
|
677
|
-
|
|
678
|
-
const { subscription, status, checkoutPlanId } = yield effects.select(({ subscriptions: { billing: { information }, checkout, }, }) => ({
|
|
677
|
+
const { subscription, status, planId } = yield effects.select(({ subscriptions: { billing: { information }, checkout, }, }) => ({
|
|
679
678
|
subscription: information.subscription,
|
|
680
679
|
status: checkout.status,
|
|
681
|
-
|
|
680
|
+
planId: checkout.checkoutPlanId,
|
|
682
681
|
}));
|
|
683
|
-
|
|
684
|
-
const subscriptionItemId = (_a = subscription === null || subscription === void 0 ? void 0 : subscription.items[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
685
|
-
if (!checkoutPlanId || !subscriptionId || !subscriptionItemId) {
|
|
682
|
+
if (!planId || !subscription) {
|
|
686
683
|
yield effects.put(actions$3.setState({
|
|
687
684
|
loading: false,
|
|
688
685
|
status: exports.CheckoutStatus.ERROR,
|
|
@@ -695,14 +692,9 @@ function* confirmPlan({ payload: paymentMethodId }) {
|
|
|
695
692
|
error: null,
|
|
696
693
|
}));
|
|
697
694
|
try {
|
|
698
|
-
yield effects.call(restApi.api.subscriptions.updateSubscription,
|
|
695
|
+
yield effects.call(restApi.api.subscriptions.updateSubscription, subscription.id, {
|
|
699
696
|
paymentMethodId,
|
|
700
|
-
|
|
701
|
-
{
|
|
702
|
-
id: subscriptionItemId,
|
|
703
|
-
planId: checkoutPlanId,
|
|
704
|
-
},
|
|
705
|
-
],
|
|
697
|
+
planId,
|
|
706
698
|
});
|
|
707
699
|
yield effects.put(actions$3.setState({
|
|
708
700
|
checkoutPlanId: null,
|
|
@@ -816,15 +808,6 @@ exports.PaymentMethodType = void 0;
|
|
|
816
808
|
PaymentMethodType["CARD"] = "card";
|
|
817
809
|
})(exports.PaymentMethodType || (exports.PaymentMethodType = {}));
|
|
818
810
|
|
|
819
|
-
exports.ManagedSubscriptionStatus = void 0;
|
|
820
|
-
(function (ManagedSubscriptionStatus) {
|
|
821
|
-
ManagedSubscriptionStatus["ACTIVE"] = "ACTIVE";
|
|
822
|
-
ManagedSubscriptionStatus["CANCELED"] = "CANCELED";
|
|
823
|
-
ManagedSubscriptionStatus["INCOMPLETE"] = "INCOMPLETE";
|
|
824
|
-
ManagedSubscriptionStatus["EXPIRED"] = "EXPIRED";
|
|
825
|
-
ManagedSubscriptionStatus["TRIALING"] = "TRIALING";
|
|
826
|
-
})(exports.ManagedSubscriptionStatus || (exports.ManagedSubscriptionStatus = {}));
|
|
827
|
-
|
|
828
811
|
function* configSagas() {
|
|
829
812
|
yield effects.takeEvery(actions$7.loadPaymentConfiguration, loadPaymentConfiguration);
|
|
830
813
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
3
|
"libName": "FronteggReduxStore",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.26.0",
|
|
5
5
|
"author": "Frontegg LTD",
|
|
6
6
|
"main": "./node/index.js",
|
|
7
7
|
"module": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@frontegg/rest-api": "2.10.
|
|
10
|
+
"@frontegg/rest-api": "2.10.58",
|
|
11
11
|
"@reduxjs/toolkit": "^1.5.0",
|
|
12
12
|
"redux-saga": "^1.1.0",
|
|
13
13
|
"tslib": "^2.3.1",
|
|
@@ -1,27 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare enum ManagedSubscriptionStatus {
|
|
3
|
-
ACTIVE = "ACTIVE",
|
|
4
|
-
CANCELED = "CANCELED",
|
|
5
|
-
INCOMPLETE = "INCOMPLETE",
|
|
6
|
-
EXPIRED = "EXPIRED",
|
|
7
|
-
TRIALING = "TRIALING"
|
|
8
|
-
}
|
|
9
|
-
export interface ManagedSubscription {
|
|
10
|
-
id: string;
|
|
11
|
-
externalId: string;
|
|
12
|
-
startDate: Date;
|
|
13
|
-
currentPeriodStart: Date;
|
|
14
|
-
currentPeriodEnd: Date;
|
|
15
|
-
status: ManagedSubscriptionStatus;
|
|
16
|
-
cancellation: SubscriptionCancellation | null;
|
|
17
|
-
items: SubscriptionItem[];
|
|
18
|
-
trialEnd?: Date;
|
|
19
|
-
}
|
|
1
|
+
import { ISubscriptionResponse } from '@frontegg/rest-api';
|
|
20
2
|
export interface ManagedSubscriptionsState {
|
|
21
3
|
loading: boolean;
|
|
22
4
|
error: string | null;
|
|
23
5
|
fetching: boolean;
|
|
24
|
-
managedSubscriptions:
|
|
6
|
+
managedSubscriptions: ISubscriptionResponse[];
|
|
25
7
|
}
|
|
26
8
|
export interface ManagedSubscriptionsActions {
|
|
27
9
|
loadManagedSubscriptions: () => void;
|
package/subscriptions/index.js
CHANGED
|
@@ -671,15 +671,12 @@ function* resetCheckout() {
|
|
|
671
671
|
}));
|
|
672
672
|
}
|
|
673
673
|
function* confirmPlan({ payload: paymentMethodId }) {
|
|
674
|
-
|
|
675
|
-
const { subscription, status, checkoutPlanId } = yield select(({ subscriptions: { billing: { information }, checkout, }, }) => ({
|
|
674
|
+
const { subscription, status, planId } = yield select(({ subscriptions: { billing: { information }, checkout, }, }) => ({
|
|
676
675
|
subscription: information.subscription,
|
|
677
676
|
status: checkout.status,
|
|
678
|
-
|
|
677
|
+
planId: checkout.checkoutPlanId,
|
|
679
678
|
}));
|
|
680
|
-
|
|
681
|
-
const subscriptionItemId = (_a = subscription === null || subscription === void 0 ? void 0 : subscription.items[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
682
|
-
if (!checkoutPlanId || !subscriptionId || !subscriptionItemId) {
|
|
679
|
+
if (!planId || !subscription) {
|
|
683
680
|
yield put(actions$3.setState({
|
|
684
681
|
loading: false,
|
|
685
682
|
status: CheckoutStatus.ERROR,
|
|
@@ -692,14 +689,9 @@ function* confirmPlan({ payload: paymentMethodId }) {
|
|
|
692
689
|
error: null,
|
|
693
690
|
}));
|
|
694
691
|
try {
|
|
695
|
-
yield call(api.subscriptions.updateSubscription,
|
|
692
|
+
yield call(api.subscriptions.updateSubscription, subscription.id, {
|
|
696
693
|
paymentMethodId,
|
|
697
|
-
|
|
698
|
-
{
|
|
699
|
-
id: subscriptionItemId,
|
|
700
|
-
planId: checkoutPlanId,
|
|
701
|
-
},
|
|
702
|
-
],
|
|
694
|
+
planId,
|
|
703
695
|
});
|
|
704
696
|
yield put(actions$3.setState({
|
|
705
697
|
checkoutPlanId: null,
|
|
@@ -813,15 +805,6 @@ var PaymentMethodType;
|
|
|
813
805
|
PaymentMethodType["CARD"] = "card";
|
|
814
806
|
})(PaymentMethodType || (PaymentMethodType = {}));
|
|
815
807
|
|
|
816
|
-
var ManagedSubscriptionStatus;
|
|
817
|
-
(function (ManagedSubscriptionStatus) {
|
|
818
|
-
ManagedSubscriptionStatus["ACTIVE"] = "ACTIVE";
|
|
819
|
-
ManagedSubscriptionStatus["CANCELED"] = "CANCELED";
|
|
820
|
-
ManagedSubscriptionStatus["INCOMPLETE"] = "INCOMPLETE";
|
|
821
|
-
ManagedSubscriptionStatus["EXPIRED"] = "EXPIRED";
|
|
822
|
-
ManagedSubscriptionStatus["TRIALING"] = "TRIALING";
|
|
823
|
-
})(ManagedSubscriptionStatus || (ManagedSubscriptionStatus = {}));
|
|
824
|
-
|
|
825
808
|
function* configSagas() {
|
|
826
809
|
yield takeEvery(actions$7.loadPaymentConfiguration, loadPaymentConfiguration);
|
|
827
810
|
}
|
|
@@ -936,4 +919,4 @@ var subscriptionsStore = {
|
|
|
936
919
|
storeName: subscriptionsStoreName,
|
|
937
920
|
};
|
|
938
921
|
|
|
939
|
-
export { CheckoutEvent, CheckoutStatus,
|
|
922
|
+
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 };
|