@paddle/paddle-node-sdk 2.4.0 → 2.5.1
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/README.md +2 -2
- package/dist/cjs/notifications/entities/transaction/transaction-notification.js +1 -0
- package/dist/cjs/notifications/events/transaction/index.js +1 -0
- package/dist/cjs/notifications/events/transaction/transaction-revised-event.js +14 -0
- package/dist/cjs/notifications/helpers/types.js +1 -0
- package/dist/cjs/notifications/helpers/webhooks.js +3 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/notifications/entities/transaction/transaction-notification.js +1 -0
- package/dist/esm/notifications/events/transaction/index.js +1 -0
- package/dist/esm/notifications/events/transaction/transaction-revised-event.js +10 -0
- package/dist/esm/notifications/helpers/types.js +1 -0
- package/dist/esm/notifications/helpers/webhooks.js +4 -2
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/notifications/entities/transaction/transaction-notification.d.ts +1 -0
- package/dist/types/notifications/events/transaction/index.d.ts +1 -0
- package/dist/types/notifications/events/transaction/transaction-revised-event.d.ts +10 -0
- package/dist/types/notifications/helpers/types.d.ts +4 -3
- package/dist/types/notifications/types/transaction/transaction-notification-response.d.ts +1 -0
- package/dist/types/types/events/events-response.d.ts +4 -1
- package/dist/types/types/shared/simulation-payload.d.ts +2 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +35 -21
- package/CHANGELOG.md +0 -532
|
@@ -132,11 +132,14 @@ interface ITransactionReady extends IEventsResponse<ITransactionNotificationResp
|
|
|
132
132
|
interface ITransactionUpdated extends IEventsResponse<ITransactionNotificationResponse> {
|
|
133
133
|
event_type: EventName.TransactionUpdated;
|
|
134
134
|
}
|
|
135
|
+
interface ITransactionRevised extends IEventsResponse<ITransactionNotificationResponse> {
|
|
136
|
+
event_type: EventName.TransactionRevised;
|
|
137
|
+
}
|
|
135
138
|
interface IReportCreated extends IEventsResponse<IReportNotificationResponse> {
|
|
136
139
|
event_type: EventName.ReportCreated;
|
|
137
140
|
}
|
|
138
141
|
interface IReportUpdated extends IEventsResponse<IReportNotificationResponse> {
|
|
139
142
|
event_type: EventName.ReportUpdated;
|
|
140
143
|
}
|
|
141
|
-
export type IEvents = IAddressCreated | IAddressUpdated | IAddressImported | IAdjustmentCreated | IAdjustmentUpdated | IBusinessCreated | IBusinessUpdated | IBusinessImported | ICustomerCreated | ICustomerUpdated | ICustomerImported | IDiscountCreated | IDiscountUpdated | IDiscountImported | IPaymentMethodDeleted | IPaymentMethodSaved | 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;
|
|
144
|
+
export type IEvents = IAddressCreated | IAddressUpdated | IAddressImported | IAdjustmentCreated | IAdjustmentUpdated | IBusinessCreated | IBusinessUpdated | IBusinessImported | ICustomerCreated | ICustomerUpdated | ICustomerImported | IDiscountCreated | IDiscountUpdated | IDiscountImported | IPaymentMethodDeleted | IPaymentMethodSaved | 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 | ITransactionRevised | IReportCreated | IReportUpdated;
|
|
142
145
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IEventName } from '../../notifications/index.js';
|
|
2
|
-
import { type AddressCreatedEvent, type AddressImportedEvent, type AddressUpdatedEvent, type AdjustmentCreatedEvent, type AdjustmentUpdatedEvent, type BusinessCreatedEvent, type BusinessImportedEvent, type BusinessUpdatedEvent, type CustomerCreatedEvent, type CustomerImportedEvent, type CustomerUpdatedEvent, type DiscountCreatedEvent, type DiscountImportedEvent, type DiscountUpdatedEvent, type PayoutCreatedEvent, type PayoutPaidEvent, type PriceCreatedEvent, type PriceImportedEvent, type PriceUpdatedEvent, type ProductCreatedEvent, type ProductImportedEvent, type ProductUpdatedEvent, type ReportCreatedEvent, type ReportUpdatedEvent, type SubscriptionActivatedEvent, type SubscriptionCanceledEvent, type SubscriptionCreatedEvent, type SubscriptionImportedEvent, type SubscriptionPastDueEvent, type SubscriptionPausedEvent, type SubscriptionResumedEvent, type SubscriptionTrialingEvent, type SubscriptionUpdatedEvent, type TransactionBilledEvent, type TransactionCanceledEvent, type TransactionCompletedEvent, type TransactionCreatedEvent, type TransactionPaidEvent, type TransactionPastDueEvent, type TransactionPaymentFailedEvent, type TransactionReadyEvent, type TransactionUpdatedEvent } from '../../notifications/events/index.js';
|
|
2
|
+
import { type AddressCreatedEvent, type AddressImportedEvent, type AddressUpdatedEvent, type AdjustmentCreatedEvent, type AdjustmentUpdatedEvent, type BusinessCreatedEvent, type BusinessImportedEvent, type BusinessUpdatedEvent, type CustomerCreatedEvent, type CustomerImportedEvent, type CustomerUpdatedEvent, type DiscountCreatedEvent, type DiscountImportedEvent, type DiscountUpdatedEvent, type PayoutCreatedEvent, type PayoutPaidEvent, type PriceCreatedEvent, type PriceImportedEvent, type PriceUpdatedEvent, type ProductCreatedEvent, type ProductImportedEvent, type ProductUpdatedEvent, type ReportCreatedEvent, type ReportUpdatedEvent, type SubscriptionActivatedEvent, type SubscriptionCanceledEvent, type SubscriptionCreatedEvent, type SubscriptionImportedEvent, type SubscriptionPastDueEvent, type SubscriptionPausedEvent, type SubscriptionResumedEvent, type SubscriptionTrialingEvent, type SubscriptionUpdatedEvent, type TransactionBilledEvent, type TransactionCanceledEvent, type TransactionCompletedEvent, type TransactionCreatedEvent, type TransactionPaidEvent, type TransactionPastDueEvent, type TransactionPaymentFailedEvent, type TransactionReadyEvent, type TransactionUpdatedEvent, type TransactionRevisedEvent } from '../../notifications/events/index.js';
|
|
3
3
|
interface SimulationEventPayloadMap {
|
|
4
4
|
'address.created': AddressCreatedEvent;
|
|
5
5
|
'address.updated': AddressUpdatedEvent;
|
|
@@ -41,6 +41,7 @@ interface SimulationEventPayloadMap {
|
|
|
41
41
|
'transaction.payment_failed': TransactionPaymentFailedEvent;
|
|
42
42
|
'transaction.ready': TransactionReadyEvent;
|
|
43
43
|
'transaction.updated': TransactionUpdatedEvent;
|
|
44
|
+
'transaction.revised': TransactionRevisedEvent;
|
|
44
45
|
'report.created': ReportCreatedEvent;
|
|
45
46
|
'report.updated': ReportUpdatedEvent;
|
|
46
47
|
subscription_creation: never;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.5.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paddle/paddle-node-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
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",
|
|
@@ -8,22 +8,6 @@
|
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=18"
|
|
10
10
|
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"test": "jest",
|
|
13
|
-
"prebuild": "node ./scripts/update-env-vars.js",
|
|
14
|
-
"build": "yarn clean && yarn build-esm && yarn build-cjs && yarn build-types",
|
|
15
|
-
"build-esm": "tsc -b tsconfig.esm.json && echo '{\"type\":\"module\"}' > ./dist/esm/package.json",
|
|
16
|
-
"build-cjs": "tsc -b tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
|
|
17
|
-
"build-types": "tsc -b tsconfig.types.json",
|
|
18
|
-
"prettier": "prettier --check ./src",
|
|
19
|
-
"prettier:fix": "prettier --check ./src --write",
|
|
20
|
-
"lint": "eslint ./src",
|
|
21
|
-
"lint:fix": "eslint ./src --fix",
|
|
22
|
-
"clean": "rm -rf ./dist",
|
|
23
|
-
"release:rc": "yarn version --prerelease --preid rc --no-git-tag-version --no-commit-hooks",
|
|
24
|
-
"publish:rc": "yarn publish --tag rc --access public",
|
|
25
|
-
"publish:latest": "yarn publish --access public"
|
|
26
|
-
},
|
|
27
11
|
"files": [
|
|
28
12
|
"dist"
|
|
29
13
|
],
|
|
@@ -44,7 +28,7 @@
|
|
|
44
28
|
"@babel/preset-env": "^7.22.20",
|
|
45
29
|
"@babel/preset-typescript": "^7.23.0",
|
|
46
30
|
"@eslint/js": "^9.17.0",
|
|
47
|
-
"@stylistic/eslint-plugin": "^
|
|
31
|
+
"@stylistic/eslint-plugin": "^4.0.1",
|
|
48
32
|
"@types/jest": "^29.5.6",
|
|
49
33
|
"@types/lodash": "^4.14.202",
|
|
50
34
|
"@types/node": "^22.10.2",
|
|
@@ -56,7 +40,7 @@
|
|
|
56
40
|
"eslint-plugin-import": "^2.25.2",
|
|
57
41
|
"eslint-plugin-n": "^17.15.1 ",
|
|
58
42
|
"eslint-plugin-promise": "^7.2.1",
|
|
59
|
-
"globals": "^
|
|
43
|
+
"globals": "^16.0.0",
|
|
60
44
|
"jest": "^29.7.0",
|
|
61
45
|
"prettier": "^3.0.3",
|
|
62
46
|
"typescript": "^5.2.2",
|
|
@@ -64,14 +48,44 @@
|
|
|
64
48
|
},
|
|
65
49
|
"exports": {
|
|
66
50
|
"types": "./dist/types/index.cjs.node.d.ts",
|
|
51
|
+
"browser": {
|
|
52
|
+
"import": "./dist/esm/index.esm.edge.js",
|
|
53
|
+
"require": "./dist/cjs/index.cjs.edge.js"
|
|
54
|
+
},
|
|
55
|
+
"bun": {
|
|
56
|
+
"import": "./dist/esm/index.esm.edge.js",
|
|
57
|
+
"require": "./dist/cjs/index.cjs.edge.js"
|
|
58
|
+
},
|
|
59
|
+
"deno": {
|
|
60
|
+
"import": "./dist/esm/index.esm.edge.js",
|
|
61
|
+
"require": "./dist/cjs/index.cjs.edge.js"
|
|
62
|
+
},
|
|
67
63
|
"worker": {
|
|
68
64
|
"import": "./dist/esm/index.esm.edge.js",
|
|
69
65
|
"require": "./dist/cjs/index.cjs.edge.js"
|
|
70
66
|
},
|
|
67
|
+
"workerd": {
|
|
68
|
+
"import": "./dist/esm/index.esm.edge.js",
|
|
69
|
+
"require": "./dist/cjs/index.cjs.edge.js"
|
|
70
|
+
},
|
|
71
71
|
"default": {
|
|
72
72
|
"import": "./dist/esm/index.esm.node.js",
|
|
73
73
|
"require": "./dist/cjs/index.cjs.node.js"
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
-
"dependencies": {}
|
|
77
|
-
|
|
76
|
+
"dependencies": {},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"test": "jest",
|
|
79
|
+
"prebuild": "node ./scripts/update-env-vars.js",
|
|
80
|
+
"build": "pnpm clean && pnpm build-esm && pnpm build-cjs && pnpm build-types",
|
|
81
|
+
"build-esm": "tsc -b tsconfig.esm.json && echo '{\"type\":\"module\"}' > ./dist/esm/package.json",
|
|
82
|
+
"build-cjs": "tsc -b tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
|
|
83
|
+
"build-types": "tsc -b tsconfig.types.json",
|
|
84
|
+
"prettier": "prettier --check ./src",
|
|
85
|
+
"prettier:fix": "prettier --check ./src --write",
|
|
86
|
+
"lint": "eslint ./src",
|
|
87
|
+
"lint:fix": "eslint ./src --fix",
|
|
88
|
+
"clean": "rm -rf ./dist",
|
|
89
|
+
"release:rc": "pnpm version --prerelease --preid rc --no-git-tag-version --no-commit-hooks"
|
|
90
|
+
}
|
|
91
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,532 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
7
|
-
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.
|
|
8
|
-
|
|
9
|
-
### Versioning
|
|
10
|
-
|
|
11
|
-
When we make [non-breaking changes](https://developer.paddle.com/api-reference/about/versioning?utm_source=dx&utm_medium=paddle-node-sdk#non-breaking-change) to the Paddle API, we'll only release a new major version of the Node.js SDK when it causes problems at runtime. We won't release a new version of the SDK when we weaken TypeScript types in a way that doesn't cause existing implementations to break or malfunction. For example, if we add a new field to a request or an allowed value for a field in a response, this weakens the Typescript type but does not cause existing usages to stop working.
|
|
12
|
-
|
|
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
|
-
|
|
15
|
-
## 2.4.0 - 2025-01-21
|
|
16
|
-
|
|
17
|
-
### Added
|
|
18
|
-
|
|
19
|
-
- Added `transactions.revise` operation to revise a transaction and added `revisedAt` to `Transaction` entity, see [related changelog](https://developer.paddle.com/changelog/2024/revise-transaction-customer-information?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
20
|
-
|
|
21
|
-
### Changed
|
|
22
|
-
|
|
23
|
-
- Dependabot updates
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## 2.3.2 - 2025-01-06
|
|
28
|
-
|
|
29
|
-
### Fixed
|
|
30
|
-
|
|
31
|
-
- Dependabot updates
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## 2.3.1 - 2025-01-06
|
|
36
|
-
|
|
37
|
-
### Fixed
|
|
38
|
-
|
|
39
|
-
- Dependabot updates
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## 2.3.0 - 2025-01-06
|
|
44
|
-
|
|
45
|
-
### Added
|
|
46
|
-
|
|
47
|
-
- Added `onResume` property to subscription resume and pause operations to [control billing for subscriptions when resuming](https://developer.paddle.com/changelog/2024/resume-subscription-billing-period-options)
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## 2.2.2 - 2024-12-16
|
|
52
|
-
|
|
53
|
-
### Fixed
|
|
54
|
-
|
|
55
|
-
- `discount.startsAt` for Subscriptions can now be `null`
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 2.2.1 - 2024-12-16
|
|
60
|
-
|
|
61
|
-
### Fixed
|
|
62
|
-
|
|
63
|
-
- Added `proration` to transaction line items
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## 2.2.0 - 2024-12-12
|
|
68
|
-
|
|
69
|
-
### Added
|
|
70
|
-
|
|
71
|
-
- `VND` (Vietnamese dong) as new currency
|
|
72
|
-
- Added `adjustment.type` which is either `partial` which should include `items` or `full` where `items` are not required
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## 2.1.3 - 2024-11-29
|
|
77
|
-
|
|
78
|
-
### Changed
|
|
79
|
-
|
|
80
|
-
- `paddle.webhooks.unmarshal` will now return an event for unhandled event types instead of `null` this is only possible for legacy/no longer supported events or for new events that have not been added to the sdk yet
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## 2.1.2 - 2024-11-26
|
|
85
|
-
|
|
86
|
-
### Fixed
|
|
87
|
-
|
|
88
|
-
- Updated payment-methods export to use `.js` extension
|
|
89
|
-
|
|
90
|
-
### Added
|
|
91
|
-
|
|
92
|
-
- ESLint rule to ensure `.js` extension is provided
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## 2.1.1 - 2024-11-25
|
|
97
|
-
|
|
98
|
-
### Fixed
|
|
99
|
-
|
|
100
|
-
- Updated imports to use `.js` extension
|
|
101
|
-
|
|
102
|
-
## 2.1.0 - 2024-11-21
|
|
103
|
-
|
|
104
|
-
### Added
|
|
105
|
-
|
|
106
|
-
- Added `customerPortalSessions` resources
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## 2.0.0 - 2024-11-20
|
|
111
|
-
|
|
112
|
-
> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below.
|
|
113
|
-
|
|
114
|
-
### Added
|
|
115
|
-
|
|
116
|
-
- Added support for edge runtime.
|
|
117
|
-
- Added `simulationTypes` resources
|
|
118
|
-
- Added `simulations` resources
|
|
119
|
-
- Added `simulationRuns` resources
|
|
120
|
-
- Added `simulationRunEvents` resources
|
|
121
|
-
- Added the `trafficSource` filter on notification settings
|
|
122
|
-
- Omitted the `transactionId` completely from `SubscriptionNotification` and created a separate `SubscriptionCreatedNotification` with the non-null `transactionId`
|
|
123
|
-
- Added `paymentMethods` resources
|
|
124
|
-
- Added `generateAuthToken` for customer
|
|
125
|
-
|
|
126
|
-
### Changed
|
|
127
|
-
|
|
128
|
-
- **Breaking change:** Updated the minimum required Node.js version to v18.
|
|
129
|
-
- **Breaking change:** `Webhooks.unmarshal` and `Webhooks.isSignatureValid` now returns a promise.
|
|
130
|
-
- Enabled conditional exports based on runtimes.
|
|
131
|
-
- Switched from `node-fetch` to native `fetch` API.
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 1.7.0 - 2024-09-18
|
|
136
|
-
|
|
137
|
-
### Fixed
|
|
138
|
-
|
|
139
|
-
- Marked `paymentMethodId` as nullable in `TransactionPaymentAttempt` as it can be `null`.
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## 1.6.0 - 2024-09-16
|
|
144
|
-
|
|
145
|
-
### Added
|
|
146
|
-
|
|
147
|
-
- Added `adjustments.getCreditNotePDF()` to [get a credit note for an adjustment](https://developer.paddle.com/api-reference/adjustments/get-credit-note-pdf?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
148
|
-
- Added `disposition` query parameter to `adjustments.getCreditNotePDF()` and `transactions.getInvoicePDF()` operations, see [related changelog](https://developer.paddle.com/changelog/2024/invoice-pdf-open-in-browser?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
149
|
-
- Added pagination support to `notificationSettings.list()` operation, see [related changelog](https://developer.paddle.com/changelog/2024/notification-settings-pagination?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
150
|
-
- Added support for Non-catalog products and prices to the `subscriptions.update()` and `subscriptions.previewUpdate()` operations, see [related changelog](https://developer.paddle.com/changelog/2024/add-custom-items-subscription?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
151
|
-
|
|
152
|
-
### Fixed
|
|
153
|
-
|
|
154
|
-
- Marked `notification_id` as optional in `IEventsResponse` interface.
|
|
155
|
-
- Fixed a bug where query parameters with false values were not passed correctly to the API.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## 1.5.1 - 2024-09-10
|
|
160
|
-
|
|
161
|
-
### Fixed
|
|
162
|
-
|
|
163
|
-
- Fixed a bug where query parameters with special characters were not passed correctly to the API.
|
|
164
|
-
- Dependabot security updates.
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## 1.5.0 - 2024-08-16
|
|
169
|
-
|
|
170
|
-
### Added
|
|
171
|
-
|
|
172
|
-
- Updated subscription items model to include `product`. See [related changelog](https://developer.paddle.com/changelog/2024/subscription-items-product?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## 1.4.1 - 2024-06-21
|
|
177
|
-
|
|
178
|
-
### Fixed
|
|
179
|
-
|
|
180
|
-
- Dependabot security updates.
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## 1.4.0 - 2024-06-20
|
|
185
|
-
|
|
186
|
-
### Added
|
|
187
|
-
|
|
188
|
-
- Added a new option to change the logging level of the SDK. You can now set the logging level to `verbose`, `warn`, `error` or `none`. The default logging level is `verbose`.
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## 1.3.0 - 2024-04-18
|
|
193
|
-
|
|
194
|
-
### Changed
|
|
195
|
-
|
|
196
|
-
- Updated the package to export both CommonJS and ES module formats.
|
|
197
|
-
- Updated `Collection` to return `hasMore` and `estimatedTotal` properties
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## 1.2.2 - 2024-04-03
|
|
202
|
-
|
|
203
|
-
### Fixed
|
|
204
|
-
|
|
205
|
-
- Updated the optional properties returned by `pricingPreview.preview` operation to match the API response.
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## 1.2.1 - 2024-03-20
|
|
210
|
-
|
|
211
|
-
### Fixed
|
|
212
|
-
|
|
213
|
-
- Handled missing `unitPriceOverrides` in the `subscriptions.getPaymentMethodChangeTransaction` operation.
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
## 1.2.0 - 2024-03-19
|
|
218
|
-
|
|
219
|
-
### Changed
|
|
220
|
-
|
|
221
|
-
- Updated `ErrorCode` enum in `TransactionPaymentAttempt` to include a new error code `declined_not_retryable`
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## 1.1.0 - 2024-03-13
|
|
226
|
-
|
|
227
|
-
### Added
|
|
228
|
-
|
|
229
|
-
- Added `createdAt` and `updatedAt` to product and price entities, see [related changelog](https://developer.paddle.com/changelog/2024/product-price-dates?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
230
|
-
|
|
231
|
-
### Changed
|
|
232
|
-
|
|
233
|
-
- Updated [report API](https://developer.paddle.com/api-reference/reports/create-report?utm_source=dx&utm_medium=paddle-node-sdk) to support `discounts` and `product_prices` report, see [related changelog](https://developer.paddle.com/changelog/2024/product-prices-discounts-reports?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
234
|
-
|
|
235
|
-
### Removed
|
|
236
|
-
|
|
237
|
-
- Removed `ISharedProductResponse` and `ISharedPriceResponse` interfaces as they were redundant. Please use `IProductResponse` and `IPriceResponse` instead.
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## 1.0.2 - 2024-03-12
|
|
242
|
-
|
|
243
|
-
### Added
|
|
244
|
-
|
|
245
|
-
- Exported `ApiError` class for usage in `try/catch` block.
|
|
246
|
-
|
|
247
|
-
### Changed
|
|
248
|
-
|
|
249
|
-
- Added `customerId` property to `Address` and `Business` entities, see [related changelog](https://developer.paddle.com/changelog/2024/address-business-webhooks-customer-id?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
## 1.0.1 - 2024-02-20
|
|
254
|
-
|
|
255
|
-
### Changed
|
|
256
|
-
|
|
257
|
-
- Removed early access notice from README and Changelog.
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## 1.0.0 - 2024-02-20
|
|
262
|
-
|
|
263
|
-
### Changed
|
|
264
|
-
|
|
265
|
-
- Updated Package version to `1.0.0`
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## 0.6.0 - 2024-02-20
|
|
270
|
-
|
|
271
|
-
> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below.
|
|
272
|
-
|
|
273
|
-
### Removed
|
|
274
|
-
|
|
275
|
-
- **Breaking change:** Removed `*Includes` entity in favour of standard entities.
|
|
276
|
-
|
|
277
|
-
- Use `Price` instead of `PriceWithIncludes`
|
|
278
|
-
- Use `Product` instead of `ProductWithIncludes`
|
|
279
|
-
- Use `Subscription` instead of `SubscriptionIncludes`
|
|
280
|
-
- Use `Transaction` instead of `TransactionIncludes`
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## 0.5.0 - 2024-02-16
|
|
285
|
-
|
|
286
|
-
> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below.
|
|
287
|
-
|
|
288
|
-
### Changed
|
|
289
|
-
|
|
290
|
-
- We removed the shared entities between API and Notification as we foresee them diverging. No Action required for this change
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## 0.4.0 - 2024-02-14
|
|
295
|
-
|
|
296
|
-
### Added
|
|
297
|
-
|
|
298
|
-
- Added `availablePaymentMethods` as an `include` Parameter to all transaction operations.
|
|
299
|
-
- Added `importMeta` to Subscription webhooks.
|
|
300
|
-
|
|
301
|
-
### Changed
|
|
302
|
-
|
|
303
|
-
- Filter customers by email address in `customers.list()` operation, see [related changelog](https://developer.paddle.com/changelog/2024/filter-customers-email?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
304
|
-
- New payment method ID field for transaction payments, see [related changelog](https://developer.paddle.com/changelog/2024/payment-method-paddle-id?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
305
|
-
|
|
306
|
-
### Fixed
|
|
307
|
-
|
|
308
|
-
- Fixed `effective_from` enum in Resume subscription operations.
|
|
309
|
-
|
|
310
|
-
### Deprecated
|
|
311
|
-
|
|
312
|
-
- Deprecated `storedPaymentMethodId` from transaction payments in favour of `paymentMethodId` field.
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## 0.3.0 - 2024-01-11
|
|
317
|
-
|
|
318
|
-
### Changed
|
|
319
|
-
|
|
320
|
-
- The repo and the npm package is now generally available.
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## 0.2.9 - 2024-01-11
|
|
325
|
-
|
|
326
|
-
### Fixed
|
|
327
|
-
|
|
328
|
-
- Marked `endsAt` as optional in discount under Subscriptions entity.
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
## 0.2.8 - 2024-01-09
|
|
333
|
-
|
|
334
|
-
### Fixed
|
|
335
|
-
|
|
336
|
-
- Marked `unitPriceOverrides` as optional in Price entity.
|
|
337
|
-
|
|
338
|
-
---
|
|
339
|
-
|
|
340
|
-
## 0.2.7 - 2024-01-04
|
|
341
|
-
|
|
342
|
-
### Fixed
|
|
343
|
-
|
|
344
|
-
- Marked all properties in `ListNotificationQueryParameters` as optional.
|
|
345
|
-
- Removed additional `?` from URLS in List Reports and List Notifications functions.
|
|
346
|
-
- Fixed incorrect enum in Adjustment `type`
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## 0.2.6 - 2023-12-22
|
|
351
|
-
|
|
352
|
-
### Added
|
|
353
|
-
|
|
354
|
-
- Added support for `address.imported`, `business.imported`, `customer.imported`, `price.imported` and `product.imported` notifications.
|
|
355
|
-
|
|
356
|
-
### Changed
|
|
357
|
-
|
|
358
|
-
- Added support to get available payment methods when previewing prices or transactions, see [related changelog](https://developer.paddle.com/changelog/2023/available-payment-methods?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
359
|
-
- Added support to bill a one time non-catalog products and prices to subscription, see [related changelog](https://developer.paddle.com/changelog/2023/bill-custom-items-one-time-subscription-charge?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
360
|
-
- Added support for non-catalog products and prices to transaction, see [related changelog](https://developer.paddle.com/changelog/2023/add-custom-items-transaction?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
361
|
-
- Added `subscription.onPaymentFailure` to update subscriptions and preview update subscription operations, see [related changelog](https://developer.paddle.com/changelog/2023/payment-failure-behavior-update-subscription?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
365
|
-
## 0.2.5 - 2023-12-15
|
|
366
|
-
|
|
367
|
-
### Added
|
|
368
|
-
|
|
369
|
-
- Added `reports.list()` to [list reports](https://developer.paddle.com/api-reference/reports/list-reports?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
370
|
-
- Added `reports.create()` to [create a new report](https://developer.paddle.com/api-reference/reports/create-report?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
371
|
-
- Added `reports.get()` to [get a report](https://developer.paddle.com/api-reference/reports/get-report?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
372
|
-
- Added `reports.getReportCsv()` to [get a CSV file for a report](https://developer.paddle.com/api-reference/reports/get-report-csv?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
373
|
-
|
|
374
|
-
---
|
|
375
|
-
|
|
376
|
-
## 0.2.4 - 2023-12-14
|
|
377
|
-
|
|
378
|
-
### Changed
|
|
379
|
-
|
|
380
|
-
- Added `importMeta` to address, business, customer, discount and subscription entities
|
|
381
|
-
- Added `creditToBalance` to `transaction.details.payoutTotals` and `transaction.details.totals`
|
|
382
|
-
- 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).
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## 0.2.3 - 2023-12-12
|
|
387
|
-
|
|
388
|
-
### Added
|
|
389
|
-
|
|
390
|
-
- Added `eventTypes.list()` to [list all event types](https://developer.paddle.com/api-reference/event-types/list-event-types?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
391
|
-
- Added `notificationSettings.list()` to [list all notification settings](https://developer.paddle.com/api-reference/notification-settings/list-notification-settings?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
392
|
-
- Added `notificationSettings.create()` to [create a notification settings](https://developer.paddle.com/api-reference/notification-settings/create-notification-setting?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
393
|
-
- Added `notificationSettings.get()` to [get a notification settings](https://developer.paddle.com/api-reference/notification-settings/get-notification-setting?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
394
|
-
- Added `notificationSettings.update()` to [update a notification settings](https://developer.paddle.com/api-reference/notification-settings/update-notification-setting?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
395
|
-
- Added `notificationSettings.delete()` to [delete a notification settings](https://developer.paddle.com/api-reference/notification-settings/delete-notification-setting?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
396
|
-
- Added `notifications.list()` to [list all notifications](https://developer.paddle.com/api-reference/notifications/list-notifications?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
397
|
-
- Added `notifications.get()` to [get a notification](https://developer.paddle.com/api-reference/notifications/get-notification?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
398
|
-
- Added `notifications.replay()` to [replay a notification](https://developer.paddle.com/api-reference/notifications/replay-notification?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
399
|
-
- Added `notifications.getLogs()` to [get all logs for a notification](https://developer.paddle.com/api-reference/notification-logs/list-notification-logs?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
400
|
-
|
|
401
|
-
### Fixed
|
|
402
|
-
|
|
403
|
-
- Fixed incorrect type of `action` in `subscriptions.scheduled_change`
|
|
404
|
-
|
|
405
|
-
---
|
|
406
|
-
|
|
407
|
-
## 0.2.2 - 2023-12-01
|
|
408
|
-
|
|
409
|
-
### Added
|
|
410
|
-
|
|
411
|
-
- Added `events.list()` to [list all events](https://developer.paddle.com/api-reference/events/list-events?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
412
|
-
- Added helper function `paddle.webhooks.unmarshal` to [validate](https://developer.paddle.com/webhooks/signature-verification?utm_source=dx&utm_medium=paddle-node-sdk) and parse webhook events
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
|
-
## 0.2.1 - 2023-11-29
|
|
417
|
-
|
|
418
|
-
### Added
|
|
419
|
-
|
|
420
|
-
- Added helper function to archive supported entities
|
|
421
|
-
- Added `pricingPreview.preview()` to [preview calculations for one or more prices](https://developer.paddle.com/api-reference/pricing-preview/preview-prices?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
422
|
-
|
|
423
|
-
### Changed
|
|
424
|
-
|
|
425
|
-
- **Breaking change:** Converted all `list` operations to be synchronous. They did not have any async operation within them, and it was incorrectly typed to return a `Promise`.
|
|
426
|
-
|
|
427
|
-
---
|
|
428
|
-
|
|
429
|
-
## 0.2.0 - 2023-11-28
|
|
430
|
-
|
|
431
|
-
> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below.
|
|
432
|
-
|
|
433
|
-
### Added
|
|
434
|
-
|
|
435
|
-
- Added `lodash` as a dependency.
|
|
436
|
-
- Added `customData` to discount entity, see: [related changelog](https://developer.paddle.com/changelog/2023/custom-data-discounts?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
437
|
-
- Added `name` to price entity, see [related changelog](https://developer.paddle.com/changelog/2023/price-name-description?utm_source=dx&utm_medium=paddle-node-sdk).
|
|
438
|
-
- Added `importMeta` to product and price entities.
|
|
439
|
-
|
|
440
|
-
### Fixed
|
|
441
|
-
|
|
442
|
-
- Fixed [list credit balances for a customer](https://developer.paddle.com/api-reference/customers/list-credit-balances?utm_source=dx&utm_medium=paddle-node-sdk) response entity.
|
|
443
|
-
- Fixed `adjustments` array in `next_transaction` object in subscription entity.
|
|
444
|
-
|
|
445
|
-
### Changed
|
|
446
|
-
|
|
447
|
-
- **Breaking change:** Converted all properties from `snake_case` to `camelCase`. This matches JavaScript conventions for field names.
|
|
448
|
-
|
|
449
|
-
### Removed
|
|
450
|
-
|
|
451
|
-
- **Breaking change:** Removed `toJson` function from all entities.
|
|
452
|
-
|
|
453
|
-
---
|
|
454
|
-
|
|
455
|
-
## 0.1.8 - 2023-11-24
|
|
456
|
-
|
|
457
|
-
### Added
|
|
458
|
-
|
|
459
|
-
- Added `transactions.preview()` to [preview a transaction](https://developer.paddle.com/api-reference/transactions/preview-transaction?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
460
|
-
|
|
461
|
-
---
|
|
462
|
-
|
|
463
|
-
## 0.1.7 - 2023-11-23
|
|
464
|
-
|
|
465
|
-
### Added
|
|
466
|
-
|
|
467
|
-
- Added changelog.
|
|
468
|
-
|
|
469
|
-
---
|
|
470
|
-
|
|
471
|
-
## 0.1.6 - 2023-11-22
|
|
472
|
-
|
|
473
|
-
### Fixed
|
|
474
|
-
|
|
475
|
-
- Fixed optional management URL object in subscription entities.
|
|
476
|
-
|
|
477
|
-
---
|
|
478
|
-
|
|
479
|
-
## 0.1.5 - 2023-11-14
|
|
480
|
-
|
|
481
|
-
### Added
|
|
482
|
-
|
|
483
|
-
- Added `transactions.getInvoicePDF()` for the [get a PDF invoice for a transaction](https://developer.paddle.com/api-reference/transactions/get-invoice-pdf?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
484
|
-
- Enabled request and response logging.
|
|
485
|
-
|
|
486
|
-
---
|
|
487
|
-
|
|
488
|
-
## 0.1.4 - 2023-11-09
|
|
489
|
-
|
|
490
|
-
### Removed
|
|
491
|
-
|
|
492
|
-
- Removed unused dependency `lodash`.
|
|
493
|
-
|
|
494
|
-
---
|
|
495
|
-
|
|
496
|
-
## 0.1.3 - 2023-11-08
|
|
497
|
-
|
|
498
|
-
### Fixed
|
|
499
|
-
|
|
500
|
-
- Added missing query parameters for the [list transactions](https://developer.paddle.com/api-reference/transactions/list-transactions?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
501
|
-
|
|
502
|
-
---
|
|
503
|
-
|
|
504
|
-
## 0.1.2 - 2023-11-06
|
|
505
|
-
|
|
506
|
-
### Fixed
|
|
507
|
-
|
|
508
|
-
- Fixed incorrect update subscription request body TypeScript definition.
|
|
509
|
-
|
|
510
|
-
---
|
|
511
|
-
|
|
512
|
-
## 0.1.1 - 2023-11-06
|
|
513
|
-
|
|
514
|
-
### Added
|
|
515
|
-
|
|
516
|
-
- Added `customers.getCreditBalance()` for the [list credit balances for a customer](https://developer.paddle.com/api-reference/customers/list-credit-balances?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
517
|
-
- Added `subscriptions.previewUpdate()` for the [preview an update to a subscription](https://developer.paddle.com/api-reference/subscriptions/preview-subscription?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
518
|
-
- Added `subscriptions.activate()` for the [activate a trialing subscription](https://developer.paddle.com/api-reference/subscriptions/activate-subscription?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
519
|
-
- Added `subscriptions.pause()` for the [pause a subscription](https://developer.paddle.com/api-reference/subscriptions/pause-subscription?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
520
|
-
- Added `subscriptions.resume()` for the [resume a paused subscription](https://developer.paddle.com/api-reference/subscriptions/resume-subscription?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
521
|
-
- Added `subscriptions.cancel()` for the [cancel a subscription](https://developer.paddle.com/api-reference/subscriptions/cancel-subscription?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
522
|
-
- Added `subscriptions.createOneTimeCharge()` for the [create a one-time charge for a subscription](https://developer.paddle.com/api-reference/subscriptions/create-one-time-charge?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
523
|
-
- Added `subscriptions.previewOneTimeCharge()` for the [preview a one-time charge for a subscription](https://developer.paddle.com/api-reference/subscriptions/preview-subscription-charge?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
524
|
-
- Added `subscriptions.getPaymentMethodChangeTransaction()` for the [get a transaction to update payment method](https://developer.paddle.com/api-reference/subscriptions/update-payment-method?utm_source=dx&utm_medium=paddle-node-sdk) operation.
|
|
525
|
-
|
|
526
|
-
---
|
|
527
|
-
|
|
528
|
-
## 0.1.0 - 2023-11-03
|
|
529
|
-
|
|
530
|
-
### Added
|
|
531
|
-
|
|
532
|
-
- Initial early access release. Added support for the most frequently used Paddle Billing entities and API operations. Check the [README](./README.md) for more information.
|