@blues-inc/notehub-js 1.0.28 → 1.0.29-beta.10
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 +217 -190
- package/dist/ApiClient.js +156 -156
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +16 -16
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +351 -351
- package/dist/api/EventApi.js +118 -118
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +335 -335
- package/dist/api/RepositoryApi.js +605 -0
- package/dist/api/RouteApi.js +74 -74
- package/dist/index.js +63 -0
- package/dist/model/Alert.js +76 -74
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/Aws.js +65 -65
- package/dist/model/Azure.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/Body.js +5 -5
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +12 -12
- package/dist/model/CreateMonitor.js +126 -125
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +115 -0
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +92 -0
- package/dist/model/DataSet.js +164 -0
- package/dist/model/DataSetField.js +137 -0
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +124 -94
- package/dist/model/DeviceDfuHistory.js +20 -19
- package/dist/model/DeviceDfuHistoryPage.js +13 -12
- package/dist/model/DeviceDfuStateMachine.js +25 -24
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusCurrent.js +32 -32
- package/dist/model/DeviceDfuStatusPage.js +13 -12
- package/dist/model/DeviceSession.js +182 -182
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +32 -32
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +243 -243
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +23 -23
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +12 -12
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +17 -16
- package/dist/model/GetProjectEvents200Response.js +21 -20
- package/dist/model/GetProjectEventsByCursor200Response.js +24 -23
- package/dist/model/GetProjectFleets200Response.js +12 -11
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjectProducts200Response.js +10 -9
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +35 -35
- package/dist/model/Google.js +33 -33
- package/dist/model/HandleNoteChanges200Response.js +11 -11
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +11 -11
- package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/Http.js +35 -35
- package/dist/model/HttpFilter.js +19 -19
- package/dist/model/HttpTransform.js +20 -20
- package/dist/model/Location.js +40 -40
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +100 -99
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/Mqtt.js +66 -66
- package/dist/model/Note.js +10 -10
- package/dist/model/NotehubRoute.js +36 -36
- package/dist/model/NotehubRouteSchema.js +45 -46
- package/dist/model/PostProvisionProjectDeviceRequest.js +18 -18
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/Proxy.js +24 -24
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/QuestionDataResponseLineChart.js +204 -0
- package/dist/model/QuestionDataResponseMap.js +143 -0
- package/dist/model/Radresponder.js +25 -25
- package/dist/model/Repository.js +129 -0
- package/dist/model/Role.js +9 -9
- package/dist/model/SimUsage.js +128 -0
- package/dist/model/Slack.js +53 -53
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/Snowflake.js +45 -45
- package/dist/model/SnowflakeTransform.js +12 -12
- package/dist/model/Thingworx.js +33 -33
- package/dist/model/TowerLocation.js +52 -52
- package/dist/model/Twilio.js +43 -43
- package/dist/model/UpdateFleetRequest.js +22 -22
- package/dist/model/UploadMetadata.js +59 -59
- package/dist/model/UserDbRoute.js +25 -25
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/package.json +3 -3
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
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); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
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
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
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); } /**
|
|
15
|
+
* Notehub API
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: 1.2.0
|
|
19
|
+
* Contact: engineering@blues.io
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The DataSetField model module.
|
|
28
|
+
* @module model/DataSetField
|
|
29
|
+
* @version 1.0.29-beta.10
|
|
30
|
+
*/
|
|
31
|
+
var DataSetField = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>DataSetField</code>.
|
|
34
|
+
* @alias module:model/DataSetField
|
|
35
|
+
*/
|
|
36
|
+
function DataSetField() {
|
|
37
|
+
_classCallCheck(this, DataSetField);
|
|
38
|
+
DataSetField.initialize(this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
return _createClass(DataSetField, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>DataSetField</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/DataSetField} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/DataSetField} The populated <code>DataSetField</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new DataSetField();
|
|
62
|
+
if (data.hasOwnProperty('name')) {
|
|
63
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('datatype')) {
|
|
66
|
+
obj['datatype'] = _ApiClient["default"].convertToType(data['datatype'], 'Number');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('jsonata')) {
|
|
69
|
+
obj['jsonata'] = _ApiClient["default"].convertToType(data['jsonata'], 'String');
|
|
70
|
+
}
|
|
71
|
+
} else if (data === null) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>DataSetField</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DataSetField</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// ensure the json data is a string
|
|
86
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
87
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
88
|
+
}
|
|
89
|
+
// ensure the json data is a string
|
|
90
|
+
if (data['jsonata'] && !(typeof data['jsonata'] === 'string' || data['jsonata'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `jsonata` to be a primitive type in the JSON string but got " + data['jsonata']);
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
}();
|
|
97
|
+
/**
|
|
98
|
+
* The name of the field
|
|
99
|
+
* @member {String} name
|
|
100
|
+
*/
|
|
101
|
+
DataSetField.prototype['name'] = undefined;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The datatype of the field
|
|
105
|
+
* @member {module:model/DataSetField.DatatypeEnum} datatype
|
|
106
|
+
*/
|
|
107
|
+
DataSetField.prototype['datatype'] = undefined;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* the JSONata expression used to populate this field
|
|
111
|
+
* @member {String} jsonata
|
|
112
|
+
*/
|
|
113
|
+
DataSetField.prototype['jsonata'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Allowed values for the <code>datatype</code> property.
|
|
117
|
+
* @enum {Number}
|
|
118
|
+
* @readonly
|
|
119
|
+
*/
|
|
120
|
+
DataSetField['DatatypeEnum'] = {
|
|
121
|
+
/**
|
|
122
|
+
* value: 0
|
|
123
|
+
* @const
|
|
124
|
+
*/
|
|
125
|
+
"0": 0,
|
|
126
|
+
/**
|
|
127
|
+
* value: 1
|
|
128
|
+
* @const
|
|
129
|
+
*/
|
|
130
|
+
"1": 1,
|
|
131
|
+
/**
|
|
132
|
+
* value: 2
|
|
133
|
+
* @const
|
|
134
|
+
*/
|
|
135
|
+
"2": 2
|
|
136
|
+
};
|
|
137
|
+
var _default = exports["default"] = DataSetField;
|
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
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); } /**
|
|
18
18
|
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
@@ -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.29-beta.10
|
|
33
33
|
*/
|
|
34
34
|
var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -50,7 +50,7 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
|
50
50
|
return _createClass(DeleteDeviceFleetsRequest, null, [{
|
|
51
51
|
key: "initialize",
|
|
52
52
|
value: function initialize(obj, fleetUids) {
|
|
53
|
-
obj[
|
|
53
|
+
obj['fleet_uids'] = fleetUids;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -65,8 +65,8 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
|
65
65
|
value: function constructFromObject(data, obj) {
|
|
66
66
|
if (data) {
|
|
67
67
|
obj = obj || new DeleteDeviceFleetsRequest();
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty('fleet_uids')) {
|
|
69
|
+
obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
|
|
70
70
|
}
|
|
71
71
|
} else if (data === null) {
|
|
72
72
|
return null;
|
|
@@ -98,8 +98,8 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
|
98
98
|
} finally {
|
|
99
99
|
_iterator.f();
|
|
100
100
|
}
|
|
101
|
-
if (!Array.isArray(data[
|
|
102
|
-
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data[
|
|
101
|
+
if (!Array.isArray(data['fleet_uids'])) {
|
|
102
|
+
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
|
|
103
103
|
}
|
|
104
104
|
return true;
|
|
105
105
|
}
|
|
@@ -111,5 +111,5 @@ DeleteDeviceFleetsRequest.RequiredProperties = ["fleet_uids"];
|
|
|
111
111
|
* The fleetUIDs to remove from the device.
|
|
112
112
|
* @member {Array.<String>} fleet_uids
|
|
113
113
|
*/
|
|
114
|
-
DeleteDeviceFleetsRequest.prototype[
|
|
114
|
+
DeleteDeviceFleetsRequest.prototype['fleet_uids'] = undefined;
|
|
115
115
|
var _default = exports["default"] = DeleteDeviceFleetsRequest;
|
package/dist/model/Device.js
CHANGED
|
@@ -9,6 +9,7 @@ var _Contact = _interopRequireDefault(require("./Contact"));
|
|
|
9
9
|
var _DFUEnv = _interopRequireDefault(require("./DFUEnv"));
|
|
10
10
|
var _DeviceTowerInfo = _interopRequireDefault(require("./DeviceTowerInfo"));
|
|
11
11
|
var _Location = _interopRequireDefault(require("./Location"));
|
|
12
|
+
var _SimUsage = _interopRequireDefault(require("./SimUsage"));
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
14
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
15
|
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; } } }; }
|
|
@@ -20,7 +21,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
20
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
22
|
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); } /**
|
|
22
23
|
* Notehub API
|
|
23
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
24
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
24
25
|
*
|
|
25
26
|
* The version of the OpenAPI document: 1.2.0
|
|
26
27
|
* Contact: engineering@blues.io
|
|
@@ -33,18 +34,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
34
|
/**
|
|
34
35
|
* The Device model module.
|
|
35
36
|
* @module model/Device
|
|
36
|
-
* @version 1.0.
|
|
37
|
+
* @version 1.0.29-beta.10
|
|
37
38
|
*/
|
|
38
39
|
var Device = /*#__PURE__*/function () {
|
|
39
40
|
/**
|
|
40
41
|
* Constructs a new <code>Device</code>.
|
|
41
42
|
* @alias module:model/Device
|
|
42
|
-
* @param uid {String}
|
|
43
|
-
* @param provisioned {Date}
|
|
44
|
-
* @param productUid {String}
|
|
45
|
-
* @param fleetUids {Array.<String>}
|
|
46
|
-
* @param voltage {Number}
|
|
47
|
-
* @param temperature {Number}
|
|
43
|
+
* @param uid {String}
|
|
44
|
+
* @param provisioned {Date}
|
|
45
|
+
* @param productUid {String}
|
|
46
|
+
* @param fleetUids {Array.<String>}
|
|
47
|
+
* @param voltage {Number}
|
|
48
|
+
* @param temperature {Number}
|
|
48
49
|
*/
|
|
49
50
|
function Device(uid, provisioned, productUid, fleetUids, voltage, temperature) {
|
|
50
51
|
_classCallCheck(this, Device);
|
|
@@ -59,12 +60,12 @@ var Device = /*#__PURE__*/function () {
|
|
|
59
60
|
return _createClass(Device, null, [{
|
|
60
61
|
key: "initialize",
|
|
61
62
|
value: function initialize(obj, uid, provisioned, productUid, fleetUids, voltage, temperature) {
|
|
62
|
-
obj[
|
|
63
|
-
obj[
|
|
64
|
-
obj[
|
|
65
|
-
obj[
|
|
66
|
-
obj[
|
|
67
|
-
obj[
|
|
63
|
+
obj['uid'] = uid;
|
|
64
|
+
obj['provisioned'] = provisioned;
|
|
65
|
+
obj['product_uid'] = productUid;
|
|
66
|
+
obj['fleet_uids'] = fleetUids;
|
|
67
|
+
obj['voltage'] = voltage;
|
|
68
|
+
obj['temperature'] = temperature;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
/**
|
|
@@ -79,59 +80,62 @@ var Device = /*#__PURE__*/function () {
|
|
|
79
80
|
value: function constructFromObject(data, obj) {
|
|
80
81
|
if (data) {
|
|
81
82
|
obj = obj || new Device();
|
|
82
|
-
if (data.hasOwnProperty(
|
|
83
|
-
obj[
|
|
83
|
+
if (data.hasOwnProperty('uid')) {
|
|
84
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
84
85
|
}
|
|
85
|
-
if (data.hasOwnProperty(
|
|
86
|
-
obj[
|
|
86
|
+
if (data.hasOwnProperty('serial_number')) {
|
|
87
|
+
obj['serial_number'] = _ApiClient["default"].convertToType(data['serial_number'], 'String');
|
|
87
88
|
}
|
|
88
|
-
if (data.hasOwnProperty(
|
|
89
|
-
obj[
|
|
89
|
+
if (data.hasOwnProperty('provisioned')) {
|
|
90
|
+
obj['provisioned'] = _ApiClient["default"].convertToType(data['provisioned'], 'Date');
|
|
90
91
|
}
|
|
91
|
-
if (data.hasOwnProperty(
|
|
92
|
-
obj[
|
|
92
|
+
if (data.hasOwnProperty('last_activity')) {
|
|
93
|
+
obj['last_activity'] = _ApiClient["default"].convertToType(data['last_activity'], 'Date');
|
|
93
94
|
}
|
|
94
|
-
if (data.hasOwnProperty(
|
|
95
|
-
obj[
|
|
95
|
+
if (data.hasOwnProperty('contact')) {
|
|
96
|
+
obj['contact'] = _Contact["default"].constructFromObject(data['contact']);
|
|
96
97
|
}
|
|
97
|
-
if (data.hasOwnProperty(
|
|
98
|
-
obj[
|
|
98
|
+
if (data.hasOwnProperty('product_uid')) {
|
|
99
|
+
obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
|
|
99
100
|
}
|
|
100
|
-
if (data.hasOwnProperty(
|
|
101
|
-
obj[
|
|
101
|
+
if (data.hasOwnProperty('fleet_uids')) {
|
|
102
|
+
obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
|
|
102
103
|
}
|
|
103
|
-
if (data.hasOwnProperty(
|
|
104
|
-
obj[
|
|
104
|
+
if (data.hasOwnProperty('tower_info')) {
|
|
105
|
+
obj['tower_info'] = _DeviceTowerInfo["default"].constructFromObject(data['tower_info']);
|
|
105
106
|
}
|
|
106
|
-
if (data.hasOwnProperty(
|
|
107
|
-
obj[
|
|
107
|
+
if (data.hasOwnProperty('tower_location')) {
|
|
108
|
+
obj['tower_location'] = _Location["default"].constructFromObject(data['tower_location']);
|
|
108
109
|
}
|
|
109
|
-
if (data.hasOwnProperty(
|
|
110
|
-
obj[
|
|
110
|
+
if (data.hasOwnProperty('gps_location')) {
|
|
111
|
+
obj['gps_location'] = _Location["default"].constructFromObject(data['gps_location']);
|
|
111
112
|
}
|
|
112
|
-
if (data.hasOwnProperty(
|
|
113
|
-
obj[
|
|
113
|
+
if (data.hasOwnProperty('triangulated_location')) {
|
|
114
|
+
obj['triangulated_location'] = _Location["default"].constructFromObject(data['triangulated_location']);
|
|
114
115
|
}
|
|
115
|
-
if (data.hasOwnProperty(
|
|
116
|
-
obj[
|
|
116
|
+
if (data.hasOwnProperty('voltage')) {
|
|
117
|
+
obj['voltage'] = _ApiClient["default"].convertToType(data['voltage'], 'Number');
|
|
117
118
|
}
|
|
118
|
-
if (data.hasOwnProperty(
|
|
119
|
-
obj[
|
|
119
|
+
if (data.hasOwnProperty('temperature')) {
|
|
120
|
+
obj['temperature'] = _ApiClient["default"].convertToType(data['temperature'], 'Number');
|
|
120
121
|
}
|
|
121
|
-
if (data.hasOwnProperty(
|
|
122
|
-
obj[
|
|
122
|
+
if (data.hasOwnProperty('dfu')) {
|
|
123
|
+
obj['dfu'] = _DFUEnv["default"].constructFromObject(data['dfu']);
|
|
123
124
|
}
|
|
124
|
-
if (data.hasOwnProperty(
|
|
125
|
-
obj[
|
|
125
|
+
if (data.hasOwnProperty('firmware_host')) {
|
|
126
|
+
obj['firmware_host'] = _ApiClient["default"].convertToType(data['firmware_host'], 'String');
|
|
126
127
|
}
|
|
127
|
-
if (data.hasOwnProperty(
|
|
128
|
-
obj[
|
|
128
|
+
if (data.hasOwnProperty('firmware_notecard')) {
|
|
129
|
+
obj['firmware_notecard'] = _ApiClient["default"].convertToType(data['firmware_notecard'], 'String');
|
|
129
130
|
}
|
|
130
|
-
if (data.hasOwnProperty(
|
|
131
|
-
obj[
|
|
131
|
+
if (data.hasOwnProperty('sku')) {
|
|
132
|
+
obj['sku'] = _ApiClient["default"].convertToType(data['sku'], 'String');
|
|
132
133
|
}
|
|
133
|
-
if (data.hasOwnProperty(
|
|
134
|
-
obj[
|
|
134
|
+
if (data.hasOwnProperty('disabled')) {
|
|
135
|
+
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
136
|
+
}
|
|
137
|
+
if (data.hasOwnProperty('cellular_usage')) {
|
|
138
|
+
obj['cellular_usage'] = _ApiClient["default"].convertToType(data['cellular_usage'], [_SimUsage["default"]]);
|
|
135
139
|
}
|
|
136
140
|
} else if (data === null) {
|
|
137
141
|
return null;
|
|
@@ -163,62 +167,83 @@ var Device = /*#__PURE__*/function () {
|
|
|
163
167
|
} finally {
|
|
164
168
|
_iterator.f();
|
|
165
169
|
}
|
|
166
|
-
if (data[
|
|
167
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
170
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
171
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
168
172
|
}
|
|
169
173
|
// ensure the json data is a string
|
|
170
|
-
if (data[
|
|
171
|
-
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data[
|
|
174
|
+
if (data['serial_number'] && !(typeof data['serial_number'] === 'string' || data['serial_number'] instanceof String)) {
|
|
175
|
+
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data['serial_number']);
|
|
172
176
|
}
|
|
173
177
|
// validate the optional field `contact`
|
|
174
|
-
if (data[
|
|
178
|
+
if (data['contact']) {
|
|
175
179
|
// data not null
|
|
176
|
-
_Contact["default"].validateJSON(data[
|
|
180
|
+
_Contact["default"].validateJSON(data['contact']);
|
|
177
181
|
}
|
|
178
182
|
// ensure the json data is a string
|
|
179
|
-
if (data[
|
|
180
|
-
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data[
|
|
183
|
+
if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
|
|
184
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
|
|
181
185
|
}
|
|
182
186
|
// ensure the json data is an array
|
|
183
|
-
if (!Array.isArray(data[
|
|
184
|
-
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data[
|
|
187
|
+
if (!Array.isArray(data['fleet_uids'])) {
|
|
188
|
+
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
|
|
185
189
|
}
|
|
186
190
|
// validate the optional field `tower_info`
|
|
187
|
-
if (data[
|
|
191
|
+
if (data['tower_info']) {
|
|
188
192
|
// data not null
|
|
189
|
-
_DeviceTowerInfo["default"].validateJSON(data[
|
|
193
|
+
_DeviceTowerInfo["default"].validateJSON(data['tower_info']);
|
|
190
194
|
}
|
|
191
195
|
// validate the optional field `tower_location`
|
|
192
|
-
if (data[
|
|
196
|
+
if (data['tower_location']) {
|
|
193
197
|
// data not null
|
|
194
|
-
_Location["default"].validateJSON(data[
|
|
198
|
+
_Location["default"].validateJSON(data['tower_location']);
|
|
195
199
|
}
|
|
196
200
|
// validate the optional field `gps_location`
|
|
197
|
-
if (data[
|
|
201
|
+
if (data['gps_location']) {
|
|
198
202
|
// data not null
|
|
199
|
-
_Location["default"].validateJSON(data[
|
|
203
|
+
_Location["default"].validateJSON(data['gps_location']);
|
|
200
204
|
}
|
|
201
205
|
// validate the optional field `triangulated_location`
|
|
202
|
-
if (data[
|
|
206
|
+
if (data['triangulated_location']) {
|
|
203
207
|
// data not null
|
|
204
|
-
_Location["default"].validateJSON(data[
|
|
208
|
+
_Location["default"].validateJSON(data['triangulated_location']);
|
|
205
209
|
}
|
|
206
210
|
// validate the optional field `dfu`
|
|
207
|
-
if (data[
|
|
211
|
+
if (data['dfu']) {
|
|
208
212
|
// data not null
|
|
209
|
-
_DFUEnv["default"].validateJSON(data[
|
|
213
|
+
_DFUEnv["default"].validateJSON(data['dfu']);
|
|
210
214
|
}
|
|
211
215
|
// ensure the json data is a string
|
|
212
|
-
if (data[
|
|
213
|
-
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data[
|
|
216
|
+
if (data['firmware_host'] && !(typeof data['firmware_host'] === 'string' || data['firmware_host'] instanceof String)) {
|
|
217
|
+
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data['firmware_host']);
|
|
214
218
|
}
|
|
215
219
|
// ensure the json data is a string
|
|
216
|
-
if (data[
|
|
217
|
-
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data[
|
|
220
|
+
if (data['firmware_notecard'] && !(typeof data['firmware_notecard'] === 'string' || data['firmware_notecard'] instanceof String)) {
|
|
221
|
+
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data['firmware_notecard']);
|
|
218
222
|
}
|
|
219
223
|
// ensure the json data is a string
|
|
220
|
-
if (data[
|
|
221
|
-
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data[
|
|
224
|
+
if (data['sku'] && !(typeof data['sku'] === 'string' || data['sku'] instanceof String)) {
|
|
225
|
+
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data['sku']);
|
|
226
|
+
}
|
|
227
|
+
if (data['cellular_usage']) {
|
|
228
|
+
// data not null
|
|
229
|
+
// ensure the json data is an array
|
|
230
|
+
if (!Array.isArray(data['cellular_usage'])) {
|
|
231
|
+
throw new Error("Expected the field `cellular_usage` to be an array in the JSON data but got " + data['cellular_usage']);
|
|
232
|
+
}
|
|
233
|
+
// validate the optional field `cellular_usage` (array)
|
|
234
|
+
var _iterator2 = _createForOfIteratorHelper(data['cellular_usage']),
|
|
235
|
+
_step2;
|
|
236
|
+
try {
|
|
237
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
238
|
+
var item = _step2.value;
|
|
239
|
+
_SimUsage["default"].validateJsonObject(item);
|
|
240
|
+
}
|
|
241
|
+
} catch (err) {
|
|
242
|
+
_iterator2.e(err);
|
|
243
|
+
} finally {
|
|
244
|
+
_iterator2.f();
|
|
245
|
+
}
|
|
246
|
+
;
|
|
222
247
|
}
|
|
223
248
|
return true;
|
|
224
249
|
}
|
|
@@ -229,90 +254,95 @@ Device.RequiredProperties = ["uid", "provisioned", "product_uid", "fleet_uids",
|
|
|
229
254
|
/**
|
|
230
255
|
* @member {String} uid
|
|
231
256
|
*/
|
|
232
|
-
Device.prototype[
|
|
257
|
+
Device.prototype['uid'] = undefined;
|
|
233
258
|
|
|
234
259
|
/**
|
|
235
260
|
* @member {String} serial_number
|
|
236
261
|
*/
|
|
237
|
-
Device.prototype[
|
|
262
|
+
Device.prototype['serial_number'] = undefined;
|
|
238
263
|
|
|
239
264
|
/**
|
|
240
265
|
* @member {Date} provisioned
|
|
241
266
|
*/
|
|
242
|
-
Device.prototype[
|
|
267
|
+
Device.prototype['provisioned'] = undefined;
|
|
243
268
|
|
|
244
269
|
/**
|
|
245
270
|
* @member {Date} last_activity
|
|
246
271
|
*/
|
|
247
|
-
Device.prototype[
|
|
272
|
+
Device.prototype['last_activity'] = undefined;
|
|
248
273
|
|
|
249
274
|
/**
|
|
250
275
|
* @member {module:model/Contact} contact
|
|
251
276
|
*/
|
|
252
|
-
Device.prototype[
|
|
277
|
+
Device.prototype['contact'] = undefined;
|
|
253
278
|
|
|
254
279
|
/**
|
|
255
280
|
* @member {String} product_uid
|
|
256
281
|
*/
|
|
257
|
-
Device.prototype[
|
|
282
|
+
Device.prototype['product_uid'] = undefined;
|
|
258
283
|
|
|
259
284
|
/**
|
|
260
285
|
* @member {Array.<String>} fleet_uids
|
|
261
286
|
*/
|
|
262
|
-
Device.prototype[
|
|
287
|
+
Device.prototype['fleet_uids'] = undefined;
|
|
263
288
|
|
|
264
289
|
/**
|
|
265
290
|
* @member {module:model/DeviceTowerInfo} tower_info
|
|
266
291
|
*/
|
|
267
|
-
Device.prototype[
|
|
292
|
+
Device.prototype['tower_info'] = undefined;
|
|
268
293
|
|
|
269
294
|
/**
|
|
270
295
|
* @member {module:model/Location} tower_location
|
|
271
296
|
*/
|
|
272
|
-
Device.prototype[
|
|
297
|
+
Device.prototype['tower_location'] = undefined;
|
|
273
298
|
|
|
274
299
|
/**
|
|
275
300
|
* @member {module:model/Location} gps_location
|
|
276
301
|
*/
|
|
277
|
-
Device.prototype[
|
|
302
|
+
Device.prototype['gps_location'] = undefined;
|
|
278
303
|
|
|
279
304
|
/**
|
|
280
305
|
* @member {module:model/Location} triangulated_location
|
|
281
306
|
*/
|
|
282
|
-
Device.prototype[
|
|
307
|
+
Device.prototype['triangulated_location'] = undefined;
|
|
283
308
|
|
|
284
309
|
/**
|
|
285
310
|
* @member {Number} voltage
|
|
286
311
|
*/
|
|
287
|
-
Device.prototype[
|
|
312
|
+
Device.prototype['voltage'] = undefined;
|
|
288
313
|
|
|
289
314
|
/**
|
|
290
315
|
* @member {Number} temperature
|
|
291
316
|
*/
|
|
292
|
-
Device.prototype[
|
|
317
|
+
Device.prototype['temperature'] = undefined;
|
|
293
318
|
|
|
294
319
|
/**
|
|
295
320
|
* @member {module:model/DFUEnv} dfu
|
|
296
321
|
*/
|
|
297
|
-
Device.prototype[
|
|
322
|
+
Device.prototype['dfu'] = undefined;
|
|
298
323
|
|
|
299
324
|
/**
|
|
300
325
|
* @member {String} firmware_host
|
|
301
326
|
*/
|
|
302
|
-
Device.prototype[
|
|
327
|
+
Device.prototype['firmware_host'] = undefined;
|
|
303
328
|
|
|
304
329
|
/**
|
|
305
330
|
* @member {String} firmware_notecard
|
|
306
331
|
*/
|
|
307
|
-
Device.prototype[
|
|
332
|
+
Device.prototype['firmware_notecard'] = undefined;
|
|
308
333
|
|
|
309
334
|
/**
|
|
310
335
|
* @member {String} sku
|
|
311
336
|
*/
|
|
312
|
-
Device.prototype[
|
|
337
|
+
Device.prototype['sku'] = undefined;
|
|
313
338
|
|
|
314
339
|
/**
|
|
315
340
|
* @member {Boolean} disabled
|
|
316
341
|
*/
|
|
317
|
-
Device.prototype[
|
|
342
|
+
Device.prototype['disabled'] = undefined;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @member {Array.<module:model/SimUsage>} cellular_usage
|
|
346
|
+
*/
|
|
347
|
+
Device.prototype['cellular_usage'] = undefined;
|
|
318
348
|
var _default = exports["default"] = Device;
|