@paddle/paddle-node-sdk 0.2.4 → 0.2.6
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/CHANGELOG.md +26 -1
- package/README.md +9 -6
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/price/price-with-includes.d.ts +2 -1
- package/dist/entities/price/price-with-includes.js +2 -0
- package/dist/entities/price/price.d.ts +2 -1
- package/dist/entities/price/price.js +2 -0
- package/dist/entities/pricing-preview/pricing-preview.d.ts +2 -0
- package/dist/entities/pricing-preview/pricing-preview.js +2 -1
- package/dist/entities/product/product-with-includes.d.ts +2 -1
- package/dist/entities/product/product-with-includes.js +2 -0
- package/dist/entities/product/product.d.ts +2 -1
- package/dist/entities/product/product.js +2 -0
- package/dist/entities/report/index.d.ts +4 -0
- package/dist/entities/report/index.js +20 -0
- package/dist/entities/report/report-collection.d.ts +6 -0
- package/dist/entities/report/report-collection.js +11 -0
- package/dist/entities/report/report-csv.d.ts +5 -0
- package/dist/entities/report/report-csv.js +9 -0
- package/dist/entities/report/report-filters.d.ts +8 -0
- package/dist/entities/report/report-filters.js +12 -0
- package/dist/entities/report/report.d.ts +13 -0
- package/dist/entities/report/report.js +17 -0
- package/dist/entities/transaction/transaction-preview.d.ts +2 -0
- package/dist/entities/transaction/transaction-preview.js +2 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/report/index.d.ts +4 -0
- package/dist/enums/report/index.js +20 -0
- package/dist/enums/report/report-filter-name.d.ts +1 -0
- package/dist/enums/report/report-filter-name.js +2 -0
- package/dist/enums/report/report-filter-operator.d.ts +1 -0
- package/dist/enums/report/report-filter-operator.js +2 -0
- package/dist/enums/report/report-status.d.ts +1 -0
- package/dist/enums/report/report-status.js +2 -0
- package/dist/enums/report/report-type.d.ts +1 -0
- package/dist/enums/report/report-type.js +2 -0
- package/dist/enums/shared/available-payment-methods.d.ts +1 -0
- package/dist/enums/shared/available-payment-methods.js +2 -0
- package/dist/enums/shared/catalog-type.d.ts +1 -0
- package/dist/enums/shared/catalog-type.js +2 -0
- package/dist/enums/shared/index.d.ts +1 -0
- package/dist/enums/shared/index.js +1 -0
- package/dist/enums/subscription/index.d.ts +1 -0
- package/dist/enums/subscription/index.js +1 -0
- package/dist/enums/subscription/subscription-on-payment-failure.d.ts +1 -0
- package/dist/enums/subscription/subscription-on-payment-failure.js +2 -0
- package/dist/internal/api/client.js +2 -2
- package/dist/notifications/events/address/address-imported-event.d.ts +9 -0
- package/dist/notifications/events/address/address-imported-event.js +14 -0
- package/dist/notifications/events/address/index.d.ts +1 -0
- package/dist/notifications/events/address/index.js +1 -0
- package/dist/notifications/events/business/business-imported-event.d.ts +9 -0
- package/dist/notifications/events/business/business-imported-event.js +14 -0
- package/dist/notifications/events/business/index.d.ts +1 -0
- package/dist/notifications/events/business/index.js +1 -0
- package/dist/notifications/events/customer/customer-imported-event.d.ts +9 -0
- package/dist/notifications/events/customer/customer-imported-event.js +14 -0
- package/dist/notifications/events/customer/index.d.ts +1 -0
- package/dist/notifications/events/customer/index.js +1 -0
- package/dist/notifications/events/index.d.ts +1 -0
- package/dist/notifications/events/index.js +1 -0
- package/dist/notifications/events/price/index.d.ts +1 -0
- package/dist/notifications/events/price/index.js +1 -0
- package/dist/notifications/events/price/price-imported-event.d.ts +9 -0
- package/dist/notifications/events/price/price-imported-event.js +14 -0
- package/dist/notifications/events/product/index.d.ts +1 -0
- package/dist/notifications/events/product/index.js +1 -0
- package/dist/notifications/events/product/product-imported-event.d.ts +9 -0
- package/dist/notifications/events/product/product-imported-event.js +14 -0
- package/dist/notifications/events/report/index.d.ts +2 -0
- package/dist/notifications/events/report/index.js +18 -0
- package/dist/notifications/events/report/report-created-event.d.ts +9 -0
- package/dist/notifications/events/report/report-created-event.js +14 -0
- package/dist/notifications/events/report/report-updated-event.d.ts +9 -0
- package/dist/notifications/events/report/report-updated-event.js +14 -0
- package/dist/notifications/helpers/types.d.ts +11 -4
- package/dist/notifications/helpers/types.js +7 -0
- package/dist/notifications/helpers/webhooks.js +15 -1
- package/dist/paddle.d.ts +2 -1
- package/dist/paddle.js +1 -0
- package/dist/resources/index.d.ts +1 -0
- package/dist/resources/index.js +1 -0
- package/dist/resources/prices/operations/create-price-request-body.d.ts +2 -1
- package/dist/resources/prices/operations/list-price-query-parameters.d.ts +2 -1
- package/dist/resources/prices/operations/update-price-request-body.d.ts +2 -1
- package/dist/resources/products/operations/create-product-request-body.d.ts +2 -1
- package/dist/resources/products/operations/list-product-query-parameters.d.ts +2 -1
- package/dist/resources/products/operations/update-product-request-body.d.ts +2 -1
- package/dist/resources/reports/index.d.ts +10 -0
- package/dist/resources/reports/index.js +69 -0
- package/dist/resources/reports/operations/create-report-request-object.d.ts +6 -0
- package/dist/resources/reports/operations/create-report-request-object.js +2 -0
- package/dist/resources/reports/operations/index.d.ts +2 -0
- package/dist/resources/reports/operations/index.js +18 -0
- package/dist/resources/reports/operations/list-report-query-parameters.d.ts +7 -0
- package/dist/resources/reports/operations/list-report-query-parameters.js +2 -0
- package/dist/resources/subscriptions/operations/create-subscription-charge-request-object.d.ts +16 -2
- package/dist/resources/subscriptions/operations/update-subscription-request-body.d.ts +2 -1
- package/dist/resources/transactions/operations/create-transaction-request-body.d.ts +2 -2
- package/dist/resources/transactions/operations/update-transaction-request-body.d.ts +2 -2
- package/dist/types/events/events-response.d.ts +23 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/price/index.d.ts +2 -0
- package/dist/types/price/index.js +2 -0
- package/dist/types/price/non-catalog-price-request.d.ts +24 -0
- package/dist/types/price/non-catalog-price-request.js +2 -0
- package/dist/types/price/price-response.d.ts +2 -1
- package/dist/types/price/subscription-non-catalog-price-request.d.ts +22 -0
- package/dist/types/price/subscription-non-catalog-price-request.js +2 -0
- package/dist/types/pricing-preview/pricing-preview-response.d.ts +2 -0
- package/dist/types/product/product-response.d.ts +2 -1
- package/dist/types/report/index.d.ts +3 -0
- package/dist/types/report/index.js +19 -0
- package/dist/types/report/report-filters.d.ts +6 -0
- package/dist/types/report/report-filters.js +2 -0
- package/dist/types/report/report.d.ts +11 -0
- package/dist/types/report/report.js +2 -0
- package/dist/types/report/reports-csv.d.ts +3 -0
- package/dist/types/report/reports-csv.js +2 -0
- package/dist/types/shared/shared-price-response.d.ts +2 -1
- package/dist/types/shared/shared-product-response.d.ts +2 -1
- package/dist/types/transaction/transaction-item.d.ts +9 -1
- package/dist/types/transaction/transaction-preview-item.d.ts +12 -2
- package/dist/types/transaction/transaction-preview-response.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IBillingDetailsUpdate, type
|
|
1
|
+
import { type IBillingDetailsUpdate, type ICustomData, type ITransactionCheckout, type ITransactionItemWithNonCatalogPrice, type ITransactionsTimePeriod } from '../../../types';
|
|
2
2
|
import { type CollectionMode, type CurrencyCode, type TransactionStatus } from '../../../enums';
|
|
3
3
|
export interface UpdateTransactionRequestBody {
|
|
4
4
|
status?: TransactionStatus;
|
|
@@ -11,6 +11,6 @@ export interface UpdateTransactionRequestBody {
|
|
|
11
11
|
discountId?: string | null;
|
|
12
12
|
billingDetails?: IBillingDetailsUpdate | null;
|
|
13
13
|
billingPeriod?: ITransactionsTimePeriod | null;
|
|
14
|
-
items?:
|
|
14
|
+
items?: ITransactionItemWithNonCatalogPrice[];
|
|
15
15
|
checkout?: ITransactionCheckout | null;
|
|
16
16
|
}
|
|
@@ -9,6 +9,7 @@ import { type IProductResponse } from '../product';
|
|
|
9
9
|
import { type ISubscriptionNotificationResponse } from '../subscription';
|
|
10
10
|
import { type ITransactionResponse } from '../transaction';
|
|
11
11
|
import { type IPayoutResponse } from '../payout';
|
|
12
|
+
import { type IReportResponse } from '../report';
|
|
12
13
|
export interface IEventsResponse<T = object> {
|
|
13
14
|
event_id: string;
|
|
14
15
|
notification_id: string;
|
|
@@ -22,6 +23,9 @@ interface IAddressCreated extends IEventsResponse<IAddressResponse> {
|
|
|
22
23
|
interface IAddressUpdated extends IEventsResponse<IAddressResponse> {
|
|
23
24
|
event_type: EventName.AddressUpdated;
|
|
24
25
|
}
|
|
26
|
+
interface IAddressImported extends IEventsResponse<IAddressResponse> {
|
|
27
|
+
event_type: EventName.AddressImported;
|
|
28
|
+
}
|
|
25
29
|
interface IAdjustmentCreated extends IEventsResponse<IAdjustmentResponse> {
|
|
26
30
|
event_type: EventName.AdjustmentCreated;
|
|
27
31
|
}
|
|
@@ -34,12 +38,18 @@ interface IBusinessCreated extends IEventsResponse<IBusinessResponse> {
|
|
|
34
38
|
interface IBusinessUpdated extends IEventsResponse<IBusinessResponse> {
|
|
35
39
|
event_type: EventName.BusinessUpdated;
|
|
36
40
|
}
|
|
41
|
+
interface IBusinessImported extends IEventsResponse<IBusinessResponse> {
|
|
42
|
+
event_type: EventName.BusinessImported;
|
|
43
|
+
}
|
|
37
44
|
interface ICustomerCreated extends IEventsResponse<ICustomerResponse> {
|
|
38
45
|
event_type: EventName.CustomerCreated;
|
|
39
46
|
}
|
|
40
47
|
interface ICustomerUpdated extends IEventsResponse<ICustomerResponse> {
|
|
41
48
|
event_type: EventName.CustomerUpdated;
|
|
42
49
|
}
|
|
50
|
+
interface ICustomerImported extends IEventsResponse<ICustomerResponse> {
|
|
51
|
+
event_type: EventName.CustomerImported;
|
|
52
|
+
}
|
|
43
53
|
interface IDiscountCreated extends IEventsResponse<IDiscountResponse> {
|
|
44
54
|
event_type: EventName.DiscountCreated;
|
|
45
55
|
}
|
|
@@ -61,12 +71,18 @@ interface IPriceCreated extends IEventsResponse<IPriceResponse> {
|
|
|
61
71
|
interface IPriceUpdated extends IEventsResponse<IPriceResponse> {
|
|
62
72
|
event_type: EventName.PriceUpdated;
|
|
63
73
|
}
|
|
74
|
+
interface IPriceImported extends IEventsResponse<IPriceResponse> {
|
|
75
|
+
event_type: EventName.PriceImported;
|
|
76
|
+
}
|
|
64
77
|
interface IProductCreated extends IEventsResponse<IProductResponse> {
|
|
65
78
|
event_type: EventName.ProductCreated;
|
|
66
79
|
}
|
|
67
80
|
interface IProductUpdated extends IEventsResponse<IProductResponse> {
|
|
68
81
|
event_type: EventName.ProductUpdated;
|
|
69
82
|
}
|
|
83
|
+
interface IProductImported extends IEventsResponse<IProductResponse> {
|
|
84
|
+
event_type: EventName.ProductImported;
|
|
85
|
+
}
|
|
70
86
|
interface ISubscriptionActivated extends IEventsResponse<ISubscriptionNotificationResponse> {
|
|
71
87
|
event_type: EventName.SubscriptionActivated;
|
|
72
88
|
}
|
|
@@ -121,5 +137,11 @@ interface ITransactionReady extends IEventsResponse<ITransactionResponse> {
|
|
|
121
137
|
interface ITransactionUpdated extends IEventsResponse<ITransactionResponse> {
|
|
122
138
|
event_type: EventName.TransactionUpdated;
|
|
123
139
|
}
|
|
124
|
-
|
|
140
|
+
interface IReportCreated extends IEventsResponse<IReportResponse> {
|
|
141
|
+
event_type: EventName.ReportCreated;
|
|
142
|
+
}
|
|
143
|
+
interface IReportUpdated extends IEventsResponse<IReportResponse> {
|
|
144
|
+
event_type: EventName.ReportUpdated;
|
|
145
|
+
}
|
|
146
|
+
export type IEvents = IAddressCreated | IAddressUpdated | IAddressImported | IAdjustmentCreated | IAdjustmentUpdated | IBusinessCreated | IBusinessUpdated | IBusinessImported | ICustomerCreated | ICustomerUpdated | ICustomerImported | IDiscountCreated | IDiscountUpdated | IDiscountImported | IPayoutCreated | IPayoutPaid | IPriceCreated | IPriceUpdated | IPriceImported | IProductCreated | IProductUpdated | IProductImported | ISubscriptionActivated | ISubscriptionCanceled | ISubscriptionCreated | ISubscriptionImported | ISubscriptionPastDue | ISubscriptionPaused | ISubscriptionResumed | ISubscriptionTrialing | ISubscriptionUpdated | ITransactionBilled | ITransactionCanceled | ITransactionCompleted | ITransactionCreated | ITransactionPaid | ITransactionPastDue | ITransactionPaymentFailed | ITransactionReady | ITransactionUpdated | IReportCreated | IReportUpdated;
|
|
125
147
|
export {};
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./price-response"), exports);
|
|
18
|
+
__exportStar(require("./subscription-non-catalog-price-request"), exports);
|
|
19
|
+
__exportStar(require("./non-catalog-price-request"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ICustomData, IMoney, IPriceQuantity, ITimePeriod, IUnitPriceOverride } from '../shared';
|
|
2
|
+
import type { TaxMode } from '../../enums';
|
|
3
|
+
import type { CreateProductRequestBody } from '../../resources';
|
|
4
|
+
interface INonCatalogBasePriceRequestBody {
|
|
5
|
+
name?: string | null;
|
|
6
|
+
description: string;
|
|
7
|
+
unitPrice: IMoney;
|
|
8
|
+
billingCycle?: ITimePeriod | null;
|
|
9
|
+
trialPeriod?: ITimePeriod | null;
|
|
10
|
+
taxMode?: TaxMode;
|
|
11
|
+
unitPriceOverrides?: IUnitPriceOverride[];
|
|
12
|
+
quantity?: IPriceQuantity;
|
|
13
|
+
customData?: ICustomData | null;
|
|
14
|
+
}
|
|
15
|
+
interface INonCatalogBasePriceRequestBodyWithProductId extends INonCatalogBasePriceRequestBody {
|
|
16
|
+
productId: string;
|
|
17
|
+
product?: never;
|
|
18
|
+
}
|
|
19
|
+
interface INonCatalogBasePriceRequestBodyWithProduct extends INonCatalogBasePriceRequestBody {
|
|
20
|
+
productId?: never;
|
|
21
|
+
product: Omit<CreateProductRequestBody, 'type'>;
|
|
22
|
+
}
|
|
23
|
+
export type INonCatalogPriceRequestBody = INonCatalogBasePriceRequestBodyWithProductId | INonCatalogBasePriceRequestBodyWithProduct;
|
|
24
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ITimePeriod, type IMoneyResponse, type IUnitPriceOverrideResponse, type IPriceQuantity, type ICustomData, type ISharedProductResponse, type IImportMetaResponse } from '../index';
|
|
2
|
-
import { type TaxMode, type Status } from '../../enums';
|
|
2
|
+
import { type TaxMode, type Status, type CatalogType } from '../../enums';
|
|
3
3
|
export interface IPriceResponse {
|
|
4
4
|
id: string;
|
|
5
5
|
product_id: string;
|
|
6
6
|
description: string;
|
|
7
|
+
type?: CatalogType | null;
|
|
7
8
|
name?: string | null;
|
|
8
9
|
billing_cycle?: ITimePeriod | null;
|
|
9
10
|
trial_period?: ITimePeriod | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TaxMode } from '../../enums';
|
|
2
|
+
import type { ICustomData, IMoney, IPriceQuantity, IUnitPriceOverride } from '../shared';
|
|
3
|
+
import { type CreateProductRequestBody } from '../../resources';
|
|
4
|
+
interface INonCatalogBasePriceRequest {
|
|
5
|
+
name?: string | null;
|
|
6
|
+
description: string;
|
|
7
|
+
unitPrice: IMoney;
|
|
8
|
+
taxMode?: TaxMode;
|
|
9
|
+
unitPriceOverrides?: IUnitPriceOverride[];
|
|
10
|
+
quantity?: IPriceQuantity;
|
|
11
|
+
customData?: ICustomData | null;
|
|
12
|
+
}
|
|
13
|
+
interface INonCatalogPriceRequestWithProductId extends INonCatalogBasePriceRequest {
|
|
14
|
+
productId: string;
|
|
15
|
+
product?: never;
|
|
16
|
+
}
|
|
17
|
+
interface INonCatalogPriceRequestWithProduct extends INonCatalogBasePriceRequest {
|
|
18
|
+
productId?: never;
|
|
19
|
+
product: Omit<CreateProductRequestBody, 'type'>;
|
|
20
|
+
}
|
|
21
|
+
export type ISubscriptionNonCatalogPriceRequest = INonCatalogPriceRequestWithProductId | INonCatalogPriceRequestWithProduct;
|
|
22
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import { type CurrencyCode } from '../../enums';
|
|
|
2
2
|
import { type IAddressPreviewResponse } from '../../resources';
|
|
3
3
|
import { type IPricingPreviewItemResponse } from './pricing-preview-item-response';
|
|
4
4
|
import { type IPricingPreviewDetailsResponse } from './pricing-preview-details-response';
|
|
5
|
+
import { type AvailablePaymentMethod } from '../../enums/shared/available-payment-methods';
|
|
5
6
|
export interface IPricingPreviewResponse {
|
|
6
7
|
customer_id?: string | null;
|
|
7
8
|
address_id?: string | null;
|
|
@@ -12,4 +13,5 @@ export interface IPricingPreviewResponse {
|
|
|
12
13
|
customer_ip_address?: string | null;
|
|
13
14
|
items: IPricingPreviewItemResponse[];
|
|
14
15
|
details?: IPricingPreviewDetailsResponse | null;
|
|
16
|
+
available_payment_method?: AvailablePaymentMethod | null;
|
|
15
17
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ICustomData, type IImportMetaResponse, type ISharedPriceResponse } from '../index';
|
|
2
|
-
import { type TaxCategory, type Status } from '../../enums';
|
|
2
|
+
import { type TaxCategory, type Status, type CatalogType } from '../../enums';
|
|
3
3
|
export interface IProductResponse {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
|
+
type?: CatalogType | null;
|
|
6
7
|
description?: string | null;
|
|
7
8
|
tax_category: TaxCategory;
|
|
8
9
|
image_url?: string | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./report-filters"), exports);
|
|
18
|
+
__exportStar(require("./report"), exports);
|
|
19
|
+
__exportStar(require("./reports-csv"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type IReportFilters } from '../index';
|
|
2
|
+
import { type ReportType, type ReportStatus } from '../../enums';
|
|
3
|
+
export interface IReportResponse {
|
|
4
|
+
id: string;
|
|
5
|
+
status: ReportStatus;
|
|
6
|
+
rows?: number | null;
|
|
7
|
+
type: ReportType;
|
|
8
|
+
filters: IReportFilters[];
|
|
9
|
+
expires_at?: string | null;
|
|
10
|
+
created_at: string;
|
|
11
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ITimePeriod, type IMoneyResponse, type IUnitPriceOverrideResponse, type IPriceQuantity, type ICustomData, type IImportMetaResponse } from '../index';
|
|
2
|
-
import { type TaxMode, type Status } from '../../enums';
|
|
2
|
+
import { type TaxMode, type Status, type CatalogType } from '../../enums';
|
|
3
3
|
export interface ISharedPriceResponse {
|
|
4
4
|
id: string;
|
|
5
5
|
product_id: string;
|
|
6
6
|
description: string;
|
|
7
|
+
type?: CatalogType | null;
|
|
7
8
|
name?: string | null;
|
|
8
9
|
billing_cycle?: ITimePeriod | null;
|
|
9
10
|
trial_period?: ITimePeriod | null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ICustomData, type IImportMetaResponse } from '../index';
|
|
2
|
-
import { type TaxCategory, type Status } from '../../enums';
|
|
2
|
+
import { type TaxCategory, type Status, type CatalogType } from '../../enums';
|
|
3
3
|
export interface ISharedProductResponse {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
|
+
type?: CatalogType | null;
|
|
6
7
|
description?: string | null;
|
|
7
8
|
tax_category: TaxCategory;
|
|
8
9
|
image_url?: string | null;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { type INonCatalogPriceRequestBody } from '../price';
|
|
2
|
+
export interface ITransactionItemWithPriceId {
|
|
2
3
|
priceId: string;
|
|
4
|
+
price?: never;
|
|
3
5
|
quantity: number;
|
|
4
6
|
}
|
|
7
|
+
export interface ITransactionItemWithPrice {
|
|
8
|
+
priceId?: never;
|
|
9
|
+
price: INonCatalogPriceRequestBody;
|
|
10
|
+
quantity: number;
|
|
11
|
+
}
|
|
12
|
+
export type ITransactionItemWithNonCatalogPrice = ITransactionItemWithPriceId | ITransactionItemWithPrice;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { type INonCatalogPriceRequestBody } from '../price';
|
|
2
|
+
interface IBaseTransactionItemPreview {
|
|
3
3
|
quantity: number;
|
|
4
4
|
includeInTotals?: boolean | null;
|
|
5
5
|
}
|
|
6
|
+
interface ITransactionItemWithPriceId extends IBaseTransactionItemPreview {
|
|
7
|
+
priceId: string;
|
|
8
|
+
price?: never;
|
|
9
|
+
}
|
|
10
|
+
interface ITransactionItemWithPrice extends IBaseTransactionItemPreview {
|
|
11
|
+
priceId?: never;
|
|
12
|
+
price: INonCatalogPriceRequestBody;
|
|
13
|
+
}
|
|
14
|
+
export type ITransactionItemPreviewRequest = ITransactionItemWithPriceId | ITransactionItemWithPrice;
|
|
15
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import { type IAddressPreviewResponse } from '../../resources';
|
|
|
3
3
|
import { type ITransactionDetailsPreviewResponse } from '../shared';
|
|
4
4
|
import { type IPriceResponse } from '../price';
|
|
5
5
|
import { type ITransactionsTimePeriodResponse } from './transactions-time-period-response';
|
|
6
|
+
import { type AvailablePaymentMethod } from '../../enums/shared/available-payment-methods';
|
|
6
7
|
export interface IProrationResponse {
|
|
7
8
|
rate: string;
|
|
8
9
|
billing_period: ITransactionsTimePeriodResponse;
|
|
@@ -24,4 +25,5 @@ export interface ITransactionPreviewResponse {
|
|
|
24
25
|
ignore_trials?: boolean | null;
|
|
25
26
|
items: ITransactionItemPreviewResponse[];
|
|
26
27
|
details: ITransactionDetailsPreviewResponse;
|
|
28
|
+
available_payment_method?: AvailablePaymentMethod | null;
|
|
27
29
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.6";
|
package/dist/version.js
CHANGED