@blues-inc/notehub-js 1.0.37-beta.16 → 1.0.37-beta.18
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 +20 -19
- package/dist/ApiClient.js +2 -2
- package/dist/api/AlertApi.js +1 -1
- package/dist/api/AuthorizationApi.js +1 -64
- 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 +127 -99
- package/dist/model/Alert.js +91 -91
- package/dist/model/AlertDataInner.js +10 -10
- package/dist/model/AlertNotificationsInner.js +10 -10
- package/dist/model/{UsageEventsData.js → AnalyticsEventsData.js} +30 -44
- package/dist/model/{UsageSessionsResponse.js → AnalyticsEventsResponse.js} +25 -25
- package/dist/model/{UsageRouteLogsData.js → AnalyticsRouteLogsData.js} +32 -46
- package/dist/model/{UsageRouteLogsResponse.js → AnalyticsRouteLogsResponse.js} +25 -25
- package/dist/model/{UsageSessionsData.js → AnalyticsSessionsData.js} +32 -36
- package/dist/model/{UsageEventsResponse.js → AnalyticsSessionsResponse.js} +25 -25
- package/dist/model/Aws.js +86 -86
- package/dist/model/Azure.js +51 -51
- package/dist/model/BillingAccount.js +19 -19
- package/dist/model/Body.js +1 -1
- package/dist/model/CellularPlan.js +168 -0
- 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/CumulativeDataUsage.js +133 -0
- 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/DataSet.js +164 -0
- package/dist/model/DataSetField.js +14 -14
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +173 -129
- package/dist/model/DeviceDfuHistory.js +15 -15
- 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/{DeviceDfuHistoryCurrent.js → DeviceDfuStatusCurrent.js} +52 -52
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSatellitePlan.js +196 -0
- 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/{GetDeviceEnvironmentVariablesByPin200Response.js → GetDeviceEnvironmentVariables200Response.js} +30 -30
- 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/{GetDeviceFleets200Response.js → GetProjectFleets200Response.js} +20 -20
- 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/{AwsFilter.js → HttpFilter.js} +32 -32
- package/dist/model/{AwsTransform.js → HttpTransform.js} +21 -21
- 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/QuestionDataResponseLineChart.js +204 -0
- package/dist/model/{OAuth2Error.js → QuestionDataResponseMap.js} +42 -65
- package/dist/model/Radresponder.js +28 -28
- package/dist/model/Repository.js +22 -22
- package/dist/model/RouteLog.js +28 -28
- package/dist/model/{OAuth2TokenResponse.js → SatellitePlan.js} +65 -53
- package/dist/model/SchemaProperty.js +36 -34
- package/dist/model/SimUsage.js +20 -20
- package/dist/model/Slack.js +71 -71
- package/dist/model/SlackBearerNotification.js +14 -14
- package/dist/model/SlackWebHookNotification.js +14 -14
- package/dist/model/Snowflake.js +57 -57
- package/dist/model/{SlackTransform.js → SnowflakeTransform.js} +19 -19
- 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/api/UsageApi.js +0 -225
package/dist/model/Device.js
CHANGED
|
@@ -5,8 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CellularPlan = _interopRequireDefault(require("./CellularPlan"));
|
|
8
9
|
var _Contact = _interopRequireDefault(require("./Contact"));
|
|
9
10
|
var _DFUEnv = _interopRequireDefault(require("./DFUEnv"));
|
|
11
|
+
var _DeviceSatellitePlan = _interopRequireDefault(require("./DeviceSatellitePlan"));
|
|
10
12
|
var _DeviceTowerInfo = _interopRequireDefault(require("./DeviceTowerInfo"));
|
|
11
13
|
var _Location = _interopRequireDefault(require("./Location"));
|
|
12
14
|
var _SimUsage = _interopRequireDefault(require("./SimUsage"));
|
|
@@ -34,22 +36,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
34
36
|
/**
|
|
35
37
|
* The Device model module.
|
|
36
38
|
* @module model/Device
|
|
37
|
-
* @version 1.0.37-beta.
|
|
39
|
+
* @version 1.0.37-beta.18
|
|
38
40
|
*/
|
|
39
41
|
var Device = /*#__PURE__*/function () {
|
|
40
42
|
/**
|
|
41
43
|
* Constructs a new <code>Device</code>.
|
|
42
44
|
* @alias module:model/Device
|
|
43
|
-
* @param fleetUids {Array.<String>}
|
|
44
|
-
* @param productUid {String}
|
|
45
|
-
* @param provisioned {Date}
|
|
46
|
-
* @param temperature {Number}
|
|
47
45
|
* @param uid {String}
|
|
46
|
+
* @param provisioned {Date}
|
|
47
|
+
* @param productUid {String}
|
|
48
|
+
* @param fleetUids {Array.<String>}
|
|
48
49
|
* @param voltage {Number}
|
|
50
|
+
* @param temperature {Number}
|
|
49
51
|
*/
|
|
50
|
-
function Device(
|
|
52
|
+
function Device(uid, provisioned, productUid, fleetUids, voltage, temperature) {
|
|
51
53
|
_classCallCheck(this, Device);
|
|
52
|
-
Device.initialize(this,
|
|
54
|
+
Device.initialize(this, uid, provisioned, productUid, fleetUids, voltage, temperature);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
/**
|
|
@@ -59,13 +61,13 @@ var Device = /*#__PURE__*/function () {
|
|
|
59
61
|
*/
|
|
60
62
|
return _createClass(Device, null, [{
|
|
61
63
|
key: "initialize",
|
|
62
|
-
value: function initialize(obj,
|
|
63
|
-
obj['fleet_uids'] = fleetUids;
|
|
64
|
-
obj['product_uid'] = productUid;
|
|
65
|
-
obj['provisioned'] = provisioned;
|
|
66
|
-
obj['temperature'] = temperature;
|
|
64
|
+
value: function initialize(obj, uid, provisioned, productUid, fleetUids, voltage, temperature) {
|
|
67
65
|
obj['uid'] = uid;
|
|
66
|
+
obj['provisioned'] = provisioned;
|
|
67
|
+
obj['product_uid'] = productUid;
|
|
68
|
+
obj['fleet_uids'] = fleetUids;
|
|
68
69
|
obj['voltage'] = voltage;
|
|
70
|
+
obj['temperature'] = temperature;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
/**
|
|
@@ -80,62 +82,68 @@ var Device = /*#__PURE__*/function () {
|
|
|
80
82
|
value: function constructFromObject(data, obj) {
|
|
81
83
|
if (data) {
|
|
82
84
|
obj = obj || new Device();
|
|
83
|
-
if (data.hasOwnProperty('
|
|
84
|
-
obj['
|
|
85
|
+
if (data.hasOwnProperty('uid')) {
|
|
86
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
85
87
|
}
|
|
86
|
-
if (data.hasOwnProperty('
|
|
87
|
-
obj['
|
|
88
|
+
if (data.hasOwnProperty('serial_number')) {
|
|
89
|
+
obj['serial_number'] = _ApiClient["default"].convertToType(data['serial_number'], 'String');
|
|
88
90
|
}
|
|
89
|
-
if (data.hasOwnProperty('
|
|
90
|
-
obj['
|
|
91
|
+
if (data.hasOwnProperty('provisioned')) {
|
|
92
|
+
obj['provisioned'] = _ApiClient["default"].convertToType(data['provisioned'], 'Date');
|
|
91
93
|
}
|
|
92
|
-
if (data.hasOwnProperty('
|
|
93
|
-
obj['
|
|
94
|
+
if (data.hasOwnProperty('last_activity')) {
|
|
95
|
+
obj['last_activity'] = _ApiClient["default"].convertToType(data['last_activity'], 'Date');
|
|
94
96
|
}
|
|
95
|
-
if (data.hasOwnProperty('
|
|
96
|
-
obj['
|
|
97
|
+
if (data.hasOwnProperty('contact')) {
|
|
98
|
+
obj['contact'] = _Contact["default"].constructFromObject(data['contact']);
|
|
97
99
|
}
|
|
98
|
-
if (data.hasOwnProperty('
|
|
99
|
-
obj['
|
|
100
|
+
if (data.hasOwnProperty('product_uid')) {
|
|
101
|
+
obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
|
|
100
102
|
}
|
|
101
103
|
if (data.hasOwnProperty('fleet_uids')) {
|
|
102
104
|
obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
|
|
103
105
|
}
|
|
106
|
+
if (data.hasOwnProperty('tower_info')) {
|
|
107
|
+
obj['tower_info'] = _DeviceTowerInfo["default"].constructFromObject(data['tower_info']);
|
|
108
|
+
}
|
|
109
|
+
if (data.hasOwnProperty('tower_location')) {
|
|
110
|
+
obj['tower_location'] = _Location["default"].constructFromObject(data['tower_location']);
|
|
111
|
+
}
|
|
104
112
|
if (data.hasOwnProperty('gps_location')) {
|
|
105
113
|
obj['gps_location'] = _Location["default"].constructFromObject(data['gps_location']);
|
|
106
114
|
}
|
|
107
|
-
if (data.hasOwnProperty('
|
|
108
|
-
obj['
|
|
115
|
+
if (data.hasOwnProperty('triangulated_location')) {
|
|
116
|
+
obj['triangulated_location'] = _Location["default"].constructFromObject(data['triangulated_location']);
|
|
109
117
|
}
|
|
110
|
-
if (data.hasOwnProperty('
|
|
111
|
-
obj['
|
|
118
|
+
if (data.hasOwnProperty('voltage')) {
|
|
119
|
+
obj['voltage'] = _ApiClient["default"].convertToType(data['voltage'], 'Number');
|
|
112
120
|
}
|
|
113
|
-
if (data.hasOwnProperty('
|
|
114
|
-
obj['
|
|
121
|
+
if (data.hasOwnProperty('temperature')) {
|
|
122
|
+
obj['temperature'] = _ApiClient["default"].convertToType(data['temperature'], 'Number');
|
|
115
123
|
}
|
|
116
|
-
if (data.hasOwnProperty('
|
|
117
|
-
obj['
|
|
124
|
+
if (data.hasOwnProperty('dfu')) {
|
|
125
|
+
obj['dfu'] = _DFUEnv["default"].constructFromObject(data['dfu']);
|
|
118
126
|
}
|
|
119
|
-
if (data.hasOwnProperty('
|
|
120
|
-
obj['
|
|
127
|
+
if (data.hasOwnProperty('firmware_host')) {
|
|
128
|
+
obj['firmware_host'] = _ApiClient["default"].convertToType(data['firmware_host'], 'String');
|
|
121
129
|
}
|
|
122
|
-
if (data.hasOwnProperty('
|
|
123
|
-
obj['
|
|
130
|
+
if (data.hasOwnProperty('firmware_notecard')) {
|
|
131
|
+
obj['firmware_notecard'] = _ApiClient["default"].convertToType(data['firmware_notecard'], 'String');
|
|
124
132
|
}
|
|
125
|
-
if (data.hasOwnProperty('
|
|
126
|
-
obj['
|
|
133
|
+
if (data.hasOwnProperty('sku')) {
|
|
134
|
+
obj['sku'] = _ApiClient["default"].convertToType(data['sku'], 'String');
|
|
127
135
|
}
|
|
128
|
-
if (data.hasOwnProperty('
|
|
129
|
-
obj['
|
|
136
|
+
if (data.hasOwnProperty('disabled')) {
|
|
137
|
+
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
130
138
|
}
|
|
131
|
-
if (data.hasOwnProperty('
|
|
132
|
-
obj['
|
|
139
|
+
if (data.hasOwnProperty('cellular_usage')) {
|
|
140
|
+
obj['cellular_usage'] = _ApiClient["default"].convertToType(data['cellular_usage'], [_SimUsage["default"]]);
|
|
133
141
|
}
|
|
134
|
-
if (data.hasOwnProperty('
|
|
135
|
-
obj['
|
|
142
|
+
if (data.hasOwnProperty('cellular_plan')) {
|
|
143
|
+
obj['cellular_plan'] = _ApiClient["default"].convertToType(data['cellular_plan'], [_CellularPlan["default"]]);
|
|
136
144
|
}
|
|
137
|
-
if (data.hasOwnProperty('
|
|
138
|
-
obj['
|
|
145
|
+
if (data.hasOwnProperty('satellite_plan')) {
|
|
146
|
+
obj['satellite_plan'] = _DeviceSatellitePlan["default"].constructFromObject(data['satellite_plan']);
|
|
139
147
|
}
|
|
140
148
|
} else if (data === null) {
|
|
141
149
|
return null;
|
|
@@ -161,188 +169,224 @@ var Device = /*#__PURE__*/function () {
|
|
|
161
169
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
162
170
|
}
|
|
163
171
|
}
|
|
172
|
+
// ensure the json data is a string
|
|
164
173
|
} catch (err) {
|
|
165
174
|
_iterator.e(err);
|
|
166
175
|
} finally {
|
|
167
176
|
_iterator.f();
|
|
168
177
|
}
|
|
169
|
-
if (data['
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
;
|
|
178
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
179
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
180
|
+
}
|
|
181
|
+
// ensure the json data is a string
|
|
182
|
+
if (data['serial_number'] && !(typeof data['serial_number'] === 'string' || data['serial_number'] instanceof String)) {
|
|
183
|
+
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data['serial_number']);
|
|
189
184
|
}
|
|
190
185
|
// validate the optional field `contact`
|
|
191
186
|
if (data['contact']) {
|
|
192
187
|
// data not null
|
|
193
188
|
_Contact["default"].validateJSON(data['contact']);
|
|
194
189
|
}
|
|
195
|
-
// validate the optional field `dfu`
|
|
196
|
-
if (data['dfu']) {
|
|
197
|
-
// data not null
|
|
198
|
-
_DFUEnv["default"].validateJSON(data['dfu']);
|
|
199
|
-
}
|
|
200
190
|
// ensure the json data is a string
|
|
201
|
-
if (data['
|
|
202
|
-
throw new Error("Expected the field `
|
|
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']);
|
|
191
|
+
if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
|
|
192
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
|
|
207
193
|
}
|
|
208
194
|
// ensure the json data is an array
|
|
209
195
|
if (!Array.isArray(data['fleet_uids'])) {
|
|
210
196
|
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
|
|
211
197
|
}
|
|
198
|
+
// validate the optional field `tower_info`
|
|
199
|
+
if (data['tower_info']) {
|
|
200
|
+
// data not null
|
|
201
|
+
_DeviceTowerInfo["default"].validateJSON(data['tower_info']);
|
|
202
|
+
}
|
|
203
|
+
// validate the optional field `tower_location`
|
|
204
|
+
if (data['tower_location']) {
|
|
205
|
+
// data not null
|
|
206
|
+
_Location["default"].validateJSON(data['tower_location']);
|
|
207
|
+
}
|
|
212
208
|
// validate the optional field `gps_location`
|
|
213
209
|
if (data['gps_location']) {
|
|
214
210
|
// data not null
|
|
215
211
|
_Location["default"].validateJSON(data['gps_location']);
|
|
216
212
|
}
|
|
213
|
+
// validate the optional field `triangulated_location`
|
|
214
|
+
if (data['triangulated_location']) {
|
|
215
|
+
// data not null
|
|
216
|
+
_Location["default"].validateJSON(data['triangulated_location']);
|
|
217
|
+
}
|
|
218
|
+
// validate the optional field `dfu`
|
|
219
|
+
if (data['dfu']) {
|
|
220
|
+
// data not null
|
|
221
|
+
_DFUEnv["default"].validateJSON(data['dfu']);
|
|
222
|
+
}
|
|
217
223
|
// ensure the json data is a string
|
|
218
|
-
if (data['
|
|
219
|
-
throw new Error("Expected the field `
|
|
224
|
+
if (data['firmware_host'] && !(typeof data['firmware_host'] === 'string' || data['firmware_host'] instanceof String)) {
|
|
225
|
+
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data['firmware_host']);
|
|
220
226
|
}
|
|
221
227
|
// ensure the json data is a string
|
|
222
|
-
if (data['
|
|
223
|
-
throw new Error("Expected the field `
|
|
228
|
+
if (data['firmware_notecard'] && !(typeof data['firmware_notecard'] === 'string' || data['firmware_notecard'] instanceof String)) {
|
|
229
|
+
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data['firmware_notecard']);
|
|
224
230
|
}
|
|
225
231
|
// ensure the json data is a string
|
|
226
232
|
if (data['sku'] && !(typeof data['sku'] === 'string' || data['sku'] instanceof String)) {
|
|
227
233
|
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data['sku']);
|
|
228
234
|
}
|
|
229
|
-
|
|
230
|
-
if (data['tower_info']) {
|
|
235
|
+
if (data['cellular_usage']) {
|
|
231
236
|
// data not null
|
|
232
|
-
|
|
237
|
+
// ensure the json data is an array
|
|
238
|
+
if (!Array.isArray(data['cellular_usage'])) {
|
|
239
|
+
throw new Error("Expected the field `cellular_usage` to be an array in the JSON data but got " + data['cellular_usage']);
|
|
240
|
+
}
|
|
241
|
+
// validate the optional field `cellular_usage` (array)
|
|
242
|
+
var _iterator2 = _createForOfIteratorHelper(data['cellular_usage']),
|
|
243
|
+
_step2;
|
|
244
|
+
try {
|
|
245
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
246
|
+
var item = _step2.value;
|
|
247
|
+
_SimUsage["default"].validateJsonObject(item);
|
|
248
|
+
}
|
|
249
|
+
} catch (err) {
|
|
250
|
+
_iterator2.e(err);
|
|
251
|
+
} finally {
|
|
252
|
+
_iterator2.f();
|
|
253
|
+
}
|
|
254
|
+
;
|
|
233
255
|
}
|
|
234
|
-
|
|
235
|
-
if (data['tower_location']) {
|
|
256
|
+
if (data['cellular_plan']) {
|
|
236
257
|
// data not null
|
|
237
|
-
|
|
258
|
+
// ensure the json data is an array
|
|
259
|
+
if (!Array.isArray(data['cellular_plan'])) {
|
|
260
|
+
throw new Error("Expected the field `cellular_plan` to be an array in the JSON data but got " + data['cellular_plan']);
|
|
261
|
+
}
|
|
262
|
+
// validate the optional field `cellular_plan` (array)
|
|
263
|
+
var _iterator3 = _createForOfIteratorHelper(data['cellular_plan']),
|
|
264
|
+
_step3;
|
|
265
|
+
try {
|
|
266
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
267
|
+
var _item = _step3.value;
|
|
268
|
+
_CellularPlan["default"].validateJsonObject(_item);
|
|
269
|
+
}
|
|
270
|
+
} catch (err) {
|
|
271
|
+
_iterator3.e(err);
|
|
272
|
+
} finally {
|
|
273
|
+
_iterator3.f();
|
|
274
|
+
}
|
|
275
|
+
;
|
|
238
276
|
}
|
|
239
|
-
// validate the optional field `
|
|
240
|
-
if (data['
|
|
277
|
+
// validate the optional field `satellite_plan`
|
|
278
|
+
if (data['satellite_plan']) {
|
|
241
279
|
// data not null
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
// ensure the json data is a string
|
|
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']);
|
|
280
|
+
_DeviceSatellitePlan["default"].validateJSON(data['satellite_plan']);
|
|
247
281
|
}
|
|
248
282
|
return true;
|
|
249
283
|
}
|
|
250
284
|
}]);
|
|
251
285
|
}();
|
|
252
|
-
Device.RequiredProperties = ["
|
|
286
|
+
Device.RequiredProperties = ["uid", "provisioned", "product_uid", "fleet_uids", "voltage", "temperature"];
|
|
253
287
|
|
|
254
288
|
/**
|
|
255
|
-
* @member {
|
|
289
|
+
* @member {String} uid
|
|
256
290
|
*/
|
|
257
|
-
Device.prototype['
|
|
291
|
+
Device.prototype['uid'] = undefined;
|
|
258
292
|
|
|
259
293
|
/**
|
|
260
|
-
* @member {
|
|
294
|
+
* @member {String} serial_number
|
|
261
295
|
*/
|
|
262
|
-
Device.prototype['
|
|
296
|
+
Device.prototype['serial_number'] = undefined;
|
|
263
297
|
|
|
264
298
|
/**
|
|
265
|
-
* @member {
|
|
299
|
+
* @member {Date} provisioned
|
|
266
300
|
*/
|
|
267
|
-
Device.prototype['
|
|
301
|
+
Device.prototype['provisioned'] = undefined;
|
|
268
302
|
|
|
269
303
|
/**
|
|
270
|
-
* @member {
|
|
304
|
+
* @member {Date} last_activity
|
|
271
305
|
*/
|
|
272
|
-
Device.prototype['
|
|
306
|
+
Device.prototype['last_activity'] = undefined;
|
|
273
307
|
|
|
274
308
|
/**
|
|
275
|
-
* @member {
|
|
309
|
+
* @member {module:model/Contact} contact
|
|
276
310
|
*/
|
|
277
|
-
Device.prototype['
|
|
311
|
+
Device.prototype['contact'] = undefined;
|
|
278
312
|
|
|
279
313
|
/**
|
|
280
|
-
* @member {String}
|
|
314
|
+
* @member {String} product_uid
|
|
281
315
|
*/
|
|
282
|
-
Device.prototype['
|
|
316
|
+
Device.prototype['product_uid'] = undefined;
|
|
283
317
|
|
|
284
318
|
/**
|
|
285
319
|
* @member {Array.<String>} fleet_uids
|
|
286
320
|
*/
|
|
287
321
|
Device.prototype['fleet_uids'] = undefined;
|
|
288
322
|
|
|
323
|
+
/**
|
|
324
|
+
* @member {module:model/DeviceTowerInfo} tower_info
|
|
325
|
+
*/
|
|
326
|
+
Device.prototype['tower_info'] = undefined;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @member {module:model/Location} tower_location
|
|
330
|
+
*/
|
|
331
|
+
Device.prototype['tower_location'] = undefined;
|
|
332
|
+
|
|
289
333
|
/**
|
|
290
334
|
* @member {module:model/Location} gps_location
|
|
291
335
|
*/
|
|
292
336
|
Device.prototype['gps_location'] = undefined;
|
|
293
337
|
|
|
294
338
|
/**
|
|
295
|
-
* @member {
|
|
339
|
+
* @member {module:model/Location} triangulated_location
|
|
296
340
|
*/
|
|
297
|
-
Device.prototype['
|
|
341
|
+
Device.prototype['triangulated_location'] = undefined;
|
|
298
342
|
|
|
299
343
|
/**
|
|
300
|
-
* @member {
|
|
344
|
+
* @member {Number} voltage
|
|
301
345
|
*/
|
|
302
|
-
Device.prototype['
|
|
346
|
+
Device.prototype['voltage'] = undefined;
|
|
303
347
|
|
|
304
348
|
/**
|
|
305
|
-
* @member {
|
|
349
|
+
* @member {Number} temperature
|
|
306
350
|
*/
|
|
307
|
-
Device.prototype['
|
|
351
|
+
Device.prototype['temperature'] = undefined;
|
|
308
352
|
|
|
309
353
|
/**
|
|
310
|
-
* @member {
|
|
354
|
+
* @member {module:model/DFUEnv} dfu
|
|
311
355
|
*/
|
|
312
|
-
Device.prototype['
|
|
356
|
+
Device.prototype['dfu'] = undefined;
|
|
313
357
|
|
|
314
358
|
/**
|
|
315
|
-
* @member {String}
|
|
359
|
+
* @member {String} firmware_host
|
|
316
360
|
*/
|
|
317
|
-
Device.prototype['
|
|
361
|
+
Device.prototype['firmware_host'] = undefined;
|
|
318
362
|
|
|
319
363
|
/**
|
|
320
|
-
* @member {
|
|
364
|
+
* @member {String} firmware_notecard
|
|
321
365
|
*/
|
|
322
|
-
Device.prototype['
|
|
366
|
+
Device.prototype['firmware_notecard'] = undefined;
|
|
323
367
|
|
|
324
368
|
/**
|
|
325
|
-
* @member {
|
|
369
|
+
* @member {String} sku
|
|
326
370
|
*/
|
|
327
|
-
Device.prototype['
|
|
371
|
+
Device.prototype['sku'] = undefined;
|
|
328
372
|
|
|
329
373
|
/**
|
|
330
|
-
* @member {
|
|
374
|
+
* @member {Boolean} disabled
|
|
331
375
|
*/
|
|
332
|
-
Device.prototype['
|
|
376
|
+
Device.prototype['disabled'] = undefined;
|
|
333
377
|
|
|
334
378
|
/**
|
|
335
|
-
* @member {module:model/
|
|
379
|
+
* @member {Array.<module:model/SimUsage>} cellular_usage
|
|
336
380
|
*/
|
|
337
|
-
Device.prototype['
|
|
381
|
+
Device.prototype['cellular_usage'] = undefined;
|
|
338
382
|
|
|
339
383
|
/**
|
|
340
|
-
* @member {
|
|
384
|
+
* @member {Array.<module:model/CellularPlan>} cellular_plan
|
|
341
385
|
*/
|
|
342
|
-
Device.prototype['
|
|
386
|
+
Device.prototype['cellular_plan'] = undefined;
|
|
343
387
|
|
|
344
388
|
/**
|
|
345
|
-
* @member {
|
|
389
|
+
* @member {module:model/DeviceSatellitePlan} satellite_plan
|
|
346
390
|
*/
|
|
347
|
-
Device.prototype['
|
|
391
|
+
Device.prototype['satellite_plan'] = undefined;
|
|
348
392
|
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"));
|
|
9
8
|
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.18
|
|
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
|
-
}
|
|
70
67
|
if (data.hasOwnProperty('device_uid')) {
|
|
71
68
|
obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
|
|
72
69
|
}
|
|
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,15 +87,15 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
87
87
|
}, {
|
|
88
88
|
key: "validateJSON",
|
|
89
89
|
value: function validateJSON(data) {
|
|
90
|
-
// validate the optional field `current`
|
|
91
|
-
if (data['current']) {
|
|
92
|
-
// data not null
|
|
93
|
-
_DeviceDfuHistoryCurrent["default"].validateJSON(data['current']);
|
|
94
|
-
}
|
|
95
90
|
// ensure the json data is a string
|
|
96
91
|
if (data['device_uid'] && !(typeof data['device_uid'] === 'string' || data['device_uid'] instanceof String)) {
|
|
97
92
|
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data['device_uid']);
|
|
98
93
|
}
|
|
94
|
+
// validate the optional field `current`
|
|
95
|
+
if (data['current']) {
|
|
96
|
+
// data not null
|
|
97
|
+
_DeviceDfuStatusCurrent["default"].validateJSON(data['current']);
|
|
98
|
+
}
|
|
99
99
|
if (data['history']) {
|
|
100
100
|
// data not null
|
|
101
101
|
// ensure the json data is an array
|
|
@@ -121,17 +121,17 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
|
|
|
121
121
|
}
|
|
122
122
|
}]);
|
|
123
123
|
}();
|
|
124
|
-
/**
|
|
125
|
-
* @member {module:model/DeviceDfuHistoryCurrent} current
|
|
126
|
-
*/
|
|
127
|
-
DeviceDfuHistory.prototype['current'] = undefined;
|
|
128
|
-
|
|
129
124
|
/**
|
|
130
125
|
* Device UID
|
|
131
126
|
* @member {String} device_uid
|
|
132
127
|
*/
|
|
133
128
|
DeviceDfuHistory.prototype['device_uid'] = undefined;
|
|
134
129
|
|
|
130
|
+
/**
|
|
131
|
+
* @member {module:model/DeviceDfuStatusCurrent} current
|
|
132
|
+
*/
|
|
133
|
+
DeviceDfuHistory.prototype['current'] = undefined;
|
|
134
|
+
|
|
135
135
|
/**
|
|
136
136
|
* @member {Array.<module:model/DeviceDfuStateMachine>} history
|
|
137
137
|
*/
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The DeviceDfuHistoryPage model module.
|
|
32
32
|
* @module model/DeviceDfuHistoryPage
|
|
33
|
-
* @version 1.0.37-beta.
|
|
33
|
+
* @version 1.0.37-beta.18
|
|
34
34
|
*/
|
|
35
35
|
var DeviceDfuHistoryPage = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The DeviceDfuStateMachine model module.
|
|
32
32
|
* @module model/DeviceDfuStateMachine
|
|
33
|
-
* @version 1.0.37-beta.
|
|
33
|
+
* @version 1.0.37-beta.18
|
|
34
34
|
*/
|
|
35
35
|
var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -64,15 +64,15 @@ var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
|
64
64
|
value: function constructFromObject(data, obj) {
|
|
65
65
|
if (data) {
|
|
66
66
|
obj = obj || new DeviceDfuStateMachine();
|
|
67
|
+
if (data.hasOwnProperty('requested_version')) {
|
|
68
|
+
obj['requested_version'] = _ApiClient["default"].convertToType(data['requested_version'], 'String');
|
|
69
|
+
}
|
|
67
70
|
if (data.hasOwnProperty('current_version')) {
|
|
68
71
|
obj['current_version'] = _ApiClient["default"].convertToType(data['current_version'], 'String');
|
|
69
72
|
}
|
|
70
73
|
if (data.hasOwnProperty('initiated')) {
|
|
71
74
|
obj['initiated'] = _ApiClient["default"].convertToType(data['initiated'], 'String');
|
|
72
75
|
}
|
|
73
|
-
if (data.hasOwnProperty('requested_version')) {
|
|
74
|
-
obj['requested_version'] = _ApiClient["default"].convertToType(data['requested_version'], 'String');
|
|
75
|
-
}
|
|
76
76
|
if (data.hasOwnProperty('updates')) {
|
|
77
77
|
obj['updates'] = _ApiClient["default"].convertToType(data['updates'], [_DeviceDfuStateMachineNode["default"]]);
|
|
78
78
|
}
|
|
@@ -90,6 +90,10 @@ var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
|
90
90
|
}, {
|
|
91
91
|
key: "validateJSON",
|
|
92
92
|
value: function validateJSON(data) {
|
|
93
|
+
// ensure the json data is a string
|
|
94
|
+
if (data['requested_version'] && !(typeof data['requested_version'] === 'string' || data['requested_version'] instanceof String)) {
|
|
95
|
+
throw new Error("Expected the field `requested_version` to be a primitive type in the JSON string but got " + data['requested_version']);
|
|
96
|
+
}
|
|
93
97
|
// ensure the json data is a string
|
|
94
98
|
if (data['current_version'] && !(typeof data['current_version'] === 'string' || data['current_version'] instanceof String)) {
|
|
95
99
|
throw new Error("Expected the field `current_version` to be a primitive type in the JSON string but got " + data['current_version']);
|
|
@@ -98,10 +102,6 @@ var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
|
98
102
|
if (data['initiated'] && !(typeof data['initiated'] === 'string' || data['initiated'] instanceof String)) {
|
|
99
103
|
throw new Error("Expected the field `initiated` to be a primitive type in the JSON string but got " + data['initiated']);
|
|
100
104
|
}
|
|
101
|
-
// ensure the json data is a string
|
|
102
|
-
if (data['requested_version'] && !(typeof data['requested_version'] === 'string' || data['requested_version'] instanceof String)) {
|
|
103
|
-
throw new Error("Expected the field `requested_version` to be a primitive type in the JSON string but got " + data['requested_version']);
|
|
104
|
-
}
|
|
105
105
|
if (data['updates']) {
|
|
106
106
|
// data not null
|
|
107
107
|
// ensure the json data is an array
|
|
@@ -127,6 +127,12 @@ var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
|
127
127
|
}
|
|
128
128
|
}]);
|
|
129
129
|
}();
|
|
130
|
+
/**
|
|
131
|
+
* Version of the firmware that was requested to be installed
|
|
132
|
+
* @member {String} requested_version
|
|
133
|
+
*/
|
|
134
|
+
DeviceDfuStateMachine.prototype['requested_version'] = undefined;
|
|
135
|
+
|
|
130
136
|
/**
|
|
131
137
|
* Version of the firmware that was installed prior to this request
|
|
132
138
|
* @member {String} current_version
|
|
@@ -139,12 +145,6 @@ DeviceDfuStateMachine.prototype['current_version'] = undefined;
|
|
|
139
145
|
*/
|
|
140
146
|
DeviceDfuStateMachine.prototype['initiated'] = undefined;
|
|
141
147
|
|
|
142
|
-
/**
|
|
143
|
-
* Version of the firmware that was requested to be installed
|
|
144
|
-
* @member {String} requested_version
|
|
145
|
-
*/
|
|
146
|
-
DeviceDfuStateMachine.prototype['requested_version'] = undefined;
|
|
147
|
-
|
|
148
148
|
/**
|
|
149
149
|
* @member {Array.<module:model/DeviceDfuStateMachineNode>} updates
|
|
150
150
|
*/
|