@arrowsphere/api-client 3.399.0-rc-cpe-1 → 3.399.0-rc-cpe-2

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.
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MonitoringClient = void 0;
4
4
  const abstractRestfulClient_1 = require("../abstractRestfulClient");
5
5
  const alert_1 = require("./entities/alert/alert");
6
+ const createAlert_1 = require("./entities/alert/createAlert");
7
+ const getResult_1 = require("../getResult");
8
+ const listAlert_1 = require("./entities/alert/listAlert");
6
9
  class MonitoringClient extends abstractRestfulClient_1.AbstractRestfulClient {
7
10
  constructor() {
8
11
  super(...arguments);
@@ -23,23 +26,23 @@ class MonitoringClient extends abstractRestfulClient_1.AbstractRestfulClient {
23
26
  this.path = this.REPORT_PATH;
24
27
  return this.post(report);
25
28
  }
26
- createAlert(payload) {
29
+ async createAlert(payload) {
27
30
  this.path = this.ALERT_PATH;
28
- return this.post(payload);
31
+ return new getResult_1.GetResult(createAlert_1.CreateAlert, await this.post(payload));
29
32
  }
30
- listAlerts(parameters = {}) {
33
+ async listAlerts(parameters = {}) {
31
34
  this.path = this.ALERT_PATH;
32
- return this.get(parameters);
35
+ return new getResult_1.GetResult(listAlert_1.AlertList, await this.get(parameters));
33
36
  }
34
- getAlert(alertId) {
37
+ async getAlert(alertId) {
35
38
  this.path = this.ALERT_PATH + `/${alertId}`;
36
- return this.get();
39
+ return new getResult_1.GetResult(alert_1.Alert, await this.get());
37
40
  }
38
- updateAlert(alertId, payload) {
41
+ async updateAlert(alertId, payload) {
39
42
  this.path = this.ALERT_PATH + `/${alertId}`;
40
- return this.patch(payload);
43
+ return new getResult_1.GetResult(alert_1.Alert, await this.patch(payload));
41
44
  }
42
- deleteAlert(alertId) {
45
+ async deleteAlert(alertId) {
43
46
  this.path = this.ALERT_PATH + `/${alertId}`;
44
47
  return this.delete();
45
48
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.399.0-rc-cpe-1",
7
+ "version": "3.399.0-rc-cpe-2",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",