Skip to content

Commit 1be29ff

Browse files
Diverge Notification and API entities (#3)
1 parent 401d57c commit 1be29ff

File tree

206 files changed

+3103
-424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+3103
-424
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
99
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.
1010

11+
## 0.5.0 - 2024-02-16
12+
13+
> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below.
14+
15+
### Changed
16+
17+
- We removed the shared entities between API and Notification as we foresee them diverging. No Action required for this change
18+
1119
## 0.4.0 - 2024-02-14
1220

1321
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@paddle/paddle-node-sdk",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

src/__tests__/mocks/notifications/subscription-activated.mock.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* Changes may be overwritten as part of auto-generation.
55
*/
66

7-
import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
7+
import { type IEventsResponse } from '../../../types';
8+
import { ISubscriptionNotificationResponse } from '../../../notifications';
89

910
export const SubscriptionActivatedMock: IEventsResponse<ISubscriptionNotificationResponse> = {
1011
event_id: 'evt_01h7ht60mmw6d4sf4h38g3t4yq',
@@ -109,15 +110,22 @@ export const SubscriptionActivatedMockExpectation = {
109110
frequency: 1,
110111
interval: 'month',
111112
},
113+
customData: null,
112114
description: 'Monthly (per seat)',
113115
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
116+
importMeta: null,
117+
name: null,
114118
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
119+
quantity: null,
120+
status: null,
115121
taxMode: 'account_setting',
116122
trialPeriod: null,
123+
type: null,
117124
unitPrice: {
118125
amount: '3240',
119126
currencyCode: 'USD',
120127
},
128+
unitPriceOverrides: [],
121129
},
122130
quantity: 10,
123131
recurring: true,
@@ -134,15 +142,22 @@ export const SubscriptionActivatedMockExpectation = {
134142
frequency: 1,
135143
interval: 'month',
136144
},
145+
customData: null,
137146
description: 'Monthly (recurring addon)',
147+
importMeta: null,
148+
name: null,
138149
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
139150
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
151+
quantity: null,
152+
status: null,
140153
taxMode: 'account_setting',
141154
trialPeriod: null,
155+
type: null,
142156
unitPrice: {
143157
amount: '10800',
144158
currencyCode: 'USD',
145159
},
160+
unitPriceOverrides: [],
146161
},
147162
quantity: 1,
148163
recurring: true,

src/__tests__/mocks/notifications/subscription-canceled.mock.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* Changes may be overwritten as part of auto-generation.
55
*/
66

7-
import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
7+
import { type IEventsResponse } from '../../../types';
8+
import { ISubscriptionNotificationResponse } from '../../../notifications';
89

910
export const SubscriptionCanceledMock: IEventsResponse<ISubscriptionNotificationResponse> = {
1011
event_id: 'evt_01h7jk37p1ezj1k5b4kt83t35j',
@@ -124,15 +125,22 @@ export const SubscriptionCanceledMockExpectation = {
124125
frequency: 1,
125126
interval: 'month',
126127
},
128+
customData: null,
127129
description: 'Monthly (per seat)',
128130
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
131+
importMeta: null,
132+
name: null,
129133
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
134+
quantity: null,
135+
status: null,
130136
taxMode: 'account_setting',
131137
trialPeriod: null,
138+
type: null,
132139
unitPrice: {
133140
amount: '3240',
134141
currencyCode: 'USD',
135142
},
143+
unitPriceOverrides: [],
136144
},
137145
quantity: 10,
138146
recurring: true,
@@ -149,15 +157,22 @@ export const SubscriptionCanceledMockExpectation = {
149157
frequency: 1,
150158
interval: 'month',
151159
},
160+
customData: null,
152161
description: 'Monthly (recurring addon)',
162+
importMeta: null,
163+
name: null,
153164
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
154165
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
166+
quantity: null,
167+
status: null,
155168
taxMode: 'account_setting',
156169
trialPeriod: null,
170+
type: null,
157171
unitPrice: {
158172
amount: '10800',
159173
currencyCode: 'USD',
160174
},
175+
unitPriceOverrides: [],
161176
},
162177
quantity: 1,
163178
recurring: true,
@@ -174,15 +189,22 @@ export const SubscriptionCanceledMockExpectation = {
174189
frequency: 1,
175190
interval: 'month',
176191
},
192+
customData: null,
177193
description: 'Monthly (recurring addon)',
194+
importMeta: null,
195+
name: null,
178196
id: 'pri_01gsz95g2zrkagg294kpstx54r',
179197
productId: 'pro_01gsz92krfzy3hcx5h5rtgnfwz',
198+
quantity: null,
199+
status: null,
180200
taxMode: 'account_setting',
181201
trialPeriod: null,
202+
type: null,
182203
unitPrice: {
183204
amount: '30000',
184205
currencyCode: 'USD',
185206
},
207+
unitPriceOverrides: [],
186208
},
187209
quantity: 1,
188210
recurring: true,

src/__tests__/mocks/notifications/subscription-created.mock.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* Changes may be overwritten as part of auto-generation.
55
*/
66

7-
import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
7+
import { type IEventsResponse } from '../../../types';
8+
import { ISubscriptionNotificationResponse } from '../../../notifications';
89

910
export const SubscriptionCreatedMock: IEventsResponse<ISubscriptionNotificationResponse> = {
1011
event_id: 'evt_01h7ht60jy5hpdv5x8tfsaxje4',
@@ -109,15 +110,22 @@ export const SubscriptionCreatedMockExpectation = {
109110
frequency: 1,
110111
interval: 'month',
111112
},
113+
customData: null,
112114
description: 'Monthly (per seat)',
113115
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
116+
importMeta: null,
117+
name: null,
114118
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
119+
quantity: null,
120+
status: null,
115121
taxMode: 'account_setting',
116122
trialPeriod: null,
123+
type: null,
117124
unitPrice: {
118125
amount: '3240',
119126
currencyCode: 'USD',
120127
},
128+
unitPriceOverrides: [],
121129
},
122130
quantity: 10,
123131
recurring: true,
@@ -134,15 +142,22 @@ export const SubscriptionCreatedMockExpectation = {
134142
frequency: 1,
135143
interval: 'month',
136144
},
145+
customData: null,
137146
description: 'Monthly (recurring addon)',
147+
importMeta: null,
148+
name: null,
138149
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
139150
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
151+
quantity: null,
152+
status: null,
140153
taxMode: 'account_setting',
141154
trialPeriod: null,
155+
type: null,
142156
unitPrice: {
143157
amount: '10800',
144158
currencyCode: 'USD',
145159
},
160+
unitPriceOverrides: [],
146161
},
147162
quantity: 1,
148163
recurring: true,

src/__tests__/mocks/notifications/subscription-imported.mock.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* Changes may be overwritten as part of auto-generation.
55
*/
66

7-
import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
7+
import { type IEventsResponse } from '../../../types';
8+
import { ISubscriptionNotificationResponse } from '../../../notifications';
89

910
export const SubscriptionImportedMock: IEventsResponse<ISubscriptionNotificationResponse> = {
1011
event_id: 'evt_01gxwxwnghn8xa7amfwqb0992q',
@@ -124,15 +125,22 @@ export const SubscriptionImportedMockExpectation = {
124125
frequency: 1,
125126
interval: 'month',
126127
},
128+
customData: null,
127129
description: 'Monthly (per seat)',
128130
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
131+
importMeta: null,
132+
name: null,
129133
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
134+
quantity: null,
135+
status: null,
130136
taxMode: 'account_setting',
131137
trialPeriod: null,
138+
type: null,
132139
unitPrice: {
133140
amount: '3600',
134141
currencyCode: 'GBP',
135142
},
143+
unitPriceOverrides: [],
136144
},
137145
quantity: 10,
138146
recurring: true,
@@ -149,15 +157,22 @@ export const SubscriptionImportedMockExpectation = {
149157
frequency: 1,
150158
interval: 'month',
151159
},
160+
customData: null,
152161
description: 'Monthly (recurring addon)',
162+
importMeta: null,
163+
name: null,
153164
id: 'pri_01gsz95g2zrkagg294kpstx54r',
154165
productId: 'pro_01gsz92krfzy3hcx5h5rtgnfwz',
166+
quantity: null,
167+
status: null,
155168
taxMode: 'account_setting',
156169
trialPeriod: null,
170+
type: null,
157171
unitPrice: {
158172
amount: '30000',
159173
currencyCode: 'GBP',
160174
},
175+
unitPriceOverrides: [],
161176
},
162177
quantity: 1,
163178
recurring: true,
@@ -171,15 +186,22 @@ export const SubscriptionImportedMockExpectation = {
171186
previouslyBilledAt: '2023-04-13T09:07:04.730931Z',
172187
price: {
173188
billingCycle: null,
189+
customData: null,
174190
description: 'One-time charge',
191+
importMeta: null,
192+
name: null,
175193
id: 'pri_01gsz98e27ak2tyhexptwc58yk',
176194
productId: 'pro_01gsz97mq9pa4fkyy0wqenepkz',
195+
quantity: null,
196+
status: null,
177197
taxMode: 'account_setting',
178198
trialPeriod: null,
199+
type: null,
179200
unitPrice: {
180201
amount: '23880',
181202
currencyCode: 'GBP',
182203
},
204+
unitPriceOverrides: [],
183205
},
184206
quantity: 1,
185207
recurring: false,

src/__tests__/mocks/notifications/subscription-past-due.mock.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* Changes may be overwritten as part of auto-generation.
55
*/
66

7-
import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
7+
import { type IEventsResponse } from '../../../types';
8+
import { ISubscriptionNotificationResponse } from '../../../notifications';
89

910
export const SubscriptionPastDueMock: IEventsResponse<ISubscriptionNotificationResponse> = {
1011
event_id: 'evt_01h7jagte1wnq80w5bw5gbmrwk',
@@ -109,15 +110,22 @@ export const SubscriptionPastDueMockExpectation = {
109110
frequency: 1,
110111
interval: 'month',
111112
},
113+
customData: null,
112114
description: 'Monthly (per seat)',
113115
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
116+
importMeta: null,
117+
name: null,
114118
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
119+
quantity: null,
120+
status: null,
115121
taxMode: 'account_setting',
116122
trialPeriod: null,
123+
type: null,
117124
unitPrice: {
118125
amount: '3240',
119126
currencyCode: 'USD',
120127
},
128+
unitPriceOverrides: [],
121129
},
122130
quantity: 10,
123131
recurring: true,
@@ -134,15 +142,22 @@ export const SubscriptionPastDueMockExpectation = {
134142
frequency: 1,
135143
interval: 'month',
136144
},
145+
customData: null,
137146
description: 'Monthly (recurring addon)',
147+
importMeta: null,
148+
name: null,
138149
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
139150
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
151+
quantity: null,
152+
status: null,
140153
taxMode: 'account_setting',
141154
trialPeriod: null,
155+
type: null,
142156
unitPrice: {
143157
amount: '10800',
144158
currencyCode: 'USD',
145159
},
160+
unitPriceOverrides: [],
146161
},
147162
quantity: 1,
148163
recurring: true,

0 commit comments

Comments
 (0)