@blues-inc/notehub-js 6.7.0 → 7.0.0-beta.2

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 (196) hide show
  1. package/README.md +154 -150
  2. package/dist/ApiClient.js +3 -3
  3. package/dist/api/AlertApi.js +13 -8
  4. package/dist/api/AuthorizationApi.js +12 -51
  5. package/dist/api/DescriptionApi.js +50 -34
  6. package/dist/api/DeviceApi.js +278 -135
  7. package/dist/api/EventApi.js +68 -201
  8. package/dist/api/ExternalDevicesApi.js +20 -14
  9. package/dist/api/JobsApi.js +58 -40
  10. package/dist/api/MonitorApi.js +28 -18
  11. package/dist/api/OrganizationApi.js +26 -20
  12. package/dist/api/ProjectApi.js +260 -166
  13. package/dist/api/RouteApi.js +55 -40
  14. package/dist/api/SkillsApi.js +279 -0
  15. package/dist/api/UsageApi.js +74 -64
  16. package/dist/api/WebhookApi.js +68 -46
  17. package/dist/index.js +91 -63
  18. package/dist/model/AWSRoleConfig.js +2 -2
  19. package/dist/model/AddDeviceToFleetsRequest.js +4 -4
  20. package/dist/model/Alert.js +15 -10
  21. package/dist/model/AlertDataInner.js +10 -5
  22. package/dist/model/AlertNotificationsInner.js +15 -5
  23. package/dist/model/ArchiveStats.js +2 -2
  24. package/dist/model/AwsRoute.js +2 -2
  25. package/dist/model/AzureRoute.js +2 -2
  26. package/dist/model/BatchJobNoteRequest.js +2 -2
  27. package/dist/model/BatchJobRequests.js +6 -6
  28. package/dist/model/BillingAccount.js +2 -2
  29. package/dist/model/BillingAccountRole.js +1 -1
  30. package/dist/model/BlynkRoute.js +2 -2
  31. package/dist/model/Body.js +3 -2
  32. package/dist/model/CancelJobRun200Response.js +2 -2
  33. package/dist/model/CellularPlan.js +4 -3
  34. package/dist/model/CloneProjectRequest.js +8 -8
  35. package/dist/model/Contact.js +2 -2
  36. package/dist/model/CreateFleetRequest.js +5 -4
  37. package/dist/model/CreateJob201Response.js +2 -2
  38. package/dist/model/CreateMonitor.js +38 -26
  39. package/dist/model/CreateProductRequest.js +8 -7
  40. package/dist/model/CreateProjectRequest.js +6 -6
  41. package/dist/model/CreateProjectSecretRequest.js +6 -6
  42. package/dist/model/CreateUpdateRepository.js +4 -2
  43. package/dist/model/CreatedRepository.js +6 -6
  44. package/dist/model/CurrentFirmware.js +2 -2
  45. package/dist/model/DFUEnv.js +2 -2
  46. package/dist/model/DFUState.js +2 -2
  47. package/dist/model/DataField.js +2 -2
  48. package/dist/model/DataSet.js +5 -5
  49. package/dist/model/DataSetField.js +3 -3
  50. package/dist/model/DataUsage.js +2 -2
  51. package/dist/model/DatacakeRoute.js +2 -2
  52. package/dist/model/DatasetReloadProgress.js +2 -2
  53. package/dist/model/DeleteDeviceFromFleetsRequest.js +4 -4
  54. package/dist/model/DeleteJob200Response.js +2 -2
  55. package/dist/model/DeleteNotefilesRequest.js +3 -3
  56. package/dist/model/DescriptionRecord.js +7 -7
  57. package/dist/model/DescriptionRecordList.js +2 -2
  58. package/dist/model/Device.js +37 -9
  59. package/dist/model/DeviceDfuHistory.js +13 -3
  60. package/dist/model/DeviceDfuHistoryCurrent.js +3 -3
  61. package/dist/model/DeviceDfuHistoryPage.js +15 -2
  62. package/dist/model/DeviceDfuStateMachine.js +3 -2
  63. package/dist/model/DeviceDfuStateMachineNode.js +3 -3
  64. package/dist/model/DeviceDfuStatus.js +13 -4
  65. package/dist/model/DeviceDfuStatusPage.js +15 -2
  66. package/dist/model/DeviceSensor.js +2 -2
  67. package/dist/model/DeviceSession.js +6 -6
  68. package/dist/model/DeviceTowerInfo.js +7 -2
  69. package/dist/model/DeviceUsage.js +2 -2
  70. package/dist/model/DfuActionRequest.js +3 -3
  71. package/dist/model/EmailNotification.js +30 -7
  72. package/dist/model/EnvTreeJsonNode.js +2 -2
  73. package/dist/model/EnvVar.js +2 -2
  74. package/dist/model/EnvironmentVariables.js +2 -2
  75. package/dist/model/Error.js +2 -2
  76. package/dist/model/Event.js +17 -8
  77. package/dist/model/Filter.js +2 -2
  78. package/dist/model/Firmware.js +2 -2
  79. package/dist/model/FirmwareInfo.js +7 -7
  80. package/dist/model/Fleet.js +12 -11
  81. package/dist/model/FleetConnectivityAssurance.js +2 -2
  82. package/dist/model/GetAlerts200Response.js +15 -2
  83. package/dist/model/GetApiUsage200Response.js +3 -3
  84. package/dist/model/GetDataUsage200Response.js +3 -3
  85. package/dist/model/GetDataUsage200ResponseDataInner.js +4 -4
  86. package/dist/model/GetDbNote200Response.js +2 -2
  87. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +2 -2
  88. package/dist/model/GetDeviceFleets200Response.js +2 -2
  89. package/dist/model/GetDeviceHealthLog200Response.js +2 -2
  90. package/dist/model/GetDeviceJourney200Response.js +2 -2
  91. package/dist/model/GetDeviceJourney200ResponseJourney.js +2 -2
  92. package/dist/model/GetDeviceJourneys200Response.js +2 -2
  93. package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +2 -2
  94. package/dist/model/GetDeviceLatestEvents200Response.js +3 -3
  95. package/dist/model/GetDevicePlans200Response.js +3 -2
  96. package/dist/model/GetDevicePublicKey200Response.js +6 -4
  97. package/dist/model/GetDevicePublicKeys200Response.js +15 -2
  98. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +13 -2
  99. package/dist/model/GetDeviceSessions200Response.js +15 -2
  100. package/dist/model/GetDevices200Response.js +15 -2
  101. package/dist/model/GetEvents200Response.js +15 -2
  102. package/dist/model/GetJobRuns200Response.js +2 -2
  103. package/dist/model/GetJobs200Response.js +2 -2
  104. package/dist/model/GetNotefile200Response.js +2 -2
  105. package/dist/model/{GetBillingAccount200Response.js → GetOrganization200Response.js} +29 -29
  106. package/dist/model/{GetBillingAccount200ResponsePlan.js → GetOrganization200ResponsePlan.js} +25 -25
  107. package/dist/model/{GetBillingAccountBalanceHistory200Response.js → GetOrganizationBalanceHistory200Response.js} +23 -23
  108. package/dist/model/{GetBillingAccountBalanceHistory200ResponseDataInner.js → GetOrganizationBalanceHistory200ResponseDataInner.js} +23 -23
  109. package/dist/model/GetOrganizations200Response.js +2 -2
  110. package/dist/model/GetProducts200Response.js +2 -2
  111. package/dist/model/GetProjectMembers200Response.js +2 -2
  112. package/dist/model/GetProjectSecretsResponse.js +2 -2
  113. package/dist/model/GetProjects200Response.js +2 -2
  114. package/dist/model/GetRouteLogsUsage200Response.js +3 -3
  115. package/dist/model/GetSessionsUsage200Response.js +4 -4
  116. package/dist/model/GetWebhooks200Response.js +2 -2
  117. package/dist/model/GoogleRoute.js +2 -2
  118. package/dist/model/HealthLog.js +8 -5
  119. package/dist/model/HttpRoute.js +2 -2
  120. package/dist/model/Job.js +2 -2
  121. package/dist/model/JobDefinition.js +3 -3
  122. package/dist/model/JobDefinitionReportOptions.js +2 -2
  123. package/dist/model/JobDefinitionSelect.js +4 -4
  124. package/dist/model/JobDetail.js +2 -2
  125. package/dist/model/JobDetailAllOf.js +2 -2
  126. package/dist/model/JobRun.js +2 -2
  127. package/dist/model/Location.js +14 -8
  128. package/dist/model/Monitor.js +19 -13
  129. package/dist/model/MonitorAlertRoutesInner.js +61 -15
  130. package/dist/model/MqttRoute.js +2 -2
  131. package/dist/model/Note.js +3 -3
  132. package/dist/model/NoteInput.js +2 -2
  133. package/dist/model/Notefile.js +3 -2
  134. package/dist/model/NotefileSchema.js +6 -4
  135. package/dist/model/NotehubRoute.js +8 -4
  136. package/dist/model/NotehubRouteSummary.js +7 -2
  137. package/dist/model/OAuth2Error.js +2 -2
  138. package/dist/model/OAuth2TokenResponse.js +2 -2
  139. package/dist/model/Organization.js +6 -4
  140. package/dist/model/OrganizationRole.js +1 -1
  141. package/dist/model/Product.js +9 -5
  142. package/dist/model/Project.js +8 -5
  143. package/dist/model/ProjectMember.js +6 -5
  144. package/dist/model/ProjectSecret.js +8 -8
  145. package/dist/model/ProvisionDeviceRequest.js +6 -6
  146. package/dist/model/ProxyRoute.js +2 -2
  147. package/dist/model/QubitroRoute.js +2 -2
  148. package/dist/model/RadRoute.js +2 -2
  149. package/dist/model/Repository.js +4 -4
  150. package/dist/model/RepositoryListResponse.js +2 -2
  151. package/dist/model/RepositoryRecord.js +119 -0
  152. package/dist/model/RepositoryTokenRequest.js +2 -2
  153. package/dist/model/RepositoryTokenResponse.js +2 -2
  154. package/dist/model/Role.js +1 -1
  155. package/dist/model/RouteLog.js +10 -10
  156. package/dist/model/RouteTransformSettings.js +2 -2
  157. package/dist/model/RunJob200Response.js +2 -2
  158. package/dist/model/S3ArchiveRoute.js +2 -2
  159. package/dist/model/SatelliteDataUsage.js +2 -2
  160. package/dist/model/SatellitePlan.js +2 -2
  161. package/dist/model/SchemaProperty.js +7 -5
  162. package/dist/model/SignalDevice200Response.js +3 -3
  163. package/dist/model/SimUsage.js +2 -2
  164. package/dist/model/Skill.js +207 -0
  165. package/dist/model/{GetBillingAccounts200Response.js → SkillLinks.js} +60 -41
  166. package/dist/model/{GetEventsByCursor200Response.js → SkillSet.js} +76 -52
  167. package/dist/model/SkillSummary.js +205 -0
  168. package/dist/model/SkillWrite.js +128 -0
  169. package/dist/model/SkillWriteResult.js +153 -0
  170. package/dist/model/SlackBearerNotification.js +32 -9
  171. package/dist/model/SlackRoute.js +2 -2
  172. package/dist/model/SlackWebHookNotification.js +32 -9
  173. package/dist/model/SnowflakeRoute.js +2 -2
  174. package/dist/model/SnowpipeStreamingRoute.js +2 -2
  175. package/dist/model/ThingworxRoute.js +2 -2
  176. package/dist/model/TowerLocation.js +2 -2
  177. package/dist/model/TwilioNotification.js +167 -0
  178. package/dist/model/TwilioRoute.js +2 -2
  179. package/dist/model/UpdateFleetRequest.js +8 -7
  180. package/dist/model/UpdateHostFirmwareRequest.js +5 -5
  181. package/dist/model/UpdateProjectSecretRequest.js +4 -4
  182. package/dist/model/UploadMetadata.js +2 -2
  183. package/dist/model/UsageApiData.js +2 -2
  184. package/dist/model/UsageData.js +2 -2
  185. package/dist/model/UsageEventsData.js +2 -2
  186. package/dist/model/UsageEventsResponse.js +3 -3
  187. package/dist/model/UsageRouteLogsData.js +3 -3
  188. package/dist/model/UsageSessionsData.js +2 -2
  189. package/dist/model/UserDfuStateMachine.js +2 -2
  190. package/dist/model/UserDfuStateMachineStatus.js +2 -2
  191. package/dist/model/UserFirmwareInfo.js +2 -2
  192. package/dist/model/WebhookSettings.js +5 -5
  193. package/package.json +1 -1
  194. package/dist/api/BillingAccountApi.js +0 -167
  195. package/dist/model/Login200Response.js +0 -91
  196. package/dist/model/LoginRequest.js +0 -103
@@ -33,7 +33,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
33
33
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
34
34
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
35
35
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
36
- 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); } /**
36
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
37
37
  * Notehub API
38
38
  * The OpenAPI definition for the Notehub.io API.
39
39
  *
@@ -48,7 +48,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
48
48
  /**
49
49
  * Device service.
50
50
  * @module api/DeviceApi
51
- * @version 6.7.0
51
+ * @version 7.0.0-beta.2
52
52
  */
53
53
  var DeviceApi = exports["default"] = /*#__PURE__*/function () {
54
54
  /**
@@ -64,11 +64,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
64
64
  }
65
65
 
66
66
  /**
67
- * Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created
67
+ * Add a note to a .db notefile
68
+ * Add a note with the given ID to a database notefile on a device, synced to the Notecard on its next sync. To change an existing note, use `UpdateDbNote`; to queue a note in a `.qi` notefile, use `AddQiNote`. Requires the Owner or Developer role. Returns 400 unless the notefile ends in `.db` or `.dbs`, or if `payload` isn't valid base64.
68
69
  * @param {String} projectOrProductUID
69
70
  * @param {String} deviceUID
70
- * @param {String} notefileID
71
- * @param {String} noteID
71
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
72
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
72
73
  * @param {module:model/NoteInput} noteInput Body or payload of note to be added to the device
73
74
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
74
75
  */
@@ -113,11 +114,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
113
114
  }
114
115
 
115
116
  /**
116
- * Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created
117
+ * Add a note to a .db notefile
118
+ * Add a note with the given ID to a database notefile on a device, synced to the Notecard on its next sync. To change an existing note, use `UpdateDbNote`; to queue a note in a `.qi` notefile, use `AddQiNote`. Requires the Owner or Developer role. Returns 400 unless the notefile ends in `.db` or `.dbs`, or if `payload` isn't valid base64.
117
119
  * @param {String} projectOrProductUID
118
120
  * @param {String} deviceUID
119
- * @param {String} notefileID
120
- * @param {String} noteID
121
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
122
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
121
123
  * @param {module:model/NoteInput} noteInput Body or payload of note to be added to the device
122
124
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
123
125
  */
@@ -130,10 +132,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
130
132
  }
131
133
 
132
134
  /**
133
- * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
135
+ * Queue a note for a Notecard
136
+ * Add a note to an inbound queue (`.qi`) notefile on a device, creating the notefile if needed. The Notecard receives it on its next sync. For a `.db` notefile, use `AddDbNote`; to reach a connected Notecard immediately, use `SignalDevice`. Requires the Owner or Developer role. Returns 400 unless the notefile ends in `.qi` or `.qis`, or if `payload` isn't valid base64.
134
137
  * @param {String} projectOrProductUID
135
138
  * @param {String} deviceUID
136
- * @param {String} notefileID
139
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
137
140
  * @param {module:model/NoteInput} noteInput Body or payload of note to be added to the device
138
141
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
139
142
  */
@@ -173,10 +176,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
173
176
  }
174
177
 
175
178
  /**
176
- * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
179
+ * Queue a note for a Notecard
180
+ * Add a note to an inbound queue (`.qi`) notefile on a device, creating the notefile if needed. The Notecard receives it on its next sync. For a `.db` notefile, use `AddDbNote`; to reach a connected Notecard immediately, use `SignalDevice`. Requires the Owner or Developer role. Returns 400 unless the notefile ends in `.qi` or `.qis`, or if `payload` isn't valid base64.
177
181
  * @param {String} projectOrProductUID
178
182
  * @param {String} deviceUID
179
- * @param {String} notefileID
183
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
180
184
  * @param {module:model/NoteInput} noteInput Body or payload of note to be added to the device
181
185
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
182
186
  */
@@ -189,10 +193,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
189
193
  }
190
194
 
191
195
  /**
192
- * Creates an empty Notefile on the device.
196
+ * Create an empty notefile
197
+ * Create an empty notefile on a device. `AddQiNote` creates a notefile when needed, so this is only required for an empty one. Requires the Owner or Developer role. Returns 400 if the notefile already exists.
193
198
  * @param {String} projectOrProductUID
194
199
  * @param {String} deviceUID
195
- * @param {String} notefileID
200
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
196
201
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
197
202
  */
198
203
  }, {
@@ -227,10 +232,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
227
232
  }
228
233
 
229
234
  /**
230
- * Creates an empty Notefile on the device.
235
+ * Create an empty notefile
236
+ * Create an empty notefile on a device. `AddQiNote` creates a notefile when needed, so this is only required for an empty one. Requires the Owner or Developer role. Returns 400 if the notefile already exists.
231
237
  * @param {String} projectOrProductUID
232
238
  * @param {String} deviceUID
233
- * @param {String} notefileID
239
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
234
240
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
235
241
  */
236
242
  }, {
@@ -242,7 +248,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
242
248
  }
243
249
 
244
250
  /**
245
- * Delete Device
251
+ * Delete a device
252
+ * Delete a device and its notefiles from a project. Its events are kept. A Notecard that syncs again is added back as a new device; to block it instead, use `DisableDevice`. Requires the Owner or Developer role.
246
253
  * @param {String} projectOrProductUID
247
254
  * @param {String} deviceUID
248
255
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
@@ -274,7 +281,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
274
281
  }
275
282
 
276
283
  /**
277
- * Delete Device
284
+ * Delete a device
285
+ * Delete a device and its notefiles from a project. Its events are kept. A Notecard that syncs again is added back as a new device; to block it instead, use `DisableDevice`. Requires the Owner or Developer role.
278
286
  * @param {String} projectOrProductUID
279
287
  * @param {String} deviceUID
280
288
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
@@ -288,7 +296,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
288
296
  }
289
297
 
290
298
  /**
291
- * Delete environment variable of a device
299
+ * Delete a device environment variable
300
+ * Delete one device environment variable and return the ones left. Fleet and project variables with the same name then apply. Deleting a variable that doesn't exist succeeds. Requires the Owner or Developer role.
292
301
  * @param {String} projectOrProductUID
293
302
  * @param {String} deviceUID
294
303
  * @param {String} key The environment variable key to delete.
@@ -326,7 +335,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
326
335
  }
327
336
 
328
337
  /**
329
- * Delete environment variable of a device
338
+ * Delete a device environment variable
339
+ * Delete one device environment variable and return the ones left. Fleet and project variables with the same name then apply. Deleting a variable that doesn't exist succeeds. Requires the Owner or Developer role.
330
340
  * @param {String} projectOrProductUID
331
341
  * @param {String} deviceUID
332
342
  * @param {String} key The environment variable key to delete.
@@ -341,11 +351,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
341
351
  }
342
352
 
343
353
  /**
344
- * Delete a note from a .db or .qi notefile
354
+ * Delete a note
355
+ * Delete one note from a notefile on a device. To delete whole notefiles, use `DeleteNotefiles`. Requires the Owner or Developer role.
345
356
  * @param {String} projectOrProductUID
346
357
  * @param {String} deviceUID
347
- * @param {String} notefileID
348
- * @param {String} noteID
358
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
359
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
349
360
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
350
361
  */
351
362
  }, {
@@ -385,11 +396,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
385
396
  }
386
397
 
387
398
  /**
388
- * Delete a note from a .db or .qi notefile
399
+ * Delete a note
400
+ * Delete one note from a notefile on a device. To delete whole notefiles, use `DeleteNotefiles`. Requires the Owner or Developer role.
389
401
  * @param {String} projectOrProductUID
390
402
  * @param {String} deviceUID
391
- * @param {String} notefileID
392
- * @param {String} noteID
403
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
404
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
393
405
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
394
406
  */
395
407
  }, {
@@ -401,10 +413,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
401
413
  }
402
414
 
403
415
  /**
404
- * Deletes Notefiles and the Notes they contain.
416
+ * Delete notefiles
417
+ * Delete notefiles and all their notes from a device. To delete one note, use `DeleteNote`. Requires the Owner or Developer role. Returns 400 if `files` is empty.
405
418
  * @param {String} projectOrProductUID
406
419
  * @param {String} deviceUID
407
- * @param {module:model/DeleteNotefilesRequest} deleteNotefilesRequest
420
+ * @param {module:model/DeleteNotefilesRequest} deleteNotefilesRequest The notefiles to delete.
408
421
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
409
422
  */
410
423
  }, {
@@ -438,10 +451,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
438
451
  }
439
452
 
440
453
  /**
441
- * Deletes Notefiles and the Notes they contain.
454
+ * Delete notefiles
455
+ * Delete notefiles and all their notes from a device. To delete one note, use `DeleteNote`. Requires the Owner or Developer role. Returns 400 if `files` is empty.
442
456
  * @param {String} projectOrProductUID
443
457
  * @param {String} deviceUID
444
- * @param {module:model/DeleteNotefilesRequest} deleteNotefilesRequest
458
+ * @param {module:model/DeleteNotefilesRequest} deleteNotefilesRequest The notefiles to delete.
445
459
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
446
460
  */
447
461
  }, {
@@ -453,7 +467,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
453
467
  }
454
468
 
455
469
  /**
456
- * Disable Device
470
+ * Disable a device
471
+ * Stop a device from connecting to Notehub, ending any open session. The device and its data stay in the project; undo with `EnableDevice`. Does nothing if it's already disabled. Requires the Owner or Developer role.
457
472
  * @param {String} projectOrProductUID
458
473
  * @param {String} deviceUID
459
474
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
@@ -485,7 +500,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
485
500
  }
486
501
 
487
502
  /**
488
- * Disable Device
503
+ * Disable a device
504
+ * Stop a device from connecting to Notehub, ending any open session. The device and its data stay in the project; undo with `EnableDevice`. Does nothing if it's already disabled. Requires the Owner or Developer role.
489
505
  * @param {String} projectOrProductUID
490
506
  * @param {String} deviceUID
491
507
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
@@ -499,7 +515,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
499
515
  }
500
516
 
501
517
  /**
502
- * Enable Device
518
+ * Enable a device
519
+ * Re-enable a device turned off with `DisableDevice`, so it can connect to Notehub again. Does nothing if the device is already enabled. Requires the Owner or Developer role. Returns 409 if the device's cellular service was deactivated; it must be reactivated instead.
503
520
  * @param {String} projectOrProductUID
504
521
  * @param {String} deviceUID
505
522
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
@@ -531,7 +548,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
531
548
  }
532
549
 
533
550
  /**
534
- * Enable Device
551
+ * Enable a device
552
+ * Re-enable a device turned off with `DisableDevice`, so it can connect to Notehub again. Does nothing if the device is already enabled. Requires the Owner or Developer role. Returns 409 if the device's cellular service was deactivated; it must be reactivated instead.
535
553
  * @param {String} projectOrProductUID
536
554
  * @param {String} deviceUID
537
555
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
@@ -545,14 +563,15 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
545
563
  }
546
564
 
547
565
  /**
548
- * Get a note from a .db or .qi notefile
566
+ * Get a note
567
+ * Get one note's body, payload and time from a notefile on a device. To get every note in a notefile, use `GetNotefile`. With `delete=true`, the note is deleted after it is read, which requires the Owner or Developer role.
549
568
  * @param {String} projectOrProductUID
550
569
  * @param {String} deviceUID
551
- * @param {String} notefileID
552
- * @param {String} noteID
570
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
571
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
553
572
  * @param {Object} opts Optional parameters
554
- * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
555
- * @param {Boolean} opts.deleted Whether to return deleted notes
573
+ * @param {Boolean} opts._delete If true, delete the note after returning it. Requires the Owner or Developer role.
574
+ * @param {Boolean} opts.deleted If true, also return the note if it has been deleted.
556
575
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDbNote200Response} and HTTP response
557
576
  */
558
577
  }, {
@@ -596,14 +615,15 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
596
615
  }
597
616
 
598
617
  /**
599
- * Get a note from a .db or .qi notefile
618
+ * Get a note
619
+ * Get one note's body, payload and time from a notefile on a device. To get every note in a notefile, use `GetNotefile`. With `delete=true`, the note is deleted after it is read, which requires the Owner or Developer role.
600
620
  * @param {String} projectOrProductUID
601
621
  * @param {String} deviceUID
602
- * @param {String} notefileID
603
- * @param {String} noteID
622
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
623
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
604
624
  * @param {Object} opts Optional parameters
605
- * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
606
- * @param {Boolean} opts.deleted Whether to return deleted notes
625
+ * @param {Boolean} opts._delete If true, delete the note after returning it. Requires the Owner or Developer role.
626
+ * @param {Boolean} opts.deleted If true, also return the note if it has been deleted.
607
627
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDbNote200Response}
608
628
  */
609
629
  }, {
@@ -615,7 +635,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
615
635
  }
616
636
 
617
637
  /**
618
- * Get Device
638
+ * Get a device
639
+ * Get one device's details: serial number, product, fleets, locations, firmware versions, SIM usage and DFU state. To find devices by tag, serial number or other fields, use `GetDevices`.
619
640
  * @param {String} projectOrProductUID
620
641
  * @param {String} deviceUID
621
642
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Device} and HTTP response
@@ -647,7 +668,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
647
668
  }
648
669
 
649
670
  /**
650
- * Get Device
671
+ * Get a device
672
+ * Get one device's details: serial number, product, fleets, locations, firmware versions, SIM usage and DFU state. To find devices by tag, serial number or other fields, use `GetDevices`.
651
673
  * @param {String} projectOrProductUID
652
674
  * @param {String} deviceUID
653
675
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Device}
@@ -661,7 +683,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
661
683
  }
662
684
 
663
685
  /**
664
- * Get environment variable hierarchy for a device
686
+ * Get a device's environment hierarchy
687
+ * Get a device's environment variables and the fleet and project variables it inherits, as a tree. Each variable has its precedence and whether it is used or overridden. For just the resolved values, use `GetDeviceEnvironmentVariables`.
665
688
  * @param {String} projectOrProductUID
666
689
  * @param {String} deviceUID
667
690
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvTreeJsonNode} and HTTP response
@@ -693,7 +716,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
693
716
  }
694
717
 
695
718
  /**
696
- * Get environment variable hierarchy for a device
719
+ * Get a device's environment hierarchy
720
+ * Get a device's environment variables and the fleet and project variables it inherits, as a tree. Each variable has its precedence and whether it is used or overridden. For just the resolved values, use `GetDeviceEnvironmentVariables`.
697
721
  * @param {String} projectOrProductUID
698
722
  * @param {String} deviceUID
699
723
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvTreeJsonNode}
@@ -707,7 +731,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
707
731
  }
708
732
 
709
733
  /**
710
- * Get environment variables of a device
734
+ * Get device environment variables
735
+ * Get a device's own environment variables, its `env.default` values, and its effective values. Effective values merge in project and fleet variables, which device variables override. To see where each value comes from, use `GetDeviceEnvironmentHierarchy`.
711
736
  * @param {String} projectOrProductUID
712
737
  * @param {String} deviceUID
713
738
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response} and HTTP response
@@ -739,7 +764,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
739
764
  }
740
765
 
741
766
  /**
742
- * Get environment variables of a device
767
+ * Get device environment variables
768
+ * Get a device's own environment variables, its `env.default` values, and its effective values. Effective values merge in project and fleet variables, which device variables override. To see where each value comes from, use `GetDeviceEnvironmentHierarchy`.
743
769
  * @param {String} projectOrProductUID
744
770
  * @param {String} deviceUID
745
771
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response}
@@ -753,10 +779,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
753
779
  }
754
780
 
755
781
  /**
756
- * Get environment variables of a device with device pin authorization
782
+ * Get device environment variables using a PIN
783
+ * Get a device's environment variables using its PIN instead of an API token. Pass the PIN in `X-Auth-Token`. Made for device dashboard pages; with a token, use `GetDeviceEnvironmentVariables`, which also returns effective values. Returns 401 if the project's device dashboard URL has no `[pin]`, or the PIN is wrong.
757
784
  * @param {String} productUID
758
785
  * @param {String} deviceUID
759
- * @param {String} xAuthToken For accessing endpoints by Device pin.
786
+ * @param {String} xAuthToken The device's PIN, used instead of an API token.
760
787
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response} and HTTP response
761
788
  */
762
789
  }, {
@@ -792,10 +819,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
792
819
  }
793
820
 
794
821
  /**
795
- * Get environment variables of a device with device pin authorization
822
+ * Get device environment variables using a PIN
823
+ * Get a device's environment variables using its PIN instead of an API token. Pass the PIN in `X-Auth-Token`. Made for device dashboard pages; with a token, use `GetDeviceEnvironmentVariables`, which also returns effective values. Returns 401 if the project's device dashboard URL has no `[pin]`, or the PIN is wrong.
796
824
  * @param {String} productUID
797
825
  * @param {String} deviceUID
798
- * @param {String} xAuthToken For accessing endpoints by Device pin.
826
+ * @param {String} xAuthToken The device's PIN, used instead of an API token.
799
827
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response}
800
828
  */
801
829
  }, {
@@ -807,13 +835,14 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
807
835
  }
808
836
 
809
837
  /**
810
- * Get Device Health Log
838
+ * Get a device's health log
839
+ * Get a device's health log: timestamped status messages such as restarts and completed firmware updates. Only the latest 100 entries are kept. To filter by date, pass both `startDate` and `endDate`; `startDate` alone returns 400, and the same value for both returns every entry.
811
840
  * @param {String} projectOrProductUID
812
841
  * @param {String} deviceUID
813
842
  * @param {Object} opts Optional parameters
814
843
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
815
844
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
816
- * @param {Array.<module:model/String>} opts.logType Return only specified log types
845
+ * @param {Array.<module:model/String>} opts.logType Return only these kinds of entry. If omitted, all entries are returned. - `boot`: the device restarted - `dfu_completed`: a host firmware update finished
817
846
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceHealthLog200Response} and HTTP response
818
847
  */
819
848
  }, {
@@ -848,13 +877,14 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
848
877
  }
849
878
 
850
879
  /**
851
- * Get Device Health Log
880
+ * Get a device's health log
881
+ * Get a device's health log: timestamped status messages such as restarts and completed firmware updates. Only the latest 100 entries are kept. To filter by date, pass both `startDate` and `endDate`; `startDate` alone returns 400, and the same value for both returns every entry.
852
882
  * @param {String} projectOrProductUID
853
883
  * @param {String} deviceUID
854
884
  * @param {Object} opts Optional parameters
855
885
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
856
886
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
857
- * @param {Array.<module:model/String>} opts.logType Return only specified log types
887
+ * @param {Array.<module:model/String>} opts.logType Return only these kinds of entry. If omitted, all entries are returned. - `boot`: the device restarted - `dfu_completed`: a host firmware update finished
858
888
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceHealthLog200Response}
859
889
  */
860
890
  }, {
@@ -866,12 +896,13 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
866
896
  }
867
897
 
868
898
  /**
869
- * Get a single journey for a device along with its events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages.
899
+ * Get a journey and its events
900
+ * Get one journey's start and end time and its events, oldest first. Only events with a location are included, and a run of events at the same location is reduced to the first. The events are paginated; `journey.has_more` is true if there are more. Returns 404 if the journey doesn't exist, and 403 if the organization is suspended.
870
901
  * @param {String} projectOrProductUID
871
902
  * @param {String} deviceUID
872
903
  * @param {Number} journeyID Identifier of the journey, taken from the numeric `journey` field in the event body (a Unix timestamp marking the start of the journey).
873
904
  * @param {Object} opts Optional parameters
874
- * @param {Number} opts.pageSize (default to 50)
905
+ * @param {Number} opts.pageSize (default to 1000)
875
906
  * @param {Number} opts.pageNum (default to 1)
876
907
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceJourney200Response} and HTTP response
877
908
  */
@@ -911,12 +942,13 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
911
942
  }
912
943
 
913
944
  /**
914
- * Get a single journey for a device along with its events. The events array is paginated via `pageSize` / `pageNum`; use `journey.has_more` to detect additional pages.
945
+ * Get a journey and its events
946
+ * Get one journey's start and end time and its events, oldest first. Only events with a location are included, and a run of events at the same location is reduced to the first. The events are paginated; `journey.has_more` is true if there are more. Returns 404 if the journey doesn't exist, and 403 if the organization is suspended.
915
947
  * @param {String} projectOrProductUID
916
948
  * @param {String} deviceUID
917
949
  * @param {Number} journeyID Identifier of the journey, taken from the numeric `journey` field in the event body (a Unix timestamp marking the start of the journey).
918
950
  * @param {Object} opts Optional parameters
919
- * @param {Number} opts.pageSize (default to 50)
951
+ * @param {Number} opts.pageSize (default to 1000)
920
952
  * @param {Number} opts.pageNum (default to 1)
921
953
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceJourney200Response}
922
954
  */
@@ -929,7 +961,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
929
961
  }
930
962
 
931
963
  /**
932
- * Get the list of journeys for a device, derived from events whose body contains `journey` and `jcount` fields. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit.
964
+ * List a device's journeys
965
+ * List a device's journeys, newest first, without their events. A journey is the events whose body has the same `journey` value and a `jcount` field; one-event journeys are left out. For a journey's events, use `GetDeviceJourney`. Returns at most 100; `has_more` is true if there are more. `startDate` and `endDate` filter on the journey's start. Returns 403 if the organization is suspended.
933
966
  * @param {String} projectOrProductUID
934
967
  * @param {String} deviceUID
935
968
  * @param {Object} opts Optional parameters
@@ -968,7 +1001,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
968
1001
  }
969
1002
 
970
1003
  /**
971
- * Get the list of journeys for a device, derived from events whose body contains `journey` and `jcount` fields. Returns journey metadata only (no event payloads). Capped at 100 most recent journeys; `has_more` is true when the cap is hit.
1004
+ * List a device's journeys
1005
+ * List a device's journeys, newest first, without their events. A journey is the events whose body has the same `journey` value and a `jcount` field; one-event journeys are left out. For a journey's events, use `GetDeviceJourney`. Returns at most 100; `has_more` is true if there are more. `startDate` and `endDate` filter on the journey's start. Returns 403 if the organization is suspended.
972
1006
  * @param {String} projectOrProductUID
973
1007
  * @param {String} deviceUID
974
1008
  * @param {Object} opts Optional parameters
@@ -985,7 +1019,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
985
1019
  }
986
1020
 
987
1021
  /**
988
- * Get Device Latest Events
1022
+ * Get a device's latest event per notefile
1023
+ * Get the most recent event from each of a device's notefiles, sorted by notefile name. `_env.qo` is left out. To search a device's event history, use `GetEvents`. Returns 403 if the organization is suspended.
989
1024
  * @param {String} projectOrProductUID
990
1025
  * @param {String} deviceUID
991
1026
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceLatestEvents200Response} and HTTP response
@@ -1017,7 +1052,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1017
1052
  }
1018
1053
 
1019
1054
  /**
1020
- * Get Device Latest Events
1055
+ * Get a device's latest event per notefile
1056
+ * Get the most recent event from each of a device's notefiles, sorted by notefile name. `_env.qo` is left out. To search a device's event history, use `GetEvents`. Returns 403 if the organization is suspended.
1021
1057
  * @param {String} projectOrProductUID
1022
1058
  * @param {String} deviceUID
1023
1059
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceLatestEvents200Response}
@@ -1031,7 +1067,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1031
1067
  }
1032
1068
 
1033
1069
  /**
1034
- * Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.
1070
+ * Get a device's cellular data plans
1071
+ * Get the data plan of each cellular SIM in a device: plan type, data used and remaining, and expiry. Covers the built-in SIM and any external SIM, but not satellite plans. Returns 404 if the device has no cellular or satellite SIM.
1035
1072
  * @param {String} projectOrProductUID
1036
1073
  * @param {String} deviceUID
1037
1074
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevicePlans200Response} and HTTP response
@@ -1063,7 +1100,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1063
1100
  }
1064
1101
 
1065
1102
  /**
1066
- * Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.
1103
+ * Get a device's cellular data plans
1104
+ * Get the data plan of each cellular SIM in a device: plan type, data used and remaining, and expiry. Covers the built-in SIM and any external SIM, but not satellite plans. Returns 404 if the device has no cellular or satellite SIM.
1067
1105
  * @param {String} projectOrProductUID
1068
1106
  * @param {String} deviceUID
1069
1107
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevicePlans200Response}
@@ -1077,7 +1115,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1077
1115
  }
1078
1116
 
1079
1117
  /**
1080
- * Get Device Public Key
1118
+ * Get a device's public key
1119
+ * Get one Notecard's public key, in PEM format. For every device in the project, use `GetDevicePublicKeys`.
1081
1120
  * @param {String} projectOrProductUID
1082
1121
  * @param {String} deviceUID
1083
1122
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevicePublicKey200Response} and HTTP response
@@ -1109,7 +1148,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1109
1148
  }
1110
1149
 
1111
1150
  /**
1112
- * Get Device Public Key
1151
+ * Get a device's public key
1152
+ * Get one Notecard's public key, in PEM format. For every device in the project, use `GetDevicePublicKeys`.
1113
1153
  * @param {String} projectOrProductUID
1114
1154
  * @param {String} deviceUID
1115
1155
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevicePublicKey200Response}
@@ -1123,11 +1163,13 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1123
1163
  }
1124
1164
 
1125
1165
  /**
1126
- * Get Device Public Keys of a Project
1166
+ * List public keys of all devices
1167
+ * List the public key of every device in a project. For one device, use `GetDevicePublicKey`. Paginated. Deleted devices are included only when reading with a `cursor`.
1127
1168
  * @param {String} projectOrProductUID
1128
1169
  * @param {Object} opts Optional parameters
1129
- * @param {Number} opts.pageSize (default to 50)
1170
+ * @param {Number} opts.pageSize (default to 1000)
1130
1171
  * @param {Number} opts.pageNum (default to 1)
1172
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1131
1173
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevicePublicKeys200Response} and HTTP response
1132
1174
  */
1133
1175
  }, {
@@ -1144,7 +1186,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1144
1186
  };
1145
1187
  var queryParams = {
1146
1188
  pageSize: opts["pageSize"],
1147
- pageNum: opts["pageNum"]
1189
+ pageNum: opts["pageNum"],
1190
+ cursor: opts["cursor"]
1148
1191
  };
1149
1192
  var headerParams = {};
1150
1193
  var formParams = {};
@@ -1156,11 +1199,13 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1156
1199
  }
1157
1200
 
1158
1201
  /**
1159
- * Get Device Public Keys of a Project
1202
+ * List public keys of all devices
1203
+ * List the public key of every device in a project. For one device, use `GetDevicePublicKey`. Paginated. Deleted devices are included only when reading with a `cursor`.
1160
1204
  * @param {String} projectOrProductUID
1161
1205
  * @param {Object} opts Optional parameters
1162
- * @param {Number} opts.pageSize (default to 50)
1206
+ * @param {Number} opts.pageSize (default to 1000)
1163
1207
  * @param {Number} opts.pageNum (default to 1)
1208
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1164
1209
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevicePublicKeys200Response}
1165
1210
  */
1166
1211
  }, {
@@ -1172,15 +1217,17 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1172
1217
  }
1173
1218
 
1174
1219
  /**
1175
- * Get Device Sessions
1220
+ * List a device's sessions
1221
+ * List a device's sessions, its connections to Notehub. Each shows why it opened and closed, signal strength, location and data usage. `startDate` and `endDate` filter on when the session began. For every device's sessions, use `GetSessions`. Paginated.
1176
1222
  * @param {String} projectOrProductUID
1177
1223
  * @param {String} deviceUID
1178
1224
  * @param {Object} opts Optional parameters
1179
- * @param {Number} opts.pageSize (default to 50)
1225
+ * @param {Number} opts.pageSize (default to 1000)
1180
1226
  * @param {Number} opts.pageNum (default to 1)
1227
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1181
1228
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
1182
1229
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
1183
- * @param {Boolean} opts.firstSync When true, filters results to only show first sync sessions (default to false)
1230
+ * @param {Boolean} opts.firstSync If true, return only sessions whose `why_session_opened` begins with \"first sync\". (default to false)
1184
1231
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceSessions200Response} and HTTP response
1185
1232
  */
1186
1233
  }, {
@@ -1203,6 +1250,7 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1203
1250
  var queryParams = {
1204
1251
  pageSize: opts["pageSize"],
1205
1252
  pageNum: opts["pageNum"],
1253
+ cursor: opts["cursor"],
1206
1254
  startDate: opts["startDate"],
1207
1255
  endDate: opts["endDate"],
1208
1256
  firstSync: opts["firstSync"]
@@ -1217,15 +1265,17 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1217
1265
  }
1218
1266
 
1219
1267
  /**
1220
- * Get Device Sessions
1268
+ * List a device's sessions
1269
+ * List a device's sessions, its connections to Notehub. Each shows why it opened and closed, signal strength, location and data usage. `startDate` and `endDate` filter on when the session began. For every device's sessions, use `GetSessions`. Paginated.
1221
1270
  * @param {String} projectOrProductUID
1222
1271
  * @param {String} deviceUID
1223
1272
  * @param {Object} opts Optional parameters
1224
- * @param {Number} opts.pageSize (default to 50)
1273
+ * @param {Number} opts.pageSize (default to 1000)
1225
1274
  * @param {Number} opts.pageNum (default to 1)
1275
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1226
1276
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
1227
1277
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
1228
- * @param {Boolean} opts.firstSync When true, filters results to only show first sync sessions (default to false)
1278
+ * @param {Boolean} opts.firstSync If true, return only sessions whose `why_session_opened` begins with \"first sync\". (default to false)
1229
1279
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceSessions200Response}
1230
1280
  */
1231
1281
  }, {
@@ -1237,19 +1287,21 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1237
1287
  }
1238
1288
 
1239
1289
  /**
1240
- * Get Devices of a Project
1290
+ * List devices in a project
1291
+ * List the devices in a project, with optional filters such as tag, serial number, fleet, location and firmware version. For one fleet's devices, use `GetFleetDevices`. Paginated.
1241
1292
  * @param {String} projectOrProductUID
1242
1293
  * @param {Object} opts Optional parameters
1243
- * @param {Number} opts.pageSize (default to 50)
1294
+ * @param {Number} opts.pageSize (default to 1000)
1244
1295
  * @param {Number} opts.pageNum (default to 1)
1245
- * @param {Array.<String>} opts.deviceUID A Device UID.
1296
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1297
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
1246
1298
  * @param {Array.<String>} opts.tag Tag filter. Matches the whole tag, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally. For example, `51*` matches tags starting with `51`.
1247
1299
  * @param {Array.<String>} opts.serialNumber Serial number filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1248
1300
  * @param {Array.<String>} opts.fleetUID
1249
1301
  * @param {Array.<String>} opts.notecardFirmware Firmware version filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1250
1302
  * @param {Array.<String>} opts.location Location filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1251
1303
  * @param {Array.<String>} opts.hostFirmware Host firmware filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1252
- * @param {Array.<String>} opts.productUID Product UID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1304
+ * @param {Array.<String>} opts.productUID ProductUID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1253
1305
  * @param {Array.<String>} opts.sku SKU filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1254
1306
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevices200Response} and HTTP response
1255
1307
  */
@@ -1268,6 +1320,7 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1268
1320
  var queryParams = {
1269
1321
  pageSize: opts["pageSize"],
1270
1322
  pageNum: opts["pageNum"],
1323
+ cursor: opts["cursor"],
1271
1324
  deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
1272
1325
  tag: this.apiClient.buildCollectionParam(opts["tag"], "multi"),
1273
1326
  serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
@@ -1288,19 +1341,21 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1288
1341
  }
1289
1342
 
1290
1343
  /**
1291
- * Get Devices of a Project
1344
+ * List devices in a project
1345
+ * List the devices in a project, with optional filters such as tag, serial number, fleet, location and firmware version. For one fleet's devices, use `GetFleetDevices`. Paginated.
1292
1346
  * @param {String} projectOrProductUID
1293
1347
  * @param {Object} opts Optional parameters
1294
- * @param {Number} opts.pageSize (default to 50)
1348
+ * @param {Number} opts.pageSize (default to 1000)
1295
1349
  * @param {Number} opts.pageNum (default to 1)
1296
- * @param {Array.<String>} opts.deviceUID A Device UID.
1350
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1351
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
1297
1352
  * @param {Array.<String>} opts.tag Tag filter. Matches the whole tag, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally. For example, `51*` matches tags starting with `51`.
1298
1353
  * @param {Array.<String>} opts.serialNumber Serial number filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1299
1354
  * @param {Array.<String>} opts.fleetUID
1300
1355
  * @param {Array.<String>} opts.notecardFirmware Firmware version filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1301
1356
  * @param {Array.<String>} opts.location Location filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1302
1357
  * @param {Array.<String>} opts.hostFirmware Host firmware filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1303
- * @param {Array.<String>} opts.productUID Product UID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1358
+ * @param {Array.<String>} opts.productUID ProductUID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1304
1359
  * @param {Array.<String>} opts.sku SKU filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1305
1360
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevices200Response}
1306
1361
  */
@@ -1313,19 +1368,21 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1313
1368
  }
1314
1369
 
1315
1370
  /**
1316
- * Get Devices of a Fleet within a Project
1371
+ * List devices in a fleet
1372
+ * List the devices in one fleet, with the same filters as `GetDevices`. To list a device's fleets instead, use `GetDeviceFleets`. Paginated. Returns 404 if the fleet doesn't exist.
1317
1373
  * @param {String} projectOrProductUID
1318
1374
  * @param {String} fleetUID
1319
1375
  * @param {Object} opts Optional parameters
1320
- * @param {Number} opts.pageSize (default to 50)
1376
+ * @param {Number} opts.pageSize (default to 1000)
1321
1377
  * @param {Number} opts.pageNum (default to 1)
1322
- * @param {Array.<String>} opts.deviceUID A Device UID.
1378
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1379
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
1323
1380
  * @param {Array.<String>} opts.tag Tag filter. Matches the whole tag, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally. For example, `51*` matches tags starting with `51`.
1324
1381
  * @param {Array.<String>} opts.serialNumber Serial number filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1325
1382
  * @param {Array.<String>} opts.notecardFirmware Firmware version filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1326
1383
  * @param {Array.<String>} opts.location Location filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1327
1384
  * @param {Array.<String>} opts.hostFirmware Host firmware filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1328
- * @param {Array.<String>} opts.productUID Product UID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1385
+ * @param {Array.<String>} opts.productUID ProductUID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1329
1386
  * @param {Array.<String>} opts.sku SKU filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1330
1387
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevices200Response} and HTTP response
1331
1388
  */
@@ -1349,6 +1406,7 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1349
1406
  var queryParams = {
1350
1407
  pageSize: opts["pageSize"],
1351
1408
  pageNum: opts["pageNum"],
1409
+ cursor: opts["cursor"],
1352
1410
  deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
1353
1411
  tag: this.apiClient.buildCollectionParam(opts["tag"], "multi"),
1354
1412
  serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
@@ -1368,19 +1426,21 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1368
1426
  }
1369
1427
 
1370
1428
  /**
1371
- * Get Devices of a Fleet within a Project
1429
+ * List devices in a fleet
1430
+ * List the devices in one fleet, with the same filters as `GetDevices`. To list a device's fleets instead, use `GetDeviceFleets`. Paginated. Returns 404 if the fleet doesn't exist.
1372
1431
  * @param {String} projectOrProductUID
1373
1432
  * @param {String} fleetUID
1374
1433
  * @param {Object} opts Optional parameters
1375
- * @param {Number} opts.pageSize (default to 50)
1434
+ * @param {Number} opts.pageSize (default to 1000)
1376
1435
  * @param {Number} opts.pageNum (default to 1)
1377
- * @param {Array.<String>} opts.deviceUID A Device UID.
1436
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1437
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
1378
1438
  * @param {Array.<String>} opts.tag Tag filter. Matches the whole tag, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally. For example, `51*` matches tags starting with `51`.
1379
1439
  * @param {Array.<String>} opts.serialNumber Serial number filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1380
1440
  * @param {Array.<String>} opts.notecardFirmware Firmware version filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1381
1441
  * @param {Array.<String>} opts.location Location filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1382
1442
  * @param {Array.<String>} opts.hostFirmware Host firmware filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1383
- * @param {Array.<String>} opts.productUID Product UID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1443
+ * @param {Array.<String>} opts.productUID ProductUID filter. Matches any value containing the filter text, case-insensitive. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1384
1444
  * @param {Array.<String>} opts.sku SKU filter. Matches any value containing the filter text. Use `*` as a wildcard and `\\*` to match a literal `*`; all other characters, including `%` and `_`, match literally.
1385
1445
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevices200Response}
1386
1446
  */
@@ -1393,14 +1453,15 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1393
1453
  }
1394
1454
 
1395
1455
  /**
1396
- * For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile
1456
+ * Get the notes in a notefile
1457
+ * Get the notes in one notefile on a device. For a `.qi` notefile, that's the notes still queued; for a `.db` notefile, every note. To list all of a device's notefiles with their notes, use `ListNotefiles`. With `delete=true`, the returned notes are deleted, which requires the Owner or Developer role. Returns 400 if `notefileID` has no valid notefile extension.
1397
1458
  * @param {String} projectOrProductUID
1398
1459
  * @param {String} deviceUID
1399
- * @param {String} notefileID
1460
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
1400
1461
  * @param {Object} opts Optional parameters
1401
- * @param {Number} opts.max The maximum number of Notes to return in the request.
1402
- * @param {Boolean} opts.deleted true to return deleted notes.
1403
- * @param {Boolean} opts._delete true to delete the notes returned by the request.
1462
+ * @param {Number} opts.max The most notes to return.
1463
+ * @param {Boolean} opts.deleted If true, also return deleted notes.
1464
+ * @param {Boolean} opts._delete If true, delete the notes this request returns. Requires the Owner or Developer role.
1404
1465
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetNotefile200Response} and HTTP response
1405
1466
  */
1406
1467
  }, {
@@ -1440,14 +1501,15 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1440
1501
  }
1441
1502
 
1442
1503
  /**
1443
- * For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile
1504
+ * Get the notes in a notefile
1505
+ * Get the notes in one notefile on a device. For a `.qi` notefile, that's the notes still queued; for a `.db` notefile, every note. To list all of a device's notefiles with their notes, use `ListNotefiles`. With `delete=true`, the returned notes are deleted, which requires the Owner or Developer role. Returns 400 if `notefileID` has no valid notefile extension.
1444
1506
  * @param {String} projectOrProductUID
1445
1507
  * @param {String} deviceUID
1446
- * @param {String} notefileID
1508
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
1447
1509
  * @param {Object} opts Optional parameters
1448
- * @param {Number} opts.max The maximum number of Notes to return in the request.
1449
- * @param {Boolean} opts.deleted true to return deleted notes.
1450
- * @param {Boolean} opts._delete true to delete the notes returned by the request.
1510
+ * @param {Number} opts.max The most notes to return.
1511
+ * @param {Boolean} opts.deleted If true, also return deleted notes.
1512
+ * @param {Boolean} opts._delete If true, delete the notes this request returns. Requires the Owner or Developer role.
1451
1513
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetNotefile200Response}
1452
1514
  */
1453
1515
  }, {
@@ -1459,11 +1521,81 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1459
1521
  }
1460
1522
 
1461
1523
  /**
1462
- * Lists .qi and .db files for the device
1524
+ * List sessions in a project
1525
+ * List the sessions of every device in a project, as `GetDeviceSessions` does for one device. `startDate` and `endDate` filter on when the session began. `deviceUID` and `fleetUID` each match any of their values; `fleetUID` matches the fleets recorded on the session. Paginated.
1526
+ * @param {String} projectOrProductUID
1527
+ * @param {Object} opts Optional parameters
1528
+ * @param {Number} opts.pageSize (default to 1000)
1529
+ * @param {Number} opts.pageNum (default to 1)
1530
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1531
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
1532
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
1533
+ * @param {Boolean} opts.firstSync If true, return only sessions whose `why_session_opened` begins with \"first sync\". (default to false)
1534
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
1535
+ * @param {Array.<String>} opts.fleetUID
1536
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceSessions200Response} and HTTP response
1537
+ */
1538
+ }, {
1539
+ key: "getSessionsWithHttpInfo",
1540
+ value: function getSessionsWithHttpInfo(projectOrProductUID, opts) {
1541
+ opts = opts || {};
1542
+ var postBody = null;
1543
+ // verify the required parameter 'projectOrProductUID' is set
1544
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
1545
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getSessions");
1546
+ }
1547
+ var pathParams = {
1548
+ projectOrProductUID: projectOrProductUID
1549
+ };
1550
+ var queryParams = {
1551
+ pageSize: opts["pageSize"],
1552
+ pageNum: opts["pageNum"],
1553
+ cursor: opts["cursor"],
1554
+ startDate: opts["startDate"],
1555
+ endDate: opts["endDate"],
1556
+ firstSync: opts["firstSync"],
1557
+ deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
1558
+ fleetUID: this.apiClient.buildCollectionParam(opts["fleetUID"], "multi")
1559
+ };
1560
+ var headerParams = {};
1561
+ var formParams = {};
1562
+ var authNames = ["personalAccessToken"];
1563
+ var contentTypes = [];
1564
+ var accepts = ["application/json"];
1565
+ var returnType = _GetDeviceSessions200Response["default"];
1566
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/sessions", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1567
+ }
1568
+
1569
+ /**
1570
+ * List sessions in a project
1571
+ * List the sessions of every device in a project, as `GetDeviceSessions` does for one device. `startDate` and `endDate` filter on when the session began. `deviceUID` and `fleetUID` each match any of their values; `fleetUID` matches the fleets recorded on the session. Paginated.
1572
+ * @param {String} projectOrProductUID
1573
+ * @param {Object} opts Optional parameters
1574
+ * @param {Number} opts.pageSize (default to 1000)
1575
+ * @param {Number} opts.pageNum (default to 1)
1576
+ * @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
1577
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
1578
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
1579
+ * @param {Boolean} opts.firstSync If true, return only sessions whose `why_session_opened` begins with \"first sync\". (default to false)
1580
+ * @param {Array.<String>} opts.deviceUID A DeviceUID.
1581
+ * @param {Array.<String>} opts.fleetUID
1582
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceSessions200Response}
1583
+ */
1584
+ }, {
1585
+ key: "getSessions",
1586
+ value: function getSessions(projectOrProductUID, opts) {
1587
+ return this.getSessionsWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
1588
+ return response_and_data.data;
1589
+ });
1590
+ }
1591
+
1592
+ /**
1593
+ * List a device's notefiles and notes
1594
+ * List a device's notefiles with the notes in each, sorted `.qo`, then `.qi`, then `.db`. `.qo` notefiles are listed without notes, since Notehub empties them as it processes them. Most system notefiles (names starting with `_`) are left out. For one notefile, use `GetNotefile`.
1463
1595
  * @param {String} projectOrProductUID
1464
1596
  * @param {String} deviceUID
1465
1597
  * @param {Object} opts Optional parameters
1466
- * @param {Array.<String>} opts.files One or more files to obtain change information from.
1598
+ * @param {Array.<String>} opts.files Notefiles to include, e.g. `config.db`. If omitted, all are listed.
1467
1599
  * @param {Boolean} opts.pending show only files that are pending sync to the Notecard
1468
1600
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/Notefile>} and HTTP response
1469
1601
  */
@@ -1498,11 +1630,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1498
1630
  }
1499
1631
 
1500
1632
  /**
1501
- * Lists .qi and .db files for the device
1633
+ * List a device's notefiles and notes
1634
+ * List a device's notefiles with the notes in each, sorted `.qo`, then `.qi`, then `.db`. `.qo` notefiles are listed without notes, since Notehub empties them as it processes them. Most system notefiles (names starting with `_`) are left out. For one notefile, use `GetNotefile`.
1502
1635
  * @param {String} projectOrProductUID
1503
1636
  * @param {String} deviceUID
1504
1637
  * @param {Object} opts Optional parameters
1505
- * @param {Array.<String>} opts.files One or more files to obtain change information from.
1638
+ * @param {Array.<String>} opts.files Notefiles to include, e.g. `config.db`. If omitted, all are listed.
1506
1639
  * @param {Boolean} opts.pending show only files that are pending sync to the Notecard
1507
1640
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Notefile>}
1508
1641
  */
@@ -1515,10 +1648,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1515
1648
  }
1516
1649
 
1517
1650
  /**
1518
- * Provision Device for a Project
1651
+ * Provision a Notecard
1652
+ * Add a Notecard to a project before it first connects, with its product, serial number and fleets. A device that already exists isn't reset and keeps its fleets. Requires the Owner or Developer role. Returns 404 if `product_uid` doesn't exist, and 400 if it belongs to another project or `deviceUID` isn't a valid Notecard DeviceUID.
1519
1653
  * @param {String} projectOrProductUID
1520
1654
  * @param {String} deviceUID
1521
- * @param {module:model/ProvisionDeviceRequest} provisionDeviceRequest Provision a device to a specific ProductUID
1655
+ * @param {module:model/ProvisionDeviceRequest} provisionDeviceRequest The product, serial number and fleets for the device.
1522
1656
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
1523
1657
  */
1524
1658
  }, {
@@ -1552,10 +1686,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1552
1686
  }
1553
1687
 
1554
1688
  /**
1555
- * Provision Device for a Project
1689
+ * Provision a Notecard
1690
+ * Add a Notecard to a project before it first connects, with its product, serial number and fleets. A device that already exists isn't reset and keeps its fleets. Requires the Owner or Developer role. Returns 404 if `product_uid` doesn't exist, and 400 if it belongs to another project or `deviceUID` isn't a valid Notecard DeviceUID.
1556
1691
  * @param {String} projectOrProductUID
1557
1692
  * @param {String} deviceUID
1558
- * @param {module:model/ProvisionDeviceRequest} provisionDeviceRequest Provision a device to a specific ProductUID
1693
+ * @param {module:model/ProvisionDeviceRequest} provisionDeviceRequest The product, serial number and fleets for the device.
1559
1694
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
1560
1695
  */
1561
1696
  }, {
@@ -1567,10 +1702,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1567
1702
  }
1568
1703
 
1569
1704
  /**
1570
- * Set environment variables of a device
1705
+ * Set device environment variables
1706
+ * Add or change a device's environment variables; variables you don't send keep their values. A value of `\"\"` or `-` deletes that variable. Setting `_fw`, `_fwc` or `_fwm` starts a host, Notecard or modem firmware update. Requires the Owner or Developer role. Returns 400 if a note's key isn't a variable.
1571
1707
  * @param {String} projectOrProductUID
1572
1708
  * @param {String} deviceUID
1573
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1709
+ * @param {module:model/EnvironmentVariables} environmentVariables The variables to add or change, and optional notes.
1574
1710
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
1575
1711
  */
1576
1712
  }, {
@@ -1604,10 +1740,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1604
1740
  }
1605
1741
 
1606
1742
  /**
1607
- * Set environment variables of a device
1743
+ * Set device environment variables
1744
+ * Add or change a device's environment variables; variables you don't send keep their values. A value of `\"\"` or `-` deletes that variable. Setting `_fw`, `_fwc` or `_fwm` starts a host, Notecard or modem firmware update. Requires the Owner or Developer role. Returns 400 if a note's key isn't a variable.
1608
1745
  * @param {String} projectOrProductUID
1609
1746
  * @param {String} deviceUID
1610
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1747
+ * @param {module:model/EnvironmentVariables} environmentVariables The variables to add or change, and optional notes.
1611
1748
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
1612
1749
  */
1613
1750
  }, {
@@ -1619,11 +1756,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1619
1756
  }
1620
1757
 
1621
1758
  /**
1622
- * Set environment variables of a device with device pin authorization
1759
+ * Set device environment variables using a PIN
1760
+ * Add or change a device's environment variables using its PIN instead of an API token. Pass the PIN in `X-Auth-Token`. Works like `SetDeviceEnvironmentVariables`: a value of `\"\"` or `-` deletes that variable. Returns 401 if the project's device dashboard URL has no `[pin]`, or the PIN is wrong.
1623
1761
  * @param {String} productUID
1624
1762
  * @param {String} deviceUID
1625
- * @param {String} xAuthToken For accessing endpoints by Device pin.
1626
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1763
+ * @param {String} xAuthToken The device's PIN, used instead of an API token.
1764
+ * @param {module:model/EnvironmentVariables} environmentVariables The variables to add or change, and optional notes.
1627
1765
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
1628
1766
  */
1629
1767
  }, {
@@ -1663,11 +1801,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1663
1801
  }
1664
1802
 
1665
1803
  /**
1666
- * Set environment variables of a device with device pin authorization
1804
+ * Set device environment variables using a PIN
1805
+ * Add or change a device's environment variables using its PIN instead of an API token. Pass the PIN in `X-Auth-Token`. Works like `SetDeviceEnvironmentVariables`: a value of `\"\"` or `-` deletes that variable. Returns 401 if the project's device dashboard URL has no `[pin]`, or the PIN is wrong.
1667
1806
  * @param {String} productUID
1668
1807
  * @param {String} deviceUID
1669
- * @param {String} xAuthToken For accessing endpoints by Device pin.
1670
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1808
+ * @param {String} xAuthToken The device's PIN, used instead of an API token.
1809
+ * @param {module:model/EnvironmentVariables} environmentVariables The variables to add or change, and optional notes.
1671
1810
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
1672
1811
  */
1673
1812
  }, {
@@ -1679,10 +1818,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1679
1818
  }
1680
1819
 
1681
1820
  /**
1682
- * Send a signal from Notehub to a Notecard.
1821
+ * Send a signal to a connected Notecard
1822
+ * Send a JSON object straight to a Notecard, which the host can read with `hub.signal`. It's delivered only if the Notecard is connected to Notehub at that moment, and is never queued; `connected` in the response says whether it was. To queue data for the next sync, use `AddQiNote` instead. Requires the Owner or Developer role. Returns 400 if the body has a `type` field.
1683
1823
  * @param {String} projectOrProductUID
1684
1824
  * @param {String} deviceUID
1685
- * @param {module:model/Body} body Body or payload of signal to be sent to the device
1825
+ * @param {module:model/Body} body The signal to send.
1686
1826
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignalDevice200Response} and HTTP response
1687
1827
  */
1688
1828
  }, {
@@ -1716,10 +1856,11 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1716
1856
  }
1717
1857
 
1718
1858
  /**
1719
- * Send a signal from Notehub to a Notecard.
1859
+ * Send a signal to a connected Notecard
1860
+ * Send a JSON object straight to a Notecard, which the host can read with `hub.signal`. It's delivered only if the Notecard is connected to Notehub at that moment, and is never queued; `connected` in the response says whether it was. To queue data for the next sync, use `AddQiNote` instead. Requires the Owner or Developer role. Returns 400 if the body has a `type` field.
1720
1861
  * @param {String} projectOrProductUID
1721
1862
  * @param {String} deviceUID
1722
- * @param {module:model/Body} body Body or payload of signal to be sent to the device
1863
+ * @param {module:model/Body} body The signal to send.
1723
1864
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignalDevice200Response}
1724
1865
  */
1725
1866
  }, {
@@ -1731,11 +1872,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1731
1872
  }
1732
1873
 
1733
1874
  /**
1734
- * Update a note in a .db or .qi notefile
1875
+ * Update a note in a .db notefile
1876
+ * Replace the body and payload of a note in a database notefile on a device, synced to the Notecard on its next sync. To add a new note, use `AddDbNote`. Requires the Owner or Developer role. Returns 400 unless the notefile ends in `.db` or `.dbs`, or if `payload` isn't valid base64.
1735
1877
  * @param {String} projectOrProductUID
1736
1878
  * @param {String} deviceUID
1737
- * @param {String} notefileID
1738
- * @param {String} noteID
1879
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
1880
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
1739
1881
  * @param {module:model/NoteInput} noteInput Body or payload of note to be added to the device
1740
1882
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1741
1883
  */
@@ -1780,11 +1922,12 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
1780
1922
  }
1781
1923
 
1782
1924
  /**
1783
- * Update a note in a .db or .qi notefile
1925
+ * Update a note in a .db notefile
1926
+ * Replace the body and payload of a note in a database notefile on a device, synced to the Notecard on its next sync. To add a new note, use `AddDbNote`. Requires the Owner or Developer role. Returns 400 unless the notefile ends in `.db` or `.dbs`, or if `payload` isn't valid base64.
1784
1927
  * @param {String} projectOrProductUID
1785
1928
  * @param {String} deviceUID
1786
- * @param {String} notefileID
1787
- * @param {String} noteID
1929
+ * @param {String} notefileID Notefile name, including its extension, e.g. `config.db` or `commands.qi`.
1930
+ * @param {String} noteID Note ID within the notefile, e.g. `my_note`. Notes in a `.qi` notefile have IDs like `1:435`.
1788
1931
  * @param {module:model/NoteInput} noteInput Body or payload of note to be added to the device
1789
1932
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1790
1933
  */