@maxio-com/self-service 1.4.3 → 1.6.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/dist/maxio-components.cjs.js +1 -1
- package/dist/maxio-components.esm.js +1 -1
- package/dist/maxio-components.umd.js +168 -25
- package/package.json +1 -1
- package/typings/packages/custom-ui-components/src/components/molecules/Alert/Alert.d.ts +5 -2
- package/typings/packages/custom-ui-components/src/components/molecules/Alert/Alert.styles.d.ts +0 -1
- package/typings/packages/custom-ui-components/src/components/molecules/Alert/components/Title.d.ts +8 -0
- package/typings/packages/custom-ui-components/src/components/molecules/Alert/components/Title.styles.d.ts +2 -0
- package/typings/packages/custom-ui-components/src/components/molecules/Alert/components/index.d.ts +2 -1
- package/typings/packages/data-access/src/DataAccess.d.ts +71 -0
- package/typings/packages/data-access/src/types/subscription.d.ts +11 -0
- package/typings/packages/icons/src/Icon.styles.d.ts +1 -1
- package/typings/packages/subscriptions-manager/src/components/PlanChangeAlerts/PlanChangeAlerts.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummary/PlanChangeSummary.d.ts +5 -2
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummary/components/NonProratedColumns.d.ts +10 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummary/components/ProratedColumns.d.ts +8 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummary/components/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/Subscription/Subscription.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/components/SubscriptionDetails/components/Notification/Notification.d.ts +3 -1
- package/typings/packages/subscriptions-manager/src/containers/PreviewProductMigrationContainer/PreviewProductMigrationContainer.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/hooks/index.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/hooks/useChangePlan.d.ts +1 -1
- package/typings/packages/subscriptions-manager/src/hooks/useThreeDs.d.ts +10 -0
- package/typings/packages/subscriptions-manager/src/machines/changePlan/types.d.ts +8 -1
- package/typings/packages/subscriptions-manager/src/machines/index.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/machines/modals/selectors.d.ts +18 -0
- package/typings/packages/subscriptions-manager/src/machines/modals/types.d.ts +12 -0
- package/typings/packages/subscriptions-manager/src/machines/subscription/selectors.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/machines/subscriptions/actions.d.ts +52 -0
- package/typings/packages/subscriptions-manager/src/machines/subscriptions/types.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/machines/threeDs/index.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/machines/threeDs/threeDs.d.ts +5 -0
- package/typings/packages/subscriptions-manager/src/machines/threeDs/types.d.ts +8 -0
- package/typings/packages/subscriptions-manager/src/modals/ThreeDsConfirmation/ThreeDsConfirmation.d.ts +3 -0
- package/typings/packages/subscriptions-manager/src/modals/ThreeDsConfirmation/components/Content/Content.d.ts +10 -0
- package/typings/packages/subscriptions-manager/src/modals/ThreeDsConfirmation/components/Content/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/modals/ThreeDsConfirmation/components/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/modals/ThreeDsConfirmation/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/modals/index.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/models/subscription/types.d.ts +13 -1
package/package.json
CHANGED
|
@@ -9,12 +9,15 @@ export interface AlertProps {
|
|
|
9
9
|
onClick?: () => void;
|
|
10
10
|
buttonLabel?: string;
|
|
11
11
|
icon?: IconType;
|
|
12
|
-
whiteSpace?: 'pre-line' | 'normal';
|
|
13
12
|
}
|
|
14
13
|
declare const Alert: {
|
|
15
|
-
({ title, color, size, buttonLabel, icon, onClick, children,
|
|
14
|
+
({ title, color, size, buttonLabel, icon, onClick, children, }: AlertProps): JSX.Element;
|
|
16
15
|
TextMessage: ({ children, ...rest }: {
|
|
17
16
|
children: React.ReactNode;
|
|
18
17
|
} & import("../../atoms/BodyText/BodyText").BodyTextProps) => JSX.Element;
|
|
18
|
+
Title: ({ text, icon }: {
|
|
19
|
+
text: string;
|
|
20
|
+
icon?: "close" | "edit" | "plus" | "clock" | "search" | "chevronDown" | "chevronLeft" | "chevronRight" | "calendar" | "check" | "spinner" | "questionCircle" | "receipt" | "file" | "fileSolid" | "filter" | "arrowDown" | "filePlus" | "filePdf" | "circleInfo" | "circleCheck" | "exclamationTriangle" | "ellipsis" | "circleCross";
|
|
21
|
+
}) => JSX.Element;
|
|
19
22
|
};
|
|
20
23
|
export default Alert;
|
package/typings/packages/custom-ui-components/src/components/molecules/Alert/Alert.styles.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ export declare const Container: import("styled-components").StyledComponent<"div
|
|
|
3
3
|
color: Color;
|
|
4
4
|
size: Size;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, import("styled-system").MarginProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").JustifyContentProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
|
@@ -56,6 +56,7 @@ declare class DataAccess {
|
|
|
56
56
|
canceledAt: string;
|
|
57
57
|
scheduledCancellationAt: string;
|
|
58
58
|
currency: string;
|
|
59
|
+
threeDsActionLink: string;
|
|
59
60
|
billing: {
|
|
60
61
|
paymentProfileConnected: boolean;
|
|
61
62
|
bankAccount: {
|
|
@@ -199,6 +200,7 @@ declare class DataAccess {
|
|
|
199
200
|
canceledAt: string;
|
|
200
201
|
scheduledCancellationAt: string;
|
|
201
202
|
currency: string;
|
|
203
|
+
threeDsActionLink: string;
|
|
202
204
|
billing: {
|
|
203
205
|
paymentProfileConnected: boolean;
|
|
204
206
|
bankAccount: {
|
|
@@ -246,6 +248,75 @@ declare class DataAccess {
|
|
|
246
248
|
};
|
|
247
249
|
}[];
|
|
248
250
|
}>;
|
|
251
|
+
getSubscriptionDetails(subscriptionId: number): Promise<{
|
|
252
|
+
id: number;
|
|
253
|
+
productFamilyId: number;
|
|
254
|
+
state: string;
|
|
255
|
+
balanceInCents: number;
|
|
256
|
+
referralCode: string;
|
|
257
|
+
currentPeriodEndsAt: string;
|
|
258
|
+
nextAssessmentAt: string;
|
|
259
|
+
nextProductId?: number;
|
|
260
|
+
currentBillingAmountInCents: number;
|
|
261
|
+
automaticallyResumeAt: string;
|
|
262
|
+
expiresAt: string;
|
|
263
|
+
canceledAt: string;
|
|
264
|
+
scheduledCancellationAt: string;
|
|
265
|
+
currency: string;
|
|
266
|
+
threeDsActionLink: string;
|
|
267
|
+
billing: {
|
|
268
|
+
paymentProfileConnected: boolean;
|
|
269
|
+
bankAccount: {
|
|
270
|
+
bankName: string;
|
|
271
|
+
maskedAccountNumber: string;
|
|
272
|
+
maskedRoutingNumber: string;
|
|
273
|
+
firstName: string;
|
|
274
|
+
lastName: string;
|
|
275
|
+
};
|
|
276
|
+
creditCard: {
|
|
277
|
+
firstName: string;
|
|
278
|
+
lastName: string;
|
|
279
|
+
cardType: string;
|
|
280
|
+
maskedNumber: string;
|
|
281
|
+
expirationMonth: number;
|
|
282
|
+
expirationYear: number;
|
|
283
|
+
expired: boolean;
|
|
284
|
+
};
|
|
285
|
+
address: {
|
|
286
|
+
address: string;
|
|
287
|
+
address2: string;
|
|
288
|
+
city: string;
|
|
289
|
+
country: string;
|
|
290
|
+
state: string;
|
|
291
|
+
zip: string;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
product: {
|
|
295
|
+
id: number;
|
|
296
|
+
name: string;
|
|
297
|
+
priceInCents: number;
|
|
298
|
+
interval: number;
|
|
299
|
+
intervalUnit: "day" | "month";
|
|
300
|
+
trialPriceInCents: number;
|
|
301
|
+
trialInterval: string;
|
|
302
|
+
trialIntervalUnit: string;
|
|
303
|
+
};
|
|
304
|
+
components: {
|
|
305
|
+
updatesAllowed: boolean;
|
|
306
|
+
usedInBilling: boolean;
|
|
307
|
+
};
|
|
308
|
+
customFields: {
|
|
309
|
+
updatesAllowed: boolean;
|
|
310
|
+
visible: boolean;
|
|
311
|
+
};
|
|
312
|
+
coupons: {
|
|
313
|
+
amountInCents: number;
|
|
314
|
+
code: string;
|
|
315
|
+
expiresAt: string;
|
|
316
|
+
recurring: boolean;
|
|
317
|
+
percentage: number;
|
|
318
|
+
}[];
|
|
319
|
+
}>;
|
|
249
320
|
getCustomerDetails(): Promise<{
|
|
250
321
|
address: string;
|
|
251
322
|
address2: string;
|
|
@@ -14,6 +14,7 @@ export declare type Subscription = {
|
|
|
14
14
|
canceled_at: string | null;
|
|
15
15
|
scheduled_cancellation_at: string | null;
|
|
16
16
|
currency: string;
|
|
17
|
+
three_ds_action_link: string | null;
|
|
17
18
|
billing: {
|
|
18
19
|
payment_profile_connected: boolean;
|
|
19
20
|
} & SubscriptionPaymentProfile;
|
|
@@ -44,3 +45,13 @@ export declare type SubscriptionProduct = {
|
|
|
44
45
|
trial_interval: string | null;
|
|
45
46
|
trial_interval_unit: string | null;
|
|
46
47
|
};
|
|
48
|
+
export declare type Coupon = {
|
|
49
|
+
amount_in_cents: number;
|
|
50
|
+
code: string;
|
|
51
|
+
expires_at: string;
|
|
52
|
+
recurring: boolean;
|
|
53
|
+
percentage: number;
|
|
54
|
+
};
|
|
55
|
+
export declare type SubscriptionWithCoupon = Subscription & {
|
|
56
|
+
coupons: Coupon[];
|
|
57
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ColorProps } from 'styled-system';
|
|
2
|
-
export declare const IconWrapper: import("styled-components").StyledComponent<"
|
|
2
|
+
export declare const IconWrapper: import("styled-components").StyledComponent<"span", any, {
|
|
3
3
|
size: number;
|
|
4
4
|
} & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, never>;
|
package/typings/packages/subscriptions-manager/src/components/PlanChangeAlerts/PlanChangeAlerts.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare type Props = {
|
|
|
5
5
|
nextBillingDate: string;
|
|
6
6
|
basePlanPrice: string;
|
|
7
7
|
totalCharge: string;
|
|
8
|
+
creditBalance: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const PlanChangeAlerts: ({ basePlanPrice, productChangeStrategy, nextBillingDate, totalCharge, }: Props) => JSX.Element;
|
|
10
|
+
export declare const PlanChangeAlerts: ({ basePlanPrice, productChangeStrategy, nextBillingDate, totalCharge, creditBalance, }: Props) => JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ProductChangeStrategy } from '../../machines/changePlan/index';
|
|
2
3
|
declare type Props = {
|
|
3
4
|
productName: string;
|
|
4
5
|
basePlanPrice: string;
|
|
5
|
-
|
|
6
|
+
productChangeStrategy: ProductChangeStrategy;
|
|
6
7
|
existingBalance: string;
|
|
7
8
|
billingEndDate: string;
|
|
8
9
|
nextBillingAmount: string;
|
|
10
|
+
proratedCreditAmount: string;
|
|
11
|
+
currentProductName: string;
|
|
9
12
|
};
|
|
10
|
-
export declare const PlanChangeSummary: ({ productName, basePlanPrice,
|
|
13
|
+
export declare const PlanChangeSummary: ({ productName, basePlanPrice, productChangeStrategy, existingBalance, billingEndDate, nextBillingAmount, currentProductName, proratedCreditAmount, }: Props) => JSX.Element;
|
|
11
14
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
existingBalance: string;
|
|
4
|
+
billingEndDate: string;
|
|
5
|
+
nextBillingAmount: string;
|
|
6
|
+
productName: string;
|
|
7
|
+
isImmediate: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const NonProratedColumns: ({ existingBalance, productName, billingEndDate, nextBillingAmount, isImmediate, }: Props) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
productName: string;
|
|
4
|
+
billingEndDate: string;
|
|
5
|
+
proratedCreditAmount: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const ProratedColumns: ({ proratedCreditAmount, productName, billingEndDate, }: Props) => JSX.Element;
|
|
8
|
+
export {};
|
package/typings/packages/subscriptions-manager/src/components/Subscription/Subscription.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare type SubscriptionProps = {
|
|
|
28
28
|
renderCustomFieldsSection?: boolean;
|
|
29
29
|
availableActions?: SubscriptionActions[];
|
|
30
30
|
referralCode?: string;
|
|
31
|
+
threeDsActionLink?: string;
|
|
31
32
|
} & FormattedSubscriptionDetails;
|
|
32
|
-
declare const Subscription: ({ id, catalogId, name, price, statusTag, description, status, onShowDetails, detailsVisible, cardColor, nextBillingAmount, nextBillingDate, basePlanPrice, cancellationDate, expirationDate, layout, autoResumeDate, trialExpirationDate, priceAfterTrial, trialPrice, currentBalance, nextBillingAttempt, interval, billingDetails, renderComponentsSection, renderCustomFieldsSection, scheduledCancellationDate, availableActions, referralCode, }: SubscriptionProps) => JSX.Element;
|
|
33
|
+
declare const Subscription: ({ id, catalogId, name, price, statusTag, description, status, onShowDetails, detailsVisible, cardColor, nextBillingAmount, nextBillingDate, basePlanPrice, cancellationDate, expirationDate, layout, autoResumeDate, trialExpirationDate, priceAfterTrial, trialPrice, currentBalance, nextBillingAttempt, interval, billingDetails, renderComponentsSection, renderCustomFieldsSection, scheduledCancellationDate, availableActions, referralCode, threeDsActionLink, }: SubscriptionProps) => JSX.Element;
|
|
33
34
|
export default Subscription;
|
|
@@ -3,6 +3,8 @@ import { SubscriptionStatus } from '../../../../models';
|
|
|
3
3
|
import { MarginProps } from 'styled-system';
|
|
4
4
|
interface Props {
|
|
5
5
|
status: SubscriptionStatus;
|
|
6
|
+
show3DSModal: () => void;
|
|
7
|
+
existingBalance: string;
|
|
6
8
|
}
|
|
7
|
-
declare const Notification: ({ status, ...rest }: Props & MarginProps) => JSX.Element;
|
|
9
|
+
declare const Notification: ({ status, show3DSModal, existingBalance, ...rest }: Props & MarginProps) => JSX.Element;
|
|
8
10
|
export default Notification;
|
|
@@ -4,6 +4,7 @@ import { ChangePlanInterpreter } from '../../machines/changePlan/types';
|
|
|
4
4
|
declare type Props = {
|
|
5
5
|
changePlanService: ChangePlanInterpreter;
|
|
6
6
|
currency: Currency;
|
|
7
|
+
currentProductName: string;
|
|
7
8
|
};
|
|
8
|
-
export declare const PreviewProductMigrationContainer: ({ changePlanService, currency, }: Props) => JSX.Element;
|
|
9
|
+
export declare const PreviewProductMigrationContainer: ({ changePlanService, currency, currentProductName, }: Props) => JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -15,5 +15,6 @@ import { useChangePaymentProfile } from './useChangePaymentProfile';
|
|
|
15
15
|
import { useSortPaymentProfiles } from './useSortPaymentProfiles';
|
|
16
16
|
import { useDeletePaymentProfile } from './useDeletePaymentProfile';
|
|
17
17
|
import { useChangePlan } from './useChangePlan';
|
|
18
|
-
|
|
18
|
+
import { useThreeDs } from './useThreeDs';
|
|
19
|
+
export { useChangePlan, useDeletePaymentProfile, useSortPaymentProfiles, useChangePaymentProfile, useReactivateSubscription, useCancelSubscriptionService, useSubscriptionResumeService, useServices, useDataAccess, useSubscriptionStatus, useFormatSubscriptionDetails, useComponentSettings, useCreatePaymentProfile, useAddonsConfigurationService, useUndoCancelationService, usePaymentProfileAvailableActions, useAvailablePaymentMethods, PaymentProfileActions, useThreeDs, };
|
|
19
20
|
export type { FormattedSubscriptionDetails, PaymentMethods };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useChangePlan: (catalogId: number, subscriptionId: number, currentPlanId: number, onSuccess: () => void) => import("xstate").Interpreter<import("../machines/changePlan/types").Context, any, import("../machines/changePlan/types").Events, {
|
|
1
|
+
export declare const useChangePlan: (catalogId: number, subscriptionId: number, currentPlanId: number, onSuccess: () => void, onThreeDsConfirmation: (threeDsActionLink: string) => void) => import("xstate").Interpreter<import("../machines/changePlan/types").Context, any, import("../machines/changePlan/types").Events, {
|
|
2
2
|
value: any;
|
|
3
3
|
context: import("../machines/changePlan/types").Context;
|
|
4
4
|
}, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, import("../machines/changePlan/types").Events, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare type Props = {
|
|
2
|
+
subscriptionId: number;
|
|
3
|
+
catalogId: number;
|
|
4
|
+
onSuccess: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const useThreeDs: ({ subscriptionId, catalogId, onSuccess }: Props) => import("xstate").Interpreter<null, any, import("../machines/threeDs/types").Events, {
|
|
7
|
+
value: any;
|
|
8
|
+
context: null;
|
|
9
|
+
}, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, import("../machines/threeDs/types").Events, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
10
|
+
export {};
|
|
@@ -4,6 +4,7 @@ export declare type Context = {
|
|
|
4
4
|
products: Product[];
|
|
5
5
|
selectedPlan: number;
|
|
6
6
|
changePlanPreview: ChangePlanPreview;
|
|
7
|
+
threeDsActionLink: string;
|
|
7
8
|
};
|
|
8
9
|
export declare type Events = {
|
|
9
10
|
type: 'GET_PRODUCTS';
|
|
@@ -16,7 +17,13 @@ export declare type Events = {
|
|
|
16
17
|
type: 'GO_BACK';
|
|
17
18
|
} | {
|
|
18
19
|
type: 'CONFIRM_CHANGE_PLAN';
|
|
19
|
-
} | ProductChangeDoneEvent;
|
|
20
|
+
} | ProductChangeDoneEvent | ThreeDsConfirmationEvent;
|
|
21
|
+
export declare type ThreeDsConfirmationEvent = {
|
|
22
|
+
type: '3DS_CONFIRMATION';
|
|
23
|
+
data: {
|
|
24
|
+
threeDsActionLink: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
20
27
|
export declare type ProductChangeDoneEvent = {
|
|
21
28
|
type: 'DONE';
|
|
22
29
|
data: SubscriptionModel;
|
|
@@ -9,6 +9,7 @@ import { paymentGateway, paymentGatewaySelectors, PaymentGatewayInterpreter } fr
|
|
|
9
9
|
import { paymentProfiles, paymentProfilesSelectors, PaymentProfilesInterpreter } from './paymentProfiles';
|
|
10
10
|
import { addOnsConfiguration, Allocation, SerializedPrice, SerializedComponent, AllocationsPreview, AddonsConfigurationContext, AllocationsError, AddonsInterpreter } from './addOnsConfiguration';
|
|
11
11
|
import { changePlan } from './changePlan';
|
|
12
|
-
|
|
12
|
+
import { threeDs as threeDsMachine } from './threeDs';
|
|
13
|
+
export { changePlan, modals, modalsSelectors, createSubscriptionsMachine, subscriptionsSelectors, subscriptionSelectors, productCatalogSelectors, componentSelectors, componentsSelectors, paymentGatewaySelectors, paymentGateway, productCatalog, paymentProfiles, paymentProfilesSelectors, createPaymentProfile, paymentProfileSelectors, addOnsConfiguration, threeDsMachine, };
|
|
13
14
|
export type { PaymentProfilesInterpreter, SubscriptionsInterpreter, SubscriptionRef, ProductCatalogInterpreter, PaymentProfileInterpreter, AddonsInterpreter, PaymentProfileFromType, PaymentProfileFieldError, PaymentProfileFields, ModalsInterpreter, Allocation, SerializedComponent, SerializedPrice, AllocationsPreview, AddonsConfigurationContext, PaymentMethod, PaymentGatewayInterpreter, AllocationsError, };
|
|
14
15
|
export { DEFAULT_VISIBLE_SUBSCRIPTIONS };
|
|
@@ -84,6 +84,15 @@ export declare const getChangeSubscriptionPlan: (machineState: ModalsState) => {
|
|
|
84
84
|
catalogId: number;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
+
export declare const getThreeDsConfirmation: (machineState: ModalsState) => {
|
|
88
|
+
isOpen: boolean;
|
|
89
|
+
meta: {
|
|
90
|
+
catalogId: number;
|
|
91
|
+
subscriptionId: number;
|
|
92
|
+
threeDsActionLink: string;
|
|
93
|
+
onClose: () => void;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
87
96
|
export declare const modalsSelectors: {
|
|
88
97
|
getCreatePaymentProfile: (machineState: ModalsState) => {
|
|
89
98
|
isOpen: boolean;
|
|
@@ -167,5 +176,14 @@ export declare const modalsSelectors: {
|
|
|
167
176
|
catalogId: number;
|
|
168
177
|
};
|
|
169
178
|
};
|
|
179
|
+
getThreeDsConfirmation: (machineState: ModalsState) => {
|
|
180
|
+
isOpen: boolean;
|
|
181
|
+
meta: {
|
|
182
|
+
catalogId: number;
|
|
183
|
+
subscriptionId: number;
|
|
184
|
+
threeDsActionLink: string;
|
|
185
|
+
onClose: () => void;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
170
188
|
};
|
|
171
189
|
export {};
|
|
@@ -50,6 +50,12 @@ export declare type Context = {
|
|
|
50
50
|
subscriptionId: number | null;
|
|
51
51
|
catalogId: number | null;
|
|
52
52
|
};
|
|
53
|
+
threeDSecure: {
|
|
54
|
+
catalogId: number;
|
|
55
|
+
subscriptionId: null | number;
|
|
56
|
+
threeDsActionLink: null | string;
|
|
57
|
+
onClose: null | (() => void);
|
|
58
|
+
};
|
|
53
59
|
};
|
|
54
60
|
export declare type Events = {
|
|
55
61
|
type: 'CLOSE_MODAL';
|
|
@@ -102,5 +108,11 @@ export declare type Events = {
|
|
|
102
108
|
type: 'SHOW_SUBSCRIPTION_PLAN_CHANGE';
|
|
103
109
|
catalogId: number;
|
|
104
110
|
subscriptionId: number;
|
|
111
|
+
} | {
|
|
112
|
+
type: 'SHOW_THREE_D_SECURE';
|
|
113
|
+
catalogId: number;
|
|
114
|
+
subscriptionId: number;
|
|
115
|
+
threeDsActionLink: string;
|
|
116
|
+
onClose?: () => void;
|
|
105
117
|
};
|
|
106
118
|
export declare type ModalsInterpreter = Interpreter<Context, Record<string, any>, Events>;
|
|
@@ -28,6 +28,7 @@ export declare const getSubscriptionDetails: (machineState: SubscriptionState) =
|
|
|
28
28
|
visible: null;
|
|
29
29
|
};
|
|
30
30
|
referralCode: string;
|
|
31
|
+
threeDsActionLink: string;
|
|
31
32
|
};
|
|
32
33
|
export declare const subscriptionSelectors: {
|
|
33
34
|
getSubscriptionState: (machineState: SubscriptionState) => import("../../models").SubscriptionStatus;
|
|
@@ -56,6 +57,7 @@ export declare const subscriptionSelectors: {
|
|
|
56
57
|
visible: null;
|
|
57
58
|
};
|
|
58
59
|
referralCode: string;
|
|
60
|
+
threeDsActionLink: string;
|
|
59
61
|
};
|
|
60
62
|
};
|
|
61
63
|
export {};
|
|
@@ -38,6 +38,7 @@ export declare const updateSubscription: import("xstate").AssignAction<{
|
|
|
38
38
|
automaticallyResumeAt: string;
|
|
39
39
|
balanceInCents: number;
|
|
40
40
|
referralCode: string;
|
|
41
|
+
threeDsActionLink: string;
|
|
41
42
|
product: import("type-fest/source/partial-deep").PartialObjectDeep<import("../../models").SubscriptionProduct, {}>;
|
|
42
43
|
billing: import("type-fest/source/partial-deep").PartialObjectDeep<import("../../models/subscription/types").SubscriptionBilling, {}>;
|
|
43
44
|
components: import("type-fest/source/partial-deep").PartialObjectDeep<{
|
|
@@ -48,6 +49,57 @@ export declare const updateSubscription: import("xstate").AssignAction<{
|
|
|
48
49
|
updatesAllowed: null;
|
|
49
50
|
visible: null;
|
|
50
51
|
}, {}>;
|
|
52
|
+
} | {
|
|
53
|
+
id: number;
|
|
54
|
+
product_family_id?: number;
|
|
55
|
+
state?: string;
|
|
56
|
+
balance_in_cents?: number;
|
|
57
|
+
referral_code?: string;
|
|
58
|
+
current_period_ends_at?: string;
|
|
59
|
+
next_assessment_at?: string;
|
|
60
|
+
next_product_id?: number;
|
|
61
|
+
current_billing_amount_in_cents?: number;
|
|
62
|
+
automatically_resume_at?: string;
|
|
63
|
+
expires_at?: string;
|
|
64
|
+
canceled_at?: string;
|
|
65
|
+
scheduled_cancellation_at?: string;
|
|
66
|
+
currency: string;
|
|
67
|
+
three_ds_action_link?: string;
|
|
68
|
+
billing: import("../../models/subscription/types").SubscriptionBilling | import("type-fest/source/partial-deep").PartialObjectDeep<{
|
|
69
|
+
payment_profile_connected: boolean;
|
|
70
|
+
} & import("../../../../data-access/src/types").SubscriptionPaymentProfile, {}>;
|
|
71
|
+
product: import("../../models").SubscriptionProduct | import("type-fest/source/partial-deep").PartialObjectDeep<import("../../../../data-access/src/types").SubscriptionProduct, {}>;
|
|
72
|
+
components: {
|
|
73
|
+
updatesAllowed: null;
|
|
74
|
+
usedInBilling: null;
|
|
75
|
+
} | import("type-fest/source/partial-deep").PartialObjectDeep<{
|
|
76
|
+
updates_allowed: boolean;
|
|
77
|
+
used_in_billing: boolean;
|
|
78
|
+
}, {}>;
|
|
79
|
+
custom_fields?: import("type-fest/source/partial-deep").PartialObjectDeep<{
|
|
80
|
+
updates_allowed: boolean;
|
|
81
|
+
visible: boolean;
|
|
82
|
+
}, {}>;
|
|
83
|
+
coupons?: import("type-fest/source/partial-deep").PartialObjectDeep<import("../../models/subscription/types").Coupon, {}>[];
|
|
84
|
+
productFamilyId: number;
|
|
85
|
+
scheduledCancellationAt: string;
|
|
86
|
+
currentBillingAmountInCents: number;
|
|
87
|
+
status: import("../../models").SubscriptionStatus;
|
|
88
|
+
canceledAt: string;
|
|
89
|
+
expiresAt: string;
|
|
90
|
+
snapDay: string;
|
|
91
|
+
currentPeriodEndsAt: string;
|
|
92
|
+
nextAssessmentAt: string;
|
|
93
|
+
nextProductId: number;
|
|
94
|
+
trialEndedAt: string;
|
|
95
|
+
automaticallyResumeAt: string;
|
|
96
|
+
balanceInCents: number;
|
|
97
|
+
referralCode: string;
|
|
98
|
+
threeDsActionLink: string;
|
|
99
|
+
customFields: {
|
|
100
|
+
updatesAllowed: null;
|
|
101
|
+
visible: null;
|
|
102
|
+
};
|
|
51
103
|
};
|
|
52
104
|
componentsRef: import("xstate").ActorRefWithDeprecatedState<import("../components").ComponentsContext, import("../components").ComponentsEvents, {
|
|
53
105
|
value: any;
|
|
@@ -3,6 +3,7 @@ import { subscriptionModel, SubscriptionModel } from '../../models';
|
|
|
3
3
|
import { createComponentsMachine } from '../components';
|
|
4
4
|
import { createCustomFieldsMachine } from '../customFields/customFields';
|
|
5
5
|
import { PartialDeep } from 'type-fest';
|
|
6
|
+
import { SubscriptionModelWithCoupons } from '../../models/subscription/types';
|
|
6
7
|
export declare type SubscriptionRef = ReturnType<typeof subscriptionModel.createMachine>;
|
|
7
8
|
export declare type ComponentsRef = ReturnType<typeof createComponentsMachine>;
|
|
8
9
|
export declare type CustomFieldsRef = ReturnType<typeof createCustomFieldsMachine>;
|
|
@@ -39,7 +40,7 @@ export declare type UpdateSubscription = {
|
|
|
39
40
|
type: 'UPDATE_SUBSCRIPTION';
|
|
40
41
|
subscriptionId: number;
|
|
41
42
|
catalogId: number;
|
|
42
|
-
} & PartialDeep<SubscriptionModel>;
|
|
43
|
+
} & PartialDeep<SubscriptionModel | SubscriptionModelWithCoupons>;
|
|
43
44
|
export declare type Events = {
|
|
44
45
|
type: 'FETCH_SUBSCRIPTIONS';
|
|
45
46
|
} | {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { threeDs } from './threeDs';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Events } from './types';
|
|
2
|
+
export declare const threeDs: import("xstate").StateMachine<null, any, Events, {
|
|
3
|
+
value: any;
|
|
4
|
+
context: null;
|
|
5
|
+
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, Events, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SubscriptionModelWithCoupons } from '../../models/subscription/types';
|
|
2
|
+
export declare type Events = {
|
|
3
|
+
type: 'THREE_DS_SUCCESS';
|
|
4
|
+
} | UpdateSubscriptionEvent;
|
|
5
|
+
export declare type UpdateSubscriptionEvent = {
|
|
6
|
+
type: 'UPDATE_SUBSCRIPTION';
|
|
7
|
+
data: SubscriptionModelWithCoupons;
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type ThreeDsSecureModal = {
|
|
3
|
+
displayMode: 'layer' | 'window';
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
catalogId: number;
|
|
6
|
+
subscriptionId: number;
|
|
7
|
+
threeDsActionLink: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Content: ({ onClose, catalogId, subscriptionId, threeDsActionLink, }: ThreeDsSecureModal) => JSX.Element;
|
|
10
|
+
export default Content;
|
|
@@ -9,4 +9,5 @@ import UndoCancelationModal from './UndoCancelation';
|
|
|
9
9
|
import DeletePaymentMethodModal from './DeletePaymentMethod';
|
|
10
10
|
import CreatePaymentProfileModal from './CreatePaymentProfile';
|
|
11
11
|
import ChangeSubscriptionPlanModal from './ChangeSubscriptionPlan';
|
|
12
|
-
|
|
12
|
+
import ThreeDsConfirmationModal from './ThreeDsConfirmation';
|
|
13
|
+
export { CreatePaymentProfileModal, ComponentsAllocationModal, PauseSubscriptionModal, ResumeSubscriptionModal, ReactivateSubscriptionModal, CancelSubscriptionModal, DeletePaymentMethodModal, ChangePaymentMethodModal, PreviewPaymentMethod, UndoCancelationModal, ChangeSubscriptionPlanModal, ThreeDsConfirmationModal, };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { PartialDeep } from 'type-fest';
|
|
1
2
|
import { Currency } from "../../../../formatters/src";
|
|
2
3
|
import { AddressFields } from "../../../../address/src";
|
|
4
|
+
import { Subscription } from "../../../../data-access/src";
|
|
3
5
|
import type { CreditCard, BankAccount } from '../paymentProfile';
|
|
4
|
-
import { PartialDeep } from 'type-fest';
|
|
5
6
|
export interface SubscriptionModel {
|
|
6
7
|
id: number;
|
|
7
8
|
currency: Currency;
|
|
@@ -19,6 +20,7 @@ export interface SubscriptionModel {
|
|
|
19
20
|
automaticallyResumeAt: string | null;
|
|
20
21
|
balanceInCents: number | null;
|
|
21
22
|
referralCode: string | null;
|
|
23
|
+
threeDsActionLink: string | null;
|
|
22
24
|
product: SubscriptionProduct;
|
|
23
25
|
billing: SubscriptionBilling;
|
|
24
26
|
components: {
|
|
@@ -72,3 +74,13 @@ export declare type ChurnReason = {
|
|
|
72
74
|
description: string;
|
|
73
75
|
position: number;
|
|
74
76
|
};
|
|
77
|
+
export declare type Coupon = {
|
|
78
|
+
amountInCents: number;
|
|
79
|
+
code: string;
|
|
80
|
+
expiresAt: string;
|
|
81
|
+
recurring: boolean;
|
|
82
|
+
percentage: number;
|
|
83
|
+
};
|
|
84
|
+
export declare type SubscriptionModelWithCoupons = Subscription & {
|
|
85
|
+
coupons: Coupon[];
|
|
86
|
+
};
|