@blues-inc/notehub-js 1.0.37-beta.16 → 1.0.37-beta.18

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