@blues-inc/notehub-js 6.7.0-beta.9 → 7.0.0-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 (192) hide show
  1. package/README.md +156 -153
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AlertApi.js +15 -13
  4. package/dist/api/AuthorizationApi.js +11 -50
  5. package/dist/api/DescriptionApi.js +57 -41
  6. package/dist/api/DeviceApi.js +428 -297
  7. package/dist/api/EventApi.js +85 -224
  8. package/dist/api/ExternalDevicesApi.js +31 -25
  9. package/dist/api/JobsApi.js +75 -57
  10. package/dist/api/MonitorApi.js +37 -27
  11. package/dist/api/OrganizationApi.js +25 -19
  12. package/dist/api/ProjectApi.js +421 -333
  13. package/dist/api/RouteApi.js +67 -55
  14. package/dist/api/SkillsApi.js +279 -0
  15. package/dist/api/UsageApi.js +83 -73
  16. package/dist/api/WebhookApi.js +95 -73
  17. package/dist/index.js +91 -63
  18. package/dist/model/AWSRoleConfig.js +1 -1
  19. package/dist/model/AddDeviceToFleetsRequest.js +3 -3
  20. package/dist/model/Alert.js +16 -9
  21. package/dist/model/AlertDataInner.js +9 -4
  22. package/dist/model/AlertNotificationsInner.js +14 -4
  23. package/dist/model/ArchiveStats.js +1 -1
  24. package/dist/model/AwsRoute.js +14 -2
  25. package/dist/model/AzureRoute.js +8 -1
  26. package/dist/model/BatchJobNoteRequest.js +1 -1
  27. package/dist/model/BatchJobRequests.js +6 -5
  28. package/dist/model/BillingAccount.js +5 -3
  29. package/dist/model/BlynkRoute.js +6 -1
  30. package/dist/model/Body.js +2 -1
  31. package/dist/model/CancelJobRun200Response.js +1 -1
  32. package/dist/model/CellularPlan.js +3 -2
  33. package/dist/model/CloneProjectRequest.js +7 -7
  34. package/dist/model/Contact.js +5 -1
  35. package/dist/model/CreateFleetRequest.js +4 -3
  36. package/dist/model/CreateJob201Response.js +1 -1
  37. package/dist/model/CreateMonitor.js +37 -25
  38. package/dist/model/CreateProductRequest.js +7 -6
  39. package/dist/model/CreateProjectRequest.js +5 -5
  40. package/dist/model/CreateProjectSecretRequest.js +5 -5
  41. package/dist/model/CreateUpdateRepository.js +3 -1
  42. package/dist/model/CreatedRepository.js +5 -5
  43. package/dist/model/CurrentFirmware.js +1 -1
  44. package/dist/model/DFUEnv.js +1 -1
  45. package/dist/model/DFUState.js +2 -1
  46. package/dist/model/DataField.js +1 -1
  47. package/dist/model/DataSet.js +5 -4
  48. package/dist/model/DataSetField.js +2 -2
  49. package/dist/model/DataUsage.js +1 -1
  50. package/dist/model/DatacakeRoute.js +7 -1
  51. package/dist/model/DatasetReloadProgress.js +1 -1
  52. package/dist/model/DeleteDeviceFromFleetsRequest.js +3 -3
  53. package/dist/model/DeleteJob200Response.js +1 -1
  54. package/dist/model/DeleteNotefilesRequest.js +2 -2
  55. package/dist/model/DescriptionRecord.js +6 -6
  56. package/dist/model/DescriptionRecordList.js +3 -2
  57. package/dist/model/Device.js +27 -8
  58. package/dist/model/DeviceDfuHistory.js +3 -2
  59. package/dist/model/DeviceDfuHistoryCurrent.js +2 -2
  60. package/dist/model/DeviceDfuHistoryPage.js +4 -2
  61. package/dist/model/DeviceDfuStateMachine.js +2 -1
  62. package/dist/model/DeviceDfuStateMachineNode.js +2 -2
  63. package/dist/model/DeviceDfuStatus.js +3 -3
  64. package/dist/model/DeviceDfuStatusPage.js +4 -2
  65. package/dist/model/DeviceSensor.js +1 -1
  66. package/dist/model/DeviceSession.js +37 -5
  67. package/dist/model/DeviceTowerInfo.js +6 -1
  68. package/dist/model/DeviceUsage.js +7 -1
  69. package/dist/model/DfuActionRequest.js +2 -2
  70. package/dist/model/EmailNotification.js +29 -6
  71. package/dist/model/EnvTreeJsonNode.js +17 -6
  72. package/dist/model/EnvVar.js +5 -1
  73. package/dist/model/EnvironmentVariables.js +3 -2
  74. package/dist/model/Error.js +4 -1
  75. package/dist/model/Event.js +7 -7
  76. package/dist/model/Filter.js +5 -5
  77. package/dist/model/Firmware.js +1 -1
  78. package/dist/model/FirmwareInfo.js +6 -6
  79. package/dist/model/Fleet.js +11 -10
  80. package/dist/model/FleetConnectivityAssurance.js +1 -1
  81. package/dist/model/GetAlerts200Response.js +2 -2
  82. package/dist/model/GetApiUsage200Response.js +2 -2
  83. package/dist/model/GetDataUsage200Response.js +2 -2
  84. package/dist/model/GetDataUsage200ResponseDataInner.js +3 -3
  85. package/dist/model/GetDbNote200Response.js +1 -1
  86. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +1 -1
  87. package/dist/model/GetDeviceFleets200Response.js +1 -1
  88. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  89. package/dist/model/GetDeviceJourney200Response.js +1 -1
  90. package/dist/model/GetDeviceJourney200ResponseJourney.js +1 -1
  91. package/dist/model/GetDeviceJourneys200Response.js +1 -1
  92. package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +1 -1
  93. package/dist/model/GetDeviceLatestEvents200Response.js +2 -2
  94. package/dist/model/GetDevicePlans200Response.js +2 -1
  95. package/dist/model/GetDevicePublicKey200Response.js +5 -3
  96. package/dist/model/GetDevicePublicKeys200Response.js +2 -2
  97. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +3 -1
  98. package/dist/model/GetDeviceSessions200Response.js +2 -2
  99. package/dist/model/GetDevices200Response.js +2 -2
  100. package/dist/model/GetEvents200Response.js +1 -1
  101. package/dist/model/GetJobRuns200Response.js +1 -1
  102. package/dist/model/GetJobs200Response.js +1 -1
  103. package/dist/model/GetNotefile200Response.js +1 -1
  104. package/dist/model/{GetBillingAccount200Response.js → GetOrganization200Response.js} +28 -28
  105. package/dist/model/{GetBillingAccount200ResponsePlan.js → GetOrganization200ResponsePlan.js} +24 -24
  106. package/dist/model/{GetBillingAccountBalanceHistory200Response.js → GetOrganizationBalanceHistory200Response.js} +22 -22
  107. package/dist/model/{GetBillingAccountBalanceHistory200ResponseDataInner.js → GetOrganizationBalanceHistory200ResponseDataInner.js} +22 -22
  108. package/dist/model/GetOrganizations200Response.js +1 -1
  109. package/dist/model/GetProducts200Response.js +1 -1
  110. package/dist/model/GetProjectMembers200Response.js +1 -1
  111. package/dist/model/GetProjectSecretsResponse.js +3 -2
  112. package/dist/model/GetProjects200Response.js +1 -1
  113. package/dist/model/GetRouteLogsUsage200Response.js +2 -2
  114. package/dist/model/GetSessionsUsage200Response.js +3 -3
  115. package/dist/model/GetWebhooks200Response.js +1 -1
  116. package/dist/model/GoogleRoute.js +6 -1
  117. package/dist/model/HealthLog.js +7 -4
  118. package/dist/model/HttpRoute.js +7 -2
  119. package/dist/model/Job.js +1 -1
  120. package/dist/model/JobDefinition.js +2 -2
  121. package/dist/model/JobDefinitionReportOptions.js +2 -1
  122. package/dist/model/JobDefinitionSelect.js +4 -3
  123. package/dist/model/JobDetail.js +1 -1
  124. package/dist/model/JobDetailAllOf.js +1 -1
  125. package/dist/model/JobRun.js +1 -1
  126. package/dist/model/Location.js +13 -7
  127. package/dist/model/Monitor.js +18 -12
  128. package/dist/model/MonitorAlertRoutesInner.js +60 -14
  129. package/dist/model/MqttRoute.js +14 -1
  130. package/dist/model/Note.js +2 -2
  131. package/dist/model/NoteInput.js +1 -1
  132. package/dist/model/Notefile.js +4 -2
  133. package/dist/model/NotefileSchema.js +5 -3
  134. package/dist/model/NotehubRoute.js +7 -3
  135. package/dist/model/NotehubRouteSummary.js +6 -1
  136. package/dist/model/OAuth2Error.js +1 -1
  137. package/dist/model/OAuth2TokenResponse.js +1 -1
  138. package/dist/model/Organization.js +5 -3
  139. package/dist/model/Product.js +8 -4
  140. package/dist/model/Project.js +7 -4
  141. package/dist/model/ProjectMember.js +5 -4
  142. package/dist/model/ProjectSecret.js +7 -7
  143. package/dist/model/ProvisionDeviceRequest.js +5 -5
  144. package/dist/model/ProxyRoute.js +6 -1
  145. package/dist/model/QubitroRoute.js +7 -1
  146. package/dist/model/RadRoute.js +9 -1
  147. package/dist/model/Repository.js +3 -3
  148. package/dist/model/RepositoryListResponse.js +3 -2
  149. package/dist/model/{Login200Response.js → RepositoryRecord.js} +52 -24
  150. package/dist/model/RepositoryTokenRequest.js +1 -1
  151. package/dist/model/RepositoryTokenResponse.js +1 -1
  152. package/dist/model/RouteLog.js +9 -9
  153. package/dist/model/RouteTransformSettings.js +5 -5
  154. package/dist/model/RunJob200Response.js +1 -1
  155. package/dist/model/S3ArchiveRoute.js +16 -1
  156. package/dist/model/SatelliteDataUsage.js +1 -1
  157. package/dist/model/SatellitePlan.js +1 -1
  158. package/dist/model/SchemaProperty.js +6 -4
  159. package/dist/model/SignalDevice200Response.js +2 -2
  160. package/dist/model/SimUsage.js +1 -1
  161. package/dist/model/Skill.js +210 -0
  162. package/dist/model/{GetBillingAccounts200Response.js → SkillLinks.js} +59 -40
  163. package/dist/model/{GetEventsByCursor200Response.js → SkillSet.js} +79 -51
  164. package/dist/model/SkillSummary.js +208 -0
  165. package/dist/model/SkillWrite.js +128 -0
  166. package/dist/model/SkillWriteResult.js +154 -0
  167. package/dist/model/SlackBearerNotification.js +31 -8
  168. package/dist/model/SlackRoute.js +9 -1
  169. package/dist/model/SlackWebHookNotification.js +31 -8
  170. package/dist/model/SnowflakeRoute.js +9 -1
  171. package/dist/model/SnowpipeStreamingRoute.js +12 -1
  172. package/dist/model/ThingworxRoute.js +6 -1
  173. package/dist/model/TowerLocation.js +1 -1
  174. package/dist/model/TwilioNotification.js +167 -0
  175. package/dist/model/TwilioRoute.js +9 -1
  176. package/dist/model/UpdateFleetRequest.js +7 -6
  177. package/dist/model/UpdateHostFirmwareRequest.js +4 -4
  178. package/dist/model/UpdateProjectSecretRequest.js +3 -3
  179. package/dist/model/UploadMetadata.js +1 -1
  180. package/dist/model/UsageApiData.js +3 -2
  181. package/dist/model/UsageData.js +7 -3
  182. package/dist/model/UsageEventsData.js +5 -2
  183. package/dist/model/UsageEventsResponse.js +4 -3
  184. package/dist/model/UsageRouteLogsData.js +10 -6
  185. package/dist/model/UsageSessionsData.js +11 -5
  186. package/dist/model/UserDfuStateMachine.js +1 -1
  187. package/dist/model/UserDfuStateMachineStatus.js +1 -1
  188. package/dist/model/UserFirmwareInfo.js +1 -1
  189. package/dist/model/WebhookSettings.js +4 -4
  190. package/package.json +1 -1
  191. package/dist/api/BillingAccountApi.js +0 -167
  192. package/dist/model/LoginRequest.js +0 -103
@@ -29,15 +29,15 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The HealthLog model module.
31
31
  * @module model/HealthLog
32
- * @version 6.7.0-beta.9
32
+ * @version 7.0.0-beta.1
33
33
  */
34
34
  var HealthLog = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>HealthLog</code>.
37
37
  * @alias module:model/HealthLog
38
- * @param alert {Boolean}
39
- * @param text {String}
40
- * @param when {Date}
38
+ * @param alert {Boolean} True if the entry was flagged as an alert.
39
+ * @param text {String} The log message. Restart entries begin with `boot`.
40
+ * @param when {Date} When the entry was recorded.
41
41
  */
42
42
  function HealthLog(alert, text, when) {
43
43
  _classCallCheck(this, HealthLog);
@@ -118,16 +118,19 @@ var HealthLog = /*#__PURE__*/function () {
118
118
  HealthLog.RequiredProperties = ["alert", "text", "when"];
119
119
 
120
120
  /**
121
+ * True if the entry was flagged as an alert.
121
122
  * @member {Boolean} alert
122
123
  */
123
124
  HealthLog.prototype["alert"] = undefined;
124
125
 
125
126
  /**
127
+ * The log message. Restart entries begin with `boot`.
126
128
  * @member {String} text
127
129
  */
128
130
  HealthLog.prototype["text"] = undefined;
129
131
 
130
132
  /**
133
+ * When the entry was recorded.
131
134
  * @member {Date} when
132
135
  */
133
136
  HealthLog.prototype["when"] = undefined;
@@ -28,7 +28,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
28
28
  /**
29
29
  * The HttpRoute model module.
30
30
  * @module model/HttpRoute
31
- * @version 6.7.0-beta.9
31
+ * @version 7.0.0-beta.1
32
32
  */
33
33
  var HttpRoute = /*#__PURE__*/function () {
34
34
  /**
@@ -124,6 +124,7 @@ var HttpRoute = /*#__PURE__*/function () {
124
124
  }]);
125
125
  }();
126
126
  /**
127
+ * If true, `http_headers` are not sent.
127
128
  * @member {Boolean} disable_http_headers
128
129
  */
129
130
  HttpRoute.prototype["disable_http_headers"] = undefined;
@@ -134,22 +135,25 @@ HttpRoute.prototype["disable_http_headers"] = undefined;
134
135
  HttpRoute.prototype["filter"] = undefined;
135
136
 
136
137
  /**
137
- * If non-empty, applies only to the listed fleets.
138
+ * FleetUIDs to send events from. Omit for all fleets; on create, `[]` sends none. Unknown UIDs are dropped.
138
139
  * @member {Array.<String>} fleets
139
140
  */
140
141
  HttpRoute.prototype["fleets"] = undefined;
141
142
 
142
143
  /**
144
+ * Extra HTTP headers to send; values may contain placeholders. A `Content-Type` or `User-Agent` here replaces the default.
143
145
  * @member {Object.<String, String>} http_headers
144
146
  */
145
147
  HttpRoute.prototype["http_headers"] = undefined;
146
148
 
147
149
  /**
150
+ * Minimum milliseconds between deliveries on this route; extra events wait their turn. `0` or omitted means no limit.
148
151
  * @member {Number} throttle_ms
149
152
  */
150
153
  HttpRoute.prototype["throttle_ms"] = undefined;
151
154
 
152
155
  /**
156
+ * Seconds to wait for the destination to respond. `0` or omitted uses 15.
153
157
  * @member {Number} timeout
154
158
  */
155
159
  HttpRoute.prototype["timeout"] = undefined;
@@ -160,6 +164,7 @@ HttpRoute.prototype["timeout"] = undefined;
160
164
  HttpRoute.prototype["transform"] = undefined;
161
165
 
162
166
  /**
167
+ * URL each event is POSTed to. Placeholders such as `[device]` are filled in per event. Required.
163
168
  * @member {String} url
164
169
  */
165
170
  HttpRoute.prototype["url"] = undefined;
package/dist/model/Job.js CHANGED
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The Job model module.
31
31
  * @module model/Job
32
- * @version 6.7.0-beta.9
32
+ * @version 7.0.0-beta.1
33
33
  */
34
34
  var Job = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The JobDefinition model module.
31
31
  * @module model/JobDefinition
32
- * @version 6.7.0-beta.9
32
+ * @version 7.0.0-beta.1
33
33
  */
34
34
  var JobDefinition = /*#__PURE__*/function () {
35
35
  /**
@@ -129,7 +129,7 @@ JobDefinition.prototype["comment"] = undefined;
129
129
  JobDefinition.prototype["default_requests"] = undefined;
130
130
 
131
131
  /**
132
- * Device-specific request overrides, keyed by device UID
132
+ * Device-specific request overrides, keyed by DeviceUID
133
133
  * @member {Object.<String, module:model/BatchJobRequests>} device_requests
134
134
  */
135
135
  JobDefinition.prototype["device_requests"] = undefined;
@@ -26,7 +26,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
26
26
  /**
27
27
  * The JobDefinitionReportOptions model module.
28
28
  * @module model/JobDefinitionReportOptions
29
- * @version 6.7.0-beta.9
29
+ * @version 7.0.0-beta.1
30
30
  */
31
31
  var JobDefinitionReportOptions = /*#__PURE__*/function () {
32
32
  /**
@@ -125,6 +125,7 @@ JobDefinitionReportOptions.prototype["app_info"] = undefined;
125
125
  JobDefinitionReportOptions.prototype["app_vars"] = undefined;
126
126
 
127
127
  /**
128
+ * Optional free-form note.
128
129
  * @member {String} comment
129
130
  */
130
131
  JobDefinitionReportOptions.prototype["comment"] = undefined;
@@ -26,7 +26,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
26
26
  /**
27
27
  * The JobDefinitionSelect model module.
28
28
  * @module model/JobDefinitionSelect
29
- * @version 6.7.0-beta.9
29
+ * @version 7.0.0-beta.1
30
30
  */
31
31
  var JobDefinitionSelect = /*#__PURE__*/function () {
32
32
  /**
@@ -116,12 +116,13 @@ var JobDefinitionSelect = /*#__PURE__*/function () {
116
116
  JobDefinitionSelect.prototype["all_devices"] = undefined;
117
117
 
118
118
  /**
119
+ * Optional free-form note.
119
120
  * @member {String} comment
120
121
  */
121
122
  JobDefinitionSelect.prototype["comment"] = undefined;
122
123
 
123
124
  /**
124
- * Specific device UIDs to include
125
+ * Specific DeviceUIDs to include
125
126
  * @member {Array.<String>} devices
126
127
  */
127
128
  JobDefinitionSelect.prototype["devices"] = undefined;
@@ -133,7 +134,7 @@ JobDefinitionSelect.prototype["devices"] = undefined;
133
134
  JobDefinitionSelect.prototype["devices_by_sn"] = undefined;
134
135
 
135
136
  /**
136
- * Fleet UIDs whose devices should be included
137
+ * FleetUIDs whose devices should be included
137
138
  * @member {Array.<String>} devices_in_fleets
138
139
  */
139
140
  JobDefinitionSelect.prototype["devices_in_fleets"] = undefined;
@@ -32,7 +32,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
32
32
  /**
33
33
  * The JobDetail model module.
34
34
  * @module model/JobDetail
35
- * @version 6.7.0-beta.9
35
+ * @version 7.0.0-beta.1
36
36
  */
37
37
  var JobDetail = /*#__PURE__*/function () {
38
38
  /**
@@ -27,7 +27,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
27
27
  /**
28
28
  * The JobDetailAllOf model module.
29
29
  * @module model/JobDetailAllOf
30
- * @version 6.7.0-beta.9
30
+ * @version 7.0.0-beta.1
31
31
  */
32
32
  var JobDetailAllOf = /*#__PURE__*/function () {
33
33
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The JobRun model module.
31
31
  * @module model/JobRun
32
- * @version 6.7.0-beta.9
32
+ * @version 7.0.0-beta.1
33
33
  */
34
34
  var JobRun = /*#__PURE__*/function () {
35
35
  /**
@@ -29,18 +29,18 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The Location model module.
31
31
  * @module model/Location
32
- * @version 6.7.0-beta.9
32
+ * @version 7.0.0-beta.1
33
33
  */
34
34
  var Location = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>Location</code>.
37
37
  * @alias module:model/Location
38
- * @param country {String}
39
- * @param latitude {Number}
40
- * @param longitude {Number}
41
- * @param name {String}
42
- * @param timezone {String}
43
- * @param when {String}
38
+ * @param country {String} Two-letter country code, e.g. `US`.
39
+ * @param latitude {Number} Latitude in degrees.
40
+ * @param longitude {Number} Longitude in degrees.
41
+ * @param name {String} Place name, e.g. `Waverly MI`.
42
+ * @param timezone {String} IANA time zone, e.g. `America/Detroit`.
43
+ * @param when {String} When the location was recorded, in RFC 3339 format. Empty if unknown.
44
44
  */
45
45
  function Location(country, latitude, longitude, name, timezone, when) {
46
46
  _classCallCheck(this, Location);
@@ -145,31 +145,37 @@ var Location = /*#__PURE__*/function () {
145
145
  Location.RequiredProperties = ["country", "latitude", "longitude", "name", "timezone", "when"];
146
146
 
147
147
  /**
148
+ * Two-letter country code, e.g. `US`.
148
149
  * @member {String} country
149
150
  */
150
151
  Location.prototype["country"] = undefined;
151
152
 
152
153
  /**
154
+ * Latitude in degrees.
153
155
  * @member {Number} latitude
154
156
  */
155
157
  Location.prototype["latitude"] = undefined;
156
158
 
157
159
  /**
160
+ * Longitude in degrees.
158
161
  * @member {Number} longitude
159
162
  */
160
163
  Location.prototype["longitude"] = undefined;
161
164
 
162
165
  /**
166
+ * Place name, e.g. `Waverly MI`.
163
167
  * @member {String} name
164
168
  */
165
169
  Location.prototype["name"] = undefined;
166
170
 
167
171
  /**
172
+ * IANA time zone, e.g. `America/Detroit`.
168
173
  * @member {String} timezone
169
174
  */
170
175
  Location.prototype["timezone"] = undefined;
171
176
 
172
177
  /**
178
+ * When the location was recorded, in RFC 3339 format. Empty if unknown.
173
179
  * @member {String} when
174
180
  */
175
181
  Location.prototype["when"] = undefined;
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The Monitor model module.
32
32
  * @module model/Monitor
33
- * @version 6.7.0-beta.9
33
+ * @version 7.0.0-beta.1
34
34
  */
35
35
  var Monitor = /*#__PURE__*/function () {
36
36
  /**
@@ -221,13 +221,13 @@ var Monitor = /*#__PURE__*/function () {
221
221
  }]);
222
222
  }();
223
223
  /**
224
- * Aggregate function to apply to the selected values before applying the condition. [none, avg, max, min, sum, count]
224
+ * How values in `aggregate_window` are combined before the comparison. - `none`: compare each value on its own - `avg`, `max`, `min`, `sum`: compare the average, largest, smallest or total - `count`: compare the number of matching events; needs no `source_selector`
225
225
  * @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
226
226
  */
227
227
  Monitor.prototype["aggregate_function"] = undefined;
228
228
 
229
229
  /**
230
- * The time window to aggregate the selected values. It follows the format of a number followed by a time unit
230
+ * The time window for `aggregate_function`, such as `10m` or `5h30m40s`.
231
231
  * @member {String} aggregate_window
232
232
  */
233
233
  Monitor.prototype["aggregate_window"] = undefined;
@@ -239,17 +239,19 @@ Monitor.prototype["aggregate_window"] = undefined;
239
239
  Monitor.prototype["alert"] = undefined;
240
240
 
241
241
  /**
242
+ * Where to send notifications, by email, Slack or Twilio. Required to create a monitor.
242
243
  * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
243
244
  */
244
245
  Monitor.prototype["alert_routes"] = undefined;
245
246
 
246
247
  /**
247
- * A comparison operation to apply to the value selected by the source_selector. Required for event and usage monitors; set automatically for heartbeat monitors. [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]
248
+ * How the value is compared with `threshold`. Required for event and usage monitors; heartbeat monitors always use `greater_than_or_equal_to`.
248
249
  * @member {module:model/Monitor.ConditionTypeEnum} condition_type
249
250
  */
250
251
  Monitor.prototype["condition_type"] = undefined;
251
252
 
252
253
  /**
254
+ * Free-form description.
253
255
  * @member {String} description
254
256
  * @default ''
255
257
  */
@@ -262,34 +264,37 @@ Monitor.prototype["description"] = "";
262
264
  Monitor.prototype["disabled"] = undefined;
263
265
 
264
266
  /**
267
+ * Watch only devices in these fleets (FleetUIDs).
265
268
  * @member {Array.<String>} fleet_filter
266
269
  */
267
270
  Monitor.prototype["fleet_filter"] = undefined;
268
271
 
269
272
  /**
270
- * The last time the monitor was evaluated and routed.
273
+ * When the monitor last sent notifications.
271
274
  * @member {String} last_routed_at
272
275
  */
273
276
  Monitor.prototype["last_routed_at"] = undefined;
274
277
 
275
278
  /**
279
+ * Monitor name. Required to create a monitor.
276
280
  * @member {String} name
277
281
  */
278
282
  Monitor.prototype["name"] = undefined;
279
283
 
280
284
  /**
285
+ * Watch only events from these notefiles, e.g. `data.qo`. Not allowed for heartbeat monitors.
281
286
  * @member {Array.<String>} notefile_filter
282
287
  */
283
288
  Monitor.prototype["notefile_filter"] = undefined;
284
289
 
285
290
  /**
286
- * 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.
291
+ * With an `aggregate_function`, aggregate each device on its own, so one device can raise an alert. If false, aggregate across all devices.
287
292
  * @member {Boolean} per_device
288
293
  */
289
294
  Monitor.prototype["per_device"] = undefined;
290
295
 
291
296
  /**
292
- * 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.
297
+ * How long to wait after notifying before notifying again, such as `10m` or `5h30m`. Defaults to `5m`.
293
298
  * @member {String} routing_cooldown_period
294
299
  */
295
300
  Monitor.prototype["routing_cooldown_period"] = undefined;
@@ -301,13 +306,13 @@ Monitor.prototype["routing_cooldown_period"] = undefined;
301
306
  Monitor.prototype["silenced"] = undefined;
302
307
 
303
308
  /**
304
- * A dot-delimited path to a single numeric value within the event body.
309
+ * Dot path to a numeric value inside the event body, such as `temperature`, not `body.temperature`. Required for event monitors unless `aggregate_function` is `count`.
305
310
  * @member {String} source_selector
306
311
  */
307
312
  Monitor.prototype["source_selector"] = undefined;
308
313
 
309
314
  /**
310
- * The type of source to monitor. Defaults to \"event\".
315
+ * What the monitor watches. Defaults to `event` on create. - `event`: a numeric value in event bodies, read with `source_selector` - `heartbeat`: devices that go `threshold` seconds without activity - `usage`: cellular or satellite data usage
311
316
  * @member {module:model/Monitor.SourceTypeEnum} source_type
312
317
  * @default 'event'
313
318
  */
@@ -320,24 +325,25 @@ Monitor.prototype["source_type"] = "event";
320
325
  Monitor.prototype["threshold"] = undefined;
321
326
 
322
327
  /**
328
+ * MonitorUID, `monitor:` followed by a UUID.
323
329
  * @member {String} uid
324
330
  */
325
331
  Monitor.prototype["uid"] = undefined;
326
332
 
327
333
  /**
328
- * For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\".
334
+ * For usage monitors, what usage is summed over. - `device`: each device on its own - `fleet`: each fleet in `fleet_filter` on its own. Requires `fleet_filter`, or the monitor never fires.
329
335
  * @member {String} usage_scope
330
336
  */
331
337
  Monitor.prototype["usage_scope"] = undefined;
332
338
 
333
339
  /**
334
- * For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\".
340
+ * For usage monitors, which data to watch. - `cellular`: cellular data - `satellite`: satellite data
335
341
  * @member {String} usage_type
336
342
  */
337
343
  Monitor.prototype["usage_type"] = undefined;
338
344
 
339
345
  /**
340
- * For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).
346
+ * For usage monitors, the rolling window to sum usage over, in days, e.g. `30`.
341
347
  * @member {Number} usage_window
342
348
  */
343
349
  Monitor.prototype["usage_window"] = undefined;
@@ -8,6 +8,7 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _EmailNotification = _interopRequireDefault(require("./EmailNotification"));
9
9
  var _SlackBearerNotification = _interopRequireDefault(require("./SlackBearerNotification"));
10
10
  var _SlackWebHookNotification = _interopRequireDefault(require("./SlackWebHookNotification"));
11
+ var _TwilioNotification = _interopRequireDefault(require("./TwilioNotification"));
11
12
  var _MonitorAlertRoutesInner;
12
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
14
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -31,13 +32,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
32
  /**
32
33
  * The MonitorAlertRoutesInner model module.
33
34
  * @module model/MonitorAlertRoutesInner
34
- * @version 6.7.0-beta.9
35
+ * @version 7.0.0-beta.1
35
36
  */
36
37
  var MonitorAlertRoutesInner = /*#__PURE__*/function () {
37
38
  /**
38
39
  * Constructs a new <code>MonitorAlertRoutesInner</code>.
39
40
  * @alias module:model/MonitorAlertRoutesInner
40
- * @param {(module:model/EmailNotification|module:model/SlackBearerNotification|module:model/SlackWebHookNotification)} instance The actual instance to initialize MonitorAlertRoutesInner.
41
+ * @param {(module:model/EmailNotification|module:model/SlackBearerNotification|module:model/SlackWebHookNotification|module:model/TwilioNotification)} instance The actual instance to initialize MonitorAlertRoutesInner.
41
42
  */
42
43
  function MonitorAlertRoutesInner() {
43
44
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -100,11 +101,26 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
100
101
  // json data failed to deserialize into EmailNotification
101
102
  errorMessages.push("Failed to construct EmailNotification: " + err);
102
103
  }
104
+ try {
105
+ if (typeof instance === "TwilioNotification") {
106
+ this.actualInstance = instance;
107
+ } else {
108
+ // plain JS object
109
+ // validate the object
110
+ _TwilioNotification["default"].validateJSON(instance); // throw an exception if no match
111
+ // create TwilioNotification from JS object
112
+ this.actualInstance = _TwilioNotification["default"].constructFromObject(instance);
113
+ }
114
+ match++;
115
+ } catch (err) {
116
+ // json data failed to deserialize into TwilioNotification
117
+ errorMessages.push("Failed to construct TwilioNotification: " + err);
118
+ }
103
119
  if (match > 1) {
104
- throw new Error("Multiple matches found constructing `MonitorAlertRoutesInner` with oneOf schemas EmailNotification, SlackBearerNotification, SlackWebHookNotification. Input: " + JSON.stringify(instance));
120
+ throw new Error("Multiple matches found constructing `MonitorAlertRoutesInner` with oneOf schemas EmailNotification, SlackBearerNotification, SlackWebHookNotification, TwilioNotification. Input: " + JSON.stringify(instance));
105
121
  } else if (match === 0) {
106
122
  this.actualInstance = null; // clear the actual instance in case there are multiple matches
107
- throw new Error("No match found constructing `MonitorAlertRoutesInner` with oneOf schemas EmailNotification, SlackBearerNotification, SlackWebHookNotification. Details: " + errorMessages.join(", "));
123
+ throw new Error("No match found constructing `MonitorAlertRoutesInner` with oneOf schemas EmailNotification, SlackBearerNotification, SlackWebHookNotification, TwilioNotification. Details: " + errorMessages.join(", "));
108
124
  } else {
109
125
  // only 1 match
110
126
  // the input is valid
@@ -122,16 +138,16 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
122
138
  key: "getActualInstance",
123
139
  value:
124
140
  /**
125
- * Gets the actaul instance, which can be <code>EmailNotification</code>, <code>SlackBearerNotification</code>, <code>SlackWebHookNotification</code>.
126
- * @return {(module:model/EmailNotification|module:model/SlackBearerNotification|module:model/SlackWebHookNotification)} The actual instance.
141
+ * Gets the actaul instance, which can be <code>EmailNotification</code>, <code>SlackBearerNotification</code>, <code>SlackWebHookNotification</code>, <code>TwilioNotification</code>.
142
+ * @return {(module:model/EmailNotification|module:model/SlackBearerNotification|module:model/SlackWebHookNotification|module:model/TwilioNotification)} The actual instance.
127
143
  */
128
144
  function getActualInstance() {
129
145
  return this.actualInstance;
130
146
  }
131
147
 
132
148
  /**
133
- * Sets the actaul instance, which can be <code>EmailNotification</code>, <code>SlackBearerNotification</code>, <code>SlackWebHookNotification</code>.
134
- * @param {(module:model/EmailNotification|module:model/SlackBearerNotification|module:model/SlackWebHookNotification)} obj The actual instance.
149
+ * Sets the actaul instance, which can be <code>EmailNotification</code>, <code>SlackBearerNotification</code>, <code>SlackWebHookNotification</code>, <code>TwilioNotification</code>.
150
+ * @param {(module:model/EmailNotification|module:model/SlackBearerNotification|module:model/SlackWebHookNotification|module:model/TwilioNotification)} obj The actual instance.
135
151
  */
136
152
  }, {
137
153
  key: "setActualInstance",
@@ -146,7 +162,7 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
146
162
  }]);
147
163
  }();
148
164
  /**
149
- * text or blocks
165
+ * How `text` is read. - `text`: plain message text - `blocks`: a Slack Block Kit JSON definition
150
166
  * @member {module:model/MonitorAlertRoutesInner.MessageTypeEnum} message_type
151
167
  */
152
168
  _MonitorAlertRoutesInner = MonitorAlertRoutesInner;
@@ -161,13 +177,13 @@ _defineProperty(MonitorAlertRoutesInner, "fromJSON", function (json_string) {
161
177
  MonitorAlertRoutesInner.prototype["message_type"] = undefined;
162
178
 
163
179
  /**
164
- * The text of the message, or the blocks definition
180
+ * The message, or Block Kit JSON. Event placeholders such as `[.body.temp]` aren't allowed.
165
181
  * @member {String} text
166
182
  */
167
183
  MonitorAlertRoutesInner.prototype["text"] = undefined;
168
184
 
169
185
  /**
170
- * The URL of the Slack webhook.
186
+ * The URL of the Slack webhook. Returned as `(omitted)`. Sending it back keeps the stored URL if the monitor has only one Slack webhook route.
171
187
  * @member {String} url
172
188
  */
173
189
  MonitorAlertRoutesInner.prototype["url"] = undefined;
@@ -179,15 +195,45 @@ MonitorAlertRoutesInner.prototype["url"] = undefined;
179
195
  MonitorAlertRoutesInner.prototype["channel"] = undefined;
180
196
 
181
197
  /**
182
- * The bearer token for the Slack app.
198
+ * The bearer token for the Slack app. Returned as `(omitted)`. Sending it back keeps the stored token if the monitor has only one Slack bearer route.
183
199
  * @member {String} token
184
200
  */
185
201
  MonitorAlertRoutesInner.prototype["token"] = undefined;
186
202
 
187
203
  /**
188
- * Email Address
204
+ * Email address, or several separated by commas.
189
205
  * @member {String} email
190
206
  */
191
207
  MonitorAlertRoutesInner.prototype["email"] = undefined;
192
- MonitorAlertRoutesInner.OneOf = ["EmailNotification", "SlackBearerNotification", "SlackWebHookNotification"];
208
+
209
+ /**
210
+ * The Twilio account SID.
211
+ * @member {String} account_sid
212
+ */
213
+ MonitorAlertRoutesInner.prototype["account_sid"] = undefined;
214
+
215
+ /**
216
+ * The Twilio auth token. Returned as `(omitted)`. Sending it back keeps the stored token if the monitor has only one Twilio route.
217
+ * @member {String} auth_token
218
+ */
219
+ MonitorAlertRoutesInner.prototype["auth_token"] = undefined;
220
+
221
+ /**
222
+ * The number to send the SMS from, in E.164 format, e.g. `+15551234567`.
223
+ * @member {String} from
224
+ */
225
+ MonitorAlertRoutesInner.prototype["from"] = undefined;
226
+
227
+ /**
228
+ * The text of the SMS. Event placeholders such as `[.body.temp]` aren't allowed.
229
+ * @member {String} message
230
+ */
231
+ MonitorAlertRoutesInner.prototype["message"] = undefined;
232
+
233
+ /**
234
+ * The number to send the SMS to, in E.164 format.
235
+ * @member {String} to
236
+ */
237
+ MonitorAlertRoutesInner.prototype["to"] = undefined;
238
+ MonitorAlertRoutesInner.OneOf = ["EmailNotification", "SlackBearerNotification", "SlackWebHookNotification", "TwilioNotification"];
193
239
  var _default = exports["default"] = MonitorAlertRoutesInner;
@@ -28,7 +28,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
28
28
  /**
29
29
  * The MqttRoute model module.
30
30
  * @module model/MqttRoute
31
- * @version 6.7.0-beta.9
31
+ * @version 7.0.0-beta.1
32
32
  */
33
33
  var MqttRoute = /*#__PURE__*/function () {
34
34
  /**
@@ -179,21 +179,25 @@ var MqttRoute = /*#__PURE__*/function () {
179
179
  }]);
180
180
  }();
181
181
  /**
182
+ * Broker URL with scheme `mqtt`, `mqtts`, `tcp`, `ssl`, `ws` or `wss`, e.g. `mqtts://broker.example.com`. Required.
182
183
  * @member {String} broker
183
184
  */
184
185
  MqttRoute.prototype["broker"] = undefined;
185
186
 
186
187
  /**
188
+ * PEM client certificate for TLS client authentication, used only with `key`. Returned as `(omitted)`; send `(omitted)` to keep the stored value.
187
189
  * @member {String} certificate
188
190
  */
189
191
  MqttRoute.prototype["certificate"] = undefined;
190
192
 
191
193
  /**
194
+ * Label for the certificate, such as its file name. Display only.
192
195
  * @member {String} certificate_name
193
196
  */
194
197
  MqttRoute.prototype["certificate_name"] = undefined;
195
198
 
196
199
  /**
200
+ * MQTT client ID for the broker connection; omit for a per-route default. Must be unique among MQTT routes on the same broker and port.
197
201
  * @member {String} client_id
198
202
  */
199
203
  MqttRoute.prototype["client_id"] = undefined;
@@ -204,41 +208,49 @@ MqttRoute.prototype["client_id"] = undefined;
204
208
  MqttRoute.prototype["filter"] = undefined;
205
209
 
206
210
  /**
211
+ * FleetUIDs to send events from. Omit for all fleets; on create, `[]` sends none. Unknown UIDs are dropped.
207
212
  * @member {Array.<String>} fleets
208
213
  */
209
214
  MqttRoute.prototype["fleets"] = undefined;
210
215
 
211
216
  /**
217
+ * PEM private key for `certificate`. Returned as `(omitted)`; send `(omitted)` to keep the stored value.
212
218
  * @member {String} key
213
219
  */
214
220
  MqttRoute.prototype["key"] = undefined;
215
221
 
216
222
  /**
223
+ * Password for authenticating with the broker. Returned as `(omitted)`; send `(omitted)` to keep the stored value.
217
224
  * @member {String} password
218
225
  */
219
226
  MqttRoute.prototype["password"] = undefined;
220
227
 
221
228
  /**
229
+ * Broker port, e.g. `8883`. Required.
222
230
  * @member {String} port
223
231
  */
224
232
  MqttRoute.prototype["port"] = undefined;
225
233
 
226
234
  /**
235
+ * Label for the private key, such as its file name. Display only.
227
236
  * @member {String} private_key_name
228
237
  */
229
238
  MqttRoute.prototype["private_key_name"] = undefined;
230
239
 
231
240
  /**
241
+ * Minimum milliseconds between deliveries on this route; extra events wait their turn. `0` or omitted means no limit.
232
242
  * @member {Number} throttle_ms
233
243
  */
234
244
  MqttRoute.prototype["throttle_ms"] = undefined;
235
245
 
236
246
  /**
247
+ * Seconds to wait when connecting to the broker or for it to acknowledge a publish. `0` or omitted uses 15.
237
248
  * @member {Number} timeout
238
249
  */
239
250
  MqttRoute.prototype["timeout"] = undefined;
240
251
 
241
252
  /**
253
+ * Topic each event is published to; placeholders such as `[device]` are filled in. Omitted uses `device/[device]`. `#` and `+` aren't allowed.
242
254
  * @member {String} topic
243
255
  */
244
256
  MqttRoute.prototype["topic"] = undefined;
@@ -249,6 +261,7 @@ MqttRoute.prototype["topic"] = undefined;
249
261
  MqttRoute.prototype["transform"] = undefined;
250
262
 
251
263
  /**
264
+ * Username for authenticating with the broker.
252
265
  * @member {String} username
253
266
  */
254
267
  MqttRoute.prototype["username"] = undefined;
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The Note model module.
31
31
  * @module model/Note
32
- * @version 6.7.0-beta.9
32
+ * @version 7.0.0-beta.1
33
33
  */
34
34
  var Note = /*#__PURE__*/function () {
35
35
  /**
@@ -172,7 +172,7 @@ Note.prototype["pending"] = undefined;
172
172
  Note.prototype["time"] = undefined;
173
173
 
174
174
  /**
175
- * Optional location/metadata string.
175
+ * Place name where the note was created, from its latitude and longitude. Empty if unknown.
176
176
  * @member {String} where
177
177
  */
178
178
  Note.prototype["where"] = undefined;