@paddle/paddle-node-sdk 2.1.3 → 2.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/CHANGELOG.md +7 -0
- package/dist/cjs/entities/adjustment/adjustment.js +1 -0
- package/dist/cjs/enums/adjustment/adjustment-action-type.js +2 -0
- package/dist/cjs/enums/adjustment/index.js +3 -2
- package/dist/cjs/notifications/entities/adjustment/adjustment-notification.js +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/esm/entities/adjustment/adjustment.js +1 -0
- package/dist/esm/enums/adjustment/adjustment-action-type.js +1 -0
- package/dist/esm/enums/adjustment/index.js +3 -2
- package/dist/esm/notifications/entities/adjustment/adjustment-notification.js +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/entities/adjustment/adjustment.d.ts +2 -1
- package/dist/types/enums/adjustment/adjustment-action-type.d.ts +1 -0
- package/dist/types/enums/adjustment/index.d.ts +3 -2
- package/dist/types/enums/shared/currency-code.d.ts +1 -1
- package/dist/types/notifications/entities/adjustment/adjustment-notification.d.ts +2 -1
- package/dist/types/notifications/types/adjustment/adjustment-notification-response.d.ts +2 -1
- package/dist/types/resources/adjustments/operations/create-adjustment-request-body.d.ts +10 -1
- package/dist/types/types/adjustment/adjustment-response.d.ts +2 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,13 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a
|
|
|
12
12
|
|
|
13
13
|
This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by adding additional type guards.
|
|
14
14
|
|
|
15
|
+
## 2.2.0 - 2024-12-12
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `VND` (Vietnamese dong) as new currency
|
|
20
|
+
- Added `adjustment.type` which is either `partial` which should include `items` or `full` where `items` are not required
|
|
21
|
+
|
|
15
22
|
## 2.1.3 - 2024-11-29
|
|
16
23
|
|
|
17
24
|
### Changed
|
|
@@ -7,6 +7,7 @@ class Adjustment {
|
|
|
7
7
|
constructor(adjustment) {
|
|
8
8
|
this.id = adjustment.id;
|
|
9
9
|
this.action = adjustment.action;
|
|
10
|
+
this.type = adjustment.type;
|
|
10
11
|
this.transactionId = adjustment.transaction_id;
|
|
11
12
|
this.subscriptionId = adjustment.subscription_id ? adjustment.subscription_id : null;
|
|
12
13
|
this.customerId = adjustment.customer_id;
|
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./adjustment-type.js"), exports);
|
|
18
|
-
__exportStar(require("./adjustment-currency-code.js"), exports);
|
|
17
|
+
__exportStar(require("./adjustment-action-type.js"), exports);
|
|
19
18
|
__exportStar(require("./adjustment-action.js"), exports);
|
|
19
|
+
__exportStar(require("./adjustment-currency-code.js"), exports);
|
|
20
20
|
__exportStar(require("./adjustment-status.js"), exports);
|
|
21
|
+
__exportStar(require("./adjustment-type.js"), exports);
|
|
@@ -7,6 +7,7 @@ class AdjustmentNotification {
|
|
|
7
7
|
constructor(adjustment) {
|
|
8
8
|
this.id = adjustment.id;
|
|
9
9
|
this.action = adjustment.action;
|
|
10
|
+
this.type = adjustment.type;
|
|
10
11
|
this.transactionId = adjustment.transaction_id;
|
|
11
12
|
this.subscriptionId = adjustment.subscription_id ? adjustment.subscription_id : null;
|
|
12
13
|
this.customerId = adjustment.customer_id;
|
package/dist/cjs/version.js
CHANGED
|
@@ -4,6 +4,7 @@ export class Adjustment {
|
|
|
4
4
|
constructor(adjustment) {
|
|
5
5
|
this.id = adjustment.id;
|
|
6
6
|
this.action = adjustment.action;
|
|
7
|
+
this.type = adjustment.type;
|
|
7
8
|
this.transactionId = adjustment.transaction_id;
|
|
8
9
|
this.subscriptionId = adjustment.subscription_id ? adjustment.subscription_id : null;
|
|
9
10
|
this.customerId = adjustment.customer_id;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './adjustment-type.js';
|
|
2
|
-
export * from './adjustment-currency-code.js';
|
|
1
|
+
export * from './adjustment-action-type.js';
|
|
3
2
|
export * from './adjustment-action.js';
|
|
3
|
+
export * from './adjustment-currency-code.js';
|
|
4
4
|
export * from './adjustment-status.js';
|
|
5
|
+
export * from './adjustment-type.js';
|
|
@@ -4,6 +4,7 @@ export class AdjustmentNotification {
|
|
|
4
4
|
constructor(adjustment) {
|
|
5
5
|
this.id = adjustment.id;
|
|
6
6
|
this.action = adjustment.action;
|
|
7
|
+
this.type = adjustment.type;
|
|
7
8
|
this.transactionId = adjustment.transaction_id;
|
|
8
9
|
this.subscriptionId = adjustment.subscription_id ? adjustment.subscription_id : null;
|
|
9
10
|
this.customerId = adjustment.customer_id;
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '2.
|
|
1
|
+
export const SDK_VERSION = '2.2.0';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js';
|
|
1
|
+
import { type AdjustmentActionType, type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js';
|
|
2
2
|
import { AdjustmentItem } from './adjustment-item.js';
|
|
3
3
|
import { PayoutTotalsAdjustment, TotalAdjustments } from '../shared/index.js';
|
|
4
4
|
import { type IAdjustmentResponse } from '../../types/index.js';
|
|
5
5
|
export declare class Adjustment {
|
|
6
6
|
readonly id: string;
|
|
7
7
|
readonly action: AdjustmentAction;
|
|
8
|
+
readonly type: AdjustmentActionType;
|
|
8
9
|
readonly transactionId: string;
|
|
9
10
|
readonly subscriptionId: string | null;
|
|
10
11
|
readonly customerId: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type AdjustmentActionType = 'full' | 'partial';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './adjustment-type.js';
|
|
2
|
-
export * from './adjustment-currency-code.js';
|
|
1
|
+
export * from './adjustment-action-type.js';
|
|
3
2
|
export * from './adjustment-action.js';
|
|
3
|
+
export * from './adjustment-currency-code.js';
|
|
4
4
|
export * from './adjustment-status.js';
|
|
5
|
+
export * from './adjustment-type.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CurrencyCode = 'USD' | 'EUR' | 'GBP' | 'JPY' | 'AUD' | 'CAD' | 'CHF' | 'HKD' | 'SGD' | 'SEK' | 'ARS' | 'BRL' | 'CNY' | 'COP' | 'CZK' | 'DKK' | 'HUF' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'NOK' | 'NZD' | 'PLN' | 'RUB' | 'THB' | 'TRY' | 'TWD' | 'UAH' | 'ZAR';
|
|
1
|
+
export type CurrencyCode = 'USD' | 'EUR' | 'GBP' | 'JPY' | 'AUD' | 'CAD' | 'CHF' | 'HKD' | 'SGD' | 'SEK' | 'ARS' | 'BRL' | 'CNY' | 'COP' | 'CZK' | 'DKK' | 'HUF' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'NOK' | 'NZD' | 'PLN' | 'RUB' | 'THB' | 'TRY' | 'TWD' | 'UAH' | 'VND' | 'ZAR';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../../enums/index.js';
|
|
1
|
+
import { type AdjustmentActionType, type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../../enums/index.js';
|
|
2
2
|
import { AdjustmentItemNotification } from './adjustment-item-notification.js';
|
|
3
3
|
import { PayoutTotalsAdjustmentNotification, TotalAdjustmentsNotification } from '../shared/index.js';
|
|
4
4
|
import { type IAdjustmentNotificationResponse } from '../../types/index.js';
|
|
5
5
|
export declare class AdjustmentNotification {
|
|
6
6
|
readonly id: string;
|
|
7
7
|
readonly action: AdjustmentAction;
|
|
8
|
+
readonly type: AdjustmentActionType;
|
|
8
9
|
readonly transactionId: string;
|
|
9
10
|
readonly subscriptionId: string | null;
|
|
10
11
|
readonly customerId: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../../enums/index.js';
|
|
1
|
+
import { type AdjustmentActionType, type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../../enums/index.js';
|
|
2
2
|
import { type IAdjustmentItemNotificationResponse } from './adjustment-item-notification-response.js';
|
|
3
3
|
import { type IPayoutTotalsAdjustmentNotificationResponse, type ITotalAdjustmentsNotificationResponse } from '../shared/index.js';
|
|
4
4
|
export interface IAdjustmentNotificationResponse {
|
|
5
5
|
id: string;
|
|
6
6
|
action: AdjustmentAction;
|
|
7
|
+
type: AdjustmentActionType;
|
|
7
8
|
transaction_id: string;
|
|
8
9
|
subscription_id?: string | null;
|
|
9
10
|
customer_id: string;
|
|
@@ -4,9 +4,18 @@ export interface CreateAdjustmentLineItem {
|
|
|
4
4
|
itemId: string;
|
|
5
5
|
type: AdjustmentType;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
interface CreatePartialAdjustmentRequestBody {
|
|
8
8
|
action: AdjustmentAction;
|
|
9
9
|
items: CreateAdjustmentLineItem[];
|
|
10
10
|
reason: string;
|
|
11
11
|
transactionId: string;
|
|
12
|
+
type?: 'partial';
|
|
12
13
|
}
|
|
14
|
+
interface CreateFullAdjustmentRequestBody {
|
|
15
|
+
action: AdjustmentAction;
|
|
16
|
+
reason: string;
|
|
17
|
+
transactionId: string;
|
|
18
|
+
type?: 'full';
|
|
19
|
+
}
|
|
20
|
+
export type CreateAdjustmentRequestBody = CreatePartialAdjustmentRequestBody | CreateFullAdjustmentRequestBody;
|
|
21
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js';
|
|
1
|
+
import { type AdjustmentActionType, type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js';
|
|
2
2
|
import { type IAdjustmentItemResponse } from './adjustment-item-response.js';
|
|
3
3
|
import { type IPayoutTotalsAdjustmentResponse, type ITotalAdjustmentsResponse } from '../shared/index.js';
|
|
4
4
|
export interface IAdjustmentResponse {
|
|
5
5
|
id: string;
|
|
6
6
|
action: AdjustmentAction;
|
|
7
|
+
type: AdjustmentActionType;
|
|
7
8
|
transaction_id: string;
|
|
8
9
|
subscription_id?: string | null;
|
|
9
10
|
customer_id: string;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.2.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paddle/paddle-node-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
|
|
5
5
|
"main": "dist/cjs/index.cjs.node.js",
|
|
6
6
|
"module": "dist/esm/index.esm.node.js",
|