@blues-inc/notehub-js 1.0.23 → 1.0.24
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 +24 -12
- package/dist/ApiClient.js +3 -3
- package/dist/api/AlertApi.js +5 -5
- package/dist/api/AuthorizationApi.js +2 -2
- package/dist/api/BillingAccountApi.js +2 -2
- package/dist/api/DeviceApi.js +2 -2
- package/dist/api/EventApi.js +19 -9
- package/dist/api/MonitorApi.js +2 -2
- package/dist/api/ProjectApi.js +377 -108
- package/dist/api/RouteApi.js +30 -30
- package/dist/index.js +102 -39
- package/dist/model/Alert.js +46 -2
- package/dist/model/AlertDataInner.js +2 -2
- package/dist/model/AlertNotificationsInner.js +2 -2
- package/dist/model/Aws.js +2 -2
- package/dist/model/Azure.js +2 -2
- package/dist/model/BillingAccount.js +2 -2
- package/dist/model/BillingAccountRole.js +1 -1
- package/dist/model/Body.js +2 -2
- package/dist/model/CloneProjectRequest.js +2 -2
- package/dist/model/Contact.js +2 -2
- package/dist/model/CreateFleetRequest.js +2 -2
- package/dist/model/CreateMonitor.js +2 -2
- package/dist/model/CreateProductRequest.js +2 -2
- package/dist/model/CreateProjectRequest.js +2 -2
- package/dist/model/CurrentFirmware.js +105 -0
- package/dist/model/DFUEnv.js +2 -2
- package/dist/model/DFUState.js +2 -2
- package/dist/model/DeleteDeviceFleetsRequest.js +2 -2
- package/dist/model/Device.js +2 -2
- package/dist/model/DeviceDfuHistory.js +138 -0
- package/dist/model/DeviceDfuHistoryPage.js +120 -0
- package/dist/model/DeviceDfuStateMachine.js +151 -0
- package/dist/model/DeviceDfuStateMachineNode.js +132 -0
- package/dist/model/DeviceDfuStatus.js +129 -0
- package/dist/model/{FirmwareStatus.js → DeviceDfuStatusCurrent.js} +42 -28
- package/dist/model/{OTAStatusList.js → DeviceDfuStatusPage.js} +25 -25
- package/dist/model/DeviceSession.js +2 -2
- package/dist/model/DeviceTowerInfo.js +2 -2
- package/dist/model/DeviceUsage.js +2 -2
- package/dist/model/DfuActionRequest.js +92 -0
- package/dist/model/EmailNotification.js +2 -2
- package/dist/model/EnvironmentVariables.js +2 -2
- package/dist/model/Error.js +2 -2
- package/dist/model/Event.js +2 -2
- package/dist/model/Firmware.js +195 -0
- package/dist/model/FirmwareInfo.js +2 -2
- package/dist/model/Fleet.js +2 -2
- package/dist/model/GetAlerts200Response.js +2 -2
- package/dist/model/GetBillingAccounts200Response.js +2 -2
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +2 -2
- package/dist/model/GetDeviceHealthLog200Response.js +2 -2
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +2 -2
- package/dist/model/GetDeviceLatest200Response.js +2 -2
- package/dist/model/GetDevicePublicKey200Response.js +2 -2
- package/dist/model/GetDeviceSessions200Response.js +2 -2
- package/dist/model/GetProjectDevicePublicKeys200Response.js +2 -2
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +2 -2
- package/dist/model/GetProjectDevices200Response.js +2 -2
- package/dist/model/GetProjectEvents200Response.js +2 -2
- package/dist/model/GetProjectEventsByCursor200Response.js +2 -2
- package/dist/model/GetProjectFleets200Response.js +2 -2
- package/dist/model/GetProjectMembers200Response.js +2 -2
- package/dist/model/GetProjectProducts200Response.js +2 -2
- package/dist/model/GetProjects200Response.js +2 -2
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +2 -2
- package/dist/model/Google.js +2 -2
- package/dist/model/HandleNoteChanges200Response.js +2 -2
- package/dist/model/HandleNoteGet200Response.js +2 -2
- package/dist/model/HandleNoteSignal200Response.js +2 -2
- package/dist/model/HandleNotefileChanges200Response.js +2 -2
- package/dist/model/HandleNotefileChangesPending200Response.js +2 -2
- package/dist/model/HandleNotefileDeleteRequest.js +2 -2
- package/dist/model/Http.js +2 -2
- package/dist/model/HttpFilter.js +2 -2
- package/dist/model/HttpTransform.js +2 -2
- package/dist/model/Location.js +2 -2
- package/dist/model/Login200Response.js +2 -2
- package/dist/model/LoginRequest.js +2 -2
- package/dist/model/Monitor.js +2 -2
- package/dist/model/MonitorAlertRoutesInner.js +2 -2
- package/dist/model/Mqtt.js +2 -2
- package/dist/model/Note.js +2 -2
- package/dist/model/{Route.js → NotehubRoute.js} +30 -30
- package/dist/model/{RouteSchema.js → NotehubRouteSchema.js} +68 -68
- package/dist/model/PostProvisionProjectDeviceRequest.js +2 -2
- package/dist/model/Product.js +2 -2
- package/dist/model/Project.js +2 -2
- package/dist/model/ProjectMember.js +2 -2
- package/dist/model/Proxy.js +2 -2
- package/dist/model/PutDeviceFleetsRequest.js +2 -2
- package/dist/model/Radresponder.js +2 -2
- package/dist/model/Role.js +1 -1
- package/dist/model/Slack.js +2 -2
- package/dist/model/SlackBearerNotification.js +2 -2
- package/dist/model/SlackWebHookNotification.js +2 -2
- package/dist/model/Snowflake.js +2 -2
- package/dist/model/SnowflakeTransform.js +2 -2
- package/dist/model/Thingworx.js +2 -2
- package/dist/model/TowerLocation.js +2 -2
- package/dist/model/Twilio.js +2 -2
- package/dist/model/UpdateFleetRequest.js +2 -2
- package/dist/model/UploadMetadata.js +221 -0
- package/dist/model/UserDbRoute.js +2 -2
- package/dist/model/UserDfuStateMachine.js +127 -0
- package/dist/model/{OTAUpdateStatus.js → UserDfuStateMachineStatus.js} +46 -41
- package/dist/model/UserFirmwareInfo.js +107 -0
- package/package.json +1 -1
- package/dist/model/OTAStatus.js +0 -306
- package/dist/model/OTAUpdateRequest.js +0 -214
|
@@ -15,7 +15,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
15
15
|
* Notehub API
|
|
16
16
|
* The OpenAPI definition for the Notehub.io API.
|
|
17
17
|
*
|
|
18
|
-
* The version of the OpenAPI document: 1.
|
|
18
|
+
* The version of the OpenAPI document: 1.2.0
|
|
19
19
|
* Contact: engineering@blues.io
|
|
20
20
|
*
|
|
21
21
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The CreateFleetRequest model module.
|
|
28
28
|
* @module model/CreateFleetRequest
|
|
29
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.24
|
|
30
30
|
*/
|
|
31
31
|
var CreateFleetRequest = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -20,7 +20,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
20
20
|
* Notehub API
|
|
21
21
|
* The OpenAPI definition for the Notehub.io API.
|
|
22
22
|
*
|
|
23
|
-
* The version of the OpenAPI document: 1.
|
|
23
|
+
* The version of the OpenAPI document: 1.2.0
|
|
24
24
|
* Contact: engineering@blues.io
|
|
25
25
|
*
|
|
26
26
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
/**
|
|
32
32
|
* The CreateMonitor model module.
|
|
33
33
|
* @module model/CreateMonitor
|
|
34
|
-
* @version 1.0.
|
|
34
|
+
* @version 1.0.24
|
|
35
35
|
*/
|
|
36
36
|
var CreateMonitor = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
18
18
|
* Notehub API
|
|
19
19
|
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
|
-
* The version of the OpenAPI document: 1.
|
|
21
|
+
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
23
23
|
*
|
|
24
24
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The CreateProductRequest model module.
|
|
31
31
|
* @module model/CreateProductRequest
|
|
32
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.24
|
|
33
33
|
*/
|
|
34
34
|
var CreateProductRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
18
18
|
* Notehub API
|
|
19
19
|
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
|
-
* The version of the OpenAPI document: 1.
|
|
21
|
+
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
23
23
|
*
|
|
24
24
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The CreateProjectRequest model module.
|
|
31
31
|
* @module model/CreateProjectRequest
|
|
32
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.24
|
|
33
33
|
*/
|
|
34
34
|
var CreateProjectRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Firmware = _interopRequireDefault(require("./Firmware"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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
|
+
* Notehub API
|
|
17
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
18
|
+
*
|
|
19
|
+
* The version of the OpenAPI document: 1.2.0
|
|
20
|
+
* Contact: engineering@blues.io
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The CurrentFirmware model module.
|
|
29
|
+
* @module model/CurrentFirmware
|
|
30
|
+
* @version 1.0.24
|
|
31
|
+
*/
|
|
32
|
+
var CurrentFirmware = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CurrentFirmware</code>.
|
|
35
|
+
* @alias module:model/CurrentFirmware
|
|
36
|
+
*/
|
|
37
|
+
function CurrentFirmware() {
|
|
38
|
+
_classCallCheck(this, CurrentFirmware);
|
|
39
|
+
CurrentFirmware.initialize(this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(CurrentFirmware, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>CurrentFirmware</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/CurrentFirmware} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/CurrentFirmware} The populated <code>CurrentFirmware</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new CurrentFirmware();
|
|
63
|
+
if (data.hasOwnProperty("version")) {
|
|
64
|
+
obj["version"] = _ApiClient["default"].convertToType(data["version"], "String");
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty("metadata")) {
|
|
67
|
+
obj["metadata"] = _Firmware["default"].constructFromObject(data["metadata"]);
|
|
68
|
+
}
|
|
69
|
+
} else if (data === null) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return obj;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Validates the JSON data with respect to <code>CurrentFirmware</code>.
|
|
77
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
78
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CurrentFirmware</code>.
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "validateJSON",
|
|
82
|
+
value: function validateJSON(data) {
|
|
83
|
+
// ensure the json data is a string
|
|
84
|
+
if (data["version"] && !(typeof data["version"] === "string" || data["version"] instanceof String)) {
|
|
85
|
+
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data["version"]);
|
|
86
|
+
}
|
|
87
|
+
// validate the optional field `metadata`
|
|
88
|
+
if (data["metadata"]) {
|
|
89
|
+
// data not null
|
|
90
|
+
_Firmware["default"].validateJSON(data["metadata"]);
|
|
91
|
+
}
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
}]);
|
|
95
|
+
}();
|
|
96
|
+
/**
|
|
97
|
+
* @member {String} version
|
|
98
|
+
*/
|
|
99
|
+
CurrentFirmware.prototype["version"] = undefined;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @member {module:model/Firmware} metadata
|
|
103
|
+
*/
|
|
104
|
+
CurrentFirmware.prototype["metadata"] = undefined;
|
|
105
|
+
var _default = exports["default"] = CurrentFirmware;
|
package/dist/model/DFUEnv.js
CHANGED
|
@@ -16,7 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
16
16
|
* Notehub API
|
|
17
17
|
* The OpenAPI definition for the Notehub.io API.
|
|
18
18
|
*
|
|
19
|
-
* The version of the OpenAPI document: 1.
|
|
19
|
+
* The version of the OpenAPI document: 1.2.0
|
|
20
20
|
* Contact: engineering@blues.io
|
|
21
21
|
*
|
|
22
22
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -27,7 +27,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
27
27
|
/**
|
|
28
28
|
* The DFUEnv model module.
|
|
29
29
|
* @module model/DFUEnv
|
|
30
|
-
* @version 1.0.
|
|
30
|
+
* @version 1.0.24
|
|
31
31
|
*/
|
|
32
32
|
var DFUEnv = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
package/dist/model/DFUState.js
CHANGED
|
@@ -15,7 +15,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
15
15
|
* Notehub API
|
|
16
16
|
* The OpenAPI definition for the Notehub.io API.
|
|
17
17
|
*
|
|
18
|
-
* The version of the OpenAPI document: 1.
|
|
18
|
+
* The version of the OpenAPI document: 1.2.0
|
|
19
19
|
* Contact: engineering@blues.io
|
|
20
20
|
*
|
|
21
21
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The DFUState model module.
|
|
28
28
|
* @module model/DFUState
|
|
29
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.24
|
|
30
30
|
*/
|
|
31
31
|
var DFUState = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
18
18
|
* Notehub API
|
|
19
19
|
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
|
-
* The version of the OpenAPI document: 1.
|
|
21
|
+
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
23
23
|
*
|
|
24
24
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The DeleteDeviceFleetsRequest model module.
|
|
31
31
|
* @module model/DeleteDeviceFleetsRequest
|
|
32
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.24
|
|
33
33
|
*/
|
|
34
34
|
var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
package/dist/model/Device.js
CHANGED
|
@@ -22,7 +22,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
22
22
|
* Notehub API
|
|
23
23
|
* The OpenAPI definition for the Notehub.io API.
|
|
24
24
|
*
|
|
25
|
-
* The version of the OpenAPI document: 1.
|
|
25
|
+
* The version of the OpenAPI document: 1.2.0
|
|
26
26
|
* Contact: engineering@blues.io
|
|
27
27
|
*
|
|
28
28
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
33
|
/**
|
|
34
34
|
* The Device model module.
|
|
35
35
|
* @module model/Device
|
|
36
|
-
* @version 1.0.
|
|
36
|
+
* @version 1.0.24
|
|
37
37
|
*/
|
|
38
38
|
var Device = /*#__PURE__*/function () {
|
|
39
39
|
/**
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _DeviceDfuStateMachine = _interopRequireDefault(require("./DeviceDfuStateMachine"));
|
|
9
|
+
var _DeviceDfuStatusCurrent = _interopRequireDefault(require("./DeviceDfuStatusCurrent"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
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
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
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); } /**
|
|
20
|
+
* Notehub API
|
|
21
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: 1.2.0
|
|
24
|
+
* Contact: engineering@blues.io
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The DeviceDfuHistory model module.
|
|
33
|
+
* @module model/DeviceDfuHistory
|
|
34
|
+
* @version 1.0.24
|
|
35
|
+
*/
|
|
36
|
+
var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>DeviceDfuHistory</code>.
|
|
39
|
+
* @alias module:model/DeviceDfuHistory
|
|
40
|
+
*/
|
|
41
|
+
function DeviceDfuHistory() {
|
|
42
|
+
_classCallCheck(this, DeviceDfuHistory);
|
|
43
|
+
DeviceDfuHistory.initialize(this);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(DeviceDfuHistory, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj) {}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>DeviceDfuHistory</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/DeviceDfuHistory} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/DeviceDfuHistory} The populated <code>DeviceDfuHistory</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new DeviceDfuHistory();
|
|
67
|
+
if (data.hasOwnProperty("device_uid")) {
|
|
68
|
+
obj["device_uid"] = _ApiClient["default"].convertToType(data["device_uid"], "String");
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty("current")) {
|
|
71
|
+
obj["current"] = _DeviceDfuStatusCurrent["default"].constructFromObject(data["current"]);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty("history")) {
|
|
74
|
+
obj["history"] = _ApiClient["default"].convertToType(data["history"], [_DeviceDfuStateMachine["default"]]);
|
|
75
|
+
}
|
|
76
|
+
} else if (data === null) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return obj;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Validates the JSON data with respect to <code>DeviceDfuHistory</code>.
|
|
84
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
85
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeviceDfuHistory</code>.
|
|
86
|
+
*/
|
|
87
|
+
}, {
|
|
88
|
+
key: "validateJSON",
|
|
89
|
+
value: function validateJSON(data) {
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
if (data["device_uid"] && !(typeof data["device_uid"] === "string" || data["device_uid"] instanceof String)) {
|
|
92
|
+
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data["device_uid"]);
|
|
93
|
+
}
|
|
94
|
+
// validate the optional field `current`
|
|
95
|
+
if (data["current"]) {
|
|
96
|
+
// data not null
|
|
97
|
+
_DeviceDfuStatusCurrent["default"].validateJSON(data["current"]);
|
|
98
|
+
}
|
|
99
|
+
if (data["history"]) {
|
|
100
|
+
// data not null
|
|
101
|
+
// ensure the json data is an array
|
|
102
|
+
if (!Array.isArray(data["history"])) {
|
|
103
|
+
throw new Error("Expected the field `history` to be an array in the JSON data but got " + data["history"]);
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `history` (array)
|
|
106
|
+
var _iterator = _createForOfIteratorHelper(data["history"]),
|
|
107
|
+
_step;
|
|
108
|
+
try {
|
|
109
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
110
|
+
var item = _step.value;
|
|
111
|
+
_DeviceDfuStateMachine["default"].validateJsonObject(item);
|
|
112
|
+
}
|
|
113
|
+
} catch (err) {
|
|
114
|
+
_iterator.e(err);
|
|
115
|
+
} finally {
|
|
116
|
+
_iterator.f();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
}]);
|
|
122
|
+
}();
|
|
123
|
+
/**
|
|
124
|
+
* Device UID
|
|
125
|
+
* @member {String} device_uid
|
|
126
|
+
*/
|
|
127
|
+
DeviceDfuHistory.prototype["device_uid"] = undefined;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @member {module:model/DeviceDfuStatusCurrent} current
|
|
131
|
+
*/
|
|
132
|
+
DeviceDfuHistory.prototype["current"] = undefined;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @member {Array.<module:model/DeviceDfuStateMachine>} history
|
|
136
|
+
*/
|
|
137
|
+
DeviceDfuHistory.prototype["history"] = undefined;
|
|
138
|
+
var _default = exports["default"] = DeviceDfuHistory;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _DeviceDfuHistory = _interopRequireDefault(require("./DeviceDfuHistory"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
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
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
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); } /**
|
|
19
|
+
* Notehub API
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document: 1.2.0
|
|
23
|
+
* Contact: engineering@blues.io
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The DeviceDfuHistoryPage model module.
|
|
32
|
+
* @module model/DeviceDfuHistoryPage
|
|
33
|
+
* @version 1.0.24
|
|
34
|
+
*/
|
|
35
|
+
var DeviceDfuHistoryPage = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>DeviceDfuHistoryPage</code>.
|
|
38
|
+
* @alias module:model/DeviceDfuHistoryPage
|
|
39
|
+
*/
|
|
40
|
+
function DeviceDfuHistoryPage() {
|
|
41
|
+
_classCallCheck(this, DeviceDfuHistoryPage);
|
|
42
|
+
DeviceDfuHistoryPage.initialize(this);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(DeviceDfuHistoryPage, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>DeviceDfuHistoryPage</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
+
* @param {module:model/DeviceDfuHistoryPage} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/DeviceDfuHistoryPage} The populated <code>DeviceDfuHistoryPage</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new DeviceDfuHistoryPage();
|
|
66
|
+
if (data.hasOwnProperty("devices")) {
|
|
67
|
+
obj["devices"] = _ApiClient["default"].convertToType(data["devices"], [_DeviceDfuHistory["default"]]);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty("has_more")) {
|
|
70
|
+
obj["has_more"] = _ApiClient["default"].convertToType(data["has_more"], "Boolean");
|
|
71
|
+
}
|
|
72
|
+
} else if (data === null) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>DeviceDfuHistoryPage</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeviceDfuHistoryPage</code>.
|
|
82
|
+
*/
|
|
83
|
+
}, {
|
|
84
|
+
key: "validateJSON",
|
|
85
|
+
value: function validateJSON(data) {
|
|
86
|
+
if (data["devices"]) {
|
|
87
|
+
// data not null
|
|
88
|
+
// ensure the json data is an array
|
|
89
|
+
if (!Array.isArray(data["devices"])) {
|
|
90
|
+
throw new Error("Expected the field `devices` to be an array in the JSON data but got " + data["devices"]);
|
|
91
|
+
}
|
|
92
|
+
// validate the optional field `devices` (array)
|
|
93
|
+
var _iterator = _createForOfIteratorHelper(data["devices"]),
|
|
94
|
+
_step;
|
|
95
|
+
try {
|
|
96
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
97
|
+
var item = _step.value;
|
|
98
|
+
_DeviceDfuHistory["default"].validateJsonObject(item);
|
|
99
|
+
}
|
|
100
|
+
} catch (err) {
|
|
101
|
+
_iterator.e(err);
|
|
102
|
+
} finally {
|
|
103
|
+
_iterator.f();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}]);
|
|
109
|
+
}();
|
|
110
|
+
/**
|
|
111
|
+
* @member {Array.<module:model/DeviceDfuHistory>} devices
|
|
112
|
+
*/
|
|
113
|
+
DeviceDfuHistoryPage.prototype["devices"] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @member {Boolean} has_more
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
DeviceDfuHistoryPage.prototype["has_more"] = false;
|
|
120
|
+
var _default = exports["default"] = DeviceDfuHistoryPage;
|