@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,118 @@
|
|
|
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 Contact model module.
|
|
17
|
+
* @module model/Contact
|
|
18
|
+
* @version 1.0.4
|
|
19
|
+
*/
|
|
20
|
+
var Contact = /*#__PURE__*/function () {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs a new <code>Contact</code>.
|
|
23
|
+
* @alias module:model/Contact
|
|
24
|
+
*/
|
|
25
|
+
function Contact() {
|
|
26
|
+
_classCallCheck(this, Contact);
|
|
27
|
+
Contact.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(Contact, null, [{
|
|
36
|
+
key: "initialize",
|
|
37
|
+
value: function initialize(obj) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a <code>Contact</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/Contact} obj Optional instance to populate.
|
|
44
|
+
* @return {module:model/Contact} The populated <code>Contact</code> instance.
|
|
45
|
+
*/
|
|
46
|
+
}, {
|
|
47
|
+
key: "constructFromObject",
|
|
48
|
+
value: function constructFromObject(data, obj) {
|
|
49
|
+
if (data) {
|
|
50
|
+
obj = obj || new Contact();
|
|
51
|
+
if (data.hasOwnProperty('name')) {
|
|
52
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
53
|
+
}
|
|
54
|
+
if (data.hasOwnProperty('email')) {
|
|
55
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
56
|
+
}
|
|
57
|
+
if (data.hasOwnProperty('role')) {
|
|
58
|
+
obj['role'] = _ApiClient["default"].convertToType(data['role'], 'String');
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty('organization')) {
|
|
61
|
+
obj['organization'] = _ApiClient["default"].convertToType(data['organization'], 'String');
|
|
62
|
+
}
|
|
63
|
+
} else if (data === null) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validates the JSON data with respect to <code>Contact</code>.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Contact</code>.
|
|
73
|
+
*/
|
|
74
|
+
}, {
|
|
75
|
+
key: "validateJSON",
|
|
76
|
+
value: function validateJSON(data) {
|
|
77
|
+
// ensure the json data is a string
|
|
78
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
79
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
80
|
+
}
|
|
81
|
+
// ensure the json data is a string
|
|
82
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
83
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
84
|
+
}
|
|
85
|
+
// ensure the json data is a string
|
|
86
|
+
if (data['role'] && !(typeof data['role'] === 'string' || data['role'] instanceof String)) {
|
|
87
|
+
throw new Error("Expected the field `role` to be a primitive type in the JSON string but got " + data['role']);
|
|
88
|
+
}
|
|
89
|
+
// ensure the json data is a string
|
|
90
|
+
if (data['organization'] && !(typeof data['organization'] === 'string' || data['organization'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `organization` to be a primitive type in the JSON string but got " + data['organization']);
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
return Contact;
|
|
97
|
+
}();
|
|
98
|
+
/**
|
|
99
|
+
* @member {String} name
|
|
100
|
+
*/
|
|
101
|
+
Contact.prototype['name'] = undefined;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @member {String} email
|
|
105
|
+
*/
|
|
106
|
+
Contact.prototype['email'] = undefined;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @member {String} role
|
|
110
|
+
*/
|
|
111
|
+
Contact.prototype['role'] = undefined;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @member {String} organization
|
|
115
|
+
*/
|
|
116
|
+
Contact.prototype['organization'] = undefined;
|
|
117
|
+
var _default = Contact;
|
|
118
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 CreateFleetRequest model module.
|
|
17
|
+
* @module model/CreateFleetRequest
|
|
18
|
+
* @version 1.0.4
|
|
19
|
+
*/
|
|
20
|
+
var CreateFleetRequest = /*#__PURE__*/function () {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs a new <code>CreateFleetRequest</code>.
|
|
23
|
+
* @alias module:model/CreateFleetRequest
|
|
24
|
+
*/
|
|
25
|
+
function CreateFleetRequest() {
|
|
26
|
+
_classCallCheck(this, CreateFleetRequest);
|
|
27
|
+
CreateFleetRequest.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(CreateFleetRequest, null, [{
|
|
36
|
+
key: "initialize",
|
|
37
|
+
value: function initialize(obj) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a <code>CreateFleetRequest</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/CreateFleetRequest} obj Optional instance to populate.
|
|
44
|
+
* @return {module:model/CreateFleetRequest} The populated <code>CreateFleetRequest</code> instance.
|
|
45
|
+
*/
|
|
46
|
+
}, {
|
|
47
|
+
key: "constructFromObject",
|
|
48
|
+
value: function constructFromObject(data, obj) {
|
|
49
|
+
if (data) {
|
|
50
|
+
obj = obj || new CreateFleetRequest();
|
|
51
|
+
if (data.hasOwnProperty('label')) {
|
|
52
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
53
|
+
}
|
|
54
|
+
} else if (data === null) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return obj;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Validates the JSON data with respect to <code>CreateFleetRequest</code>.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateFleetRequest</code>.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "validateJSON",
|
|
67
|
+
value: function validateJSON(data) {
|
|
68
|
+
// ensure the json data is a string
|
|
69
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
70
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
71
|
+
}
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
}]);
|
|
75
|
+
return CreateFleetRequest;
|
|
76
|
+
}();
|
|
77
|
+
/**
|
|
78
|
+
* The label for the Fleet.
|
|
79
|
+
* @member {String} label
|
|
80
|
+
*/
|
|
81
|
+
CreateFleetRequest.prototype['label'] = undefined;
|
|
82
|
+
var _default = CreateFleetRequest;
|
|
83
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,142 @@
|
|
|
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 _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
|
+
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
|
+
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
+
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
/**
|
|
19
|
+
* The CreateProductRequest model module.
|
|
20
|
+
* @module model/CreateProductRequest
|
|
21
|
+
* @version 1.0.4
|
|
22
|
+
*/
|
|
23
|
+
var CreateProductRequest = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new <code>CreateProductRequest</code>.
|
|
26
|
+
* @alias module:model/CreateProductRequest
|
|
27
|
+
* @param productUid {String} The requested uid for the Product. Will be prefixed with the user's reversed email.
|
|
28
|
+
* @param label {String} The label for the Product.
|
|
29
|
+
*/
|
|
30
|
+
function CreateProductRequest(productUid, label) {
|
|
31
|
+
_classCallCheck(this, CreateProductRequest);
|
|
32
|
+
CreateProductRequest.initialize(this, productUid, label);
|
|
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(CreateProductRequest, null, [{
|
|
41
|
+
key: "initialize",
|
|
42
|
+
value: function initialize(obj, productUid, label) {
|
|
43
|
+
obj['product_uid'] = productUid;
|
|
44
|
+
obj['label'] = label;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>CreateProductRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
+
* @param {module:model/CreateProductRequest} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/CreateProductRequest} The populated <code>CreateProductRequest</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new CreateProductRequest();
|
|
59
|
+
if (data.hasOwnProperty('product_uid')) {
|
|
60
|
+
obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('label')) {
|
|
63
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('auto_provision_fleets')) {
|
|
66
|
+
obj['auto_provision_fleets'] = _ApiClient["default"].convertToType(data['auto_provision_fleets'], ['String']);
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('disable_devices_by_default')) {
|
|
69
|
+
obj['disable_devices_by_default'] = _ApiClient["default"].convertToType(data['disable_devices_by_default'], '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>CreateProductRequest</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>CreateProductRequest</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(CreateProductRequest.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
|
+
// ensure the json data is a string
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
|
|
103
|
+
}
|
|
104
|
+
// ensure the json data is a string
|
|
105
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
106
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
107
|
+
}
|
|
108
|
+
// ensure the json data is an array
|
|
109
|
+
if (!Array.isArray(data['auto_provision_fleets'])) {
|
|
110
|
+
throw new Error("Expected the field `auto_provision_fleets` to be an array in the JSON data but got " + data['auto_provision_fleets']);
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
}]);
|
|
115
|
+
return CreateProductRequest;
|
|
116
|
+
}();
|
|
117
|
+
CreateProductRequest.RequiredProperties = ["product_uid", "label"];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The requested uid for the Product. Will be prefixed with the user's reversed email.
|
|
121
|
+
* @member {String} product_uid
|
|
122
|
+
*/
|
|
123
|
+
CreateProductRequest.prototype['product_uid'] = undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The label for the Product.
|
|
127
|
+
* @member {String} label
|
|
128
|
+
*/
|
|
129
|
+
CreateProductRequest.prototype['label'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @member {Array.<String>} auto_provision_fleets
|
|
133
|
+
*/
|
|
134
|
+
CreateProductRequest.prototype['auto_provision_fleets'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* If `true`, devices provisioned to this product will be automatically disabled by default.
|
|
138
|
+
* @member {Boolean} disable_devices_by_default
|
|
139
|
+
*/
|
|
140
|
+
CreateProductRequest.prototype['disable_devices_by_default'] = undefined;
|
|
141
|
+
var _default = CreateProductRequest;
|
|
142
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,119 @@
|
|
|
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 _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
|
+
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
|
+
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
+
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
/**
|
|
19
|
+
* The CreateProjectRequest model module.
|
|
20
|
+
* @module model/CreateProjectRequest
|
|
21
|
+
* @version 1.0.4
|
|
22
|
+
*/
|
|
23
|
+
var CreateProjectRequest = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new <code>CreateProjectRequest</code>.
|
|
26
|
+
* @alias module:model/CreateProjectRequest
|
|
27
|
+
* @param label {String} The label for the project.
|
|
28
|
+
*/
|
|
29
|
+
function CreateProjectRequest(label) {
|
|
30
|
+
_classCallCheck(this, CreateProjectRequest);
|
|
31
|
+
CreateProjectRequest.initialize(this, label);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Initializes the fields of this object.
|
|
36
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
37
|
+
* Only for internal use.
|
|
38
|
+
*/
|
|
39
|
+
_createClass(CreateProjectRequest, null, [{
|
|
40
|
+
key: "initialize",
|
|
41
|
+
value: function initialize(obj, label) {
|
|
42
|
+
obj['label'] = label;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Constructs a <code>CreateProjectRequest</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/CreateProjectRequest} obj Optional instance to populate.
|
|
50
|
+
* @return {module:model/CreateProjectRequest} The populated <code>CreateProjectRequest</code> instance.
|
|
51
|
+
*/
|
|
52
|
+
}, {
|
|
53
|
+
key: "constructFromObject",
|
|
54
|
+
value: function constructFromObject(data, obj) {
|
|
55
|
+
if (data) {
|
|
56
|
+
obj = obj || new CreateProjectRequest();
|
|
57
|
+
if (data.hasOwnProperty('label')) {
|
|
58
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty('billing_account_uid')) {
|
|
61
|
+
obj['billing_account_uid'] = _ApiClient["default"].convertToType(data['billing_account_uid'], 'String');
|
|
62
|
+
}
|
|
63
|
+
} else if (data === null) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validates the JSON data with respect to <code>CreateProjectRequest</code>.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateProjectRequest</code>.
|
|
73
|
+
*/
|
|
74
|
+
}, {
|
|
75
|
+
key: "validateJSON",
|
|
76
|
+
value: function validateJSON(data) {
|
|
77
|
+
// check to make sure all required properties are present in the JSON string
|
|
78
|
+
var _iterator = _createForOfIteratorHelper(CreateProjectRequest.RequiredProperties),
|
|
79
|
+
_step;
|
|
80
|
+
try {
|
|
81
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
82
|
+
var property = _step.value;
|
|
83
|
+
if (!data[property]) {
|
|
84
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// ensure the json data is a string
|
|
88
|
+
} catch (err) {
|
|
89
|
+
_iterator.e(err);
|
|
90
|
+
} finally {
|
|
91
|
+
_iterator.f();
|
|
92
|
+
}
|
|
93
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
95
|
+
}
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
if (data['billing_account_uid'] && !(typeof data['billing_account_uid'] === 'string' || data['billing_account_uid'] instanceof String)) {
|
|
98
|
+
throw new Error("Expected the field `billing_account_uid` to be a primitive type in the JSON string but got " + data['billing_account_uid']);
|
|
99
|
+
}
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}]);
|
|
103
|
+
return CreateProjectRequest;
|
|
104
|
+
}();
|
|
105
|
+
CreateProjectRequest.RequiredProperties = ["label"];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The label for the project.
|
|
109
|
+
* @member {String} label
|
|
110
|
+
*/
|
|
111
|
+
CreateProjectRequest.prototype['label'] = undefined;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned.
|
|
115
|
+
* @member {String} billing_account_uid
|
|
116
|
+
*/
|
|
117
|
+
CreateProjectRequest.prototype['billing_account_uid'] = undefined;
|
|
118
|
+
var _default = CreateProjectRequest;
|
|
119
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 _DFUState = _interopRequireDefault(require("./DFUState"));
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
16
|
+
/**
|
|
17
|
+
* The DFUEnv model module.
|
|
18
|
+
* @module model/DFUEnv
|
|
19
|
+
* @version 1.0.4
|
|
20
|
+
*/
|
|
21
|
+
var DFUEnv = /*#__PURE__*/function () {
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new <code>DFUEnv</code>.
|
|
24
|
+
* @alias module:model/DFUEnv
|
|
25
|
+
*/
|
|
26
|
+
function DFUEnv() {
|
|
27
|
+
_classCallCheck(this, DFUEnv);
|
|
28
|
+
DFUEnv.initialize(this);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Initializes the fields of this object.
|
|
33
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
34
|
+
* Only for internal use.
|
|
35
|
+
*/
|
|
36
|
+
_createClass(DFUEnv, null, [{
|
|
37
|
+
key: "initialize",
|
|
38
|
+
value: function initialize(obj) {}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Constructs a <code>DFUEnv</code> from a plain JavaScript object, optionally creating a new instance.
|
|
42
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
43
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
44
|
+
* @param {module:model/DFUEnv} obj Optional instance to populate.
|
|
45
|
+
* @return {module:model/DFUEnv} The populated <code>DFUEnv</code> instance.
|
|
46
|
+
*/
|
|
47
|
+
}, {
|
|
48
|
+
key: "constructFromObject",
|
|
49
|
+
value: function constructFromObject(data, obj) {
|
|
50
|
+
if (data) {
|
|
51
|
+
obj = obj || new DFUEnv();
|
|
52
|
+
if (data.hasOwnProperty('card')) {
|
|
53
|
+
obj['card'] = _DFUState["default"].constructFromObject(data['card']);
|
|
54
|
+
}
|
|
55
|
+
if (data.hasOwnProperty('user')) {
|
|
56
|
+
obj['user'] = _DFUState["default"].constructFromObject(data['user']);
|
|
57
|
+
}
|
|
58
|
+
} else if (data === null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return obj;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Validates the JSON data with respect to <code>DFUEnv</code>.
|
|
66
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
67
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DFUEnv</code>.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "validateJSON",
|
|
71
|
+
value: function validateJSON(data) {
|
|
72
|
+
// validate the optional field `card`
|
|
73
|
+
if (data['card']) {
|
|
74
|
+
// data not null
|
|
75
|
+
_DFUState["default"].validateJSON(data['card']);
|
|
76
|
+
}
|
|
77
|
+
// validate the optional field `user`
|
|
78
|
+
if (data['user']) {
|
|
79
|
+
// data not null
|
|
80
|
+
_DFUState["default"].validateJSON(data['user']);
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
}]);
|
|
85
|
+
return DFUEnv;
|
|
86
|
+
}();
|
|
87
|
+
/**
|
|
88
|
+
* @member {module:model/DFUState} card
|
|
89
|
+
*/
|
|
90
|
+
DFUEnv.prototype['card'] = undefined;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @member {module:model/DFUState} user
|
|
94
|
+
*/
|
|
95
|
+
DFUEnv.prototype['user'] = undefined;
|
|
96
|
+
var _default = DFUEnv;
|
|
97
|
+
exports["default"] = _default;
|