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

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