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