@blues-inc/notehub-js 2.1.0-beta.9 → 2.2.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/README.md +238 -246
- package/dist/ApiClient.js +154 -154
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +374 -374
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +381 -381
- package/dist/api/RouteApi.js +77 -77
- package/dist/api/UsageApi.js +50 -41
- package/dist/api/WebhookApi.js +51 -51
- package/dist/model/Alert.js +74 -76
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/Aws.js +65 -65
- package/dist/model/AwsFilter.js +19 -19
- package/dist/model/AwsTransform.js +20 -20
- package/dist/model/Azure.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/Body.js +5 -5
- package/dist/model/CellularPlan.js +34 -34
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +12 -12
- package/dist/model/CreateMonitor.js +125 -126
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +17 -17
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DataUsage.js +14 -14
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +101 -102
- package/dist/model/DeviceDfuHistory.js +19 -20
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +12 -13
- package/dist/model/DeviceDfuStateMachine.js +24 -25
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +12 -13
- package/dist/model/DeviceSession.js +221 -221
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +32 -32
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +67 -69
- package/dist/model/EnvVar.js +18 -18
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +30 -30
- package/dist/model/GetAlerts200Response.js +14 -15
- package/dist/model/GetBillingAccounts200Response.js +9 -10
- package/dist/model/GetDataUsage200Response.js +9 -10
- package/dist/model/GetDataUsage200ResponseDataInner.js +53 -43
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +9 -10
- package/dist/model/GetDevicePlans200Response.js +9 -10
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- package/dist/model/GetProducts200Response.js +9 -10
- package/dist/model/GetProjectDevicePublicKeys200Response.js +16 -17
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +16 -17
- package/dist/model/GetProjectEvents200Response.js +20 -21
- package/dist/model/GetProjectEventsByCursor200Response.js +23 -24
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjects200Response.js +9 -10
- package/dist/model/GetSessionsUsage200Response.js +11 -12
- package/dist/model/GetWebhooks200Response.js +9 -10
- package/dist/model/Google.js +33 -33
- package/dist/model/HandleNoteChanges200Response.js +11 -11
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +11 -11
- package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/Http.js +35 -35
- package/dist/model/Location.js +40 -40
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +99 -100
- package/dist/model/MonitorAlertRoutesInner.js +10 -9
- package/dist/model/Mqtt.js +66 -66
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +18 -19
- package/dist/model/NotehubRoute.js +36 -36
- package/dist/model/NotehubRouteSchema.js +46 -45
- package/dist/model/OAuth2Error.js +20 -20
- package/dist/model/OAuth2TokenResponse.js +23 -23
- package/dist/model/PersonalAccessToken.js +34 -34
- package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
- package/dist/model/PersonalAccessTokenInfo.js +18 -18
- package/dist/model/PersonalAccessTokenSecret.js +12 -12
- package/dist/model/PostProvisionProjectDeviceRequest.js +18 -18
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/Proxy.js +24 -24
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/Radresponder.js +25 -25
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/SatellitePlan.js +26 -26
- package/dist/model/SchemaProperty.js +36 -38
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/Slack.js +53 -53
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackTransform.js +12 -12
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/Snowflake.js +45 -45
- package/dist/model/Thingworx.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/Twilio.js +43 -43
- package/dist/model/UpdateFleetRequest.js +25 -25
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +18 -18
- package/dist/model/UsageEventsData.js +38 -28
- package/dist/model/UsageEventsResponse.js +11 -12
- package/dist/model/UsageRouteLogsData.js +35 -36
- package/dist/model/UsageSessionsData.js +38 -28
- package/dist/model/UserDbRoute.js +25 -25
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +3 -3
|
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
20
|
* Notehub API
|
|
21
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
22
22
|
*
|
|
23
23
|
* The version of the OpenAPI document: 1.2.0
|
|
24
24
|
* Contact: engineering@blues.io
|
|
@@ -31,17 +31,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
/**
|
|
32
32
|
* The CreateMonitor model module.
|
|
33
33
|
* @module model/CreateMonitor
|
|
34
|
-
* @version 2.
|
|
34
|
+
* @version 2.2.0
|
|
35
35
|
*/
|
|
36
36
|
var CreateMonitor = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
38
38
|
* Constructs a new <code>CreateMonitor</code>.
|
|
39
39
|
* @alias module:model/CreateMonitor
|
|
40
40
|
* @implements module:model/Monitor
|
|
41
|
-
* @param alertRoutes {Array.<module:model/MonitorAlertRoutesInner>}
|
|
42
|
-
* @param description {String}
|
|
43
|
-
* @param name {String}
|
|
44
|
-
* @param notefileFilter {Array.<String>}
|
|
41
|
+
* @param alertRoutes {Array.<module:model/MonitorAlertRoutesInner>}
|
|
42
|
+
* @param description {String}
|
|
43
|
+
* @param name {String}
|
|
44
|
+
* @param notefileFilter {Array.<String>}
|
|
45
45
|
*/
|
|
46
46
|
function CreateMonitor(alertRoutes, description, name, notefileFilter) {
|
|
47
47
|
_classCallCheck(this, CreateMonitor);
|
|
@@ -57,10 +57,10 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
57
57
|
return _createClass(CreateMonitor, null, [{
|
|
58
58
|
key: "initialize",
|
|
59
59
|
value: function initialize(obj, alertRoutes, description, name, notefileFilter) {
|
|
60
|
-
obj[
|
|
61
|
-
obj[
|
|
62
|
-
obj[
|
|
63
|
-
obj[
|
|
60
|
+
obj["alert_routes"] = alertRoutes;
|
|
61
|
+
obj["description"] = description;
|
|
62
|
+
obj["name"] = name;
|
|
63
|
+
obj["notefile_filter"] = notefileFilter;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -76,59 +76,59 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
76
76
|
if (data) {
|
|
77
77
|
obj = obj || new CreateMonitor();
|
|
78
78
|
_Monitor["default"].constructFromObject(data, obj);
|
|
79
|
-
if (data.hasOwnProperty(
|
|
80
|
-
obj[
|
|
79
|
+
if (data.hasOwnProperty("aggregate_function")) {
|
|
80
|
+
obj["aggregate_function"] = _ApiClient["default"].convertToType(data["aggregate_function"], "String");
|
|
81
81
|
}
|
|
82
|
-
if (data.hasOwnProperty(
|
|
83
|
-
obj[
|
|
82
|
+
if (data.hasOwnProperty("aggregate_window")) {
|
|
83
|
+
obj["aggregate_window"] = _ApiClient["default"].convertToType(data["aggregate_window"], "String");
|
|
84
84
|
}
|
|
85
|
-
if (data.hasOwnProperty(
|
|
86
|
-
obj[
|
|
85
|
+
if (data.hasOwnProperty("alert")) {
|
|
86
|
+
obj["alert"] = _ApiClient["default"].convertToType(data["alert"], "Boolean");
|
|
87
87
|
}
|
|
88
|
-
if (data.hasOwnProperty(
|
|
89
|
-
obj[
|
|
88
|
+
if (data.hasOwnProperty("alert_routes")) {
|
|
89
|
+
obj["alert_routes"] = _ApiClient["default"].convertToType(data["alert_routes"], [_MonitorAlertRoutesInner["default"]]);
|
|
90
90
|
}
|
|
91
|
-
if (data.hasOwnProperty(
|
|
92
|
-
obj[
|
|
91
|
+
if (data.hasOwnProperty("condition_type")) {
|
|
92
|
+
obj["condition_type"] = _ApiClient["default"].convertToType(data["condition_type"], "String");
|
|
93
93
|
}
|
|
94
|
-
if (data.hasOwnProperty(
|
|
95
|
-
obj[
|
|
94
|
+
if (data.hasOwnProperty("description")) {
|
|
95
|
+
obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
|
|
96
96
|
}
|
|
97
|
-
if (data.hasOwnProperty(
|
|
98
|
-
obj[
|
|
97
|
+
if (data.hasOwnProperty("disabled")) {
|
|
98
|
+
obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
|
|
99
99
|
}
|
|
100
|
-
if (data.hasOwnProperty(
|
|
101
|
-
obj[
|
|
100
|
+
if (data.hasOwnProperty("fleet_filter")) {
|
|
101
|
+
obj["fleet_filter"] = _ApiClient["default"].convertToType(data["fleet_filter"], ["String"]);
|
|
102
102
|
}
|
|
103
|
-
if (data.hasOwnProperty(
|
|
104
|
-
obj[
|
|
103
|
+
if (data.hasOwnProperty("last_routed_at")) {
|
|
104
|
+
obj["last_routed_at"] = _ApiClient["default"].convertToType(data["last_routed_at"], "String");
|
|
105
105
|
}
|
|
106
|
-
if (data.hasOwnProperty(
|
|
107
|
-
obj[
|
|
106
|
+
if (data.hasOwnProperty("name")) {
|
|
107
|
+
obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
|
|
108
108
|
}
|
|
109
|
-
if (data.hasOwnProperty(
|
|
110
|
-
obj[
|
|
109
|
+
if (data.hasOwnProperty("notefile_filter")) {
|
|
110
|
+
obj["notefile_filter"] = _ApiClient["default"].convertToType(data["notefile_filter"], ["String"]);
|
|
111
111
|
}
|
|
112
|
-
if (data.hasOwnProperty(
|
|
113
|
-
obj[
|
|
112
|
+
if (data.hasOwnProperty("per_device")) {
|
|
113
|
+
obj["per_device"] = _ApiClient["default"].convertToType(data["per_device"], "Boolean");
|
|
114
114
|
}
|
|
115
|
-
if (data.hasOwnProperty(
|
|
116
|
-
obj[
|
|
115
|
+
if (data.hasOwnProperty("routing_cooldown_period")) {
|
|
116
|
+
obj["routing_cooldown_period"] = _ApiClient["default"].convertToType(data["routing_cooldown_period"], "String");
|
|
117
117
|
}
|
|
118
|
-
if (data.hasOwnProperty(
|
|
119
|
-
obj[
|
|
118
|
+
if (data.hasOwnProperty("silenced")) {
|
|
119
|
+
obj["silenced"] = _ApiClient["default"].convertToType(data["silenced"], "Boolean");
|
|
120
120
|
}
|
|
121
|
-
if (data.hasOwnProperty(
|
|
122
|
-
obj[
|
|
121
|
+
if (data.hasOwnProperty("source_selector")) {
|
|
122
|
+
obj["source_selector"] = _ApiClient["default"].convertToType(data["source_selector"], "String");
|
|
123
123
|
}
|
|
124
|
-
if (data.hasOwnProperty(
|
|
125
|
-
obj[
|
|
124
|
+
if (data.hasOwnProperty("source_type")) {
|
|
125
|
+
obj["source_type"] = _ApiClient["default"].convertToType(data["source_type"], "String");
|
|
126
126
|
}
|
|
127
|
-
if (data.hasOwnProperty(
|
|
128
|
-
obj[
|
|
127
|
+
if (data.hasOwnProperty("threshold")) {
|
|
128
|
+
obj["threshold"] = _ApiClient["default"].convertToType(data["threshold"], "Number");
|
|
129
129
|
}
|
|
130
|
-
if (data.hasOwnProperty(
|
|
131
|
-
obj[
|
|
130
|
+
if (data.hasOwnProperty("uid")) {
|
|
131
|
+
obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
|
|
132
132
|
}
|
|
133
133
|
} else if (data === null) {
|
|
134
134
|
return null;
|
|
@@ -160,21 +160,21 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
160
160
|
} finally {
|
|
161
161
|
_iterator.f();
|
|
162
162
|
}
|
|
163
|
-
if (data[
|
|
164
|
-
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data[
|
|
163
|
+
if (data["aggregate_function"] && !(typeof data["aggregate_function"] === "string" || data["aggregate_function"] instanceof String)) {
|
|
164
|
+
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data["aggregate_function"]);
|
|
165
165
|
}
|
|
166
166
|
// ensure the json data is a string
|
|
167
|
-
if (data[
|
|
168
|
-
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data[
|
|
167
|
+
if (data["aggregate_window"] && !(typeof data["aggregate_window"] === "string" || data["aggregate_window"] instanceof String)) {
|
|
168
|
+
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data["aggregate_window"]);
|
|
169
169
|
}
|
|
170
|
-
if (data[
|
|
170
|
+
if (data["alert_routes"]) {
|
|
171
171
|
// data not null
|
|
172
172
|
// ensure the json data is an array
|
|
173
|
-
if (!Array.isArray(data[
|
|
174
|
-
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data[
|
|
173
|
+
if (!Array.isArray(data["alert_routes"])) {
|
|
174
|
+
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data["alert_routes"]);
|
|
175
175
|
}
|
|
176
176
|
// validate the optional field `alert_routes` (array)
|
|
177
|
-
var _iterator2 = _createForOfIteratorHelper(data[
|
|
177
|
+
var _iterator2 = _createForOfIteratorHelper(data["alert_routes"]),
|
|
178
178
|
_step2;
|
|
179
179
|
try {
|
|
180
180
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -186,47 +186,46 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
186
186
|
} finally {
|
|
187
187
|
_iterator2.f();
|
|
188
188
|
}
|
|
189
|
-
;
|
|
190
189
|
}
|
|
191
190
|
// ensure the json data is a string
|
|
192
|
-
if (data[
|
|
193
|
-
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data[
|
|
191
|
+
if (data["condition_type"] && !(typeof data["condition_type"] === "string" || data["condition_type"] instanceof String)) {
|
|
192
|
+
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data["condition_type"]);
|
|
194
193
|
}
|
|
195
194
|
// ensure the json data is a string
|
|
196
|
-
if (data[
|
|
197
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data[
|
|
195
|
+
if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
|
|
196
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
|
|
198
197
|
}
|
|
199
198
|
// ensure the json data is an array
|
|
200
|
-
if (!Array.isArray(data[
|
|
201
|
-
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data[
|
|
199
|
+
if (!Array.isArray(data["fleet_filter"])) {
|
|
200
|
+
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data["fleet_filter"]);
|
|
202
201
|
}
|
|
203
202
|
// ensure the json data is a string
|
|
204
|
-
if (data[
|
|
205
|
-
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data[
|
|
203
|
+
if (data["last_routed_at"] && !(typeof data["last_routed_at"] === "string" || data["last_routed_at"] instanceof String)) {
|
|
204
|
+
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data["last_routed_at"]);
|
|
206
205
|
}
|
|
207
206
|
// ensure the json data is a string
|
|
208
|
-
if (data[
|
|
209
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data[
|
|
207
|
+
if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
|
|
208
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
|
|
210
209
|
}
|
|
211
210
|
// ensure the json data is an array
|
|
212
|
-
if (!Array.isArray(data[
|
|
213
|
-
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data[
|
|
211
|
+
if (!Array.isArray(data["notefile_filter"])) {
|
|
212
|
+
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data["notefile_filter"]);
|
|
214
213
|
}
|
|
215
214
|
// ensure the json data is a string
|
|
216
|
-
if (data[
|
|
217
|
-
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data[
|
|
215
|
+
if (data["routing_cooldown_period"] && !(typeof data["routing_cooldown_period"] === "string" || data["routing_cooldown_period"] instanceof String)) {
|
|
216
|
+
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data["routing_cooldown_period"]);
|
|
218
217
|
}
|
|
219
218
|
// ensure the json data is a string
|
|
220
|
-
if (data[
|
|
221
|
-
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data[
|
|
219
|
+
if (data["source_selector"] && !(typeof data["source_selector"] === "string" || data["source_selector"] instanceof String)) {
|
|
220
|
+
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data["source_selector"]);
|
|
222
221
|
}
|
|
223
222
|
// ensure the json data is a string
|
|
224
|
-
if (data[
|
|
225
|
-
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data[
|
|
223
|
+
if (data["source_type"] && !(typeof data["source_type"] === "string" || data["source_type"] instanceof String)) {
|
|
224
|
+
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data["source_type"]);
|
|
226
225
|
}
|
|
227
226
|
// ensure the json data is a string
|
|
228
|
-
if (data[
|
|
229
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
227
|
+
if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
|
|
228
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
|
|
230
229
|
}
|
|
231
230
|
return true;
|
|
232
231
|
}
|
|
@@ -238,221 +237,221 @@ CreateMonitor.RequiredProperties = ["alert_routes", "description", "name", "note
|
|
|
238
237
|
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
239
238
|
* @member {module:model/CreateMonitor.AggregateFunctionEnum} aggregate_function
|
|
240
239
|
*/
|
|
241
|
-
CreateMonitor.prototype[
|
|
240
|
+
CreateMonitor.prototype["aggregate_function"] = undefined;
|
|
242
241
|
|
|
243
242
|
/**
|
|
244
243
|
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
245
244
|
* @member {String} aggregate_window
|
|
246
245
|
*/
|
|
247
|
-
CreateMonitor.prototype[
|
|
246
|
+
CreateMonitor.prototype["aggregate_window"] = undefined;
|
|
248
247
|
|
|
249
248
|
/**
|
|
250
249
|
* If true, the monitor is in alert state.
|
|
251
250
|
* @member {Boolean} alert
|
|
252
251
|
*/
|
|
253
|
-
CreateMonitor.prototype[
|
|
252
|
+
CreateMonitor.prototype["alert"] = undefined;
|
|
254
253
|
|
|
255
254
|
/**
|
|
256
255
|
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
257
256
|
*/
|
|
258
|
-
CreateMonitor.prototype[
|
|
257
|
+
CreateMonitor.prototype["alert_routes"] = undefined;
|
|
259
258
|
|
|
260
259
|
/**
|
|
261
260
|
* A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]
|
|
262
261
|
* @member {module:model/CreateMonitor.ConditionTypeEnum} condition_type
|
|
263
262
|
*/
|
|
264
|
-
CreateMonitor.prototype[
|
|
263
|
+
CreateMonitor.prototype["condition_type"] = undefined;
|
|
265
264
|
|
|
266
265
|
/**
|
|
267
266
|
* @member {String} description
|
|
268
267
|
*/
|
|
269
|
-
CreateMonitor.prototype[
|
|
268
|
+
CreateMonitor.prototype["description"] = undefined;
|
|
270
269
|
|
|
271
270
|
/**
|
|
272
271
|
* If true, the monitor will not be evaluated.
|
|
273
272
|
* @member {Boolean} disabled
|
|
274
273
|
*/
|
|
275
|
-
CreateMonitor.prototype[
|
|
274
|
+
CreateMonitor.prototype["disabled"] = undefined;
|
|
276
275
|
|
|
277
276
|
/**
|
|
278
277
|
* @member {Array.<String>} fleet_filter
|
|
279
278
|
*/
|
|
280
|
-
CreateMonitor.prototype[
|
|
279
|
+
CreateMonitor.prototype["fleet_filter"] = undefined;
|
|
281
280
|
|
|
282
281
|
/**
|
|
283
282
|
* The last time the monitor was evaluated and routed.
|
|
284
283
|
* @member {String} last_routed_at
|
|
285
284
|
*/
|
|
286
|
-
CreateMonitor.prototype[
|
|
285
|
+
CreateMonitor.prototype["last_routed_at"] = undefined;
|
|
287
286
|
|
|
288
287
|
/**
|
|
289
288
|
* @member {String} name
|
|
290
289
|
*/
|
|
291
|
-
CreateMonitor.prototype[
|
|
290
|
+
CreateMonitor.prototype["name"] = undefined;
|
|
292
291
|
|
|
293
292
|
/**
|
|
294
293
|
* @member {Array.<String>} notefile_filter
|
|
295
294
|
*/
|
|
296
|
-
CreateMonitor.prototype[
|
|
295
|
+
CreateMonitor.prototype["notefile_filter"] = undefined;
|
|
297
296
|
|
|
298
297
|
/**
|
|
299
298
|
* Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.
|
|
300
299
|
* @member {Boolean} per_device
|
|
301
300
|
*/
|
|
302
|
-
CreateMonitor.prototype[
|
|
301
|
+
CreateMonitor.prototype["per_device"] = undefined;
|
|
303
302
|
|
|
304
303
|
/**
|
|
305
304
|
* The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.
|
|
306
305
|
* @member {String} routing_cooldown_period
|
|
307
306
|
*/
|
|
308
|
-
CreateMonitor.prototype[
|
|
307
|
+
CreateMonitor.prototype["routing_cooldown_period"] = undefined;
|
|
309
308
|
|
|
310
309
|
/**
|
|
311
310
|
* If true, alerts will be created, but no notifications will be sent.
|
|
312
311
|
* @member {Boolean} silenced
|
|
313
312
|
*/
|
|
314
|
-
CreateMonitor.prototype[
|
|
313
|
+
CreateMonitor.prototype["silenced"] = undefined;
|
|
315
314
|
|
|
316
315
|
/**
|
|
317
316
|
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
318
317
|
* @member {String} source_selector
|
|
319
318
|
*/
|
|
320
|
-
CreateMonitor.prototype[
|
|
319
|
+
CreateMonitor.prototype["source_selector"] = undefined;
|
|
321
320
|
|
|
322
321
|
/**
|
|
323
322
|
* The type of source to monitor. Currently only \"event\" is supported.
|
|
324
323
|
* @member {module:model/CreateMonitor.SourceTypeEnum} source_type
|
|
325
324
|
*/
|
|
326
|
-
CreateMonitor.prototype[
|
|
325
|
+
CreateMonitor.prototype["source_type"] = undefined;
|
|
327
326
|
|
|
328
327
|
/**
|
|
329
328
|
* The type of condition to apply to the value selected by the source_selector
|
|
330
329
|
* @member {Number} threshold
|
|
331
330
|
*/
|
|
332
|
-
CreateMonitor.prototype[
|
|
331
|
+
CreateMonitor.prototype["threshold"] = undefined;
|
|
333
332
|
|
|
334
333
|
/**
|
|
335
334
|
* @member {String} uid
|
|
336
335
|
*/
|
|
337
|
-
CreateMonitor.prototype[
|
|
336
|
+
CreateMonitor.prototype["uid"] = undefined;
|
|
338
337
|
|
|
339
338
|
// Implement Monitor interface:
|
|
340
339
|
/**
|
|
341
340
|
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
342
341
|
* @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
|
|
343
342
|
*/
|
|
344
|
-
_Monitor["default"].prototype[
|
|
343
|
+
_Monitor["default"].prototype["aggregate_function"] = undefined;
|
|
345
344
|
/**
|
|
346
345
|
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
347
346
|
* @member {String} aggregate_window
|
|
348
347
|
*/
|
|
349
|
-
_Monitor["default"].prototype[
|
|
348
|
+
_Monitor["default"].prototype["aggregate_window"] = undefined;
|
|
350
349
|
/**
|
|
351
350
|
* If true, the monitor is in alert state.
|
|
352
351
|
* @member {Boolean} alert
|
|
353
352
|
*/
|
|
354
|
-
_Monitor["default"].prototype[
|
|
353
|
+
_Monitor["default"].prototype["alert"] = undefined;
|
|
355
354
|
/**
|
|
356
355
|
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
357
356
|
*/
|
|
358
|
-
_Monitor["default"].prototype[
|
|
357
|
+
_Monitor["default"].prototype["alert_routes"] = undefined;
|
|
359
358
|
/**
|
|
360
359
|
* A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]
|
|
361
360
|
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
362
361
|
*/
|
|
363
|
-
_Monitor["default"].prototype[
|
|
362
|
+
_Monitor["default"].prototype["condition_type"] = undefined;
|
|
364
363
|
/**
|
|
365
364
|
* @member {String} description
|
|
366
365
|
*/
|
|
367
|
-
_Monitor["default"].prototype[
|
|
366
|
+
_Monitor["default"].prototype["description"] = undefined;
|
|
368
367
|
/**
|
|
369
368
|
* If true, the monitor will not be evaluated.
|
|
370
369
|
* @member {Boolean} disabled
|
|
371
370
|
*/
|
|
372
|
-
_Monitor["default"].prototype[
|
|
371
|
+
_Monitor["default"].prototype["disabled"] = undefined;
|
|
373
372
|
/**
|
|
374
373
|
* @member {Array.<String>} fleet_filter
|
|
375
374
|
*/
|
|
376
|
-
_Monitor["default"].prototype[
|
|
375
|
+
_Monitor["default"].prototype["fleet_filter"] = undefined;
|
|
377
376
|
/**
|
|
378
377
|
* The last time the monitor was evaluated and routed.
|
|
379
378
|
* @member {String} last_routed_at
|
|
380
379
|
*/
|
|
381
|
-
_Monitor["default"].prototype[
|
|
380
|
+
_Monitor["default"].prototype["last_routed_at"] = undefined;
|
|
382
381
|
/**
|
|
383
382
|
* @member {String} name
|
|
384
383
|
*/
|
|
385
|
-
_Monitor["default"].prototype[
|
|
384
|
+
_Monitor["default"].prototype["name"] = undefined;
|
|
386
385
|
/**
|
|
387
386
|
* @member {Array.<String>} notefile_filter
|
|
388
387
|
*/
|
|
389
|
-
_Monitor["default"].prototype[
|
|
388
|
+
_Monitor["default"].prototype["notefile_filter"] = undefined;
|
|
390
389
|
/**
|
|
391
390
|
* Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.
|
|
392
391
|
* @member {Boolean} per_device
|
|
393
392
|
*/
|
|
394
|
-
_Monitor["default"].prototype[
|
|
393
|
+
_Monitor["default"].prototype["per_device"] = undefined;
|
|
395
394
|
/**
|
|
396
395
|
* The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.
|
|
397
396
|
* @member {String} routing_cooldown_period
|
|
398
397
|
*/
|
|
399
|
-
_Monitor["default"].prototype[
|
|
398
|
+
_Monitor["default"].prototype["routing_cooldown_period"] = undefined;
|
|
400
399
|
/**
|
|
401
400
|
* If true, alerts will be created, but no notifications will be sent.
|
|
402
401
|
* @member {Boolean} silenced
|
|
403
402
|
*/
|
|
404
|
-
_Monitor["default"].prototype[
|
|
403
|
+
_Monitor["default"].prototype["silenced"] = undefined;
|
|
405
404
|
/**
|
|
406
405
|
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
407
406
|
* @member {String} source_selector
|
|
408
407
|
*/
|
|
409
|
-
_Monitor["default"].prototype[
|
|
408
|
+
_Monitor["default"].prototype["source_selector"] = undefined;
|
|
410
409
|
/**
|
|
411
410
|
* The type of source to monitor. Currently only \"event\" is supported.
|
|
412
411
|
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
413
412
|
*/
|
|
414
|
-
_Monitor["default"].prototype[
|
|
413
|
+
_Monitor["default"].prototype["source_type"] = undefined;
|
|
415
414
|
/**
|
|
416
415
|
* The type of condition to apply to the value selected by the source_selector
|
|
417
416
|
* @member {Number} threshold
|
|
418
417
|
*/
|
|
419
|
-
_Monitor["default"].prototype[
|
|
418
|
+
_Monitor["default"].prototype["threshold"] = undefined;
|
|
420
419
|
/**
|
|
421
420
|
* @member {String} uid
|
|
422
421
|
*/
|
|
423
|
-
_Monitor["default"].prototype[
|
|
422
|
+
_Monitor["default"].prototype["uid"] = undefined;
|
|
424
423
|
|
|
425
424
|
/**
|
|
426
425
|
* Allowed values for the <code>aggregate_function</code> property.
|
|
427
426
|
* @enum {String}
|
|
428
427
|
* @readonly
|
|
429
428
|
*/
|
|
430
|
-
CreateMonitor[
|
|
429
|
+
CreateMonitor["AggregateFunctionEnum"] = {
|
|
431
430
|
/**
|
|
432
431
|
* value: "none"
|
|
433
432
|
* @const
|
|
434
433
|
*/
|
|
435
|
-
|
|
434
|
+
none: "none",
|
|
436
435
|
/**
|
|
437
436
|
* value: "sum"
|
|
438
437
|
* @const
|
|
439
438
|
*/
|
|
440
|
-
|
|
439
|
+
sum: "sum",
|
|
441
440
|
/**
|
|
442
441
|
* value: "average"
|
|
443
442
|
* @const
|
|
444
443
|
*/
|
|
445
|
-
|
|
444
|
+
average: "average",
|
|
446
445
|
/**
|
|
447
446
|
* value: "max"
|
|
448
447
|
* @const
|
|
449
448
|
*/
|
|
450
|
-
|
|
449
|
+
max: "max",
|
|
451
450
|
/**
|
|
452
451
|
* value: "min"
|
|
453
452
|
* @const
|
|
454
453
|
*/
|
|
455
|
-
|
|
454
|
+
min: "min"
|
|
456
455
|
};
|
|
457
456
|
|
|
458
457
|
/**
|
|
@@ -460,37 +459,37 @@ CreateMonitor['AggregateFunctionEnum'] = {
|
|
|
460
459
|
* @enum {String}
|
|
461
460
|
* @readonly
|
|
462
461
|
*/
|
|
463
|
-
CreateMonitor[
|
|
462
|
+
CreateMonitor["ConditionTypeEnum"] = {
|
|
464
463
|
/**
|
|
465
464
|
* value: "greater_than"
|
|
466
465
|
* @const
|
|
467
466
|
*/
|
|
468
|
-
|
|
467
|
+
greater_than: "greater_than",
|
|
469
468
|
/**
|
|
470
469
|
* value: "greater_than_or_equal_to"
|
|
471
470
|
* @const
|
|
472
471
|
*/
|
|
473
|
-
|
|
472
|
+
greater_than_or_equal_to: "greater_than_or_equal_to",
|
|
474
473
|
/**
|
|
475
474
|
* value: "less_than"
|
|
476
475
|
* @const
|
|
477
476
|
*/
|
|
478
|
-
|
|
477
|
+
less_than: "less_than",
|
|
479
478
|
/**
|
|
480
479
|
* value: "less_than_or_equal_to"
|
|
481
480
|
* @const
|
|
482
481
|
*/
|
|
483
|
-
|
|
482
|
+
less_than_or_equal_to: "less_than_or_equal_to",
|
|
484
483
|
/**
|
|
485
484
|
* value: "equal_to"
|
|
486
485
|
* @const
|
|
487
486
|
*/
|
|
488
|
-
|
|
487
|
+
equal_to: "equal_to",
|
|
489
488
|
/**
|
|
490
489
|
* value: "not_equal_to"
|
|
491
490
|
* @const
|
|
492
491
|
*/
|
|
493
|
-
|
|
492
|
+
not_equal_to: "not_equal_to"
|
|
494
493
|
};
|
|
495
494
|
|
|
496
495
|
/**
|
|
@@ -498,11 +497,11 @@ CreateMonitor['ConditionTypeEnum'] = {
|
|
|
498
497
|
* @enum {String}
|
|
499
498
|
* @readonly
|
|
500
499
|
*/
|
|
501
|
-
CreateMonitor[
|
|
500
|
+
CreateMonitor["SourceTypeEnum"] = {
|
|
502
501
|
/**
|
|
503
502
|
* value: "event"
|
|
504
503
|
* @const
|
|
505
504
|
*/
|
|
506
|
-
|
|
505
|
+
event: "event"
|
|
507
506
|
};
|
|
508
507
|
var _default = exports["default"] = CreateMonitor;
|