@blues-inc/notehub-js 4.0.0-beta.9 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.md +244 -248
  2. package/dist/ApiClient.js +150 -150
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +31 -31
  5. package/dist/api/BillingAccountApi.js +14 -14
  6. package/dist/api/DeviceApi.js +359 -359
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/MonitorApi.js +52 -52
  10. package/dist/api/ProjectApi.js +387 -381
  11. package/dist/api/RouteApi.js +83 -77
  12. package/dist/api/UsageApi.js +63 -63
  13. package/dist/api/WebhookApi.js +51 -51
  14. package/dist/index.js +7 -0
  15. package/dist/model/AddDeviceToFleetsRequest.js +8 -8
  16. package/dist/model/Alert.js +74 -76
  17. package/dist/model/AlertDataInner.js +36 -36
  18. package/dist/model/AlertNotificationsInner.js +18 -18
  19. package/dist/model/AwsRoute.js +65 -65
  20. package/dist/model/AzureRoute.js +43 -43
  21. package/dist/model/BillingAccount.js +21 -21
  22. package/dist/model/BillingAccountRole.js +9 -9
  23. package/dist/model/BlynkRoute.js +28 -28
  24. package/dist/model/Body.js +5 -5
  25. package/dist/model/CellularPlan.js +34 -34
  26. package/dist/model/CloneProjectRequest.js +20 -20
  27. package/dist/model/Contact.js +22 -22
  28. package/dist/model/CreateFleetRequest.js +20 -20
  29. package/dist/model/CreateMonitor.js +126 -127
  30. package/dist/model/CreateProductRequest.js +22 -22
  31. package/dist/model/CreateProjectRequest.js +16 -16
  32. package/dist/model/CreateUpdateRepository.js +17 -17
  33. package/dist/model/CurrentFirmware.js +12 -12
  34. package/dist/model/DFUEnv.js +12 -12
  35. package/dist/model/DFUState.js +65 -65
  36. package/dist/model/DataField.js +7 -7
  37. package/dist/model/DataSetField.js +19 -19
  38. package/dist/model/DataUsage.js +14 -14
  39. package/dist/model/DatacakeRoute.js +35 -35
  40. package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
  41. package/dist/model/DeleteNotefilesRequest.js +7 -7
  42. package/dist/model/Device.js +106 -107
  43. package/dist/model/DeviceDfuHistory.js +19 -20
  44. package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
  45. package/dist/model/DeviceDfuHistoryPage.js +12 -13
  46. package/dist/model/DeviceDfuStateMachine.js +24 -25
  47. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  48. package/dist/model/DeviceDfuStatus.js +20 -20
  49. package/dist/model/DeviceDfuStatusPage.js +12 -13
  50. package/dist/model/DeviceSession.js +221 -221
  51. package/dist/model/DeviceTowerInfo.js +14 -14
  52. package/dist/model/DeviceUsage.js +32 -32
  53. package/dist/model/DfuActionRequest.js +7 -7
  54. package/dist/model/EmailNotification.js +7 -7
  55. package/dist/model/EnvTreeJsonNode.js +67 -69
  56. package/dist/model/EnvVar.js +18 -18
  57. package/dist/model/EnvironmentVariables.js +8 -8
  58. package/dist/model/Error.js +31 -31
  59. package/dist/model/Event.js +248 -248
  60. package/dist/model/Filter.js +16 -16
  61. package/dist/model/Firmware.js +49 -49
  62. package/dist/model/FirmwareInfo.js +60 -60
  63. package/dist/model/Fleet.js +38 -38
  64. package/dist/model/FleetConnectivityAssurance.js +5 -5
  65. package/dist/model/GetAlerts200Response.js +14 -15
  66. package/dist/model/GetBillingAccounts200Response.js +9 -10
  67. package/dist/model/GetDataUsage200Response.js +9 -10
  68. package/dist/model/GetDataUsage200ResponseDataInner.js +43 -57
  69. package/dist/model/GetDbNote200Response.js +13 -13
  70. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
  71. package/dist/model/GetDeviceFleets200Response.js +11 -12
  72. package/dist/model/GetDeviceHealthLog200Response.js +11 -12
  73. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  74. package/dist/model/GetDeviceLatestEvents200Response.js +9 -10
  75. package/dist/model/GetDevicePlans200Response.js +9 -40
  76. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  77. package/dist/model/GetDevicePublicKeys200Response.js +16 -17
  78. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  79. package/dist/model/GetDeviceSessions200Response.js +16 -17
  80. package/dist/model/GetDevices200Response.js +16 -17
  81. package/dist/model/GetEvents200Response.js +20 -21
  82. package/dist/model/GetEventsByCursor200Response.js +23 -24
  83. package/dist/model/GetNotefile200Response.js +11 -11
  84. package/dist/model/GetProducts200Response.js +9 -10
  85. package/dist/model/GetProjectMembers200Response.js +11 -12
  86. package/dist/model/GetProjects200Response.js +9 -10
  87. package/dist/model/GetRouteLogsUsage200Response.js +11 -12
  88. package/dist/model/GetSessionsUsage200Response.js +11 -12
  89. package/dist/model/GetWebhooks200Response.js +9 -10
  90. package/dist/model/GoogleRoute.js +33 -33
  91. package/dist/model/HttpRoute.js +35 -35
  92. package/dist/model/Location.js +40 -40
  93. package/dist/model/Login200Response.js +7 -7
  94. package/dist/model/LoginRequest.js +12 -12
  95. package/dist/model/Monitor.js +100 -101
  96. package/dist/model/MonitorAlertRoutesInner.js +10 -9
  97. package/dist/model/MqttRoute.js +68 -68
  98. package/dist/model/Note.js +31 -31
  99. package/dist/model/NoteInput.js +9 -9
  100. package/dist/model/Notefile.js +22 -23
  101. package/dist/model/NotefileSchema.js +18 -19
  102. package/dist/model/NotehubRoute.js +103 -103
  103. package/dist/model/NotehubRouteSummary.js +23 -23
  104. package/dist/model/OAuth2Error.js +20 -20
  105. package/dist/model/OAuth2TokenResponse.js +23 -23
  106. package/dist/model/PersonalAccessToken.js +34 -34
  107. package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
  108. package/dist/model/PersonalAccessTokenInfo.js +18 -18
  109. package/dist/model/PersonalAccessTokenSecret.js +12 -12
  110. package/dist/model/Product.js +26 -26
  111. package/dist/model/Project.js +34 -34
  112. package/dist/model/ProjectMember.js +22 -22
  113. package/dist/model/ProvisionDeviceRequest.js +18 -18
  114. package/dist/model/ProxyRoute.js +29 -29
  115. package/dist/model/QubitroRoute.js +33 -33
  116. package/dist/model/RadRoute.js +31 -31
  117. package/dist/model/Repository.js +22 -22
  118. package/dist/model/Role.js +9 -9
  119. package/dist/model/RouteLog.js +38 -38
  120. package/dist/model/RouteTransformSettings.js +18 -18
  121. package/dist/model/S3ArchiveRoute.js +79 -79
  122. package/dist/model/SatelliteDataUsage.js +144 -0
  123. package/dist/model/SatellitePlan.js +39 -39
  124. package/dist/model/SchemaProperty.js +36 -38
  125. package/dist/model/SignalDevice200Response.js +5 -5
  126. package/dist/model/SimUsage.js +19 -19
  127. package/dist/model/SlackBearerNotification.js +25 -25
  128. package/dist/model/SlackRoute.js +48 -48
  129. package/dist/model/SlackWebHookNotification.js +20 -20
  130. package/dist/model/SnowflakeRoute.js +45 -45
  131. package/dist/model/SnowpipeStreamingRoute.js +60 -60
  132. package/dist/model/ThingworxRoute.js +33 -33
  133. package/dist/model/TowerLocation.js +54 -54
  134. package/dist/model/TwilioRoute.js +43 -43
  135. package/dist/model/UpdateFleetRequest.js +33 -33
  136. package/dist/model/UploadMetadata.js +64 -64
  137. package/dist/model/UsageData.js +33 -33
  138. package/dist/model/UsageEventsData.js +37 -37
  139. package/dist/model/UsageEventsResponse.js +11 -12
  140. package/dist/model/UsageRouteLogsData.js +27 -27
  141. package/dist/model/UsageSessionsData.js +32 -32
  142. package/dist/model/UserDfuStateMachine.js +20 -20
  143. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  144. package/dist/model/UserFirmwareInfo.js +12 -12
  145. package/dist/model/WebhookSettings.js +15 -15
  146. 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 4.0.0-beta.9
34
+ * @version 5.0.0
35
35
  */
36
36
  var CreateMonitor = /*#__PURE__*/function () {
37
37
  /**
38
38
  * Constructs a new <code>CreateMonitor</code>.
39
39
  * @alias module:model/CreateMonitor
40
40
  * @implements module:model/Monitor
41
- * @param alertRoutes {Array.<module:model/MonitorAlertRoutesInner>}
42
- * @param description {String}
43
- * @param name {String}
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['alert_routes'] = alertRoutes;
62
- obj['description'] = description;
63
- obj['name'] = name;
64
- obj['source_type'] = sourceType;
65
- obj['threshold'] = threshold;
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,59 @@ 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('aggregate_function')) {
82
- obj['aggregate_function'] = _ApiClient["default"].convertToType(data['aggregate_function'], 'String');
81
+ if (data.hasOwnProperty("aggregate_function")) {
82
+ obj["aggregate_function"] = _ApiClient["default"].convertToType(data["aggregate_function"], "String");
83
83
  }
84
- if (data.hasOwnProperty('aggregate_window')) {
85
- obj['aggregate_window'] = _ApiClient["default"].convertToType(data['aggregate_window'], 'String');
84
+ if (data.hasOwnProperty("aggregate_window")) {
85
+ obj["aggregate_window"] = _ApiClient["default"].convertToType(data["aggregate_window"], "String");
86
86
  }
87
- if (data.hasOwnProperty('alert')) {
88
- obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
87
+ if (data.hasOwnProperty("alert")) {
88
+ obj["alert"] = _ApiClient["default"].convertToType(data["alert"], "Boolean");
89
89
  }
90
- if (data.hasOwnProperty('alert_routes')) {
91
- obj['alert_routes'] = _ApiClient["default"].convertToType(data['alert_routes'], [_MonitorAlertRoutesInner["default"]]);
90
+ if (data.hasOwnProperty("alert_routes")) {
91
+ obj["alert_routes"] = _ApiClient["default"].convertToType(data["alert_routes"], [_MonitorAlertRoutesInner["default"]]);
92
92
  }
93
- if (data.hasOwnProperty('condition_type')) {
94
- obj['condition_type'] = _ApiClient["default"].convertToType(data['condition_type'], 'String');
93
+ if (data.hasOwnProperty("condition_type")) {
94
+ obj["condition_type"] = _ApiClient["default"].convertToType(data["condition_type"], "String");
95
95
  }
96
- if (data.hasOwnProperty('description')) {
97
- obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
96
+ if (data.hasOwnProperty("description")) {
97
+ obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
98
98
  }
99
- if (data.hasOwnProperty('disabled')) {
100
- obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
99
+ if (data.hasOwnProperty("disabled")) {
100
+ obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
101
101
  }
102
- if (data.hasOwnProperty('fleet_filter')) {
103
- obj['fleet_filter'] = _ApiClient["default"].convertToType(data['fleet_filter'], ['String']);
102
+ if (data.hasOwnProperty("fleet_filter")) {
103
+ obj["fleet_filter"] = _ApiClient["default"].convertToType(data["fleet_filter"], ["String"]);
104
104
  }
105
- if (data.hasOwnProperty('last_routed_at')) {
106
- obj['last_routed_at'] = _ApiClient["default"].convertToType(data['last_routed_at'], 'String');
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('name')) {
109
- obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
108
+ if (data.hasOwnProperty("name")) {
109
+ obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
110
110
  }
111
- if (data.hasOwnProperty('notefile_filter')) {
112
- obj['notefile_filter'] = _ApiClient["default"].convertToType(data['notefile_filter'], ['String']);
111
+ if (data.hasOwnProperty("notefile_filter")) {
112
+ obj["notefile_filter"] = _ApiClient["default"].convertToType(data["notefile_filter"], ["String"]);
113
113
  }
114
- if (data.hasOwnProperty('per_device')) {
115
- obj['per_device'] = _ApiClient["default"].convertToType(data['per_device'], 'Boolean');
114
+ if (data.hasOwnProperty("per_device")) {
115
+ obj["per_device"] = _ApiClient["default"].convertToType(data["per_device"], "Boolean");
116
116
  }
117
- if (data.hasOwnProperty('routing_cooldown_period')) {
118
- obj['routing_cooldown_period'] = _ApiClient["default"].convertToType(data['routing_cooldown_period'], 'String');
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('silenced')) {
121
- obj['silenced'] = _ApiClient["default"].convertToType(data['silenced'], 'Boolean');
120
+ if (data.hasOwnProperty("silenced")) {
121
+ obj["silenced"] = _ApiClient["default"].convertToType(data["silenced"], "Boolean");
122
122
  }
123
- if (data.hasOwnProperty('source_selector')) {
124
- obj['source_selector'] = _ApiClient["default"].convertToType(data['source_selector'], 'String');
123
+ if (data.hasOwnProperty("source_selector")) {
124
+ obj["source_selector"] = _ApiClient["default"].convertToType(data["source_selector"], "String");
125
125
  }
126
- if (data.hasOwnProperty('source_type')) {
127
- obj['source_type'] = _ApiClient["default"].convertToType(data['source_type'], 'String');
126
+ if (data.hasOwnProperty("source_type")) {
127
+ obj["source_type"] = _ApiClient["default"].convertToType(data["source_type"], "String");
128
128
  }
129
- if (data.hasOwnProperty('threshold')) {
130
- obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number');
129
+ if (data.hasOwnProperty("threshold")) {
130
+ obj["threshold"] = _ApiClient["default"].convertToType(data["threshold"], "Number");
131
131
  }
132
- if (data.hasOwnProperty('uid')) {
133
- obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
132
+ if (data.hasOwnProperty("uid")) {
133
+ obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
134
134
  }
135
135
  } else if (data === null) {
136
136
  return null;
@@ -162,21 +162,21 @@ var CreateMonitor = /*#__PURE__*/function () {
162
162
  } finally {
163
163
  _iterator.f();
164
164
  }
165
- if (data['aggregate_function'] && !(typeof data['aggregate_function'] === 'string' || data['aggregate_function'] instanceof String)) {
166
- throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data['aggregate_function']);
165
+ if (data["aggregate_function"] && !(typeof data["aggregate_function"] === "string" || data["aggregate_function"] instanceof String)) {
166
+ throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data["aggregate_function"]);
167
167
  }
168
168
  // ensure the json data is a string
169
- if (data['aggregate_window'] && !(typeof data['aggregate_window'] === 'string' || data['aggregate_window'] instanceof String)) {
170
- throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data['aggregate_window']);
169
+ if (data["aggregate_window"] && !(typeof data["aggregate_window"] === "string" || data["aggregate_window"] instanceof String)) {
170
+ throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data["aggregate_window"]);
171
171
  }
172
- if (data['alert_routes']) {
172
+ if (data["alert_routes"]) {
173
173
  // data not null
174
174
  // ensure the json data is an array
175
- if (!Array.isArray(data['alert_routes'])) {
176
- throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data['alert_routes']);
175
+ if (!Array.isArray(data["alert_routes"])) {
176
+ throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data["alert_routes"]);
177
177
  }
178
178
  // validate the optional field `alert_routes` (array)
179
- var _iterator2 = _createForOfIteratorHelper(data['alert_routes']),
179
+ var _iterator2 = _createForOfIteratorHelper(data["alert_routes"]),
180
180
  _step2;
181
181
  try {
182
182
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -188,47 +188,46 @@ var CreateMonitor = /*#__PURE__*/function () {
188
188
  } finally {
189
189
  _iterator2.f();
190
190
  }
191
- ;
192
191
  }
193
192
  // ensure the json data is a string
194
- if (data['condition_type'] && !(typeof data['condition_type'] === 'string' || data['condition_type'] instanceof String)) {
195
- throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data['condition_type']);
193
+ if (data["condition_type"] && !(typeof data["condition_type"] === "string" || data["condition_type"] instanceof String)) {
194
+ throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data["condition_type"]);
196
195
  }
197
196
  // ensure the json data is a string
198
- if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
199
- throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
197
+ if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
198
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
200
199
  }
201
200
  // ensure the json data is an array
202
- if (!Array.isArray(data['fleet_filter'])) {
203
- throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data['fleet_filter']);
201
+ if (!Array.isArray(data["fleet_filter"])) {
202
+ throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data["fleet_filter"]);
204
203
  }
205
204
  // ensure the json data is a string
206
- if (data['last_routed_at'] && !(typeof data['last_routed_at'] === 'string' || data['last_routed_at'] instanceof String)) {
207
- throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data['last_routed_at']);
205
+ if (data["last_routed_at"] && !(typeof data["last_routed_at"] === "string" || data["last_routed_at"] instanceof String)) {
206
+ 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
207
  }
209
208
  // ensure the json data is a string
210
- if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
211
- throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
209
+ if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
210
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
212
211
  }
213
212
  // ensure the json data is an array
214
- if (!Array.isArray(data['notefile_filter'])) {
215
- throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data['notefile_filter']);
213
+ if (!Array.isArray(data["notefile_filter"])) {
214
+ throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data["notefile_filter"]);
216
215
  }
217
216
  // ensure the json data is a string
218
- if (data['routing_cooldown_period'] && !(typeof data['routing_cooldown_period'] === 'string' || data['routing_cooldown_period'] instanceof String)) {
219
- throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data['routing_cooldown_period']);
217
+ if (data["routing_cooldown_period"] && !(typeof data["routing_cooldown_period"] === "string" || data["routing_cooldown_period"] instanceof String)) {
218
+ 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
219
  }
221
220
  // ensure the json data is a string
222
- if (data['source_selector'] && !(typeof data['source_selector'] === 'string' || data['source_selector'] instanceof String)) {
223
- throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data['source_selector']);
221
+ if (data["source_selector"] && !(typeof data["source_selector"] === "string" || data["source_selector"] instanceof String)) {
222
+ throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data["source_selector"]);
224
223
  }
225
224
  // ensure the json data is a string
226
- if (data['source_type'] && !(typeof data['source_type'] === 'string' || data['source_type'] instanceof String)) {
227
- throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data['source_type']);
225
+ if (data["source_type"] && !(typeof data["source_type"] === "string" || data["source_type"] instanceof String)) {
226
+ throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data["source_type"]);
228
227
  }
229
228
  // ensure the json data is a string
230
- if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
231
- throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
229
+ if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
230
+ throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
232
231
  }
233
232
  return true;
234
233
  }
@@ -240,221 +239,221 @@ CreateMonitor.RequiredProperties = ["alert_routes", "description", "name", "sour
240
239
  * Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
241
240
  * @member {module:model/CreateMonitor.AggregateFunctionEnum} aggregate_function
242
241
  */
243
- CreateMonitor.prototype['aggregate_function'] = undefined;
242
+ CreateMonitor.prototype["aggregate_function"] = undefined;
244
243
 
245
244
  /**
246
245
  * The time window to aggregate the selected values. It follows the format of a number followed by a time unit
247
246
  * @member {String} aggregate_window
248
247
  */
249
- CreateMonitor.prototype['aggregate_window'] = undefined;
248
+ CreateMonitor.prototype["aggregate_window"] = undefined;
250
249
 
251
250
  /**
252
251
  * If true, the monitor is in alert state.
253
252
  * @member {Boolean} alert
254
253
  */
255
- CreateMonitor.prototype['alert'] = undefined;
254
+ CreateMonitor.prototype["alert"] = undefined;
256
255
 
257
256
  /**
258
257
  * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
259
258
  */
260
- CreateMonitor.prototype['alert_routes'] = undefined;
259
+ CreateMonitor.prototype["alert_routes"] = undefined;
261
260
 
262
261
  /**
263
262
  * 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
263
  * @member {module:model/CreateMonitor.ConditionTypeEnum} condition_type
265
264
  */
266
- CreateMonitor.prototype['condition_type'] = undefined;
265
+ CreateMonitor.prototype["condition_type"] = undefined;
267
266
 
268
267
  /**
269
268
  * @member {String} description
270
269
  */
271
- CreateMonitor.prototype['description'] = undefined;
270
+ CreateMonitor.prototype["description"] = undefined;
272
271
 
273
272
  /**
274
273
  * If true, the monitor will not be evaluated.
275
274
  * @member {Boolean} disabled
276
275
  */
277
- CreateMonitor.prototype['disabled'] = undefined;
276
+ CreateMonitor.prototype["disabled"] = undefined;
278
277
 
279
278
  /**
280
279
  * @member {Array.<String>} fleet_filter
281
280
  */
282
- CreateMonitor.prototype['fleet_filter'] = undefined;
281
+ CreateMonitor.prototype["fleet_filter"] = undefined;
283
282
 
284
283
  /**
285
284
  * The last time the monitor was evaluated and routed.
286
285
  * @member {String} last_routed_at
287
286
  */
288
- CreateMonitor.prototype['last_routed_at'] = undefined;
287
+ CreateMonitor.prototype["last_routed_at"] = undefined;
289
288
 
290
289
  /**
291
290
  * @member {String} name
292
291
  */
293
- CreateMonitor.prototype['name'] = undefined;
292
+ CreateMonitor.prototype["name"] = undefined;
294
293
 
295
294
  /**
296
295
  * @member {Array.<String>} notefile_filter
297
296
  */
298
- CreateMonitor.prototype['notefile_filter'] = undefined;
297
+ CreateMonitor.prototype["notefile_filter"] = undefined;
299
298
 
300
299
  /**
301
300
  * 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
301
  * @member {Boolean} per_device
303
302
  */
304
- CreateMonitor.prototype['per_device'] = undefined;
303
+ CreateMonitor.prototype["per_device"] = undefined;
305
304
 
306
305
  /**
307
306
  * 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
307
  * @member {String} routing_cooldown_period
309
308
  */
310
- CreateMonitor.prototype['routing_cooldown_period'] = undefined;
309
+ CreateMonitor.prototype["routing_cooldown_period"] = undefined;
311
310
 
312
311
  /**
313
312
  * If true, alerts will be created, but no notifications will be sent.
314
313
  * @member {Boolean} silenced
315
314
  */
316
- CreateMonitor.prototype['silenced'] = undefined;
315
+ CreateMonitor.prototype["silenced"] = undefined;
317
316
 
318
317
  /**
319
318
  * A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
320
319
  * @member {String} source_selector
321
320
  */
322
- CreateMonitor.prototype['source_selector'] = undefined;
321
+ CreateMonitor.prototype["source_selector"] = undefined;
323
322
 
324
323
  /**
325
324
  * The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
326
325
  * @member {module:model/CreateMonitor.SourceTypeEnum} source_type
327
326
  */
328
- CreateMonitor.prototype['source_type'] = undefined;
327
+ CreateMonitor.prototype["source_type"] = undefined;
329
328
 
330
329
  /**
331
330
  * The type of condition to apply to the value selected by the source_selector
332
331
  * @member {Number} threshold
333
332
  */
334
- CreateMonitor.prototype['threshold'] = undefined;
333
+ CreateMonitor.prototype["threshold"] = undefined;
335
334
 
336
335
  /**
337
336
  * @member {String} uid
338
337
  */
339
- CreateMonitor.prototype['uid'] = undefined;
338
+ CreateMonitor.prototype["uid"] = undefined;
340
339
 
341
340
  // Implement Monitor interface:
342
341
  /**
343
342
  * Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
344
343
  * @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
345
344
  */
346
- _Monitor["default"].prototype['aggregate_function'] = undefined;
345
+ _Monitor["default"].prototype["aggregate_function"] = undefined;
347
346
  /**
348
347
  * The time window to aggregate the selected values. It follows the format of a number followed by a time unit
349
348
  * @member {String} aggregate_window
350
349
  */
351
- _Monitor["default"].prototype['aggregate_window'] = undefined;
350
+ _Monitor["default"].prototype["aggregate_window"] = undefined;
352
351
  /**
353
352
  * If true, the monitor is in alert state.
354
353
  * @member {Boolean} alert
355
354
  */
356
- _Monitor["default"].prototype['alert'] = undefined;
355
+ _Monitor["default"].prototype["alert"] = undefined;
357
356
  /**
358
357
  * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
359
358
  */
360
- _Monitor["default"].prototype['alert_routes'] = undefined;
359
+ _Monitor["default"].prototype["alert_routes"] = undefined;
361
360
  /**
362
361
  * 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
362
  * @member {module:model/Monitor.ConditionTypeEnum} condition_type
364
363
  */
365
- _Monitor["default"].prototype['condition_type'] = undefined;
364
+ _Monitor["default"].prototype["condition_type"] = undefined;
366
365
  /**
367
366
  * @member {String} description
368
367
  */
369
- _Monitor["default"].prototype['description'] = undefined;
368
+ _Monitor["default"].prototype["description"] = undefined;
370
369
  /**
371
370
  * If true, the monitor will not be evaluated.
372
371
  * @member {Boolean} disabled
373
372
  */
374
- _Monitor["default"].prototype['disabled'] = undefined;
373
+ _Monitor["default"].prototype["disabled"] = undefined;
375
374
  /**
376
375
  * @member {Array.<String>} fleet_filter
377
376
  */
378
- _Monitor["default"].prototype['fleet_filter'] = undefined;
377
+ _Monitor["default"].prototype["fleet_filter"] = undefined;
379
378
  /**
380
379
  * The last time the monitor was evaluated and routed.
381
380
  * @member {String} last_routed_at
382
381
  */
383
- _Monitor["default"].prototype['last_routed_at'] = undefined;
382
+ _Monitor["default"].prototype["last_routed_at"] = undefined;
384
383
  /**
385
384
  * @member {String} name
386
385
  */
387
- _Monitor["default"].prototype['name'] = undefined;
386
+ _Monitor["default"].prototype["name"] = undefined;
388
387
  /**
389
388
  * @member {Array.<String>} notefile_filter
390
389
  */
391
- _Monitor["default"].prototype['notefile_filter'] = undefined;
390
+ _Monitor["default"].prototype["notefile_filter"] = undefined;
392
391
  /**
393
392
  * 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
393
  * @member {Boolean} per_device
395
394
  */
396
- _Monitor["default"].prototype['per_device'] = undefined;
395
+ _Monitor["default"].prototype["per_device"] = undefined;
397
396
  /**
398
397
  * 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
398
  * @member {String} routing_cooldown_period
400
399
  */
401
- _Monitor["default"].prototype['routing_cooldown_period'] = undefined;
400
+ _Monitor["default"].prototype["routing_cooldown_period"] = undefined;
402
401
  /**
403
402
  * If true, alerts will be created, but no notifications will be sent.
404
403
  * @member {Boolean} silenced
405
404
  */
406
- _Monitor["default"].prototype['silenced'] = undefined;
405
+ _Monitor["default"].prototype["silenced"] = undefined;
407
406
  /**
408
407
  * A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
409
408
  * @member {String} source_selector
410
409
  */
411
- _Monitor["default"].prototype['source_selector'] = undefined;
410
+ _Monitor["default"].prototype["source_selector"] = undefined;
412
411
  /**
413
412
  * The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
414
413
  * @member {module:model/Monitor.SourceTypeEnum} source_type
415
414
  */
416
- _Monitor["default"].prototype['source_type'] = undefined;
415
+ _Monitor["default"].prototype["source_type"] = undefined;
417
416
  /**
418
417
  * The type of condition to apply to the value selected by the source_selector
419
418
  * @member {Number} threshold
420
419
  */
421
- _Monitor["default"].prototype['threshold'] = undefined;
420
+ _Monitor["default"].prototype["threshold"] = undefined;
422
421
  /**
423
422
  * @member {String} uid
424
423
  */
425
- _Monitor["default"].prototype['uid'] = undefined;
424
+ _Monitor["default"].prototype["uid"] = undefined;
426
425
 
427
426
  /**
428
427
  * Allowed values for the <code>aggregate_function</code> property.
429
428
  * @enum {String}
430
429
  * @readonly
431
430
  */
432
- CreateMonitor['AggregateFunctionEnum'] = {
431
+ CreateMonitor["AggregateFunctionEnum"] = {
433
432
  /**
434
433
  * value: "none"
435
434
  * @const
436
435
  */
437
- "none": "none",
436
+ none: "none",
438
437
  /**
439
438
  * value: "sum"
440
439
  * @const
441
440
  */
442
- "sum": "sum",
441
+ sum: "sum",
443
442
  /**
444
443
  * value: "average"
445
444
  * @const
446
445
  */
447
- "average": "average",
446
+ average: "average",
448
447
  /**
449
448
  * value: "max"
450
449
  * @const
451
450
  */
452
- "max": "max",
451
+ max: "max",
453
452
  /**
454
453
  * value: "min"
455
454
  * @const
456
455
  */
457
- "min": "min"
456
+ min: "min"
458
457
  };
459
458
 
460
459
  /**
@@ -462,37 +461,37 @@ CreateMonitor['AggregateFunctionEnum'] = {
462
461
  * @enum {String}
463
462
  * @readonly
464
463
  */
465
- CreateMonitor['ConditionTypeEnum'] = {
464
+ CreateMonitor["ConditionTypeEnum"] = {
466
465
  /**
467
466
  * value: "greater_than"
468
467
  * @const
469
468
  */
470
- "greater_than": "greater_than",
469
+ greater_than: "greater_than",
471
470
  /**
472
471
  * value: "greater_than_or_equal_to"
473
472
  * @const
474
473
  */
475
- "greater_than_or_equal_to": "greater_than_or_equal_to",
474
+ greater_than_or_equal_to: "greater_than_or_equal_to",
476
475
  /**
477
476
  * value: "less_than"
478
477
  * @const
479
478
  */
480
- "less_than": "less_than",
479
+ less_than: "less_than",
481
480
  /**
482
481
  * value: "less_than_or_equal_to"
483
482
  * @const
484
483
  */
485
- "less_than_or_equal_to": "less_than_or_equal_to",
484
+ less_than_or_equal_to: "less_than_or_equal_to",
486
485
  /**
487
486
  * value: "equal_to"
488
487
  * @const
489
488
  */
490
- "equal_to": "equal_to",
489
+ equal_to: "equal_to",
491
490
  /**
492
491
  * value: "not_equal_to"
493
492
  * @const
494
493
  */
495
- "not_equal_to": "not_equal_to"
494
+ not_equal_to: "not_equal_to"
496
495
  };
497
496
 
498
497
  /**
@@ -500,16 +499,16 @@ CreateMonitor['ConditionTypeEnum'] = {
500
499
  * @enum {String}
501
500
  * @readonly
502
501
  */
503
- CreateMonitor['SourceTypeEnum'] = {
502
+ CreateMonitor["SourceTypeEnum"] = {
504
503
  /**
505
504
  * value: "event"
506
505
  * @const
507
506
  */
508
- "event": "event",
507
+ event: "event",
509
508
  /**
510
509
  * value: "heartbeat"
511
510
  * @const
512
511
  */
513
- "heartbeat": "heartbeat"
512
+ heartbeat: "heartbeat"
514
513
  };
515
514
  var _default = exports["default"] = CreateMonitor;