@paddle/paddle-node-sdk 1.7.0 → 1.9.0
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 +22 -7
- package/dist/cjs/entities/index.js +4 -0
- package/dist/cjs/entities/notification-settings/notification-settings.js +1 -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/notification-settings/index.js +1 -0
- package/dist/cjs/enums/notification-settings/traffic-source.js +2 -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-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/notification-settings/notification-settings.js +1 -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/notification-settings/index.js +1 -0
- package/dist/esm/enums/notification-settings/traffic-source.js +1 -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-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/notification-settings/notification-settings.d.ts +2 -1
- 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/notification-settings/index.d.ts +1 -0
- package/dist/types/enums/notification-settings/traffic-source.d.ts +1 -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/notification-settings/operations/create-notification-settings-request-body.d.ts +2 -1
- package/dist/types/resources/notification-settings/operations/list-notification-settings-query-parameters.d.ts +2 -0
- package/dist/types/resources/notification-settings/operations/update-notification-settings-request-body.d.ts +2 -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/notification-settings/notification-settings-response.d.ts +2 -1
- 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-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/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SimulationTypesResource = void 0;
|
|
13
|
+
const base_1 = require("../../internal/base");
|
|
14
|
+
const entities_1 = require("../../entities");
|
|
15
|
+
const SimulationTypesPaths = {
|
|
16
|
+
list: '/simulation-types',
|
|
17
|
+
};
|
|
18
|
+
class SimulationTypesResource extends base_1.BaseResource {
|
|
19
|
+
list() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const response = yield this.client.get(SimulationTypesPaths.list);
|
|
22
|
+
const data = this.handleResponse(response);
|
|
23
|
+
return data.map((simulationType) => new entities_1.SimulationType(simulationType));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.SimulationTypesResource = SimulationTypesResource;
|
|
@@ -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.SimulationsResource = void 0;
|
|
27
|
+
const entities_1 = require("../../entities");
|
|
28
|
+
const base_1 = require("../../internal/base");
|
|
29
|
+
__exportStar(require("./operations"), exports);
|
|
30
|
+
const SimulationPaths = {
|
|
31
|
+
list: '/simulations',
|
|
32
|
+
create: '/simulations',
|
|
33
|
+
get: '/simulations/{simulation_id}',
|
|
34
|
+
update: '/simulations/{simulation_id}',
|
|
35
|
+
};
|
|
36
|
+
class SimulationsResource extends base_1.BaseResource {
|
|
37
|
+
list(queryParams) {
|
|
38
|
+
const queryParameters = new base_1.QueryParameters(queryParams);
|
|
39
|
+
return new entities_1.SimulationCollection(this.client, SimulationPaths.list + queryParameters.toQueryString());
|
|
40
|
+
}
|
|
41
|
+
create(createSimulationParameters) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const response = yield this.client.post(SimulationPaths.create, createSimulationParameters);
|
|
44
|
+
const data = this.handleResponse(response);
|
|
45
|
+
return new entities_1.Simulation(data);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
get(simulationId) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const urlWithPathParams = new base_1.PathParameters(SimulationPaths.get, {
|
|
51
|
+
simulation_id: simulationId,
|
|
52
|
+
}).deriveUrl();
|
|
53
|
+
const response = yield this.client.get(urlWithPathParams);
|
|
54
|
+
const data = this.handleResponse(response);
|
|
55
|
+
return new entities_1.Simulation(data);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
update(simulationId, updateSimulation) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const urlWithPathParams = new base_1.PathParameters(SimulationPaths.update, {
|
|
61
|
+
simulation_id: simulationId,
|
|
62
|
+
}).deriveUrl();
|
|
63
|
+
const response = yield this.client.patch(urlWithPathParams, updateSimulation);
|
|
64
|
+
const data = this.handleResponse(response);
|
|
65
|
+
return new entities_1.Simulation(data);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.SimulationsResource = SimulationsResource;
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./create-simulation-request-body"), exports);
|
|
18
|
+
__exportStar(require("./list-simulation-query-parameters"), exports);
|
|
19
|
+
__exportStar(require("./update-simulation-request-body"), exports);
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -31,3 +31,7 @@ __exportStar(require("./event-types"), exports);
|
|
|
31
31
|
__exportStar(require("./notification-settings"), exports);
|
|
32
32
|
__exportStar(require("./notifications"), exports);
|
|
33
33
|
__exportStar(require("./report"), exports);
|
|
34
|
+
__exportStar(require("./simulation-type"), exports);
|
|
35
|
+
__exportStar(require("./simulation"), exports);
|
|
36
|
+
__exportStar(require("./simulation-run"), exports);
|
|
37
|
+
__exportStar(require("./simulation-run-event"), exports);
|
|
@@ -43,3 +43,6 @@ __exportStar(require("./billing-details-create"), exports);
|
|
|
43
43
|
__exportStar(require("./billing-details-update"), exports);
|
|
44
44
|
__exportStar(require("./custom-data"), exports);
|
|
45
45
|
__exportStar(require("./import-meta-response"), exports);
|
|
46
|
+
__exportStar(require("./simulation-event-request"), exports);
|
|
47
|
+
__exportStar(require("./simulation-event-response"), exports);
|
|
48
|
+
__exportStar(require("./simulation-payload"), 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-response"), 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-response"), 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-response"), 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-type"), exports);
|
package/dist/cjs/version.js
CHANGED
|
@@ -14,3 +14,7 @@ export * from './event-types';
|
|
|
14
14
|
export * from './notification-settings';
|
|
15
15
|
export * from './notifications';
|
|
16
16
|
export * from './report';
|
|
17
|
+
export * from './simulation-types';
|
|
18
|
+
export * from './simulation';
|
|
19
|
+
export * from './simulation-run';
|
|
20
|
+
export * from './simulation-run-event';
|
|
@@ -8,6 +8,7 @@ export class NotificationSettings {
|
|
|
8
8
|
this.active = notificationSettings.active;
|
|
9
9
|
this.apiVersion = notificationSettings.api_version;
|
|
10
10
|
this.includeSensitiveFields = notificationSettings.include_sensitive_fields;
|
|
11
|
+
this.trafficSource = notificationSettings.traffic_source;
|
|
11
12
|
this.subscribedEvents = notificationSettings.subscribed_events.map((subscribed_event) => new EventType(subscribed_event));
|
|
12
13
|
this.endpointSecretKey = notificationSettings.endpoint_secret_key;
|
|
13
14
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class Simulation {
|
|
2
|
+
constructor(simulationResponse) {
|
|
3
|
+
var _a, _b;
|
|
4
|
+
this.id = simulationResponse.id;
|
|
5
|
+
this.status = simulationResponse.status;
|
|
6
|
+
this.notificationSettingId = simulationResponse.notification_setting_id;
|
|
7
|
+
this.name = simulationResponse.name;
|
|
8
|
+
this.type = simulationResponse.type;
|
|
9
|
+
this.payload = (_a = simulationResponse.payload) !== null && _a !== void 0 ? _a : null;
|
|
10
|
+
this.lastRunAt = (_b = simulationResponse.last_run_at) !== null && _b !== void 0 ? _b : null;
|
|
11
|
+
this.createdAt = simulationResponse.created_at;
|
|
12
|
+
this.updatedAt = simulationResponse.updated_at;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SimulationRunEvent } from '..';
|
|
2
|
+
export class SimulationRun {
|
|
3
|
+
constructor(simulationRunResponse) {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
this.id = simulationRunResponse.id;
|
|
6
|
+
this.status = simulationRunResponse.status;
|
|
7
|
+
this.createdAt = simulationRunResponse.created_at;
|
|
8
|
+
this.updatedAt = simulationRunResponse.updated_at;
|
|
9
|
+
this.type = simulationRunResponse.type;
|
|
10
|
+
this.events = (_b = (_a = simulationRunResponse.events) === null || _a === void 0 ? void 0 : _a.map((event) => new SimulationRunEvent(event))) !== null && _b !== void 0 ? _b : [];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SimulationEventRequest, SimulationEventResponse } from '../shared';
|
|
2
|
+
export class SimulationRunEvent {
|
|
3
|
+
constructor(simulationRunEventResponse) {
|
|
4
|
+
this.id = simulationRunEventResponse.id;
|
|
5
|
+
this.status = simulationRunEventResponse.status;
|
|
6
|
+
this.eventType = simulationRunEventResponse.event_type;
|
|
7
|
+
this.payload = simulationRunEventResponse.payload;
|
|
8
|
+
this.request = simulationRunEventResponse.request
|
|
9
|
+
? new SimulationEventRequest(simulationRunEventResponse.request)
|
|
10
|
+
: null;
|
|
11
|
+
this.response = simulationRunEventResponse.response
|
|
12
|
+
? new SimulationEventResponse(simulationRunEventResponse.response)
|
|
13
|
+
: null;
|
|
14
|
+
this.createdAt = simulationRunEventResponse.created_at;
|
|
15
|
+
this.updatedAt = simulationRunEventResponse.updated_at;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './simulation-type';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class SimulationType {
|
|
2
|
+
constructor(simulationTypeResponse) {
|
|
3
|
+
this.name = simulationTypeResponse.name;
|
|
4
|
+
this.label = simulationTypeResponse.label;
|
|
5
|
+
this.description = simulationTypeResponse.description;
|
|
6
|
+
this.group = simulationTypeResponse.group;
|
|
7
|
+
this.type = simulationTypeResponse.type;
|
|
8
|
+
this.events = simulationTypeResponse.events;
|
|
9
|
+
}
|
|
10
|
+
}
|
package/dist/esm/enums/index.js
CHANGED
|
@@ -7,3 +7,7 @@ export * from './payout';
|
|
|
7
7
|
export * from './notification-settings';
|
|
8
8
|
export * from './notification';
|
|
9
9
|
export * from './report';
|
|
10
|
+
export * from './simulation-type';
|
|
11
|
+
export * from './simulation';
|
|
12
|
+
export * from './simulation-run';
|
|
13
|
+
export * from './simulation-run-event';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './simulation-scenario-type';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './simulation-run-status';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './simulation-run-event-status';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './simulation-kind';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/paddle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from './internal/api/client';
|
|
2
|
-
import { AddressesResource, AdjustmentsResource, BusinessesResource, CustomersResource, DiscountsResource, EventTypesResource, NotificationSettingsResource, NotificationsResource, PricesResource, PricingPreviewResource, ProductsResource, ReportsResource, SubscriptionsResource, TransactionsResource, } from './resources';
|
|
2
|
+
import { AddressesResource, AdjustmentsResource, BusinessesResource, CustomersResource, DiscountsResource, EventTypesResource, NotificationSettingsResource, NotificationsResource, PricesResource, PricingPreviewResource, ProductsResource, ReportsResource, SimulationTypesResource, SimulationsResource, SimulationRunsResource, SimulationRunEventsResource, SubscriptionsResource, TransactionsResource, } from './resources';
|
|
3
3
|
import { Environment, LogLevel } from './internal';
|
|
4
4
|
import { EventsResource } from './resources/events';
|
|
5
5
|
import { Webhooks } from './notifications';
|
|
@@ -26,5 +26,9 @@ export class Paddle {
|
|
|
26
26
|
this.notificationSettings = new NotificationSettingsResource(this.client);
|
|
27
27
|
this.notifications = new NotificationsResource(this.client);
|
|
28
28
|
this.reports = new ReportsResource(this.client);
|
|
29
|
+
this.simulationTypes = new SimulationTypesResource(this.client);
|
|
30
|
+
this.simulations = new SimulationsResource(this.client);
|
|
31
|
+
this.simulationRuns = new SimulationRunsResource(this.client);
|
|
32
|
+
this.simulationRunEvents = new SimulationRunEventsResource(this.client);
|
|
29
33
|
}
|
|
30
34
|
}
|
|
@@ -12,3 +12,7 @@ export * from './event-types';
|
|
|
12
12
|
export * from './notification-settings';
|
|
13
13
|
export * from './notifications';
|
|
14
14
|
export * from './reports';
|
|
15
|
+
export * from './simulation-types';
|
|
16
|
+
export * from './simulations';
|
|
17
|
+
export * from './simulation-runs';
|
|
18
|
+
export * from './simulation-run-events';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { SimulationRunEvent, SimulationRunEventCollection } from '../../entities';
|
|
11
|
+
import { BaseResource, PathParameters, QueryParameters } from '../../internal/base';
|
|
12
|
+
export * from './operations';
|
|
13
|
+
const SimulationRunEventPaths = {
|
|
14
|
+
list: '/simulations/{simulation_id}/runs/{simulation_run_id}/events',
|
|
15
|
+
get: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}',
|
|
16
|
+
replay: '/simulations/{simulation_id}/runs/{simulation_run_id}/events/{simulation_event_id}/replay',
|
|
17
|
+
};
|
|
18
|
+
export class SimulationRunEventsResource extends BaseResource {
|
|
19
|
+
list(simulationId, simulationRunId, queryParams) {
|
|
20
|
+
const queryParameters = new QueryParameters(queryParams);
|
|
21
|
+
const urlWithPathParams = new PathParameters(SimulationRunEventPaths.list, {
|
|
22
|
+
simulation_id: simulationId,
|
|
23
|
+
simulation_run_id: simulationRunId,
|
|
24
|
+
}).deriveUrl();
|
|
25
|
+
return new SimulationRunEventCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
|
|
26
|
+
}
|
|
27
|
+
get(simulationId, simulationRunId, simulationEventId) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const urlWithPathParams = new PathParameters(SimulationRunEventPaths.get, {
|
|
30
|
+
simulation_id: simulationId,
|
|
31
|
+
simulation_run_id: simulationRunId,
|
|
32
|
+
simulation_event_id: simulationEventId,
|
|
33
|
+
}).deriveUrl();
|
|
34
|
+
const response = yield this.client.get(urlWithPathParams);
|
|
35
|
+
const data = this.handleResponse(response);
|
|
36
|
+
return new SimulationRunEvent(data);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
replay(simulationId, simulationRunId, simulationEventId) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const urlWithPathParams = new PathParameters(SimulationRunEventPaths.replay, {
|
|
42
|
+
simulation_id: simulationId,
|
|
43
|
+
simulation_run_id: simulationRunId,
|
|
44
|
+
simulation_event_id: simulationEventId,
|
|
45
|
+
}).deriveUrl();
|
|
46
|
+
const response = yield this.client.post(urlWithPathParams, undefined);
|
|
47
|
+
const data = this.handleResponse(response);
|
|
48
|
+
return new SimulationRunEvent(data);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './list-simulation-run-events-query-parameters';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { SimulationRun, SimulationRunCollection } from '../../entities';
|
|
11
|
+
import { BaseResource, PathParameters, QueryParameters } from '../../internal/base';
|
|
12
|
+
export * from './operations';
|
|
13
|
+
const SimulationRunPaths = {
|
|
14
|
+
list: '/simulations/{simulation_id}/runs',
|
|
15
|
+
create: '/simulations/{simulation_id}/runs',
|
|
16
|
+
get: '/simulations/{simulation_id}/runs/{simulation_run_id}',
|
|
17
|
+
};
|
|
18
|
+
export class SimulationRunsResource extends BaseResource {
|
|
19
|
+
list(simulationId, queryParams) {
|
|
20
|
+
const queryParameters = new QueryParameters(queryParams);
|
|
21
|
+
const urlWithPathParams = new PathParameters(SimulationRunPaths.list, {
|
|
22
|
+
simulation_id: simulationId,
|
|
23
|
+
}).deriveUrl();
|
|
24
|
+
return new SimulationRunCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
|
|
25
|
+
}
|
|
26
|
+
create(simulationId) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const urlWithPathParams = new PathParameters(SimulationRunPaths.create, {
|
|
29
|
+
simulation_id: simulationId,
|
|
30
|
+
}).deriveUrl();
|
|
31
|
+
const response = yield this.client.post(urlWithPathParams, undefined);
|
|
32
|
+
const data = this.handleResponse(response);
|
|
33
|
+
return new SimulationRun(data);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
get(simulationId, simulationRunId, queryParams) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const queryParameters = new QueryParameters(queryParams);
|
|
39
|
+
const urlWithPathParams = new PathParameters(SimulationRunPaths.get, {
|
|
40
|
+
simulation_id: simulationId,
|
|
41
|
+
simulation_run_id: simulationRunId,
|
|
42
|
+
}).deriveUrl();
|
|
43
|
+
const response = yield this.client.get(urlWithPathParams, queryParameters);
|
|
44
|
+
const data = this.handleResponse(response);
|
|
45
|
+
return new SimulationRun(data);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { BaseResource } from '../../internal/base';
|
|
11
|
+
import { SimulationType } from '../../entities';
|
|
12
|
+
const SimulationTypesPaths = {
|
|
13
|
+
list: '/simulation-types',
|
|
14
|
+
};
|
|
15
|
+
export class SimulationTypesResource extends BaseResource {
|
|
16
|
+
list() {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const response = yield this.client.get(SimulationTypesPaths.list);
|
|
19
|
+
const data = this.handleResponse(response);
|
|
20
|
+
return data.map((simulationType) => new SimulationType(simulationType));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|