@blues-inc/notehub-js 6.2.0-beta.3 → 6.2.0-beta.30
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 +301 -285
- 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 +30 -30
- package/dist/api/DeviceApi.js +477 -356
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/JobsApi.js +74 -127
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +519 -406
- package/dist/api/RouteApi.js +83 -83
- package/dist/api/UsageApi.js +67 -67
- package/dist/api/WebhookApi.js +366 -53
- package/dist/index.js +63 -0
- 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/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +14 -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 +118 -0
- package/dist/model/CreateMonitor.js +177 -128
- 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/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 +149 -0
- package/dist/model/GetDeviceJourney200ResponseJourney.js +142 -0
- package/dist/model/GetDeviceJourneys200Response.js +141 -0
- package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +133 -0
- 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/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 +28 -50
- 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 +136 -102
- 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/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 +131 -0
- package/dist/model/RepositoryTokenRequest.js +116 -0
- package/dist/model/RepositoryTokenResponse.js +182 -0
- 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 +117 -0
- 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.30
|
|
34
34
|
*/
|
|
35
35
|
var Monitor = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -63,59 +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
|
+
}
|
|
120
|
+
if (data.hasOwnProperty("usage_scope")) {
|
|
121
|
+
obj["usage_scope"] = _ApiClient["default"].convertToType(data["usage_scope"], "String");
|
|
122
|
+
}
|
|
123
|
+
if (data.hasOwnProperty("usage_type")) {
|
|
124
|
+
obj["usage_type"] = _ApiClient["default"].convertToType(data["usage_type"], "String");
|
|
125
|
+
}
|
|
126
|
+
if (data.hasOwnProperty("usage_window")) {
|
|
127
|
+
obj["usage_window"] = _ApiClient["default"].convertToType(data["usage_window"], "Number");
|
|
119
128
|
}
|
|
120
129
|
} else if (data === null) {
|
|
121
130
|
return null;
|
|
@@ -132,21 +141,21 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
132
141
|
key: "validateJSON",
|
|
133
142
|
value: function validateJSON(data) {
|
|
134
143
|
// ensure the json data is a string
|
|
135
|
-
if (data[
|
|
136
|
-
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"]);
|
|
137
146
|
}
|
|
138
147
|
// ensure the json data is a string
|
|
139
|
-
if (data[
|
|
140
|
-
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"]);
|
|
141
150
|
}
|
|
142
|
-
if (data[
|
|
151
|
+
if (data["alert_routes"]) {
|
|
143
152
|
// data not null
|
|
144
153
|
// ensure the json data is an array
|
|
145
|
-
if (!Array.isArray(data[
|
|
146
|
-
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"]);
|
|
147
156
|
}
|
|
148
157
|
// validate the optional field `alert_routes` (array)
|
|
149
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
158
|
+
var _iterator = _createForOfIteratorHelper(data["alert_routes"]),
|
|
150
159
|
_step;
|
|
151
160
|
try {
|
|
152
161
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -158,47 +167,54 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
158
167
|
} finally {
|
|
159
168
|
_iterator.f();
|
|
160
169
|
}
|
|
161
|
-
;
|
|
162
170
|
}
|
|
163
171
|
// ensure the json data is a string
|
|
164
|
-
if (data[
|
|
165
|
-
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"]);
|
|
166
174
|
}
|
|
167
175
|
// ensure the json data is a string
|
|
168
|
-
if (data[
|
|
169
|
-
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"]);
|
|
170
178
|
}
|
|
171
179
|
// ensure the json data is an array
|
|
172
|
-
if (!Array.isArray(data[
|
|
173
|
-
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"]);
|
|
174
182
|
}
|
|
175
183
|
// ensure the json data is a string
|
|
176
|
-
if (data[
|
|
177
|
-
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"]);
|
|
178
186
|
}
|
|
179
187
|
// ensure the json data is a string
|
|
180
|
-
if (data[
|
|
181
|
-
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"]);
|
|
182
190
|
}
|
|
183
191
|
// ensure the json data is an array
|
|
184
|
-
if (!Array.isArray(data[
|
|
185
|
-
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"]);
|
|
194
|
+
}
|
|
195
|
+
// ensure the json data is a string
|
|
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"]);
|
|
198
|
+
}
|
|
199
|
+
// ensure the json data is a string
|
|
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"]);
|
|
186
202
|
}
|
|
187
203
|
// ensure the json data is a string
|
|
188
|
-
if (data[
|
|
189
|
-
throw new Error("Expected the field `
|
|
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"]);
|
|
190
206
|
}
|
|
191
207
|
// ensure the json data is a string
|
|
192
|
-
if (data[
|
|
193
|
-
throw new Error("Expected the field `
|
|
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"]);
|
|
194
210
|
}
|
|
195
211
|
// ensure the json data is a string
|
|
196
|
-
if (data[
|
|
197
|
-
throw new Error("Expected the field `
|
|
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"]);
|
|
198
214
|
}
|
|
199
215
|
// ensure the json data is a string
|
|
200
|
-
if (data[
|
|
201
|
-
throw new Error("Expected the field `
|
|
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"]);
|
|
202
218
|
}
|
|
203
219
|
return true;
|
|
204
220
|
}
|
|
@@ -208,135 +224,153 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
208
224
|
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
209
225
|
* @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
|
|
210
226
|
*/
|
|
211
|
-
Monitor.prototype[
|
|
227
|
+
Monitor.prototype["aggregate_function"] = undefined;
|
|
212
228
|
|
|
213
229
|
/**
|
|
214
230
|
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
215
231
|
* @member {String} aggregate_window
|
|
216
232
|
*/
|
|
217
|
-
Monitor.prototype[
|
|
233
|
+
Monitor.prototype["aggregate_window"] = undefined;
|
|
218
234
|
|
|
219
235
|
/**
|
|
220
236
|
* If true, the monitor is in alert state.
|
|
221
237
|
* @member {Boolean} alert
|
|
222
238
|
*/
|
|
223
|
-
Monitor.prototype[
|
|
239
|
+
Monitor.prototype["alert"] = undefined;
|
|
224
240
|
|
|
225
241
|
/**
|
|
226
242
|
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
227
243
|
*/
|
|
228
|
-
Monitor.prototype[
|
|
244
|
+
Monitor.prototype["alert_routes"] = undefined;
|
|
229
245
|
|
|
230
246
|
/**
|
|
231
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]
|
|
232
248
|
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
233
249
|
*/
|
|
234
|
-
Monitor.prototype[
|
|
250
|
+
Monitor.prototype["condition_type"] = undefined;
|
|
235
251
|
|
|
236
252
|
/**
|
|
237
253
|
* @member {String} description
|
|
238
254
|
*/
|
|
239
|
-
Monitor.prototype[
|
|
255
|
+
Monitor.prototype["description"] = undefined;
|
|
240
256
|
|
|
241
257
|
/**
|
|
242
258
|
* If true, the monitor will not be evaluated.
|
|
243
259
|
* @member {Boolean} disabled
|
|
244
260
|
*/
|
|
245
|
-
Monitor.prototype[
|
|
261
|
+
Monitor.prototype["disabled"] = undefined;
|
|
246
262
|
|
|
247
263
|
/**
|
|
248
264
|
* @member {Array.<String>} fleet_filter
|
|
249
265
|
*/
|
|
250
|
-
Monitor.prototype[
|
|
266
|
+
Monitor.prototype["fleet_filter"] = undefined;
|
|
251
267
|
|
|
252
268
|
/**
|
|
253
269
|
* The last time the monitor was evaluated and routed.
|
|
254
270
|
* @member {String} last_routed_at
|
|
255
271
|
*/
|
|
256
|
-
Monitor.prototype[
|
|
272
|
+
Monitor.prototype["last_routed_at"] = undefined;
|
|
257
273
|
|
|
258
274
|
/**
|
|
259
275
|
* @member {String} name
|
|
260
276
|
*/
|
|
261
|
-
Monitor.prototype[
|
|
277
|
+
Monitor.prototype["name"] = undefined;
|
|
262
278
|
|
|
263
279
|
/**
|
|
264
280
|
* @member {Array.<String>} notefile_filter
|
|
265
281
|
*/
|
|
266
|
-
Monitor.prototype[
|
|
282
|
+
Monitor.prototype["notefile_filter"] = undefined;
|
|
267
283
|
|
|
268
284
|
/**
|
|
269
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.
|
|
270
286
|
* @member {Boolean} per_device
|
|
271
287
|
*/
|
|
272
|
-
Monitor.prototype[
|
|
288
|
+
Monitor.prototype["per_device"] = undefined;
|
|
273
289
|
|
|
274
290
|
/**
|
|
275
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.
|
|
276
292
|
* @member {String} routing_cooldown_period
|
|
277
293
|
*/
|
|
278
|
-
Monitor.prototype[
|
|
294
|
+
Monitor.prototype["routing_cooldown_period"] = undefined;
|
|
279
295
|
|
|
280
296
|
/**
|
|
281
297
|
* If true, alerts will be created, but no notifications will be sent.
|
|
282
298
|
* @member {Boolean} silenced
|
|
283
299
|
*/
|
|
284
|
-
Monitor.prototype[
|
|
300
|
+
Monitor.prototype["silenced"] = undefined;
|
|
285
301
|
|
|
286
302
|
/**
|
|
287
303
|
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
288
304
|
* @member {String} source_selector
|
|
289
305
|
*/
|
|
290
|
-
Monitor.prototype[
|
|
306
|
+
Monitor.prototype["source_selector"] = undefined;
|
|
291
307
|
|
|
292
308
|
/**
|
|
293
309
|
* The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
|
|
294
310
|
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
295
311
|
*/
|
|
296
|
-
Monitor.prototype[
|
|
312
|
+
Monitor.prototype["source_type"] = undefined;
|
|
297
313
|
|
|
298
314
|
/**
|
|
299
315
|
* The type of condition to apply to the value selected by the source_selector
|
|
300
316
|
* @member {Number} threshold
|
|
301
317
|
*/
|
|
302
|
-
Monitor.prototype[
|
|
318
|
+
Monitor.prototype["threshold"] = undefined;
|
|
303
319
|
|
|
304
320
|
/**
|
|
305
321
|
* @member {String} uid
|
|
306
322
|
*/
|
|
307
|
-
Monitor.prototype[
|
|
323
|
+
Monitor.prototype["uid"] = undefined;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\".
|
|
327
|
+
* @member {String} usage_scope
|
|
328
|
+
*/
|
|
329
|
+
Monitor.prototype["usage_scope"] = undefined;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\".
|
|
333
|
+
* @member {String} usage_type
|
|
334
|
+
*/
|
|
335
|
+
Monitor.prototype["usage_type"] = undefined;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).
|
|
339
|
+
* @member {Number} usage_window
|
|
340
|
+
*/
|
|
341
|
+
Monitor.prototype["usage_window"] = undefined;
|
|
308
342
|
|
|
309
343
|
/**
|
|
310
344
|
* Allowed values for the <code>aggregate_function</code> property.
|
|
311
345
|
* @enum {String}
|
|
312
346
|
* @readonly
|
|
313
347
|
*/
|
|
314
|
-
Monitor[
|
|
348
|
+
Monitor["AggregateFunctionEnum"] = {
|
|
315
349
|
/**
|
|
316
350
|
* value: "none"
|
|
317
351
|
* @const
|
|
318
352
|
*/
|
|
319
|
-
|
|
353
|
+
none: "none",
|
|
320
354
|
/**
|
|
321
355
|
* value: "sum"
|
|
322
356
|
* @const
|
|
323
357
|
*/
|
|
324
|
-
|
|
358
|
+
sum: "sum",
|
|
325
359
|
/**
|
|
326
360
|
* value: "average"
|
|
327
361
|
* @const
|
|
328
362
|
*/
|
|
329
|
-
|
|
363
|
+
average: "average",
|
|
330
364
|
/**
|
|
331
365
|
* value: "max"
|
|
332
366
|
* @const
|
|
333
367
|
*/
|
|
334
|
-
|
|
368
|
+
max: "max",
|
|
335
369
|
/**
|
|
336
370
|
* value: "min"
|
|
337
371
|
* @const
|
|
338
372
|
*/
|
|
339
|
-
|
|
373
|
+
min: "min"
|
|
340
374
|
};
|
|
341
375
|
|
|
342
376
|
/**
|
|
@@ -344,42 +378,42 @@ Monitor['AggregateFunctionEnum'] = {
|
|
|
344
378
|
* @enum {String}
|
|
345
379
|
* @readonly
|
|
346
380
|
*/
|
|
347
|
-
Monitor[
|
|
381
|
+
Monitor["ConditionTypeEnum"] = {
|
|
348
382
|
/**
|
|
349
383
|
* value: "greater_than"
|
|
350
384
|
* @const
|
|
351
385
|
*/
|
|
352
|
-
|
|
386
|
+
greater_than: "greater_than",
|
|
353
387
|
/**
|
|
354
388
|
* value: "greater_than_or_equal_to"
|
|
355
389
|
* @const
|
|
356
390
|
*/
|
|
357
|
-
|
|
391
|
+
greater_than_or_equal_to: "greater_than_or_equal_to",
|
|
358
392
|
/**
|
|
359
393
|
* value: "less_than"
|
|
360
394
|
* @const
|
|
361
395
|
*/
|
|
362
|
-
|
|
396
|
+
less_than: "less_than",
|
|
363
397
|
/**
|
|
364
398
|
* value: "less_than_or_equal_to"
|
|
365
399
|
* @const
|
|
366
400
|
*/
|
|
367
|
-
|
|
401
|
+
less_than_or_equal_to: "less_than_or_equal_to",
|
|
368
402
|
/**
|
|
369
403
|
* value: "equal_to"
|
|
370
404
|
* @const
|
|
371
405
|
*/
|
|
372
|
-
|
|
406
|
+
equal_to: "equal_to",
|
|
373
407
|
/**
|
|
374
408
|
* value: "not_equal_to"
|
|
375
409
|
* @const
|
|
376
410
|
*/
|
|
377
|
-
|
|
411
|
+
not_equal_to: "not_equal_to",
|
|
378
412
|
/**
|
|
379
413
|
* value: "count"
|
|
380
414
|
* @const
|
|
381
415
|
*/
|
|
382
|
-
|
|
416
|
+
count: "count"
|
|
383
417
|
};
|
|
384
418
|
|
|
385
419
|
/**
|
|
@@ -387,16 +421,16 @@ Monitor['ConditionTypeEnum'] = {
|
|
|
387
421
|
* @enum {String}
|
|
388
422
|
* @readonly
|
|
389
423
|
*/
|
|
390
|
-
Monitor[
|
|
424
|
+
Monitor["SourceTypeEnum"] = {
|
|
391
425
|
/**
|
|
392
426
|
* value: "event"
|
|
393
427
|
* @const
|
|
394
428
|
*/
|
|
395
|
-
|
|
429
|
+
event: "event",
|
|
396
430
|
/**
|
|
397
431
|
* value: "heartbeat"
|
|
398
432
|
* @const
|
|
399
433
|
*/
|
|
400
|
-
|
|
434
|
+
heartbeat: "heartbeat"
|
|
401
435
|
};
|
|
402
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.30
|
|
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;
|