@blues-inc/notehub-js 6.2.0-beta.56 → 6.2.0-beta.57
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 +316 -318
- package/dist/ApiClient.js +150 -150
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +28 -28
- package/dist/api/DeviceApi.js +385 -385
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/JobsApi.js +78 -78
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +465 -465
- package/dist/api/RouteApi.js +83 -83
- package/dist/api/UsageApi.js +67 -67
- package/dist/api/WebhookApi.js +108 -108
- package/dist/model/AWSRoleConfig.js +14 -14
- package/dist/model/AddDeviceToFleetsRequest.js +8 -8
- package/dist/model/Alert.js +74 -76
- package/dist/model/AlertDataInner.js +36 -36
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +70 -70
- package/dist/model/AzureRoute.js +43 -43
- package/dist/model/BatchJobRequests.js +57 -57
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/BlynkRoute.js +28 -28
- package/dist/model/Body.js +5 -5
- package/dist/model/CancelJobRun200Response.js +6 -6
- 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 +20 -20
- package/dist/model/CreateJob201Response.js +8 -8
- package/dist/model/CreateLegacyWebhookEventRequest.js +17 -17
- package/dist/model/CreateMonitor.js +143 -144
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateProjectSecretRequest.js +14 -14
- 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/DatacakeRoute.js +35 -35
- package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
- package/dist/model/DeleteJob200Response.js +6 -6
- package/dist/model/DeleteNotefilesRequest.js +7 -7
- package/dist/model/Device.js +106 -107
- 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/Filter.js +16 -16
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +68 -68
- package/dist/model/Fleet.js +38 -38
- package/dist/model/FleetConnectivityAssurance.js +5 -5
- package/dist/model/GetAlerts200Response.js +14 -15
- package/dist/model/GetBillingAccount200Response.js +25 -25
- package/dist/model/GetBillingAccount200ResponsePlan.js +22 -22
- package/dist/model/GetBillingAccountBalanceHistory200Response.js +9 -10
- package/dist/model/GetBillingAccountBalanceHistory200ResponseDataInner.js +17 -17
- package/dist/model/GetBillingAccounts200Response.js +9 -10
- package/dist/model/GetDataUsage200Response.js +12 -13
- package/dist/model/GetDataUsage200ResponseDataInner.js +43 -44
- package/dist/model/GetDbNote200Response.js +13 -13
- 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/GetDeviceJourney200Response.js +21 -21
- package/dist/model/GetDeviceJourney200ResponseJourney.js +16 -17
- package/dist/model/GetDeviceJourneys200Response.js +16 -17
- package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +20 -20
- package/dist/model/GetDeviceLatestEvents200Response.js +9 -10
- package/dist/model/GetDevicePlans200Response.js +9 -10
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDevicePublicKeys200Response.js +16 -17
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- package/dist/model/GetDevices200Response.js +16 -17
- package/dist/model/GetEvents200Response.js +20 -21
- package/dist/model/GetEventsByCursor200Response.js +23 -24
- package/dist/model/GetJobRuns200Response.js +11 -12
- package/dist/model/GetJobs200Response.js +11 -12
- package/dist/model/GetNotefile200Response.js +11 -11
- package/dist/model/GetProducts200Response.js +9 -10
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjectSecretsResponse.js +11 -12
- package/dist/model/GetProjects200Response.js +9 -10
- package/dist/model/GetRouteLogsUsage200Response.js +14 -15
- package/dist/model/GetSessionsUsage200Response.js +15 -16
- package/dist/model/GetWebhooks200Response.js +9 -10
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- package/dist/model/Job.js +35 -35
- package/dist/model/JobDefinition.js +26 -26
- package/dist/model/JobDefinitionReportOptions.js +28 -28
- package/dist/model/JobDefinitionSelect.js +25 -25
- package/dist/model/JobDetail.js +48 -48
- package/dist/model/JobDetailAllOf.js +7 -7
- package/dist/model/JobRun.js +57 -57
- 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 +114 -115
- package/dist/model/MonitorAlertRoutesInner.js +10 -9
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +31 -31
- package/dist/model/NoteInput.js +9 -9
- package/dist/model/Notefile.js +22 -23
- package/dist/model/NotefileSchema.js +18 -19
- package/dist/model/NotehubRoute.js +103 -103
- package/dist/model/NotehubRouteSummary.js +23 -23
- 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/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/ProjectSecret.js +26 -26
- package/dist/model/ProvisionDeviceRequest.js +18 -18
- package/dist/model/ProxyRoute.js +29 -29
- package/dist/model/QubitroRoute.js +33 -33
- package/dist/model/RadRoute.js +31 -31
- package/dist/model/Repository.js +22 -22
- package/dist/model/RepositoryListResponse.js +11 -12
- package/dist/model/RepositoryTokenRequest.js +14 -14
- package/dist/model/RepositoryTokenResponse.js +38 -38
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/RouteTransformSettings.js +18 -18
- package/dist/model/RunJob200Response.js +8 -8
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatelliteDataUsage.js +18 -18
- package/dist/model/SatellitePlan.js +29 -29
- package/dist/model/SchemaProperty.js +36 -38
- package/dist/model/SignalDevice200Response.js +5 -5
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +48 -48
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +45 -45
- package/dist/model/SnowpipeStreamingRoute.js +60 -60
- package/dist/model/ThingworxRoute.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/TwilioRoute.js +43 -43
- package/dist/model/UpdateFleetRequest.js +33 -33
- package/dist/model/UpdateHostFirmwareRequest.js +17 -17
- package/dist/model/UpdateProjectSecretRequest.js +8 -8
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +33 -33
- package/dist/model/UsageEventsData.js +49 -49
- package/dist/model/UsageEventsResponse.js +14 -15
- package/dist/model/UsageRouteLogsData.js +30 -30
- package/dist/model/UsageSessionsData.js +43 -43
- 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
package/dist/model/Monitor.js
CHANGED
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
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); } /**
|
|
19
19
|
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
21
|
*
|
|
22
22
|
* The version of the OpenAPI document: 1.2.0
|
|
23
23
|
* Contact: engineering@blues.io
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The Monitor model module.
|
|
32
32
|
* @module model/Monitor
|
|
33
|
-
* @version 6.2.0-beta.
|
|
33
|
+
* @version 6.2.0-beta.57
|
|
34
34
|
*/
|
|
35
35
|
var Monitor = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -63,68 +63,68 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
63
63
|
value: function constructFromObject(data, obj) {
|
|
64
64
|
if (data) {
|
|
65
65
|
obj = obj || new Monitor();
|
|
66
|
-
if (data.hasOwnProperty(
|
|
67
|
-
obj[
|
|
66
|
+
if (data.hasOwnProperty("aggregate_function")) {
|
|
67
|
+
obj["aggregate_function"] = _ApiClient["default"].convertToType(data["aggregate_function"], "String");
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty(
|
|
70
|
-
obj[
|
|
69
|
+
if (data.hasOwnProperty("aggregate_window")) {
|
|
70
|
+
obj["aggregate_window"] = _ApiClient["default"].convertToType(data["aggregate_window"], "String");
|
|
71
71
|
}
|
|
72
|
-
if (data.hasOwnProperty(
|
|
73
|
-
obj[
|
|
72
|
+
if (data.hasOwnProperty("alert")) {
|
|
73
|
+
obj["alert"] = _ApiClient["default"].convertToType(data["alert"], "Boolean");
|
|
74
74
|
}
|
|
75
|
-
if (data.hasOwnProperty(
|
|
76
|
-
obj[
|
|
75
|
+
if (data.hasOwnProperty("alert_routes")) {
|
|
76
|
+
obj["alert_routes"] = _ApiClient["default"].convertToType(data["alert_routes"], [_MonitorAlertRoutesInner["default"]]);
|
|
77
77
|
}
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
78
|
+
if (data.hasOwnProperty("condition_type")) {
|
|
79
|
+
obj["condition_type"] = _ApiClient["default"].convertToType(data["condition_type"], "String");
|
|
80
80
|
}
|
|
81
|
-
if (data.hasOwnProperty(
|
|
82
|
-
obj[
|
|
81
|
+
if (data.hasOwnProperty("description")) {
|
|
82
|
+
obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
|
|
83
83
|
}
|
|
84
|
-
if (data.hasOwnProperty(
|
|
85
|
-
obj[
|
|
84
|
+
if (data.hasOwnProperty("disabled")) {
|
|
85
|
+
obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
|
|
86
86
|
}
|
|
87
|
-
if (data.hasOwnProperty(
|
|
88
|
-
obj[
|
|
87
|
+
if (data.hasOwnProperty("fleet_filter")) {
|
|
88
|
+
obj["fleet_filter"] = _ApiClient["default"].convertToType(data["fleet_filter"], ["String"]);
|
|
89
89
|
}
|
|
90
|
-
if (data.hasOwnProperty(
|
|
91
|
-
obj[
|
|
90
|
+
if (data.hasOwnProperty("last_routed_at")) {
|
|
91
|
+
obj["last_routed_at"] = _ApiClient["default"].convertToType(data["last_routed_at"], "String");
|
|
92
92
|
}
|
|
93
|
-
if (data.hasOwnProperty(
|
|
94
|
-
obj[
|
|
93
|
+
if (data.hasOwnProperty("name")) {
|
|
94
|
+
obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
|
|
95
95
|
}
|
|
96
|
-
if (data.hasOwnProperty(
|
|
97
|
-
obj[
|
|
96
|
+
if (data.hasOwnProperty("notefile_filter")) {
|
|
97
|
+
obj["notefile_filter"] = _ApiClient["default"].convertToType(data["notefile_filter"], ["String"]);
|
|
98
98
|
}
|
|
99
|
-
if (data.hasOwnProperty(
|
|
100
|
-
obj[
|
|
99
|
+
if (data.hasOwnProperty("per_device")) {
|
|
100
|
+
obj["per_device"] = _ApiClient["default"].convertToType(data["per_device"], "Boolean");
|
|
101
101
|
}
|
|
102
|
-
if (data.hasOwnProperty(
|
|
103
|
-
obj[
|
|
102
|
+
if (data.hasOwnProperty("routing_cooldown_period")) {
|
|
103
|
+
obj["routing_cooldown_period"] = _ApiClient["default"].convertToType(data["routing_cooldown_period"], "String");
|
|
104
104
|
}
|
|
105
|
-
if (data.hasOwnProperty(
|
|
106
|
-
obj[
|
|
105
|
+
if (data.hasOwnProperty("silenced")) {
|
|
106
|
+
obj["silenced"] = _ApiClient["default"].convertToType(data["silenced"], "Boolean");
|
|
107
107
|
}
|
|
108
|
-
if (data.hasOwnProperty(
|
|
109
|
-
obj[
|
|
108
|
+
if (data.hasOwnProperty("source_selector")) {
|
|
109
|
+
obj["source_selector"] = _ApiClient["default"].convertToType(data["source_selector"], "String");
|
|
110
110
|
}
|
|
111
|
-
if (data.hasOwnProperty(
|
|
112
|
-
obj[
|
|
111
|
+
if (data.hasOwnProperty("source_type")) {
|
|
112
|
+
obj["source_type"] = _ApiClient["default"].convertToType(data["source_type"], "String");
|
|
113
113
|
}
|
|
114
|
-
if (data.hasOwnProperty(
|
|
115
|
-
obj[
|
|
114
|
+
if (data.hasOwnProperty("threshold")) {
|
|
115
|
+
obj["threshold"] = _ApiClient["default"].convertToType(data["threshold"], "Number");
|
|
116
116
|
}
|
|
117
|
-
if (data.hasOwnProperty(
|
|
118
|
-
obj[
|
|
117
|
+
if (data.hasOwnProperty("uid")) {
|
|
118
|
+
obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
|
|
119
119
|
}
|
|
120
|
-
if (data.hasOwnProperty(
|
|
121
|
-
obj[
|
|
120
|
+
if (data.hasOwnProperty("usage_scope")) {
|
|
121
|
+
obj["usage_scope"] = _ApiClient["default"].convertToType(data["usage_scope"], "String");
|
|
122
122
|
}
|
|
123
|
-
if (data.hasOwnProperty(
|
|
124
|
-
obj[
|
|
123
|
+
if (data.hasOwnProperty("usage_type")) {
|
|
124
|
+
obj["usage_type"] = _ApiClient["default"].convertToType(data["usage_type"], "String");
|
|
125
125
|
}
|
|
126
|
-
if (data.hasOwnProperty(
|
|
127
|
-
obj[
|
|
126
|
+
if (data.hasOwnProperty("usage_window")) {
|
|
127
|
+
obj["usage_window"] = _ApiClient["default"].convertToType(data["usage_window"], "Number");
|
|
128
128
|
}
|
|
129
129
|
} else if (data === null) {
|
|
130
130
|
return null;
|
|
@@ -141,21 +141,21 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
141
141
|
key: "validateJSON",
|
|
142
142
|
value: function validateJSON(data) {
|
|
143
143
|
// ensure the json data is a string
|
|
144
|
-
if (data[
|
|
145
|
-
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data[
|
|
144
|
+
if (data["aggregate_function"] && !(typeof data["aggregate_function"] === "string" || data["aggregate_function"] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data["aggregate_function"]);
|
|
146
146
|
}
|
|
147
147
|
// ensure the json data is a string
|
|
148
|
-
if (data[
|
|
149
|
-
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data[
|
|
148
|
+
if (data["aggregate_window"] && !(typeof data["aggregate_window"] === "string" || data["aggregate_window"] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data["aggregate_window"]);
|
|
150
150
|
}
|
|
151
|
-
if (data[
|
|
151
|
+
if (data["alert_routes"]) {
|
|
152
152
|
// data not null
|
|
153
153
|
// ensure the json data is an array
|
|
154
|
-
if (!Array.isArray(data[
|
|
155
|
-
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data[
|
|
154
|
+
if (!Array.isArray(data["alert_routes"])) {
|
|
155
|
+
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data["alert_routes"]);
|
|
156
156
|
}
|
|
157
157
|
// validate the optional field `alert_routes` (array)
|
|
158
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
158
|
+
var _iterator = _createForOfIteratorHelper(data["alert_routes"]),
|
|
159
159
|
_step;
|
|
160
160
|
try {
|
|
161
161
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -167,55 +167,54 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
167
167
|
} finally {
|
|
168
168
|
_iterator.f();
|
|
169
169
|
}
|
|
170
|
-
;
|
|
171
170
|
}
|
|
172
171
|
// ensure the json data is a string
|
|
173
|
-
if (data[
|
|
174
|
-
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data[
|
|
172
|
+
if (data["condition_type"] && !(typeof data["condition_type"] === "string" || data["condition_type"] instanceof String)) {
|
|
173
|
+
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data["condition_type"]);
|
|
175
174
|
}
|
|
176
175
|
// ensure the json data is a string
|
|
177
|
-
if (data[
|
|
178
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data[
|
|
176
|
+
if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
|
|
177
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
|
|
179
178
|
}
|
|
180
179
|
// ensure the json data is an array
|
|
181
|
-
if (!Array.isArray(data[
|
|
182
|
-
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data[
|
|
180
|
+
if (!Array.isArray(data["fleet_filter"])) {
|
|
181
|
+
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data["fleet_filter"]);
|
|
183
182
|
}
|
|
184
183
|
// ensure the json data is a string
|
|
185
|
-
if (data[
|
|
186
|
-
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data[
|
|
184
|
+
if (data["last_routed_at"] && !(typeof data["last_routed_at"] === "string" || data["last_routed_at"] instanceof String)) {
|
|
185
|
+
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data["last_routed_at"]);
|
|
187
186
|
}
|
|
188
187
|
// ensure the json data is a string
|
|
189
|
-
if (data[
|
|
190
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data[
|
|
188
|
+
if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
|
|
189
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
|
|
191
190
|
}
|
|
192
191
|
// ensure the json data is an array
|
|
193
|
-
if (!Array.isArray(data[
|
|
194
|
-
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data[
|
|
192
|
+
if (!Array.isArray(data["notefile_filter"])) {
|
|
193
|
+
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data["notefile_filter"]);
|
|
195
194
|
}
|
|
196
195
|
// ensure the json data is a string
|
|
197
|
-
if (data[
|
|
198
|
-
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data[
|
|
196
|
+
if (data["routing_cooldown_period"] && !(typeof data["routing_cooldown_period"] === "string" || data["routing_cooldown_period"] instanceof String)) {
|
|
197
|
+
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data["routing_cooldown_period"]);
|
|
199
198
|
}
|
|
200
199
|
// ensure the json data is a string
|
|
201
|
-
if (data[
|
|
202
|
-
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data[
|
|
200
|
+
if (data["source_selector"] && !(typeof data["source_selector"] === "string" || data["source_selector"] instanceof String)) {
|
|
201
|
+
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data["source_selector"]);
|
|
203
202
|
}
|
|
204
203
|
// ensure the json data is a string
|
|
205
|
-
if (data[
|
|
206
|
-
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data[
|
|
204
|
+
if (data["source_type"] && !(typeof data["source_type"] === "string" || data["source_type"] instanceof String)) {
|
|
205
|
+
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data["source_type"]);
|
|
207
206
|
}
|
|
208
207
|
// ensure the json data is a string
|
|
209
|
-
if (data[
|
|
210
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
208
|
+
if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
|
|
209
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
|
|
211
210
|
}
|
|
212
211
|
// ensure the json data is a string
|
|
213
|
-
if (data[
|
|
214
|
-
throw new Error("Expected the field `usage_scope` to be a primitive type in the JSON string but got " + data[
|
|
212
|
+
if (data["usage_scope"] && !(typeof data["usage_scope"] === "string" || data["usage_scope"] instanceof String)) {
|
|
213
|
+
throw new Error("Expected the field `usage_scope` to be a primitive type in the JSON string but got " + data["usage_scope"]);
|
|
215
214
|
}
|
|
216
215
|
// ensure the json data is a string
|
|
217
|
-
if (data[
|
|
218
|
-
throw new Error("Expected the field `usage_type` to be a primitive type in the JSON string but got " + data[
|
|
216
|
+
if (data["usage_type"] && !(typeof data["usage_type"] === "string" || data["usage_type"] instanceof String)) {
|
|
217
|
+
throw new Error("Expected the field `usage_type` to be a primitive type in the JSON string but got " + data["usage_type"]);
|
|
219
218
|
}
|
|
220
219
|
return true;
|
|
221
220
|
}
|
|
@@ -225,153 +224,153 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
225
224
|
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
226
225
|
* @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
|
|
227
226
|
*/
|
|
228
|
-
Monitor.prototype[
|
|
227
|
+
Monitor.prototype["aggregate_function"] = undefined;
|
|
229
228
|
|
|
230
229
|
/**
|
|
231
230
|
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
232
231
|
* @member {String} aggregate_window
|
|
233
232
|
*/
|
|
234
|
-
Monitor.prototype[
|
|
233
|
+
Monitor.prototype["aggregate_window"] = undefined;
|
|
235
234
|
|
|
236
235
|
/**
|
|
237
236
|
* If true, the monitor is in alert state.
|
|
238
237
|
* @member {Boolean} alert
|
|
239
238
|
*/
|
|
240
|
-
Monitor.prototype[
|
|
239
|
+
Monitor.prototype["alert"] = undefined;
|
|
241
240
|
|
|
242
241
|
/**
|
|
243
242
|
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
244
243
|
*/
|
|
245
|
-
Monitor.prototype[
|
|
244
|
+
Monitor.prototype["alert_routes"] = undefined;
|
|
246
245
|
|
|
247
246
|
/**
|
|
248
247
|
* 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]
|
|
249
248
|
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
250
249
|
*/
|
|
251
|
-
Monitor.prototype[
|
|
250
|
+
Monitor.prototype["condition_type"] = undefined;
|
|
252
251
|
|
|
253
252
|
/**
|
|
254
253
|
* @member {String} description
|
|
255
254
|
*/
|
|
256
|
-
Monitor.prototype[
|
|
255
|
+
Monitor.prototype["description"] = undefined;
|
|
257
256
|
|
|
258
257
|
/**
|
|
259
258
|
* If true, the monitor will not be evaluated.
|
|
260
259
|
* @member {Boolean} disabled
|
|
261
260
|
*/
|
|
262
|
-
Monitor.prototype[
|
|
261
|
+
Monitor.prototype["disabled"] = undefined;
|
|
263
262
|
|
|
264
263
|
/**
|
|
265
264
|
* @member {Array.<String>} fleet_filter
|
|
266
265
|
*/
|
|
267
|
-
Monitor.prototype[
|
|
266
|
+
Monitor.prototype["fleet_filter"] = undefined;
|
|
268
267
|
|
|
269
268
|
/**
|
|
270
269
|
* The last time the monitor was evaluated and routed.
|
|
271
270
|
* @member {String} last_routed_at
|
|
272
271
|
*/
|
|
273
|
-
Monitor.prototype[
|
|
272
|
+
Monitor.prototype["last_routed_at"] = undefined;
|
|
274
273
|
|
|
275
274
|
/**
|
|
276
275
|
* @member {String} name
|
|
277
276
|
*/
|
|
278
|
-
Monitor.prototype[
|
|
277
|
+
Monitor.prototype["name"] = undefined;
|
|
279
278
|
|
|
280
279
|
/**
|
|
281
280
|
* @member {Array.<String>} notefile_filter
|
|
282
281
|
*/
|
|
283
|
-
Monitor.prototype[
|
|
282
|
+
Monitor.prototype["notefile_filter"] = undefined;
|
|
284
283
|
|
|
285
284
|
/**
|
|
286
285
|
* 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.
|
|
287
286
|
* @member {Boolean} per_device
|
|
288
287
|
*/
|
|
289
|
-
Monitor.prototype[
|
|
288
|
+
Monitor.prototype["per_device"] = undefined;
|
|
290
289
|
|
|
291
290
|
/**
|
|
292
291
|
* 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.
|
|
293
292
|
* @member {String} routing_cooldown_period
|
|
294
293
|
*/
|
|
295
|
-
Monitor.prototype[
|
|
294
|
+
Monitor.prototype["routing_cooldown_period"] = undefined;
|
|
296
295
|
|
|
297
296
|
/**
|
|
298
297
|
* If true, alerts will be created, but no notifications will be sent.
|
|
299
298
|
* @member {Boolean} silenced
|
|
300
299
|
*/
|
|
301
|
-
Monitor.prototype[
|
|
300
|
+
Monitor.prototype["silenced"] = undefined;
|
|
302
301
|
|
|
303
302
|
/**
|
|
304
303
|
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
305
304
|
* @member {String} source_selector
|
|
306
305
|
*/
|
|
307
|
-
Monitor.prototype[
|
|
306
|
+
Monitor.prototype["source_selector"] = undefined;
|
|
308
307
|
|
|
309
308
|
/**
|
|
310
309
|
* The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
|
|
311
310
|
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
312
311
|
*/
|
|
313
|
-
Monitor.prototype[
|
|
312
|
+
Monitor.prototype["source_type"] = undefined;
|
|
314
313
|
|
|
315
314
|
/**
|
|
316
315
|
* The type of condition to apply to the value selected by the source_selector
|
|
317
316
|
* @member {Number} threshold
|
|
318
317
|
*/
|
|
319
|
-
Monitor.prototype[
|
|
318
|
+
Monitor.prototype["threshold"] = undefined;
|
|
320
319
|
|
|
321
320
|
/**
|
|
322
321
|
* @member {String} uid
|
|
323
322
|
*/
|
|
324
|
-
Monitor.prototype[
|
|
323
|
+
Monitor.prototype["uid"] = undefined;
|
|
325
324
|
|
|
326
325
|
/**
|
|
327
326
|
* For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\".
|
|
328
327
|
* @member {String} usage_scope
|
|
329
328
|
*/
|
|
330
|
-
Monitor.prototype[
|
|
329
|
+
Monitor.prototype["usage_scope"] = undefined;
|
|
331
330
|
|
|
332
331
|
/**
|
|
333
332
|
* For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\".
|
|
334
333
|
* @member {String} usage_type
|
|
335
334
|
*/
|
|
336
|
-
Monitor.prototype[
|
|
335
|
+
Monitor.prototype["usage_type"] = undefined;
|
|
337
336
|
|
|
338
337
|
/**
|
|
339
338
|
* For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).
|
|
340
339
|
* @member {Number} usage_window
|
|
341
340
|
*/
|
|
342
|
-
Monitor.prototype[
|
|
341
|
+
Monitor.prototype["usage_window"] = undefined;
|
|
343
342
|
|
|
344
343
|
/**
|
|
345
344
|
* Allowed values for the <code>aggregate_function</code> property.
|
|
346
345
|
* @enum {String}
|
|
347
346
|
* @readonly
|
|
348
347
|
*/
|
|
349
|
-
Monitor[
|
|
348
|
+
Monitor["AggregateFunctionEnum"] = {
|
|
350
349
|
/**
|
|
351
350
|
* value: "none"
|
|
352
351
|
* @const
|
|
353
352
|
*/
|
|
354
|
-
|
|
353
|
+
none: "none",
|
|
355
354
|
/**
|
|
356
355
|
* value: "sum"
|
|
357
356
|
* @const
|
|
358
357
|
*/
|
|
359
|
-
|
|
358
|
+
sum: "sum",
|
|
360
359
|
/**
|
|
361
360
|
* value: "average"
|
|
362
361
|
* @const
|
|
363
362
|
*/
|
|
364
|
-
|
|
363
|
+
average: "average",
|
|
365
364
|
/**
|
|
366
365
|
* value: "max"
|
|
367
366
|
* @const
|
|
368
367
|
*/
|
|
369
|
-
|
|
368
|
+
max: "max",
|
|
370
369
|
/**
|
|
371
370
|
* value: "min"
|
|
372
371
|
* @const
|
|
373
372
|
*/
|
|
374
|
-
|
|
373
|
+
min: "min"
|
|
375
374
|
};
|
|
376
375
|
|
|
377
376
|
/**
|
|
@@ -379,42 +378,42 @@ Monitor['AggregateFunctionEnum'] = {
|
|
|
379
378
|
* @enum {String}
|
|
380
379
|
* @readonly
|
|
381
380
|
*/
|
|
382
|
-
Monitor[
|
|
381
|
+
Monitor["ConditionTypeEnum"] = {
|
|
383
382
|
/**
|
|
384
383
|
* value: "greater_than"
|
|
385
384
|
* @const
|
|
386
385
|
*/
|
|
387
|
-
|
|
386
|
+
greater_than: "greater_than",
|
|
388
387
|
/**
|
|
389
388
|
* value: "greater_than_or_equal_to"
|
|
390
389
|
* @const
|
|
391
390
|
*/
|
|
392
|
-
|
|
391
|
+
greater_than_or_equal_to: "greater_than_or_equal_to",
|
|
393
392
|
/**
|
|
394
393
|
* value: "less_than"
|
|
395
394
|
* @const
|
|
396
395
|
*/
|
|
397
|
-
|
|
396
|
+
less_than: "less_than",
|
|
398
397
|
/**
|
|
399
398
|
* value: "less_than_or_equal_to"
|
|
400
399
|
* @const
|
|
401
400
|
*/
|
|
402
|
-
|
|
401
|
+
less_than_or_equal_to: "less_than_or_equal_to",
|
|
403
402
|
/**
|
|
404
403
|
* value: "equal_to"
|
|
405
404
|
* @const
|
|
406
405
|
*/
|
|
407
|
-
|
|
406
|
+
equal_to: "equal_to",
|
|
408
407
|
/**
|
|
409
408
|
* value: "not_equal_to"
|
|
410
409
|
* @const
|
|
411
410
|
*/
|
|
412
|
-
|
|
411
|
+
not_equal_to: "not_equal_to",
|
|
413
412
|
/**
|
|
414
413
|
* value: "count"
|
|
415
414
|
* @const
|
|
416
415
|
*/
|
|
417
|
-
|
|
416
|
+
count: "count"
|
|
418
417
|
};
|
|
419
418
|
|
|
420
419
|
/**
|
|
@@ -422,16 +421,16 @@ Monitor['ConditionTypeEnum'] = {
|
|
|
422
421
|
* @enum {String}
|
|
423
422
|
* @readonly
|
|
424
423
|
*/
|
|
425
|
-
Monitor[
|
|
424
|
+
Monitor["SourceTypeEnum"] = {
|
|
426
425
|
/**
|
|
427
426
|
* value: "event"
|
|
428
427
|
* @const
|
|
429
428
|
*/
|
|
430
|
-
|
|
429
|
+
event: "event",
|
|
431
430
|
/**
|
|
432
431
|
* value: "heartbeat"
|
|
433
432
|
* @const
|
|
434
433
|
*/
|
|
435
|
-
|
|
434
|
+
heartbeat: "heartbeat"
|
|
436
435
|
};
|
|
437
436
|
var _default = exports["default"] = Monitor;
|
|
@@ -18,7 +18,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
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,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
/**
|
|
32
32
|
* The MonitorAlertRoutesInner model module.
|
|
33
33
|
* @module model/MonitorAlertRoutesInner
|
|
34
|
-
* @version 6.2.0-beta.
|
|
34
|
+
* @version 6.2.0-beta.57
|
|
35
35
|
*/
|
|
36
36
|
var MonitorAlertRoutesInner = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -105,7 +105,8 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
|
|
|
105
105
|
} else if (match === 0) {
|
|
106
106
|
this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
107
107
|
throw new Error("No match found constructing `MonitorAlertRoutesInner` with oneOf schemas EmailNotification, SlackBearerNotification, SlackWebHookNotification. Details: " + errorMessages.join(", "));
|
|
108
|
-
} else {
|
|
108
|
+
} else {
|
|
109
|
+
// only 1 match
|
|
109
110
|
// the input is valid
|
|
110
111
|
}
|
|
111
112
|
}
|
|
@@ -157,36 +158,36 @@ _MonitorAlertRoutesInner = MonitorAlertRoutesInner;
|
|
|
157
158
|
_defineProperty(MonitorAlertRoutesInner, "fromJSON", function (json_string) {
|
|
158
159
|
return _MonitorAlertRoutesInner.constructFromObject(JSON.parse(json_string));
|
|
159
160
|
});
|
|
160
|
-
MonitorAlertRoutesInner.prototype[
|
|
161
|
+
MonitorAlertRoutesInner.prototype["message_type"] = undefined;
|
|
161
162
|
|
|
162
163
|
/**
|
|
163
164
|
* The text of the message, or the blocks definition
|
|
164
165
|
* @member {String} text
|
|
165
166
|
*/
|
|
166
|
-
MonitorAlertRoutesInner.prototype[
|
|
167
|
+
MonitorAlertRoutesInner.prototype["text"] = undefined;
|
|
167
168
|
|
|
168
169
|
/**
|
|
169
170
|
* The URL of the Slack webhook.
|
|
170
171
|
* @member {String} url
|
|
171
172
|
*/
|
|
172
|
-
MonitorAlertRoutesInner.prototype[
|
|
173
|
+
MonitorAlertRoutesInner.prototype["url"] = undefined;
|
|
173
174
|
|
|
174
175
|
/**
|
|
175
176
|
* The channel to send the message to.
|
|
176
177
|
* @member {String} channel
|
|
177
178
|
*/
|
|
178
|
-
MonitorAlertRoutesInner.prototype[
|
|
179
|
+
MonitorAlertRoutesInner.prototype["channel"] = undefined;
|
|
179
180
|
|
|
180
181
|
/**
|
|
181
182
|
* The bearer token for the Slack app.
|
|
182
183
|
* @member {String} token
|
|
183
184
|
*/
|
|
184
|
-
MonitorAlertRoutesInner.prototype[
|
|
185
|
+
MonitorAlertRoutesInner.prototype["token"] = undefined;
|
|
185
186
|
|
|
186
187
|
/**
|
|
187
188
|
* Email Address
|
|
188
189
|
* @member {String} email
|
|
189
190
|
*/
|
|
190
|
-
MonitorAlertRoutesInner.prototype[
|
|
191
|
+
MonitorAlertRoutesInner.prototype["email"] = undefined;
|
|
191
192
|
MonitorAlertRoutesInner.OneOf = ["EmailNotification", "SlackBearerNotification", "SlackWebHookNotification"];
|
|
192
193
|
var _default = exports["default"] = MonitorAlertRoutesInner;
|