@blues-inc/notehub-js 1.0.4
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 +297 -0
- package/dist/ApiClient.js +699 -0
- package/dist/api/AuthorizationApi.js +74 -0
- package/dist/api/BillingAccountApi.js +68 -0
- package/dist/api/DeviceApi.js +784 -0
- package/dist/api/DevicesApi.js +293 -0
- package/dist/api/EnvironmentVariablesApi.js +567 -0
- package/dist/api/EventApi.js +284 -0
- package/dist/api/FilesApi.js +193 -0
- package/dist/api/FleetApi.js +715 -0
- package/dist/api/NotesApi.js +435 -0
- package/dist/api/ProductApi.js +163 -0
- package/dist/api/ProjectApi.js +716 -0
- package/dist/api/RouteApi.js +266 -0
- package/dist/index.js +566 -0
- package/dist/model/Aws.js +233 -0
- package/dist/model/Azure.js +166 -0
- package/dist/model/BillingAccount.js +130 -0
- package/dist/model/BillingAccountRole.js +42 -0
- package/dist/model/Body.js +78 -0
- package/dist/model/Contact.js +118 -0
- package/dist/model/CreateFleetRequest.js +83 -0
- package/dist/model/CreateProductRequest.js +142 -0
- package/dist/model/CreateProjectRequest.js +119 -0
- package/dist/model/DFUEnv.js +97 -0
- package/dist/model/DFUState.js +276 -0
- package/dist/model/DeleteDeviceFleetsRequest.js +106 -0
- package/dist/model/Device.js +267 -0
- package/dist/model/DeviceSession.js +537 -0
- package/dist/model/DeviceTowerInfo.js +102 -0
- package/dist/model/DeviceUsage.js +150 -0
- package/dist/model/EnvironmentVariables.js +103 -0
- package/dist/model/Error.js +164 -0
- package/dist/model/Event.js +676 -0
- package/dist/model/Fleet.js +129 -0
- package/dist/model/GetBillingAccounts200Response.js +103 -0
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +117 -0
- package/dist/model/GetDeviceHealthLog200Response.js +123 -0
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +125 -0
- package/dist/model/GetDeviceLatest200Response.js +104 -0
- package/dist/model/GetDevicePublicKey200Response.js +119 -0
- package/dist/model/GetDeviceSessions200Response.js +133 -0
- package/dist/model/GetProjectDevicePublicKeys200Response.js +133 -0
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +94 -0
- package/dist/model/GetProjectDevices200Response.js +133 -0
- package/dist/model/GetProjectEvents200Response.js +149 -0
- package/dist/model/GetProjectEventsByCursor200Response.js +149 -0
- package/dist/model/GetProjectFleets200Response.js +123 -0
- package/dist/model/GetProjectMembers200Response.js +123 -0
- package/dist/model/GetProjectProducts200Response.js +103 -0
- package/dist/model/GetProjects200Response.js +103 -0
- package/dist/model/Google.js +142 -0
- package/dist/model/HandleNoteChanges200Response.js +97 -0
- package/dist/model/HandleNoteGet200Response.js +101 -0
- package/dist/model/HandleNoteSignal200Response.js +79 -0
- package/dist/model/HandleNotefileChanges200Response.js +97 -0
- package/dist/model/HandleNotefileChangesPending200Response.js +106 -0
- package/dist/model/HandleNotefileDeleteRequest.js +83 -0
- package/dist/model/Http.js +163 -0
- package/dist/model/HttpFilter.js +128 -0
- package/dist/model/HttpTransform.js +139 -0
- package/dist/model/Location.js +167 -0
- package/dist/model/Login200Response.js +82 -0
- package/dist/model/LoginRequest.js +94 -0
- package/dist/model/Mqtt.js +240 -0
- package/dist/model/Note.js +90 -0
- package/dist/model/Product.js +141 -0
- package/dist/model/Project.js +165 -0
- package/dist/model/ProjectMember.js +131 -0
- package/dist/model/Proxy.js +128 -0
- package/dist/model/PutDeviceFleetsRequest.js +106 -0
- package/dist/model/Radresponder.js +130 -0
- package/dist/model/Role.js +43 -0
- package/dist/model/Route.js +245 -0
- package/dist/model/RouteSchema.js +427 -0
- package/dist/model/Snowflake.js +185 -0
- package/dist/model/SnowflakeTransform.js +97 -0
- package/dist/model/Thingworx.js +154 -0
- package/dist/model/TowerLocation.js +204 -0
- package/dist/model/Twilio.js +181 -0
- package/dist/model/UpdateFleetRequest.js +109 -0
- package/dist/model/UserDbRoute.js +131 -0
- package/package.json +49 -0
|
@@ -0,0 +1,133 @@
|
|
|
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 _Device = _interopRequireDefault(require("./Device"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
/**
|
|
20
|
+
* The GetProjectDevices200Response model module.
|
|
21
|
+
* @module model/GetProjectDevices200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetProjectDevices200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetProjectDevices200Response</code>.
|
|
27
|
+
* @alias module:model/GetProjectDevices200Response
|
|
28
|
+
* @param devices {Array.<module:model/Device>}
|
|
29
|
+
* @param hasMore {Boolean}
|
|
30
|
+
*/
|
|
31
|
+
function GetProjectDevices200Response(devices, hasMore) {
|
|
32
|
+
_classCallCheck(this, GetProjectDevices200Response);
|
|
33
|
+
GetProjectDevices200Response.initialize(this, devices, hasMore);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Initializes the fields of this object.
|
|
38
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
39
|
+
* Only for internal use.
|
|
40
|
+
*/
|
|
41
|
+
_createClass(GetProjectDevices200Response, null, [{
|
|
42
|
+
key: "initialize",
|
|
43
|
+
value: function initialize(obj, devices, hasMore) {
|
|
44
|
+
obj['devices'] = devices;
|
|
45
|
+
obj['has_more'] = hasMore;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>GetProjectDevices200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
50
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
51
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
+
* @param {module:model/GetProjectDevices200Response} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/GetProjectDevices200Response} The populated <code>GetProjectDevices200Response</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new GetProjectDevices200Response();
|
|
60
|
+
if (data.hasOwnProperty('devices')) {
|
|
61
|
+
obj['devices'] = _ApiClient["default"].convertToType(data['devices'], [_Device["default"]]);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('has_more')) {
|
|
64
|
+
obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
|
|
65
|
+
}
|
|
66
|
+
} else if (data === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>GetProjectDevices200Response</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetProjectDevices200Response</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// check to make sure all required properties are present in the JSON string
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(GetProjectDevices200Response.RequiredProperties),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
|
+
var property = _step.value;
|
|
86
|
+
if (!data[property]) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_iterator.e(err);
|
|
92
|
+
} finally {
|
|
93
|
+
_iterator.f();
|
|
94
|
+
}
|
|
95
|
+
if (data['devices']) {
|
|
96
|
+
// data not null
|
|
97
|
+
// ensure the json data is an array
|
|
98
|
+
if (!Array.isArray(data['devices'])) {
|
|
99
|
+
throw new Error("Expected the field `devices` to be an array in the JSON data but got " + data['devices']);
|
|
100
|
+
}
|
|
101
|
+
// validate the optional field `devices` (array)
|
|
102
|
+
var _iterator2 = _createForOfIteratorHelper(data['devices']),
|
|
103
|
+
_step2;
|
|
104
|
+
try {
|
|
105
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
106
|
+
var item = _step2.value;
|
|
107
|
+
_Device["default"].validateJsonObject(item);
|
|
108
|
+
}
|
|
109
|
+
} catch (err) {
|
|
110
|
+
_iterator2.e(err);
|
|
111
|
+
} finally {
|
|
112
|
+
_iterator2.f();
|
|
113
|
+
}
|
|
114
|
+
;
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
}]);
|
|
119
|
+
return GetProjectDevices200Response;
|
|
120
|
+
}();
|
|
121
|
+
GetProjectDevices200Response.RequiredProperties = ["devices", "has_more"];
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @member {Array.<module:model/Device>} devices
|
|
125
|
+
*/
|
|
126
|
+
GetProjectDevices200Response.prototype['devices'] = undefined;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @member {Boolean} has_more
|
|
130
|
+
*/
|
|
131
|
+
GetProjectDevices200Response.prototype['has_more'] = undefined;
|
|
132
|
+
var _default = GetProjectDevices200Response;
|
|
133
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,149 @@
|
|
|
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 _Event = _interopRequireDefault(require("./Event"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
/**
|
|
20
|
+
* The GetProjectEvents200Response model module.
|
|
21
|
+
* @module model/GetProjectEvents200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetProjectEvents200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetProjectEvents200Response</code>.
|
|
27
|
+
* @alias module:model/GetProjectEvents200Response
|
|
28
|
+
* @param events {Array.<module:model/Event>}
|
|
29
|
+
* @param through {String} the EventUID of the most recent event displayed
|
|
30
|
+
* @param hasMore {Boolean} True if there are more events
|
|
31
|
+
*/
|
|
32
|
+
function GetProjectEvents200Response(events, through, hasMore) {
|
|
33
|
+
_classCallCheck(this, GetProjectEvents200Response);
|
|
34
|
+
GetProjectEvents200Response.initialize(this, events, through, hasMore);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Initializes the fields of this object.
|
|
39
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
40
|
+
* Only for internal use.
|
|
41
|
+
*/
|
|
42
|
+
_createClass(GetProjectEvents200Response, null, [{
|
|
43
|
+
key: "initialize",
|
|
44
|
+
value: function initialize(obj, events, through, hasMore) {
|
|
45
|
+
obj['events'] = events;
|
|
46
|
+
obj['through'] = through;
|
|
47
|
+
obj['has_more'] = hasMore;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>GetProjectEvents200Response</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/GetProjectEvents200Response} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/GetProjectEvents200Response} The populated <code>GetProjectEvents200Response</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new GetProjectEvents200Response();
|
|
62
|
+
if (data.hasOwnProperty('events')) {
|
|
63
|
+
obj['events'] = _ApiClient["default"].convertToType(data['events'], [_Event["default"]]);
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('through')) {
|
|
66
|
+
obj['through'] = _ApiClient["default"].convertToType(data['through'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('has_more')) {
|
|
69
|
+
obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
|
|
70
|
+
}
|
|
71
|
+
} else if (data === null) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>GetProjectEvents200Response</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetProjectEvents200Response</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(GetProjectEvents200Response.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data[property]) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (data['events']) {
|
|
101
|
+
// data not null
|
|
102
|
+
// ensure the json data is an array
|
|
103
|
+
if (!Array.isArray(data['events'])) {
|
|
104
|
+
throw new Error("Expected the field `events` to be an array in the JSON data but got " + data['events']);
|
|
105
|
+
}
|
|
106
|
+
// validate the optional field `events` (array)
|
|
107
|
+
var _iterator2 = _createForOfIteratorHelper(data['events']),
|
|
108
|
+
_step2;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
111
|
+
var item = _step2.value;
|
|
112
|
+
_Event["default"].validateJsonObject(item);
|
|
113
|
+
}
|
|
114
|
+
} catch (err) {
|
|
115
|
+
_iterator2.e(err);
|
|
116
|
+
} finally {
|
|
117
|
+
_iterator2.f();
|
|
118
|
+
}
|
|
119
|
+
;
|
|
120
|
+
}
|
|
121
|
+
// ensure the json data is a string
|
|
122
|
+
if (data['through'] && !(typeof data['through'] === 'string' || data['through'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `through` to be a primitive type in the JSON string but got " + data['through']);
|
|
124
|
+
}
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
}]);
|
|
128
|
+
return GetProjectEvents200Response;
|
|
129
|
+
}();
|
|
130
|
+
GetProjectEvents200Response.RequiredProperties = ["events", "through", "has_more"];
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @member {Array.<module:model/Event>} events
|
|
134
|
+
*/
|
|
135
|
+
GetProjectEvents200Response.prototype['events'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* the EventUID of the most recent event displayed
|
|
139
|
+
* @member {String} through
|
|
140
|
+
*/
|
|
141
|
+
GetProjectEvents200Response.prototype['through'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* True if there are more events
|
|
145
|
+
* @member {Boolean} has_more
|
|
146
|
+
*/
|
|
147
|
+
GetProjectEvents200Response.prototype['has_more'] = undefined;
|
|
148
|
+
var _default = GetProjectEvents200Response;
|
|
149
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,149 @@
|
|
|
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 _Event = _interopRequireDefault(require("./Event"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
/**
|
|
20
|
+
* The GetProjectEventsByCursor200Response model module.
|
|
21
|
+
* @module model/GetProjectEventsByCursor200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetProjectEventsByCursor200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetProjectEventsByCursor200Response</code>.
|
|
27
|
+
* @alias module:model/GetProjectEventsByCursor200Response
|
|
28
|
+
* @param events {Array.<module:model/Event>}
|
|
29
|
+
* @param nextCursor {String} The cursor value of the next result, which is intended to be used as the \"cursor\" parameter value of the next call to this method. An empty string is returned if there are no more results after this results set.
|
|
30
|
+
* @param hasMore {Boolean} True if there are more events
|
|
31
|
+
*/
|
|
32
|
+
function GetProjectEventsByCursor200Response(events, nextCursor, hasMore) {
|
|
33
|
+
_classCallCheck(this, GetProjectEventsByCursor200Response);
|
|
34
|
+
GetProjectEventsByCursor200Response.initialize(this, events, nextCursor, hasMore);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Initializes the fields of this object.
|
|
39
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
40
|
+
* Only for internal use.
|
|
41
|
+
*/
|
|
42
|
+
_createClass(GetProjectEventsByCursor200Response, null, [{
|
|
43
|
+
key: "initialize",
|
|
44
|
+
value: function initialize(obj, events, nextCursor, hasMore) {
|
|
45
|
+
obj['events'] = events;
|
|
46
|
+
obj['next_cursor'] = nextCursor;
|
|
47
|
+
obj['has_more'] = hasMore;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>GetProjectEventsByCursor200Response</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/GetProjectEventsByCursor200Response} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/GetProjectEventsByCursor200Response} The populated <code>GetProjectEventsByCursor200Response</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new GetProjectEventsByCursor200Response();
|
|
62
|
+
if (data.hasOwnProperty('events')) {
|
|
63
|
+
obj['events'] = _ApiClient["default"].convertToType(data['events'], [_Event["default"]]);
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('next_cursor')) {
|
|
66
|
+
obj['next_cursor'] = _ApiClient["default"].convertToType(data['next_cursor'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('has_more')) {
|
|
69
|
+
obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
|
|
70
|
+
}
|
|
71
|
+
} else if (data === null) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>GetProjectEventsByCursor200Response</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetProjectEventsByCursor200Response</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(GetProjectEventsByCursor200Response.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data[property]) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (data['events']) {
|
|
101
|
+
// data not null
|
|
102
|
+
// ensure the json data is an array
|
|
103
|
+
if (!Array.isArray(data['events'])) {
|
|
104
|
+
throw new Error("Expected the field `events` to be an array in the JSON data but got " + data['events']);
|
|
105
|
+
}
|
|
106
|
+
// validate the optional field `events` (array)
|
|
107
|
+
var _iterator2 = _createForOfIteratorHelper(data['events']),
|
|
108
|
+
_step2;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
111
|
+
var item = _step2.value;
|
|
112
|
+
_Event["default"].validateJsonObject(item);
|
|
113
|
+
}
|
|
114
|
+
} catch (err) {
|
|
115
|
+
_iterator2.e(err);
|
|
116
|
+
} finally {
|
|
117
|
+
_iterator2.f();
|
|
118
|
+
}
|
|
119
|
+
;
|
|
120
|
+
}
|
|
121
|
+
// ensure the json data is a string
|
|
122
|
+
if (data['next_cursor'] && !(typeof data['next_cursor'] === 'string' || data['next_cursor'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `next_cursor` to be a primitive type in the JSON string but got " + data['next_cursor']);
|
|
124
|
+
}
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
}]);
|
|
128
|
+
return GetProjectEventsByCursor200Response;
|
|
129
|
+
}();
|
|
130
|
+
GetProjectEventsByCursor200Response.RequiredProperties = ["events", "next_cursor", "has_more"];
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @member {Array.<module:model/Event>} events
|
|
134
|
+
*/
|
|
135
|
+
GetProjectEventsByCursor200Response.prototype['events'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The cursor value of the next result, which is intended to be used as the \"cursor\" parameter value of the next call to this method. An empty string is returned if there are no more results after this results set.
|
|
139
|
+
* @member {String} next_cursor
|
|
140
|
+
*/
|
|
141
|
+
GetProjectEventsByCursor200Response.prototype['next_cursor'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* True if there are more events
|
|
145
|
+
* @member {Boolean} has_more
|
|
146
|
+
*/
|
|
147
|
+
GetProjectEventsByCursor200Response.prototype['has_more'] = undefined;
|
|
148
|
+
var _default = GetProjectEventsByCursor200Response;
|
|
149
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,123 @@
|
|
|
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 _Fleet = _interopRequireDefault(require("./Fleet"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
/**
|
|
20
|
+
* The GetProjectFleets200Response model module.
|
|
21
|
+
* @module model/GetProjectFleets200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetProjectFleets200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetProjectFleets200Response</code>.
|
|
27
|
+
* @alias module:model/GetProjectFleets200Response
|
|
28
|
+
* @param fleets {Array.<module:model/Fleet>}
|
|
29
|
+
*/
|
|
30
|
+
function GetProjectFleets200Response(fleets) {
|
|
31
|
+
_classCallCheck(this, GetProjectFleets200Response);
|
|
32
|
+
GetProjectFleets200Response.initialize(this, fleets);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initializes the fields of this object.
|
|
37
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
38
|
+
* Only for internal use.
|
|
39
|
+
*/
|
|
40
|
+
_createClass(GetProjectFleets200Response, null, [{
|
|
41
|
+
key: "initialize",
|
|
42
|
+
value: function initialize(obj, fleets) {
|
|
43
|
+
obj['fleets'] = fleets;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Constructs a <code>GetProjectFleets200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
48
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
49
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
50
|
+
* @param {module:model/GetProjectFleets200Response} obj Optional instance to populate.
|
|
51
|
+
* @return {module:model/GetProjectFleets200Response} The populated <code>GetProjectFleets200Response</code> instance.
|
|
52
|
+
*/
|
|
53
|
+
}, {
|
|
54
|
+
key: "constructFromObject",
|
|
55
|
+
value: function constructFromObject(data, obj) {
|
|
56
|
+
if (data) {
|
|
57
|
+
obj = obj || new GetProjectFleets200Response();
|
|
58
|
+
if (data.hasOwnProperty('fleets')) {
|
|
59
|
+
obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], [_Fleet["default"]]);
|
|
60
|
+
}
|
|
61
|
+
} else if (data === null) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Validates the JSON data with respect to <code>GetProjectFleets200Response</code>.
|
|
69
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
70
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetProjectFleets200Response</code>.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "validateJSON",
|
|
74
|
+
value: function validateJSON(data) {
|
|
75
|
+
// check to make sure all required properties are present in the JSON string
|
|
76
|
+
var _iterator = _createForOfIteratorHelper(GetProjectFleets200Response.RequiredProperties),
|
|
77
|
+
_step;
|
|
78
|
+
try {
|
|
79
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
80
|
+
var property = _step.value;
|
|
81
|
+
if (!data[property]) {
|
|
82
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
} catch (err) {
|
|
86
|
+
_iterator.e(err);
|
|
87
|
+
} finally {
|
|
88
|
+
_iterator.f();
|
|
89
|
+
}
|
|
90
|
+
if (data['fleets']) {
|
|
91
|
+
// data not null
|
|
92
|
+
// ensure the json data is an array
|
|
93
|
+
if (!Array.isArray(data['fleets'])) {
|
|
94
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
|
|
95
|
+
}
|
|
96
|
+
// validate the optional field `fleets` (array)
|
|
97
|
+
var _iterator2 = _createForOfIteratorHelper(data['fleets']),
|
|
98
|
+
_step2;
|
|
99
|
+
try {
|
|
100
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
101
|
+
var item = _step2.value;
|
|
102
|
+
_Fleet["default"].validateJsonObject(item);
|
|
103
|
+
}
|
|
104
|
+
} catch (err) {
|
|
105
|
+
_iterator2.e(err);
|
|
106
|
+
} finally {
|
|
107
|
+
_iterator2.f();
|
|
108
|
+
}
|
|
109
|
+
;
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}]);
|
|
114
|
+
return GetProjectFleets200Response;
|
|
115
|
+
}();
|
|
116
|
+
GetProjectFleets200Response.RequiredProperties = ["fleets"];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @member {Array.<module:model/Fleet>} fleets
|
|
120
|
+
*/
|
|
121
|
+
GetProjectFleets200Response.prototype['fleets'] = undefined;
|
|
122
|
+
var _default = GetProjectFleets200Response;
|
|
123
|
+
exports["default"] = _default;
|