@paddle/paddle-node-sdk 2.0.0-rc.0 → 2.0.0-rc.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/CHANGELOG.md +18 -7
- package/dist/cjs/entities/index.js +4 -0
- package/dist/cjs/entities/shared/index.js +2 -0
- package/dist/cjs/entities/shared/simulation-event-request.js +9 -0
- package/dist/cjs/entities/shared/simulation-event-response.js +10 -0
- package/dist/cjs/entities/simulation/index.js +18 -0
- package/dist/cjs/entities/simulation/simulation-collection.js +11 -0
- package/dist/cjs/entities/simulation/simulation.js +18 -0
- package/dist/cjs/entities/simulation-run/index.js +18 -0
- package/dist/cjs/entities/simulation-run/simulation-run-collection.js +11 -0
- package/dist/cjs/entities/simulation-run/simulation-run.js +16 -0
- package/dist/cjs/entities/simulation-run-event/index.js +18 -0
- package/dist/cjs/entities/simulation-run-event/simulation-run-event-collection.js +11 -0
- package/dist/cjs/entities/simulation-run-event/simulation-run-event.js +21 -0
- package/dist/cjs/entities/simulation-types/index.js +17 -0
- package/dist/cjs/entities/simulation-types/simulation-type.js +14 -0
- package/dist/cjs/enums/index.js +4 -0
- package/dist/cjs/enums/simulation/index.js +17 -0
- package/dist/cjs/enums/simulation/simulation-scenario-type.js +2 -0
- package/dist/cjs/enums/simulation-run/index.js +17 -0
- package/dist/cjs/enums/simulation-run/simulation-run-status.js +2 -0
- package/dist/cjs/enums/simulation-run-event/index.js +17 -0
- package/dist/cjs/enums/simulation-run-event/simulation-run-event-status.js +2 -0
- package/dist/cjs/enums/simulation-type/index.js +17 -0
- package/dist/cjs/enums/simulation-type/simulation-kind.js +2 -0
- package/dist/cjs/paddle.js +4 -0
- package/dist/cjs/resources/index.js +4 -0
- package/dist/cjs/resources/simulation-run-events/index.js +69 -0
- package/dist/cjs/resources/simulation-run-events/operations/index.js +17 -0
- package/dist/cjs/resources/simulation-run-events/operations/list-simulation-run-events-query-parameters.js +2 -0
- package/dist/cjs/resources/simulation-runs/index.js +66 -0
- package/dist/cjs/resources/simulation-runs/operations/get-simulation-run-query-parameters.js +2 -0
- package/dist/cjs/resources/simulation-runs/operations/index.js +18 -0
- package/dist/cjs/resources/simulation-runs/operations/list-simulation-run-query-parameters.js +2 -0
- package/dist/cjs/resources/simulation-types/index.js +27 -0
- package/dist/cjs/resources/simulations/index.js +69 -0
- package/dist/cjs/resources/simulations/operations/create-simulation-request-body.js +2 -0
- package/dist/cjs/resources/simulations/operations/index.js +19 -0
- package/dist/cjs/resources/simulations/operations/list-simulation-query-parameters.js +2 -0
- package/dist/cjs/resources/simulations/operations/update-simulation-request-body.js +2 -0
- package/dist/cjs/types/index.js +4 -0
- package/dist/cjs/types/shared/index.js +3 -0
- package/dist/cjs/types/shared/simulation-event-request.js +2 -0
- package/dist/cjs/types/shared/simulation-event-response.js +2 -0
- package/dist/cjs/types/shared/simulation-payload.js +2 -0
- package/dist/cjs/types/simulation/index.js +17 -0
- package/dist/cjs/types/simulation/simulation-response.js +2 -0
- package/dist/cjs/types/simulation-run/index.js +17 -0
- package/dist/cjs/types/simulation-run/simulation-run-event.js +2 -0
- package/dist/cjs/types/simulation-run/simulation-run-response.js +2 -0
- package/dist/cjs/types/simulation-run-event/index.js +17 -0
- package/dist/cjs/types/simulation-run-event/simulation-run-event-response.js +2 -0
- package/dist/cjs/types/simulation-type/index.js +17 -0
- package/dist/cjs/types/simulation-type/simulation-type.js +2 -0
- package/dist/cjs/version.js +1 -1
- package/dist/esm/entities/index.js +4 -0
- package/dist/esm/entities/shared/index.js +2 -0
- package/dist/esm/entities/shared/simulation-event-request.js +5 -0
- package/dist/esm/entities/shared/simulation-event-response.js +6 -0
- package/dist/esm/entities/simulation/index.js +2 -0
- package/dist/esm/entities/simulation/simulation-collection.js +7 -0
- package/dist/esm/entities/simulation/simulation.js +14 -0
- package/dist/esm/entities/simulation-run/index.js +2 -0
- package/dist/esm/entities/simulation-run/simulation-run-collection.js +7 -0
- package/dist/esm/entities/simulation-run/simulation-run.js +12 -0
- package/dist/esm/entities/simulation-run-event/index.js +2 -0
- package/dist/esm/entities/simulation-run-event/simulation-run-event-collection.js +7 -0
- package/dist/esm/entities/simulation-run-event/simulation-run-event.js +17 -0
- package/dist/esm/entities/simulation-types/index.js +1 -0
- package/dist/esm/entities/simulation-types/simulation-type.js +10 -0
- package/dist/esm/enums/index.js +4 -0
- package/dist/esm/enums/simulation/index.js +1 -0
- package/dist/esm/enums/simulation/simulation-scenario-type.js +1 -0
- package/dist/esm/enums/simulation-run/index.js +1 -0
- package/dist/esm/enums/simulation-run/simulation-run-status.js +1 -0
- package/dist/esm/enums/simulation-run-event/index.js +1 -0
- package/dist/esm/enums/simulation-run-event/simulation-run-event-status.js +1 -0
- package/dist/esm/enums/simulation-type/index.js +1 -0
- package/dist/esm/enums/simulation-type/simulation-kind.js +1 -0
- package/dist/esm/paddle.js +5 -1
- package/dist/esm/resources/index.js +4 -0
- package/dist/esm/resources/simulation-run-events/index.js +51 -0
- package/dist/esm/resources/simulation-run-events/operations/index.js +1 -0
- package/dist/esm/resources/simulation-run-events/operations/list-simulation-run-events-query-parameters.js +1 -0
- package/dist/esm/resources/simulation-runs/index.js +48 -0
- package/dist/esm/resources/simulation-runs/operations/get-simulation-run-query-parameters.js +1 -0
- package/dist/esm/resources/simulation-runs/operations/index.js +2 -0
- package/dist/esm/resources/simulation-runs/operations/list-simulation-run-query-parameters.js +1 -0
- package/dist/esm/resources/simulation-types/index.js +23 -0
- package/dist/esm/resources/simulations/index.js +51 -0
- package/dist/esm/resources/simulations/operations/create-simulation-request-body.js +1 -0
- package/dist/esm/resources/simulations/operations/index.js +3 -0
- package/dist/esm/resources/simulations/operations/list-simulation-query-parameters.js +1 -0
- package/dist/esm/resources/simulations/operations/update-simulation-request-body.js +1 -0
- package/dist/esm/types/index.js +4 -0
- package/dist/esm/types/shared/index.js +3 -0
- package/dist/esm/types/shared/simulation-event-request.js +1 -0
- package/dist/esm/types/shared/simulation-event-response.js +1 -0
- package/dist/esm/types/shared/simulation-payload.js +1 -0
- package/dist/esm/types/simulation/index.js +1 -0
- package/dist/esm/types/simulation/simulation-response.js +1 -0
- package/dist/esm/types/simulation-run/index.js +1 -0
- package/dist/esm/types/simulation-run/simulation-run-event.js +1 -0
- package/dist/esm/types/simulation-run/simulation-run-response.js +1 -0
- package/dist/esm/types/simulation-run-event/index.js +1 -0
- package/dist/esm/types/simulation-run-event/simulation-run-event-response.js +1 -0
- package/dist/esm/types/simulation-type/index.js +1 -0
- package/dist/esm/types/simulation-type/simulation-type.js +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/entities/index.d.ts +4 -0
- package/dist/types/entities/shared/index.d.ts +2 -0
- package/dist/types/entities/shared/simulation-event-request.d.ts +5 -0
- package/dist/types/entities/shared/simulation-event-response.d.ts +6 -0
- package/dist/types/entities/simulation/index.d.ts +2 -0
- package/dist/types/entities/simulation/simulation-collection.d.ts +6 -0
- package/dist/types/entities/simulation/simulation.d.ts +15 -0
- package/dist/types/entities/simulation-run/index.d.ts +2 -0
- package/dist/types/entities/simulation-run/simulation-run-collection.d.ts +6 -0
- package/dist/types/entities/simulation-run/simulation-run.d.ts +13 -0
- package/dist/types/entities/simulation-run-event/index.d.ts +2 -0
- package/dist/types/entities/simulation-run-event/simulation-run-event-collection.d.ts +6 -0
- package/dist/types/entities/simulation-run-event/simulation-run-event.d.ts +15 -0
- package/dist/types/entities/simulation-types/index.d.ts +1 -0
- package/dist/types/entities/simulation-types/simulation-type.d.ts +12 -0
- package/dist/types/enums/index.d.ts +4 -0
- package/dist/types/enums/simulation/index.d.ts +1 -0
- package/dist/types/enums/simulation/simulation-scenario-type.d.ts +1 -0
- package/dist/types/enums/simulation-run/index.d.ts +1 -0
- package/dist/types/enums/simulation-run/simulation-run-status.d.ts +1 -0
- package/dist/types/enums/simulation-run-event/index.d.ts +1 -0
- package/dist/types/enums/simulation-run-event/simulation-run-event-status.d.ts +1 -0
- package/dist/types/enums/simulation-type/index.d.ts +1 -0
- package/dist/types/enums/simulation-type/simulation-kind.d.ts +1 -0
- package/dist/types/notifications/helpers/types.d.ts +1 -1
- package/dist/types/paddle.d.ts +5 -1
- package/dist/types/resources/index.d.ts +4 -0
- package/dist/types/resources/simulation-run-events/index.d.ts +9 -0
- package/dist/types/resources/simulation-run-events/operations/index.d.ts +1 -0
- package/dist/types/resources/simulation-run-events/operations/list-simulation-run-events-query-parameters.d.ts +6 -0
- package/dist/types/resources/simulation-runs/index.d.ts +9 -0
- package/dist/types/resources/simulation-runs/operations/get-simulation-run-query-parameters.d.ts +3 -0
- package/dist/types/resources/simulation-runs/operations/index.d.ts +2 -0
- package/dist/types/resources/simulation-runs/operations/list-simulation-run-query-parameters.d.ts +7 -0
- package/dist/types/resources/simulation-types/index.d.ts +5 -0
- package/dist/types/resources/simulations/index.d.ts +10 -0
- package/dist/types/resources/simulations/operations/create-simulation-request-body.d.ts +10 -0
- package/dist/types/resources/simulations/operations/index.d.ts +3 -0
- package/dist/types/resources/simulations/operations/list-simulation-query-parameters.d.ts +9 -0
- package/dist/types/resources/simulations/operations/update-simulation-request-body.d.ts +12 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/shared/index.d.ts +3 -0
- package/dist/types/types/shared/simulation-event-request.d.ts +3 -0
- package/dist/types/types/shared/simulation-event-response.d.ts +4 -0
- package/dist/types/types/shared/simulation-payload.d.ts +58 -0
- package/dist/types/types/simulation/index.d.ts +1 -0
- package/dist/types/types/simulation/simulation-response.d.ts +13 -0
- package/dist/types/types/simulation-run/index.d.ts +1 -0
- package/dist/types/types/simulation-run/simulation-run-event.d.ts +17 -0
- package/dist/types/types/simulation-run/simulation-run-response.d.ts +11 -0
- package/dist/types/types/simulation-run-event/index.d.ts +1 -0
- package/dist/types/types/simulation-run-event/simulation-run-event-response.d.ts +13 -0
- package/dist/types/types/simulation-type/index.d.ts +1 -0
- package/dist/types/types/simulation-type/simulation-type.d.ts +10 -0
- package/dist/types/types/subscription/subscription-update-item.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,17 @@ 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.0.0-rc.1 - 2024-10-08
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added `simulationTypes` resources
|
|
20
|
+
- Added `simulations` resources
|
|
21
|
+
- Added `simulationRuns` resources
|
|
22
|
+
- Added `simulationRunEvents` resources
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
15
26
|
## 2.0.0-rc.0 - 2024-09-26
|
|
16
27
|
|
|
17
28
|
> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below.
|
|
@@ -40,7 +51,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
|
|
|
40
51
|
## 1.6.0 - 2024-09-16
|
|
41
52
|
|
|
42
53
|
### Added
|
|
43
|
-
|
|
54
|
+
|
|
44
55
|
- 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)
|
|
45
56
|
- 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).
|
|
46
57
|
- 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).
|
|
@@ -170,7 +181,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
|
|
|
170
181
|
### Removed
|
|
171
182
|
|
|
172
183
|
- **Breaking change:** Removed `*Includes` entity in favour of standard entities.
|
|
173
|
-
|
|
184
|
+
|
|
174
185
|
- Use `Price` instead of `PriceWithIncludes`
|
|
175
186
|
- Use `Product` instead of `ProductWithIncludes`
|
|
176
187
|
- Use `Subscription` instead of `SubscriptionIncludes`
|
|
@@ -230,7 +241,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
|
|
|
230
241
|
|
|
231
242
|
### Fixed
|
|
232
243
|
|
|
233
|
-
- Marked `unitPriceOverrides` as optional in Price entity.
|
|
244
|
+
- Marked `unitPriceOverrides` as optional in Price entity.
|
|
234
245
|
|
|
235
246
|
---
|
|
236
247
|
|
|
@@ -290,7 +301,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
|
|
|
290
301
|
- 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)
|
|
291
302
|
- 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)
|
|
292
303
|
- 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)
|
|
293
|
-
- Added `notifications.list()` to [list all notifications](https://developer.paddle.com/api-reference/notifications/list-notifications?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
304
|
+
- Added `notifications.list()` to [list all notifications](https://developer.paddle.com/api-reference/notifications/list-notifications?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
294
305
|
- Added `notifications.get()` to [get a notification](https://developer.paddle.com/api-reference/notifications/get-notification?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
295
306
|
- Added `notifications.replay()` to [replay a notification](https://developer.paddle.com/api-reference/notifications/replay-notification?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
296
307
|
- 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)
|
|
@@ -315,7 +326,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
|
|
|
315
326
|
### Added
|
|
316
327
|
|
|
317
328
|
- Added helper function to archive supported entities
|
|
318
|
-
- 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)
|
|
329
|
+
- 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)
|
|
319
330
|
|
|
320
331
|
### Changed
|
|
321
332
|
|
|
@@ -363,7 +374,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
|
|
|
363
374
|
|
|
364
375
|
- Added changelog.
|
|
365
376
|
|
|
366
|
-
---
|
|
377
|
+
---
|
|
367
378
|
|
|
368
379
|
## 0.1.6 - 2023-11-22
|
|
369
380
|
|
|
@@ -371,7 +382,7 @@ This means when upgrading minor versions of the SDK, you may notice type errors.
|
|
|
371
382
|
|
|
372
383
|
- Fixed optional management URL object in subscription entities.
|
|
373
384
|
|
|
374
|
-
---
|
|
385
|
+
---
|
|
375
386
|
|
|
376
387
|
## 0.1.5 - 2023-11-14
|
|
377
388
|
|
|
@@ -30,3 +30,7 @@ __exportStar(require("./event-types/index.js"), exports);
|
|
|
30
30
|
__exportStar(require("./notification-settings/index.js"), exports);
|
|
31
31
|
__exportStar(require("./notifications/index.js"), exports);
|
|
32
32
|
__exportStar(require("./report/index.js"), exports);
|
|
33
|
+
__exportStar(require("./simulation-types/index.js"), exports);
|
|
34
|
+
__exportStar(require("./simulation/index.js"), exports);
|
|
35
|
+
__exportStar(require("./simulation-run/index.js"), exports);
|
|
36
|
+
__exportStar(require("./simulation-run-event/index.js"), exports);
|
|
@@ -34,3 +34,5 @@ __exportStar(require("./transaction-checkout.js"), exports);
|
|
|
34
34
|
__exportStar(require("./total-adjustments.js"), exports);
|
|
35
35
|
__exportStar(require("./payout-totals-adjustment.js"), exports);
|
|
36
36
|
__exportStar(require("./import-meta.js"), exports);
|
|
37
|
+
__exportStar(require("./simulation-event-request.js"), exports);
|
|
38
|
+
__exportStar(require("./simulation-event-response.js"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationEventRequest = void 0;
|
|
4
|
+
class SimulationEventRequest {
|
|
5
|
+
constructor(simulationEventRequestResponse) {
|
|
6
|
+
this.body = simulationEventRequestResponse.body;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.SimulationEventRequest = SimulationEventRequest;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationEventResponse = void 0;
|
|
4
|
+
class SimulationEventResponse {
|
|
5
|
+
constructor(simulationEventResponse) {
|
|
6
|
+
this.body = simulationEventResponse.body;
|
|
7
|
+
this.statusCode = simulationEventResponse.status_code;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.SimulationEventResponse = SimulationEventResponse;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation.js"), exports);
|
|
18
|
+
__exportStar(require("./simulation-collection.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationCollection = void 0;
|
|
4
|
+
const index_js_1 = require("../../entities/index.js");
|
|
5
|
+
const index_js_2 = require("../../internal/base/index.js");
|
|
6
|
+
class SimulationCollection extends index_js_2.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new index_js_1.Simulation(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.SimulationCollection = SimulationCollection;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Simulation = void 0;
|
|
4
|
+
class Simulation {
|
|
5
|
+
constructor(simulationResponse) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
this.id = simulationResponse.id;
|
|
8
|
+
this.status = simulationResponse.status;
|
|
9
|
+
this.notificationSettingId = simulationResponse.notification_setting_id;
|
|
10
|
+
this.name = simulationResponse.name;
|
|
11
|
+
this.type = simulationResponse.type;
|
|
12
|
+
this.payload = (_a = simulationResponse.payload) !== null && _a !== void 0 ? _a : null;
|
|
13
|
+
this.lastRunAt = (_b = simulationResponse.last_run_at) !== null && _b !== void 0 ? _b : null;
|
|
14
|
+
this.createdAt = simulationResponse.created_at;
|
|
15
|
+
this.updatedAt = simulationResponse.updated_at;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Simulation = Simulation;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation-run.js"), exports);
|
|
18
|
+
__exportStar(require("./simulation-run-collection.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationRunCollection = void 0;
|
|
4
|
+
const index_js_1 = require("../../entities/index.js");
|
|
5
|
+
const index_js_2 = require("../../internal/base/index.js");
|
|
6
|
+
class SimulationRunCollection extends index_js_2.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new index_js_1.SimulationRun(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.SimulationRunCollection = SimulationRunCollection;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationRun = void 0;
|
|
4
|
+
const index_js_1 = require("../index.js");
|
|
5
|
+
class SimulationRun {
|
|
6
|
+
constructor(simulationRunResponse) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
this.id = simulationRunResponse.id;
|
|
9
|
+
this.status = simulationRunResponse.status;
|
|
10
|
+
this.createdAt = simulationRunResponse.created_at;
|
|
11
|
+
this.updatedAt = simulationRunResponse.updated_at;
|
|
12
|
+
this.type = simulationRunResponse.type;
|
|
13
|
+
this.events = (_b = (_a = simulationRunResponse.events) === null || _a === void 0 ? void 0 : _a.map((event) => new index_js_1.SimulationRunEvent(event))) !== null && _b !== void 0 ? _b : [];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.SimulationRun = SimulationRun;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation-run-event.js"), exports);
|
|
18
|
+
__exportStar(require("./simulation-run-event-collection.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationRunEventCollection = void 0;
|
|
4
|
+
const index_js_1 = require("../../entities/index.js");
|
|
5
|
+
const index_js_2 = require("../../internal/base/index.js");
|
|
6
|
+
class SimulationRunEventCollection extends index_js_2.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new index_js_1.SimulationRunEvent(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.SimulationRunEventCollection = SimulationRunEventCollection;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationRunEvent = void 0;
|
|
4
|
+
const index_js_1 = require("../shared/index.js");
|
|
5
|
+
class SimulationRunEvent {
|
|
6
|
+
constructor(simulationRunEventResponse) {
|
|
7
|
+
this.id = simulationRunEventResponse.id;
|
|
8
|
+
this.status = simulationRunEventResponse.status;
|
|
9
|
+
this.eventType = simulationRunEventResponse.event_type;
|
|
10
|
+
this.payload = simulationRunEventResponse.payload;
|
|
11
|
+
this.request = simulationRunEventResponse.request
|
|
12
|
+
? new index_js_1.SimulationEventRequest(simulationRunEventResponse.request)
|
|
13
|
+
: null;
|
|
14
|
+
this.response = simulationRunEventResponse.response
|
|
15
|
+
? new index_js_1.SimulationEventResponse(simulationRunEventResponse.response)
|
|
16
|
+
: null;
|
|
17
|
+
this.createdAt = simulationRunEventResponse.created_at;
|
|
18
|
+
this.updatedAt = simulationRunEventResponse.updated_at;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.SimulationRunEvent = SimulationRunEvent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation-type.js"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimulationType = void 0;
|
|
4
|
+
class SimulationType {
|
|
5
|
+
constructor(simulationTypeResponse) {
|
|
6
|
+
this.name = simulationTypeResponse.name;
|
|
7
|
+
this.label = simulationTypeResponse.label;
|
|
8
|
+
this.description = simulationTypeResponse.description;
|
|
9
|
+
this.group = simulationTypeResponse.group;
|
|
10
|
+
this.type = simulationTypeResponse.type;
|
|
11
|
+
this.events = simulationTypeResponse.events;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.SimulationType = SimulationType;
|
package/dist/cjs/enums/index.js
CHANGED
|
@@ -23,3 +23,7 @@ __exportStar(require("./payout/index.js"), exports);
|
|
|
23
23
|
__exportStar(require("./notification-settings/index.js"), exports);
|
|
24
24
|
__exportStar(require("./notification/index.js"), exports);
|
|
25
25
|
__exportStar(require("./report/index.js"), exports);
|
|
26
|
+
__exportStar(require("./simulation-type/index.js"), exports);
|
|
27
|
+
__exportStar(require("./simulation/index.js"), exports);
|
|
28
|
+
__exportStar(require("./simulation-run/index.js"), exports);
|
|
29
|
+
__exportStar(require("./simulation-run-event/index.js"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation-scenario-type.js"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation-run-status.js"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation-run-event-status.js"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./simulation-kind.js"), exports);
|
package/dist/cjs/paddle.js
CHANGED
|
@@ -29,6 +29,10 @@ class Paddle {
|
|
|
29
29
|
this.notificationSettings = new index_js_2.NotificationSettingsResource(this.client);
|
|
30
30
|
this.notifications = new index_js_2.NotificationsResource(this.client);
|
|
31
31
|
this.reports = new index_js_2.ReportsResource(this.client);
|
|
32
|
+
this.simulationTypes = new index_js_2.SimulationTypesResource(this.client);
|
|
33
|
+
this.simulations = new index_js_2.SimulationsResource(this.client);
|
|
34
|
+
this.simulationRuns = new index_js_2.SimulationRunsResource(this.client);
|
|
35
|
+
this.simulationRunEvents = new index_js_2.SimulationRunEventsResource(this.client);
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
exports.Paddle = Paddle;
|
|
@@ -28,3 +28,7 @@ __exportStar(require("./event-types/index.js"), exports);
|
|
|
28
28
|
__exportStar(require("./notification-settings/index.js"), exports);
|
|
29
29
|
__exportStar(require("./notifications/index.js"), exports);
|
|
30
30
|
__exportStar(require("./reports/index.js"), exports);
|
|
31
|
+
__exportStar(require("./simulation-types/index.js"), exports);
|
|
32
|
+
__exportStar(require("./simulations/index.js"), exports);
|
|
33
|
+
__exportStar(require("./simulation-runs/index.js"), exports);
|
|
34
|
+
__exportStar(require("./simulation-run-events/index.js"), exports);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SimulationRunEventsResource = void 0;
|
|
27
|
+
const index_js_1 = require("../../entities/index.js");
|
|
28
|
+
const index_js_2 = require("../../internal/base/index.js");
|
|
29
|
+
__exportStar(require("./operations/index.js"), exports);
|
|
30
|
+
const SimulationRunEventPaths = {
|
|
31
|
+
list: '/simulations/{simulation_id}/runs/{simulation_run_id}/events',
|
|
32
|
+
get: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}',
|
|
33
|
+
replay: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}/replay',
|
|
34
|
+
};
|
|
35
|
+
class SimulationRunEventsResource extends index_js_2.BaseResource {
|
|
36
|
+
list(simulationId, simulationRunId, queryParams) {
|
|
37
|
+
const queryParameters = new index_js_2.QueryParameters(queryParams);
|
|
38
|
+
const urlWithPathParams = new index_js_2.PathParameters(SimulationRunEventPaths.list, {
|
|
39
|
+
simulation_id: simulationId,
|
|
40
|
+
simulation_run_id: simulationRunId,
|
|
41
|
+
}).deriveUrl();
|
|
42
|
+
return new index_js_1.SimulationRunEventCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
|
|
43
|
+
}
|
|
44
|
+
get(simulationId, simulationRunId, simulationEventId) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const urlWithPathParams = new index_js_2.PathParameters(SimulationRunEventPaths.get, {
|
|
47
|
+
simulation_id: simulationId,
|
|
48
|
+
simulation_run_id: simulationRunId,
|
|
49
|
+
simulation_event_id: simulationEventId,
|
|
50
|
+
}).deriveUrl();
|
|
51
|
+
const response = yield this.client.get(urlWithPathParams);
|
|
52
|
+
const data = this.handleResponse(response);
|
|
53
|
+
return new index_js_1.SimulationRunEvent(data);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
replay(simulationId, simulationRunId, simulationEventId) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const urlWithPathParams = new index_js_2.PathParameters(SimulationRunEventPaths.replay, {
|
|
59
|
+
simulation_id: simulationId,
|
|
60
|
+
simulation_run_id: simulationRunId,
|
|
61
|
+
simulation_event_id: simulationEventId,
|
|
62
|
+
}).deriveUrl();
|
|
63
|
+
const response = yield this.client.post(urlWithPathParams, undefined);
|
|
64
|
+
const data = this.handleResponse(response);
|
|
65
|
+
return new index_js_1.SimulationRunEvent(data);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.SimulationRunEventsResource = SimulationRunEventsResource;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./list-simulation-run-events-query-parameters.js"), exports);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SimulationRunsResource = void 0;
|
|
27
|
+
const index_js_1 = require("../../entities/index.js");
|
|
28
|
+
const index_js_2 = require("../../internal/base/index.js");
|
|
29
|
+
__exportStar(require("./operations/index.js"), exports);
|
|
30
|
+
const SimulationRunPaths = {
|
|
31
|
+
list: '/simulations/{simulation_id}/runs',
|
|
32
|
+
create: '/simulations/{simulation_id}/runs',
|
|
33
|
+
get: '/simulations/{simulation_id}/runs/{simulation_run_id}',
|
|
34
|
+
};
|
|
35
|
+
class SimulationRunsResource extends index_js_2.BaseResource {
|
|
36
|
+
list(simulationId, queryParams) {
|
|
37
|
+
const queryParameters = new index_js_2.QueryParameters(queryParams);
|
|
38
|
+
const urlWithPathParams = new index_js_2.PathParameters(SimulationRunPaths.list, {
|
|
39
|
+
simulation_id: simulationId,
|
|
40
|
+
}).deriveUrl();
|
|
41
|
+
return new index_js_1.SimulationRunCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
|
|
42
|
+
}
|
|
43
|
+
create(simulationId) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const urlWithPathParams = new index_js_2.PathParameters(SimulationRunPaths.create, {
|
|
46
|
+
simulation_id: simulationId,
|
|
47
|
+
}).deriveUrl();
|
|
48
|
+
const response = yield this.client.post(urlWithPathParams, undefined);
|
|
49
|
+
const data = this.handleResponse(response);
|
|
50
|
+
return new index_js_1.SimulationRun(data);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
get(simulationId, simulationRunId, queryParams) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const queryParameters = new index_js_2.QueryParameters(queryParams);
|
|
56
|
+
const urlWithPathParams = new index_js_2.PathParameters(SimulationRunPaths.get, {
|
|
57
|
+
simulation_id: simulationId,
|
|
58
|
+
simulation_run_id: simulationRunId,
|
|
59
|
+
}).deriveUrl();
|
|
60
|
+
const response = yield this.client.get(urlWithPathParams, queryParameters);
|
|
61
|
+
const data = this.handleResponse(response);
|
|
62
|
+
return new index_js_1.SimulationRun(data);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.SimulationRunsResource = SimulationRunsResource;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-simulation-run-query-parameters.js"), exports);
|
|
18
|
+
__exportStar(require("./list-simulation-run-query-parameters.js"), exports);
|