@blues-inc/notehub-js 6.2.0-beta.56 → 6.2.0-beta.57

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