@blues-inc/notehub-js 1.0.37-beta.3 → 1.0.37-beta.30

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