@paddle/paddle-node-sdk 0.2.7 → 0.2.9
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 +16 -0
- package/README.md +0 -79
- package/dist/entities/price/price.d.ts +1 -1
- package/dist/entities/price/price.js +4 -2
- package/dist/entities/subscription/subscription-discount.d.ts +1 -1
- package/dist/entities/subscription/subscription-discount.js +2 -1
- package/dist/types/shared/shared-price-response.d.ts +1 -1
- package/dist/types/subscription/subscription-discount-response.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,22 @@ 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.9 - 2024-01-11
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Marked `endsAt` as optional in discount under Subscriptions entity.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 0.2.8 - 2024-01-09
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Marked `unitPriceOverrides` as optional in Price entity.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
11
27
|
## 0.2.7 - 2024-01-04
|
|
12
28
|
|
|
13
29
|
### Fixed
|
package/README.md
CHANGED
|
@@ -271,85 +271,6 @@ app.listen(3000)
|
|
|
271
271
|
|
|
272
272
|
The Node.js SDK has complete feature parity with the Paddle API. All operations in the Paddle API are supported.
|
|
273
273
|
|
|
274
|
-
| Paddle API operation | Support |
|
|
275
|
-
|----------------------------------------------|:--------:|
|
|
276
|
-
| **Products** | **Full** |
|
|
277
|
-
| List products | ✅ |
|
|
278
|
-
| Create a product | ✅ |
|
|
279
|
-
| Get a product | ✅ |
|
|
280
|
-
| Update a product | ✅ |
|
|
281
|
-
| **Prices** | **Full** |
|
|
282
|
-
| List prices | ✅ |
|
|
283
|
-
| Create a price | ✅ |
|
|
284
|
-
| Get a price | ✅ |
|
|
285
|
-
| Update a price | ✅ |
|
|
286
|
-
| **Discounts** | **Full** |
|
|
287
|
-
| List discounts | ✅ |
|
|
288
|
-
| Create a discount | ✅ |
|
|
289
|
-
| Get a discount | ✅ |
|
|
290
|
-
| Update a discount | ✅ |
|
|
291
|
-
| **Customers** | **Full** |
|
|
292
|
-
| List customers | ✅ |
|
|
293
|
-
| Create a customer | ✅ |
|
|
294
|
-
| Get a customer | ✅ |
|
|
295
|
-
| Update a customer | ✅ |
|
|
296
|
-
| List credit balances for a customer | ✅ |
|
|
297
|
-
| **Addresses** | **Full** |
|
|
298
|
-
| List addresses for a customer | ✅ |
|
|
299
|
-
| Create an addresses for a customer | ✅ |
|
|
300
|
-
| Get an address for a customer | ✅ |
|
|
301
|
-
| Update an address for a customer | ✅ |
|
|
302
|
-
| **Businesses** | ✅ |
|
|
303
|
-
| List businesses for a customer | ✅ |
|
|
304
|
-
| Create a business for a customer | ✅ |
|
|
305
|
-
| Get a business for a customer | ✅ |
|
|
306
|
-
| Update a business for a customer | ✅ |
|
|
307
|
-
| **Transactions** | **Full** |
|
|
308
|
-
| List transactions | ✅ |
|
|
309
|
-
| Create a transaction | ✅ |
|
|
310
|
-
| Get a transaction | ✅ |
|
|
311
|
-
| Update a transaction | ✅ |
|
|
312
|
-
| Preview a transaction | ✅ |
|
|
313
|
-
| Get a PDF invoice for a transaction | ✅ |
|
|
314
|
-
| **Subscriptions** | **Full** |
|
|
315
|
-
| List subscriptions | ✅ |
|
|
316
|
-
| Get a subscription | ✅ |
|
|
317
|
-
| Preview an update to a subscription | ✅ |
|
|
318
|
-
| Update a subscription | ✅ |
|
|
319
|
-
| Get a transaction to update payment method | ✅ |
|
|
320
|
-
| Preview a one-time charge for a subscription | ✅ |
|
|
321
|
-
| Create a one-time charge for a subscription | ✅ |
|
|
322
|
-
| Activate a trialing subscription | ✅ |
|
|
323
|
-
| Pause a subscription | ✅ |
|
|
324
|
-
| Resume a paused subscription | ✅ |
|
|
325
|
-
| Cancel a subscription | ✅ |
|
|
326
|
-
| **Adjustments** | **Full** |
|
|
327
|
-
| List adjustments | ✅ |
|
|
328
|
-
| Create an adjustment | ✅ |
|
|
329
|
-
| **Pricing preview** | **Full** |
|
|
330
|
-
| Preview prices | ✅ |
|
|
331
|
-
| **Reports** | **Full** |
|
|
332
|
-
| List reports | ✅ |
|
|
333
|
-
| Create a report | ✅ |
|
|
334
|
-
| Get a report | ✅ |
|
|
335
|
-
| Get a CSV file for a report | ✅ |
|
|
336
|
-
| **Event types** | **Full** |
|
|
337
|
-
| List event types | ✅ |
|
|
338
|
-
| **Events** | **Full** |
|
|
339
|
-
| List events | ✅ |
|
|
340
|
-
| **Notification settings** | **Full** |
|
|
341
|
-
| List notification settings | ✅ |
|
|
342
|
-
| Create a notification setting | ✅ |
|
|
343
|
-
| Get a notification setting | ✅ |
|
|
344
|
-
| Update a notification setting | ✅ |
|
|
345
|
-
| Delete a notification setting | ✅ |
|
|
346
|
-
| **Notifications** | **Full** |
|
|
347
|
-
| List notifications | ✅ |
|
|
348
|
-
| Get a notification | ✅ |
|
|
349
|
-
| Replay a notification | ✅ |
|
|
350
|
-
| **Notification logs** | **Full** |
|
|
351
|
-
| List logs for a notification | ✅ |
|
|
352
|
-
|
|
353
274
|
## Learn more
|
|
354
275
|
|
|
355
276
|
- [Paddle API reference](https://developer.paddle.com/api-reference/overview?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
@@ -11,7 +11,7 @@ export declare class Price {
|
|
|
11
11
|
readonly trialPeriod: TimePeriod | null;
|
|
12
12
|
readonly taxMode: TaxMode;
|
|
13
13
|
readonly unitPrice: Money | null;
|
|
14
|
-
readonly unitPriceOverrides: UnitPriceOverride[];
|
|
14
|
+
readonly unitPriceOverrides: UnitPriceOverride[] | null;
|
|
15
15
|
readonly quantity: PriceQuantity | null;
|
|
16
16
|
readonly status: Status;
|
|
17
17
|
readonly customData: ICustomData | null;
|
|
@@ -4,7 +4,7 @@ exports.Price = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class Price {
|
|
6
6
|
constructor(price) {
|
|
7
|
-
var _a;
|
|
7
|
+
var _a, _b;
|
|
8
8
|
this.id = price.id;
|
|
9
9
|
this.productId = price.product_id;
|
|
10
10
|
this.description = price.description;
|
|
@@ -14,7 +14,9 @@ class Price {
|
|
|
14
14
|
this.trialPeriod = price.trial_period ? new index_1.TimePeriod(price.trial_period) : null;
|
|
15
15
|
this.taxMode = price.tax_mode;
|
|
16
16
|
this.unitPrice = price.unit_price ? new index_1.Money(price.unit_price) : null;
|
|
17
|
-
this.unitPriceOverrides = price.unit_price_overrides
|
|
17
|
+
this.unitPriceOverrides = price.unit_price_overrides
|
|
18
|
+
? (_b = price.unit_price_overrides) === null || _b === void 0 ? void 0 : _b.map((unit_price_override) => new index_1.UnitPriceOverride(unit_price_override))
|
|
19
|
+
: null;
|
|
18
20
|
this.quantity = price.quantity ? new index_1.PriceQuantity(price.quantity) : null;
|
|
19
21
|
this.status = price.status;
|
|
20
22
|
this.customData = price.custom_data ? price.custom_data : null;
|
|
@@ -2,6 +2,6 @@ import { type ISubscriptionDiscountResponse } from '../../types';
|
|
|
2
2
|
export declare class SubscriptionDiscount {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly startsAt: string;
|
|
5
|
-
readonly endsAt: string;
|
|
5
|
+
readonly endsAt: string | null;
|
|
6
6
|
constructor(subscriptionDiscount: ISubscriptionDiscountResponse);
|
|
7
7
|
}
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SubscriptionDiscount = void 0;
|
|
4
4
|
class SubscriptionDiscount {
|
|
5
5
|
constructor(subscriptionDiscount) {
|
|
6
|
+
var _a;
|
|
6
7
|
this.id = subscriptionDiscount.id;
|
|
7
8
|
this.startsAt = subscriptionDiscount.starts_at;
|
|
8
|
-
this.endsAt = subscriptionDiscount.ends_at;
|
|
9
|
+
this.endsAt = (_a = subscriptionDiscount.ends_at) !== null && _a !== void 0 ? _a : null;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
exports.SubscriptionDiscount = SubscriptionDiscount;
|
|
@@ -10,7 +10,7 @@ export interface ISharedPriceResponse {
|
|
|
10
10
|
trial_period?: ITimePeriod | null;
|
|
11
11
|
tax_mode: TaxMode;
|
|
12
12
|
unit_price?: IMoneyResponse | null;
|
|
13
|
-
unit_price_overrides
|
|
13
|
+
unit_price_overrides?: IUnitPriceOverrideResponse[] | null;
|
|
14
14
|
quantity?: IPriceQuantity | null;
|
|
15
15
|
status: Status;
|
|
16
16
|
custom_data?: ICustomData | null;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.9";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paddle/paddle-node-sdk",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "0.2.9",
|
|
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/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -13,12 +13,15 @@
|
|
|
13
13
|
"lint": "eslint --ext .ts,.tsx ./src",
|
|
14
14
|
"lint:fix": "eslint --ext .ts,.tsx ./src --fix",
|
|
15
15
|
"clean": "rm -rf ./dist",
|
|
16
|
-
"release:beta": "yarn version --prerelease --preid beta --no-git-tag-version --no-commit-hooks"
|
|
16
|
+
"release:beta": "yarn version --prerelease --preid beta --no-git-tag-version --no-commit-hooks",
|
|
17
|
+
"publish:beta": "yarn publish --tag beta --access public",
|
|
18
|
+
"publish:latest": "yarn publish --access public"
|
|
17
19
|
},
|
|
18
20
|
"files": [
|
|
19
21
|
"dist"
|
|
20
22
|
],
|
|
21
23
|
"keywords": [
|
|
24
|
+
"Paddle",
|
|
22
25
|
"SDK"
|
|
23
26
|
],
|
|
24
27
|
"author": "paddle.com",
|