@blues-inc/notehub-js 4.0.0 → 5.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +246 -248
- package/dist/ApiClient.js +150 -155
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +369 -453
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +387 -381
- package/dist/api/RouteApi.js +83 -77
- package/dist/api/UsageApi.js +65 -62
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +7 -0
- package/dist/model/AddDeviceToFleetsRequest.js +8 -8
- package/dist/model/Alert.js +76 -74
- package/dist/model/AlertDataInner.js +40 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +65 -65
- package/dist/model/AzureRoute.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/BlynkRoute.js +28 -28
- package/dist/model/Body.js +5 -5
- package/dist/model/CellularPlan.js +34 -34
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +20 -20
- package/dist/model/CreateMonitor.js +139 -131
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +17 -17
- 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 +7 -7
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DataUsage.js +14 -14
- package/dist/model/DatacakeRoute.js +35 -35
- package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
- package/dist/model/DeleteNotefilesRequest.js +7 -7
- package/dist/model/Device.js +107 -106
- package/dist/model/DeviceDfuHistory.js +20 -19
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- 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/DeviceDfuStatusPage.js +13 -12
- package/dist/model/DeviceSession.js +221 -221
- 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/EnvTreeJsonNode.js +69 -67
- package/dist/model/EnvVar.js +18 -18
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Filter.js +16 -16
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +38 -38
- package/dist/model/FleetConnectivityAssurance.js +5 -5
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDataUsage200Response.js +10 -9
- package/dist/model/GetDataUsage200ResponseDataInner.js +52 -42
- package/dist/model/GetDbNote200Response.js +13 -13
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatestEvents200Response.js +10 -9
- package/dist/model/GetDevicePlans200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/GetDevices200Response.js +17 -16
- package/dist/model/GetEvents200Response.js +21 -20
- package/dist/model/GetEventsByCursor200Response.js +24 -23
- package/dist/model/GetNotefile200Response.js +11 -11
- package/dist/model/GetProducts200Response.js +10 -9
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetRouteLogsUsage200Response.js +12 -11
- package/dist/model/GetSessionsUsage200Response.js +12 -11
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- 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 +106 -100
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +31 -31
- package/dist/model/NoteInput.js +9 -9
- package/dist/model/Notefile.js +23 -22
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +103 -103
- package/dist/model/NotehubRouteSummary.js +23 -23
- package/dist/model/OAuth2Error.js +20 -20
- package/dist/model/OAuth2TokenResponse.js +23 -23
- package/dist/model/PersonalAccessToken.js +34 -34
- package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
- package/dist/model/PersonalAccessTokenInfo.js +18 -18
- package/dist/model/PersonalAccessTokenSecret.js +12 -12
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/ProvisionDeviceRequest.js +18 -18
- package/dist/model/ProxyRoute.js +29 -29
- package/dist/model/QubitroRoute.js +33 -33
- package/dist/model/RadRoute.js +31 -31
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/RouteTransformSettings.js +18 -18
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatelliteDataUsage.js +144 -0
- package/dist/model/SatellitePlan.js +42 -33
- package/dist/model/SchemaProperty.js +38 -36
- package/dist/model/SignalDevice200Response.js +5 -5
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +48 -48
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +45 -45
- package/dist/model/SnowpipeStreamingRoute.js +60 -60
- package/dist/model/ThingworxRoute.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/TwilioRoute.js +43 -43
- package/dist/model/UpdateFleetRequest.js +33 -33
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +63 -18
- package/dist/model/UsageEventsData.js +37 -37
- package/dist/model/UsageEventsResponse.js +12 -11
- package/dist/model/UsageRouteLogsData.js +27 -27
- package/dist/model/UsageSessionsData.js +32 -32
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +3 -3
package/dist/model/Device.js
CHANGED
|
@@ -21,7 +21,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
21
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
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); } /**
|
|
23
23
|
* Notehub API
|
|
24
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
24
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
25
25
|
*
|
|
26
26
|
* The version of the OpenAPI document: 1.2.0
|
|
27
27
|
* Contact: engineering@blues.io
|
|
@@ -34,18 +34,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
34
34
|
/**
|
|
35
35
|
* The Device model module.
|
|
36
36
|
* @module model/Device
|
|
37
|
-
* @version
|
|
37
|
+
* @version 5.0.0-beta.2
|
|
38
38
|
*/
|
|
39
39
|
var Device = /*#__PURE__*/function () {
|
|
40
40
|
/**
|
|
41
41
|
* Constructs a new <code>Device</code>.
|
|
42
42
|
* @alias module:model/Device
|
|
43
|
-
* @param fleetUids {Array.<String>}
|
|
44
|
-
* @param productUid {String}
|
|
45
|
-
* @param provisioned {Date}
|
|
46
|
-
* @param temperature {Number}
|
|
47
|
-
* @param uid {String}
|
|
48
|
-
* @param voltage {Number}
|
|
43
|
+
* @param fleetUids {Array.<String>}
|
|
44
|
+
* @param productUid {String}
|
|
45
|
+
* @param provisioned {Date}
|
|
46
|
+
* @param temperature {Number}
|
|
47
|
+
* @param uid {String}
|
|
48
|
+
* @param voltage {Number}
|
|
49
49
|
*/
|
|
50
50
|
function Device(fleetUids, productUid, provisioned, temperature, uid, voltage) {
|
|
51
51
|
_classCallCheck(this, Device);
|
|
@@ -60,12 +60,12 @@ var Device = /*#__PURE__*/function () {
|
|
|
60
60
|
return _createClass(Device, null, [{
|
|
61
61
|
key: "initialize",
|
|
62
62
|
value: function initialize(obj, fleetUids, productUid, provisioned, temperature, uid, voltage) {
|
|
63
|
-
obj[
|
|
64
|
-
obj[
|
|
65
|
-
obj[
|
|
66
|
-
obj[
|
|
67
|
-
obj[
|
|
68
|
-
obj[
|
|
63
|
+
obj['fleet_uids'] = fleetUids;
|
|
64
|
+
obj['product_uid'] = productUid;
|
|
65
|
+
obj['provisioned'] = provisioned;
|
|
66
|
+
obj['temperature'] = temperature;
|
|
67
|
+
obj['uid'] = uid;
|
|
68
|
+
obj['voltage'] = voltage;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
@@ -80,65 +80,65 @@ var Device = /*#__PURE__*/function () {
|
|
|
80
80
|
value: function constructFromObject(data, obj) {
|
|
81
81
|
if (data) {
|
|
82
82
|
obj = obj || new Device();
|
|
83
|
-
if (data.hasOwnProperty(
|
|
84
|
-
obj[
|
|
83
|
+
if (data.hasOwnProperty('best_location')) {
|
|
84
|
+
obj['best_location'] = _Location["default"].constructFromObject(data['best_location']);
|
|
85
85
|
}
|
|
86
|
-
if (data.hasOwnProperty(
|
|
87
|
-
obj[
|
|
86
|
+
if (data.hasOwnProperty('cellular_usage')) {
|
|
87
|
+
obj['cellular_usage'] = _ApiClient["default"].convertToType(data['cellular_usage'], [_SimUsage["default"]]);
|
|
88
88
|
}
|
|
89
|
-
if (data.hasOwnProperty(
|
|
90
|
-
obj[
|
|
89
|
+
if (data.hasOwnProperty('contact')) {
|
|
90
|
+
obj['contact'] = _Contact["default"].constructFromObject(data['contact']);
|
|
91
91
|
}
|
|
92
|
-
if (data.hasOwnProperty(
|
|
93
|
-
obj[
|
|
92
|
+
if (data.hasOwnProperty('dfu')) {
|
|
93
|
+
obj['dfu'] = _DFUEnv["default"].constructFromObject(data['dfu']);
|
|
94
94
|
}
|
|
95
|
-
if (data.hasOwnProperty(
|
|
96
|
-
obj[
|
|
95
|
+
if (data.hasOwnProperty('disabled')) {
|
|
96
|
+
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
97
97
|
}
|
|
98
|
-
if (data.hasOwnProperty(
|
|
99
|
-
obj[
|
|
98
|
+
if (data.hasOwnProperty('firmware_host')) {
|
|
99
|
+
obj['firmware_host'] = _ApiClient["default"].convertToType(data['firmware_host'], 'String');
|
|
100
100
|
}
|
|
101
|
-
if (data.hasOwnProperty(
|
|
102
|
-
obj[
|
|
101
|
+
if (data.hasOwnProperty('firmware_notecard')) {
|
|
102
|
+
obj['firmware_notecard'] = _ApiClient["default"].convertToType(data['firmware_notecard'], 'String');
|
|
103
103
|
}
|
|
104
|
-
if (data.hasOwnProperty(
|
|
105
|
-
obj[
|
|
104
|
+
if (data.hasOwnProperty('fleet_uids')) {
|
|
105
|
+
obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
|
|
106
106
|
}
|
|
107
|
-
if (data.hasOwnProperty(
|
|
108
|
-
obj[
|
|
107
|
+
if (data.hasOwnProperty('gps_location')) {
|
|
108
|
+
obj['gps_location'] = _Location["default"].constructFromObject(data['gps_location']);
|
|
109
109
|
}
|
|
110
|
-
if (data.hasOwnProperty(
|
|
111
|
-
obj[
|
|
110
|
+
if (data.hasOwnProperty('last_activity')) {
|
|
111
|
+
obj['last_activity'] = _ApiClient["default"].convertToType(data['last_activity'], 'Date');
|
|
112
112
|
}
|
|
113
|
-
if (data.hasOwnProperty(
|
|
114
|
-
obj[
|
|
113
|
+
if (data.hasOwnProperty('product_uid')) {
|
|
114
|
+
obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
|
|
115
115
|
}
|
|
116
|
-
if (data.hasOwnProperty(
|
|
117
|
-
obj[
|
|
116
|
+
if (data.hasOwnProperty('provisioned')) {
|
|
117
|
+
obj['provisioned'] = _ApiClient["default"].convertToType(data['provisioned'], 'Date');
|
|
118
118
|
}
|
|
119
|
-
if (data.hasOwnProperty(
|
|
120
|
-
obj[
|
|
119
|
+
if (data.hasOwnProperty('serial_number')) {
|
|
120
|
+
obj['serial_number'] = _ApiClient["default"].convertToType(data['serial_number'], 'String');
|
|
121
121
|
}
|
|
122
|
-
if (data.hasOwnProperty(
|
|
123
|
-
obj[
|
|
122
|
+
if (data.hasOwnProperty('sku')) {
|
|
123
|
+
obj['sku'] = _ApiClient["default"].convertToType(data['sku'], 'String');
|
|
124
124
|
}
|
|
125
|
-
if (data.hasOwnProperty(
|
|
126
|
-
obj[
|
|
125
|
+
if (data.hasOwnProperty('temperature')) {
|
|
126
|
+
obj['temperature'] = _ApiClient["default"].convertToType(data['temperature'], 'Number');
|
|
127
127
|
}
|
|
128
|
-
if (data.hasOwnProperty(
|
|
129
|
-
obj[
|
|
128
|
+
if (data.hasOwnProperty('tower_info')) {
|
|
129
|
+
obj['tower_info'] = _DeviceTowerInfo["default"].constructFromObject(data['tower_info']);
|
|
130
130
|
}
|
|
131
|
-
if (data.hasOwnProperty(
|
|
132
|
-
obj[
|
|
131
|
+
if (data.hasOwnProperty('tower_location')) {
|
|
132
|
+
obj['tower_location'] = _Location["default"].constructFromObject(data['tower_location']);
|
|
133
133
|
}
|
|
134
|
-
if (data.hasOwnProperty(
|
|
135
|
-
obj[
|
|
134
|
+
if (data.hasOwnProperty('triangulated_location')) {
|
|
135
|
+
obj['triangulated_location'] = _Location["default"].constructFromObject(data['triangulated_location']);
|
|
136
136
|
}
|
|
137
|
-
if (data.hasOwnProperty(
|
|
138
|
-
obj[
|
|
137
|
+
if (data.hasOwnProperty('uid')) {
|
|
138
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
139
139
|
}
|
|
140
|
-
if (data.hasOwnProperty(
|
|
141
|
-
obj[
|
|
140
|
+
if (data.hasOwnProperty('voltage')) {
|
|
141
|
+
obj['voltage'] = _ApiClient["default"].convertToType(data['voltage'], 'Number');
|
|
142
142
|
}
|
|
143
143
|
} else if (data === null) {
|
|
144
144
|
return null;
|
|
@@ -170,18 +170,18 @@ var Device = /*#__PURE__*/function () {
|
|
|
170
170
|
} finally {
|
|
171
171
|
_iterator.f();
|
|
172
172
|
}
|
|
173
|
-
if (data[
|
|
173
|
+
if (data['best_location']) {
|
|
174
174
|
// data not null
|
|
175
|
-
_Location["default"].validateJSON(data[
|
|
175
|
+
_Location["default"].validateJSON(data['best_location']);
|
|
176
176
|
}
|
|
177
|
-
if (data[
|
|
177
|
+
if (data['cellular_usage']) {
|
|
178
178
|
// data not null
|
|
179
179
|
// ensure the json data is an array
|
|
180
|
-
if (!Array.isArray(data[
|
|
181
|
-
throw new Error("Expected the field `cellular_usage` to be an array in the JSON data but got " + data[
|
|
180
|
+
if (!Array.isArray(data['cellular_usage'])) {
|
|
181
|
+
throw new Error("Expected the field `cellular_usage` to be an array in the JSON data but got " + data['cellular_usage']);
|
|
182
182
|
}
|
|
183
183
|
// validate the optional field `cellular_usage` (array)
|
|
184
|
-
var _iterator2 = _createForOfIteratorHelper(data[
|
|
184
|
+
var _iterator2 = _createForOfIteratorHelper(data['cellular_usage']),
|
|
185
185
|
_step2;
|
|
186
186
|
try {
|
|
187
187
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -193,64 +193,65 @@ var Device = /*#__PURE__*/function () {
|
|
|
193
193
|
} finally {
|
|
194
194
|
_iterator2.f();
|
|
195
195
|
}
|
|
196
|
+
;
|
|
196
197
|
}
|
|
197
198
|
// validate the optional field `contact`
|
|
198
|
-
if (data[
|
|
199
|
+
if (data['contact']) {
|
|
199
200
|
// data not null
|
|
200
|
-
_Contact["default"].validateJSON(data[
|
|
201
|
+
_Contact["default"].validateJSON(data['contact']);
|
|
201
202
|
}
|
|
202
203
|
// validate the optional field `dfu`
|
|
203
|
-
if (data[
|
|
204
|
+
if (data['dfu']) {
|
|
204
205
|
// data not null
|
|
205
|
-
_DFUEnv["default"].validateJSON(data[
|
|
206
|
+
_DFUEnv["default"].validateJSON(data['dfu']);
|
|
206
207
|
}
|
|
207
208
|
// ensure the json data is a string
|
|
208
|
-
if (data[
|
|
209
|
-
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data[
|
|
209
|
+
if (data['firmware_host'] && !(typeof data['firmware_host'] === 'string' || data['firmware_host'] instanceof String)) {
|
|
210
|
+
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data['firmware_host']);
|
|
210
211
|
}
|
|
211
212
|
// ensure the json data is a string
|
|
212
|
-
if (data[
|
|
213
|
-
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data[
|
|
213
|
+
if (data['firmware_notecard'] && !(typeof data['firmware_notecard'] === 'string' || data['firmware_notecard'] instanceof String)) {
|
|
214
|
+
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data['firmware_notecard']);
|
|
214
215
|
}
|
|
215
216
|
// ensure the json data is an array
|
|
216
|
-
if (!Array.isArray(data[
|
|
217
|
-
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data[
|
|
217
|
+
if (!Array.isArray(data['fleet_uids'])) {
|
|
218
|
+
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
|
|
218
219
|
}
|
|
219
220
|
// validate the optional field `gps_location`
|
|
220
|
-
if (data[
|
|
221
|
+
if (data['gps_location']) {
|
|
221
222
|
// data not null
|
|
222
|
-
_Location["default"].validateJSON(data[
|
|
223
|
+
_Location["default"].validateJSON(data['gps_location']);
|
|
223
224
|
}
|
|
224
225
|
// ensure the json data is a string
|
|
225
|
-
if (data[
|
|
226
|
-
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data[
|
|
226
|
+
if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
|
|
227
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
|
|
227
228
|
}
|
|
228
229
|
// ensure the json data is a string
|
|
229
|
-
if (data[
|
|
230
|
-
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data[
|
|
230
|
+
if (data['serial_number'] && !(typeof data['serial_number'] === 'string' || data['serial_number'] instanceof String)) {
|
|
231
|
+
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data['serial_number']);
|
|
231
232
|
}
|
|
232
233
|
// ensure the json data is a string
|
|
233
|
-
if (data[
|
|
234
|
-
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data[
|
|
234
|
+
if (data['sku'] && !(typeof data['sku'] === 'string' || data['sku'] instanceof String)) {
|
|
235
|
+
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data['sku']);
|
|
235
236
|
}
|
|
236
237
|
// validate the optional field `tower_info`
|
|
237
|
-
if (data[
|
|
238
|
+
if (data['tower_info']) {
|
|
238
239
|
// data not null
|
|
239
|
-
_DeviceTowerInfo["default"].validateJSON(data[
|
|
240
|
+
_DeviceTowerInfo["default"].validateJSON(data['tower_info']);
|
|
240
241
|
}
|
|
241
242
|
// validate the optional field `tower_location`
|
|
242
|
-
if (data[
|
|
243
|
+
if (data['tower_location']) {
|
|
243
244
|
// data not null
|
|
244
|
-
_Location["default"].validateJSON(data[
|
|
245
|
+
_Location["default"].validateJSON(data['tower_location']);
|
|
245
246
|
}
|
|
246
247
|
// validate the optional field `triangulated_location`
|
|
247
|
-
if (data[
|
|
248
|
+
if (data['triangulated_location']) {
|
|
248
249
|
// data not null
|
|
249
|
-
_Location["default"].validateJSON(data[
|
|
250
|
+
_Location["default"].validateJSON(data['triangulated_location']);
|
|
250
251
|
}
|
|
251
252
|
// ensure the json data is a string
|
|
252
|
-
if (data[
|
|
253
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
253
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
254
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
254
255
|
}
|
|
255
256
|
return true;
|
|
256
257
|
}
|
|
@@ -261,100 +262,100 @@ Device.RequiredProperties = ["fleet_uids", "product_uid", "provisioned", "temper
|
|
|
261
262
|
/**
|
|
262
263
|
* @member {module:model/Location} best_location
|
|
263
264
|
*/
|
|
264
|
-
Device.prototype[
|
|
265
|
+
Device.prototype['best_location'] = undefined;
|
|
265
266
|
|
|
266
267
|
/**
|
|
267
268
|
* @member {Array.<module:model/SimUsage>} cellular_usage
|
|
268
269
|
*/
|
|
269
|
-
Device.prototype[
|
|
270
|
+
Device.prototype['cellular_usage'] = undefined;
|
|
270
271
|
|
|
271
272
|
/**
|
|
272
273
|
* @member {module:model/Contact} contact
|
|
273
274
|
*/
|
|
274
|
-
Device.prototype[
|
|
275
|
+
Device.prototype['contact'] = undefined;
|
|
275
276
|
|
|
276
277
|
/**
|
|
277
278
|
* @member {module:model/DFUEnv} dfu
|
|
278
279
|
*/
|
|
279
|
-
Device.prototype[
|
|
280
|
+
Device.prototype['dfu'] = undefined;
|
|
280
281
|
|
|
281
282
|
/**
|
|
282
283
|
* @member {Boolean} disabled
|
|
283
284
|
*/
|
|
284
|
-
Device.prototype[
|
|
285
|
+
Device.prototype['disabled'] = undefined;
|
|
285
286
|
|
|
286
287
|
/**
|
|
287
288
|
* @member {String} firmware_host
|
|
288
289
|
*/
|
|
289
|
-
Device.prototype[
|
|
290
|
+
Device.prototype['firmware_host'] = undefined;
|
|
290
291
|
|
|
291
292
|
/**
|
|
292
293
|
* @member {String} firmware_notecard
|
|
293
294
|
*/
|
|
294
|
-
Device.prototype[
|
|
295
|
+
Device.prototype['firmware_notecard'] = undefined;
|
|
295
296
|
|
|
296
297
|
/**
|
|
297
298
|
* @member {Array.<String>} fleet_uids
|
|
298
299
|
*/
|
|
299
|
-
Device.prototype[
|
|
300
|
+
Device.prototype['fleet_uids'] = undefined;
|
|
300
301
|
|
|
301
302
|
/**
|
|
302
303
|
* @member {module:model/Location} gps_location
|
|
303
304
|
*/
|
|
304
|
-
Device.prototype[
|
|
305
|
+
Device.prototype['gps_location'] = undefined;
|
|
305
306
|
|
|
306
307
|
/**
|
|
307
308
|
* @member {Date} last_activity
|
|
308
309
|
*/
|
|
309
|
-
Device.prototype[
|
|
310
|
+
Device.prototype['last_activity'] = undefined;
|
|
310
311
|
|
|
311
312
|
/**
|
|
312
313
|
* @member {String} product_uid
|
|
313
314
|
*/
|
|
314
|
-
Device.prototype[
|
|
315
|
+
Device.prototype['product_uid'] = undefined;
|
|
315
316
|
|
|
316
317
|
/**
|
|
317
318
|
* @member {Date} provisioned
|
|
318
319
|
*/
|
|
319
|
-
Device.prototype[
|
|
320
|
+
Device.prototype['provisioned'] = undefined;
|
|
320
321
|
|
|
321
322
|
/**
|
|
322
323
|
* @member {String} serial_number
|
|
323
324
|
*/
|
|
324
|
-
Device.prototype[
|
|
325
|
+
Device.prototype['serial_number'] = undefined;
|
|
325
326
|
|
|
326
327
|
/**
|
|
327
328
|
* @member {String} sku
|
|
328
329
|
*/
|
|
329
|
-
Device.prototype[
|
|
330
|
+
Device.prototype['sku'] = undefined;
|
|
330
331
|
|
|
331
332
|
/**
|
|
332
333
|
* @member {Number} temperature
|
|
333
334
|
*/
|
|
334
|
-
Device.prototype[
|
|
335
|
+
Device.prototype['temperature'] = undefined;
|
|
335
336
|
|
|
336
337
|
/**
|
|
337
338
|
* @member {module:model/DeviceTowerInfo} tower_info
|
|
338
339
|
*/
|
|
339
|
-
Device.prototype[
|
|
340
|
+
Device.prototype['tower_info'] = undefined;
|
|
340
341
|
|
|
341
342
|
/**
|
|
342
343
|
* @member {module:model/Location} tower_location
|
|
343
344
|
*/
|
|
344
|
-
Device.prototype[
|
|
345
|
+
Device.prototype['tower_location'] = undefined;
|
|
345
346
|
|
|
346
347
|
/**
|
|
347
348
|
* @member {module:model/Location} triangulated_location
|
|
348
349
|
*/
|
|
349
|
-
Device.prototype[
|
|
350
|
+
Device.prototype['triangulated_location'] = undefined;
|
|
350
351
|
|
|
351
352
|
/**
|
|
352
353
|
* @member {String} uid
|
|
353
354
|
*/
|
|
354
|
-
Device.prototype[
|
|
355
|
+
Device.prototype['uid'] = undefined;
|
|
355
356
|
|
|
356
357
|
/**
|
|
357
358
|
* @member {Number} voltage
|
|
358
359
|
*/
|
|
359
|
-
Device.prototype[
|
|
360
|
+
Device.prototype['voltage'] = undefined;
|
|
360
361
|
var _default = exports["default"] = Device;
|
|
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
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
20
|
* Notehub API
|
|
21
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
22
22
|
*
|
|
23
23
|
* The version of the OpenAPI document: 1.2.0
|
|
24
24
|
* Contact: engineering@blues.io
|
|
@@ -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 5.0.0-beta.2
|
|
35
35
|
*/
|
|
36
36
|
var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -64,14 +64,14 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
64
64
|
value: function constructFromObject(data, obj) {
|
|
65
65
|
if (data) {
|
|
66
66
|
obj = obj || new DeviceDfuHistory();
|
|
67
|
-
if (data.hasOwnProperty(
|
|
68
|
-
obj[
|
|
67
|
+
if (data.hasOwnProperty('current')) {
|
|
68
|
+
obj['current'] = _DeviceDfuHistoryCurrent["default"].constructFromObject(data['current']);
|
|
69
69
|
}
|
|
70
|
-
if (data.hasOwnProperty(
|
|
71
|
-
obj[
|
|
70
|
+
if (data.hasOwnProperty('device_uid')) {
|
|
71
|
+
obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
|
|
72
72
|
}
|
|
73
|
-
if (data.hasOwnProperty(
|
|
74
|
-
obj[
|
|
73
|
+
if (data.hasOwnProperty('history')) {
|
|
74
|
+
obj['history'] = _ApiClient["default"].convertToType(data['history'], [_DeviceDfuStateMachine["default"]]);
|
|
75
75
|
}
|
|
76
76
|
} else if (data === null) {
|
|
77
77
|
return null;
|
|
@@ -88,22 +88,22 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
88
88
|
key: "validateJSON",
|
|
89
89
|
value: function validateJSON(data) {
|
|
90
90
|
// validate the optional field `current`
|
|
91
|
-
if (data[
|
|
91
|
+
if (data['current']) {
|
|
92
92
|
// data not null
|
|
93
|
-
_DeviceDfuHistoryCurrent["default"].validateJSON(data[
|
|
93
|
+
_DeviceDfuHistoryCurrent["default"].validateJSON(data['current']);
|
|
94
94
|
}
|
|
95
95
|
// ensure the json data is a string
|
|
96
|
-
if (data[
|
|
97
|
-
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data[
|
|
96
|
+
if (data['device_uid'] && !(typeof data['device_uid'] === 'string' || data['device_uid'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data['device_uid']);
|
|
98
98
|
}
|
|
99
|
-
if (data[
|
|
99
|
+
if (data['history']) {
|
|
100
100
|
// data not null
|
|
101
101
|
// ensure the json data is an array
|
|
102
|
-
if (!Array.isArray(data[
|
|
103
|
-
throw new Error("Expected the field `history` to be an array in the JSON data but got " + data[
|
|
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
104
|
}
|
|
105
105
|
// validate the optional field `history` (array)
|
|
106
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
106
|
+
var _iterator = _createForOfIteratorHelper(data['history']),
|
|
107
107
|
_step;
|
|
108
108
|
try {
|
|
109
109
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -115,6 +115,7 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
115
115
|
} finally {
|
|
116
116
|
_iterator.f();
|
|
117
117
|
}
|
|
118
|
+
;
|
|
118
119
|
}
|
|
119
120
|
return true;
|
|
120
121
|
}
|
|
@@ -123,16 +124,16 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
123
124
|
/**
|
|
124
125
|
* @member {module:model/DeviceDfuHistoryCurrent} current
|
|
125
126
|
*/
|
|
126
|
-
DeviceDfuHistory.prototype[
|
|
127
|
+
DeviceDfuHistory.prototype['current'] = undefined;
|
|
127
128
|
|
|
128
129
|
/**
|
|
129
130
|
* Device UID
|
|
130
131
|
* @member {String} device_uid
|
|
131
132
|
*/
|
|
132
|
-
DeviceDfuHistory.prototype[
|
|
133
|
+
DeviceDfuHistory.prototype['device_uid'] = undefined;
|
|
133
134
|
|
|
134
135
|
/**
|
|
135
136
|
* @member {Array.<module:model/DeviceDfuStateMachine>} history
|
|
136
137
|
*/
|
|
137
|
-
DeviceDfuHistory.prototype[
|
|
138
|
+
DeviceDfuHistory.prototype['history'] = undefined;
|
|
138
139
|
var _default = exports["default"] = DeviceDfuHistory;
|