@blues-inc/notehub-js 1.0.29-beta.4 → 1.0.29-beta.5
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 +12 -2
- 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 +1 -1
- package/dist/api/EventApi.js +1 -1
- package/dist/api/ExternalDevicesApi.js +202 -0
- package/dist/api/MonitorApi.js +1 -1
- package/dist/api/ProjectApi.js +1 -1
- package/dist/api/RepositoryApi.js +1 -1
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/WebhookApi.js +312 -0
- package/dist/index.js +28 -7
- package/dist/model/Alert.js +1 -1
- package/dist/model/AlertDataInner.js +1 -1
- package/dist/model/AlertNotificationsInner.js +1 -1
- package/dist/model/Aws.js +1 -1
- package/dist/model/Azure.js +1 -1
- package/dist/model/BillingAccount.js +1 -1
- package/dist/model/Body.js +1 -1
- package/dist/model/CloneProjectRequest.js +1 -1
- package/dist/model/Contact.js +1 -1
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateMonitor.js +1 -1
- package/dist/model/CreateProductRequest.js +1 -1
- package/dist/model/CreateProjectRequest.js +1 -1
- package/dist/model/CreateUpdateRepository.js +1 -1
- package/dist/model/CurrentFirmware.js +1 -1
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +1 -1
- package/dist/model/DataField.js +1 -1
- package/dist/model/DataSet.js +1 -1
- package/dist/model/DataSetField.js +1 -1
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +1 -31
- package/dist/model/DeviceDfuHistory.js +1 -1
- package/dist/model/DeviceDfuHistoryPage.js +1 -1
- package/dist/model/DeviceDfuStateMachine.js +1 -1
- package/dist/model/DeviceDfuStateMachineNode.js +1 -1
- package/dist/model/DeviceDfuStatus.js +1 -1
- package/dist/model/DeviceDfuStatusCurrent.js +1 -1
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSession.js +1 -1
- package/dist/model/DeviceTowerInfo.js +1 -1
- package/dist/model/DeviceUsage.js +1 -1
- package/dist/model/DfuActionRequest.js +1 -1
- package/dist/model/EmailNotification.js +1 -1
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +1 -1
- package/dist/model/Event.js +1 -1
- package/dist/model/ExtDeviceSession.js +617 -0
- package/dist/model/Firmware.js +1 -1
- package/dist/model/FirmwareInfo.js +1 -1
- package/dist/model/Fleet.js +1 -1
- package/dist/model/GetAlerts200Response.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +1 -1
- package/dist/model/GetDeviceSessions200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
- package/dist/model/GetProjectFleets200Response.js +1 -1
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +1 -1
- package/dist/model/Google.js +1 -1
- package/dist/model/HandleNoteChanges200Response.js +1 -1
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +1 -1
- package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +1 -1
- package/dist/model/HttpFilter.js +1 -1
- package/dist/model/HttpTransform.js +1 -1
- package/dist/model/Location.js +1 -1
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/Monitor.js +1 -1
- package/dist/model/MonitorAlertRoutesInner.js +1 -1
- package/dist/model/Mqtt.js +1 -1
- package/dist/model/Note.js +1 -1
- package/dist/model/NotehubRoute.js +1 -1
- package/dist/model/NotehubRouteSchema.js +1 -1
- package/dist/model/PostProvisionProjectDeviceRequest.js +1 -1
- package/dist/model/Product.js +1 -1
- package/dist/model/Project.js +1 -1
- package/dist/model/ProjectMember.js +1 -1
- package/dist/model/Proxy.js +1 -1
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/QuestionDataResponseLineChart.js +1 -1
- package/dist/model/QuestionDataResponseMap.js +1 -1
- package/dist/model/Radresponder.js +1 -1
- package/dist/model/Repository.js +1 -1
- package/dist/model/Slack.js +1 -1
- package/dist/model/SlackBearerNotification.js +1 -1
- package/dist/model/SlackWebHookNotification.js +1 -1
- package/dist/model/Snowflake.js +1 -1
- package/dist/model/SnowflakeTransform.js +1 -1
- package/dist/model/Thingworx.js +1 -1
- package/dist/model/TowerLocation.js +10 -2
- package/dist/model/Twilio.js +1 -1
- package/dist/model/UpdateFleetRequest.js +1 -1
- package/dist/model/UploadMetadata.js +1 -1
- package/dist/model/UserDbRoute.js +1 -1
- package/dist/model/UserDfuStateMachine.js +1 -1
- package/dist/model/UserDfuStateMachineStatus.js +1 -1
- package/dist/model/UserFirmwareInfo.js +1 -1
- package/dist/model/{SimUsage.js → WebhookSettings.js} +47 -48
- package/package.json +1 -1
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _TowerLocation = _interopRequireDefault(require("./TowerLocation"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
+
* Notehub API
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document: 1.2.0
|
|
23
|
+
* Contact: engineering@blues.io
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The ExtDeviceSession model module.
|
|
32
|
+
* @module model/ExtDeviceSession
|
|
33
|
+
* @version 1.0.29-beta.5
|
|
34
|
+
*/
|
|
35
|
+
var ExtDeviceSession = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>ExtDeviceSession</code>.
|
|
38
|
+
* Session object for external devices
|
|
39
|
+
* @alias module:model/ExtDeviceSession
|
|
40
|
+
* @param why {String} Why a session was opened or closed
|
|
41
|
+
* @param device {String} Device UID
|
|
42
|
+
* @param product {String} Product UID
|
|
43
|
+
*/
|
|
44
|
+
function ExtDeviceSession(why, device, product) {
|
|
45
|
+
_classCallCheck(this, ExtDeviceSession);
|
|
46
|
+
ExtDeviceSession.initialize(this, why, device, product);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(ExtDeviceSession, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, why, device, product) {
|
|
57
|
+
obj['why'] = why;
|
|
58
|
+
obj['device'] = device;
|
|
59
|
+
obj['product'] = product;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructs a <code>ExtDeviceSession</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @param {module:model/ExtDeviceSession} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/ExtDeviceSession} The populated <code>ExtDeviceSession</code> instance.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value: function constructFromObject(data, obj) {
|
|
72
|
+
if (data) {
|
|
73
|
+
obj = obj || new ExtDeviceSession();
|
|
74
|
+
if (data.hasOwnProperty('why')) {
|
|
75
|
+
obj['why'] = _ApiClient["default"].convertToType(data['why'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('device')) {
|
|
78
|
+
obj['device'] = _ApiClient["default"].convertToType(data['device'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('sn')) {
|
|
81
|
+
obj['sn'] = _ApiClient["default"].convertToType(data['sn'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('product')) {
|
|
84
|
+
obj['product'] = _ApiClient["default"].convertToType(data['product'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('fleets')) {
|
|
87
|
+
obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('cell')) {
|
|
90
|
+
obj['cell'] = _ApiClient["default"].convertToType(data['cell'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('scan')) {
|
|
93
|
+
obj['scan'] = _ApiClient["default"].convertToType(data['scan'], 'Blob');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('triangulate')) {
|
|
96
|
+
obj['triangulate'] = _ApiClient["default"].convertToType(data['triangulate'], {
|
|
97
|
+
'String': Object
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
if (data.hasOwnProperty('rssi')) {
|
|
101
|
+
obj['rssi'] = _ApiClient["default"].convertToType(data['rssi'], 'Number');
|
|
102
|
+
}
|
|
103
|
+
if (data.hasOwnProperty('sinr')) {
|
|
104
|
+
obj['sinr'] = _ApiClient["default"].convertToType(data['sinr'], 'Number');
|
|
105
|
+
}
|
|
106
|
+
if (data.hasOwnProperty('rsrp')) {
|
|
107
|
+
obj['rsrp'] = _ApiClient["default"].convertToType(data['rsrp'], 'Number');
|
|
108
|
+
}
|
|
109
|
+
if (data.hasOwnProperty('rsrq')) {
|
|
110
|
+
obj['rsrq'] = _ApiClient["default"].convertToType(data['rsrq'], 'Number');
|
|
111
|
+
}
|
|
112
|
+
if (data.hasOwnProperty('bars')) {
|
|
113
|
+
obj['bars'] = _ApiClient["default"].convertToType(data['bars'], 'Number');
|
|
114
|
+
}
|
|
115
|
+
if (data.hasOwnProperty('rat')) {
|
|
116
|
+
obj['rat'] = _ApiClient["default"].convertToType(data['rat'], 'String');
|
|
117
|
+
}
|
|
118
|
+
if (data.hasOwnProperty('bearer')) {
|
|
119
|
+
obj['bearer'] = _ApiClient["default"].convertToType(data['bearer'], 'String');
|
|
120
|
+
}
|
|
121
|
+
if (data.hasOwnProperty('ip')) {
|
|
122
|
+
obj['ip'] = _ApiClient["default"].convertToType(data['ip'], 'String');
|
|
123
|
+
}
|
|
124
|
+
if (data.hasOwnProperty('bssid')) {
|
|
125
|
+
obj['bssid'] = _ApiClient["default"].convertToType(data['bssid'], 'String');
|
|
126
|
+
}
|
|
127
|
+
if (data.hasOwnProperty('ssid')) {
|
|
128
|
+
obj['ssid'] = _ApiClient["default"].convertToType(data['ssid'], 'String');
|
|
129
|
+
}
|
|
130
|
+
if (data.hasOwnProperty('iccid')) {
|
|
131
|
+
obj['iccid'] = _ApiClient["default"].convertToType(data['iccid'], 'String');
|
|
132
|
+
}
|
|
133
|
+
if (data.hasOwnProperty('apn')) {
|
|
134
|
+
obj['apn'] = _ApiClient["default"].convertToType(data['apn'], 'String');
|
|
135
|
+
}
|
|
136
|
+
if (data.hasOwnProperty('transport')) {
|
|
137
|
+
obj['transport'] = _ApiClient["default"].convertToType(data['transport'], 'String');
|
|
138
|
+
}
|
|
139
|
+
if (data.hasOwnProperty('tower')) {
|
|
140
|
+
obj['tower'] = _TowerLocation["default"].constructFromObject(data['tower']);
|
|
141
|
+
}
|
|
142
|
+
if (data.hasOwnProperty('tri')) {
|
|
143
|
+
obj['tri'] = _TowerLocation["default"].constructFromObject(data['tri']);
|
|
144
|
+
}
|
|
145
|
+
if (data.hasOwnProperty('where')) {
|
|
146
|
+
obj['where'] = _ApiClient["default"].convertToType(data['where'], 'String');
|
|
147
|
+
}
|
|
148
|
+
if (data.hasOwnProperty('where_lat')) {
|
|
149
|
+
obj['where_lat'] = _ApiClient["default"].convertToType(data['where_lat'], 'Number');
|
|
150
|
+
}
|
|
151
|
+
if (data.hasOwnProperty('where_lon')) {
|
|
152
|
+
obj['where_lon'] = _ApiClient["default"].convertToType(data['where_lon'], 'Number');
|
|
153
|
+
}
|
|
154
|
+
if (data.hasOwnProperty('where_location')) {
|
|
155
|
+
obj['where_location'] = _ApiClient["default"].convertToType(data['where_location'], 'String');
|
|
156
|
+
}
|
|
157
|
+
if (data.hasOwnProperty('where_country')) {
|
|
158
|
+
obj['where_country'] = _ApiClient["default"].convertToType(data['where_country'], 'String');
|
|
159
|
+
}
|
|
160
|
+
if (data.hasOwnProperty('where_timezone')) {
|
|
161
|
+
obj['where_timezone'] = _ApiClient["default"].convertToType(data['where_timezone'], 'String');
|
|
162
|
+
}
|
|
163
|
+
if (data.hasOwnProperty('usage_actual')) {
|
|
164
|
+
obj['usage_actual'] = _ApiClient["default"].convertToType(data['usage_actual'], 'Boolean');
|
|
165
|
+
}
|
|
166
|
+
if (data.hasOwnProperty('voltage')) {
|
|
167
|
+
obj['voltage'] = _ApiClient["default"].convertToType(data['voltage'], 'Number');
|
|
168
|
+
}
|
|
169
|
+
if (data.hasOwnProperty('temp')) {
|
|
170
|
+
obj['temp'] = _ApiClient["default"].convertToType(data['temp'], 'Number');
|
|
171
|
+
}
|
|
172
|
+
if (data.hasOwnProperty('continuous')) {
|
|
173
|
+
obj['continuous'] = _ApiClient["default"].convertToType(data['continuous'], 'Boolean');
|
|
174
|
+
}
|
|
175
|
+
if (data.hasOwnProperty('tls')) {
|
|
176
|
+
obj['tls'] = _ApiClient["default"].convertToType(data['tls'], 'Boolean');
|
|
177
|
+
}
|
|
178
|
+
if (data.hasOwnProperty('events')) {
|
|
179
|
+
obj['events'] = _ApiClient["default"].convertToType(data['events'], 'Number');
|
|
180
|
+
}
|
|
181
|
+
if (data.hasOwnProperty('moved')) {
|
|
182
|
+
obj['moved'] = _ApiClient["default"].convertToType(data['moved'], 'Number');
|
|
183
|
+
}
|
|
184
|
+
if (data.hasOwnProperty('orientation')) {
|
|
185
|
+
obj['orientation'] = _ApiClient["default"].convertToType(data['orientation'], 'String');
|
|
186
|
+
}
|
|
187
|
+
if (data.hasOwnProperty('hp_secs_total')) {
|
|
188
|
+
obj['hp_secs_total'] = _ApiClient["default"].convertToType(data['hp_secs_total'], 'Number');
|
|
189
|
+
}
|
|
190
|
+
if (data.hasOwnProperty('hp_secs_data')) {
|
|
191
|
+
obj['hp_secs_data'] = _ApiClient["default"].convertToType(data['hp_secs_data'], 'Number');
|
|
192
|
+
}
|
|
193
|
+
if (data.hasOwnProperty('hp_secs_gps')) {
|
|
194
|
+
obj['hp_secs_gps'] = _ApiClient["default"].convertToType(data['hp_secs_gps'], 'Number');
|
|
195
|
+
}
|
|
196
|
+
if (data.hasOwnProperty('hp_cycles_total')) {
|
|
197
|
+
obj['hp_cycles_total'] = _ApiClient["default"].convertToType(data['hp_cycles_total'], 'Number');
|
|
198
|
+
}
|
|
199
|
+
if (data.hasOwnProperty('hp_cycles_data')) {
|
|
200
|
+
obj['hp_cycles_data'] = _ApiClient["default"].convertToType(data['hp_cycles_data'], 'Number');
|
|
201
|
+
}
|
|
202
|
+
if (data.hasOwnProperty('hp_cycles_gps')) {
|
|
203
|
+
obj['hp_cycles_gps'] = _ApiClient["default"].convertToType(data['hp_cycles_gps'], 'Number');
|
|
204
|
+
}
|
|
205
|
+
if (data.hasOwnProperty('power_charging')) {
|
|
206
|
+
obj['power_charging'] = _ApiClient["default"].convertToType(data['power_charging'], 'Boolean');
|
|
207
|
+
}
|
|
208
|
+
if (data.hasOwnProperty('power_usb')) {
|
|
209
|
+
obj['power_usb'] = _ApiClient["default"].convertToType(data['power_usb'], 'Boolean');
|
|
210
|
+
}
|
|
211
|
+
if (data.hasOwnProperty('power_primary')) {
|
|
212
|
+
obj['power_primary'] = _ApiClient["default"].convertToType(data['power_primary'], 'Boolean');
|
|
213
|
+
}
|
|
214
|
+
if (data.hasOwnProperty('power_mah')) {
|
|
215
|
+
obj['power_mah'] = _ApiClient["default"].convertToType(data['power_mah'], 'Number');
|
|
216
|
+
}
|
|
217
|
+
} else if (data === null) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
return obj;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Validates the JSON data with respect to <code>ExtDeviceSession</code>.
|
|
225
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
226
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ExtDeviceSession</code>.
|
|
227
|
+
*/
|
|
228
|
+
}, {
|
|
229
|
+
key: "validateJSON",
|
|
230
|
+
value: function validateJSON(data) {
|
|
231
|
+
// check to make sure all required properties are present in the JSON string
|
|
232
|
+
var _iterator = _createForOfIteratorHelper(ExtDeviceSession.RequiredProperties),
|
|
233
|
+
_step;
|
|
234
|
+
try {
|
|
235
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
236
|
+
var property = _step.value;
|
|
237
|
+
if (!data[property]) {
|
|
238
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// ensure the json data is a string
|
|
242
|
+
} catch (err) {
|
|
243
|
+
_iterator.e(err);
|
|
244
|
+
} finally {
|
|
245
|
+
_iterator.f();
|
|
246
|
+
}
|
|
247
|
+
if (data['why'] && !(typeof data['why'] === 'string' || data['why'] instanceof String)) {
|
|
248
|
+
throw new Error("Expected the field `why` to be a primitive type in the JSON string but got " + data['why']);
|
|
249
|
+
}
|
|
250
|
+
// ensure the json data is a string
|
|
251
|
+
if (data['device'] && !(typeof data['device'] === 'string' || data['device'] instanceof String)) {
|
|
252
|
+
throw new Error("Expected the field `device` to be a primitive type in the JSON string but got " + data['device']);
|
|
253
|
+
}
|
|
254
|
+
// ensure the json data is a string
|
|
255
|
+
if (data['sn'] && !(typeof data['sn'] === 'string' || data['sn'] instanceof String)) {
|
|
256
|
+
throw new Error("Expected the field `sn` to be a primitive type in the JSON string but got " + data['sn']);
|
|
257
|
+
}
|
|
258
|
+
// ensure the json data is a string
|
|
259
|
+
if (data['product'] && !(typeof data['product'] === 'string' || data['product'] instanceof String)) {
|
|
260
|
+
throw new Error("Expected the field `product` to be a primitive type in the JSON string but got " + data['product']);
|
|
261
|
+
}
|
|
262
|
+
// ensure the json data is an array
|
|
263
|
+
if (!Array.isArray(data['fleets'])) {
|
|
264
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
|
|
265
|
+
}
|
|
266
|
+
// ensure the json data is a string
|
|
267
|
+
if (data['cell'] && !(typeof data['cell'] === 'string' || data['cell'] instanceof String)) {
|
|
268
|
+
throw new Error("Expected the field `cell` to be a primitive type in the JSON string but got " + data['cell']);
|
|
269
|
+
}
|
|
270
|
+
// ensure the json data is a string
|
|
271
|
+
if (data['rat'] && !(typeof data['rat'] === 'string' || data['rat'] instanceof String)) {
|
|
272
|
+
throw new Error("Expected the field `rat` to be a primitive type in the JSON string but got " + data['rat']);
|
|
273
|
+
}
|
|
274
|
+
// ensure the json data is a string
|
|
275
|
+
if (data['bearer'] && !(typeof data['bearer'] === 'string' || data['bearer'] instanceof String)) {
|
|
276
|
+
throw new Error("Expected the field `bearer` to be a primitive type in the JSON string but got " + data['bearer']);
|
|
277
|
+
}
|
|
278
|
+
// ensure the json data is a string
|
|
279
|
+
if (data['ip'] && !(typeof data['ip'] === 'string' || data['ip'] instanceof String)) {
|
|
280
|
+
throw new Error("Expected the field `ip` to be a primitive type in the JSON string but got " + data['ip']);
|
|
281
|
+
}
|
|
282
|
+
// ensure the json data is a string
|
|
283
|
+
if (data['bssid'] && !(typeof data['bssid'] === 'string' || data['bssid'] instanceof String)) {
|
|
284
|
+
throw new Error("Expected the field `bssid` to be a primitive type in the JSON string but got " + data['bssid']);
|
|
285
|
+
}
|
|
286
|
+
// ensure the json data is a string
|
|
287
|
+
if (data['ssid'] && !(typeof data['ssid'] === 'string' || data['ssid'] instanceof String)) {
|
|
288
|
+
throw new Error("Expected the field `ssid` to be a primitive type in the JSON string but got " + data['ssid']);
|
|
289
|
+
}
|
|
290
|
+
// ensure the json data is a string
|
|
291
|
+
if (data['iccid'] && !(typeof data['iccid'] === 'string' || data['iccid'] instanceof String)) {
|
|
292
|
+
throw new Error("Expected the field `iccid` to be a primitive type in the JSON string but got " + data['iccid']);
|
|
293
|
+
}
|
|
294
|
+
// ensure the json data is a string
|
|
295
|
+
if (data['apn'] && !(typeof data['apn'] === 'string' || data['apn'] instanceof String)) {
|
|
296
|
+
throw new Error("Expected the field `apn` to be a primitive type in the JSON string but got " + data['apn']);
|
|
297
|
+
}
|
|
298
|
+
// ensure the json data is a string
|
|
299
|
+
if (data['transport'] && !(typeof data['transport'] === 'string' || data['transport'] instanceof String)) {
|
|
300
|
+
throw new Error("Expected the field `transport` to be a primitive type in the JSON string but got " + data['transport']);
|
|
301
|
+
}
|
|
302
|
+
// validate the optional field `tower`
|
|
303
|
+
if (data['tower']) {
|
|
304
|
+
// data not null
|
|
305
|
+
_TowerLocation["default"].validateJSON(data['tower']);
|
|
306
|
+
}
|
|
307
|
+
// validate the optional field `tri`
|
|
308
|
+
if (data['tri']) {
|
|
309
|
+
// data not null
|
|
310
|
+
_TowerLocation["default"].validateJSON(data['tri']);
|
|
311
|
+
}
|
|
312
|
+
// ensure the json data is a string
|
|
313
|
+
if (data['where'] && !(typeof data['where'] === 'string' || data['where'] instanceof String)) {
|
|
314
|
+
throw new Error("Expected the field `where` to be a primitive type in the JSON string but got " + data['where']);
|
|
315
|
+
}
|
|
316
|
+
// ensure the json data is a string
|
|
317
|
+
if (data['where_location'] && !(typeof data['where_location'] === 'string' || data['where_location'] instanceof String)) {
|
|
318
|
+
throw new Error("Expected the field `where_location` to be a primitive type in the JSON string but got " + data['where_location']);
|
|
319
|
+
}
|
|
320
|
+
// ensure the json data is a string
|
|
321
|
+
if (data['where_country'] && !(typeof data['where_country'] === 'string' || data['where_country'] instanceof String)) {
|
|
322
|
+
throw new Error("Expected the field `where_country` to be a primitive type in the JSON string but got " + data['where_country']);
|
|
323
|
+
}
|
|
324
|
+
// ensure the json data is a string
|
|
325
|
+
if (data['where_timezone'] && !(typeof data['where_timezone'] === 'string' || data['where_timezone'] instanceof String)) {
|
|
326
|
+
throw new Error("Expected the field `where_timezone` to be a primitive type in the JSON string but got " + data['where_timezone']);
|
|
327
|
+
}
|
|
328
|
+
// ensure the json data is a string
|
|
329
|
+
if (data['orientation'] && !(typeof data['orientation'] === 'string' || data['orientation'] instanceof String)) {
|
|
330
|
+
throw new Error("Expected the field `orientation` to be a primitive type in the JSON string but got " + data['orientation']);
|
|
331
|
+
}
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
}]);
|
|
335
|
+
}();
|
|
336
|
+
ExtDeviceSession.RequiredProperties = ["why", "device", "product"];
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Why a session was opened or closed
|
|
340
|
+
* @member {String} why
|
|
341
|
+
*/
|
|
342
|
+
ExtDeviceSession.prototype['why'] = undefined;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Device UID
|
|
346
|
+
* @member {String} device
|
|
347
|
+
*/
|
|
348
|
+
ExtDeviceSession.prototype['device'] = undefined;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Device Serial Number
|
|
352
|
+
* @member {String} sn
|
|
353
|
+
*/
|
|
354
|
+
ExtDeviceSession.prototype['sn'] = undefined;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Product UID
|
|
358
|
+
* @member {String} product
|
|
359
|
+
*/
|
|
360
|
+
ExtDeviceSession.prototype['product'] = undefined;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Array of Fleet UIDs
|
|
364
|
+
* @member {Array.<String>} fleets
|
|
365
|
+
*/
|
|
366
|
+
ExtDeviceSession.prototype['fleets'] = undefined;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* (internal) Cell ID where the session originated and quality (\"mcc,mnc,lac,cellid\")
|
|
370
|
+
* @member {String} cell
|
|
371
|
+
*/
|
|
372
|
+
ExtDeviceSession.prototype['cell'] = undefined;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* (internal) Parameters passed by device as a result of scanning towers/APs
|
|
376
|
+
* @member {Blob} scan
|
|
377
|
+
*/
|
|
378
|
+
ExtDeviceSession.prototype['scan'] = undefined;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* (internal) Network connection information sent by the notecard
|
|
382
|
+
* @member {Object.<String, Object>} triangulate
|
|
383
|
+
*/
|
|
384
|
+
ExtDeviceSession.prototype['triangulate'] = undefined;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* (internal) RSSI value
|
|
388
|
+
* @member {Number} rssi
|
|
389
|
+
*/
|
|
390
|
+
ExtDeviceSession.prototype['rssi'] = undefined;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* (internal) SINR value
|
|
394
|
+
* @member {Number} sinr
|
|
395
|
+
*/
|
|
396
|
+
ExtDeviceSession.prototype['sinr'] = undefined;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* (internal) RSRP value
|
|
400
|
+
* @member {Number} rsrp
|
|
401
|
+
*/
|
|
402
|
+
ExtDeviceSession.prototype['rsrp'] = undefined;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* (internal) RSRQ value
|
|
406
|
+
* @member {Number} rsrq
|
|
407
|
+
*/
|
|
408
|
+
ExtDeviceSession.prototype['rsrq'] = undefined;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* (internal) Number of signal bars
|
|
412
|
+
* @member {Number} bars
|
|
413
|
+
*/
|
|
414
|
+
ExtDeviceSession.prototype['bars'] = undefined;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* (internal) RAT value
|
|
418
|
+
* @member {String} rat
|
|
419
|
+
*/
|
|
420
|
+
ExtDeviceSession.prototype['rat'] = undefined;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* (internal) Bearer value
|
|
424
|
+
* @member {String} bearer
|
|
425
|
+
*/
|
|
426
|
+
ExtDeviceSession.prototype['bearer'] = undefined;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* (internal) IP address
|
|
430
|
+
* @member {String} ip
|
|
431
|
+
*/
|
|
432
|
+
ExtDeviceSession.prototype['ip'] = undefined;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* (internal) BSSID value
|
|
436
|
+
* @member {String} bssid
|
|
437
|
+
*/
|
|
438
|
+
ExtDeviceSession.prototype['bssid'] = undefined;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* (internal) SSID value
|
|
442
|
+
* @member {String} ssid
|
|
443
|
+
*/
|
|
444
|
+
ExtDeviceSession.prototype['ssid'] = undefined;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* (internal) ICCID value
|
|
448
|
+
* @member {String} iccid
|
|
449
|
+
*/
|
|
450
|
+
ExtDeviceSession.prototype['iccid'] = undefined;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* (internal) APN value
|
|
454
|
+
* @member {String} apn
|
|
455
|
+
*/
|
|
456
|
+
ExtDeviceSession.prototype['apn'] = undefined;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* (internal) Composed by wire.go for use in Request.Transport && Event.Transport
|
|
460
|
+
* @member {String} transport
|
|
461
|
+
*/
|
|
462
|
+
ExtDeviceSession.prototype['transport'] = undefined;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @member {module:model/TowerLocation} tower
|
|
466
|
+
*/
|
|
467
|
+
ExtDeviceSession.prototype['tower'] = undefined;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* @member {module:model/TowerLocation} tri
|
|
471
|
+
*/
|
|
472
|
+
ExtDeviceSession.prototype['tri'] = undefined;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* (internal) Where OLC
|
|
476
|
+
* @member {String} where
|
|
477
|
+
*/
|
|
478
|
+
ExtDeviceSession.prototype['where'] = undefined;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* (internal) Latitude of the last known GPS location
|
|
482
|
+
* @member {Number} where_lat
|
|
483
|
+
*/
|
|
484
|
+
ExtDeviceSession.prototype['where_lat'] = undefined;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* (internal) Longitude of the last known GPS location
|
|
488
|
+
* @member {Number} where_lon
|
|
489
|
+
*/
|
|
490
|
+
ExtDeviceSession.prototype['where_lon'] = undefined;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* (internal) Last known location
|
|
494
|
+
* @member {String} where_location
|
|
495
|
+
*/
|
|
496
|
+
ExtDeviceSession.prototype['where_location'] = undefined;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* (internal) Country of the last known location
|
|
500
|
+
* @member {String} where_country
|
|
501
|
+
*/
|
|
502
|
+
ExtDeviceSession.prototype['where_country'] = undefined;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* (internal) Timezone of the last known location
|
|
506
|
+
* @member {String} where_timezone
|
|
507
|
+
*/
|
|
508
|
+
ExtDeviceSession.prototype['where_timezone'] = undefined;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Flag indicating whether the usage data is based on actual stats from the device
|
|
512
|
+
* @member {Boolean} usage_actual
|
|
513
|
+
*/
|
|
514
|
+
ExtDeviceSession.prototype['usage_actual'] = undefined;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Voltage value
|
|
518
|
+
* @member {Number} voltage
|
|
519
|
+
*/
|
|
520
|
+
ExtDeviceSession.prototype['voltage'] = undefined;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Temperature value
|
|
524
|
+
* @member {Number} temp
|
|
525
|
+
*/
|
|
526
|
+
ExtDeviceSession.prototype['temp'] = undefined;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Flag indicating if the session is continuous
|
|
530
|
+
* @member {Boolean} continuous
|
|
531
|
+
*/
|
|
532
|
+
ExtDeviceSession.prototype['continuous'] = undefined;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Flag indicating if the session uses TLS
|
|
536
|
+
* @member {Boolean} tls
|
|
537
|
+
*/
|
|
538
|
+
ExtDeviceSession.prototype['tls'] = undefined;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Number of events routed
|
|
542
|
+
* @member {Number} events
|
|
543
|
+
*/
|
|
544
|
+
ExtDeviceSession.prototype['events'] = undefined;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Motion of the notecard
|
|
548
|
+
* @member {Number} moved
|
|
549
|
+
*/
|
|
550
|
+
ExtDeviceSession.prototype['moved'] = undefined;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Orientation of the notecard
|
|
554
|
+
* @member {String} orientation
|
|
555
|
+
*/
|
|
556
|
+
ExtDeviceSession.prototype['orientation'] = undefined;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Total high power seconds
|
|
560
|
+
* @member {Number} hp_secs_total
|
|
561
|
+
*/
|
|
562
|
+
ExtDeviceSession.prototype['hp_secs_total'] = undefined;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* High power seconds for data
|
|
566
|
+
* @member {Number} hp_secs_data
|
|
567
|
+
*/
|
|
568
|
+
ExtDeviceSession.prototype['hp_secs_data'] = undefined;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* High power seconds for GPS
|
|
572
|
+
* @member {Number} hp_secs_gps
|
|
573
|
+
*/
|
|
574
|
+
ExtDeviceSession.prototype['hp_secs_gps'] = undefined;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Total high power cycles
|
|
578
|
+
* @member {Number} hp_cycles_total
|
|
579
|
+
*/
|
|
580
|
+
ExtDeviceSession.prototype['hp_cycles_total'] = undefined;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* High power cycles for data
|
|
584
|
+
* @member {Number} hp_cycles_data
|
|
585
|
+
*/
|
|
586
|
+
ExtDeviceSession.prototype['hp_cycles_data'] = undefined;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* High power cycles for GPS
|
|
590
|
+
* @member {Number} hp_cycles_gps
|
|
591
|
+
*/
|
|
592
|
+
ExtDeviceSession.prototype['hp_cycles_gps'] = undefined;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Flag indicating if the device is charging
|
|
596
|
+
* @member {Boolean} power_charging
|
|
597
|
+
*/
|
|
598
|
+
ExtDeviceSession.prototype['power_charging'] = undefined;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Flag indicating if the device is using USB power
|
|
602
|
+
* @member {Boolean} power_usb
|
|
603
|
+
*/
|
|
604
|
+
ExtDeviceSession.prototype['power_usb'] = undefined;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Flag indicating if the device is using primary power
|
|
608
|
+
* @member {Boolean} power_primary
|
|
609
|
+
*/
|
|
610
|
+
ExtDeviceSession.prototype['power_primary'] = undefined;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Mojo power usage in mAh
|
|
614
|
+
* @member {Number} power_mah
|
|
615
|
+
*/
|
|
616
|
+
ExtDeviceSession.prototype['power_mah'] = undefined;
|
|
617
|
+
var _default = exports["default"] = ExtDeviceSession;
|
package/dist/model/Firmware.js
CHANGED
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The Firmware model module.
|
|
28
28
|
* @module model/Firmware
|
|
29
|
-
* @version 1.0.29-beta.
|
|
29
|
+
* @version 1.0.29-beta.5
|
|
30
30
|
*/
|
|
31
31
|
var Firmware = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The FirmwareInfo model module.
|
|
28
28
|
* @module model/FirmwareInfo
|
|
29
|
-
* @version 1.0.29-beta.
|
|
29
|
+
* @version 1.0.29-beta.5
|
|
30
30
|
*/
|
|
31
31
|
var FirmwareInfo = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
package/dist/model/Fleet.js
CHANGED
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The GetAlerts200Response model module.
|
|
32
32
|
* @module model/GetAlerts200Response
|
|
33
|
-
* @version 1.0.29-beta.
|
|
33
|
+
* @version 1.0.29-beta.5
|
|
34
34
|
*/
|
|
35
35
|
var GetAlerts200Response = /*#__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 GetBillingAccounts200Response model module.
|
|
32
32
|
* @module model/GetBillingAccounts200Response
|
|
33
|
-
* @version 1.0.29-beta.
|
|
33
|
+
* @version 1.0.29-beta.5
|
|
34
34
|
*/
|
|
35
35
|
var GetBillingAccounts200Response = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The GetDeviceEnvironmentVariables200Response model module.
|
|
31
31
|
* @module model/GetDeviceEnvironmentVariables200Response
|
|
32
|
-
* @version 1.0.29-beta.
|
|
32
|
+
* @version 1.0.29-beta.5
|
|
33
33
|
*/
|
|
34
34
|
var GetDeviceEnvironmentVariables200Response = /*#__PURE__*/function () {
|
|
35
35
|
/**
|