@blues-inc/notehub-js 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -95
- package/dist/ApiClient.js +18 -9
- package/dist/api/AlertApi.js +95 -0
- package/dist/api/AuthorizationApi.js +18 -9
- package/dist/api/BillingAccountApi.js +18 -9
- package/dist/api/DeviceApi.js +904 -182
- package/dist/api/EventApi.js +69 -16
- package/dist/api/FirmwareApi.js +109 -0
- package/dist/api/MonitorApi.js +275 -0
- package/dist/api/ProjectApi.js +471 -282
- package/dist/api/RouteApi.js +96 -9
- package/dist/index.js +76 -41
- package/dist/model/Alert.js +259 -0
- package/dist/model/AlertDataInner.js +184 -0
- package/dist/model/AlertNotificationsInner.js +132 -0
- package/dist/model/Aws.js +17 -8
- package/dist/model/Azure.js +17 -8
- package/dist/model/BillingAccount.js +17 -8
- package/dist/model/BillingAccountRole.js +29 -8
- package/dist/model/Body.js +17 -8
- package/dist/model/CloneProjectRequest.js +17 -8
- package/dist/model/Contact.js +17 -8
- package/dist/model/CreateFleetRequest.js +17 -8
- package/dist/model/CreateMonitor.js +428 -0
- package/dist/model/CreateProductRequest.js +17 -8
- package/dist/model/CreateProjectRequest.js +17 -8
- package/dist/model/DFUEnv.js +17 -8
- package/dist/model/DFUState.js +17 -8
- package/dist/model/DeleteDeviceFleetsRequest.js +17 -8
- package/dist/model/Device.js +21 -14
- package/dist/model/DeviceSession.js +17 -8
- package/dist/model/DeviceTowerInfo.js +17 -8
- package/dist/model/DeviceUsage.js +17 -8
- package/dist/model/EnvironmentVariables.js +17 -8
- package/dist/model/Error.js +17 -8
- package/dist/model/Event.js +17 -8
- package/dist/model/FirmwareInfo.js +231 -0
- package/dist/model/Fleet.js +17 -8
- package/dist/model/GetAlerts200Response.js +143 -0
- package/dist/model/GetBillingAccounts200Response.js +17 -8
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +17 -8
- package/dist/model/GetDeviceHealthLog200Response.js +17 -8
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +17 -8
- package/dist/model/GetDeviceLatest200Response.js +17 -8
- package/dist/model/GetDevicePublicKey200Response.js +17 -8
- package/dist/model/GetDeviceSessions200Response.js +17 -8
- package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -8
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +17 -8
- package/dist/model/GetProjectDevices200Response.js +17 -8
- package/dist/model/GetProjectEvents200Response.js +21 -27
- package/dist/model/GetProjectEventsByCursor200Response.js +17 -8
- package/dist/model/GetProjectFleets200Response.js +17 -8
- package/dist/model/GetProjectMembers200Response.js +17 -8
- package/dist/model/GetProjectProducts200Response.js +17 -8
- package/dist/model/GetProjects200Response.js +17 -8
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +17 -8
- package/dist/model/Google.js +17 -8
- package/dist/model/HandleNoteChanges200Response.js +17 -8
- package/dist/model/HandleNoteGet200Response.js +17 -8
- package/dist/model/HandleNoteSignal200Response.js +17 -8
- package/dist/model/HandleNotefileChanges200Response.js +17 -8
- package/dist/model/HandleNotefileChangesPending200Response.js +17 -8
- package/dist/model/HandleNotefileDeleteRequest.js +17 -8
- package/dist/model/Http.js +17 -8
- package/dist/model/HttpFilter.js +17 -8
- package/dist/model/HttpTransform.js +17 -8
- package/dist/model/Location.js +17 -8
- package/dist/model/Login200Response.js +17 -8
- package/dist/model/LoginRequest.js +17 -8
- package/dist/model/Monitor.js +328 -0
- package/dist/model/MonitorAlertRoutesInner.js +92 -0
- package/dist/model/MonitorThresholds.js +88 -0
- package/dist/model/Mqtt.js +17 -8
- package/dist/model/Note.js +17 -8
- package/dist/model/PostProvisionProjectDeviceRequest.js +17 -8
- package/dist/model/Product.js +17 -8
- package/dist/model/Project.js +17 -8
- package/dist/model/ProjectMember.js +17 -8
- package/dist/model/Proxy.js +17 -8
- package/dist/model/PutDeviceFleetsRequest.js +17 -8
- package/dist/model/Radresponder.js +17 -8
- package/dist/model/Role.js +37 -8
- package/dist/model/Route.js +17 -8
- package/dist/model/RouteSchema.js +29 -14
- package/dist/model/Slack.js +17 -8
- package/dist/model/Snowflake.js +17 -8
- package/dist/model/SnowflakeTransform.js +17 -8
- package/dist/model/Thingworx.js +17 -8
- package/dist/model/TowerLocation.js +17 -8
- package/dist/model/Twilio.js +17 -8
- package/dist/model/UpdateFleetRequest.js +17 -8
- package/dist/model/UserDbRoute.js +17 -8
- package/package.json +1 -1
- package/dist/api/DevicesApi.js +0 -346
- package/dist/api/EnvironmentVariablesApi.js +0 -567
- package/dist/api/FilesApi.js +0 -193
- package/dist/api/FleetApi.js +0 -736
- package/dist/api/NotesApi.js +0 -435
- package/dist/api/ProductApi.js +0 -163
- package/dist/api/RouteLogsApi.js +0 -160
|
@@ -6,19 +6,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function _typeof(
|
|
9
|
+
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); }
|
|
10
10
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(
|
|
17
|
-
function _toPrimitive(
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
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); } /**
|
|
18
|
+
* Notehub API
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document: 1.0.0
|
|
22
|
+
* Contact: engineering@blues.io
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
18
29
|
/**
|
|
19
30
|
* The EnvironmentVariables model module.
|
|
20
31
|
* @module model/EnvironmentVariables
|
|
21
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.20
|
|
22
33
|
*/
|
|
23
34
|
var EnvironmentVariables = /*#__PURE__*/function () {
|
|
24
35
|
/**
|
|
@@ -36,7 +47,7 @@ var EnvironmentVariables = /*#__PURE__*/function () {
|
|
|
36
47
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
37
48
|
* Only for internal use.
|
|
38
49
|
*/
|
|
39
|
-
_createClass(EnvironmentVariables, null, [{
|
|
50
|
+
return _createClass(EnvironmentVariables, null, [{
|
|
40
51
|
key: "initialize",
|
|
41
52
|
value: function initialize(obj, environmentVariables) {
|
|
42
53
|
obj["environment_variables"] = environmentVariables;
|
|
@@ -91,7 +102,6 @@ var EnvironmentVariables = /*#__PURE__*/function () {
|
|
|
91
102
|
return true;
|
|
92
103
|
}
|
|
93
104
|
}]);
|
|
94
|
-
return EnvironmentVariables;
|
|
95
105
|
}();
|
|
96
106
|
EnvironmentVariables.RequiredProperties = ["environment_variables"];
|
|
97
107
|
|
|
@@ -99,5 +109,4 @@ EnvironmentVariables.RequiredProperties = ["environment_variables"];
|
|
|
99
109
|
* @member {Object.<String, String>} environment_variables
|
|
100
110
|
*/
|
|
101
111
|
EnvironmentVariables.prototype["environment_variables"] = undefined;
|
|
102
|
-
var _default = EnvironmentVariables;
|
|
103
|
-
exports["default"] = _default;
|
|
112
|
+
var _default = exports["default"] = EnvironmentVariables;
|
package/dist/model/Error.js
CHANGED
|
@@ -6,19 +6,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function _typeof(
|
|
9
|
+
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); }
|
|
10
10
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(
|
|
17
|
-
function _toPrimitive(
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
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); } /**
|
|
18
|
+
* Notehub API
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document: 1.0.0
|
|
22
|
+
* Contact: engineering@blues.io
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
18
29
|
/**
|
|
19
30
|
* The Error model module.
|
|
20
31
|
* @module model/Error
|
|
21
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.20
|
|
22
33
|
*/
|
|
23
34
|
var Error = /*#__PURE__*/function () {
|
|
24
35
|
/**
|
|
@@ -38,7 +49,7 @@ var Error = /*#__PURE__*/function () {
|
|
|
38
49
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
39
50
|
* Only for internal use.
|
|
40
51
|
*/
|
|
41
|
-
_createClass(Error, null, [{
|
|
52
|
+
return _createClass(Error, null, [{
|
|
42
53
|
key: "initialize",
|
|
43
54
|
value: function initialize(obj, err, code, status) {
|
|
44
55
|
obj["err"] = err;
|
|
@@ -124,7 +135,6 @@ var Error = /*#__PURE__*/function () {
|
|
|
124
135
|
return true;
|
|
125
136
|
}
|
|
126
137
|
}]);
|
|
127
|
-
return Error;
|
|
128
138
|
}();
|
|
129
139
|
Error.RequiredProperties = ["err", "code", "status"];
|
|
130
140
|
|
|
@@ -160,5 +170,4 @@ Error.prototype["details"] = undefined;
|
|
|
160
170
|
* @member {String} debug
|
|
161
171
|
*/
|
|
162
172
|
Error.prototype["debug"] = undefined;
|
|
163
|
-
var _default = Error;
|
|
164
|
-
exports["default"] = _default;
|
|
173
|
+
var _default = exports["default"] = Error;
|
package/dist/model/Event.js
CHANGED
|
@@ -6,16 +6,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function _typeof(
|
|
9
|
+
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); }
|
|
10
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
11
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); } /**
|
|
15
|
+
* Notehub API
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: 1.0.0
|
|
19
|
+
* Contact: engineering@blues.io
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
15
26
|
/**
|
|
16
27
|
* The Event model module.
|
|
17
28
|
* @module model/Event
|
|
18
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.20
|
|
19
30
|
*/
|
|
20
31
|
var Event = /*#__PURE__*/function () {
|
|
21
32
|
/**
|
|
@@ -32,7 +43,7 @@ var Event = /*#__PURE__*/function () {
|
|
|
32
43
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
44
|
* Only for internal use.
|
|
34
45
|
*/
|
|
35
|
-
_createClass(Event, null, [{
|
|
46
|
+
return _createClass(Event, null, [{
|
|
36
47
|
key: "initialize",
|
|
37
48
|
value: function initialize(obj) {}
|
|
38
49
|
|
|
@@ -342,7 +353,6 @@ var Event = /*#__PURE__*/function () {
|
|
|
342
353
|
return true;
|
|
343
354
|
}
|
|
344
355
|
}]);
|
|
345
|
-
return Event;
|
|
346
356
|
}();
|
|
347
357
|
/**
|
|
348
358
|
* Event UID (globally unique)
|
|
@@ -672,5 +682,4 @@ Event.prototype["temp"] = undefined;
|
|
|
672
682
|
* @member {Object} environment
|
|
673
683
|
*/
|
|
674
684
|
Event.prototype["environment"] = undefined;
|
|
675
|
-
var _default = Event;
|
|
676
|
-
exports["default"] = _default;
|
|
685
|
+
var _default = exports["default"] = Event;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
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); }
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); } /**
|
|
15
|
+
* Notehub API
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: 1.0.0
|
|
19
|
+
* Contact: engineering@blues.io
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The FirmwareInfo model module.
|
|
28
|
+
* @module model/FirmwareInfo
|
|
29
|
+
* @version 1.0.20
|
|
30
|
+
*/
|
|
31
|
+
var FirmwareInfo = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>FirmwareInfo</code>.
|
|
34
|
+
* @alias module:model/FirmwareInfo
|
|
35
|
+
*/
|
|
36
|
+
function FirmwareInfo() {
|
|
37
|
+
_classCallCheck(this, FirmwareInfo);
|
|
38
|
+
FirmwareInfo.initialize(this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
return _createClass(FirmwareInfo, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>FirmwareInfo</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/FirmwareInfo} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/FirmwareInfo} The populated <code>FirmwareInfo</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new FirmwareInfo();
|
|
62
|
+
if (data.hasOwnProperty("filename")) {
|
|
63
|
+
obj["filename"] = _ApiClient["default"].convertToType(data["filename"], "String");
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty("version")) {
|
|
66
|
+
obj["version"] = _ApiClient["default"].convertToType(data["version"], "String");
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty("MD5")) {
|
|
69
|
+
obj["MD5"] = _ApiClient["default"].convertToType(data["MD5"], "String");
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty("organization")) {
|
|
72
|
+
obj["organization"] = _ApiClient["default"].convertToType(data["organization"], "String");
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty("built")) {
|
|
75
|
+
obj["built"] = _ApiClient["default"].convertToType(data["built"], "String");
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty("product")) {
|
|
78
|
+
obj["product"] = _ApiClient["default"].convertToType(data["product"], "String");
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty("description")) {
|
|
81
|
+
obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty("tags")) {
|
|
84
|
+
obj["tags"] = _ApiClient["default"].convertToType(data["tags"], "String");
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty("type")) {
|
|
87
|
+
obj["type"] = _ApiClient["default"].convertToType(data["type"], "String");
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty("created")) {
|
|
90
|
+
obj["created"] = _ApiClient["default"].convertToType(data["created"], "String");
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty("target")) {
|
|
93
|
+
obj["target"] = _ApiClient["default"].convertToType(data["target"], "String");
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty("published")) {
|
|
96
|
+
obj["published"] = _ApiClient["default"].convertToType(data["published"], "Boolean");
|
|
97
|
+
}
|
|
98
|
+
} else if (data === null) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
return obj;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Validates the JSON data with respect to <code>FirmwareInfo</code>.
|
|
106
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
107
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>FirmwareInfo</code>.
|
|
108
|
+
*/
|
|
109
|
+
}, {
|
|
110
|
+
key: "validateJSON",
|
|
111
|
+
value: function validateJSON(data) {
|
|
112
|
+
// ensure the json data is a string
|
|
113
|
+
if (data["filename"] && !(typeof data["filename"] === "string" || data["filename"] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data["filename"]);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data["version"] && !(typeof data["version"] === "string" || data["version"] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data["version"]);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data["MD5"] && !(typeof data["MD5"] === "string" || data["MD5"] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `MD5` to be a primitive type in the JSON string but got " + data["MD5"]);
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is a string
|
|
125
|
+
if (data["organization"] && !(typeof data["organization"] === "string" || data["organization"] instanceof String)) {
|
|
126
|
+
throw new Error("Expected the field `organization` to be a primitive type in the JSON string but got " + data["organization"]);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is a string
|
|
129
|
+
if (data["built"] && !(typeof data["built"] === "string" || data["built"] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `built` to be a primitive type in the JSON string but got " + data["built"]);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data["product"] && !(typeof data["product"] === "string" || data["product"] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `product` to be a primitive type in the JSON string but got " + data["product"]);
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
|
|
138
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
|
|
139
|
+
}
|
|
140
|
+
// ensure the json data is a string
|
|
141
|
+
if (data["tags"] && !(typeof data["tags"] === "string" || data["tags"] instanceof String)) {
|
|
142
|
+
throw new Error("Expected the field `tags` to be a primitive type in the JSON string but got " + data["tags"]);
|
|
143
|
+
}
|
|
144
|
+
// ensure the json data is a string
|
|
145
|
+
if (data["type"] && !(typeof data["type"] === "string" || data["type"] instanceof String)) {
|
|
146
|
+
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data["type"]);
|
|
147
|
+
}
|
|
148
|
+
// ensure the json data is a string
|
|
149
|
+
if (data["created"] && !(typeof data["created"] === "string" || data["created"] instanceof String)) {
|
|
150
|
+
throw new Error("Expected the field `created` to be a primitive type in the JSON string but got " + data["created"]);
|
|
151
|
+
}
|
|
152
|
+
// ensure the json data is a string
|
|
153
|
+
if (data["target"] && !(typeof data["target"] === "string" || data["target"] instanceof String)) {
|
|
154
|
+
throw new Error("Expected the field `target` to be a primitive type in the JSON string but got " + data["target"]);
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
}]);
|
|
159
|
+
}();
|
|
160
|
+
/**
|
|
161
|
+
* The name of the firmware file.
|
|
162
|
+
* @member {String} filename
|
|
163
|
+
*/
|
|
164
|
+
FirmwareInfo.prototype["filename"] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The version of the firmware.
|
|
168
|
+
* @member {String} version
|
|
169
|
+
*/
|
|
170
|
+
FirmwareInfo.prototype["version"] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The MD5 hash of the firmware file.
|
|
174
|
+
* @member {String} MD5
|
|
175
|
+
*/
|
|
176
|
+
FirmwareInfo.prototype["MD5"] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The organization that owns the firmware.
|
|
180
|
+
* @member {String} organization
|
|
181
|
+
*/
|
|
182
|
+
FirmwareInfo.prototype["organization"] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The date the firmware was built.
|
|
186
|
+
* @member {String} built
|
|
187
|
+
*/
|
|
188
|
+
FirmwareInfo.prototype["built"] = undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The product that the firmware is for.
|
|
192
|
+
* @member {String} product
|
|
193
|
+
*/
|
|
194
|
+
FirmwareInfo.prototype["product"] = undefined;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A description of the firmware.
|
|
198
|
+
* @member {String} description
|
|
199
|
+
*/
|
|
200
|
+
FirmwareInfo.prototype["description"] = undefined;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* A list of tags associated with the firmware.
|
|
204
|
+
* @member {String} tags
|
|
205
|
+
*/
|
|
206
|
+
FirmwareInfo.prototype["tags"] = undefined;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The type of firmware.
|
|
210
|
+
* @member {String} type
|
|
211
|
+
*/
|
|
212
|
+
FirmwareInfo.prototype["type"] = undefined;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* The date the firmware was created.
|
|
216
|
+
* @member {String} created
|
|
217
|
+
*/
|
|
218
|
+
FirmwareInfo.prototype["created"] = undefined;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The target device for the firmware.
|
|
222
|
+
* @member {String} target
|
|
223
|
+
*/
|
|
224
|
+
FirmwareInfo.prototype["target"] = undefined;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* True if the firmware is published.
|
|
228
|
+
* @member {Boolean} published
|
|
229
|
+
*/
|
|
230
|
+
FirmwareInfo.prototype["published"] = undefined;
|
|
231
|
+
var _default = exports["default"] = FirmwareInfo;
|
package/dist/model/Fleet.js
CHANGED
|
@@ -6,19 +6,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function _typeof(
|
|
9
|
+
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); }
|
|
10
10
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(
|
|
17
|
-
function _toPrimitive(
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
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); } /**
|
|
18
|
+
* Notehub API
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document: 1.0.0
|
|
22
|
+
* Contact: engineering@blues.io
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
18
29
|
/**
|
|
19
30
|
* The Fleet model module.
|
|
20
31
|
* @module model/Fleet
|
|
21
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.20
|
|
22
33
|
*/
|
|
23
34
|
var Fleet = /*#__PURE__*/function () {
|
|
24
35
|
/**
|
|
@@ -38,7 +49,7 @@ var Fleet = /*#__PURE__*/function () {
|
|
|
38
49
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
39
50
|
* Only for internal use.
|
|
40
51
|
*/
|
|
41
|
-
_createClass(Fleet, null, [{
|
|
52
|
+
return _createClass(Fleet, null, [{
|
|
42
53
|
key: "initialize",
|
|
43
54
|
value: function initialize(obj, uid, label, created) {
|
|
44
55
|
obj["uid"] = uid;
|
|
@@ -107,7 +118,6 @@ var Fleet = /*#__PURE__*/function () {
|
|
|
107
118
|
return true;
|
|
108
119
|
}
|
|
109
120
|
}]);
|
|
110
|
-
return Fleet;
|
|
111
121
|
}();
|
|
112
122
|
Fleet.RequiredProperties = ["uid", "label", "created"];
|
|
113
123
|
|
|
@@ -125,5 +135,4 @@ Fleet.prototype["label"] = undefined;
|
|
|
125
135
|
* @member {Date} created
|
|
126
136
|
*/
|
|
127
137
|
Fleet.prototype["created"] = undefined;
|
|
128
|
-
var _default = Fleet;
|
|
129
|
-
exports["default"] = _default;
|
|
138
|
+
var _default = exports["default"] = Fleet;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Alert = _interopRequireDefault(require("./Alert"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
+
* Notehub API
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document: 1.0.0
|
|
23
|
+
* Contact: engineering@blues.io
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The GetAlerts200Response model module.
|
|
32
|
+
* @module model/GetAlerts200Response
|
|
33
|
+
* @version 1.0.20
|
|
34
|
+
*/
|
|
35
|
+
var GetAlerts200Response = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>GetAlerts200Response</code>.
|
|
38
|
+
* @alias module:model/GetAlerts200Response
|
|
39
|
+
* @param alerts {Array.<module:model/Alert>} The list of alerts
|
|
40
|
+
* @param hasMore {Boolean} True if there are more alerts
|
|
41
|
+
*/
|
|
42
|
+
function GetAlerts200Response(alerts, hasMore) {
|
|
43
|
+
_classCallCheck(this, GetAlerts200Response);
|
|
44
|
+
GetAlerts200Response.initialize(this, alerts, hasMore);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(GetAlerts200Response, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, alerts, hasMore) {
|
|
55
|
+
obj["alerts"] = alerts;
|
|
56
|
+
obj["has_more"] = hasMore;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>GetAlerts200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
61
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @param {module:model/GetAlerts200Response} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/GetAlerts200Response} The populated <code>GetAlerts200Response</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new GetAlerts200Response();
|
|
71
|
+
if (data.hasOwnProperty("alerts")) {
|
|
72
|
+
obj["alerts"] = _ApiClient["default"].convertToType(data["alerts"], [_Alert["default"]]);
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty("has_more")) {
|
|
75
|
+
obj["has_more"] = _ApiClient["default"].convertToType(data["has_more"], "Boolean");
|
|
76
|
+
}
|
|
77
|
+
} else if (data === null) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Validates the JSON data with respect to <code>GetAlerts200Response</code>.
|
|
85
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
86
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetAlerts200Response</code>.
|
|
87
|
+
*/
|
|
88
|
+
}, {
|
|
89
|
+
key: "validateJSON",
|
|
90
|
+
value: function validateJSON(data) {
|
|
91
|
+
// check to make sure all required properties are present in the JSON string
|
|
92
|
+
var _iterator = _createForOfIteratorHelper(GetAlerts200Response.RequiredProperties),
|
|
93
|
+
_step;
|
|
94
|
+
try {
|
|
95
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
96
|
+
var property = _step.value;
|
|
97
|
+
if (!data[property]) {
|
|
98
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_iterator.e(err);
|
|
103
|
+
} finally {
|
|
104
|
+
_iterator.f();
|
|
105
|
+
}
|
|
106
|
+
if (data["alerts"]) {
|
|
107
|
+
// data not null
|
|
108
|
+
// ensure the json data is an array
|
|
109
|
+
if (!Array.isArray(data["alerts"])) {
|
|
110
|
+
throw new Error("Expected the field `alerts` to be an array in the JSON data but got " + data["alerts"]);
|
|
111
|
+
}
|
|
112
|
+
// validate the optional field `alerts` (array)
|
|
113
|
+
var _iterator2 = _createForOfIteratorHelper(data["alerts"]),
|
|
114
|
+
_step2;
|
|
115
|
+
try {
|
|
116
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
117
|
+
var item = _step2.value;
|
|
118
|
+
_Alert["default"].validateJsonObject(item);
|
|
119
|
+
}
|
|
120
|
+
} catch (err) {
|
|
121
|
+
_iterator2.e(err);
|
|
122
|
+
} finally {
|
|
123
|
+
_iterator2.f();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}]);
|
|
129
|
+
}();
|
|
130
|
+
GetAlerts200Response.RequiredProperties = ["alerts", "has_more"];
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The list of alerts
|
|
134
|
+
* @member {Array.<module:model/Alert>} alerts
|
|
135
|
+
*/
|
|
136
|
+
GetAlerts200Response.prototype["alerts"] = undefined;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* True if there are more alerts
|
|
140
|
+
* @member {Boolean} has_more
|
|
141
|
+
*/
|
|
142
|
+
GetAlerts200Response.prototype["has_more"] = undefined;
|
|
143
|
+
var _default = exports["default"] = GetAlerts200Response;
|