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