@blues-inc/notehub-js 1.0.10 → 1.0.11
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 +181 -178
- package/dist/ApiClient.js +157 -154
- package/dist/api/AuthorizationApi.js +63 -18
- package/dist/api/BillingAccountApi.js +15 -15
- package/dist/api/DeviceApi.js +159 -159
- package/dist/api/DevicesApi.js +58 -58
- package/dist/api/EnvironmentVariablesApi.js +110 -110
- package/dist/api/EventApi.js +94 -94
- package/dist/api/FilesApi.js +42 -42
- package/dist/api/FleetApi.js +160 -160
- package/dist/api/NotesApi.js +105 -105
- package/dist/api/ProductApi.js +29 -29
- package/dist/api/ProjectApi.js +139 -139
- package/dist/api/RouteApi.js +51 -51
- package/dist/index.js +7 -0
- package/dist/model/Aws.js +64 -64
- package/dist/model/Azure.js +42 -42
- package/dist/model/BillingAccount.js +20 -20
- package/dist/model/Body.js +4 -4
- package/dist/model/Contact.js +21 -21
- package/dist/model/CreateFleetRequest.js +6 -6
- package/dist/model/CreateProductRequest.js +21 -21
- package/dist/model/CreateProjectRequest.js +13 -13
- package/dist/model/DFUEnv.js +11 -11
- package/dist/model/DFUState.js +64 -64
- package/dist/model/DeleteDeviceFleetsRequest.js +7 -7
- package/dist/model/Device.js +82 -82
- package/dist/model/DeviceSession.js +181 -181
- package/dist/model/DeviceTowerInfo.js +13 -13
- package/dist/model/DeviceUsage.js +31 -31
- package/dist/model/EnvironmentVariables.js +7 -7
- package/dist/model/Error.js +30 -30
- package/dist/model/Event.js +222 -222
- package/dist/model/Fleet.js +20 -20
- package/dist/model/GenerateAuthToken200Response.js +114 -0
- package/dist/model/GetBillingAccounts200Response.js +8 -9
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +11 -11
- package/dist/model/GetDeviceHealthLog200Response.js +10 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +18 -18
- package/dist/model/GetDeviceLatest200Response.js +8 -9
- package/dist/model/GetDevicePublicKey200Response.js +15 -15
- package/dist/model/GetDeviceSessions200Response.js +15 -16
- package/dist/model/GetProjectDevicePublicKeys200Response.js +15 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +11 -11
- package/dist/model/GetProjectDevices200Response.js +15 -16
- package/dist/model/GetProjectEvents200Response.js +20 -21
- package/dist/model/GetProjectEventsByCursor200Response.js +22 -23
- package/dist/model/GetProjectFleets200Response.js +10 -11
- package/dist/model/GetProjectMembers200Response.js +10 -11
- package/dist/model/GetProjectProducts200Response.js +8 -9
- package/dist/model/GetProjects200Response.js +8 -9
- package/dist/model/Google.js +27 -27
- package/dist/model/HandleNoteChanges200Response.js +10 -10
- package/dist/model/HandleNoteGet200Response.js +12 -12
- package/dist/model/HandleNoteSignal200Response.js +4 -4
- package/dist/model/HandleNotefileChanges200Response.js +10 -10
- package/dist/model/HandleNotefileChangesPending200Response.js +13 -13
- package/dist/model/HandleNotefileDeleteRequest.js +6 -6
- package/dist/model/Http.js +34 -34
- package/dist/model/HttpFilter.js +18 -18
- package/dist/model/HttpTransform.js +19 -19
- package/dist/model/Location.js +39 -39
- package/dist/model/Login200Response.js +6 -6
- package/dist/model/LoginRequest.js +11 -11
- package/dist/model/Mqtt.js +65 -65
- package/dist/model/Note.js +9 -9
- package/dist/model/Product.js +25 -25
- package/dist/model/Project.js +33 -33
- package/dist/model/ProjectMember.js +21 -21
- package/dist/model/Proxy.js +23 -23
- package/dist/model/PutDeviceFleetsRequest.js +7 -7
- package/dist/model/Radresponder.js +24 -24
- package/dist/model/Route.js +35 -35
- package/dist/model/RouteSchema.js +39 -38
- package/dist/model/Snowflake.js +44 -44
- package/dist/model/SnowflakeTransform.js +11 -11
- package/dist/model/Thingworx.js +32 -32
- package/dist/model/TowerLocation.js +51 -51
- package/dist/model/Twilio.js +42 -42
- package/dist/model/UpdateFleetRequest.js +16 -16
- package/dist/model/UserDbRoute.js +24 -24
- package/package.json +3 -3
package/dist/model/Device.js
CHANGED
|
@@ -22,19 +22,19 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
22
22
|
/**
|
|
23
23
|
* The Device model module.
|
|
24
24
|
* @module model/Device
|
|
25
|
-
* @version 1.0.
|
|
25
|
+
* @version 1.0.11
|
|
26
26
|
*/
|
|
27
27
|
var Device = /*#__PURE__*/function () {
|
|
28
28
|
/**
|
|
29
29
|
* Constructs a new <code>Device</code>.
|
|
30
30
|
* @alias module:model/Device
|
|
31
|
-
* @param uid {String}
|
|
32
|
-
* @param serialNumber {String}
|
|
33
|
-
* @param provisioned {Date}
|
|
34
|
-
* @param productUid {String}
|
|
35
|
-
* @param fleetUids {Array.<String>}
|
|
36
|
-
* @param voltage {Number}
|
|
37
|
-
* @param temperature {Number}
|
|
31
|
+
* @param uid {String}
|
|
32
|
+
* @param serialNumber {String}
|
|
33
|
+
* @param provisioned {Date}
|
|
34
|
+
* @param productUid {String}
|
|
35
|
+
* @param fleetUids {Array.<String>}
|
|
36
|
+
* @param voltage {Number}
|
|
37
|
+
* @param temperature {Number}
|
|
38
38
|
*/
|
|
39
39
|
function Device(uid, serialNumber, provisioned, productUid, fleetUids, voltage, temperature) {
|
|
40
40
|
_classCallCheck(this, Device);
|
|
@@ -49,13 +49,13 @@ var Device = /*#__PURE__*/function () {
|
|
|
49
49
|
_createClass(Device, null, [{
|
|
50
50
|
key: "initialize",
|
|
51
51
|
value: function initialize(obj, uid, serialNumber, provisioned, productUid, fleetUids, voltage, temperature) {
|
|
52
|
-
obj[
|
|
53
|
-
obj[
|
|
54
|
-
obj[
|
|
55
|
-
obj[
|
|
56
|
-
obj[
|
|
57
|
-
obj[
|
|
58
|
-
obj[
|
|
52
|
+
obj["uid"] = uid;
|
|
53
|
+
obj["serial_number"] = serialNumber;
|
|
54
|
+
obj["provisioned"] = provisioned;
|
|
55
|
+
obj["product_uid"] = productUid;
|
|
56
|
+
obj["fleet_uids"] = fleetUids;
|
|
57
|
+
obj["voltage"] = voltage;
|
|
58
|
+
obj["temperature"] = temperature;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -70,50 +70,50 @@ var Device = /*#__PURE__*/function () {
|
|
|
70
70
|
value: function constructFromObject(data, obj) {
|
|
71
71
|
if (data) {
|
|
72
72
|
obj = obj || new Device();
|
|
73
|
-
if (data.hasOwnProperty(
|
|
74
|
-
obj[
|
|
73
|
+
if (data.hasOwnProperty("uid")) {
|
|
74
|
+
obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
|
|
75
75
|
}
|
|
76
|
-
if (data.hasOwnProperty(
|
|
77
|
-
obj[
|
|
76
|
+
if (data.hasOwnProperty("serial_number")) {
|
|
77
|
+
obj["serial_number"] = _ApiClient["default"].convertToType(data["serial_number"], "String");
|
|
78
78
|
}
|
|
79
|
-
if (data.hasOwnProperty(
|
|
80
|
-
obj[
|
|
79
|
+
if (data.hasOwnProperty("provisioned")) {
|
|
80
|
+
obj["provisioned"] = _ApiClient["default"].convertToType(data["provisioned"], "Date");
|
|
81
81
|
}
|
|
82
|
-
if (data.hasOwnProperty(
|
|
83
|
-
obj[
|
|
82
|
+
if (data.hasOwnProperty("last_activity")) {
|
|
83
|
+
obj["last_activity"] = _ApiClient["default"].convertToType(data["last_activity"], "Date");
|
|
84
84
|
}
|
|
85
|
-
if (data.hasOwnProperty(
|
|
86
|
-
obj[
|
|
85
|
+
if (data.hasOwnProperty("contact")) {
|
|
86
|
+
obj["contact"] = _Contact["default"].constructFromObject(data["contact"]);
|
|
87
87
|
}
|
|
88
|
-
if (data.hasOwnProperty(
|
|
89
|
-
obj[
|
|
88
|
+
if (data.hasOwnProperty("product_uid")) {
|
|
89
|
+
obj["product_uid"] = _ApiClient["default"].convertToType(data["product_uid"], "String");
|
|
90
90
|
}
|
|
91
|
-
if (data.hasOwnProperty(
|
|
92
|
-
obj[
|
|
91
|
+
if (data.hasOwnProperty("fleet_uids")) {
|
|
92
|
+
obj["fleet_uids"] = _ApiClient["default"].convertToType(data["fleet_uids"], ["String"]);
|
|
93
93
|
}
|
|
94
|
-
if (data.hasOwnProperty(
|
|
95
|
-
obj[
|
|
94
|
+
if (data.hasOwnProperty("tower_info")) {
|
|
95
|
+
obj["tower_info"] = _DeviceTowerInfo["default"].constructFromObject(data["tower_info"]);
|
|
96
96
|
}
|
|
97
|
-
if (data.hasOwnProperty(
|
|
98
|
-
obj[
|
|
97
|
+
if (data.hasOwnProperty("tower_location")) {
|
|
98
|
+
obj["tower_location"] = _Location["default"].constructFromObject(data["tower_location"]);
|
|
99
99
|
}
|
|
100
|
-
if (data.hasOwnProperty(
|
|
101
|
-
obj[
|
|
100
|
+
if (data.hasOwnProperty("gps_location")) {
|
|
101
|
+
obj["gps_location"] = _Location["default"].constructFromObject(data["gps_location"]);
|
|
102
102
|
}
|
|
103
|
-
if (data.hasOwnProperty(
|
|
104
|
-
obj[
|
|
103
|
+
if (data.hasOwnProperty("triangulated_location")) {
|
|
104
|
+
obj["triangulated_location"] = _Location["default"].constructFromObject(data["triangulated_location"]);
|
|
105
105
|
}
|
|
106
|
-
if (data.hasOwnProperty(
|
|
107
|
-
obj[
|
|
106
|
+
if (data.hasOwnProperty("voltage")) {
|
|
107
|
+
obj["voltage"] = _ApiClient["default"].convertToType(data["voltage"], "Number");
|
|
108
108
|
}
|
|
109
|
-
if (data.hasOwnProperty(
|
|
110
|
-
obj[
|
|
109
|
+
if (data.hasOwnProperty("temperature")) {
|
|
110
|
+
obj["temperature"] = _ApiClient["default"].convertToType(data["temperature"], "Number");
|
|
111
111
|
}
|
|
112
|
-
if (data.hasOwnProperty(
|
|
113
|
-
obj[
|
|
112
|
+
if (data.hasOwnProperty("dfu")) {
|
|
113
|
+
obj["dfu"] = _DFUEnv["default"].constructFromObject(data["dfu"]);
|
|
114
114
|
}
|
|
115
|
-
if (data.hasOwnProperty(
|
|
116
|
-
obj[
|
|
115
|
+
if (data.hasOwnProperty("sku")) {
|
|
116
|
+
obj["sku"] = _ApiClient["default"].convertToType(data["sku"], "String");
|
|
117
117
|
}
|
|
118
118
|
} else if (data === null) {
|
|
119
119
|
return null;
|
|
@@ -145,54 +145,54 @@ var Device = /*#__PURE__*/function () {
|
|
|
145
145
|
} finally {
|
|
146
146
|
_iterator.f();
|
|
147
147
|
}
|
|
148
|
-
if (data[
|
|
149
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
148
|
+
if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
|
|
150
150
|
}
|
|
151
151
|
// ensure the json data is a string
|
|
152
|
-
if (data[
|
|
153
|
-
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data[
|
|
152
|
+
if (data["serial_number"] && !(typeof data["serial_number"] === "string" || data["serial_number"] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data["serial_number"]);
|
|
154
154
|
}
|
|
155
155
|
// validate the optional field `contact`
|
|
156
|
-
if (data[
|
|
156
|
+
if (data["contact"]) {
|
|
157
157
|
// data not null
|
|
158
|
-
_Contact["default"].validateJSON(data[
|
|
158
|
+
_Contact["default"].validateJSON(data["contact"]);
|
|
159
159
|
}
|
|
160
160
|
// ensure the json data is a string
|
|
161
|
-
if (data[
|
|
162
|
-
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data[
|
|
161
|
+
if (data["product_uid"] && !(typeof data["product_uid"] === "string" || data["product_uid"] instanceof String)) {
|
|
162
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data["product_uid"]);
|
|
163
163
|
}
|
|
164
164
|
// ensure the json data is an array
|
|
165
|
-
if (!Array.isArray(data[
|
|
166
|
-
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data[
|
|
165
|
+
if (!Array.isArray(data["fleet_uids"])) {
|
|
166
|
+
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data["fleet_uids"]);
|
|
167
167
|
}
|
|
168
168
|
// validate the optional field `tower_info`
|
|
169
|
-
if (data[
|
|
169
|
+
if (data["tower_info"]) {
|
|
170
170
|
// data not null
|
|
171
|
-
_DeviceTowerInfo["default"].validateJSON(data[
|
|
171
|
+
_DeviceTowerInfo["default"].validateJSON(data["tower_info"]);
|
|
172
172
|
}
|
|
173
173
|
// validate the optional field `tower_location`
|
|
174
|
-
if (data[
|
|
174
|
+
if (data["tower_location"]) {
|
|
175
175
|
// data not null
|
|
176
|
-
_Location["default"].validateJSON(data[
|
|
176
|
+
_Location["default"].validateJSON(data["tower_location"]);
|
|
177
177
|
}
|
|
178
178
|
// validate the optional field `gps_location`
|
|
179
|
-
if (data[
|
|
179
|
+
if (data["gps_location"]) {
|
|
180
180
|
// data not null
|
|
181
|
-
_Location["default"].validateJSON(data[
|
|
181
|
+
_Location["default"].validateJSON(data["gps_location"]);
|
|
182
182
|
}
|
|
183
183
|
// validate the optional field `triangulated_location`
|
|
184
|
-
if (data[
|
|
184
|
+
if (data["triangulated_location"]) {
|
|
185
185
|
// data not null
|
|
186
|
-
_Location["default"].validateJSON(data[
|
|
186
|
+
_Location["default"].validateJSON(data["triangulated_location"]);
|
|
187
187
|
}
|
|
188
188
|
// validate the optional field `dfu`
|
|
189
|
-
if (data[
|
|
189
|
+
if (data["dfu"]) {
|
|
190
190
|
// data not null
|
|
191
|
-
_DFUEnv["default"].validateJSON(data[
|
|
191
|
+
_DFUEnv["default"].validateJSON(data["dfu"]);
|
|
192
192
|
}
|
|
193
193
|
// ensure the json data is a string
|
|
194
|
-
if (data[
|
|
195
|
-
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data[
|
|
194
|
+
if (data["sku"] && !(typeof data["sku"] === "string" || data["sku"] instanceof String)) {
|
|
195
|
+
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data["sku"]);
|
|
196
196
|
}
|
|
197
197
|
return true;
|
|
198
198
|
}
|
|
@@ -204,76 +204,76 @@ Device.RequiredProperties = ["uid", "serial_number", "provisioned", "product_uid
|
|
|
204
204
|
/**
|
|
205
205
|
* @member {String} uid
|
|
206
206
|
*/
|
|
207
|
-
Device.prototype[
|
|
207
|
+
Device.prototype["uid"] = undefined;
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
210
|
* @member {String} serial_number
|
|
211
211
|
*/
|
|
212
|
-
Device.prototype[
|
|
212
|
+
Device.prototype["serial_number"] = undefined;
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* @member {Date} provisioned
|
|
216
216
|
*/
|
|
217
|
-
Device.prototype[
|
|
217
|
+
Device.prototype["provisioned"] = undefined;
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* @member {Date} last_activity
|
|
221
221
|
*/
|
|
222
|
-
Device.prototype[
|
|
222
|
+
Device.prototype["last_activity"] = undefined;
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* @member {module:model/Contact} contact
|
|
226
226
|
*/
|
|
227
|
-
Device.prototype[
|
|
227
|
+
Device.prototype["contact"] = undefined;
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* @member {String} product_uid
|
|
231
231
|
*/
|
|
232
|
-
Device.prototype[
|
|
232
|
+
Device.prototype["product_uid"] = undefined;
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* @member {Array.<String>} fleet_uids
|
|
236
236
|
*/
|
|
237
|
-
Device.prototype[
|
|
237
|
+
Device.prototype["fleet_uids"] = undefined;
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
240
|
* @member {module:model/DeviceTowerInfo} tower_info
|
|
241
241
|
*/
|
|
242
|
-
Device.prototype[
|
|
242
|
+
Device.prototype["tower_info"] = undefined;
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
245
|
* @member {module:model/Location} tower_location
|
|
246
246
|
*/
|
|
247
|
-
Device.prototype[
|
|
247
|
+
Device.prototype["tower_location"] = undefined;
|
|
248
248
|
|
|
249
249
|
/**
|
|
250
250
|
* @member {module:model/Location} gps_location
|
|
251
251
|
*/
|
|
252
|
-
Device.prototype[
|
|
252
|
+
Device.prototype["gps_location"] = undefined;
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* @member {module:model/Location} triangulated_location
|
|
256
256
|
*/
|
|
257
|
-
Device.prototype[
|
|
257
|
+
Device.prototype["triangulated_location"] = undefined;
|
|
258
258
|
|
|
259
259
|
/**
|
|
260
260
|
* @member {Number} voltage
|
|
261
261
|
*/
|
|
262
|
-
Device.prototype[
|
|
262
|
+
Device.prototype["voltage"] = undefined;
|
|
263
263
|
|
|
264
264
|
/**
|
|
265
265
|
* @member {Number} temperature
|
|
266
266
|
*/
|
|
267
|
-
Device.prototype[
|
|
267
|
+
Device.prototype["temperature"] = undefined;
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
270
|
* @member {module:model/DFUEnv} dfu
|
|
271
271
|
*/
|
|
272
|
-
Device.prototype[
|
|
272
|
+
Device.prototype["dfu"] = undefined;
|
|
273
273
|
|
|
274
274
|
/**
|
|
275
275
|
* @member {String} sku
|
|
276
276
|
*/
|
|
277
|
-
Device.prototype[
|
|
277
|
+
Device.prototype["sku"] = undefined;
|
|
278
278
|
var _default = Device;
|
|
279
279
|
exports["default"] = _default;
|