@blues-inc/notehub-js 1.0.37 → 1.0.38-beta.1

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 (137) hide show
  1. package/README.md +245 -234
  2. package/dist/ApiClient.js +154 -156
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +79 -16
  5. package/dist/api/BillingAccountApi.js +14 -14
  6. package/dist/api/DeviceApi.js +369 -369
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/MonitorApi.js +61 -61
  10. package/dist/api/ProjectApi.js +383 -383
  11. package/dist/api/RouteApi.js +77 -77
  12. package/dist/api/UsageApi.js +285 -0
  13. package/dist/api/WebhookApi.js +51 -51
  14. package/dist/index.js +106 -99
  15. package/dist/model/Alert.js +114 -112
  16. package/dist/model/AlertDataInner.js +39 -39
  17. package/dist/model/AlertNotificationsInner.js +22 -22
  18. package/dist/model/Aws.js +95 -95
  19. package/dist/model/{HttpFilter.js → AwsFilter.js} +40 -40
  20. package/dist/model/{HttpTransform.js → AwsTransform.js} +37 -37
  21. package/dist/model/Azure.js +61 -61
  22. package/dist/model/BillingAccount.js +28 -28
  23. package/dist/model/BillingAccountRole.js +9 -9
  24. package/dist/model/Body.js +5 -5
  25. package/dist/model/CloneProjectRequest.js +31 -31
  26. package/dist/model/Contact.js +26 -26
  27. package/dist/model/CreateFleetRequest.js +12 -12
  28. package/dist/model/CreateMonitor.js +216 -215
  29. package/dist/model/CreateProductRequest.js +36 -36
  30. package/dist/model/CreateProjectRequest.js +23 -23
  31. package/dist/model/CreateUpdateRepository.js +22 -22
  32. package/dist/model/CurrentFirmware.js +16 -16
  33. package/dist/model/DFUEnv.js +12 -12
  34. package/dist/model/DFUState.js +97 -97
  35. package/dist/model/DataField.js +7 -7
  36. package/dist/model/DataSetField.js +24 -24
  37. package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
  38. package/dist/model/Device.js +153 -152
  39. package/dist/model/DeviceDfuHistory.js +26 -25
  40. package/dist/model/{DeviceDfuStatusCurrent.js → DeviceDfuHistoryCurrent.js} +58 -58
  41. package/dist/model/DeviceDfuHistoryPage.js +13 -12
  42. package/dist/model/DeviceDfuStateMachine.js +30 -29
  43. package/dist/model/DeviceDfuStateMachineNode.js +30 -30
  44. package/dist/model/DeviceDfuStatus.js +27 -27
  45. package/dist/model/DeviceDfuStatusPage.js +13 -12
  46. package/dist/model/DeviceSession.js +300 -300
  47. package/dist/model/DeviceTowerInfo.js +18 -18
  48. package/dist/model/DeviceUsage.js +44 -44
  49. package/dist/model/DfuActionRequest.js +7 -7
  50. package/dist/model/EmailNotification.js +7 -7
  51. package/dist/model/EnvTreeJsonNode.js +100 -98
  52. package/dist/model/EnvVar.js +20 -20
  53. package/dist/model/EnvironmentVariables.js +8 -8
  54. package/dist/model/Error.js +45 -45
  55. package/dist/model/Event.js +365 -365
  56. package/dist/model/Firmware.js +59 -59
  57. package/dist/model/FirmwareInfo.js +83 -83
  58. package/dist/model/Fleet.js +47 -47
  59. package/dist/model/GetAlerts200Response.js +15 -14
  60. package/dist/model/GetBillingAccounts200Response.js +10 -9
  61. package/dist/model/{GetDeviceEnvironmentVariables200Response.js → GetDeviceEnvironmentVariablesByPin200Response.js} +38 -38
  62. package/dist/model/{GetProjectFleets200Response.js → GetDeviceFleets200Response.js} +30 -29
  63. package/dist/model/GetDeviceHealthLog200Response.js +12 -11
  64. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +26 -26
  65. package/dist/model/GetDeviceLatest200Response.js +10 -9
  66. package/dist/model/GetDevicePublicKey200Response.js +22 -22
  67. package/dist/model/GetDeviceSessions200Response.js +23 -22
  68. package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
  69. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +14 -14
  70. package/dist/model/GetProjectDevices200Response.js +17 -16
  71. package/dist/model/GetProjectEvents200Response.js +21 -20
  72. package/dist/model/GetProjectEventsByCursor200Response.js +31 -30
  73. package/dist/model/GetProjectMembers200Response.js +12 -11
  74. package/dist/model/GetProjectProducts200Response.js +10 -9
  75. package/dist/model/GetProjects200Response.js +10 -9
  76. package/dist/model/GetWebhooks200Response.js +10 -9
  77. package/dist/model/Google.js +50 -50
  78. package/dist/model/HandleNoteChanges200Response.js +16 -16
  79. package/dist/model/HandleNoteGet200Response.js +13 -13
  80. package/dist/model/HandleNoteSignal200Response.js +5 -5
  81. package/dist/model/HandleNotefileChanges200Response.js +16 -16
  82. package/dist/model/HandleNotefileChangesPending200Response.js +20 -20
  83. package/dist/model/HandleNotefileDeleteRequest.js +7 -7
  84. package/dist/model/Http.js +54 -54
  85. package/dist/model/Location.js +50 -50
  86. package/dist/model/Login200Response.js +7 -7
  87. package/dist/model/LoginRequest.js +14 -14
  88. package/dist/model/Monitor.js +159 -158
  89. package/dist/model/MonitorAlertRoutesInner.js +18 -19
  90. package/dist/model/Mqtt.js +98 -98
  91. package/dist/model/Note.js +10 -10
  92. package/dist/model/NotefileSchema.js +19 -18
  93. package/dist/model/NotehubRoute.js +49 -49
  94. package/dist/model/NotehubRouteSchema.js +100 -101
  95. package/dist/model/{QuestionDataResponseMap.js → OAuth2Error.js} +66 -43
  96. package/dist/model/OAuth2TokenResponse.js +154 -0
  97. package/dist/model/PersonalAccessToken.js +49 -49
  98. package/dist/model/PersonalAccessTokenCreatedBy.js +20 -20
  99. package/dist/model/PersonalAccessTokenInfo.js +22 -22
  100. package/dist/model/PersonalAccessTokenSecret.js +16 -16
  101. package/dist/model/PostProvisionProjectDeviceRequest.js +25 -25
  102. package/dist/model/Product.js +36 -36
  103. package/dist/model/Project.js +47 -47
  104. package/dist/model/ProjectMember.js +28 -28
  105. package/dist/model/Proxy.js +34 -34
  106. package/dist/model/PutDeviceFleetsRequest.js +8 -8
  107. package/dist/model/Radresponder.js +34 -34
  108. package/dist/model/Repository.js +28 -28
  109. package/dist/model/Role.js +9 -9
  110. package/dist/model/RouteLog.js +48 -48
  111. package/dist/model/SchemaProperty.js +54 -54
  112. package/dist/model/SimUsage.js +27 -27
  113. package/dist/model/Slack.js +82 -82
  114. package/dist/model/SlackBearerNotification.js +30 -30
  115. package/dist/model/{SnowflakeTransform.js → SlackTransform.js} +28 -28
  116. package/dist/model/SlackWebHookNotification.js +25 -25
  117. package/dist/model/Snowflake.js +66 -66
  118. package/dist/model/Thingworx.js +48 -48
  119. package/dist/model/TowerLocation.js +75 -75
  120. package/dist/model/Twilio.js +65 -65
  121. package/dist/model/UpdateFleetRequest.js +31 -31
  122. package/dist/model/UploadMetadata.js +75 -75
  123. package/dist/model/{AnalyticsEventsData.js → UsageData.js} +45 -39
  124. package/dist/model/{AnalyticsRouteLogsData.js → UsageEventsData.js} +49 -45
  125. package/dist/model/{AnalyticsEventsResponse.js → UsageEventsResponse.js} +33 -32
  126. package/dist/model/UsageRouteLogsData.js +154 -0
  127. package/dist/model/{AnalyticsSessionsResponse.js → UsageRouteLogsResponse.js} +33 -32
  128. package/dist/model/{AnalyticsSessionsData.js → UsageSessionsData.js} +48 -44
  129. package/dist/model/{AnalyticsRouteLogsResponse.js → UsageSessionsResponse.js} +33 -32
  130. package/dist/model/UserDbRoute.js +33 -33
  131. package/dist/model/UserDfuStateMachine.js +27 -27
  132. package/dist/model/UserDfuStateMachineStatus.js +23 -23
  133. package/dist/model/UserFirmwareInfo.js +12 -12
  134. package/dist/model/WebhookSettings.js +15 -15
  135. package/package.json +28 -28
  136. package/dist/model/DataSet.js +0 -163
  137. package/dist/model/QuestionDataResponseLineChart.js +0 -204
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
19
  * Notehub API
20
- * The OpenAPI definition for the Notehub.io API.
20
+ * The OpenAPI definition for the Notehub.io API.
21
21
  *
22
22
  * The version of the OpenAPI document: 1.2.0
23
23
  * Contact: engineering@blues.io
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
30
  /**
31
31
  * The Monitor model module.
32
32
  * @module model/Monitor
33
- * @version 1.0.37
33
+ * @version 1.0.38-beta.1
34
34
  */
35
35
  var Monitor = /*#__PURE__*/function () {
36
36
  /**
@@ -63,59 +63,59 @@ var Monitor = /*#__PURE__*/function () {
63
63
  value: function constructFromObject(data, obj) {
64
64
  if (data) {
65
65
  obj = obj || new Monitor();
66
- if (data.hasOwnProperty("uid")) {
67
- obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
66
+ if (data.hasOwnProperty('aggregate_function')) {
67
+ obj['aggregate_function'] = _ApiClient["default"].convertToType(data['aggregate_function'], 'String');
68
68
  }
69
- if (data.hasOwnProperty("name")) {
70
- obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
69
+ if (data.hasOwnProperty('aggregate_window')) {
70
+ obj['aggregate_window'] = _ApiClient["default"].convertToType(data['aggregate_window'], 'String');
71
71
  }
72
- if (data.hasOwnProperty("description")) {
73
- obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
72
+ if (data.hasOwnProperty('alert')) {
73
+ obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
74
74
  }
75
- if (data.hasOwnProperty("source_type")) {
76
- obj["source_type"] = _ApiClient["default"].convertToType(data["source_type"], "String");
75
+ if (data.hasOwnProperty('alert_routes')) {
76
+ obj['alert_routes'] = _ApiClient["default"].convertToType(data['alert_routes'], [_MonitorAlertRoutesInner["default"]]);
77
77
  }
78
- if (data.hasOwnProperty("disabled")) {
79
- obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
78
+ if (data.hasOwnProperty('condition_type')) {
79
+ obj['condition_type'] = _ApiClient["default"].convertToType(data['condition_type'], 'String');
80
80
  }
81
- if (data.hasOwnProperty("alert")) {
82
- obj["alert"] = _ApiClient["default"].convertToType(data["alert"], "Boolean");
81
+ if (data.hasOwnProperty('description')) {
82
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
83
83
  }
84
- if (data.hasOwnProperty("notefile_filter")) {
85
- obj["notefile_filter"] = _ApiClient["default"].convertToType(data["notefile_filter"], ["String"]);
84
+ if (data.hasOwnProperty('disabled')) {
85
+ obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
86
86
  }
87
- if (data.hasOwnProperty("fleet_filter")) {
88
- obj["fleet_filter"] = _ApiClient["default"].convertToType(data["fleet_filter"], ["String"]);
87
+ if (data.hasOwnProperty('fleet_filter')) {
88
+ obj['fleet_filter'] = _ApiClient["default"].convertToType(data['fleet_filter'], ['String']);
89
89
  }
90
- if (data.hasOwnProperty("source_selector")) {
91
- obj["source_selector"] = _ApiClient["default"].convertToType(data["source_selector"], "String");
90
+ if (data.hasOwnProperty('last_routed_at')) {
91
+ obj['last_routed_at'] = _ApiClient["default"].convertToType(data['last_routed_at'], 'String');
92
92
  }
93
- if (data.hasOwnProperty("condition_type")) {
94
- obj["condition_type"] = _ApiClient["default"].convertToType(data["condition_type"], "String");
93
+ if (data.hasOwnProperty('name')) {
94
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
95
95
  }
96
- if (data.hasOwnProperty("threshold")) {
97
- obj["threshold"] = _ApiClient["default"].convertToType(data["threshold"], "Number");
96
+ if (data.hasOwnProperty('notefile_filter')) {
97
+ obj['notefile_filter'] = _ApiClient["default"].convertToType(data['notefile_filter'], ['String']);
98
98
  }
99
- if (data.hasOwnProperty("alert_routes")) {
100
- obj["alert_routes"] = _ApiClient["default"].convertToType(data["alert_routes"], [_MonitorAlertRoutesInner["default"]]);
99
+ if (data.hasOwnProperty('per_device')) {
100
+ obj['per_device'] = _ApiClient["default"].convertToType(data['per_device'], 'Boolean');
101
101
  }
102
- if (data.hasOwnProperty("last_routed_at")) {
103
- obj["last_routed_at"] = _ApiClient["default"].convertToType(data["last_routed_at"], "String");
102
+ if (data.hasOwnProperty('routing_cooldown_period')) {
103
+ obj['routing_cooldown_period'] = _ApiClient["default"].convertToType(data['routing_cooldown_period'], 'String');
104
104
  }
105
- if (data.hasOwnProperty("silenced")) {
106
- obj["silenced"] = _ApiClient["default"].convertToType(data["silenced"], "Boolean");
105
+ if (data.hasOwnProperty('silenced')) {
106
+ obj['silenced'] = _ApiClient["default"].convertToType(data['silenced'], 'Boolean');
107
107
  }
108
- if (data.hasOwnProperty("routing_cooldown_period")) {
109
- obj["routing_cooldown_period"] = _ApiClient["default"].convertToType(data["routing_cooldown_period"], "String");
108
+ if (data.hasOwnProperty('source_selector')) {
109
+ obj['source_selector'] = _ApiClient["default"].convertToType(data['source_selector'], 'String');
110
110
  }
111
- if (data.hasOwnProperty("aggregate_function")) {
112
- obj["aggregate_function"] = _ApiClient["default"].convertToType(data["aggregate_function"], "String");
111
+ if (data.hasOwnProperty('source_type')) {
112
+ obj['source_type'] = _ApiClient["default"].convertToType(data['source_type'], 'String');
113
113
  }
114
- if (data.hasOwnProperty("aggregate_window")) {
115
- obj["aggregate_window"] = _ApiClient["default"].convertToType(data["aggregate_window"], "String");
114
+ if (data.hasOwnProperty('threshold')) {
115
+ obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number');
116
116
  }
117
- if (data.hasOwnProperty("per_device")) {
118
- obj["per_device"] = _ApiClient["default"].convertToType(data["per_device"], "Boolean");
117
+ if (data.hasOwnProperty('uid')) {
118
+ obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
119
119
  }
120
120
  } else if (data === null) {
121
121
  return null;
@@ -132,45 +132,21 @@ var Monitor = /*#__PURE__*/function () {
132
132
  key: "validateJSON",
133
133
  value: function validateJSON(data) {
134
134
  // ensure the json data is a string
135
- if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
136
- throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
135
+ if (data['aggregate_function'] && !(typeof data['aggregate_function'] === 'string' || data['aggregate_function'] instanceof String)) {
136
+ throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data['aggregate_function']);
137
137
  }
138
138
  // ensure the json data is a string
139
- if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
140
- throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
139
+ if (data['aggregate_window'] && !(typeof data['aggregate_window'] === 'string' || data['aggregate_window'] instanceof String)) {
140
+ throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data['aggregate_window']);
141
141
  }
142
- // ensure the json data is a string
143
- if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
144
- throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
145
- }
146
- // ensure the json data is a string
147
- if (data["source_type"] && !(typeof data["source_type"] === "string" || data["source_type"] instanceof String)) {
148
- throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data["source_type"]);
149
- }
150
- // ensure the json data is an array
151
- if (!Array.isArray(data["notefile_filter"])) {
152
- throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data["notefile_filter"]);
153
- }
154
- // ensure the json data is an array
155
- if (!Array.isArray(data["fleet_filter"])) {
156
- throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data["fleet_filter"]);
157
- }
158
- // ensure the json data is a string
159
- if (data["source_selector"] && !(typeof data["source_selector"] === "string" || data["source_selector"] instanceof String)) {
160
- throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data["source_selector"]);
161
- }
162
- // ensure the json data is a string
163
- if (data["condition_type"] && !(typeof data["condition_type"] === "string" || data["condition_type"] instanceof String)) {
164
- throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data["condition_type"]);
165
- }
166
- if (data["alert_routes"]) {
142
+ if (data['alert_routes']) {
167
143
  // data not null
168
144
  // ensure the json data is an array
169
- if (!Array.isArray(data["alert_routes"])) {
170
- throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data["alert_routes"]);
145
+ if (!Array.isArray(data['alert_routes'])) {
146
+ throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data['alert_routes']);
171
147
  }
172
148
  // validate the optional field `alert_routes` (array)
173
- var _iterator = _createForOfIteratorHelper(data["alert_routes"]),
149
+ var _iterator = _createForOfIteratorHelper(data['alert_routes']),
174
150
  _step;
175
151
  try {
176
152
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -182,140 +158,185 @@ var Monitor = /*#__PURE__*/function () {
182
158
  } finally {
183
159
  _iterator.f();
184
160
  }
161
+ ;
162
+ }
163
+ // ensure the json data is a string
164
+ if (data['condition_type'] && !(typeof data['condition_type'] === 'string' || data['condition_type'] instanceof String)) {
165
+ throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data['condition_type']);
166
+ }
167
+ // ensure the json data is a string
168
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
169
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
170
+ }
171
+ // ensure the json data is an array
172
+ if (!Array.isArray(data['fleet_filter'])) {
173
+ throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data['fleet_filter']);
174
+ }
175
+ // ensure the json data is a string
176
+ if (data['last_routed_at'] && !(typeof data['last_routed_at'] === 'string' || data['last_routed_at'] instanceof String)) {
177
+ throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data['last_routed_at']);
185
178
  }
186
179
  // ensure the json data is a string
187
- if (data["last_routed_at"] && !(typeof data["last_routed_at"] === "string" || data["last_routed_at"] instanceof String)) {
188
- throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data["last_routed_at"]);
180
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
181
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
182
+ }
183
+ // ensure the json data is an array
184
+ if (!Array.isArray(data['notefile_filter'])) {
185
+ throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data['notefile_filter']);
189
186
  }
190
187
  // ensure the json data is a string
191
- if (data["routing_cooldown_period"] && !(typeof data["routing_cooldown_period"] === "string" || data["routing_cooldown_period"] instanceof String)) {
192
- throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data["routing_cooldown_period"]);
188
+ if (data['routing_cooldown_period'] && !(typeof data['routing_cooldown_period'] === 'string' || data['routing_cooldown_period'] instanceof String)) {
189
+ throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data['routing_cooldown_period']);
193
190
  }
194
191
  // ensure the json data is a string
195
- if (data["aggregate_function"] && !(typeof data["aggregate_function"] === "string" || data["aggregate_function"] instanceof String)) {
196
- throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data["aggregate_function"]);
192
+ if (data['source_selector'] && !(typeof data['source_selector'] === 'string' || data['source_selector'] instanceof String)) {
193
+ throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data['source_selector']);
197
194
  }
198
195
  // ensure the json data is a string
199
- if (data["aggregate_window"] && !(typeof data["aggregate_window"] === "string" || data["aggregate_window"] instanceof String)) {
200
- throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data["aggregate_window"]);
196
+ if (data['source_type'] && !(typeof data['source_type'] === 'string' || data['source_type'] instanceof String)) {
197
+ throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data['source_type']);
198
+ }
199
+ // ensure the json data is a string
200
+ if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
201
+ throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
201
202
  }
202
203
  return true;
203
204
  }
204
205
  }]);
205
206
  }();
206
207
  /**
207
- * @member {String} uid
208
+ * Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
209
+ * @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
208
210
  */
209
- Monitor.prototype["uid"] = undefined;
211
+ Monitor.prototype['aggregate_function'] = undefined;
210
212
 
211
213
  /**
212
- * @member {String} name
214
+ * The time window to aggregate the selected values. It follows the format of a number followed by a time unit
215
+ * @member {String} aggregate_window
213
216
  */
214
- Monitor.prototype["name"] = undefined;
217
+ Monitor.prototype['aggregate_window'] = undefined;
215
218
 
216
219
  /**
217
- * @member {String} description
220
+ * If true, the monitor is in alert state.
221
+ * @member {Boolean} alert
218
222
  */
219
- Monitor.prototype["description"] = undefined;
223
+ Monitor.prototype['alert'] = undefined;
220
224
 
221
225
  /**
222
- * The type of source to monitor. Currently only \"event\" is supported.
223
- * @member {module:model/Monitor.SourceTypeEnum} source_type
226
+ * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
224
227
  */
225
- Monitor.prototype["source_type"] = undefined;
228
+ Monitor.prototype['alert_routes'] = undefined;
226
229
 
227
230
  /**
228
- * If true, the monitor will not be evaluated.
229
- * @member {Boolean} disabled
231
+ * A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]
232
+ * @member {module:model/Monitor.ConditionTypeEnum} condition_type
230
233
  */
231
- Monitor.prototype["disabled"] = undefined;
234
+ Monitor.prototype['condition_type'] = undefined;
232
235
 
233
236
  /**
234
- * If true, the monitor is in alert state.
235
- * @member {Boolean} alert
237
+ * @member {String} description
236
238
  */
237
- Monitor.prototype["alert"] = undefined;
239
+ Monitor.prototype['description'] = undefined;
238
240
 
239
241
  /**
240
- * @member {Array.<String>} notefile_filter
242
+ * If true, the monitor will not be evaluated.
243
+ * @member {Boolean} disabled
241
244
  */
242
- Monitor.prototype["notefile_filter"] = undefined;
245
+ Monitor.prototype['disabled'] = undefined;
243
246
 
244
247
  /**
245
248
  * @member {Array.<String>} fleet_filter
246
249
  */
247
- Monitor.prototype["fleet_filter"] = undefined;
250
+ Monitor.prototype['fleet_filter'] = undefined;
248
251
 
249
252
  /**
250
- * A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
251
- * @member {String} source_selector
253
+ * The last time the monitor was evaluated and routed.
254
+ * @member {String} last_routed_at
252
255
  */
253
- Monitor.prototype["source_selector"] = undefined;
256
+ Monitor.prototype['last_routed_at'] = undefined;
254
257
 
255
258
  /**
256
- * 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]
257
- * @member {module:model/Monitor.ConditionTypeEnum} condition_type
259
+ * @member {String} name
258
260
  */
259
- Monitor.prototype["condition_type"] = undefined;
261
+ Monitor.prototype['name'] = undefined;
260
262
 
261
263
  /**
262
- * The type of condition to apply to the value selected by the source_selector
263
- * @member {Number} threshold
264
+ * @member {Array.<String>} notefile_filter
264
265
  */
265
- Monitor.prototype["threshold"] = undefined;
266
+ Monitor.prototype['notefile_filter'] = undefined;
266
267
 
267
268
  /**
268
- * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
269
+ * Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.
270
+ * @member {Boolean} per_device
269
271
  */
270
- Monitor.prototype["alert_routes"] = undefined;
272
+ Monitor.prototype['per_device'] = undefined;
271
273
 
272
274
  /**
273
- * The last time the monitor was evaluated and routed.
274
- * @member {String} last_routed_at
275
+ * The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.
276
+ * @member {String} routing_cooldown_period
275
277
  */
276
- Monitor.prototype["last_routed_at"] = undefined;
278
+ Monitor.prototype['routing_cooldown_period'] = undefined;
277
279
 
278
280
  /**
279
281
  * If true, alerts will be created, but no notifications will be sent.
280
282
  * @member {Boolean} silenced
281
283
  */
282
- Monitor.prototype["silenced"] = undefined;
284
+ Monitor.prototype['silenced'] = undefined;
283
285
 
284
286
  /**
285
- * 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.
286
- * @member {String} routing_cooldown_period
287
+ * A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
288
+ * @member {String} source_selector
287
289
  */
288
- Monitor.prototype["routing_cooldown_period"] = undefined;
290
+ Monitor.prototype['source_selector'] = undefined;
289
291
 
290
292
  /**
291
- * Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
292
- * @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
293
+ * The type of source to monitor. Currently only \"event\" is supported.
294
+ * @member {module:model/Monitor.SourceTypeEnum} source_type
293
295
  */
294
- Monitor.prototype["aggregate_function"] = undefined;
296
+ Monitor.prototype['source_type'] = undefined;
295
297
 
296
298
  /**
297
- * The time window to aggregate the selected values. It follows the format of a number followed by a time unit
298
- * @member {String} aggregate_window
299
+ * The type of condition to apply to the value selected by the source_selector
300
+ * @member {Number} threshold
299
301
  */
300
- Monitor.prototype["aggregate_window"] = undefined;
302
+ Monitor.prototype['threshold'] = undefined;
301
303
 
302
304
  /**
303
- * 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.
304
- * @member {Boolean} per_device
305
+ * @member {String} uid
305
306
  */
306
- Monitor.prototype["per_device"] = undefined;
307
+ Monitor.prototype['uid'] = undefined;
307
308
 
308
309
  /**
309
- * Allowed values for the <code>source_type</code> property.
310
+ * Allowed values for the <code>aggregate_function</code> property.
310
311
  * @enum {String}
311
312
  * @readonly
312
313
  */
313
- Monitor["SourceTypeEnum"] = {
314
+ Monitor['AggregateFunctionEnum'] = {
314
315
  /**
315
- * value: "event"
316
+ * value: "none"
316
317
  * @const
317
318
  */
318
- event: "event"
319
+ "none": "none",
320
+ /**
321
+ * value: "sum"
322
+ * @const
323
+ */
324
+ "sum": "sum",
325
+ /**
326
+ * value: "average"
327
+ * @const
328
+ */
329
+ "average": "average",
330
+ /**
331
+ * value: "max"
332
+ * @const
333
+ */
334
+ "max": "max",
335
+ /**
336
+ * value: "min"
337
+ * @const
338
+ */
339
+ "min": "min"
319
340
  };
320
341
 
321
342
  /**
@@ -323,69 +344,49 @@ Monitor["SourceTypeEnum"] = {
323
344
  * @enum {String}
324
345
  * @readonly
325
346
  */
326
- Monitor["ConditionTypeEnum"] = {
347
+ Monitor['ConditionTypeEnum'] = {
327
348
  /**
328
349
  * value: "greater_than"
329
350
  * @const
330
351
  */
331
- greater_than: "greater_than",
352
+ "greater_than": "greater_than",
332
353
  /**
333
354
  * value: "greater_than_or_equal_to"
334
355
  * @const
335
356
  */
336
- greater_than_or_equal_to: "greater_than_or_equal_to",
357
+ "greater_than_or_equal_to": "greater_than_or_equal_to",
337
358
  /**
338
359
  * value: "less_than"
339
360
  * @const
340
361
  */
341
- less_than: "less_than",
362
+ "less_than": "less_than",
342
363
  /**
343
364
  * value: "less_than_or_equal_to"
344
365
  * @const
345
366
  */
346
- less_than_or_equal_to: "less_than_or_equal_to",
367
+ "less_than_or_equal_to": "less_than_or_equal_to",
347
368
  /**
348
369
  * value: "equal_to"
349
370
  * @const
350
371
  */
351
- equal_to: "equal_to",
372
+ "equal_to": "equal_to",
352
373
  /**
353
374
  * value: "not_equal_to"
354
375
  * @const
355
376
  */
356
- not_equal_to: "not_equal_to"
377
+ "not_equal_to": "not_equal_to"
357
378
  };
358
379
 
359
380
  /**
360
- * Allowed values for the <code>aggregate_function</code> property.
381
+ * Allowed values for the <code>source_type</code> property.
361
382
  * @enum {String}
362
383
  * @readonly
363
384
  */
364
- Monitor["AggregateFunctionEnum"] = {
365
- /**
366
- * value: "none"
367
- * @const
368
- */
369
- none: "none",
385
+ Monitor['SourceTypeEnum'] = {
370
386
  /**
371
- * value: "sum"
372
- * @const
373
- */
374
- sum: "sum",
375
- /**
376
- * value: "average"
377
- * @const
378
- */
379
- average: "average",
380
- /**
381
- * value: "max"
382
- * @const
383
- */
384
- max: "max",
385
- /**
386
- * value: "min"
387
+ * value: "event"
387
388
  * @const
388
389
  */
389
- min: "min"
390
+ "event": "event"
390
391
  };
391
392
  var _default = exports["default"] = Monitor;
@@ -18,7 +18,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
20
  * Notehub API
21
- * The OpenAPI definition for the Notehub.io API.
21
+ * The OpenAPI definition for the Notehub.io API.
22
22
  *
23
23
  * The version of the OpenAPI document: 1.2.0
24
24
  * Contact: engineering@blues.io
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
31
31
  /**
32
32
  * The MonitorAlertRoutesInner model module.
33
33
  * @module model/MonitorAlertRoutesInner
34
- * @version 1.0.37
34
+ * @version 1.0.38-beta.1
35
35
  */
36
36
  var MonitorAlertRoutesInner = /*#__PURE__*/function () {
37
37
  /**
@@ -105,8 +105,7 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
105
105
  } else if (match === 0) {
106
106
  this.actualInstance = null; // clear the actual instance in case there are multiple matches
107
107
  throw new Error("No match found constructing `MonitorAlertRoutesInner` with oneOf schemas EmailNotification, SlackBearerNotification, SlackWebHookNotification. Details: " + errorMessages.join(", "));
108
- } else {
109
- // only 1 match
108
+ } else {// only 1 match
110
109
  // the input is valid
111
110
  }
112
111
  }
@@ -146,8 +145,8 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
146
145
  }]);
147
146
  }();
148
147
  /**
149
- * The URL of the Slack webhook.
150
- * @member {String} url
148
+ * text or blocks
149
+ * @member {module:model/MonitorAlertRoutesInner.MessageTypeEnum} message_type
151
150
  */
152
151
  _MonitorAlertRoutesInner = MonitorAlertRoutesInner;
153
152
  /**
@@ -158,36 +157,36 @@ _MonitorAlertRoutesInner = MonitorAlertRoutesInner;
158
157
  _defineProperty(MonitorAlertRoutesInner, "fromJSON", function (json_string) {
159
158
  return _MonitorAlertRoutesInner.constructFromObject(JSON.parse(json_string));
160
159
  });
161
- MonitorAlertRoutesInner.prototype["url"] = undefined;
162
-
163
- /**
164
- * text or blocks
165
- * @member {module:model/MonitorAlertRoutesInner.MessageTypeEnum} message_type
166
- */
167
- MonitorAlertRoutesInner.prototype["message_type"] = undefined;
160
+ MonitorAlertRoutesInner.prototype['message_type'] = undefined;
168
161
 
169
162
  /**
170
163
  * The text of the message, or the blocks definition
171
164
  * @member {String} text
172
165
  */
173
- MonitorAlertRoutesInner.prototype["text"] = undefined;
166
+ MonitorAlertRoutesInner.prototype['text'] = undefined;
174
167
 
175
168
  /**
176
- * The bearer token for the Slack app.
177
- * @member {String} token
169
+ * The URL of the Slack webhook.
170
+ * @member {String} url
178
171
  */
179
- MonitorAlertRoutesInner.prototype["token"] = undefined;
172
+ MonitorAlertRoutesInner.prototype['url'] = undefined;
180
173
 
181
174
  /**
182
175
  * The channel to send the message to.
183
176
  * @member {String} channel
184
177
  */
185
- MonitorAlertRoutesInner.prototype["channel"] = undefined;
178
+ MonitorAlertRoutesInner.prototype['channel'] = undefined;
179
+
180
+ /**
181
+ * The bearer token for the Slack app.
182
+ * @member {String} token
183
+ */
184
+ MonitorAlertRoutesInner.prototype['token'] = undefined;
186
185
 
187
186
  /**
188
187
  * Email Address
189
188
  * @member {String} email
190
189
  */
191
- MonitorAlertRoutesInner.prototype["email"] = undefined;
190
+ MonitorAlertRoutesInner.prototype['email'] = undefined;
192
191
  MonitorAlertRoutesInner.OneOf = ["EmailNotification", "SlackBearerNotification", "SlackWebHookNotification"];
193
192
  var _default = exports["default"] = MonitorAlertRoutesInner;