@blues-inc/notehub-js 1.0.21 → 1.0.23-beta.1

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 (98) hide show
  1. package/README.md +188 -178
  2. package/dist/ApiClient.js +156 -156
  3. package/dist/api/AlertApi.js +23 -20
  4. package/dist/api/AuthorizationApi.js +17 -17
  5. package/dist/api/BillingAccountApi.js +15 -15
  6. package/dist/api/DeviceApi.js +380 -329
  7. package/dist/api/EventApi.js +162 -121
  8. package/dist/api/MonitorApi.js +53 -53
  9. package/dist/api/ProjectApi.js +246 -246
  10. package/dist/api/RouteApi.js +77 -77
  11. package/dist/model/Alert.js +72 -57
  12. package/dist/model/AlertDataInner.js +36 -36
  13. package/dist/model/AlertNotificationsInner.js +19 -19
  14. package/dist/model/Aws.js +66 -66
  15. package/dist/model/Azure.js +44 -44
  16. package/dist/model/BillingAccount.js +22 -22
  17. package/dist/model/BillingAccountRole.js +10 -10
  18. package/dist/model/Body.js +6 -6
  19. package/dist/model/CloneProjectRequest.js +21 -21
  20. package/dist/model/Contact.js +23 -23
  21. package/dist/model/CreateFleetRequest.js +8 -8
  22. package/dist/model/CreateMonitor.js +127 -126
  23. package/dist/model/CreateProductRequest.js +23 -23
  24. package/dist/model/CreateProjectRequest.js +17 -17
  25. package/dist/model/DFUEnv.js +13 -13
  26. package/dist/model/DFUState.js +66 -66
  27. package/dist/model/DeleteDeviceFleetsRequest.js +9 -9
  28. package/dist/model/Device.js +85 -85
  29. package/dist/model/DeviceSession.js +183 -183
  30. package/dist/model/DeviceTowerInfo.js +15 -15
  31. package/dist/model/DeviceUsage.js +33 -33
  32. package/dist/model/EmailNotification.js +8 -8
  33. package/dist/model/EnvironmentVariables.js +9 -9
  34. package/dist/model/Error.js +32 -32
  35. package/dist/model/Event.js +224 -224
  36. package/dist/model/FirmwareInfo.js +61 -61
  37. package/dist/model/FirmwareStatus.js +28 -28
  38. package/dist/model/Fleet.js +22 -22
  39. package/dist/model/GetAlerts200Response.js +16 -15
  40. package/dist/model/GetBillingAccounts200Response.js +11 -10
  41. package/dist/model/GetDeviceEnvironmentVariables200Response.js +13 -13
  42. package/dist/model/GetDeviceHealthLog200Response.js +13 -12
  43. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +20 -20
  44. package/dist/model/GetDeviceLatest200Response.js +11 -10
  45. package/dist/model/GetDevicePublicKey200Response.js +17 -17
  46. package/dist/model/GetDeviceSessions200Response.js +18 -17
  47. package/dist/model/GetProjectDevicePublicKeys200Response.js +18 -17
  48. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +13 -13
  49. package/dist/model/GetProjectDevices200Response.js +18 -17
  50. package/dist/model/GetProjectEvents200Response.js +30 -16
  51. package/dist/model/GetProjectEventsByCursor200Response.js +25 -24
  52. package/dist/model/GetProjectFleets200Response.js +13 -12
  53. package/dist/model/GetProjectMembers200Response.js +13 -12
  54. package/dist/model/GetProjectProducts200Response.js +11 -10
  55. package/dist/model/GetProjects200Response.js +11 -10
  56. package/dist/model/GetRouteLogsByRoute200ResponseInner.js +36 -36
  57. package/dist/model/Google.js +34 -34
  58. package/dist/model/HandleNoteChanges200Response.js +12 -12
  59. package/dist/model/HandleNoteGet200Response.js +14 -14
  60. package/dist/model/HandleNoteSignal200Response.js +6 -6
  61. package/dist/model/HandleNotefileChanges200Response.js +12 -12
  62. package/dist/model/HandleNotefileChangesPending200Response.js +15 -15
  63. package/dist/model/HandleNotefileDeleteRequest.js +8 -8
  64. package/dist/model/Http.js +36 -36
  65. package/dist/model/HttpFilter.js +20 -20
  66. package/dist/model/HttpTransform.js +21 -21
  67. package/dist/model/Location.js +41 -41
  68. package/dist/model/Login200Response.js +8 -8
  69. package/dist/model/LoginRequest.js +13 -13
  70. package/dist/model/Monitor.js +101 -100
  71. package/dist/model/MonitorAlertRoutesInner.js +10 -11
  72. package/dist/model/Mqtt.js +67 -67
  73. package/dist/model/Note.js +11 -11
  74. package/dist/model/OTAStatus.js +89 -89
  75. package/dist/model/OTAStatusList.js +14 -13
  76. package/dist/model/OTAUpdateRequest.js +54 -54
  77. package/dist/model/OTAUpdateStatus.js +18 -18
  78. package/dist/model/PostProvisionProjectDeviceRequest.js +14 -14
  79. package/dist/model/Product.js +27 -27
  80. package/dist/model/Project.js +35 -35
  81. package/dist/model/ProjectMember.js +23 -23
  82. package/dist/model/Proxy.js +25 -25
  83. package/dist/model/PutDeviceFleetsRequest.js +9 -9
  84. package/dist/model/Radresponder.js +26 -26
  85. package/dist/model/Role.js +10 -10
  86. package/dist/model/Route.js +37 -37
  87. package/dist/model/RouteSchema.js +46 -47
  88. package/dist/model/Slack.js +54 -54
  89. package/dist/model/SlackBearerNotification.js +26 -26
  90. package/dist/model/SlackWebHookNotification.js +21 -21
  91. package/dist/model/Snowflake.js +46 -46
  92. package/dist/model/SnowflakeTransform.js +13 -13
  93. package/dist/model/Thingworx.js +34 -34
  94. package/dist/model/TowerLocation.js +53 -53
  95. package/dist/model/Twilio.js +44 -44
  96. package/dist/model/UpdateFleetRequest.js +18 -18
  97. package/dist/model/UserDbRoute.js +26 -26
  98. package/package.json +4 -4
@@ -17,9 +17,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
19
  * Notehub API
20
- * The OpenAPI definition for the Notehub.io API.
20
+ * The OpenAPI definition for the Notehub.io API. Beta test change
21
21
  *
22
- * The version of the OpenAPI document: 1.1.0
22
+ * The version of the OpenAPI document: 1.1.2
23
23
  * Contact: engineering@blues.io
24
24
  *
25
25
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,18 +28,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  *
29
29
  */
30
30
  /**
31
- * Route service.
32
- * @module api/RouteApi
33
- * @version 1.0.21
34
- */
31
+ * Route service.
32
+ * @module api/RouteApi
33
+ * @version 1.0.23-beta.1
34
+ */
35
35
  var RouteApi = exports["default"] = /*#__PURE__*/function () {
36
36
  /**
37
- * Constructs a new RouteApi.
38
- * @alias module:api/RouteApi
39
- * @class
40
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
- * default to {@link module:ApiClient#instance} if unspecified.
42
- */
37
+ * Constructs a new RouteApi.
38
+ * @alias module:api/RouteApi
39
+ * @class
40
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
+ * default to {@link module:ApiClient#instance} if unspecified.
42
+ */
43
43
  function RouteApi(apiClient) {
44
44
  _classCallCheck(this, RouteApi);
45
45
  this.apiClient = apiClient || _ApiClient["default"].instance;
@@ -47,7 +47,7 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
47
47
 
48
48
  /**
49
49
  * Create Route within a Project
50
- * @param {String} projectUID
50
+ * @param {String} projectUID
51
51
  * @param {module:model/Route} route Route to be Created
52
52
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Route} and HTTP response
53
53
  */
@@ -64,21 +64,21 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
64
64
  throw new _Error["default"]("Missing the required parameter 'route' when calling createRoute");
65
65
  }
66
66
  var pathParams = {
67
- projectUID: projectUID
67
+ 'projectUID': projectUID
68
68
  };
69
69
  var queryParams = {};
70
70
  var headerParams = {};
71
71
  var formParams = {};
72
- var authNames = ["api_key"];
73
- var contentTypes = ["application/json"];
74
- var accepts = ["application/json"];
72
+ var authNames = ['api_key'];
73
+ var contentTypes = ['application/json'];
74
+ var accepts = ['application/json'];
75
75
  var returnType = _Route["default"];
76
- return this.apiClient.callApi("/v1/projects/{projectUID}/routes", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
76
+ return this.apiClient.callApi('/v1/projects/{projectUID}/routes', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
77
77
  }
78
78
 
79
79
  /**
80
80
  * Create Route within a Project
81
- * @param {String} projectUID
81
+ * @param {String} projectUID
82
82
  * @param {module:model/Route} route Route to be Created
83
83
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Route}
84
84
  */
@@ -92,8 +92,8 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
92
92
 
93
93
  /**
94
94
  * Delete single route within a project
95
- * @param {String} projectUID
96
- * @param {String} routeUID
95
+ * @param {String} projectUID
96
+ * @param {String} routeUID
97
97
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
98
98
  */
99
99
  }, {
@@ -109,23 +109,23 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
109
109
  throw new _Error["default"]("Missing the required parameter 'routeUID' when calling deleteRoute");
110
110
  }
111
111
  var pathParams = {
112
- projectUID: projectUID,
113
- routeUID: routeUID
112
+ 'projectUID': projectUID,
113
+ 'routeUID': routeUID
114
114
  };
115
115
  var queryParams = {};
116
116
  var headerParams = {};
117
117
  var formParams = {};
118
- var authNames = ["api_key"];
118
+ var authNames = ['api_key'];
119
119
  var contentTypes = [];
120
- var accepts = ["application/json"];
120
+ var accepts = ['application/json'];
121
121
  var returnType = Object;
122
- return this.apiClient.callApi("/v1/projects/{projectUID}/routes/{routeUID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
122
+ return this.apiClient.callApi('/v1/projects/{projectUID}/routes/{routeUID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
123
123
  }
124
124
 
125
125
  /**
126
126
  * Delete single route within a project
127
- * @param {String} projectUID
128
- * @param {String} routeUID
127
+ * @param {String} projectUID
128
+ * @param {String} routeUID
129
129
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
130
130
  */
131
131
  }, {
@@ -138,8 +138,8 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
138
138
 
139
139
  /**
140
140
  * Get single route within a project
141
- * @param {String} projectUID
142
- * @param {String} routeUID
141
+ * @param {String} projectUID
142
+ * @param {String} routeUID
143
143
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Route} and HTTP response
144
144
  */
145
145
  }, {
@@ -155,23 +155,23 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
155
155
  throw new _Error["default"]("Missing the required parameter 'routeUID' when calling getRoute");
156
156
  }
157
157
  var pathParams = {
158
- projectUID: projectUID,
159
- routeUID: routeUID
158
+ 'projectUID': projectUID,
159
+ 'routeUID': routeUID
160
160
  };
161
161
  var queryParams = {};
162
162
  var headerParams = {};
163
163
  var formParams = {};
164
- var authNames = ["api_key"];
164
+ var authNames = ['api_key'];
165
165
  var contentTypes = [];
166
- var accepts = ["application/json"];
166
+ var accepts = ['application/json'];
167
167
  var returnType = _Route["default"];
168
- return this.apiClient.callApi("/v1/projects/{projectUID}/routes/{routeUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
168
+ return this.apiClient.callApi('/v1/projects/{projectUID}/routes/{routeUID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
169
169
  }
170
170
 
171
171
  /**
172
172
  * Get single route within a project
173
- * @param {String} projectUID
174
- * @param {String} routeUID
173
+ * @param {String} projectUID
174
+ * @param {String} routeUID
175
175
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Route}
176
176
  */
177
177
  }, {
@@ -184,18 +184,18 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
184
184
 
185
185
  /**
186
186
  * Get Route Logs by Route UID
187
- * @param {String} projectUID
188
- * @param {String} routeUID
187
+ * @param {String} projectUID
188
+ * @param {String} routeUID
189
189
  * @param {Object} opts Optional parameters
190
190
  * @param {Number} opts.pageSize (default to 50)
191
191
  * @param {Number} opts.pageNum (default to 1)
192
- * @param {String} opts.deviceUID A Device UID.
192
+ * @param {Array.<String>} opts.deviceUID A Device UID.
193
193
  * @param {module:model/String} opts.sortBy (default to 'captured')
194
194
  * @param {module:model/String} opts.sortOrder (default to 'asc')
195
195
  * @param {Number} opts.startDate Unix timestamp
196
196
  * @param {Number} opts.endDate Unix timestamp
197
- * @param {Boolean} opts.systemFilesOnly
198
- * @param {String} opts.files
197
+ * @param {Boolean} opts.systemFilesOnly
198
+ * @param {String} opts.files
199
199
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/GetRouteLogsByRoute200ResponseInner>} and HTTP response
200
200
  */
201
201
  }, {
@@ -212,43 +212,43 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
212
212
  throw new _Error["default"]("Missing the required parameter 'routeUID' when calling getRouteLogsByRoute");
213
213
  }
214
214
  var pathParams = {
215
- projectUID: projectUID,
216
- routeUID: routeUID
215
+ 'projectUID': projectUID,
216
+ 'routeUID': routeUID
217
217
  };
218
218
  var queryParams = {
219
- pageSize: opts["pageSize"],
220
- pageNum: opts["pageNum"],
221
- deviceUID: opts["deviceUID"],
222
- sortBy: opts["sortBy"],
223
- sortOrder: opts["sortOrder"],
224
- startDate: opts["startDate"],
225
- endDate: opts["endDate"],
226
- systemFilesOnly: opts["systemFilesOnly"],
227
- files: opts["files"]
219
+ 'pageSize': opts['pageSize'],
220
+ 'pageNum': opts['pageNum'],
221
+ 'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
222
+ 'sortBy': opts['sortBy'],
223
+ 'sortOrder': opts['sortOrder'],
224
+ 'startDate': opts['startDate'],
225
+ 'endDate': opts['endDate'],
226
+ 'systemFilesOnly': opts['systemFilesOnly'],
227
+ 'files': opts['files']
228
228
  };
229
229
  var headerParams = {};
230
230
  var formParams = {};
231
- var authNames = ["api_key"];
231
+ var authNames = ['api_key'];
232
232
  var contentTypes = [];
233
- var accepts = ["application/json"];
233
+ var accepts = ['application/json'];
234
234
  var returnType = [_GetRouteLogsByRoute200ResponseInner["default"]];
235
- return this.apiClient.callApi("/v1/projects/{projectUID}/routes/{routeUID}/route-logs", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
235
+ return this.apiClient.callApi('/v1/projects/{projectUID}/routes/{routeUID}/route-logs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
236
236
  }
237
237
 
238
238
  /**
239
239
  * Get Route Logs by Route UID
240
- * @param {String} projectUID
241
- * @param {String} routeUID
240
+ * @param {String} projectUID
241
+ * @param {String} routeUID
242
242
  * @param {Object} opts Optional parameters
243
243
  * @param {Number} opts.pageSize (default to 50)
244
244
  * @param {Number} opts.pageNum (default to 1)
245
- * @param {String} opts.deviceUID A Device UID.
245
+ * @param {Array.<String>} opts.deviceUID A Device UID.
246
246
  * @param {module:model/String} opts.sortBy (default to 'captured')
247
247
  * @param {module:model/String} opts.sortOrder (default to 'asc')
248
248
  * @param {Number} opts.startDate Unix timestamp
249
249
  * @param {Number} opts.endDate Unix timestamp
250
- * @param {Boolean} opts.systemFilesOnly
251
- * @param {String} opts.files
250
+ * @param {Boolean} opts.systemFilesOnly
251
+ * @param {String} opts.files
252
252
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/GetRouteLogsByRoute200ResponseInner>}
253
253
  */
254
254
  }, {
@@ -261,7 +261,7 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
261
261
 
262
262
  /**
263
263
  * Get all Routes within a Project
264
- * @param {String} projectUID
264
+ * @param {String} projectUID
265
265
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/UserDbRoute>} and HTTP response
266
266
  */
267
267
  }, {
@@ -273,21 +273,21 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
273
273
  throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getRoutes");
274
274
  }
275
275
  var pathParams = {
276
- projectUID: projectUID
276
+ 'projectUID': projectUID
277
277
  };
278
278
  var queryParams = {};
279
279
  var headerParams = {};
280
280
  var formParams = {};
281
- var authNames = ["api_key"];
281
+ var authNames = ['api_key'];
282
282
  var contentTypes = [];
283
- var accepts = ["application/json"];
283
+ var accepts = ['application/json'];
284
284
  var returnType = [_UserDbRoute["default"]];
285
- return this.apiClient.callApi("/v1/projects/{projectUID}/routes", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
285
+ return this.apiClient.callApi('/v1/projects/{projectUID}/routes', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
286
286
  }
287
287
 
288
288
  /**
289
289
  * Get all Routes within a Project
290
- * @param {String} projectUID
290
+ * @param {String} projectUID
291
291
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/UserDbRoute>}
292
292
  */
293
293
  }, {
@@ -300,8 +300,8 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
300
300
 
301
301
  /**
302
302
  * Update route by UID
303
- * @param {String} projectUID
304
- * @param {String} routeUID
303
+ * @param {String} projectUID
304
+ * @param {String} routeUID
305
305
  * @param {module:model/Route} route Route settings to be updated
306
306
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Route} and HTTP response
307
307
  */
@@ -322,23 +322,23 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
322
322
  throw new _Error["default"]("Missing the required parameter 'route' when calling updateRoute");
323
323
  }
324
324
  var pathParams = {
325
- projectUID: projectUID,
326
- routeUID: routeUID
325
+ 'projectUID': projectUID,
326
+ 'routeUID': routeUID
327
327
  };
328
328
  var queryParams = {};
329
329
  var headerParams = {};
330
330
  var formParams = {};
331
- var authNames = ["api_key"];
332
- var contentTypes = ["application/json"];
333
- var accepts = ["application/json"];
331
+ var authNames = ['api_key'];
332
+ var contentTypes = ['application/json'];
333
+ var accepts = ['application/json'];
334
334
  var returnType = _Route["default"];
335
- return this.apiClient.callApi("/v1/projects/{projectUID}/routes/{routeUID}", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
335
+ return this.apiClient.callApi('/v1/projects/{projectUID}/routes/{routeUID}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
336
336
  }
337
337
 
338
338
  /**
339
339
  * Update route by UID
340
- * @param {String} projectUID
341
- * @param {String} routeUID
340
+ * @param {String} projectUID
341
+ * @param {String} routeUID
342
342
  * @param {module:model/Route} route Route settings to be updated
343
343
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Route}
344
344
  */
@@ -18,9 +18,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
20
  * Notehub API
21
- * The OpenAPI definition for the Notehub.io API.
21
+ * The OpenAPI definition for the Notehub.io API. Beta test change
22
22
  *
23
- * The version of the OpenAPI document: 1.1.0
23
+ * The version of the OpenAPI document: 1.1.2
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 Alert model module.
33
33
  * @module model/Alert
34
- * @version 1.0.21
34
+ * @version 1.0.23-beta.1
35
35
  */
36
36
  var Alert = /*#__PURE__*/function () {
37
37
  /**
@@ -64,38 +64,41 @@ var Alert = /*#__PURE__*/function () {
64
64
  value: function constructFromObject(data, obj) {
65
65
  if (data) {
66
66
  obj = obj || new Alert();
67
- if (data.hasOwnProperty("uid")) {
68
- obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
67
+ if (data.hasOwnProperty('uid')) {
68
+ obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
69
69
  }
70
- if (data.hasOwnProperty("monitor_uid")) {
71
- obj["monitor_uid"] = _ApiClient["default"].convertToType(data["monitor_uid"], "String");
70
+ if (data.hasOwnProperty('monitor_uid')) {
71
+ obj['monitor_uid'] = _ApiClient["default"].convertToType(data['monitor_uid'], 'String');
72
72
  }
73
- if (data.hasOwnProperty("device_uid")) {
74
- obj["device_uid"] = _ApiClient["default"].convertToType(data["device_uid"], "String");
73
+ if (data.hasOwnProperty('monitor_name')) {
74
+ obj['monitor_name'] = _ApiClient["default"].convertToType(data['monitor_name'], 'String');
75
75
  }
76
- if (data.hasOwnProperty("created_at")) {
77
- obj["created_at"] = _ApiClient["default"].convertToType(data["created_at"], "Number");
76
+ if (data.hasOwnProperty('device_uid')) {
77
+ obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
78
78
  }
79
- if (data.hasOwnProperty("value")) {
80
- obj["value"] = _ApiClient["default"].convertToType(data["value"], "Number");
79
+ if (data.hasOwnProperty('created_at')) {
80
+ obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Number');
81
81
  }
82
- if (data.hasOwnProperty("resolved")) {
83
- obj["resolved"] = _ApiClient["default"].convertToType(data["resolved"], "Boolean");
82
+ if (data.hasOwnProperty('value')) {
83
+ obj['value'] = _ApiClient["default"].convertToType(data['value'], 'Number');
84
84
  }
85
- if (data.hasOwnProperty("version")) {
86
- obj["version"] = _ApiClient["default"].convertToType(data["version"], "Number");
85
+ if (data.hasOwnProperty('resolved')) {
86
+ obj['resolved'] = _ApiClient["default"].convertToType(data['resolved'], 'Boolean');
87
87
  }
88
- if (data.hasOwnProperty("alert_source")) {
89
- obj["alert_source"] = _ApiClient["default"].convertToType(data["alert_source"], "String");
88
+ if (data.hasOwnProperty('version')) {
89
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'Number');
90
90
  }
91
- if (data.hasOwnProperty("source")) {
92
- obj["source"] = _ApiClient["default"].convertToType(data["source"], "String");
91
+ if (data.hasOwnProperty('alert_source')) {
92
+ obj['alert_source'] = _ApiClient["default"].convertToType(data['alert_source'], 'String');
93
93
  }
94
- if (data.hasOwnProperty("data")) {
95
- obj["data"] = _ApiClient["default"].convertToType(data["data"], [_AlertDataInner["default"]]);
94
+ if (data.hasOwnProperty('source')) {
95
+ obj['source'] = _ApiClient["default"].convertToType(data['source'], 'String');
96
96
  }
97
- if (data.hasOwnProperty("notifications")) {
98
- obj["notifications"] = _ApiClient["default"].convertToType(data["notifications"], [_AlertNotificationsInner["default"]]);
97
+ if (data.hasOwnProperty('data')) {
98
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AlertDataInner["default"]]);
99
+ }
100
+ if (data.hasOwnProperty('notifications')) {
101
+ obj['notifications'] = _ApiClient["default"].convertToType(data['notifications'], [_AlertNotificationsInner["default"]]);
99
102
  }
100
103
  } else if (data === null) {
101
104
  return null;
@@ -112,33 +115,37 @@ var Alert = /*#__PURE__*/function () {
112
115
  key: "validateJSON",
113
116
  value: function validateJSON(data) {
114
117
  // ensure the json data is a string
115
- if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
116
- throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
118
+ if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
119
+ throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
120
+ }
121
+ // ensure the json data is a string
122
+ if (data['monitor_uid'] && !(typeof data['monitor_uid'] === 'string' || data['monitor_uid'] instanceof String)) {
123
+ throw new Error("Expected the field `monitor_uid` to be a primitive type in the JSON string but got " + data['monitor_uid']);
117
124
  }
118
125
  // ensure the json data is a string
119
- if (data["monitor_uid"] && !(typeof data["monitor_uid"] === "string" || data["monitor_uid"] instanceof String)) {
120
- throw new Error("Expected the field `monitor_uid` to be a primitive type in the JSON string but got " + data["monitor_uid"]);
126
+ if (data['monitor_name'] && !(typeof data['monitor_name'] === 'string' || data['monitor_name'] instanceof String)) {
127
+ throw new Error("Expected the field `monitor_name` to be a primitive type in the JSON string but got " + data['monitor_name']);
121
128
  }
122
129
  // ensure the json data is a string
123
- if (data["device_uid"] && !(typeof data["device_uid"] === "string" || data["device_uid"] instanceof String)) {
124
- throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data["device_uid"]);
130
+ if (data['device_uid'] && !(typeof data['device_uid'] === 'string' || data['device_uid'] instanceof String)) {
131
+ throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data['device_uid']);
125
132
  }
126
133
  // ensure the json data is a string
127
- if (data["alert_source"] && !(typeof data["alert_source"] === "string" || data["alert_source"] instanceof String)) {
128
- throw new Error("Expected the field `alert_source` to be a primitive type in the JSON string but got " + data["alert_source"]);
134
+ if (data['alert_source'] && !(typeof data['alert_source'] === 'string' || data['alert_source'] instanceof String)) {
135
+ throw new Error("Expected the field `alert_source` to be a primitive type in the JSON string but got " + data['alert_source']);
129
136
  }
130
137
  // ensure the json data is a string
131
- if (data["source"] && !(typeof data["source"] === "string" || data["source"] instanceof String)) {
132
- throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data["source"]);
138
+ if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
139
+ throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
133
140
  }
134
- if (data["data"]) {
141
+ if (data['data']) {
135
142
  // data not null
136
143
  // ensure the json data is an array
137
- if (!Array.isArray(data["data"])) {
138
- throw new Error("Expected the field `data` to be an array in the JSON data but got " + data["data"]);
144
+ if (!Array.isArray(data['data'])) {
145
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
139
146
  }
140
147
  // validate the optional field `data` (array)
141
- var _iterator = _createForOfIteratorHelper(data["data"]),
148
+ var _iterator = _createForOfIteratorHelper(data['data']),
142
149
  _step;
143
150
  try {
144
151
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -150,15 +157,16 @@ var Alert = /*#__PURE__*/function () {
150
157
  } finally {
151
158
  _iterator.f();
152
159
  }
160
+ ;
153
161
  }
154
- if (data["notifications"]) {
162
+ if (data['notifications']) {
155
163
  // data not null
156
164
  // ensure the json data is an array
157
- if (!Array.isArray(data["notifications"])) {
158
- throw new Error("Expected the field `notifications` to be an array in the JSON data but got " + data["notifications"]);
165
+ if (!Array.isArray(data['notifications'])) {
166
+ throw new Error("Expected the field `notifications` to be an array in the JSON data but got " + data['notifications']);
159
167
  }
160
168
  // validate the optional field `notifications` (array)
161
- var _iterator2 = _createForOfIteratorHelper(data["notifications"]),
169
+ var _iterator2 = _createForOfIteratorHelper(data['notifications']),
162
170
  _step2;
163
171
  try {
164
172
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -170,6 +178,7 @@ var Alert = /*#__PURE__*/function () {
170
178
  } finally {
171
179
  _iterator2.f();
172
180
  }
181
+ ;
173
182
  }
174
183
  return true;
175
184
  }
@@ -179,81 +188,87 @@ var Alert = /*#__PURE__*/function () {
179
188
  * Alert UID
180
189
  * @member {String} uid
181
190
  */
182
- Alert.prototype["uid"] = undefined;
191
+ Alert.prototype['uid'] = undefined;
183
192
 
184
193
  /**
185
194
  * Monitor UID
186
195
  * @member {String} monitor_uid
187
196
  */
188
- Alert.prototype["monitor_uid"] = undefined;
197
+ Alert.prototype['monitor_uid'] = undefined;
198
+
199
+ /**
200
+ * Monitor Name
201
+ * @member {String} monitor_name
202
+ */
203
+ Alert.prototype['monitor_name'] = undefined;
189
204
 
190
205
  /**
191
206
  * Device UID
192
207
  * @member {String} device_uid
193
208
  */
194
- Alert.prototype["device_uid"] = undefined;
209
+ Alert.prototype['device_uid'] = undefined;
195
210
 
196
211
  /**
197
212
  * The time the alert was created
198
213
  * @member {Number} created_at
199
214
  */
200
- Alert.prototype["created_at"] = undefined;
215
+ Alert.prototype['created_at'] = undefined;
201
216
 
202
217
  /**
203
218
  * The value that triggered the alert
204
219
  * @member {Number} value
205
220
  */
206
- Alert.prototype["value"] = undefined;
221
+ Alert.prototype['value'] = undefined;
207
222
 
208
223
  /**
209
224
  * If true, the alert has been resolved
210
225
  * @member {Boolean} resolved
211
226
  */
212
- Alert.prototype["resolved"] = undefined;
227
+ Alert.prototype['resolved'] = undefined;
213
228
 
214
229
  /**
215
230
  * The version of the alert
216
231
  * @member {Number} version
217
232
  */
218
- Alert.prototype["version"] = undefined;
233
+ Alert.prototype['version'] = undefined;
219
234
 
220
235
  /**
221
236
  * The source of the alert
222
237
  * @member {module:model/Alert.AlertSourceEnum} alert_source
223
238
  */
224
- Alert.prototype["alert_source"] = undefined;
239
+ Alert.prototype['alert_source'] = undefined;
225
240
 
226
241
  /**
227
242
  * The UID of the source of the alert
228
243
  * @member {String} source
229
244
  */
230
- Alert.prototype["source"] = undefined;
245
+ Alert.prototype['source'] = undefined;
231
246
 
232
247
  /**
233
248
  * @member {Array.<module:model/AlertDataInner>} data
234
249
  */
235
- Alert.prototype["data"] = undefined;
250
+ Alert.prototype['data'] = undefined;
236
251
 
237
252
  /**
238
253
  * @member {Array.<module:model/AlertNotificationsInner>} notifications
239
254
  */
240
- Alert.prototype["notifications"] = undefined;
255
+ Alert.prototype['notifications'] = undefined;
241
256
 
242
257
  /**
243
258
  * Allowed values for the <code>alert_source</code> property.
244
259
  * @enum {String}
245
260
  * @readonly
246
261
  */
247
- Alert["AlertSourceEnum"] = {
262
+ Alert['AlertSourceEnum'] = {
248
263
  /**
249
264
  * value: "app"
250
265
  * @const
251
266
  */
252
- app: "app",
267
+ "app": "app",
253
268
  /**
254
269
  * value: "device"
255
270
  * @const
256
271
  */
257
- device: "device"
272
+ "device": "device"
258
273
  };
259
274
  var _default = exports["default"] = Alert;