@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.
- package/README.md +156 -152
- package/dist/ApiClient.js +3 -3
- package/dist/api/AlertApi.js +17 -12
- package/dist/api/AuthorizationApi.js +12 -51
- package/dist/api/DescriptionApi.js +58 -42
- package/dist/api/DeviceApi.js +434 -291
- package/dist/api/EventApi.js +88 -221
- package/dist/api/ExternalDevicesApi.js +32 -26
- package/dist/api/JobsApi.js +76 -58
- package/dist/api/MonitorApi.js +38 -28
- package/dist/api/OrganizationApi.js +26 -20
- package/dist/api/ProjectApi.js +424 -330
- package/dist/api/RouteApi.js +69 -54
- package/dist/api/SkillsApi.js +279 -0
- package/dist/api/UsageApi.js +84 -74
- package/dist/api/WebhookApi.js +96 -74
- package/dist/index.js +91 -63
- package/dist/model/AWSRoleConfig.js +2 -2
- package/dist/model/AddDeviceToFleetsRequest.js +4 -4
- package/dist/model/Alert.js +17 -10
- package/dist/model/AlertDataInner.js +10 -5
- package/dist/model/AlertNotificationsInner.js +15 -5
- package/dist/model/ArchiveStats.js +2 -2
- package/dist/model/AwsRoute.js +15 -3
- package/dist/model/AzureRoute.js +9 -2
- package/dist/model/BatchJobNoteRequest.js +2 -2
- package/dist/model/BatchJobRequests.js +7 -6
- package/dist/model/BillingAccount.js +6 -4
- package/dist/model/BillingAccountRole.js +1 -1
- package/dist/model/BlynkRoute.js +7 -2
- package/dist/model/Body.js +3 -2
- package/dist/model/CancelJobRun200Response.js +2 -2
- package/dist/model/CellularPlan.js +4 -3
- package/dist/model/CloneProjectRequest.js +8 -8
- package/dist/model/Contact.js +6 -2
- package/dist/model/CreateFleetRequest.js +5 -4
- package/dist/model/CreateJob201Response.js +2 -2
- package/dist/model/CreateMonitor.js +38 -26
- package/dist/model/CreateProductRequest.js +8 -7
- package/dist/model/CreateProjectRequest.js +6 -6
- package/dist/model/CreateProjectSecretRequest.js +6 -6
- package/dist/model/CreateUpdateRepository.js +4 -2
- package/dist/model/CreatedRepository.js +6 -6
- package/dist/model/CurrentFirmware.js +2 -2
- package/dist/model/DFUEnv.js +2 -2
- package/dist/model/DFUState.js +3 -2
- package/dist/model/DataField.js +2 -2
- package/dist/model/DataSet.js +6 -5
- package/dist/model/DataSetField.js +3 -3
- package/dist/model/DataUsage.js +2 -2
- package/dist/model/DatacakeRoute.js +8 -2
- package/dist/model/DatasetReloadProgress.js +2 -2
- package/dist/model/DeleteDeviceFromFleetsRequest.js +4 -4
- package/dist/model/DeleteJob200Response.js +2 -2
- package/dist/model/DeleteNotefilesRequest.js +3 -3
- package/dist/model/DescriptionRecord.js +7 -7
- package/dist/model/DescriptionRecordList.js +4 -3
- package/dist/model/Device.js +37 -9
- package/dist/model/DeviceDfuHistory.js +13 -3
- package/dist/model/DeviceDfuHistoryCurrent.js +3 -3
- package/dist/model/DeviceDfuHistoryPage.js +17 -2
- package/dist/model/DeviceDfuStateMachine.js +3 -2
- package/dist/model/DeviceDfuStateMachineNode.js +3 -3
- package/dist/model/DeviceDfuStatus.js +13 -4
- package/dist/model/DeviceDfuStatusPage.js +17 -2
- package/dist/model/DeviceSensor.js +2 -2
- package/dist/model/DeviceSession.js +38 -6
- package/dist/model/DeviceTowerInfo.js +7 -2
- package/dist/model/DeviceUsage.js +8 -2
- package/dist/model/DfuActionRequest.js +3 -3
- package/dist/model/EmailNotification.js +30 -7
- package/dist/model/EnvTreeJsonNode.js +18 -7
- package/dist/model/EnvVar.js +6 -2
- package/dist/model/EnvironmentVariables.js +4 -3
- package/dist/model/Error.js +5 -2
- package/dist/model/Event.js +17 -8
- package/dist/model/Filter.js +6 -6
- package/dist/model/Firmware.js +2 -2
- package/dist/model/FirmwareInfo.js +7 -7
- package/dist/model/Fleet.js +12 -11
- package/dist/model/FleetConnectivityAssurance.js +2 -2
- package/dist/model/GetAlerts200Response.js +15 -2
- package/dist/model/GetApiUsage200Response.js +3 -3
- package/dist/model/GetDataUsage200Response.js +3 -3
- package/dist/model/GetDataUsage200ResponseDataInner.js +4 -4
- package/dist/model/GetDbNote200Response.js +2 -2
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +2 -2
- package/dist/model/GetDeviceFleets200Response.js +2 -2
- package/dist/model/GetDeviceHealthLog200Response.js +2 -2
- package/dist/model/GetDeviceJourney200Response.js +2 -2
- package/dist/model/GetDeviceJourney200ResponseJourney.js +2 -2
- package/dist/model/GetDeviceJourneys200Response.js +2 -2
- package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +2 -2
- package/dist/model/GetDeviceLatestEvents200Response.js +3 -3
- package/dist/model/GetDevicePlans200Response.js +3 -2
- package/dist/model/GetDevicePublicKey200Response.js +6 -4
- package/dist/model/GetDevicePublicKeys200Response.js +15 -2
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +13 -2
- package/dist/model/GetDeviceSessions200Response.js +15 -2
- package/dist/model/GetDevices200Response.js +15 -2
- package/dist/model/GetEvents200Response.js +15 -2
- package/dist/model/GetJobRuns200Response.js +2 -2
- package/dist/model/GetJobs200Response.js +2 -2
- package/dist/model/GetNotefile200Response.js +2 -2
- package/dist/model/{GetBillingAccount200Response.js → GetOrganization200Response.js} +29 -29
- package/dist/model/{GetBillingAccount200ResponsePlan.js → GetOrganization200ResponsePlan.js} +25 -25
- package/dist/model/{GetBillingAccountBalanceHistory200Response.js → GetOrganizationBalanceHistory200Response.js} +23 -23
- package/dist/model/{GetBillingAccountBalanceHistory200ResponseDataInner.js → GetOrganizationBalanceHistory200ResponseDataInner.js} +23 -23
- package/dist/model/GetOrganizations200Response.js +2 -2
- package/dist/model/GetProducts200Response.js +2 -2
- package/dist/model/GetProjectMembers200Response.js +2 -2
- package/dist/model/GetProjectSecretsResponse.js +4 -3
- package/dist/model/GetProjects200Response.js +2 -2
- package/dist/model/GetRouteLogsUsage200Response.js +3 -3
- package/dist/model/GetSessionsUsage200Response.js +4 -4
- package/dist/model/GetWebhooks200Response.js +2 -2
- package/dist/model/GoogleRoute.js +7 -2
- package/dist/model/HealthLog.js +8 -5
- package/dist/model/HttpRoute.js +8 -3
- package/dist/model/Job.js +2 -2
- package/dist/model/JobDefinition.js +3 -3
- package/dist/model/JobDefinitionReportOptions.js +3 -2
- package/dist/model/JobDefinitionSelect.js +5 -4
- package/dist/model/JobDetail.js +2 -2
- package/dist/model/JobDetailAllOf.js +2 -2
- package/dist/model/JobRun.js +2 -2
- package/dist/model/Location.js +14 -8
- package/dist/model/Monitor.js +19 -13
- package/dist/model/MonitorAlertRoutesInner.js +61 -15
- package/dist/model/MqttRoute.js +15 -2
- package/dist/model/Note.js +3 -3
- package/dist/model/NoteInput.js +2 -2
- package/dist/model/Notefile.js +5 -3
- package/dist/model/NotefileSchema.js +6 -4
- package/dist/model/NotehubRoute.js +8 -4
- package/dist/model/NotehubRouteSummary.js +7 -2
- package/dist/model/OAuth2Error.js +2 -2
- package/dist/model/OAuth2TokenResponse.js +2 -2
- package/dist/model/Organization.js +6 -4
- package/dist/model/OrganizationRole.js +1 -1
- package/dist/model/Product.js +9 -5
- package/dist/model/Project.js +8 -5
- package/dist/model/ProjectMember.js +6 -5
- package/dist/model/ProjectSecret.js +8 -8
- package/dist/model/ProvisionDeviceRequest.js +6 -6
- package/dist/model/ProxyRoute.js +7 -2
- package/dist/model/QubitroRoute.js +8 -2
- package/dist/model/RadRoute.js +10 -2
- package/dist/model/Repository.js +4 -4
- package/dist/model/RepositoryListResponse.js +4 -3
- package/dist/model/RepositoryRecord.js +119 -0
- package/dist/model/RepositoryTokenRequest.js +2 -2
- package/dist/model/RepositoryTokenResponse.js +2 -2
- package/dist/model/Role.js +1 -1
- package/dist/model/RouteLog.js +10 -10
- package/dist/model/RouteTransformSettings.js +6 -6
- package/dist/model/RunJob200Response.js +2 -2
- package/dist/model/S3ArchiveRoute.js +17 -2
- package/dist/model/SatelliteDataUsage.js +2 -2
- package/dist/model/SatellitePlan.js +2 -2
- package/dist/model/SchemaProperty.js +7 -5
- package/dist/model/SignalDevice200Response.js +3 -3
- package/dist/model/SimUsage.js +2 -2
- package/dist/model/Skill.js +210 -0
- package/dist/model/{GetBillingAccounts200Response.js → SkillLinks.js} +60 -41
- package/dist/model/SkillSet.js +185 -0
- package/dist/model/SkillSummary.js +208 -0
- package/dist/model/SkillWrite.js +128 -0
- package/dist/model/{GetEventsByCursor200Response.js → SkillWriteResult.js} +62 -65
- package/dist/model/SlackBearerNotification.js +32 -9
- package/dist/model/SlackRoute.js +10 -2
- package/dist/model/SlackWebHookNotification.js +32 -9
- package/dist/model/SnowflakeRoute.js +10 -2
- package/dist/model/SnowpipeStreamingRoute.js +13 -2
- package/dist/model/ThingworxRoute.js +7 -2
- package/dist/model/TowerLocation.js +2 -2
- package/dist/model/TwilioNotification.js +167 -0
- package/dist/model/TwilioRoute.js +10 -2
- package/dist/model/UpdateFleetRequest.js +8 -7
- package/dist/model/UpdateHostFirmwareRequest.js +5 -5
- package/dist/model/UpdateProjectSecretRequest.js +4 -4
- package/dist/model/UploadMetadata.js +2 -2
- package/dist/model/UsageApiData.js +4 -3
- package/dist/model/UsageData.js +8 -4
- package/dist/model/UsageEventsData.js +6 -3
- package/dist/model/UsageEventsResponse.js +5 -4
- package/dist/model/UsageRouteLogsData.js +11 -7
- package/dist/model/UsageSessionsData.js +12 -6
- package/dist/model/UserDfuStateMachine.js +2 -2
- package/dist/model/UserDfuStateMachineStatus.js +2 -2
- package/dist/model/UserFirmwareInfo.js +2 -2
- package/dist/model/WebhookSettings.js +5 -5
- package/package.json +1 -1
- package/dist/api/BillingAccountApi.js +0 -167
- package/dist/model/Login200Response.js +0 -91
- package/dist/model/LoginRequest.js +0 -103
package/dist/model/Device.js
CHANGED
|
@@ -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,
|
|
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
|
|
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. `best_location` is the best of `gps_location`, `triangulated_location` and `tower_location`; 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
|
|
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,
|
|
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
|
|
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
|
-
*
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
*
|
|
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,
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
32
|
+
* @version 7.0.0-beta.1
|
|
33
33
|
*/
|
|
34
34
|
var DeviceSensor = /*#__PURE__*/function () {
|
|
35
35
|
/**
|