@blues-inc/notehub-js 1.0.10 → 1.0.12
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 +175 -180
- package/dist/ApiClient.js +155 -155
- package/dist/api/AuthorizationApi.js +15 -15
- package/dist/api/BillingAccountApi.js +13 -13
- package/dist/api/DeviceApi.js +157 -157
- package/dist/api/DevicesApi.js +58 -58
- package/dist/api/EnvironmentVariablesApi.js +110 -110
- package/dist/api/EventApi.js +94 -94
- package/dist/api/FilesApi.js +42 -42
- package/dist/api/FleetApi.js +160 -160
- package/dist/api/NotesApi.js +105 -105
- package/dist/api/ProductApi.js +29 -29
- package/dist/api/ProjectApi.js +137 -137
- package/dist/api/RouteApi.js +51 -51
- package/dist/index.js +14 -0
- package/dist/model/Aws.js +64 -64
- package/dist/model/Azure.js +42 -42
- package/dist/model/BillingAccount.js +20 -20
- package/dist/model/Body.js +4 -4
- package/dist/model/Contact.js +21 -21
- package/dist/model/CreateFleetRequest.js +6 -6
- package/dist/model/CreateProductRequest.js +21 -21
- package/dist/model/CreateProjectRequest.js +13 -13
- package/dist/model/DFUEnv.js +11 -11
- package/dist/model/DFUState.js +64 -64
- package/dist/model/DeleteDeviceFleetsRequest.js +7 -7
- package/dist/model/Device.js +82 -82
- package/dist/model/DeviceSession.js +181 -181
- package/dist/model/DeviceTowerInfo.js +13 -13
- package/dist/model/DeviceUsage.js +31 -31
- package/dist/model/Edgeimpulse.js +214 -0
- package/dist/model/EdgeimpulseSensorsInner.js +106 -0
- package/dist/model/EnvironmentVariables.js +7 -7
- package/dist/model/Error.js +30 -30
- package/dist/model/Event.js +222 -222
- package/dist/model/Fleet.js +20 -20
- package/dist/model/GetBillingAccounts200Response.js +8 -9
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +11 -11
- package/dist/model/GetDeviceHealthLog200Response.js +10 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +18 -18
- package/dist/model/GetDeviceLatest200Response.js +8 -9
- package/dist/model/GetDevicePublicKey200Response.js +15 -15
- package/dist/model/GetDeviceSessions200Response.js +15 -16
- package/dist/model/GetProjectDevicePublicKeys200Response.js +15 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +11 -11
- package/dist/model/GetProjectDevices200Response.js +15 -16
- package/dist/model/GetProjectEvents200Response.js +20 -21
- package/dist/model/GetProjectEventsByCursor200Response.js +22 -23
- package/dist/model/GetProjectFleets200Response.js +10 -11
- package/dist/model/GetProjectMembers200Response.js +10 -11
- package/dist/model/GetProjectProducts200Response.js +8 -9
- package/dist/model/GetProjects200Response.js +8 -9
- package/dist/model/Google.js +27 -27
- package/dist/model/HandleNoteChanges200Response.js +10 -10
- package/dist/model/HandleNoteGet200Response.js +12 -12
- package/dist/model/HandleNoteSignal200Response.js +4 -4
- package/dist/model/HandleNotefileChanges200Response.js +10 -10
- package/dist/model/HandleNotefileChangesPending200Response.js +13 -13
- package/dist/model/HandleNotefileDeleteRequest.js +6 -6
- package/dist/model/Http.js +34 -34
- package/dist/model/HttpFilter.js +18 -18
- package/dist/model/HttpTransform.js +19 -19
- package/dist/model/Location.js +39 -39
- package/dist/model/Login200Response.js +6 -6
- package/dist/model/LoginRequest.js +11 -11
- package/dist/model/Mqtt.js +65 -65
- package/dist/model/Note.js +9 -9
- package/dist/model/Product.js +25 -25
- package/dist/model/Project.js +33 -33
- package/dist/model/ProjectMember.js +21 -21
- package/dist/model/Proxy.js +23 -23
- package/dist/model/PutDeviceFleetsRequest.js +7 -7
- package/dist/model/Radresponder.js +24 -24
- package/dist/model/Route.js +40 -35
- package/dist/model/RouteSchema.js +39 -38
- package/dist/model/Snowflake.js +44 -44
- package/dist/model/SnowflakeTransform.js +11 -11
- package/dist/model/Thingworx.js +32 -32
- package/dist/model/TowerLocation.js +51 -51
- package/dist/model/Twilio.js +42 -42
- package/dist/model/UpdateFleetRequest.js +16 -16
- package/dist/model/UserDbRoute.js +24 -24
- package/package.json +3 -3
|
@@ -15,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
15
|
/**
|
|
16
16
|
* The DeviceTowerInfo model module.
|
|
17
17
|
* @module model/DeviceTowerInfo
|
|
18
|
-
* @version 1.0.
|
|
18
|
+
* @version 1.0.12
|
|
19
19
|
*/
|
|
20
20
|
var DeviceTowerInfo = /*#__PURE__*/function () {
|
|
21
21
|
/**
|
|
@@ -48,17 +48,17 @@ var DeviceTowerInfo = /*#__PURE__*/function () {
|
|
|
48
48
|
value: function constructFromObject(data, obj) {
|
|
49
49
|
if (data) {
|
|
50
50
|
obj = obj || new DeviceTowerInfo();
|
|
51
|
-
if (data.hasOwnProperty(
|
|
52
|
-
obj[
|
|
51
|
+
if (data.hasOwnProperty("mcc")) {
|
|
52
|
+
obj["mcc"] = _ApiClient["default"].convertToType(data["mcc"], "Number");
|
|
53
53
|
}
|
|
54
|
-
if (data.hasOwnProperty(
|
|
55
|
-
obj[
|
|
54
|
+
if (data.hasOwnProperty("mnc")) {
|
|
55
|
+
obj["mnc"] = _ApiClient["default"].convertToType(data["mnc"], "Number");
|
|
56
56
|
}
|
|
57
|
-
if (data.hasOwnProperty(
|
|
58
|
-
obj[
|
|
57
|
+
if (data.hasOwnProperty("lac")) {
|
|
58
|
+
obj["lac"] = _ApiClient["default"].convertToType(data["lac"], "Number");
|
|
59
59
|
}
|
|
60
|
-
if (data.hasOwnProperty(
|
|
61
|
-
obj[
|
|
60
|
+
if (data.hasOwnProperty("cell_id")) {
|
|
61
|
+
obj["cell_id"] = _ApiClient["default"].convertToType(data["cell_id"], "Number");
|
|
62
62
|
}
|
|
63
63
|
} else if (data === null) {
|
|
64
64
|
return null;
|
|
@@ -82,21 +82,21 @@ var DeviceTowerInfo = /*#__PURE__*/function () {
|
|
|
82
82
|
/**
|
|
83
83
|
* @member {Number} mcc
|
|
84
84
|
*/
|
|
85
|
-
DeviceTowerInfo.prototype[
|
|
85
|
+
DeviceTowerInfo.prototype["mcc"] = undefined;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* @member {Number} mnc
|
|
89
89
|
*/
|
|
90
|
-
DeviceTowerInfo.prototype[
|
|
90
|
+
DeviceTowerInfo.prototype["mnc"] = undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* @member {Number} lac
|
|
94
94
|
*/
|
|
95
|
-
DeviceTowerInfo.prototype[
|
|
95
|
+
DeviceTowerInfo.prototype["lac"] = undefined;
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* @member {Number} cell_id
|
|
99
99
|
*/
|
|
100
|
-
DeviceTowerInfo.prototype[
|
|
100
|
+
DeviceTowerInfo.prototype["cell_id"] = undefined;
|
|
101
101
|
var _default = DeviceTowerInfo;
|
|
102
102
|
exports["default"] = _default;
|
|
@@ -15,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
15
|
/**
|
|
16
16
|
* The DeviceUsage model module.
|
|
17
17
|
* @module model/DeviceUsage
|
|
18
|
-
* @version 1.0.
|
|
18
|
+
* @version 1.0.12
|
|
19
19
|
*/
|
|
20
20
|
var DeviceUsage = /*#__PURE__*/function () {
|
|
21
21
|
/**
|
|
@@ -48,35 +48,35 @@ var DeviceUsage = /*#__PURE__*/function () {
|
|
|
48
48
|
value: function constructFromObject(data, obj) {
|
|
49
49
|
if (data) {
|
|
50
50
|
obj = obj || new DeviceUsage();
|
|
51
|
-
if (data.hasOwnProperty(
|
|
52
|
-
obj[
|
|
51
|
+
if (data.hasOwnProperty("since")) {
|
|
52
|
+
obj["since"] = _ApiClient["default"].convertToType(data["since"], "Number");
|
|
53
53
|
}
|
|
54
|
-
if (data.hasOwnProperty(
|
|
55
|
-
obj[
|
|
54
|
+
if (data.hasOwnProperty("duration")) {
|
|
55
|
+
obj["duration"] = _ApiClient["default"].convertToType(data["duration"], "Number");
|
|
56
56
|
}
|
|
57
|
-
if (data.hasOwnProperty(
|
|
58
|
-
obj[
|
|
57
|
+
if (data.hasOwnProperty("bytes_rcvd")) {
|
|
58
|
+
obj["bytes_rcvd"] = _ApiClient["default"].convertToType(data["bytes_rcvd"], "Number");
|
|
59
59
|
}
|
|
60
|
-
if (data.hasOwnProperty(
|
|
61
|
-
obj[
|
|
60
|
+
if (data.hasOwnProperty("bytes_sent")) {
|
|
61
|
+
obj["bytes_sent"] = _ApiClient["default"].convertToType(data["bytes_sent"], "Number");
|
|
62
62
|
}
|
|
63
|
-
if (data.hasOwnProperty(
|
|
64
|
-
obj[
|
|
63
|
+
if (data.hasOwnProperty("bytes_rcvd_secondary")) {
|
|
64
|
+
obj["bytes_rcvd_secondary"] = _ApiClient["default"].convertToType(data["bytes_rcvd_secondary"], "Number");
|
|
65
65
|
}
|
|
66
|
-
if (data.hasOwnProperty(
|
|
67
|
-
obj[
|
|
66
|
+
if (data.hasOwnProperty("bytes_sent_secondary")) {
|
|
67
|
+
obj["bytes_sent_secondary"] = _ApiClient["default"].convertToType(data["bytes_sent_secondary"], "Number");
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty(
|
|
70
|
-
obj[
|
|
69
|
+
if (data.hasOwnProperty("sessions_tcp")) {
|
|
70
|
+
obj["sessions_tcp"] = _ApiClient["default"].convertToType(data["sessions_tcp"], "Number");
|
|
71
71
|
}
|
|
72
|
-
if (data.hasOwnProperty(
|
|
73
|
-
obj[
|
|
72
|
+
if (data.hasOwnProperty("sessions_tls")) {
|
|
73
|
+
obj["sessions_tls"] = _ApiClient["default"].convertToType(data["sessions_tls"], "Number");
|
|
74
74
|
}
|
|
75
|
-
if (data.hasOwnProperty(
|
|
76
|
-
obj[
|
|
75
|
+
if (data.hasOwnProperty("notes_rcvd")) {
|
|
76
|
+
obj["notes_rcvd"] = _ApiClient["default"].convertToType(data["notes_rcvd"], "Number");
|
|
77
77
|
}
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
78
|
+
if (data.hasOwnProperty("note_sent")) {
|
|
79
|
+
obj["note_sent"] = _ApiClient["default"].convertToType(data["note_sent"], "Number");
|
|
80
80
|
}
|
|
81
81
|
} else if (data === null) {
|
|
82
82
|
return null;
|
|
@@ -100,51 +100,51 @@ var DeviceUsage = /*#__PURE__*/function () {
|
|
|
100
100
|
/**
|
|
101
101
|
* @member {Number} since
|
|
102
102
|
*/
|
|
103
|
-
DeviceUsage.prototype[
|
|
103
|
+
DeviceUsage.prototype["since"] = undefined;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* @member {Number} duration
|
|
107
107
|
*/
|
|
108
|
-
DeviceUsage.prototype[
|
|
108
|
+
DeviceUsage.prototype["duration"] = undefined;
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* @member {Number} bytes_rcvd
|
|
112
112
|
*/
|
|
113
|
-
DeviceUsage.prototype[
|
|
113
|
+
DeviceUsage.prototype["bytes_rcvd"] = undefined;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
116
|
* @member {Number} bytes_sent
|
|
117
117
|
*/
|
|
118
|
-
DeviceUsage.prototype[
|
|
118
|
+
DeviceUsage.prototype["bytes_sent"] = undefined;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* @member {Number} bytes_rcvd_secondary
|
|
122
122
|
*/
|
|
123
|
-
DeviceUsage.prototype[
|
|
123
|
+
DeviceUsage.prototype["bytes_rcvd_secondary"] = undefined;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* @member {Number} bytes_sent_secondary
|
|
127
127
|
*/
|
|
128
|
-
DeviceUsage.prototype[
|
|
128
|
+
DeviceUsage.prototype["bytes_sent_secondary"] = undefined;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* @member {Number} sessions_tcp
|
|
132
132
|
*/
|
|
133
|
-
DeviceUsage.prototype[
|
|
133
|
+
DeviceUsage.prototype["sessions_tcp"] = undefined;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* @member {Number} sessions_tls
|
|
137
137
|
*/
|
|
138
|
-
DeviceUsage.prototype[
|
|
138
|
+
DeviceUsage.prototype["sessions_tls"] = undefined;
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* @member {Number} notes_rcvd
|
|
142
142
|
*/
|
|
143
|
-
DeviceUsage.prototype[
|
|
143
|
+
DeviceUsage.prototype["notes_rcvd"] = undefined;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* @member {Number} note_sent
|
|
147
147
|
*/
|
|
148
|
-
DeviceUsage.prototype[
|
|
148
|
+
DeviceUsage.prototype["note_sent"] = undefined;
|
|
149
149
|
var _default = DeviceUsage;
|
|
150
150
|
exports["default"] = _default;
|
|
@@ -0,0 +1,214 @@
|
|
|
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 _EdgeimpulseSensorsInner = _interopRequireDefault(require("./EdgeimpulseSensorsInner"));
|
|
9
|
+
var _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; } } }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
/**
|
|
21
|
+
* The Edgeimpulse model module.
|
|
22
|
+
* @module model/Edgeimpulse
|
|
23
|
+
* @version 1.0.12
|
|
24
|
+
*/
|
|
25
|
+
var Edgeimpulse = /*#__PURE__*/function () {
|
|
26
|
+
/**
|
|
27
|
+
* Constructs a new <code>Edgeimpulse</code>.
|
|
28
|
+
* Route settings specific to edgeimpulse routes. Only used for edgeimpulse route types
|
|
29
|
+
* @alias module:model/Edgeimpulse
|
|
30
|
+
*/
|
|
31
|
+
function Edgeimpulse() {
|
|
32
|
+
_classCallCheck(this, Edgeimpulse);
|
|
33
|
+
Edgeimpulse.initialize(this);
|
|
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(Edgeimpulse, null, [{
|
|
42
|
+
key: "initialize",
|
|
43
|
+
value: function initialize(obj) {}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Constructs a <code>Edgeimpulse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
47
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
48
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
49
|
+
* @param {module:model/Edgeimpulse} obj Optional instance to populate.
|
|
50
|
+
* @return {module:model/Edgeimpulse} The populated <code>Edgeimpulse</code> instance.
|
|
51
|
+
*/
|
|
52
|
+
}, {
|
|
53
|
+
key: "constructFromObject",
|
|
54
|
+
value: function constructFromObject(data, obj) {
|
|
55
|
+
if (data) {
|
|
56
|
+
obj = obj || new Edgeimpulse();
|
|
57
|
+
if (data.hasOwnProperty("fleets")) {
|
|
58
|
+
obj["fleets"] = _ApiClient["default"].convertToType(data["fleets"], ["String"]);
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty("filter")) {
|
|
61
|
+
obj["filter"] = _HttpFilter["default"].constructFromObject(data["filter"]);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty("timeout")) {
|
|
64
|
+
obj["timeout"] = _ApiClient["default"].convertToType(data["timeout"], "Number");
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty("api_key")) {
|
|
67
|
+
obj["api_key"] = _ApiClient["default"].convertToType(data["api_key"], "String");
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty("filename")) {
|
|
70
|
+
obj["filename"] = _ApiClient["default"].convertToType(data["filename"], "String");
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty("device_type")) {
|
|
73
|
+
obj["device_type"] = _ApiClient["default"].convertToType(data["device_type"], "String");
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty("interval_ms")) {
|
|
76
|
+
obj["interval_ms"] = _ApiClient["default"].convertToType(data["interval_ms"], "Number");
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty("device_name")) {
|
|
79
|
+
obj["device_name"] = _ApiClient["default"].convertToType(data["device_name"], "String");
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty("label")) {
|
|
82
|
+
obj["label"] = _ApiClient["default"].convertToType(data["label"], "String");
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty("sensors")) {
|
|
85
|
+
obj["sensors"] = _ApiClient["default"].convertToType(data["sensors"], [_EdgeimpulseSensorsInner["default"]]);
|
|
86
|
+
}
|
|
87
|
+
} else if (data === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return obj;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Validates the JSON data with respect to <code>Edgeimpulse</code>.
|
|
95
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
96
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Edgeimpulse</code>.
|
|
97
|
+
*/
|
|
98
|
+
}, {
|
|
99
|
+
key: "validateJSON",
|
|
100
|
+
value: function validateJSON(data) {
|
|
101
|
+
// ensure the json data is an array
|
|
102
|
+
if (!Array.isArray(data["fleets"])) {
|
|
103
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data["fleets"]);
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `filter`
|
|
106
|
+
if (data["filter"]) {
|
|
107
|
+
// data not null
|
|
108
|
+
_HttpFilter["default"].validateJSON(data["filter"]);
|
|
109
|
+
}
|
|
110
|
+
// ensure the json data is a string
|
|
111
|
+
if (data["api_key"] && !(typeof data["api_key"] === "string" || data["api_key"] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `api_key` to be a primitive type in the JSON string but got " + data["api_key"]);
|
|
113
|
+
}
|
|
114
|
+
// ensure the json data is a string
|
|
115
|
+
if (data["filename"] && !(typeof data["filename"] === "string" || data["filename"] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data["filename"]);
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is a string
|
|
119
|
+
if (data["device_type"] && !(typeof data["device_type"] === "string" || data["device_type"] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `device_type` to be a primitive type in the JSON string but got " + data["device_type"]);
|
|
121
|
+
}
|
|
122
|
+
// ensure the json data is a string
|
|
123
|
+
if (data["device_name"] && !(typeof data["device_name"] === "string" || data["device_name"] instanceof String)) {
|
|
124
|
+
throw new Error("Expected the field `device_name` to be a primitive type in the JSON string but got " + data["device_name"]);
|
|
125
|
+
}
|
|
126
|
+
// ensure the json data is a string
|
|
127
|
+
if (data["label"] && !(typeof data["label"] === "string" || data["label"] instanceof String)) {
|
|
128
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data["label"]);
|
|
129
|
+
}
|
|
130
|
+
if (data["sensors"]) {
|
|
131
|
+
// data not null
|
|
132
|
+
// ensure the json data is an array
|
|
133
|
+
if (!Array.isArray(data["sensors"])) {
|
|
134
|
+
throw new Error("Expected the field `sensors` to be an array in the JSON data but got " + data["sensors"]);
|
|
135
|
+
}
|
|
136
|
+
// validate the optional field `sensors` (array)
|
|
137
|
+
var _iterator = _createForOfIteratorHelper(data["sensors"]),
|
|
138
|
+
_step;
|
|
139
|
+
try {
|
|
140
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
141
|
+
var item = _step.value;
|
|
142
|
+
_EdgeimpulseSensorsInner["default"].validateJsonObject(item);
|
|
143
|
+
}
|
|
144
|
+
} catch (err) {
|
|
145
|
+
_iterator.e(err);
|
|
146
|
+
} finally {
|
|
147
|
+
_iterator.f();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
}]);
|
|
153
|
+
return Edgeimpulse;
|
|
154
|
+
}();
|
|
155
|
+
/**
|
|
156
|
+
* list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
|
|
157
|
+
* @member {Array.<String>} fleets
|
|
158
|
+
*/
|
|
159
|
+
Edgeimpulse.prototype["fleets"] = undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @member {module:model/HttpFilter} filter
|
|
163
|
+
*/
|
|
164
|
+
Edgeimpulse.prototype["filter"] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Timeout in seconds for each request
|
|
168
|
+
* @member {Number} timeout
|
|
169
|
+
* @default 15
|
|
170
|
+
*/
|
|
171
|
+
Edgeimpulse.prototype["timeout"] = 15;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* EdgeImpulse API Key
|
|
175
|
+
* @member {String} api_key
|
|
176
|
+
*/
|
|
177
|
+
Edgeimpulse.prototype["api_key"] = undefined;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* An identifier the collection of data points
|
|
181
|
+
* @member {String} filename
|
|
182
|
+
*/
|
|
183
|
+
Edgeimpulse.prototype["filename"] = undefined;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* An identifier for the type of device generating the data
|
|
187
|
+
* @member {String} device_type
|
|
188
|
+
*/
|
|
189
|
+
Edgeimpulse.prototype["device_type"] = undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Frequency of data in miliseconds
|
|
193
|
+
* @member {Number} interval_ms
|
|
194
|
+
*/
|
|
195
|
+
Edgeimpulse.prototype["interval_ms"] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* An identifier for the device generating the data
|
|
199
|
+
* @member {String} device_name
|
|
200
|
+
*/
|
|
201
|
+
Edgeimpulse.prototype["device_name"] = undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* A label for the data point
|
|
205
|
+
* @member {String} label
|
|
206
|
+
*/
|
|
207
|
+
Edgeimpulse.prototype["label"] = undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @member {Array.<module:model/EdgeimpulseSensorsInner>} sensors
|
|
211
|
+
*/
|
|
212
|
+
Edgeimpulse.prototype["sensors"] = undefined;
|
|
213
|
+
var _default = Edgeimpulse;
|
|
214
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,106 @@
|
|
|
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(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); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
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); }
|
|
15
|
+
/**
|
|
16
|
+
* The EdgeimpulseSensorsInner model module.
|
|
17
|
+
* @module model/EdgeimpulseSensorsInner
|
|
18
|
+
* @version 1.0.12
|
|
19
|
+
*/
|
|
20
|
+
var EdgeimpulseSensorsInner = /*#__PURE__*/function () {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs a new <code>EdgeimpulseSensorsInner</code>.
|
|
23
|
+
* @alias module:model/EdgeimpulseSensorsInner
|
|
24
|
+
*/
|
|
25
|
+
function EdgeimpulseSensorsInner() {
|
|
26
|
+
_classCallCheck(this, EdgeimpulseSensorsInner);
|
|
27
|
+
EdgeimpulseSensorsInner.initialize(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Initializes the fields of this object.
|
|
32
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
+
* Only for internal use.
|
|
34
|
+
*/
|
|
35
|
+
_createClass(EdgeimpulseSensorsInner, null, [{
|
|
36
|
+
key: "initialize",
|
|
37
|
+
value: function initialize(obj) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a <code>EdgeimpulseSensorsInner</code> from a plain JavaScript object, optionally creating a new instance.
|
|
41
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
42
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
43
|
+
* @param {module:model/EdgeimpulseSensorsInner} obj Optional instance to populate.
|
|
44
|
+
* @return {module:model/EdgeimpulseSensorsInner} The populated <code>EdgeimpulseSensorsInner</code> instance.
|
|
45
|
+
*/
|
|
46
|
+
}, {
|
|
47
|
+
key: "constructFromObject",
|
|
48
|
+
value: function constructFromObject(data, obj) {
|
|
49
|
+
if (data) {
|
|
50
|
+
obj = obj || new EdgeimpulseSensorsInner();
|
|
51
|
+
if (data.hasOwnProperty("name")) {
|
|
52
|
+
obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
|
|
53
|
+
}
|
|
54
|
+
if (data.hasOwnProperty("units")) {
|
|
55
|
+
obj["units"] = _ApiClient["default"].convertToType(data["units"], "String");
|
|
56
|
+
}
|
|
57
|
+
if (data.hasOwnProperty("value")) {
|
|
58
|
+
obj["value"] = _ApiClient["default"].convertToType(data["value"], "String");
|
|
59
|
+
}
|
|
60
|
+
} else if (data === null) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Validates the JSON data with respect to <code>EdgeimpulseSensorsInner</code>.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>EdgeimpulseSensorsInner</code>.
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "validateJSON",
|
|
73
|
+
value: function validateJSON(data) {
|
|
74
|
+
// ensure the json data is a string
|
|
75
|
+
if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
|
|
76
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
|
|
77
|
+
}
|
|
78
|
+
// ensure the json data is a string
|
|
79
|
+
if (data["units"] && !(typeof data["units"] === "string" || data["units"] instanceof String)) {
|
|
80
|
+
throw new Error("Expected the field `units` to be a primitive type in the JSON string but got " + data["units"]);
|
|
81
|
+
}
|
|
82
|
+
// ensure the json data is a string
|
|
83
|
+
if (data["value"] && !(typeof data["value"] === "string" || data["value"] instanceof String)) {
|
|
84
|
+
throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data["value"]);
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}]);
|
|
89
|
+
return EdgeimpulseSensorsInner;
|
|
90
|
+
}();
|
|
91
|
+
/**
|
|
92
|
+
* @member {String} name
|
|
93
|
+
*/
|
|
94
|
+
EdgeimpulseSensorsInner.prototype["name"] = undefined;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @member {String} units
|
|
98
|
+
*/
|
|
99
|
+
EdgeimpulseSensorsInner.prototype["units"] = undefined;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @member {String} value
|
|
103
|
+
*/
|
|
104
|
+
EdgeimpulseSensorsInner.prototype["value"] = undefined;
|
|
105
|
+
var _default = EdgeimpulseSensorsInner;
|
|
106
|
+
exports["default"] = _default;
|
|
@@ -18,13 +18,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
18
18
|
/**
|
|
19
19
|
* The EnvironmentVariables model module.
|
|
20
20
|
* @module model/EnvironmentVariables
|
|
21
|
-
* @version 1.0.
|
|
21
|
+
* @version 1.0.12
|
|
22
22
|
*/
|
|
23
23
|
var EnvironmentVariables = /*#__PURE__*/function () {
|
|
24
24
|
/**
|
|
25
25
|
* Constructs a new <code>EnvironmentVariables</code>.
|
|
26
26
|
* @alias module:model/EnvironmentVariables
|
|
27
|
-
* @param environmentVariables {Object.<String, String>}
|
|
27
|
+
* @param environmentVariables {Object.<String, String>}
|
|
28
28
|
*/
|
|
29
29
|
function EnvironmentVariables(environmentVariables) {
|
|
30
30
|
_classCallCheck(this, EnvironmentVariables);
|
|
@@ -39,7 +39,7 @@ var EnvironmentVariables = /*#__PURE__*/function () {
|
|
|
39
39
|
_createClass(EnvironmentVariables, null, [{
|
|
40
40
|
key: "initialize",
|
|
41
41
|
value: function initialize(obj, environmentVariables) {
|
|
42
|
-
obj[
|
|
42
|
+
obj["environment_variables"] = environmentVariables;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -54,9 +54,9 @@ var EnvironmentVariables = /*#__PURE__*/function () {
|
|
|
54
54
|
value: function constructFromObject(data, obj) {
|
|
55
55
|
if (data) {
|
|
56
56
|
obj = obj || new EnvironmentVariables();
|
|
57
|
-
if (data.hasOwnProperty(
|
|
58
|
-
obj[
|
|
59
|
-
|
|
57
|
+
if (data.hasOwnProperty("environment_variables")) {
|
|
58
|
+
obj["environment_variables"] = _ApiClient["default"].convertToType(data["environment_variables"], {
|
|
59
|
+
String: "String"
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
} else if (data === null) {
|
|
@@ -98,6 +98,6 @@ EnvironmentVariables.RequiredProperties = ["environment_variables"];
|
|
|
98
98
|
/**
|
|
99
99
|
* @member {Object.<String, String>} environment_variables
|
|
100
100
|
*/
|
|
101
|
-
EnvironmentVariables.prototype[
|
|
101
|
+
EnvironmentVariables.prototype["environment_variables"] = undefined;
|
|
102
102
|
var _default = EnvironmentVariables;
|
|
103
103
|
exports["default"] = _default;
|