@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
|
@@ -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,16 +31,16 @@ 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 6.2.0-beta.
|
|
34
|
+
* @version 6.2.0-beta.30
|
|
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}
|
|
41
|
+
* @param alertRoutes {Array.<module:model/MonitorAlertRoutesInner>}
|
|
42
|
+
* @param description {String}
|
|
43
|
+
* @param name {String}
|
|
44
44
|
* @param sourceType {module:model/CreateMonitor.SourceTypeEnum} The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
|
|
45
45
|
* @param threshold {Number} The type of condition to apply to the value selected by the source_selector
|
|
46
46
|
*/
|
|
@@ -58,11 +58,11 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
58
58
|
return _createClass(CreateMonitor, null, [{
|
|
59
59
|
key: "initialize",
|
|
60
60
|
value: function initialize(obj, alertRoutes, description, name, sourceType, threshold) {
|
|
61
|
-
obj[
|
|
62
|
-
obj[
|
|
63
|
-
obj[
|
|
64
|
-
obj[
|
|
65
|
-
obj[
|
|
61
|
+
obj["alert_routes"] = alertRoutes;
|
|
62
|
+
obj["description"] = description;
|
|
63
|
+
obj["name"] = name;
|
|
64
|
+
obj["source_type"] = sourceType;
|
|
65
|
+
obj["threshold"] = threshold;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -78,59 +78,68 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
78
78
|
if (data) {
|
|
79
79
|
obj = obj || new CreateMonitor();
|
|
80
80
|
_Monitor["default"].constructFromObject(data, obj);
|
|
81
|
-
if (data.hasOwnProperty(
|
|
82
|
-
obj[
|
|
81
|
+
if (data.hasOwnProperty("aggregate_function")) {
|
|
82
|
+
obj["aggregate_function"] = _ApiClient["default"].convertToType(data["aggregate_function"], "String");
|
|
83
83
|
}
|
|
84
|
-
if (data.hasOwnProperty(
|
|
85
|
-
obj[
|
|
84
|
+
if (data.hasOwnProperty("aggregate_window")) {
|
|
85
|
+
obj["aggregate_window"] = _ApiClient["default"].convertToType(data["aggregate_window"], "String");
|
|
86
86
|
}
|
|
87
|
-
if (data.hasOwnProperty(
|
|
88
|
-
obj[
|
|
87
|
+
if (data.hasOwnProperty("alert")) {
|
|
88
|
+
obj["alert"] = _ApiClient["default"].convertToType(data["alert"], "Boolean");
|
|
89
89
|
}
|
|
90
|
-
if (data.hasOwnProperty(
|
|
91
|
-
obj[
|
|
90
|
+
if (data.hasOwnProperty("alert_routes")) {
|
|
91
|
+
obj["alert_routes"] = _ApiClient["default"].convertToType(data["alert_routes"], [_MonitorAlertRoutesInner["default"]]);
|
|
92
92
|
}
|
|
93
|
-
if (data.hasOwnProperty(
|
|
94
|
-
obj[
|
|
93
|
+
if (data.hasOwnProperty("condition_type")) {
|
|
94
|
+
obj["condition_type"] = _ApiClient["default"].convertToType(data["condition_type"], "String");
|
|
95
95
|
}
|
|
96
|
-
if (data.hasOwnProperty(
|
|
97
|
-
obj[
|
|
96
|
+
if (data.hasOwnProperty("description")) {
|
|
97
|
+
obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
|
|
98
98
|
}
|
|
99
|
-
if (data.hasOwnProperty(
|
|
100
|
-
obj[
|
|
99
|
+
if (data.hasOwnProperty("disabled")) {
|
|
100
|
+
obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
|
|
101
101
|
}
|
|
102
|
-
if (data.hasOwnProperty(
|
|
103
|
-
obj[
|
|
102
|
+
if (data.hasOwnProperty("fleet_filter")) {
|
|
103
|
+
obj["fleet_filter"] = _ApiClient["default"].convertToType(data["fleet_filter"], ["String"]);
|
|
104
104
|
}
|
|
105
|
-
if (data.hasOwnProperty(
|
|
106
|
-
obj[
|
|
105
|
+
if (data.hasOwnProperty("last_routed_at")) {
|
|
106
|
+
obj["last_routed_at"] = _ApiClient["default"].convertToType(data["last_routed_at"], "String");
|
|
107
107
|
}
|
|
108
|
-
if (data.hasOwnProperty(
|
|
109
|
-
obj[
|
|
108
|
+
if (data.hasOwnProperty("name")) {
|
|
109
|
+
obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
|
|
110
110
|
}
|
|
111
|
-
if (data.hasOwnProperty(
|
|
112
|
-
obj[
|
|
111
|
+
if (data.hasOwnProperty("notefile_filter")) {
|
|
112
|
+
obj["notefile_filter"] = _ApiClient["default"].convertToType(data["notefile_filter"], ["String"]);
|
|
113
113
|
}
|
|
114
|
-
if (data.hasOwnProperty(
|
|
115
|
-
obj[
|
|
114
|
+
if (data.hasOwnProperty("per_device")) {
|
|
115
|
+
obj["per_device"] = _ApiClient["default"].convertToType(data["per_device"], "Boolean");
|
|
116
116
|
}
|
|
117
|
-
if (data.hasOwnProperty(
|
|
118
|
-
obj[
|
|
117
|
+
if (data.hasOwnProperty("routing_cooldown_period")) {
|
|
118
|
+
obj["routing_cooldown_period"] = _ApiClient["default"].convertToType(data["routing_cooldown_period"], "String");
|
|
119
119
|
}
|
|
120
|
-
if (data.hasOwnProperty(
|
|
121
|
-
obj[
|
|
120
|
+
if (data.hasOwnProperty("silenced")) {
|
|
121
|
+
obj["silenced"] = _ApiClient["default"].convertToType(data["silenced"], "Boolean");
|
|
122
122
|
}
|
|
123
|
-
if (data.hasOwnProperty(
|
|
124
|
-
obj[
|
|
123
|
+
if (data.hasOwnProperty("source_selector")) {
|
|
124
|
+
obj["source_selector"] = _ApiClient["default"].convertToType(data["source_selector"], "String");
|
|
125
125
|
}
|
|
126
|
-
if (data.hasOwnProperty(
|
|
127
|
-
obj[
|
|
126
|
+
if (data.hasOwnProperty("source_type")) {
|
|
127
|
+
obj["source_type"] = _ApiClient["default"].convertToType(data["source_type"], "String");
|
|
128
128
|
}
|
|
129
|
-
if (data.hasOwnProperty(
|
|
130
|
-
obj[
|
|
129
|
+
if (data.hasOwnProperty("threshold")) {
|
|
130
|
+
obj["threshold"] = _ApiClient["default"].convertToType(data["threshold"], "Number");
|
|
131
131
|
}
|
|
132
|
-
if (data.hasOwnProperty(
|
|
133
|
-
obj[
|
|
132
|
+
if (data.hasOwnProperty("uid")) {
|
|
133
|
+
obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
|
|
134
|
+
}
|
|
135
|
+
if (data.hasOwnProperty("usage_scope")) {
|
|
136
|
+
obj["usage_scope"] = _ApiClient["default"].convertToType(data["usage_scope"], "String");
|
|
137
|
+
}
|
|
138
|
+
if (data.hasOwnProperty("usage_type")) {
|
|
139
|
+
obj["usage_type"] = _ApiClient["default"].convertToType(data["usage_type"], "String");
|
|
140
|
+
}
|
|
141
|
+
if (data.hasOwnProperty("usage_window")) {
|
|
142
|
+
obj["usage_window"] = _ApiClient["default"].convertToType(data["usage_window"], "Number");
|
|
134
143
|
}
|
|
135
144
|
} else if (data === null) {
|
|
136
145
|
return null;
|
|
@@ -162,21 +171,21 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
162
171
|
} finally {
|
|
163
172
|
_iterator.f();
|
|
164
173
|
}
|
|
165
|
-
if (data[
|
|
166
|
-
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data[
|
|
174
|
+
if (data["aggregate_function"] && !(typeof data["aggregate_function"] === "string" || data["aggregate_function"] instanceof String)) {
|
|
175
|
+
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data["aggregate_function"]);
|
|
167
176
|
}
|
|
168
177
|
// ensure the json data is a string
|
|
169
|
-
if (data[
|
|
170
|
-
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data[
|
|
178
|
+
if (data["aggregate_window"] && !(typeof data["aggregate_window"] === "string" || data["aggregate_window"] instanceof String)) {
|
|
179
|
+
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data["aggregate_window"]);
|
|
171
180
|
}
|
|
172
|
-
if (data[
|
|
181
|
+
if (data["alert_routes"]) {
|
|
173
182
|
// data not null
|
|
174
183
|
// ensure the json data is an array
|
|
175
|
-
if (!Array.isArray(data[
|
|
176
|
-
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data[
|
|
184
|
+
if (!Array.isArray(data["alert_routes"])) {
|
|
185
|
+
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data["alert_routes"]);
|
|
177
186
|
}
|
|
178
187
|
// validate the optional field `alert_routes` (array)
|
|
179
|
-
var _iterator2 = _createForOfIteratorHelper(data[
|
|
188
|
+
var _iterator2 = _createForOfIteratorHelper(data["alert_routes"]),
|
|
180
189
|
_step2;
|
|
181
190
|
try {
|
|
182
191
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -188,47 +197,54 @@ var CreateMonitor = /*#__PURE__*/function () {
|
|
|
188
197
|
} finally {
|
|
189
198
|
_iterator2.f();
|
|
190
199
|
}
|
|
191
|
-
;
|
|
192
200
|
}
|
|
193
201
|
// ensure the json data is a string
|
|
194
|
-
if (data[
|
|
195
|
-
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data[
|
|
202
|
+
if (data["condition_type"] && !(typeof data["condition_type"] === "string" || data["condition_type"] instanceof String)) {
|
|
203
|
+
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data["condition_type"]);
|
|
196
204
|
}
|
|
197
205
|
// ensure the json data is a string
|
|
198
|
-
if (data[
|
|
199
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data[
|
|
206
|
+
if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
|
|
207
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
|
|
200
208
|
}
|
|
201
209
|
// ensure the json data is an array
|
|
202
|
-
if (!Array.isArray(data[
|
|
203
|
-
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data[
|
|
210
|
+
if (!Array.isArray(data["fleet_filter"])) {
|
|
211
|
+
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data["fleet_filter"]);
|
|
204
212
|
}
|
|
205
213
|
// ensure the json data is a string
|
|
206
|
-
if (data[
|
|
207
|
-
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data[
|
|
214
|
+
if (data["last_routed_at"] && !(typeof data["last_routed_at"] === "string" || data["last_routed_at"] instanceof String)) {
|
|
215
|
+
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data["last_routed_at"]);
|
|
208
216
|
}
|
|
209
217
|
// ensure the json data is a string
|
|
210
|
-
if (data[
|
|
211
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data[
|
|
218
|
+
if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
|
|
219
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
|
|
212
220
|
}
|
|
213
221
|
// ensure the json data is an array
|
|
214
|
-
if (!Array.isArray(data[
|
|
215
|
-
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data[
|
|
222
|
+
if (!Array.isArray(data["notefile_filter"])) {
|
|
223
|
+
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data["notefile_filter"]);
|
|
216
224
|
}
|
|
217
225
|
// ensure the json data is a string
|
|
218
|
-
if (data[
|
|
219
|
-
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data[
|
|
226
|
+
if (data["routing_cooldown_period"] && !(typeof data["routing_cooldown_period"] === "string" || data["routing_cooldown_period"] instanceof String)) {
|
|
227
|
+
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data["routing_cooldown_period"]);
|
|
220
228
|
}
|
|
221
229
|
// ensure the json data is a string
|
|
222
|
-
if (data[
|
|
223
|
-
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data[
|
|
230
|
+
if (data["source_selector"] && !(typeof data["source_selector"] === "string" || data["source_selector"] instanceof String)) {
|
|
231
|
+
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data["source_selector"]);
|
|
224
232
|
}
|
|
225
233
|
// ensure the json data is a string
|
|
226
|
-
if (data[
|
|
227
|
-
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data[
|
|
234
|
+
if (data["source_type"] && !(typeof data["source_type"] === "string" || data["source_type"] instanceof String)) {
|
|
235
|
+
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data["source_type"]);
|
|
228
236
|
}
|
|
229
237
|
// ensure the json data is a string
|
|
230
|
-
if (data[
|
|
231
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
238
|
+
if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
|
|
239
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
|
|
240
|
+
}
|
|
241
|
+
// ensure the json data is a string
|
|
242
|
+
if (data["usage_scope"] && !(typeof data["usage_scope"] === "string" || data["usage_scope"] instanceof String)) {
|
|
243
|
+
throw new Error("Expected the field `usage_scope` to be a primitive type in the JSON string but got " + data["usage_scope"]);
|
|
244
|
+
}
|
|
245
|
+
// ensure the json data is a string
|
|
246
|
+
if (data["usage_type"] && !(typeof data["usage_type"] === "string" || data["usage_type"] instanceof String)) {
|
|
247
|
+
throw new Error("Expected the field `usage_type` to be a primitive type in the JSON string but got " + data["usage_type"]);
|
|
232
248
|
}
|
|
233
249
|
return true;
|
|
234
250
|
}
|
|
@@ -240,221 +256,254 @@ CreateMonitor.RequiredProperties = ["alert_routes", "description", "name", "sour
|
|
|
240
256
|
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
241
257
|
* @member {module:model/CreateMonitor.AggregateFunctionEnum} aggregate_function
|
|
242
258
|
*/
|
|
243
|
-
CreateMonitor.prototype[
|
|
259
|
+
CreateMonitor.prototype["aggregate_function"] = undefined;
|
|
244
260
|
|
|
245
261
|
/**
|
|
246
262
|
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
247
263
|
* @member {String} aggregate_window
|
|
248
264
|
*/
|
|
249
|
-
CreateMonitor.prototype[
|
|
265
|
+
CreateMonitor.prototype["aggregate_window"] = undefined;
|
|
250
266
|
|
|
251
267
|
/**
|
|
252
268
|
* If true, the monitor is in alert state.
|
|
253
269
|
* @member {Boolean} alert
|
|
254
270
|
*/
|
|
255
|
-
CreateMonitor.prototype[
|
|
271
|
+
CreateMonitor.prototype["alert"] = undefined;
|
|
256
272
|
|
|
257
273
|
/**
|
|
258
274
|
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
259
275
|
*/
|
|
260
|
-
CreateMonitor.prototype[
|
|
276
|
+
CreateMonitor.prototype["alert_routes"] = undefined;
|
|
261
277
|
|
|
262
278
|
/**
|
|
263
279
|
* 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]
|
|
264
280
|
* @member {module:model/CreateMonitor.ConditionTypeEnum} condition_type
|
|
265
281
|
*/
|
|
266
|
-
CreateMonitor.prototype[
|
|
282
|
+
CreateMonitor.prototype["condition_type"] = undefined;
|
|
267
283
|
|
|
268
284
|
/**
|
|
269
285
|
* @member {String} description
|
|
270
286
|
*/
|
|
271
|
-
CreateMonitor.prototype[
|
|
287
|
+
CreateMonitor.prototype["description"] = undefined;
|
|
272
288
|
|
|
273
289
|
/**
|
|
274
290
|
* If true, the monitor will not be evaluated.
|
|
275
291
|
* @member {Boolean} disabled
|
|
276
292
|
*/
|
|
277
|
-
CreateMonitor.prototype[
|
|
293
|
+
CreateMonitor.prototype["disabled"] = undefined;
|
|
278
294
|
|
|
279
295
|
/**
|
|
280
296
|
* @member {Array.<String>} fleet_filter
|
|
281
297
|
*/
|
|
282
|
-
CreateMonitor.prototype[
|
|
298
|
+
CreateMonitor.prototype["fleet_filter"] = undefined;
|
|
283
299
|
|
|
284
300
|
/**
|
|
285
301
|
* The last time the monitor was evaluated and routed.
|
|
286
302
|
* @member {String} last_routed_at
|
|
287
303
|
*/
|
|
288
|
-
CreateMonitor.prototype[
|
|
304
|
+
CreateMonitor.prototype["last_routed_at"] = undefined;
|
|
289
305
|
|
|
290
306
|
/**
|
|
291
307
|
* @member {String} name
|
|
292
308
|
*/
|
|
293
|
-
CreateMonitor.prototype[
|
|
309
|
+
CreateMonitor.prototype["name"] = undefined;
|
|
294
310
|
|
|
295
311
|
/**
|
|
296
312
|
* @member {Array.<String>} notefile_filter
|
|
297
313
|
*/
|
|
298
|
-
CreateMonitor.prototype[
|
|
314
|
+
CreateMonitor.prototype["notefile_filter"] = undefined;
|
|
299
315
|
|
|
300
316
|
/**
|
|
301
317
|
* 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.
|
|
302
318
|
* @member {Boolean} per_device
|
|
303
319
|
*/
|
|
304
|
-
CreateMonitor.prototype[
|
|
320
|
+
CreateMonitor.prototype["per_device"] = undefined;
|
|
305
321
|
|
|
306
322
|
/**
|
|
307
323
|
* 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.
|
|
308
324
|
* @member {String} routing_cooldown_period
|
|
309
325
|
*/
|
|
310
|
-
CreateMonitor.prototype[
|
|
326
|
+
CreateMonitor.prototype["routing_cooldown_period"] = undefined;
|
|
311
327
|
|
|
312
328
|
/**
|
|
313
329
|
* If true, alerts will be created, but no notifications will be sent.
|
|
314
330
|
* @member {Boolean} silenced
|
|
315
331
|
*/
|
|
316
|
-
CreateMonitor.prototype[
|
|
332
|
+
CreateMonitor.prototype["silenced"] = undefined;
|
|
317
333
|
|
|
318
334
|
/**
|
|
319
335
|
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
320
336
|
* @member {String} source_selector
|
|
321
337
|
*/
|
|
322
|
-
CreateMonitor.prototype[
|
|
338
|
+
CreateMonitor.prototype["source_selector"] = undefined;
|
|
323
339
|
|
|
324
340
|
/**
|
|
325
341
|
* The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
|
|
326
342
|
* @member {module:model/CreateMonitor.SourceTypeEnum} source_type
|
|
327
343
|
*/
|
|
328
|
-
CreateMonitor.prototype[
|
|
344
|
+
CreateMonitor.prototype["source_type"] = undefined;
|
|
329
345
|
|
|
330
346
|
/**
|
|
331
347
|
* The type of condition to apply to the value selected by the source_selector
|
|
332
348
|
* @member {Number} threshold
|
|
333
349
|
*/
|
|
334
|
-
CreateMonitor.prototype[
|
|
350
|
+
CreateMonitor.prototype["threshold"] = undefined;
|
|
335
351
|
|
|
336
352
|
/**
|
|
337
353
|
* @member {String} uid
|
|
338
354
|
*/
|
|
339
|
-
CreateMonitor.prototype[
|
|
355
|
+
CreateMonitor.prototype["uid"] = undefined;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\".
|
|
359
|
+
* @member {String} usage_scope
|
|
360
|
+
*/
|
|
361
|
+
CreateMonitor.prototype["usage_scope"] = undefined;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\".
|
|
365
|
+
* @member {String} usage_type
|
|
366
|
+
*/
|
|
367
|
+
CreateMonitor.prototype["usage_type"] = undefined;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).
|
|
371
|
+
* @member {Number} usage_window
|
|
372
|
+
*/
|
|
373
|
+
CreateMonitor.prototype["usage_window"] = undefined;
|
|
340
374
|
|
|
341
375
|
// Implement Monitor interface:
|
|
342
376
|
/**
|
|
343
377
|
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
344
378
|
* @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
|
|
345
379
|
*/
|
|
346
|
-
_Monitor["default"].prototype[
|
|
380
|
+
_Monitor["default"].prototype["aggregate_function"] = undefined;
|
|
347
381
|
/**
|
|
348
382
|
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
349
383
|
* @member {String} aggregate_window
|
|
350
384
|
*/
|
|
351
|
-
_Monitor["default"].prototype[
|
|
385
|
+
_Monitor["default"].prototype["aggregate_window"] = undefined;
|
|
352
386
|
/**
|
|
353
387
|
* If true, the monitor is in alert state.
|
|
354
388
|
* @member {Boolean} alert
|
|
355
389
|
*/
|
|
356
|
-
_Monitor["default"].prototype[
|
|
390
|
+
_Monitor["default"].prototype["alert"] = undefined;
|
|
357
391
|
/**
|
|
358
392
|
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
359
393
|
*/
|
|
360
|
-
_Monitor["default"].prototype[
|
|
394
|
+
_Monitor["default"].prototype["alert_routes"] = undefined;
|
|
361
395
|
/**
|
|
362
396
|
* 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]
|
|
363
397
|
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
364
398
|
*/
|
|
365
|
-
_Monitor["default"].prototype[
|
|
399
|
+
_Monitor["default"].prototype["condition_type"] = undefined;
|
|
366
400
|
/**
|
|
367
401
|
* @member {String} description
|
|
368
402
|
*/
|
|
369
|
-
_Monitor["default"].prototype[
|
|
403
|
+
_Monitor["default"].prototype["description"] = undefined;
|
|
370
404
|
/**
|
|
371
405
|
* If true, the monitor will not be evaluated.
|
|
372
406
|
* @member {Boolean} disabled
|
|
373
407
|
*/
|
|
374
|
-
_Monitor["default"].prototype[
|
|
408
|
+
_Monitor["default"].prototype["disabled"] = undefined;
|
|
375
409
|
/**
|
|
376
410
|
* @member {Array.<String>} fleet_filter
|
|
377
411
|
*/
|
|
378
|
-
_Monitor["default"].prototype[
|
|
412
|
+
_Monitor["default"].prototype["fleet_filter"] = undefined;
|
|
379
413
|
/**
|
|
380
414
|
* The last time the monitor was evaluated and routed.
|
|
381
415
|
* @member {String} last_routed_at
|
|
382
416
|
*/
|
|
383
|
-
_Monitor["default"].prototype[
|
|
417
|
+
_Monitor["default"].prototype["last_routed_at"] = undefined;
|
|
384
418
|
/**
|
|
385
419
|
* @member {String} name
|
|
386
420
|
*/
|
|
387
|
-
_Monitor["default"].prototype[
|
|
421
|
+
_Monitor["default"].prototype["name"] = undefined;
|
|
388
422
|
/**
|
|
389
423
|
* @member {Array.<String>} notefile_filter
|
|
390
424
|
*/
|
|
391
|
-
_Monitor["default"].prototype[
|
|
425
|
+
_Monitor["default"].prototype["notefile_filter"] = undefined;
|
|
392
426
|
/**
|
|
393
427
|
* 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.
|
|
394
428
|
* @member {Boolean} per_device
|
|
395
429
|
*/
|
|
396
|
-
_Monitor["default"].prototype[
|
|
430
|
+
_Monitor["default"].prototype["per_device"] = undefined;
|
|
397
431
|
/**
|
|
398
432
|
* 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.
|
|
399
433
|
* @member {String} routing_cooldown_period
|
|
400
434
|
*/
|
|
401
|
-
_Monitor["default"].prototype[
|
|
435
|
+
_Monitor["default"].prototype["routing_cooldown_period"] = undefined;
|
|
402
436
|
/**
|
|
403
437
|
* If true, alerts will be created, but no notifications will be sent.
|
|
404
438
|
* @member {Boolean} silenced
|
|
405
439
|
*/
|
|
406
|
-
_Monitor["default"].prototype[
|
|
440
|
+
_Monitor["default"].prototype["silenced"] = undefined;
|
|
407
441
|
/**
|
|
408
442
|
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
409
443
|
* @member {String} source_selector
|
|
410
444
|
*/
|
|
411
|
-
_Monitor["default"].prototype[
|
|
445
|
+
_Monitor["default"].prototype["source_selector"] = undefined;
|
|
412
446
|
/**
|
|
413
447
|
* The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
|
|
414
448
|
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
415
449
|
*/
|
|
416
|
-
_Monitor["default"].prototype[
|
|
450
|
+
_Monitor["default"].prototype["source_type"] = undefined;
|
|
417
451
|
/**
|
|
418
452
|
* The type of condition to apply to the value selected by the source_selector
|
|
419
453
|
* @member {Number} threshold
|
|
420
454
|
*/
|
|
421
|
-
_Monitor["default"].prototype[
|
|
455
|
+
_Monitor["default"].prototype["threshold"] = undefined;
|
|
422
456
|
/**
|
|
423
457
|
* @member {String} uid
|
|
424
458
|
*/
|
|
425
|
-
_Monitor["default"].prototype[
|
|
459
|
+
_Monitor["default"].prototype["uid"] = undefined;
|
|
460
|
+
/**
|
|
461
|
+
* For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\".
|
|
462
|
+
* @member {String} usage_scope
|
|
463
|
+
*/
|
|
464
|
+
_Monitor["default"].prototype["usage_scope"] = undefined;
|
|
465
|
+
/**
|
|
466
|
+
* For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\".
|
|
467
|
+
* @member {String} usage_type
|
|
468
|
+
*/
|
|
469
|
+
_Monitor["default"].prototype["usage_type"] = undefined;
|
|
470
|
+
/**
|
|
471
|
+
* For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).
|
|
472
|
+
* @member {Number} usage_window
|
|
473
|
+
*/
|
|
474
|
+
_Monitor["default"].prototype["usage_window"] = undefined;
|
|
426
475
|
|
|
427
476
|
/**
|
|
428
477
|
* Allowed values for the <code>aggregate_function</code> property.
|
|
429
478
|
* @enum {String}
|
|
430
479
|
* @readonly
|
|
431
480
|
*/
|
|
432
|
-
CreateMonitor[
|
|
481
|
+
CreateMonitor["AggregateFunctionEnum"] = {
|
|
433
482
|
/**
|
|
434
483
|
* value: "none"
|
|
435
484
|
* @const
|
|
436
485
|
*/
|
|
437
|
-
|
|
486
|
+
none: "none",
|
|
438
487
|
/**
|
|
439
488
|
* value: "sum"
|
|
440
489
|
* @const
|
|
441
490
|
*/
|
|
442
|
-
|
|
491
|
+
sum: "sum",
|
|
443
492
|
/**
|
|
444
493
|
* value: "average"
|
|
445
494
|
* @const
|
|
446
495
|
*/
|
|
447
|
-
|
|
496
|
+
average: "average",
|
|
448
497
|
/**
|
|
449
498
|
* value: "max"
|
|
450
499
|
* @const
|
|
451
500
|
*/
|
|
452
|
-
|
|
501
|
+
max: "max",
|
|
453
502
|
/**
|
|
454
503
|
* value: "min"
|
|
455
504
|
* @const
|
|
456
505
|
*/
|
|
457
|
-
|
|
506
|
+
min: "min"
|
|
458
507
|
};
|
|
459
508
|
|
|
460
509
|
/**
|
|
@@ -462,42 +511,42 @@ CreateMonitor['AggregateFunctionEnum'] = {
|
|
|
462
511
|
* @enum {String}
|
|
463
512
|
* @readonly
|
|
464
513
|
*/
|
|
465
|
-
CreateMonitor[
|
|
514
|
+
CreateMonitor["ConditionTypeEnum"] = {
|
|
466
515
|
/**
|
|
467
516
|
* value: "greater_than"
|
|
468
517
|
* @const
|
|
469
518
|
*/
|
|
470
|
-
|
|
519
|
+
greater_than: "greater_than",
|
|
471
520
|
/**
|
|
472
521
|
* value: "greater_than_or_equal_to"
|
|
473
522
|
* @const
|
|
474
523
|
*/
|
|
475
|
-
|
|
524
|
+
greater_than_or_equal_to: "greater_than_or_equal_to",
|
|
476
525
|
/**
|
|
477
526
|
* value: "less_than"
|
|
478
527
|
* @const
|
|
479
528
|
*/
|
|
480
|
-
|
|
529
|
+
less_than: "less_than",
|
|
481
530
|
/**
|
|
482
531
|
* value: "less_than_or_equal_to"
|
|
483
532
|
* @const
|
|
484
533
|
*/
|
|
485
|
-
|
|
534
|
+
less_than_or_equal_to: "less_than_or_equal_to",
|
|
486
535
|
/**
|
|
487
536
|
* value: "equal_to"
|
|
488
537
|
* @const
|
|
489
538
|
*/
|
|
490
|
-
|
|
539
|
+
equal_to: "equal_to",
|
|
491
540
|
/**
|
|
492
541
|
* value: "not_equal_to"
|
|
493
542
|
* @const
|
|
494
543
|
*/
|
|
495
|
-
|
|
544
|
+
not_equal_to: "not_equal_to",
|
|
496
545
|
/**
|
|
497
546
|
* value: "count"
|
|
498
547
|
* @const
|
|
499
548
|
*/
|
|
500
|
-
|
|
549
|
+
count: "count"
|
|
501
550
|
};
|
|
502
551
|
|
|
503
552
|
/**
|
|
@@ -505,16 +554,16 @@ CreateMonitor['ConditionTypeEnum'] = {
|
|
|
505
554
|
* @enum {String}
|
|
506
555
|
* @readonly
|
|
507
556
|
*/
|
|
508
|
-
CreateMonitor[
|
|
557
|
+
CreateMonitor["SourceTypeEnum"] = {
|
|
509
558
|
/**
|
|
510
559
|
* value: "event"
|
|
511
560
|
* @const
|
|
512
561
|
*/
|
|
513
|
-
|
|
562
|
+
event: "event",
|
|
514
563
|
/**
|
|
515
564
|
* value: "heartbeat"
|
|
516
565
|
* @const
|
|
517
566
|
*/
|
|
518
|
-
|
|
567
|
+
heartbeat: "heartbeat"
|
|
519
568
|
};
|
|
520
569
|
var _default = exports["default"] = CreateMonitor;
|