@blues-inc/notehub-js 6.7.0 → 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 (196) hide show
  1. package/README.md +156 -152
  2. package/dist/ApiClient.js +3 -3
  3. package/dist/api/AlertApi.js +17 -12
  4. package/dist/api/AuthorizationApi.js +12 -51
  5. package/dist/api/DescriptionApi.js +58 -42
  6. package/dist/api/DeviceApi.js +434 -291
  7. package/dist/api/EventApi.js +88 -221
  8. package/dist/api/ExternalDevicesApi.js +32 -26
  9. package/dist/api/JobsApi.js +76 -58
  10. package/dist/api/MonitorApi.js +38 -28
  11. package/dist/api/OrganizationApi.js +26 -20
  12. package/dist/api/ProjectApi.js +424 -330
  13. package/dist/api/RouteApi.js +69 -54
  14. package/dist/api/SkillsApi.js +279 -0
  15. package/dist/api/UsageApi.js +84 -74
  16. package/dist/api/WebhookApi.js +96 -74
  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 +17 -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 +15 -3
  25. package/dist/model/AzureRoute.js +9 -2
  26. package/dist/model/BatchJobNoteRequest.js +2 -2
  27. package/dist/model/BatchJobRequests.js +7 -6
  28. package/dist/model/BillingAccount.js +6 -4
  29. package/dist/model/BillingAccountRole.js +1 -1
  30. package/dist/model/BlynkRoute.js +7 -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 +6 -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 +3 -2
  47. package/dist/model/DataField.js +2 -2
  48. package/dist/model/DataSet.js +6 -5
  49. package/dist/model/DataSetField.js +3 -3
  50. package/dist/model/DataUsage.js +2 -2
  51. package/dist/model/DatacakeRoute.js +8 -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 +4 -3
  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 +17 -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 +17 -2
  66. package/dist/model/DeviceSensor.js +2 -2
  67. package/dist/model/DeviceSession.js +38 -6
  68. package/dist/model/DeviceTowerInfo.js +7 -2
  69. package/dist/model/DeviceUsage.js +8 -2
  70. package/dist/model/DfuActionRequest.js +3 -3
  71. package/dist/model/EmailNotification.js +30 -7
  72. package/dist/model/EnvTreeJsonNode.js +18 -7
  73. package/dist/model/EnvVar.js +6 -2
  74. package/dist/model/EnvironmentVariables.js +4 -3
  75. package/dist/model/Error.js +5 -2
  76. package/dist/model/Event.js +17 -8
  77. package/dist/model/Filter.js +6 -6
  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 +4 -3
  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 +7 -2
  118. package/dist/model/HealthLog.js +8 -5
  119. package/dist/model/HttpRoute.js +8 -3
  120. package/dist/model/Job.js +2 -2
  121. package/dist/model/JobDefinition.js +3 -3
  122. package/dist/model/JobDefinitionReportOptions.js +3 -2
  123. package/dist/model/JobDefinitionSelect.js +5 -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 +15 -2
  131. package/dist/model/Note.js +3 -3
  132. package/dist/model/NoteInput.js +2 -2
  133. package/dist/model/Notefile.js +5 -3
  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 +7 -2
  147. package/dist/model/QubitroRoute.js +8 -2
  148. package/dist/model/RadRoute.js +10 -2
  149. package/dist/model/Repository.js +4 -4
  150. package/dist/model/RepositoryListResponse.js +4 -3
  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 +6 -6
  157. package/dist/model/RunJob200Response.js +2 -2
  158. package/dist/model/S3ArchiveRoute.js +17 -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 +210 -0
  165. package/dist/model/{GetBillingAccounts200Response.js → SkillLinks.js} +60 -41
  166. package/dist/model/SkillSet.js +185 -0
  167. package/dist/model/SkillSummary.js +208 -0
  168. package/dist/model/SkillWrite.js +128 -0
  169. package/dist/model/{GetEventsByCursor200Response.js → SkillWriteResult.js} +62 -65
  170. package/dist/model/SlackBearerNotification.js +32 -9
  171. package/dist/model/SlackRoute.js +10 -2
  172. package/dist/model/SlackWebHookNotification.js +32 -9
  173. package/dist/model/SnowflakeRoute.js +10 -2
  174. package/dist/model/SnowpipeStreamingRoute.js +13 -2
  175. package/dist/model/ThingworxRoute.js +7 -2
  176. package/dist/model/TowerLocation.js +2 -2
  177. package/dist/model/TwilioNotification.js +167 -0
  178. package/dist/model/TwilioRoute.js +10 -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 +4 -3
  184. package/dist/model/UsageData.js +8 -4
  185. package/dist/model/UsageEventsData.js +6 -3
  186. package/dist/model/UsageEventsResponse.js +5 -4
  187. package/dist/model/UsageRouteLogsData.js +11 -7
  188. package/dist/model/UsageSessionsData.js +12 -6
  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
@@ -21,7 +21,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
21
21
  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); } }
22
22
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
23
23
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24
- 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); } /**
24
+ 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); } /**
25
25
  * Notehub API
26
26
  * The OpenAPI definition for the Notehub.io API.
27
27
  *
@@ -36,18 +36,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
36
36
  /**
37
37
  * The Device model module.
38
38
  * @module model/Device
39
- * @version 6.7.0
39
+ * @version 7.0.0-beta.1
40
40
  */
41
41
  var Device = /*#__PURE__*/function () {
42
42
  /**
43
43
  * Constructs a new <code>Device</code>.
44
+ * A device in a project. &#x60;best_location&#x60; is the best of &#x60;gps_location&#x60;, &#x60;triangulated_location&#x60; and &#x60;tower_location&#x60;; each is null when unknown.
44
45
  * @alias module:model/Device
45
- * @param fleetUids {Array.<String>}
46
- * @param productUid {String}
47
- * @param provisioned {Date}
48
- * @param temperature {Number}
49
- * @param uid {String}
50
- * @param voltage {Number}
46
+ * @param fleetUids {Array.<String>} FleetUIDs of the fleets the device is in.
47
+ * @param productUid {String} ProductUID the device uses, e.g. `com.blues.bridge:sensors`.
48
+ * @param provisioned {Date} When the device was added to the project.
49
+ * @param temperature {Number} Last reported Notecard temperature, in degrees Celsius.
50
+ * @param uid {String} DeviceUID, e.g. `dev:864475040509284`.
51
+ * @param voltage {Number} Last reported supply voltage, in volts.
51
52
  */
52
53
  function Device(fleetUids, productUid, provisioned, temperature, uid, voltage) {
53
54
  _classCallCheck(this, Device);
@@ -94,6 +95,9 @@ var Device = /*#__PURE__*/function () {
94
95
  if (data.hasOwnProperty("contact")) {
95
96
  obj["contact"] = _Contact["default"].constructFromObject(data["contact"]);
96
97
  }
98
+ if (data.hasOwnProperty("deleted")) {
99
+ obj["deleted"] = _ApiClient["default"].convertToType(data["deleted"], "Boolean");
100
+ }
97
101
  if (data.hasOwnProperty("dfu")) {
98
102
  obj["dfu"] = _DFUEnv["default"].constructFromObject(data["dfu"]);
99
103
  }
@@ -345,7 +349,7 @@ var Device = /*#__PURE__*/function () {
345
349
  Device.RequiredProperties = ["fleet_uids", "product_uid", "provisioned", "temperature", "uid", "voltage"];
346
350
 
347
351
  /**
348
- * The best ID for the device, preference for the serial number over device UID
352
+ * The serial number if set, otherwise the DeviceUID. Use it as a display name.
349
353
  * @member {String} best_id
350
354
  */
351
355
  Device.prototype["best_id"] = undefined;
@@ -365,27 +369,37 @@ Device.prototype["cellular_usage"] = undefined;
365
369
  */
366
370
  Device.prototype["contact"] = undefined;
367
371
 
372
+ /**
373
+ * True if this device has been deleted. Only present when reading with a `cursor`.
374
+ * @member {Boolean} deleted
375
+ */
376
+ Device.prototype["deleted"] = undefined;
377
+
368
378
  /**
369
379
  * @member {module:model/DFUEnv} dfu
370
380
  */
371
381
  Device.prototype["dfu"] = undefined;
372
382
 
373
383
  /**
384
+ * True if the device was disabled with `DisableDevice` and can't connect.
374
385
  * @member {Boolean} disabled
375
386
  */
376
387
  Device.prototype["disabled"] = undefined;
377
388
 
378
389
  /**
390
+ * Host firmware version, as reported by the device. Usually a JSON string.
379
391
  * @member {String} firmware_host
380
392
  */
381
393
  Device.prototype["firmware_host"] = undefined;
382
394
 
383
395
  /**
396
+ * Notecard firmware version, as reported by the device.
384
397
  * @member {String} firmware_notecard
385
398
  */
386
399
  Device.prototype["firmware_notecard"] = undefined;
387
400
 
388
401
  /**
402
+ * FleetUIDs of the fleets the device is in.
389
403
  * @member {Array.<String>} fleet_uids
390
404
  */
391
405
  Device.prototype["fleet_uids"] = undefined;
@@ -396,41 +410,49 @@ Device.prototype["fleet_uids"] = undefined;
396
410
  Device.prototype["gps_location"] = undefined;
397
411
 
398
412
  /**
413
+ * Not returned by `GetDevice`, `GetDevices` or `GetFleetDevices`; use `GetDeviceHealthLog`.
399
414
  * @member {Array.<module:model/HealthLog>} health_log
400
415
  */
401
416
  Device.prototype["health_log"] = undefined;
402
417
 
403
418
  /**
419
+ * When the device was last active in a session. Null if it has never connected.
404
420
  * @member {Date} last_activity
405
421
  */
406
422
  Device.prototype["last_activity"] = undefined;
407
423
 
408
424
  /**
425
+ * ProductUID the device uses, e.g. `com.blues.bridge:sensors`.
409
426
  * @member {String} product_uid
410
427
  */
411
428
  Device.prototype["product_uid"] = undefined;
412
429
 
413
430
  /**
431
+ * When the device was added to the project.
414
432
  * @member {Date} provisioned
415
433
  */
416
434
  Device.prototype["provisioned"] = undefined;
417
435
 
418
436
  /**
437
+ * Not returned by `GetDevice`, `GetDevices` or `GetFleetDevices`.
419
438
  * @member {Array.<Number>} recent_event_count
420
439
  */
421
440
  Device.prototype["recent_event_count"] = undefined;
422
441
 
423
442
  /**
443
+ * Not returned by `GetDevice`, `GetDevices` or `GetFleetDevices`.
424
444
  * @member {Array.<Number>} recent_session_count
425
445
  */
426
446
  Device.prototype["recent_session_count"] = undefined;
427
447
 
428
448
  /**
449
+ * Not returned by `GetDevice`, `GetDevices` or `GetFleetDevices`.
429
450
  * @member {Array.<Number>} recent_session_seconds
430
451
  */
431
452
  Device.prototype["recent_session_seconds"] = undefined;
432
453
 
433
454
  /**
455
+ * Not returned by `GetDevice`, `GetDevices` or `GetFleetDevices`.
434
456
  * @member {Date} recent_when
435
457
  */
436
458
  Device.prototype["recent_when"] = undefined;
@@ -441,21 +463,25 @@ Device.prototype["recent_when"] = undefined;
441
463
  Device.prototype["sensors"] = undefined;
442
464
 
443
465
  /**
466
+ * Serial number, from the `_sn` environment variable if set. Empty if none.
444
467
  * @member {String} serial_number
445
468
  */
446
469
  Device.prototype["serial_number"] = undefined;
447
470
 
448
471
  /**
472
+ * Notecard SKU, e.g. `NOTE-WBNAW`.
449
473
  * @member {String} sku
450
474
  */
451
475
  Device.prototype["sku"] = undefined;
452
476
 
453
477
  /**
478
+ * Comma-separated tags, from the `_tags` environment variable. Empty if none.
454
479
  * @member {String} tags
455
480
  */
456
481
  Device.prototype["tags"] = undefined;
457
482
 
458
483
  /**
484
+ * Last reported Notecard temperature, in degrees Celsius.
459
485
  * @member {Number} temperature
460
486
  */
461
487
  Device.prototype["temperature"] = undefined;
@@ -476,11 +502,13 @@ Device.prototype["tower_location"] = undefined;
476
502
  Device.prototype["triangulated_location"] = undefined;
477
503
 
478
504
  /**
505
+ * DeviceUID, e.g. `dev:864475040509284`.
479
506
  * @member {String} uid
480
507
  */
481
508
  Device.prototype["uid"] = undefined;
482
509
 
483
510
  /**
511
+ * Last reported supply voltage, in volts.
484
512
  * @member {Number} voltage
485
513
  */
486
514
  Device.prototype["voltage"] = undefined;
@@ -16,7 +16,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
16
16
  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); } }
17
17
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ 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); } /**
20
20
  * Notehub API
21
21
  * The OpenAPI definition for the Notehub.io API.
22
22
  *
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
31
31
  /**
32
32
  * The DeviceDfuHistory model module.
33
33
  * @module model/DeviceDfuHistory
34
- * @version 6.7.0
34
+ * @version 7.0.0-beta.1
35
35
  */
36
36
  var DeviceDfuHistory = /*#__PURE__*/function () {
37
37
  /**
@@ -67,6 +67,9 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
67
67
  if (data.hasOwnProperty("current")) {
68
68
  obj["current"] = _DeviceDfuHistoryCurrent["default"].constructFromObject(data["current"]);
69
69
  }
70
+ if (data.hasOwnProperty("deleted")) {
71
+ obj["deleted"] = _ApiClient["default"].convertToType(data["deleted"], "Boolean");
72
+ }
70
73
  if (data.hasOwnProperty("device_uid")) {
71
74
  obj["device_uid"] = _ApiClient["default"].convertToType(data["device_uid"], "String");
72
75
  }
@@ -126,12 +129,19 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
126
129
  DeviceDfuHistory.prototype["current"] = undefined;
127
130
 
128
131
  /**
129
- * Device UID
132
+ * True if this device has been deleted. Only present when reading with a `cursor`.
133
+ * @member {Boolean} deleted
134
+ */
135
+ DeviceDfuHistory.prototype["deleted"] = undefined;
136
+
137
+ /**
138
+ * DeviceUID
130
139
  * @member {String} device_uid
131
140
  */
132
141
  DeviceDfuHistory.prototype["device_uid"] = undefined;
133
142
 
134
143
  /**
144
+ * Every firmware update requested for this device, newest first.
135
145
  * @member {Array.<module:model/DeviceDfuStateMachine>} history
136
146
  */
137
147
  DeviceDfuHistory.prototype["history"] = undefined;
@@ -11,7 +11,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
11
11
  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); } }
12
12
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
- 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); } /**
14
+ 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); } /**
15
15
  * Notehub API
16
16
  * The OpenAPI definition for the Notehub.io API.
17
17
  *
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The DeviceDfuHistoryCurrent model module.
28
28
  * @module model/DeviceDfuHistoryCurrent
29
- * @version 6.7.0
29
+ * @version 7.0.0-beta.1
30
30
  */
31
31
  var DeviceDfuHistoryCurrent = /*#__PURE__*/function () {
32
32
  /**
@@ -151,7 +151,7 @@ DeviceDfuHistoryCurrent.prototype["organization"] = undefined;
151
151
  DeviceDfuHistoryCurrent.prototype["product"] = undefined;
152
152
 
153
153
  /**
154
- * Firmware version
154
+ * Firmware version the device runs, or `Unknown (device has not fully sync'd)`.
155
155
  * @member {String} version
156
156
  */
157
157
  DeviceDfuHistoryCurrent.prototype["version"] = undefined;
@@ -15,7 +15,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
15
15
  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); } }
16
16
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ 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); } /**
19
19
  * Notehub API
20
20
  * The OpenAPI definition for the Notehub.io API.
21
21
  *
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
30
  /**
31
31
  * The DeviceDfuHistoryPage model module.
32
32
  * @module model/DeviceDfuHistoryPage
33
- * @version 6.7.0
33
+ * @version 7.0.0-beta.1
34
34
  */
35
35
  var DeviceDfuHistoryPage = /*#__PURE__*/function () {
36
36
  /**
@@ -69,6 +69,9 @@ var DeviceDfuHistoryPage = /*#__PURE__*/function () {
69
69
  if (data.hasOwnProperty("has_more")) {
70
70
  obj["has_more"] = _ApiClient["default"].convertToType(data["has_more"], "Boolean");
71
71
  }
72
+ if (data.hasOwnProperty("next_cursor")) {
73
+ obj["next_cursor"] = _ApiClient["default"].convertToType(data["next_cursor"], "String");
74
+ }
72
75
  } else if (data === null) {
73
76
  return null;
74
77
  }
@@ -103,18 +106,30 @@ var DeviceDfuHistoryPage = /*#__PURE__*/function () {
103
106
  _iterator.f();
104
107
  }
105
108
  }
109
+ // ensure the json data is a string
110
+ if (data["next_cursor"] && !(typeof data["next_cursor"] === "string" || data["next_cursor"] instanceof String)) {
111
+ throw new Error("Expected the field `next_cursor` to be a primitive type in the JSON string but got " + data["next_cursor"]);
112
+ }
106
113
  return true;
107
114
  }
108
115
  }]);
109
116
  }();
110
117
  /**
118
+ * One entry per device.
111
119
  * @member {Array.<module:model/DeviceDfuHistory>} devices
112
120
  */
113
121
  DeviceDfuHistoryPage.prototype["devices"] = undefined;
114
122
 
115
123
  /**
124
+ * True if there are more pages.
116
125
  * @member {Boolean} has_more
117
126
  * @default false
118
127
  */
119
128
  DeviceDfuHistoryPage.prototype["has_more"] = false;
129
+
130
+ /**
131
+ * Pass this value (epoch microseconds, optionally `.N`) as a cursor parameter to start a search from where the last search left off. Returned even when there are no more results, so it can be used to poll for changes.
132
+ * @member {String} next_cursor
133
+ */
134
+ DeviceDfuHistoryPage.prototype["next_cursor"] = undefined;
120
135
  var _default = exports["default"] = DeviceDfuHistoryPage;
@@ -15,7 +15,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
15
15
  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); } }
16
16
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ 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); } /**
19
19
  * Notehub API
20
20
  * The OpenAPI definition for the Notehub.io API.
21
21
  *
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
30
  /**
31
31
  * The DeviceDfuStateMachine model module.
32
32
  * @module model/DeviceDfuStateMachine
33
- * @version 6.7.0
33
+ * @version 7.0.0-beta.1
34
34
  */
35
35
  var DeviceDfuStateMachine = /*#__PURE__*/function () {
36
36
  /**
@@ -145,6 +145,7 @@ DeviceDfuStateMachine.prototype["initiated"] = undefined;
145
145
  DeviceDfuStateMachine.prototype["requested_version"] = undefined;
146
146
 
147
147
  /**
148
+ * Status updates reported for this firmware update.
148
149
  * @member {Array.<module:model/DeviceDfuStateMachineNode>} updates
149
150
  */
150
151
  DeviceDfuStateMachine.prototype["updates"] = undefined;
@@ -11,7 +11,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
11
11
  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); } }
12
12
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
- 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); } /**
14
+ 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); } /**
15
15
  * Notehub API
16
16
  * The OpenAPI definition for the Notehub.io API.
17
17
  *
@@ -26,12 +26,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The DeviceDfuStateMachineNode model module.
28
28
  * @module model/DeviceDfuStateMachineNode
29
- * @version 6.7.0
29
+ * @version 7.0.0-beta.1
30
30
  */
31
31
  var DeviceDfuStateMachineNode = /*#__PURE__*/function () {
32
32
  /**
33
33
  * Constructs a new <code>DeviceDfuStateMachineNode</code>.
34
- * Represents a single request to update the host or Notecard firmware
34
+ * One status update in a host or Notecard firmware update.
35
35
  * @alias module:model/DeviceDfuStateMachineNode
36
36
  */
37
37
  function DeviceDfuStateMachineNode() {
@@ -13,7 +13,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
13
13
  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); } }
14
14
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
- 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); } /**
16
+ 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); } /**
17
17
  * Notehub API
18
18
  * The OpenAPI definition for the Notehub.io API.
19
19
  *
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  /**
29
29
  * The DeviceDfuStatus model module.
30
30
  * @module model/DeviceDfuStatus
31
- * @version 6.7.0
31
+ * @version 7.0.0-beta.1
32
32
  */
33
33
  var DeviceDfuStatus = /*#__PURE__*/function () {
34
34
  /**
@@ -64,6 +64,9 @@ var DeviceDfuStatus = /*#__PURE__*/function () {
64
64
  if (data.hasOwnProperty("current")) {
65
65
  obj["current"] = _DeviceDfuHistoryCurrent["default"].constructFromObject(data["current"]);
66
66
  }
67
+ if (data.hasOwnProperty("deleted")) {
68
+ obj["deleted"] = _ApiClient["default"].convertToType(data["deleted"], "Boolean");
69
+ }
67
70
  if (data.hasOwnProperty("device_uid")) {
68
71
  obj["device_uid"] = _ApiClient["default"].convertToType(data["device_uid"], "String");
69
72
  }
@@ -111,13 +114,19 @@ var DeviceDfuStatus = /*#__PURE__*/function () {
111
114
  DeviceDfuStatus.prototype["current"] = undefined;
112
115
 
113
116
  /**
114
- * Device UID
117
+ * True if this device has been deleted. Only present when reading with a `cursor`.
118
+ * @member {Boolean} deleted
119
+ */
120
+ DeviceDfuStatus.prototype["deleted"] = undefined;
121
+
122
+ /**
123
+ * DeviceUID
115
124
  * @member {String} device_uid
116
125
  */
117
126
  DeviceDfuStatus.prototype["device_uid"] = undefined;
118
127
 
119
128
  /**
120
- * true if there is a DFU currently in progress
129
+ * `true` while the device's latest firmware update hasn't finished.
121
130
  * @member {Boolean} dfu_in_progress
122
131
  */
123
132
  DeviceDfuStatus.prototype["dfu_in_progress"] = undefined;
@@ -15,7 +15,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
15
15
  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); } }
16
16
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ 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); } /**
19
19
  * Notehub API
20
20
  * The OpenAPI definition for the Notehub.io API.
21
21
  *
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
30
  /**
31
31
  * The DeviceDfuStatusPage model module.
32
32
  * @module model/DeviceDfuStatusPage
33
- * @version 6.7.0
33
+ * @version 7.0.0-beta.1
34
34
  */
35
35
  var DeviceDfuStatusPage = /*#__PURE__*/function () {
36
36
  /**
@@ -69,6 +69,9 @@ var DeviceDfuStatusPage = /*#__PURE__*/function () {
69
69
  if (data.hasOwnProperty("has_more")) {
70
70
  obj["has_more"] = _ApiClient["default"].convertToType(data["has_more"], "Boolean");
71
71
  }
72
+ if (data.hasOwnProperty("next_cursor")) {
73
+ obj["next_cursor"] = _ApiClient["default"].convertToType(data["next_cursor"], "String");
74
+ }
72
75
  } else if (data === null) {
73
76
  return null;
74
77
  }
@@ -103,18 +106,30 @@ var DeviceDfuStatusPage = /*#__PURE__*/function () {
103
106
  _iterator.f();
104
107
  }
105
108
  }
109
+ // ensure the json data is a string
110
+ if (data["next_cursor"] && !(typeof data["next_cursor"] === "string" || data["next_cursor"] instanceof String)) {
111
+ throw new Error("Expected the field `next_cursor` to be a primitive type in the JSON string but got " + data["next_cursor"]);
112
+ }
106
113
  return true;
107
114
  }
108
115
  }]);
109
116
  }();
110
117
  /**
118
+ * One entry per device.
111
119
  * @member {Array.<module:model/DeviceDfuStatus>} devices
112
120
  */
113
121
  DeviceDfuStatusPage.prototype["devices"] = undefined;
114
122
 
115
123
  /**
124
+ * True if there are more pages.
116
125
  * @member {Boolean} has_more
117
126
  * @default false
118
127
  */
119
128
  DeviceDfuStatusPage.prototype["has_more"] = false;
129
+
130
+ /**
131
+ * Pass this value (epoch microseconds, optionally `.N`) as a cursor parameter to start a search from where the last search left off. Returned even when there are no more results, so it can be used to poll for changes.
132
+ * @member {String} next_cursor
133
+ */
134
+ DeviceDfuStatusPage.prototype["next_cursor"] = undefined;
120
135
  var _default = exports["default"] = DeviceDfuStatusPage;
@@ -14,7 +14,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
14
14
  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); } }
15
15
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
- 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); } /**
17
+ 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); } /**
18
18
  * Notehub API
19
19
  * The OpenAPI definition for the Notehub.io API.
20
20
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The DeviceSensor model module.
31
31
  * @module model/DeviceSensor
32
- * @version 6.7.0
32
+ * @version 7.0.0-beta.1
33
33
  */
34
34
  var DeviceSensor = /*#__PURE__*/function () {
35
35
  /**