Skip to content

Commit 662553d

Browse files
authored
Add Webhook Simulation resources (#49)
- Added `simulationTypes` resources - Added `simulations` resources - Added `simulationRuns` resources - Added `simulationRunEvents` resources
1 parent 2b65e10 commit 662553d

File tree

66 files changed

+1783
-12
lines changed

Some content is hidden

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

66 files changed

+1783
-12
lines changed

.github/workflows/build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
push:
55
branches:
66
- main
7-
- v1.X
7+
- v1.x
88
- release/beta
99
pull_request:
1010
branches:
1111
- main
12-
- v1.X
12+
- v1.x
1313
- release/beta
1414

1515
concurrency:

.github/workflows/linting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
push:
55
branches:
66
- main
7-
- v1.X
7+
- v1.x
88
- release/beta
99
pull_request:
1010
branches:
1111
- main
12-
- v1.X
12+
- v1.x
1313
- release/beta
1414

1515
concurrency:

.github/workflows/publish-latest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- v1.x
78

89
jobs:
910
run-publish:

CHANGELOG.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a
1212

1313
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.
1414

15+
## 1.8.0 - 2024-10-08
16+
17+
### Added
18+
19+
- Added `simulationTypes` resources
20+
- Added `simulations` resources
21+
- Added `simulationRuns` resources
22+
- Added `simulationRunEvents` resources
23+
1524
## 1.7.0 - 2024-09-18
1625

1726
### Fixed
@@ -23,7 +32,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
2332
## 1.6.0 - 2024-09-16
2433

2534
### Added
26-
35+
2736
- 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)
2837
- 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).
2938
- 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).
@@ -153,7 +162,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
153162
### Removed
154163

155164
- **Breaking change:** Removed `*Includes` entity in favour of standard entities.
156-
165+
157166
- Use `Price` instead of `PriceWithIncludes`
158167
- Use `Product` instead of `ProductWithIncludes`
159168
- Use `Subscription` instead of `SubscriptionIncludes`
@@ -213,7 +222,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
213222

214223
### Fixed
215224

216-
- Marked `unitPriceOverrides` as optional in Price entity.
225+
- Marked `unitPriceOverrides` as optional in Price entity.
217226

218227
---
219228

@@ -273,7 +282,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
273282
- 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)
274283
- 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)
275284
- 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)
276-
- Added `notifications.list()` to [list all notifications](https://developer.paddle.com/api-reference/notifications/list-notifications?utm_source=dx&utm_medium=paddle-node-sdk)
285+
- Added `notifications.list()` to [list all notifications](https://developer.paddle.com/api-reference/notifications/list-notifications?utm_source=dx&utm_medium=paddle-node-sdk)
277286
- Added `notifications.get()` to [get a notification](https://developer.paddle.com/api-reference/notifications/get-notification?utm_source=dx&utm_medium=paddle-node-sdk)
278287
- Added `notifications.replay()` to [replay a notification](https://developer.paddle.com/api-reference/notifications/replay-notification?utm_source=dx&utm_medium=paddle-node-sdk)
279288
- 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)
@@ -298,7 +307,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
298307
### Added
299308

300309
- Added helper function to archive supported entities
301-
- 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)
310+
- 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)
302311

303312
### Changed
304313

@@ -346,15 +355,15 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
346355

347356
- Added changelog.
348357

349-
---
358+
---
350359

351360
## 0.1.6 - 2023-11-22
352361

353362
### Fixed
354363

355364
- Fixed optional management URL object in subscription entities.
356365

357-
---
366+
---
358367

359368
## 0.1.5 - 2023-11-14
360369

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": "1.7.0",
3+
"version": "1.8.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/cjs/index.js",
66
"module": "./dist/esm/index.js",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* ! Autogenerated code !
3+
* Do not make changes to this file.
4+
* Changes may be overwritten as part of auto-generation.
5+
*/
6+
7+
import { ISimulationRunEventResponse } from '../../../types';
8+
import { Response, ResponsePaginated } from '../../../internal';
9+
10+
export const SimulationRunEventMock: ISimulationRunEventResponse = {
11+
id: 'ntfsimevt_123',
12+
status: 'success',
13+
event_type: 'subscription.created',
14+
payload: {},
15+
request: null,
16+
response: null,
17+
created_at: '2024-09-18T12:24:47.960617Z',
18+
updated_at: '2024-09-18T12:24:48.309530Z',
19+
};
20+
21+
export const SimulationRunEventMockResponse: Response<ISimulationRunEventResponse> = {
22+
data: SimulationRunEventMock,
23+
meta: {
24+
request_id: '',
25+
},
26+
};
27+
28+
export const ListSimulationRunEventMockResponse: ResponsePaginated<ISimulationRunEventResponse> = {
29+
data: [SimulationRunEventMock],
30+
meta: {
31+
request_id: '',
32+
pagination: {
33+
estimated_total: 10,
34+
has_more: true,
35+
next: '/simulations/ntfsim_123/runs/ntfsimrun_123/events?after=1',
36+
per_page: 10,
37+
},
38+
},
39+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* ! Autogenerated code !
3+
* Do not make changes to this file.
4+
* Changes may be overwritten as part of auto-generation.
5+
*/
6+
7+
import { ISimulationRunResponse } from '../../../types';
8+
import { Response, ResponsePaginated } from '../../../internal';
9+
10+
export const SimulationRunMock: ISimulationRunResponse = {
11+
id: 'ntfsimrun_01j82gvz2cgw08p7mak3gcd3a3',
12+
status: 'completed',
13+
type: 'subscription_creation',
14+
created_at: '2024-09-18T12:14:15.628606Z',
15+
updated_at: '2024-09-18T12:14:27.244695Z',
16+
};
17+
18+
export const SimulationRunMockResponse: Response<ISimulationRunResponse> = {
19+
data: SimulationRunMock,
20+
meta: {
21+
request_id: '',
22+
},
23+
};
24+
25+
export const ListSimulationRunMockResponse: ResponsePaginated<ISimulationRunResponse> = {
26+
data: [SimulationRunMock],
27+
meta: {
28+
request_id: '',
29+
pagination: {
30+
estimated_total: 10,
31+
has_more: true,
32+
next: '/simulations/ntfsim_123/runs?after=1',
33+
per_page: 10,
34+
},
35+
},
36+
};

0 commit comments

Comments
 (0)