@blues-inc/notehub-js 1.0.37-beta.7 → 1.0.37-beta.8
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 +7 -10
- package/dist/ApiClient.js +2 -2
- package/dist/api/AlertApi.js +1 -1
- package/dist/api/AuthorizationApi.js +1 -1
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +8 -8
- package/dist/api/EventApi.js +1 -1
- package/dist/api/ExternalDevicesApi.js +1 -1
- package/dist/api/MonitorApi.js +10 -10
- package/dist/api/ProjectApi.js +14 -14
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/WebhookApi.js +1 -1
- package/dist/index.js +38 -59
- package/dist/model/Alert.js +91 -91
- package/dist/model/AlertDataInner.js +10 -10
- package/dist/model/AlertNotificationsInner.js +10 -10
- package/dist/model/AnalyticsEventsData.js +14 -14
- package/dist/model/AnalyticsEventsResponse.js +1 -1
- package/dist/model/AnalyticsRouteLogsData.js +15 -15
- package/dist/model/AnalyticsRouteLogsResponse.js +1 -1
- package/dist/model/AnalyticsSessionsData.js +14 -14
- package/dist/model/AnalyticsSessionsResponse.js +1 -1
- package/dist/model/Aws.js +86 -86
- package/dist/model/{HttpFilter.js → AwsFilter.js} +32 -32
- package/dist/model/{HttpTransform.js → AwsTransform.js} +21 -21
- package/dist/model/Azure.js +51 -51
- package/dist/model/BillingAccount.js +19 -19
- package/dist/model/Body.js +1 -1
- package/dist/model/CloneProjectRequest.js +25 -25
- package/dist/model/Contact.js +19 -19
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateMonitor.js +186 -186
- package/dist/model/CreateProductRequest.js +30 -30
- package/dist/model/CreateProjectRequest.js +20 -20
- package/dist/model/CreateUpdateRepository.js +18 -18
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +60 -60
- package/dist/model/DataField.js +1 -1
- package/dist/model/DataSetField.js +14 -14
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +134 -134
- package/dist/model/DeviceDfuHistory.js +15 -15
- package/dist/model/{DeviceDfuStatusCurrent.js → DeviceDfuHistoryCurrent.js} +52 -52
- package/dist/model/DeviceDfuHistoryPage.js +1 -1
- package/dist/model/DeviceDfuStateMachine.js +14 -14
- package/dist/model/DeviceDfuStateMachineNode.js +27 -27
- package/dist/model/DeviceDfuStatus.js +15 -15
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSession.js +278 -278
- package/dist/model/DeviceTowerInfo.js +15 -15
- package/dist/model/DeviceUsage.js +36 -36
- package/dist/model/DfuActionRequest.js +1 -1
- package/dist/model/EmailNotification.js +1 -1
- package/dist/model/EnvTreeJsonNode.js +76 -76
- package/dist/model/EnvVar.js +9 -9
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +38 -38
- package/dist/model/Event.js +340 -340
- package/dist/model/Firmware.js +45 -45
- package/dist/model/FirmwareInfo.js +71 -71
- package/dist/model/Fleet.js +31 -31
- package/dist/model/GetAlerts200Response.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/{GetDeviceEnvironmentVariables200Response.js → GetDeviceEnvironmentVariablesByPin200Response.js} +30 -30
- package/dist/model/{GetProjectFleets200Response.js → GetDeviceFleets200Response.js} +20 -20
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +15 -15
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +18 -18
- package/dist/model/GetDeviceSessions200Response.js +14 -14
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +16 -16
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetWebhooks200Response.js +1 -1
- package/dist/model/Google.js +35 -35
- package/dist/model/HandleNoteChanges200Response.js +10 -10
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +10 -10
- package/dist/model/HandleNotefileChangesPending200Response.js +15 -15
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +43 -43
- package/dist/model/Location.js +38 -38
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +135 -135
- package/dist/model/MonitorAlertRoutesInner.js +12 -12
- package/dist/model/Mqtt.js +91 -91
- package/dist/model/Note.js +1 -1
- package/dist/model/NotefileSchema.js +1 -1
- package/dist/model/NotehubRoute.js +30 -30
- package/dist/model/NotehubRouteSchema.js +80 -80
- package/dist/model/PersonalAccessToken.js +37 -37
- package/dist/model/PersonalAccessTokenCreatedBy.js +13 -13
- package/dist/model/PersonalAccessTokenInfo.js +13 -13
- package/dist/model/PersonalAccessTokenSecret.js +14 -14
- package/dist/model/PostProvisionProjectDeviceRequest.js +14 -14
- package/dist/model/Product.js +29 -29
- package/dist/model/Project.js +35 -35
- package/dist/model/ProjectMember.js +19 -19
- package/dist/model/Proxy.js +21 -21
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/Radresponder.js +28 -28
- package/dist/model/Repository.js +22 -22
- package/dist/model/RouteLog.js +28 -28
- package/dist/model/SchemaProperty.js +34 -36
- package/dist/model/SimUsage.js +16 -69
- package/dist/model/Slack.js +71 -71
- package/dist/model/SlackBearerNotification.js +14 -14
- package/dist/model/{SnowflakeTransform.js → SlackTransform.js} +19 -19
- package/dist/model/SlackWebHookNotification.js +14 -14
- package/dist/model/Snowflake.js +57 -57
- package/dist/model/Thingworx.js +36 -36
- package/dist/model/TowerLocation.js +58 -58
- package/dist/model/Twilio.js +46 -46
- package/dist/model/UpdateFleetRequest.js +14 -14
- package/dist/model/UploadMetadata.js +68 -68
- package/dist/model/UserDbRoute.js +26 -26
- package/dist/model/UserDfuStateMachine.js +14 -14
- package/dist/model/UserDfuStateMachineStatus.js +9 -9
- package/dist/model/UserFirmwareInfo.js +1 -1
- package/dist/model/WebhookSettings.js +1 -1
- package/package.json +1 -1
- package/dist/model/DataSet.js +0 -164
- package/dist/model/QuestionDataResponseLineChart.js +0 -204
- package/dist/model/QuestionDataResponseMap.js +0 -143
package/dist/model/Device.js
CHANGED
|
@@ -34,22 +34,22 @@ 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 1.0.37-beta.
|
|
37
|
+
* @version 1.0.37-beta.8
|
|
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 uid {String}
|
|
44
|
-
* @param provisioned {Date}
|
|
45
|
-
* @param productUid {String}
|
|
46
43
|
* @param fleetUids {Array.<String>}
|
|
47
|
-
* @param
|
|
44
|
+
* @param productUid {String}
|
|
45
|
+
* @param provisioned {Date}
|
|
48
46
|
* @param temperature {Number}
|
|
47
|
+
* @param uid {String}
|
|
48
|
+
* @param voltage {Number}
|
|
49
49
|
*/
|
|
50
|
-
function Device(
|
|
50
|
+
function Device(fleetUids, productUid, provisioned, temperature, uid, voltage) {
|
|
51
51
|
_classCallCheck(this, Device);
|
|
52
|
-
Device.initialize(this,
|
|
52
|
+
Device.initialize(this, fleetUids, productUid, provisioned, temperature, uid, voltage);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -59,13 +59,13 @@ var Device = /*#__PURE__*/function () {
|
|
|
59
59
|
*/
|
|
60
60
|
return _createClass(Device, null, [{
|
|
61
61
|
key: "initialize",
|
|
62
|
-
value: function initialize(obj,
|
|
63
|
-
obj['uid'] = uid;
|
|
64
|
-
obj['provisioned'] = provisioned;
|
|
65
|
-
obj['product_uid'] = productUid;
|
|
62
|
+
value: function initialize(obj, fleetUids, productUid, provisioned, temperature, uid, voltage) {
|
|
66
63
|
obj['fleet_uids'] = fleetUids;
|
|
67
|
-
obj['
|
|
64
|
+
obj['product_uid'] = productUid;
|
|
65
|
+
obj['provisioned'] = provisioned;
|
|
68
66
|
obj['temperature'] = temperature;
|
|
67
|
+
obj['uid'] = uid;
|
|
68
|
+
obj['voltage'] = voltage;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
@@ -80,62 +80,62 @@ 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('cellular_usage')) {
|
|
84
|
+
obj['cellular_usage'] = _ApiClient["default"].convertToType(data['cellular_usage'], [_SimUsage["default"]]);
|
|
85
85
|
}
|
|
86
|
-
if (data.hasOwnProperty('
|
|
87
|
-
obj['
|
|
86
|
+
if (data.hasOwnProperty('contact')) {
|
|
87
|
+
obj['contact'] = _Contact["default"].constructFromObject(data['contact']);
|
|
88
88
|
}
|
|
89
|
-
if (data.hasOwnProperty('
|
|
90
|
-
obj['
|
|
89
|
+
if (data.hasOwnProperty('dfu')) {
|
|
90
|
+
obj['dfu'] = _DFUEnv["default"].constructFromObject(data['dfu']);
|
|
91
91
|
}
|
|
92
|
-
if (data.hasOwnProperty('
|
|
93
|
-
obj['
|
|
92
|
+
if (data.hasOwnProperty('disabled')) {
|
|
93
|
+
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
94
94
|
}
|
|
95
|
-
if (data.hasOwnProperty('
|
|
96
|
-
obj['
|
|
95
|
+
if (data.hasOwnProperty('firmware_host')) {
|
|
96
|
+
obj['firmware_host'] = _ApiClient["default"].convertToType(data['firmware_host'], 'String');
|
|
97
97
|
}
|
|
98
|
-
if (data.hasOwnProperty('
|
|
99
|
-
obj['
|
|
98
|
+
if (data.hasOwnProperty('firmware_notecard')) {
|
|
99
|
+
obj['firmware_notecard'] = _ApiClient["default"].convertToType(data['firmware_notecard'], 'String');
|
|
100
100
|
}
|
|
101
101
|
if (data.hasOwnProperty('fleet_uids')) {
|
|
102
102
|
obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
|
|
103
103
|
}
|
|
104
|
-
if (data.hasOwnProperty('tower_info')) {
|
|
105
|
-
obj['tower_info'] = _DeviceTowerInfo["default"].constructFromObject(data['tower_info']);
|
|
106
|
-
}
|
|
107
|
-
if (data.hasOwnProperty('tower_location')) {
|
|
108
|
-
obj['tower_location'] = _Location["default"].constructFromObject(data['tower_location']);
|
|
109
|
-
}
|
|
110
104
|
if (data.hasOwnProperty('gps_location')) {
|
|
111
105
|
obj['gps_location'] = _Location["default"].constructFromObject(data['gps_location']);
|
|
112
106
|
}
|
|
113
|
-
if (data.hasOwnProperty('
|
|
114
|
-
obj['
|
|
107
|
+
if (data.hasOwnProperty('last_activity')) {
|
|
108
|
+
obj['last_activity'] = _ApiClient["default"].convertToType(data['last_activity'], 'Date');
|
|
115
109
|
}
|
|
116
|
-
if (data.hasOwnProperty('
|
|
117
|
-
obj['
|
|
110
|
+
if (data.hasOwnProperty('product_uid')) {
|
|
111
|
+
obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('provisioned')) {
|
|
114
|
+
obj['provisioned'] = _ApiClient["default"].convertToType(data['provisioned'], 'Date');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('serial_number')) {
|
|
117
|
+
obj['serial_number'] = _ApiClient["default"].convertToType(data['serial_number'], 'String');
|
|
118
|
+
}
|
|
119
|
+
if (data.hasOwnProperty('sku')) {
|
|
120
|
+
obj['sku'] = _ApiClient["default"].convertToType(data['sku'], 'String');
|
|
118
121
|
}
|
|
119
122
|
if (data.hasOwnProperty('temperature')) {
|
|
120
123
|
obj['temperature'] = _ApiClient["default"].convertToType(data['temperature'], 'Number');
|
|
121
124
|
}
|
|
122
|
-
if (data.hasOwnProperty('
|
|
123
|
-
obj['
|
|
124
|
-
}
|
|
125
|
-
if (data.hasOwnProperty('firmware_host')) {
|
|
126
|
-
obj['firmware_host'] = _ApiClient["default"].convertToType(data['firmware_host'], 'String');
|
|
125
|
+
if (data.hasOwnProperty('tower_info')) {
|
|
126
|
+
obj['tower_info'] = _DeviceTowerInfo["default"].constructFromObject(data['tower_info']);
|
|
127
127
|
}
|
|
128
|
-
if (data.hasOwnProperty('
|
|
129
|
-
obj['
|
|
128
|
+
if (data.hasOwnProperty('tower_location')) {
|
|
129
|
+
obj['tower_location'] = _Location["default"].constructFromObject(data['tower_location']);
|
|
130
130
|
}
|
|
131
|
-
if (data.hasOwnProperty('
|
|
132
|
-
obj['
|
|
131
|
+
if (data.hasOwnProperty('triangulated_location')) {
|
|
132
|
+
obj['triangulated_location'] = _Location["default"].constructFromObject(data['triangulated_location']);
|
|
133
133
|
}
|
|
134
|
-
if (data.hasOwnProperty('
|
|
135
|
-
obj['
|
|
134
|
+
if (data.hasOwnProperty('uid')) {
|
|
135
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
136
136
|
}
|
|
137
|
-
if (data.hasOwnProperty('
|
|
138
|
-
obj['
|
|
137
|
+
if (data.hasOwnProperty('voltage')) {
|
|
138
|
+
obj['voltage'] = _ApiClient["default"].convertToType(data['voltage'], 'Number');
|
|
139
139
|
}
|
|
140
140
|
} else if (data === null) {
|
|
141
141
|
return null;
|
|
@@ -161,32 +161,71 @@ var Device = /*#__PURE__*/function () {
|
|
|
161
161
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
// ensure the json data is a string
|
|
165
164
|
} catch (err) {
|
|
166
165
|
_iterator.e(err);
|
|
167
166
|
} finally {
|
|
168
167
|
_iterator.f();
|
|
169
168
|
}
|
|
170
|
-
if (data['
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
169
|
+
if (data['cellular_usage']) {
|
|
170
|
+
// data not null
|
|
171
|
+
// ensure the json data is an array
|
|
172
|
+
if (!Array.isArray(data['cellular_usage'])) {
|
|
173
|
+
throw new Error("Expected the field `cellular_usage` to be an array in the JSON data but got " + data['cellular_usage']);
|
|
174
|
+
}
|
|
175
|
+
// validate the optional field `cellular_usage` (array)
|
|
176
|
+
var _iterator2 = _createForOfIteratorHelper(data['cellular_usage']),
|
|
177
|
+
_step2;
|
|
178
|
+
try {
|
|
179
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
180
|
+
var item = _step2.value;
|
|
181
|
+
_SimUsage["default"].validateJsonObject(item);
|
|
182
|
+
}
|
|
183
|
+
} catch (err) {
|
|
184
|
+
_iterator2.e(err);
|
|
185
|
+
} finally {
|
|
186
|
+
_iterator2.f();
|
|
187
|
+
}
|
|
188
|
+
;
|
|
176
189
|
}
|
|
177
190
|
// validate the optional field `contact`
|
|
178
191
|
if (data['contact']) {
|
|
179
192
|
// data not null
|
|
180
193
|
_Contact["default"].validateJSON(data['contact']);
|
|
181
194
|
}
|
|
195
|
+
// validate the optional field `dfu`
|
|
196
|
+
if (data['dfu']) {
|
|
197
|
+
// data not null
|
|
198
|
+
_DFUEnv["default"].validateJSON(data['dfu']);
|
|
199
|
+
}
|
|
182
200
|
// ensure the json data is a string
|
|
183
|
-
if (data['
|
|
184
|
-
throw new Error("Expected the field `
|
|
201
|
+
if (data['firmware_host'] && !(typeof data['firmware_host'] === 'string' || data['firmware_host'] instanceof String)) {
|
|
202
|
+
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data['firmware_host']);
|
|
203
|
+
}
|
|
204
|
+
// ensure the json data is a string
|
|
205
|
+
if (data['firmware_notecard'] && !(typeof data['firmware_notecard'] === 'string' || data['firmware_notecard'] instanceof String)) {
|
|
206
|
+
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data['firmware_notecard']);
|
|
185
207
|
}
|
|
186
208
|
// ensure the json data is an array
|
|
187
209
|
if (!Array.isArray(data['fleet_uids'])) {
|
|
188
210
|
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
|
|
189
211
|
}
|
|
212
|
+
// validate the optional field `gps_location`
|
|
213
|
+
if (data['gps_location']) {
|
|
214
|
+
// data not null
|
|
215
|
+
_Location["default"].validateJSON(data['gps_location']);
|
|
216
|
+
}
|
|
217
|
+
// ensure the json data is a string
|
|
218
|
+
if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
|
|
219
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
|
|
220
|
+
}
|
|
221
|
+
// ensure the json data is a string
|
|
222
|
+
if (data['serial_number'] && !(typeof data['serial_number'] === 'string' || data['serial_number'] instanceof String)) {
|
|
223
|
+
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data['serial_number']);
|
|
224
|
+
}
|
|
225
|
+
// ensure the json data is a string
|
|
226
|
+
if (data['sku'] && !(typeof data['sku'] === 'string' || data['sku'] instanceof String)) {
|
|
227
|
+
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data['sku']);
|
|
228
|
+
}
|
|
190
229
|
// validate the optional field `tower_info`
|
|
191
230
|
if (data['tower_info']) {
|
|
192
231
|
// data not null
|
|
@@ -197,89 +236,50 @@ var Device = /*#__PURE__*/function () {
|
|
|
197
236
|
// data not null
|
|
198
237
|
_Location["default"].validateJSON(data['tower_location']);
|
|
199
238
|
}
|
|
200
|
-
// validate the optional field `gps_location`
|
|
201
|
-
if (data['gps_location']) {
|
|
202
|
-
// data not null
|
|
203
|
-
_Location["default"].validateJSON(data['gps_location']);
|
|
204
|
-
}
|
|
205
239
|
// validate the optional field `triangulated_location`
|
|
206
240
|
if (data['triangulated_location']) {
|
|
207
241
|
// data not null
|
|
208
242
|
_Location["default"].validateJSON(data['triangulated_location']);
|
|
209
243
|
}
|
|
210
|
-
// validate the optional field `dfu`
|
|
211
|
-
if (data['dfu']) {
|
|
212
|
-
// data not null
|
|
213
|
-
_DFUEnv["default"].validateJSON(data['dfu']);
|
|
214
|
-
}
|
|
215
|
-
// ensure the json data is a string
|
|
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']);
|
|
218
|
-
}
|
|
219
|
-
// ensure the json data is a string
|
|
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']);
|
|
222
|
-
}
|
|
223
244
|
// ensure the json data is a string
|
|
224
|
-
if (data['
|
|
225
|
-
throw new Error("Expected the field `
|
|
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
|
-
;
|
|
245
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
246
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
247
247
|
}
|
|
248
248
|
return true;
|
|
249
249
|
}
|
|
250
250
|
}]);
|
|
251
251
|
}();
|
|
252
|
-
Device.RequiredProperties = ["
|
|
252
|
+
Device.RequiredProperties = ["fleet_uids", "product_uid", "provisioned", "temperature", "uid", "voltage"];
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
|
-
* @member {
|
|
255
|
+
* @member {Array.<module:model/SimUsage>} cellular_usage
|
|
256
256
|
*/
|
|
257
|
-
Device.prototype['
|
|
257
|
+
Device.prototype['cellular_usage'] = undefined;
|
|
258
258
|
|
|
259
259
|
/**
|
|
260
|
-
* @member {
|
|
260
|
+
* @member {module:model/Contact} contact
|
|
261
261
|
*/
|
|
262
|
-
Device.prototype['
|
|
262
|
+
Device.prototype['contact'] = undefined;
|
|
263
263
|
|
|
264
264
|
/**
|
|
265
|
-
* @member {
|
|
265
|
+
* @member {module:model/DFUEnv} dfu
|
|
266
266
|
*/
|
|
267
|
-
Device.prototype['
|
|
267
|
+
Device.prototype['dfu'] = undefined;
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
|
-
* @member {
|
|
270
|
+
* @member {Boolean} disabled
|
|
271
271
|
*/
|
|
272
|
-
Device.prototype['
|
|
272
|
+
Device.prototype['disabled'] = undefined;
|
|
273
273
|
|
|
274
274
|
/**
|
|
275
|
-
* @member {
|
|
275
|
+
* @member {String} firmware_host
|
|
276
276
|
*/
|
|
277
|
-
Device.prototype['
|
|
277
|
+
Device.prototype['firmware_host'] = undefined;
|
|
278
278
|
|
|
279
279
|
/**
|
|
280
|
-
* @member {String}
|
|
280
|
+
* @member {String} firmware_notecard
|
|
281
281
|
*/
|
|
282
|
-
Device.prototype['
|
|
282
|
+
Device.prototype['firmware_notecard'] = undefined;
|
|
283
283
|
|
|
284
284
|
/**
|
|
285
285
|
* @member {Array.<String>} fleet_uids
|
|
@@ -287,62 +287,62 @@ Device.prototype['product_uid'] = undefined;
|
|
|
287
287
|
Device.prototype['fleet_uids'] = undefined;
|
|
288
288
|
|
|
289
289
|
/**
|
|
290
|
-
* @member {module:model/
|
|
290
|
+
* @member {module:model/Location} gps_location
|
|
291
291
|
*/
|
|
292
|
-
Device.prototype['
|
|
292
|
+
Device.prototype['gps_location'] = undefined;
|
|
293
293
|
|
|
294
294
|
/**
|
|
295
|
-
* @member {
|
|
295
|
+
* @member {Date} last_activity
|
|
296
296
|
*/
|
|
297
|
-
Device.prototype['
|
|
297
|
+
Device.prototype['last_activity'] = undefined;
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
|
-
* @member {
|
|
300
|
+
* @member {String} product_uid
|
|
301
301
|
*/
|
|
302
|
-
Device.prototype['
|
|
302
|
+
Device.prototype['product_uid'] = undefined;
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
|
-
* @member {
|
|
305
|
+
* @member {Date} provisioned
|
|
306
306
|
*/
|
|
307
|
-
Device.prototype['
|
|
307
|
+
Device.prototype['provisioned'] = undefined;
|
|
308
308
|
|
|
309
309
|
/**
|
|
310
|
-
* @member {
|
|
310
|
+
* @member {String} serial_number
|
|
311
311
|
*/
|
|
312
|
-
Device.prototype['
|
|
312
|
+
Device.prototype['serial_number'] = undefined;
|
|
313
313
|
|
|
314
314
|
/**
|
|
315
|
-
* @member {
|
|
315
|
+
* @member {String} sku
|
|
316
316
|
*/
|
|
317
|
-
Device.prototype['
|
|
317
|
+
Device.prototype['sku'] = undefined;
|
|
318
318
|
|
|
319
319
|
/**
|
|
320
|
-
* @member {
|
|
320
|
+
* @member {Number} temperature
|
|
321
321
|
*/
|
|
322
|
-
Device.prototype['
|
|
322
|
+
Device.prototype['temperature'] = undefined;
|
|
323
323
|
|
|
324
324
|
/**
|
|
325
|
-
* @member {
|
|
325
|
+
* @member {module:model/DeviceTowerInfo} tower_info
|
|
326
326
|
*/
|
|
327
|
-
Device.prototype['
|
|
327
|
+
Device.prototype['tower_info'] = undefined;
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
|
-
* @member {
|
|
330
|
+
* @member {module:model/Location} tower_location
|
|
331
331
|
*/
|
|
332
|
-
Device.prototype['
|
|
332
|
+
Device.prototype['tower_location'] = undefined;
|
|
333
333
|
|
|
334
334
|
/**
|
|
335
|
-
* @member {
|
|
335
|
+
* @member {module:model/Location} triangulated_location
|
|
336
336
|
*/
|
|
337
|
-
Device.prototype['
|
|
337
|
+
Device.prototype['triangulated_location'] = undefined;
|
|
338
338
|
|
|
339
339
|
/**
|
|
340
|
-
* @member {
|
|
340
|
+
* @member {String} uid
|
|
341
341
|
*/
|
|
342
|
-
Device.prototype['
|
|
342
|
+
Device.prototype['uid'] = undefined;
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
|
-
* @member {
|
|
345
|
+
* @member {Number} voltage
|
|
346
346
|
*/
|
|
347
|
-
Device.prototype['
|
|
347
|
+
Device.prototype['voltage'] = undefined;
|
|
348
348
|
var _default = exports["default"] = Device;
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _DeviceDfuHistoryCurrent = _interopRequireDefault(require("./DeviceDfuHistoryCurrent"));
|
|
8
9
|
var _DeviceDfuStateMachine = _interopRequireDefault(require("./DeviceDfuStateMachine"));
|
|
9
|
-
var _DeviceDfuStatusCurrent = _interopRequireDefault(require("./DeviceDfuStatusCurrent"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
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
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; } } }; }
|
|
@@ -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 1.0.37-beta.
|
|
34
|
+
* @version 1.0.37-beta.8
|
|
35
35
|
*/
|
|
36
36
|
var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -64,12 +64,12 @@ 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('current')) {
|
|
68
|
+
obj['current'] = _DeviceDfuHistoryCurrent["default"].constructFromObject(data['current']);
|
|
69
|
+
}
|
|
67
70
|
if (data.hasOwnProperty('device_uid')) {
|
|
68
71
|
obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
|
|
69
72
|
}
|
|
70
|
-
if (data.hasOwnProperty('current')) {
|
|
71
|
-
obj['current'] = _DeviceDfuStatusCurrent["default"].constructFromObject(data['current']);
|
|
72
|
-
}
|
|
73
73
|
if (data.hasOwnProperty('history')) {
|
|
74
74
|
obj['history'] = _ApiClient["default"].convertToType(data['history'], [_DeviceDfuStateMachine["default"]]);
|
|
75
75
|
}
|
|
@@ -87,14 +87,14 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
87
87
|
}, {
|
|
88
88
|
key: "validateJSON",
|
|
89
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
90
|
// validate the optional field `current`
|
|
95
91
|
if (data['current']) {
|
|
96
92
|
// data not null
|
|
97
|
-
|
|
93
|
+
_DeviceDfuHistoryCurrent["default"].validateJSON(data['current']);
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
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
99
|
if (data['history']) {
|
|
100
100
|
// data not null
|
|
@@ -122,15 +122,15 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
122
122
|
}]);
|
|
123
123
|
}();
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
126
|
-
* @member {String} device_uid
|
|
125
|
+
* @member {module:model/DeviceDfuHistoryCurrent} current
|
|
127
126
|
*/
|
|
128
|
-
DeviceDfuHistory.prototype['
|
|
127
|
+
DeviceDfuHistory.prototype['current'] = undefined;
|
|
129
128
|
|
|
130
129
|
/**
|
|
131
|
-
*
|
|
130
|
+
* Device UID
|
|
131
|
+
* @member {String} device_uid
|
|
132
132
|
*/
|
|
133
|
-
DeviceDfuHistory.prototype['
|
|
133
|
+
DeviceDfuHistory.prototype['device_uid'] = undefined;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* @member {Array.<module:model/DeviceDfuStateMachine>} history
|