@paddle/paddle-node-sdk 0.2.3 → 0.2.4
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 +10 -0
- package/dist/entities/address/address.d.ts +2 -1
- package/dist/entities/address/address.js +2 -0
- package/dist/entities/business/business.d.ts +2 -1
- package/dist/entities/business/business.js +1 -0
- package/dist/entities/customer/customer.d.ts +2 -1
- package/dist/entities/customer/customer.js +2 -0
- package/dist/entities/discount/discount.d.ts +2 -1
- package/dist/entities/discount/discount.js +2 -0
- package/dist/entities/shared/transaction-payout-totals.d.ts +1 -0
- package/dist/entities/shared/transaction-payout-totals.js +1 -0
- package/dist/entities/shared/transaction-totals.d.ts +1 -0
- package/dist/entities/shared/transaction-totals.js +1 -0
- package/dist/entities/subscription/subscription-includes.d.ts +2 -1
- package/dist/entities/subscription/subscription-includes.js +1 -0
- package/dist/entities/subscription/subscription-preview.d.ts +2 -1
- package/dist/entities/subscription/subscription-preview.js +1 -0
- package/dist/entities/subscription/subscription.d.ts +2 -1
- package/dist/entities/subscription/subscription.js +1 -0
- package/dist/resources/transactions/operations/list-transaction-query-parameters.d.ts +2 -1
- package/dist/types/address/address-response.d.ts +2 -1
- package/dist/types/business/business-response.d.ts +2 -1
- package/dist/types/customer/customer-response.d.ts +2 -1
- package/dist/types/discount/discount-response.d.ts +2 -1
- package/dist/types/shared/transaction-payout-totals-response.d.ts +1 -0
- package/dist/types/shared/transaction-totals-response.d.ts +1 -0
- package/dist/types/subscription/subscription-preview-response.d.ts +2 -1
- package/dist/types/subscription/subscription-response.d.ts +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
8
8
|
|
|
9
9
|
Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-node-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.
|
|
10
10
|
|
|
11
|
+
## 0.2.4 - 2023-12-14
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Added `importMeta` to address, business, customer, discount and subscription entities
|
|
16
|
+
- Added `creditToBalance` to `transaction.details.payoutTotals` and `transaction.details.totals`
|
|
17
|
+
- Added `origin` query parameter to list transactions, see [related changelog](https://developer.paddle.com/changelog/2023/filter-transactions-origin?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
11
21
|
## 0.2.3 - 2023-12-12
|
|
12
22
|
|
|
13
23
|
### Added
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CustomData } from '../index';
|
|
1
|
+
import { type CustomData, ImportMeta } from '../index';
|
|
2
2
|
import { type CountryCode, type Status } from '../../enums';
|
|
3
3
|
import { type IAddressResponse } from '../../types';
|
|
4
4
|
export declare class Address {
|
|
@@ -14,5 +14,6 @@ export declare class Address {
|
|
|
14
14
|
readonly status: Status;
|
|
15
15
|
readonly createdAt: string;
|
|
16
16
|
readonly updatedAt: string;
|
|
17
|
+
readonly importMeta: ImportMeta | null;
|
|
17
18
|
constructor(address: IAddressResponse);
|
|
18
19
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Address = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
4
5
|
class Address {
|
|
5
6
|
constructor(address) {
|
|
6
7
|
this.id = address.id;
|
|
@@ -15,6 +16,7 @@ class Address {
|
|
|
15
16
|
this.status = address.status;
|
|
16
17
|
this.createdAt = address.created_at;
|
|
17
18
|
this.updatedAt = address.updated_at;
|
|
19
|
+
this.importMeta = address.import_meta ? new index_1.ImportMeta(address.import_meta) : null;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
exports.Address = Address;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Contacts, type CustomData } from '../index';
|
|
1
|
+
import { Contacts, type CustomData, ImportMeta } from '../index';
|
|
2
2
|
import { type Status } from '../../enums';
|
|
3
3
|
import { type IBusinessResponse } from '../../types';
|
|
4
4
|
export declare class Business {
|
|
@@ -11,5 +11,6 @@ export declare class Business {
|
|
|
11
11
|
readonly createdAt: string;
|
|
12
12
|
readonly updatedAt: string;
|
|
13
13
|
readonly customData: CustomData | null;
|
|
14
|
+
readonly importMeta: ImportMeta | null;
|
|
14
15
|
constructor(business: IBusinessResponse);
|
|
15
16
|
}
|
|
@@ -13,6 +13,7 @@ class Business {
|
|
|
13
13
|
this.createdAt = business.created_at;
|
|
14
14
|
this.updatedAt = business.updated_at;
|
|
15
15
|
this.customData = business.custom_data ? business.custom_data : null;
|
|
16
|
+
this.importMeta = business.import_meta ? new index_1.ImportMeta(business.import_meta) : null;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
exports.Business = Business;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CustomData } from '../index';
|
|
1
|
+
import { type CustomData, ImportMeta } from '../index';
|
|
2
2
|
import { type Status } from '../../enums';
|
|
3
3
|
import { type ICustomerResponse } from '../../types';
|
|
4
4
|
export declare class Customer {
|
|
@@ -11,5 +11,6 @@ export declare class Customer {
|
|
|
11
11
|
readonly locale: string;
|
|
12
12
|
readonly createdAt: string;
|
|
13
13
|
readonly updatedAt: string;
|
|
14
|
+
readonly importMeta: ImportMeta | null;
|
|
14
15
|
constructor(customer: ICustomerResponse);
|
|
15
16
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Customer = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
4
5
|
class Customer {
|
|
5
6
|
constructor(customer) {
|
|
6
7
|
this.id = customer.id;
|
|
@@ -12,6 +13,7 @@ class Customer {
|
|
|
12
13
|
this.locale = customer.locale;
|
|
13
14
|
this.createdAt = customer.created_at;
|
|
14
15
|
this.updatedAt = customer.updated_at;
|
|
16
|
+
this.importMeta = customer.import_meta ? new index_1.ImportMeta(customer.import_meta) : null;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
exports.Customer = Customer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums';
|
|
2
2
|
import { type IDiscountResponse } from '../../types';
|
|
3
|
-
import { type CustomData } from '../index';
|
|
3
|
+
import { type CustomData, ImportMeta } from '../index';
|
|
4
4
|
export declare class Discount {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly status: DiscountStatus;
|
|
@@ -19,5 +19,6 @@ export declare class Discount {
|
|
|
19
19
|
readonly timesUsed: number | null;
|
|
20
20
|
readonly createdAt: string;
|
|
21
21
|
readonly updatedAt: string;
|
|
22
|
+
readonly importMeta: ImportMeta | null;
|
|
22
23
|
constructor(discount: IDiscountResponse);
|
|
23
24
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Discount = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
4
5
|
class Discount {
|
|
5
6
|
constructor(discount) {
|
|
6
7
|
var _a;
|
|
@@ -21,6 +22,7 @@ class Discount {
|
|
|
21
22
|
this.timesUsed = (_a = discount.times_used) !== null && _a !== void 0 ? _a : null;
|
|
22
23
|
this.createdAt = discount.created_at;
|
|
23
24
|
this.updatedAt = discount.updated_at;
|
|
25
|
+
this.importMeta = discount.import_meta ? new index_1.ImportMeta(discount.import_meta) : null;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
exports.Discount = Discount;
|
|
@@ -8,6 +8,7 @@ class TransactionPayoutTotals {
|
|
|
8
8
|
this.tax = transactionPayoutTotals.tax;
|
|
9
9
|
this.total = transactionPayoutTotals.total;
|
|
10
10
|
this.credit = transactionPayoutTotals.credit;
|
|
11
|
+
this.creditToBalance = transactionPayoutTotals.credit_to_balance;
|
|
11
12
|
this.balance = transactionPayoutTotals.balance;
|
|
12
13
|
this.grandTotal = transactionPayoutTotals.grand_total;
|
|
13
14
|
this.fee = transactionPayoutTotals.fee;
|
|
@@ -8,6 +8,7 @@ class TransactionTotals {
|
|
|
8
8
|
this.tax = transactionTotals.tax;
|
|
9
9
|
this.total = transactionTotals.total;
|
|
10
10
|
this.credit = transactionTotals.credit;
|
|
11
|
+
this.creditToBalance = transactionTotals.credit_to_balance;
|
|
11
12
|
this.balance = transactionTotals.balance;
|
|
12
13
|
this.grandTotal = transactionTotals.grand_total;
|
|
13
14
|
this.fee = transactionTotals.fee ? transactionTotals.fee : null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillingDetails, type CustomData, NextTransaction, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod, TransactionDetailsPreview } from '../index';
|
|
1
|
+
import { BillingDetails, type CustomData, ImportMeta, NextTransaction, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod, TransactionDetailsPreview } from '../index';
|
|
2
2
|
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
3
3
|
import { type ISubscriptionResponse } from '../../types';
|
|
4
4
|
export declare class SubscriptionIncludes {
|
|
@@ -24,6 +24,7 @@ export declare class SubscriptionIncludes {
|
|
|
24
24
|
readonly managementUrls: SubscriptionManagement | null;
|
|
25
25
|
readonly items: SubscriptionItem[];
|
|
26
26
|
readonly customData: CustomData | null;
|
|
27
|
+
readonly importMeta: ImportMeta | null;
|
|
27
28
|
readonly nextTransaction: NextTransaction | null;
|
|
28
29
|
readonly recurringTransactionDetails: TransactionDetailsPreview | null;
|
|
29
30
|
constructor(subscription: ISubscriptionResponse);
|
|
@@ -32,6 +32,7 @@ class SubscriptionIncludes {
|
|
|
32
32
|
: null;
|
|
33
33
|
this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
|
|
34
34
|
this.customData = subscription.custom_data ? subscription.custom_data : null;
|
|
35
|
+
this.importMeta = subscription.import_meta ? new index_1.ImportMeta(subscription.import_meta) : null;
|
|
35
36
|
this.nextTransaction = subscription.next_transaction ? new index_1.NextTransaction(subscription.next_transaction) : null;
|
|
36
37
|
this.recurringTransactionDetails = subscription.recurring_transaction_details
|
|
37
38
|
? new index_1.TransactionDetailsPreview(subscription.recurring_transaction_details)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ISubscriptionPreviewResponse } from '../../types';
|
|
2
|
-
import { BillingDetails, type CustomData, NextTransaction, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionPreviewUpdateSummary, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod, TransactionDetailsPreview } from '../index';
|
|
2
|
+
import { BillingDetails, type CustomData, ImportMeta, NextTransaction, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionPreviewUpdateSummary, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod, TransactionDetailsPreview } from '../index';
|
|
3
3
|
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
4
4
|
export declare class SubscriptionPreview {
|
|
5
5
|
readonly status: SubscriptionStatus;
|
|
@@ -27,5 +27,6 @@ export declare class SubscriptionPreview {
|
|
|
27
27
|
readonly nextTransaction: NextTransaction | null;
|
|
28
28
|
readonly recurringTransactionDetails: TransactionDetailsPreview | null;
|
|
29
29
|
readonly updateSummary: SubscriptionPreviewUpdateSummary | null;
|
|
30
|
+
readonly importMeta: ImportMeta | null;
|
|
30
31
|
constructor(subscriptionPreview: ISubscriptionPreviewResponse);
|
|
31
32
|
}
|
|
@@ -45,6 +45,7 @@ class SubscriptionPreview {
|
|
|
45
45
|
this.updateSummary = subscriptionPreview.update_summary
|
|
46
46
|
? new index_1.SubscriptionPreviewUpdateSummary(subscriptionPreview.update_summary)
|
|
47
47
|
: null;
|
|
48
|
+
this.importMeta = subscriptionPreview.import_meta ? new index_1.ImportMeta(subscriptionPreview.import_meta) : null;
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
exports.SubscriptionPreview = SubscriptionPreview;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillingDetails, type CustomData, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod } from '../index';
|
|
1
|
+
import { BillingDetails, type CustomData, ImportMeta, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod } from '../index';
|
|
2
2
|
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
3
3
|
import { type ISubscriptionResponse } from '../../types';
|
|
4
4
|
export declare class Subscription {
|
|
@@ -24,5 +24,6 @@ export declare class Subscription {
|
|
|
24
24
|
readonly managementUrls: SubscriptionManagement | null;
|
|
25
25
|
readonly items: SubscriptionItem[];
|
|
26
26
|
readonly customData: CustomData | null;
|
|
27
|
+
readonly importMeta: ImportMeta | null;
|
|
27
28
|
constructor(subscription: ISubscriptionResponse);
|
|
28
29
|
}
|
|
@@ -32,6 +32,7 @@ class Subscription {
|
|
|
32
32
|
: null;
|
|
33
33
|
this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
|
|
34
34
|
this.customData = subscription.custom_data ? subscription.custom_data : null;
|
|
35
|
+
this.importMeta = subscription.import_meta ? new index_1.ImportMeta(subscription.import_meta) : null;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
exports.Subscription = Subscription;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CollectionMode, type TransactionStatus } from '../../../enums';
|
|
1
|
+
import { type CollectionMode, type TransactionStatus, type TransactionOrigin } from '../../../enums';
|
|
2
2
|
export interface ListTransactionQueryParameters {
|
|
3
3
|
after?: string;
|
|
4
4
|
billedAt?: string;
|
|
@@ -25,4 +25,5 @@ export interface ListTransactionQueryParameters {
|
|
|
25
25
|
'updatedAt[GT]'?: string;
|
|
26
26
|
'updatedAt[LTE]'?: string;
|
|
27
27
|
'updatedAt[GTE]'?: string;
|
|
28
|
+
origin?: TransactionOrigin[];
|
|
28
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ICustomData } from '../index';
|
|
1
|
+
import { type ICustomData, type IImportMetaResponse } from '../index';
|
|
2
2
|
import { type CountryCode, type Status } from '../../enums';
|
|
3
3
|
export interface IAddressResponse {
|
|
4
4
|
id: string;
|
|
@@ -13,4 +13,5 @@ export interface IAddressResponse {
|
|
|
13
13
|
status: Status;
|
|
14
14
|
created_at: string;
|
|
15
15
|
updated_at: string;
|
|
16
|
+
import_meta?: IImportMetaResponse | null;
|
|
16
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IBusinessContacts, type ICustomData } from '../index';
|
|
1
|
+
import { type IBusinessContacts, type ICustomData, type IImportMetaResponse } from '../index';
|
|
2
2
|
import { type Status } from '../../enums';
|
|
3
3
|
export interface IBusinessResponse {
|
|
4
4
|
id: string;
|
|
@@ -10,4 +10,5 @@ export interface IBusinessResponse {
|
|
|
10
10
|
created_at: string;
|
|
11
11
|
updated_at: string;
|
|
12
12
|
custom_data?: ICustomData | null;
|
|
13
|
+
import_meta?: IImportMetaResponse | null;
|
|
13
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ICustomData } from '../index';
|
|
1
|
+
import { type ICustomData, type IImportMetaResponse } from '../index';
|
|
2
2
|
import { type Status } from '../../enums';
|
|
3
3
|
export interface ICustomerResponse {
|
|
4
4
|
id: string;
|
|
@@ -10,4 +10,5 @@ export interface ICustomerResponse {
|
|
|
10
10
|
locale: string;
|
|
11
11
|
created_at: string;
|
|
12
12
|
updated_at: string;
|
|
13
|
+
import_meta?: IImportMetaResponse | null;
|
|
13
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums';
|
|
2
|
-
import { type ICustomData } from '../shared';
|
|
2
|
+
import { type ICustomData, type IImportMetaResponse } from '../shared';
|
|
3
3
|
export interface IDiscountResponse {
|
|
4
4
|
id: string;
|
|
5
5
|
status: DiscountStatus;
|
|
@@ -18,4 +18,5 @@ export interface IDiscountResponse {
|
|
|
18
18
|
times_used: number;
|
|
19
19
|
created_at: string;
|
|
20
20
|
updated_at: string;
|
|
21
|
+
import_meta?: IImportMetaResponse | null;
|
|
21
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ISubscriptionDiscountResponse, type IBillingDetailsResponse, type ITimePeriod, type ISubscriptionScheduledChangeResponse, type ISubscriptionItemResponse, type ICustomData, type INextTransactionResponse, type ITransactionDetailsPreviewResponse, type ISubscriptionTimePeriodResponse, type ISubscriptionManagementResponse, type ISubscriptionPreviewUpdateSummary } from '../index';
|
|
1
|
+
import { type ISubscriptionDiscountResponse, type IBillingDetailsResponse, type ITimePeriod, type ISubscriptionScheduledChangeResponse, type ISubscriptionItemResponse, type ICustomData, type INextTransactionResponse, type ITransactionDetailsPreviewResponse, type ISubscriptionTimePeriodResponse, type ISubscriptionManagementResponse, type ISubscriptionPreviewUpdateSummary, type IImportMetaResponse } from '../index';
|
|
2
2
|
import { type CurrencyCode, type CollectionMode, type SubscriptionStatus } from '../../enums';
|
|
3
3
|
export interface ISubscriptionPreviewResponse {
|
|
4
4
|
status: SubscriptionStatus;
|
|
@@ -26,4 +26,5 @@ export interface ISubscriptionPreviewResponse {
|
|
|
26
26
|
next_transaction?: INextTransactionResponse | null;
|
|
27
27
|
recurring_transaction_details?: ITransactionDetailsPreviewResponse | null;
|
|
28
28
|
update_summary?: ISubscriptionPreviewUpdateSummary | null;
|
|
29
|
+
import_meta?: IImportMetaResponse | null;
|
|
29
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IBillingDetailsResponse, type ICustomData, type INextTransactionResponse, type ISubscriptionDiscountResponse, type ISubscriptionItemResponse, type ISubscriptionManagementResponse, type ISubscriptionScheduledChangeResponse, type ISubscriptionTimePeriodResponse, type ITimePeriod, type ITransactionDetailsPreviewResponse } from '../index';
|
|
1
|
+
import { type IBillingDetailsResponse, type ICustomData, type IImportMetaResponse, type INextTransactionResponse, type ISubscriptionDiscountResponse, type ISubscriptionItemResponse, type ISubscriptionManagementResponse, type ISubscriptionScheduledChangeResponse, type ISubscriptionTimePeriodResponse, type ITimePeriod, type ITransactionDetailsPreviewResponse } from '../index';
|
|
2
2
|
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
3
3
|
export interface ISubscriptionResponse {
|
|
4
4
|
id: string;
|
|
@@ -25,4 +25,5 @@ export interface ISubscriptionResponse {
|
|
|
25
25
|
custom_data?: ICustomData | null;
|
|
26
26
|
next_transaction?: INextTransactionResponse | null;
|
|
27
27
|
recurring_transaction_details?: ITransactionDetailsPreviewResponse | null;
|
|
28
|
+
import_meta?: IImportMetaResponse | null;
|
|
28
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.4";
|
package/dist/version.js
CHANGED