@maxio-com/self-service 1.0.2 → 1.2.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 +622 -50
- package/package.json +1 -1
- package/typings/packages/billing-history/src/components/Filters/components/FilterBox/FilterBox.styles.d.ts +1 -1
- package/typings/packages/custom-fields/src/utils/renderField.d.ts +3 -2
- package/typings/packages/custom-ui-components/src/components/atoms/BodyText/BodyText.d.ts +2 -1
- package/typings/packages/custom-ui-components/src/components/atoms/BodyText/BodyText.styles.d.ts +2 -0
- package/typings/packages/custom-ui-components/src/components/atoms/Box/Box.styles.d.ts +2 -2
- package/typings/packages/custom-ui-components/src/components/atoms/Checkbox/Checkbox.d.ts +1 -1
- package/typings/packages/customer-details/src/components/CustomFieldsForm/CustomFieldsForm.d.ts +3 -2
- package/typings/packages/data-access/src/DataAccess.d.ts +87 -1
- package/typings/packages/data-access/src/types/index.d.ts +2 -2
- package/typings/packages/data-access/src/types/product.d.ts +9 -0
- package/typings/packages/data-access/src/types/subscription.d.ts +12 -10
- package/typings/packages/subscriptions-manager/src/components/CustomFieldsForm/CustomFieldsForm.d.ts +3 -2
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/PaymentProfilesReplace.d.ts +9 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/PaymentProfilesReplace.styles.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/ExpiredStatus/ExpiredStatus.styles.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/ExpiredStatus/ExpitredStatus.d.ts +6 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/ExpiredStatus/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/PaymentProfileItem/PaymentProfileItem.d.ts +9 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/PaymentProfileItem/PaymentProfileItem.styles.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/PaymentProfileItem/components/Label.d.ts +8 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/PaymentProfileItem/components/Label.styles.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/PaymentProfileItem/components/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/PaymentProfileItem/helpers.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/PaymentProfileItem/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/components/index.d.ts +3 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplace/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplaceAlerts/PaymentProfilesReplace.styles.d.ts +3 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplaceAlerts/PaymentProfilesReplaceAlerts.d.ts +20 -0
- package/typings/packages/subscriptions-manager/src/components/PaymentProfilesReplaceAlerts/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeAlerts/PlanChangeAlerts.d.ts +10 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeAlerts/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummary/PlanChangeSummary.d.ts +11 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummary/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummaryCharges/PlanChangeSummaryCharges.d.ts +9 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummaryCharges/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/PlanChangeSummaryCharges/utils/mapChargeSummaryToTable.d.ts +12 -0
- package/typings/packages/subscriptions-manager/src/components/PlanRadio/PlanRadio.d.ts +13 -0
- package/typings/packages/subscriptions-manager/src/components/PlanRadio/PlanRadio.styles.d.ts +4 -0
- package/typings/packages/subscriptions-manager/src/components/PlanRadio/components/Price/Price.d.ts +7 -0
- package/typings/packages/subscriptions-manager/src/components/PlanRadio/components/Price/Price.styles.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/components/PlanRadio/components/Status/Status.d.ts +6 -0
- package/typings/packages/subscriptions-manager/src/components/PlanRadio/components/Status/Status.styles.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/components/PlanRadio/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/SubscriptionDetails/components/DetailRow/DetailRow.d.ts +6 -0
- package/typings/packages/subscriptions-manager/src/components/SubscriptionDetails/components/PlanChangeScheduled/PlanChangeScheduled.d.ts +8 -0
- package/typings/packages/subscriptions-manager/src/components/SubscriptionDetails/components/PlanChangeScheduled/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/SubscriptionDetails/components/index.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/components/{ComponentsAllocationPreview/ComponentsAllocationPreview.styles.d.ts → Summary/Summary.styles.d.ts} +0 -1
- package/typings/packages/subscriptions-manager/src/components/Summary/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/TotalCharge/TotalCharge.styles.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/components/TotalCharge/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/components/index.d.ts +5 -1
- package/typings/packages/subscriptions-manager/src/containers/ChangePlanContainer/ChangePlan.styles.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/containers/ChangePlanContainer/ChangePlanContainer.d.ts +10 -0
- package/typings/packages/subscriptions-manager/src/containers/ChangePlanContainer/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/containers/PreviewProductMigrationContainer/PreviewProductMigrationContainer.d.ts +9 -0
- package/typings/packages/subscriptions-manager/src/containers/PreviewProductMigrationContainer/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/containers/ReplacePaymentProfilesContainer/ReplacePaymentProfilesContainer.d.ts +7 -0
- package/typings/packages/subscriptions-manager/src/containers/ReplacePaymentProfilesContainer/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/containers/SubscriptionContainer/hooks/useSubscriptionAvailableActions.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/containers/index.d.ts +4 -1
- package/typings/packages/subscriptions-manager/src/hooks/index.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/hooks/useChangePlan.d.ts +4 -0
- package/typings/packages/subscriptions-manager/src/hooks/useCreatePaymentProfile/useCreatePaymentProfile.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/machines/changePlan/changePlan.d.ts +5 -0
- package/typings/packages/subscriptions-manager/src/machines/changePlan/index.d.ts +4 -0
- package/typings/packages/subscriptions-manager/src/machines/changePlan/selectors.d.ts +31 -0
- package/typings/packages/subscriptions-manager/src/machines/changePlan/types.d.ts +39 -0
- package/typings/packages/subscriptions-manager/src/machines/createPaymentProfile/actions.d.ts +4 -0
- package/typings/packages/subscriptions-manager/src/machines/createPaymentProfile/selectors.d.ts +14 -0
- package/typings/packages/subscriptions-manager/src/machines/createPaymentProfile/types.d.ts +29 -1
- package/typings/packages/subscriptions-manager/src/machines/index.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/machines/modals/selectors.d.ts +16 -0
- package/typings/packages/subscriptions-manager/src/machines/modals/types.d.ts +10 -0
- package/typings/packages/subscriptions-manager/src/machines/subscriptions/actions.d.ts +1 -0
- package/typings/packages/subscriptions-manager/src/modals/ChangeSubscriptionPlan/ChangeSubscriptionPlan.d.ts +3 -0
- package/typings/packages/subscriptions-manager/src/modals/ChangeSubscriptionPlan/components/Content/Content.d.ts +10 -0
- package/typings/packages/subscriptions-manager/src/modals/ChangeSubscriptionPlan/components/Content/components/ErrorAlert.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/modals/ChangeSubscriptionPlan/components/Content/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/modals/ChangeSubscriptionPlan/components/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/modals/ChangeSubscriptionPlan/index.d.ts +2 -0
- package/typings/packages/subscriptions-manager/src/modals/CreatePaymentProfile/components/Content/Content.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/modals/index.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/models/subscription/types.d.ts +2 -1
- package/typings/packages/subscriptions-manager/src/types.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FilterBoxList: 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>>>, never>;
|
|
1
|
+
export declare const FilterBoxList: 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>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CustomField } from '../types';
|
|
3
3
|
declare type FormFieldProps = {
|
|
4
4
|
onChange: (id: number, value: string | number) => void;
|
|
5
5
|
options?: string[];
|
|
6
6
|
maxLength?: number;
|
|
7
|
+
portalContainer?: React.RefObject<HTMLDivElement>;
|
|
7
8
|
} & Pick<CustomField, 'id' | 'name' | 'fieldType' | 'value'>;
|
|
8
|
-
export declare const renderField: ({ id, name, value, fieldType, options, onChange, maxLength, }: FormFieldProps) => JSX.Element;
|
|
9
|
+
export declare const renderField: ({ id, name, value, fieldType, options, onChange, maxLength, portalContainer, }: FormFieldProps) => JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -11,7 +11,8 @@ export declare type BodyTextProps = {
|
|
|
11
11
|
textAlign?: CSS.Property.TextAlign;
|
|
12
12
|
lineHeight?: CSS.Property.LineHeight;
|
|
13
13
|
overflow?: 'truncate' | 'break-word';
|
|
14
|
+
whiteSpace?: CSS.Property.WhiteSpace;
|
|
14
15
|
as?: React.ElementType;
|
|
15
16
|
};
|
|
16
|
-
declare const BodyText: ({ variant, fontWeight, fontStyle, color, textAlign, lineHeight, overflow, children, as, }: BodyTextProps) => JSX.Element;
|
|
17
|
+
declare const BodyText: ({ variant, fontWeight, fontStyle, color, textAlign, lineHeight, overflow, children, as, whiteSpace, }: BodyTextProps) => JSX.Element;
|
|
17
18
|
export default BodyText;
|
package/typings/packages/custom-ui-components/src/components/atoms/BodyText/BodyText.styles.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FontWeightProps, FontStyleProps, LineHeightProps, FontFamilyProps, ColorProps, TextAlignProps } from 'styled-system';
|
|
2
|
+
import CSS from 'csstype';
|
|
2
3
|
import { BodyTextVariant } from './types';
|
|
3
4
|
export declare const Text: import("styled-components").StyledComponent<"p", any, {
|
|
4
5
|
variant: BodyTextVariant;
|
|
5
6
|
overflow: 'truncate' | 'break-word';
|
|
7
|
+
whiteSpace?: CSS.Property.WhiteSpace;
|
|
6
8
|
} & FontWeightProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & FontStyleProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & FontFamilyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & LineHeightProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & TextAlignProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LayoutProps, MarginProps, PaddingProps } from 'styled-system';
|
|
2
|
-
export declare const Box: import("styled-components").StyledComponent<"div", any, MarginProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
|
1
|
+
import { LayoutProps, MarginProps, PaddingProps, JustifyContentProps } from 'styled-system';
|
|
2
|
+
export declare const Box: import("styled-components").StyledComponent<"div", any, MarginProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & JustifyContentProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
package/typings/packages/customer-details/src/components/CustomFieldsForm/CustomFieldsForm.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
2
|
import { CustomField } from "../../../../custom-fields/src";
|
|
3
3
|
declare type CustomFieldsFormProps = {
|
|
4
4
|
customFields: CustomField[];
|
|
@@ -7,6 +7,7 @@ declare type CustomFieldsFormProps = {
|
|
|
7
7
|
onCancel: () => void;
|
|
8
8
|
isSaving: boolean;
|
|
9
9
|
isError: boolean;
|
|
10
|
+
portalContainer?: MutableRefObject<HTMLDivElement>;
|
|
10
11
|
};
|
|
11
|
-
declare const CustomFieldsForm: ({ customFields, onChange, onSave, onCancel, isSaving, isError, }: CustomFieldsFormProps) => JSX.Element;
|
|
12
|
+
declare const CustomFieldsForm: ({ customFields, onChange, onSave, onCancel, isSaving, isError, portalContainer, }: CustomFieldsFormProps) => JSX.Element;
|
|
12
13
|
export default CustomFieldsForm;
|
|
@@ -17,6 +17,90 @@ declare class DataAccess {
|
|
|
17
17
|
name: string;
|
|
18
18
|
}[];
|
|
19
19
|
}>;
|
|
20
|
+
getProducts(productFamilyId: number): Promise<{
|
|
21
|
+
items: {
|
|
22
|
+
id: number;
|
|
23
|
+
name: string;
|
|
24
|
+
priceInCents: number;
|
|
25
|
+
interval: number;
|
|
26
|
+
intervalUnit: "day" | "month";
|
|
27
|
+
trialPriceInCents: number;
|
|
28
|
+
trialInterval: string;
|
|
29
|
+
trialIntervalUnit: string;
|
|
30
|
+
}[];
|
|
31
|
+
}>;
|
|
32
|
+
previewProductMigration(subscriptionId: number, productId: number): Promise<{
|
|
33
|
+
items: {
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
priceInCents: number;
|
|
37
|
+
interval: number;
|
|
38
|
+
intervalUnit: "day" | "month";
|
|
39
|
+
trialPriceInCents: number;
|
|
40
|
+
trialInterval: string;
|
|
41
|
+
trialIntervalUnit: string;
|
|
42
|
+
}[];
|
|
43
|
+
}>;
|
|
44
|
+
migrateProduct(subscriptionId: number, productId: number): Promise<{
|
|
45
|
+
id: number;
|
|
46
|
+
productFamilyId: number;
|
|
47
|
+
state: string;
|
|
48
|
+
balanceInCents: number;
|
|
49
|
+
currentPeriodEndsAt: string;
|
|
50
|
+
nextAssessmentAt: string;
|
|
51
|
+
nextProductId?: number;
|
|
52
|
+
currentBillingAmountInCents: number;
|
|
53
|
+
automaticallyResumeAt: string;
|
|
54
|
+
expiresAt: string;
|
|
55
|
+
canceledAt: string;
|
|
56
|
+
scheduledCancellationAt: string;
|
|
57
|
+
currency: string;
|
|
58
|
+
billing: {
|
|
59
|
+
paymentProfileConnected: boolean;
|
|
60
|
+
bankAccount: {
|
|
61
|
+
bankName: string;
|
|
62
|
+
maskedAccountNumber: string;
|
|
63
|
+
maskedRoutingNumber: string;
|
|
64
|
+
firstName: string;
|
|
65
|
+
lastName: string;
|
|
66
|
+
};
|
|
67
|
+
creditCard: {
|
|
68
|
+
firstName: string;
|
|
69
|
+
lastName: string;
|
|
70
|
+
cardType: string;
|
|
71
|
+
maskedNumber: string;
|
|
72
|
+
expirationMonth: number;
|
|
73
|
+
expirationYear: number;
|
|
74
|
+
expired: boolean;
|
|
75
|
+
};
|
|
76
|
+
address: {
|
|
77
|
+
address: string;
|
|
78
|
+
address2: string;
|
|
79
|
+
city: string;
|
|
80
|
+
country: string;
|
|
81
|
+
state: string;
|
|
82
|
+
zip: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
product: {
|
|
86
|
+
id: number;
|
|
87
|
+
name: string;
|
|
88
|
+
priceInCents: number;
|
|
89
|
+
interval: number;
|
|
90
|
+
intervalUnit: "day" | "month";
|
|
91
|
+
trialPriceInCents: number;
|
|
92
|
+
trialInterval: string;
|
|
93
|
+
trialIntervalUnit: string;
|
|
94
|
+
};
|
|
95
|
+
components: {
|
|
96
|
+
updatesAllowed: boolean;
|
|
97
|
+
usedInBilling: boolean;
|
|
98
|
+
};
|
|
99
|
+
customFields: {
|
|
100
|
+
updatesAllowed: boolean;
|
|
101
|
+
visible: boolean;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
20
104
|
getComponents(subscriptionId: number): Promise<{
|
|
21
105
|
items: {
|
|
22
106
|
id: number;
|
|
@@ -90,6 +174,7 @@ declare class DataAccess {
|
|
|
90
174
|
};
|
|
91
175
|
}>;
|
|
92
176
|
updateSubscriptionPaymentProfile(paymentProfileId: number, subscriptionId: number): Promise<{}>;
|
|
177
|
+
replacePaymentProfiles(paymentProfileIdsForReplacement: number[], newPaymentProfileId: number): Promise<{}>;
|
|
93
178
|
resumeSubscription(subscriptionId: number): Promise<{}>;
|
|
94
179
|
getSubscriptionResumptionConfig(): Promise<{
|
|
95
180
|
resumptionCharge: SubscriptionResumptionCharge;
|
|
@@ -105,6 +190,7 @@ declare class DataAccess {
|
|
|
105
190
|
balanceInCents: number;
|
|
106
191
|
currentPeriodEndsAt: string;
|
|
107
192
|
nextAssessmentAt: string;
|
|
193
|
+
nextProductId?: number;
|
|
108
194
|
currentBillingAmountInCents: number;
|
|
109
195
|
automaticallyResumeAt: string;
|
|
110
196
|
expiresAt: string;
|
|
@@ -258,9 +344,9 @@ declare class DataAccess {
|
|
|
258
344
|
allocations: Allocation[];
|
|
259
345
|
}): Promise<{
|
|
260
346
|
allocations: {
|
|
347
|
+
id: number;
|
|
261
348
|
memo: string;
|
|
262
349
|
quantity: number;
|
|
263
|
-
id: number;
|
|
264
350
|
}[];
|
|
265
351
|
subscription: {
|
|
266
352
|
id: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CamelCasedPropertiesDeep } from 'type-fest';
|
|
2
|
-
import type { Subscription, SubscriptionResumptionCharge } from './subscription';
|
|
2
|
+
import type { Subscription, SubscriptionProduct, SubscriptionResumptionCharge } from './subscription';
|
|
3
3
|
import { SubscriptionPaymentProfile } from './subscriptionPaymentProfile';
|
|
4
4
|
import { SubscriptionComponent, SubscriptionComponentPriceStep } from './subscriptionComponent';
|
|
5
5
|
import type { ProductFamily } from './productFamily';
|
|
@@ -17,4 +17,4 @@ export declare enum HttpMethod {
|
|
|
17
17
|
PUT = "put",
|
|
18
18
|
DELETE = "delete"
|
|
19
19
|
}
|
|
20
|
-
export type { CreditCard, BankAccount, ProductFamily, SubscriptionComponent, SubscriptionComponentPriceStep, SubscriptionResumptionCharge, Subscription, SubscriptionPaymentProfile, CustomerDetails, GatewayConfig, Division, Allocation, AllocationsError, AllocationsPreview, AllocationDetails, CustomField, InvoicesList, InvoicesParams, };
|
|
20
|
+
export type { SubscriptionProduct, CreditCard, BankAccount, ProductFamily, SubscriptionComponent, SubscriptionComponentPriceStep, SubscriptionResumptionCharge, Subscription, SubscriptionPaymentProfile, CustomerDetails, GatewayConfig, Division, Allocation, AllocationsError, AllocationsPreview, AllocationDetails, CustomField, InvoicesList, InvoicesParams, };
|
|
@@ -6,6 +6,7 @@ export declare type Subscription = {
|
|
|
6
6
|
balance_in_cents: number;
|
|
7
7
|
current_period_ends_at: string | null;
|
|
8
8
|
next_assessment_at: string | null;
|
|
9
|
+
next_product_id?: number | null;
|
|
9
10
|
current_billing_amount_in_cents: number;
|
|
10
11
|
automatically_resume_at: string | null;
|
|
11
12
|
expires_at: string | null;
|
|
@@ -15,16 +16,7 @@ export declare type Subscription = {
|
|
|
15
16
|
billing: {
|
|
16
17
|
payment_profile_connected: boolean;
|
|
17
18
|
} & SubscriptionPaymentProfile;
|
|
18
|
-
product:
|
|
19
|
-
id: number;
|
|
20
|
-
name: string;
|
|
21
|
-
price_in_cents: number;
|
|
22
|
-
interval: number;
|
|
23
|
-
interval_unit: 'day' | 'month';
|
|
24
|
-
trial_price_in_cents: number | null;
|
|
25
|
-
trial_interval: string | null;
|
|
26
|
-
trial_interval_unit: string | null;
|
|
27
|
-
};
|
|
19
|
+
product: SubscriptionProduct;
|
|
28
20
|
components: {
|
|
29
21
|
updates_allowed: boolean;
|
|
30
22
|
used_in_billing: boolean;
|
|
@@ -41,3 +33,13 @@ export declare type ChurnReason = {
|
|
|
41
33
|
description: string;
|
|
42
34
|
position: number;
|
|
43
35
|
};
|
|
36
|
+
export declare type SubscriptionProduct = {
|
|
37
|
+
id: number;
|
|
38
|
+
name: string;
|
|
39
|
+
price_in_cents: number;
|
|
40
|
+
interval: number;
|
|
41
|
+
interval_unit: 'day' | 'month';
|
|
42
|
+
trial_price_in_cents: number | null;
|
|
43
|
+
trial_interval: string | null;
|
|
44
|
+
trial_interval_unit: string | null;
|
|
45
|
+
};
|
package/typings/packages/subscriptions-manager/src/components/CustomFieldsForm/CustomFieldsForm.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
2
|
import { CustomField } from "../../../../custom-fields/src";
|
|
3
3
|
declare type CustomFieldsFormProps = {
|
|
4
4
|
customFields: CustomField[];
|
|
5
5
|
onChange: (id: number, value: string | number) => void;
|
|
6
6
|
isError: boolean;
|
|
7
|
+
portalContainer: MutableRefObject<HTMLDivElement>;
|
|
7
8
|
};
|
|
8
|
-
declare const CustomFieldsForm: ({ customFields, onChange, isError, }: CustomFieldsFormProps) => JSX.Element;
|
|
9
|
+
declare const CustomFieldsForm: ({ customFields, onChange, isError, portalContainer, }: CustomFieldsFormProps) => JSX.Element;
|
|
9
10
|
export default CustomFieldsForm;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PaymentProfile } from '../../models/paymentProfile';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
paymentProfiles: PaymentProfile[];
|
|
5
|
+
onPaymentProfileSelected: (paymentProfile: PaymentProfile['id']) => void;
|
|
6
|
+
selectedPaymentProfilesIds?: number[];
|
|
7
|
+
};
|
|
8
|
+
export declare const PaymentProfilesReplace: ({ paymentProfiles, selectedPaymentProfilesIds, onPaymentProfileSelected, }: Props) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PaymentProfile } from '../../../../models/paymentProfile';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
paymentProfile: PaymentProfile;
|
|
5
|
+
onPaymentProfileSelected: (paymentProfileId: number) => void;
|
|
6
|
+
isChecked: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const PaymentProfileItem: ({ paymentProfile, onPaymentProfileSelected, isChecked, }: Props) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LabelWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatCardNumber: (cardNumber: string) => string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SpaceProps } from 'styled-system';
|
|
2
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const List: import("styled-components").StyledComponent<"ul", any, SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, never>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
subscriptions: {
|
|
4
|
+
success: {
|
|
5
|
+
id: number;
|
|
6
|
+
product: {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
}[];
|
|
10
|
+
failed: {
|
|
11
|
+
id: number;
|
|
12
|
+
product: {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
onRetry: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const PaymentProfilesReplaceAlerts: ({ subscriptions, onRetry, }: Props) => JSX.Element;
|
|
20
|
+
export {};
|
package/typings/packages/subscriptions-manager/src/components/PlanChangeAlerts/PlanChangeAlerts.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChangePlanPreview } from '../../machines/changePlan';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
productChangeStrategy: ChangePlanPreview['productChangeStrategy'];
|
|
5
|
+
nextBillingDate: string;
|
|
6
|
+
basePlanPrice: string;
|
|
7
|
+
totalCharge: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const PlanChangeAlerts: ({ basePlanPrice, productChangeStrategy, nextBillingDate, totalCharge, }: Props) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
productName: string;
|
|
4
|
+
basePlanPrice: string;
|
|
5
|
+
isProrated: boolean;
|
|
6
|
+
existingBalance: string;
|
|
7
|
+
billingEndDate: string;
|
|
8
|
+
nextBillingAmount: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const PlanChangeSummary: ({ productName, basePlanPrice, isProrated, existingBalance, billingEndDate, nextBillingAmount, }: Props) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Currency } from "../../../../formatters/src";
|
|
3
|
+
import { ChangePlanPreview } from '../../machines/changePlan';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
currency: Currency;
|
|
6
|
+
changePlanPreview: ChangePlanPreview;
|
|
7
|
+
};
|
|
8
|
+
export declare const PlanChangeSummaryCharges: ({ changePlanPreview, currency, }: Props) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TFunction } from 'react-i18next';
|
|
2
|
+
import { Currency } from "../../../../../formatters/src";
|
|
3
|
+
import { SummaryTableRows } from "../../../../../custom-ui-components/src";
|
|
4
|
+
import { ChangePlanPreview } from '../../../machines/changePlan';
|
|
5
|
+
declare type Params = {
|
|
6
|
+
changePlanPreview: ChangePlanPreview;
|
|
7
|
+
t: TFunction<'subscriptions-manager'[]>;
|
|
8
|
+
language: string;
|
|
9
|
+
currency: Currency;
|
|
10
|
+
};
|
|
11
|
+
export declare const mapChargeSummaryToTable: ({ changePlanPreview, t, language, currency, }: Params) => SummaryTableRows;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type PlanRadioProps = {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
price: string;
|
|
6
|
+
interval: number;
|
|
7
|
+
intervalUnit: string;
|
|
8
|
+
selected: boolean;
|
|
9
|
+
onClick: (id: number) => void;
|
|
10
|
+
isCurrentPlan: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const PlanRadio: ({ selected, onClick, name, id, isCurrentPlan, price, intervalUnit, }: PlanRadioProps) => JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SpaceProps } from 'styled-system';
|
|
2
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"label", any, {
|
|
3
|
+
selected: boolean;
|
|
4
|
+
} & SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -9,6 +9,12 @@ export declare type Props = {
|
|
|
9
9
|
color?: string;
|
|
10
10
|
value: string;
|
|
11
11
|
fontWeight?: FontWeightType;
|
|
12
|
+
subValue?: {
|
|
13
|
+
value: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
fontWeight?: FontWeightType;
|
|
16
|
+
fontSize?: number;
|
|
17
|
+
};
|
|
12
18
|
};
|
|
13
19
|
};
|
|
14
20
|
declare const DetailRow: ({ label, value }: Props) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type Props = {
|
|
3
|
+
basePlanPrice: string;
|
|
4
|
+
nextBillingAmount: string;
|
|
5
|
+
nextBillingDate: string;
|
|
6
|
+
};
|
|
7
|
+
declare const PlanChangeScheduled: ({ basePlanPrice, nextBillingAmount, nextBillingDate, }: Props) => JSX.Element;
|
|
8
|
+
export default PlanChangeScheduled;
|
|
@@ -8,4 +8,5 @@ import { OnHold } from './OnHold';
|
|
|
8
8
|
import { Trial } from './Trial';
|
|
9
9
|
import { TrialExpired } from './TrialExpired';
|
|
10
10
|
import { Unpaid } from './Unpaid';
|
|
11
|
-
|
|
11
|
+
import { PlanChangeScheduled } from './PlanChangeScheduled';
|
|
12
|
+
export { PlanChangeScheduled, Active, Canceled, CancellationScheduled, DetailRow, Expired, PastDue, OnHold, Trial, TrialExpired, Unpaid, };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { MarginProps, PaddingProps } from 'styled-system';
|
|
2
2
|
export declare const Summary: import("styled-components").StyledComponent<"div", any, PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & MarginProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
|
3
|
-
export declare const TotalCharge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/typings/packages/subscriptions-manager/src/components/TotalCharge/TotalCharge.styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TotalCharge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -6,6 +6,10 @@ import ComponentsPreview, { createComponentsPreviewRow } from './ComponentsPrevi
|
|
|
6
6
|
import ComponentsAllocationEdit from './ComponentsAllocationEdit';
|
|
7
7
|
import ComponentsAllocationPreview from './ComponentsAllocationPreview';
|
|
8
8
|
import SubscriptionManagerLoader from './SubscriptionManagerLoader';
|
|
9
|
-
|
|
9
|
+
import PlanChangeAlerts from './PlanChangeAlerts';
|
|
10
|
+
import { Summary } from './Summary';
|
|
11
|
+
import { TotalCharge } from './TotalCharge';
|
|
12
|
+
import PlanChangeSummaryCharges from './PlanChangeSummaryCharges';
|
|
13
|
+
export { PlanChangeSummaryCharges, PlanChangeAlerts, TotalCharge, Summary, ContentLoader, Subscription, ShowMore, PaymentProfiles, ComponentsPreview, ComponentsAllocationEdit, ComponentsAllocationPreview, SubscriptionManagerLoader, };
|
|
10
14
|
export { createComponentsPreviewRow };
|
|
11
15
|
export type { SubscriptionLayout };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Currency } from "../../../../formatters/src";
|
|
3
|
+
import { ChangePlanInterpreter } from '../../machines/changePlan/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
changePlanService: ChangePlanInterpreter;
|
|
6
|
+
currentPlanId: number;
|
|
7
|
+
currency: Currency;
|
|
8
|
+
};
|
|
9
|
+
declare const ChangePlanContainer: ({ currentPlanId, currency, changePlanService, }: Props) => JSX.Element;
|
|
10
|
+
export default ChangePlanContainer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Currency } from "../../../../formatters/src";
|
|
3
|
+
import { ChangePlanInterpreter } from '../../machines/changePlan/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
changePlanService: ChangePlanInterpreter;
|
|
6
|
+
currency: Currency;
|
|
7
|
+
};
|
|
8
|
+
export declare const PreviewProductMigrationContainer: ({ changePlanService, currency, }: Props) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PaymentProfileInterpreter } from '../../machines';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
paymentProfileRef: PaymentProfileInterpreter;
|
|
5
|
+
};
|
|
6
|
+
export declare const ReplacePaymentProfilesContainer: ({ paymentProfileRef, }: Props) => JSX.Element;
|
|
7
|
+
export {};
|