@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.
Files changed (83) hide show
  1. package/README.md +297 -0
  2. package/dist/ApiClient.js +699 -0
  3. package/dist/api/AuthorizationApi.js +74 -0
  4. package/dist/api/BillingAccountApi.js +68 -0
  5. package/dist/api/DeviceApi.js +784 -0
  6. package/dist/api/DevicesApi.js +293 -0
  7. package/dist/api/EnvironmentVariablesApi.js +567 -0
  8. package/dist/api/EventApi.js +284 -0
  9. package/dist/api/FilesApi.js +193 -0
  10. package/dist/api/FleetApi.js +715 -0
  11. package/dist/api/NotesApi.js +435 -0
  12. package/dist/api/ProductApi.js +163 -0
  13. package/dist/api/ProjectApi.js +716 -0
  14. package/dist/api/RouteApi.js +266 -0
  15. package/dist/index.js +566 -0
  16. package/dist/model/Aws.js +233 -0
  17. package/dist/model/Azure.js +166 -0
  18. package/dist/model/BillingAccount.js +130 -0
  19. package/dist/model/BillingAccountRole.js +42 -0
  20. package/dist/model/Body.js +78 -0
  21. package/dist/model/Contact.js +118 -0
  22. package/dist/model/CreateFleetRequest.js +83 -0
  23. package/dist/model/CreateProductRequest.js +142 -0
  24. package/dist/model/CreateProjectRequest.js +119 -0
  25. package/dist/model/DFUEnv.js +97 -0
  26. package/dist/model/DFUState.js +276 -0
  27. package/dist/model/DeleteDeviceFleetsRequest.js +106 -0
  28. package/dist/model/Device.js +267 -0
  29. package/dist/model/DeviceSession.js +537 -0
  30. package/dist/model/DeviceTowerInfo.js +102 -0
  31. package/dist/model/DeviceUsage.js +150 -0
  32. package/dist/model/EnvironmentVariables.js +103 -0
  33. package/dist/model/Error.js +164 -0
  34. package/dist/model/Event.js +676 -0
  35. package/dist/model/Fleet.js +129 -0
  36. package/dist/model/GetBillingAccounts200Response.js +103 -0
  37. package/dist/model/GetDeviceEnvironmentVariables200Response.js +117 -0
  38. package/dist/model/GetDeviceHealthLog200Response.js +123 -0
  39. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +125 -0
  40. package/dist/model/GetDeviceLatest200Response.js +104 -0
  41. package/dist/model/GetDevicePublicKey200Response.js +119 -0
  42. package/dist/model/GetDeviceSessions200Response.js +133 -0
  43. package/dist/model/GetProjectDevicePublicKeys200Response.js +133 -0
  44. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +94 -0
  45. package/dist/model/GetProjectDevices200Response.js +133 -0
  46. package/dist/model/GetProjectEvents200Response.js +149 -0
  47. package/dist/model/GetProjectEventsByCursor200Response.js +149 -0
  48. package/dist/model/GetProjectFleets200Response.js +123 -0
  49. package/dist/model/GetProjectMembers200Response.js +123 -0
  50. package/dist/model/GetProjectProducts200Response.js +103 -0
  51. package/dist/model/GetProjects200Response.js +103 -0
  52. package/dist/model/Google.js +142 -0
  53. package/dist/model/HandleNoteChanges200Response.js +97 -0
  54. package/dist/model/HandleNoteGet200Response.js +101 -0
  55. package/dist/model/HandleNoteSignal200Response.js +79 -0
  56. package/dist/model/HandleNotefileChanges200Response.js +97 -0
  57. package/dist/model/HandleNotefileChangesPending200Response.js +106 -0
  58. package/dist/model/HandleNotefileDeleteRequest.js +83 -0
  59. package/dist/model/Http.js +163 -0
  60. package/dist/model/HttpFilter.js +128 -0
  61. package/dist/model/HttpTransform.js +139 -0
  62. package/dist/model/Location.js +167 -0
  63. package/dist/model/Login200Response.js +82 -0
  64. package/dist/model/LoginRequest.js +94 -0
  65. package/dist/model/Mqtt.js +240 -0
  66. package/dist/model/Note.js +90 -0
  67. package/dist/model/Product.js +141 -0
  68. package/dist/model/Project.js +165 -0
  69. package/dist/model/ProjectMember.js +131 -0
  70. package/dist/model/Proxy.js +128 -0
  71. package/dist/model/PutDeviceFleetsRequest.js +106 -0
  72. package/dist/model/Radresponder.js +130 -0
  73. package/dist/model/Role.js +43 -0
  74. package/dist/model/Route.js +245 -0
  75. package/dist/model/RouteSchema.js +427 -0
  76. package/dist/model/Snowflake.js +185 -0
  77. package/dist/model/SnowflakeTransform.js +97 -0
  78. package/dist/model/Thingworx.js +154 -0
  79. package/dist/model/TowerLocation.js +204 -0
  80. package/dist/model/Twilio.js +181 -0
  81. package/dist/model/UpdateFleetRequest.js +109 -0
  82. package/dist/model/UserDbRoute.js +131 -0
  83. package/package.json +49 -0
@@ -0,0 +1,185 @@
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 _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
9
+ var _SnowflakeTransform = _interopRequireDefault(require("./SnowflakeTransform"));
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
+ 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); } }
14
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
+ 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); }
17
+ /**
18
+ * The Snowflake model module.
19
+ * @module model/Snowflake
20
+ * @version 1.0.4
21
+ */
22
+ var Snowflake = /*#__PURE__*/function () {
23
+ /**
24
+ * Constructs a new <code>Snowflake</code>.
25
+ * Route settings specific to Snowflake routes. Only used for Snowflake route types
26
+ * @alias module:model/Snowflake
27
+ */
28
+ function Snowflake() {
29
+ _classCallCheck(this, Snowflake);
30
+ Snowflake.initialize(this);
31
+ }
32
+
33
+ /**
34
+ * Initializes the fields of this object.
35
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
36
+ * Only for internal use.
37
+ */
38
+ _createClass(Snowflake, null, [{
39
+ key: "initialize",
40
+ value: function initialize(obj) {}
41
+
42
+ /**
43
+ * Constructs a <code>Snowflake</code> from a plain JavaScript object, optionally creating a new instance.
44
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
45
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
46
+ * @param {module:model/Snowflake} obj Optional instance to populate.
47
+ * @return {module:model/Snowflake} The populated <code>Snowflake</code> instance.
48
+ */
49
+ }, {
50
+ key: "constructFromObject",
51
+ value: function constructFromObject(data, obj) {
52
+ if (data) {
53
+ obj = obj || new Snowflake();
54
+ if (data.hasOwnProperty('fleets')) {
55
+ obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
56
+ }
57
+ if (data.hasOwnProperty('filter')) {
58
+ obj['filter'] = _HttpFilter["default"].constructFromObject(data['filter']);
59
+ }
60
+ if (data.hasOwnProperty('transform')) {
61
+ obj['transform'] = _SnowflakeTransform["default"].constructFromObject(data['transform']);
62
+ }
63
+ if (data.hasOwnProperty('timeout')) {
64
+ obj['timeout'] = _ApiClient["default"].convertToType(data['timeout'], 'Number');
65
+ }
66
+ if (data.hasOwnProperty('organization_name')) {
67
+ obj['organization_name'] = _ApiClient["default"].convertToType(data['organization_name'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('account_name')) {
70
+ obj['account_name'] = _ApiClient["default"].convertToType(data['account_name'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('user_name')) {
73
+ obj['user_name'] = _ApiClient["default"].convertToType(data['user_name'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('private_key_name')) {
76
+ obj['private_key_name'] = _ApiClient["default"].convertToType(data['private_key_name'], 'String');
77
+ }
78
+ if (data.hasOwnProperty('pem')) {
79
+ obj['pem'] = _ApiClient["default"].convertToType(data['pem'], 'String');
80
+ }
81
+ } else if (data === null) {
82
+ return null;
83
+ }
84
+ return obj;
85
+ }
86
+
87
+ /**
88
+ * Validates the JSON data with respect to <code>Snowflake</code>.
89
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
90
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Snowflake</code>.
91
+ */
92
+ }, {
93
+ key: "validateJSON",
94
+ value: function validateJSON(data) {
95
+ // ensure the json data is an array
96
+ if (!Array.isArray(data['fleets'])) {
97
+ throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
98
+ }
99
+ // validate the optional field `filter`
100
+ if (data['filter']) {
101
+ // data not null
102
+ _HttpFilter["default"].validateJSON(data['filter']);
103
+ }
104
+ // validate the optional field `transform`
105
+ if (data['transform']) {
106
+ // data not null
107
+ _SnowflakeTransform["default"].validateJSON(data['transform']);
108
+ }
109
+ // ensure the json data is a string
110
+ if (data['organization_name'] && !(typeof data['organization_name'] === 'string' || data['organization_name'] instanceof String)) {
111
+ throw new Error("Expected the field `organization_name` to be a primitive type in the JSON string but got " + data['organization_name']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['account_name'] && !(typeof data['account_name'] === 'string' || data['account_name'] instanceof String)) {
115
+ throw new Error("Expected the field `account_name` to be a primitive type in the JSON string but got " + data['account_name']);
116
+ }
117
+ // ensure the json data is a string
118
+ if (data['user_name'] && !(typeof data['user_name'] === 'string' || data['user_name'] instanceof String)) {
119
+ throw new Error("Expected the field `user_name` to be a primitive type in the JSON string but got " + data['user_name']);
120
+ }
121
+ // ensure the json data is a string
122
+ if (data['private_key_name'] && !(typeof data['private_key_name'] === 'string' || data['private_key_name'] instanceof String)) {
123
+ throw new Error("Expected the field `private_key_name` to be a primitive type in the JSON string but got " + data['private_key_name']);
124
+ }
125
+ // ensure the json data is a string
126
+ if (data['pem'] && !(typeof data['pem'] === 'string' || data['pem'] instanceof String)) {
127
+ throw new Error("Expected the field `pem` to be a primitive type in the JSON string but got " + data['pem']);
128
+ }
129
+ return true;
130
+ }
131
+ }]);
132
+ return Snowflake;
133
+ }();
134
+ /**
135
+ * list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
136
+ * @member {Array.<String>} fleets
137
+ */
138
+ Snowflake.prototype['fleets'] = undefined;
139
+
140
+ /**
141
+ * @member {module:model/HttpFilter} filter
142
+ */
143
+ Snowflake.prototype['filter'] = undefined;
144
+
145
+ /**
146
+ * @member {module:model/SnowflakeTransform} transform
147
+ */
148
+ Snowflake.prototype['transform'] = undefined;
149
+
150
+ /**
151
+ * Timeout in seconds for each request
152
+ * @member {Number} timeout
153
+ * @default 15
154
+ */
155
+ Snowflake.prototype['timeout'] = 15;
156
+
157
+ /**
158
+ * @member {String} organization_name
159
+ */
160
+ Snowflake.prototype['organization_name'] = undefined;
161
+
162
+ /**
163
+ * @member {String} account_name
164
+ */
165
+ Snowflake.prototype['account_name'] = undefined;
166
+
167
+ /**
168
+ * @member {String} user_name
169
+ */
170
+ Snowflake.prototype['user_name'] = undefined;
171
+
172
+ /**
173
+ * Name of PEM key. If omitted, defaults to \"present\"
174
+ * @member {String} private_key_name
175
+ * @default 'present'
176
+ */
177
+ Snowflake.prototype['private_key_name'] = 'present';
178
+
179
+ /**
180
+ * PEM key with \\n newlines. Field is input only, will not show contents on GET operations.
181
+ * @member {String} pem
182
+ */
183
+ Snowflake.prototype['pem'] = undefined;
184
+ var _default = Snowflake;
185
+ 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
+ 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 SnowflakeTransform model module.
17
+ * @module model/SnowflakeTransform
18
+ * @version 1.0.4
19
+ */
20
+ var SnowflakeTransform = /*#__PURE__*/function () {
21
+ /**
22
+ * Constructs a new <code>SnowflakeTransform</code>.
23
+ * @alias module:model/SnowflakeTransform
24
+ */
25
+ function SnowflakeTransform() {
26
+ _classCallCheck(this, SnowflakeTransform);
27
+ SnowflakeTransform.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(SnowflakeTransform, null, [{
36
+ key: "initialize",
37
+ value: function initialize(obj) {}
38
+
39
+ /**
40
+ * Constructs a <code>SnowflakeTransform</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/SnowflakeTransform} obj Optional instance to populate.
44
+ * @return {module:model/SnowflakeTransform} The populated <code>SnowflakeTransform</code> instance.
45
+ */
46
+ }, {
47
+ key: "constructFromObject",
48
+ value: function constructFromObject(data, obj) {
49
+ if (data) {
50
+ obj = obj || new SnowflakeTransform();
51
+ if (data.hasOwnProperty('format')) {
52
+ obj['format'] = _ApiClient["default"].convertToType(data['format'], 'String');
53
+ }
54
+ if (data.hasOwnProperty('jsonata')) {
55
+ obj['jsonata'] = _ApiClient["default"].convertToType(data['jsonata'], 'String');
56
+ }
57
+ } else if (data === null) {
58
+ return null;
59
+ }
60
+ return obj;
61
+ }
62
+
63
+ /**
64
+ * Validates the JSON data with respect to <code>SnowflakeTransform</code>.
65
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
66
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SnowflakeTransform</code>.
67
+ */
68
+ }, {
69
+ key: "validateJSON",
70
+ value: function validateJSON(data) {
71
+ // ensure the json data is a string
72
+ if (data['format'] && !(typeof data['format'] === 'string' || data['format'] instanceof String)) {
73
+ throw new Error("Expected the field `format` to be a primitive type in the JSON string but got " + data['format']);
74
+ }
75
+ // ensure the json data is a string
76
+ if (data['jsonata'] && !(typeof data['jsonata'] === 'string' || data['jsonata'] instanceof String)) {
77
+ throw new Error("Expected the field `jsonata` to be a primitive type in the JSON string but got " + data['jsonata']);
78
+ }
79
+ return true;
80
+ }
81
+ }]);
82
+ return SnowflakeTransform;
83
+ }();
84
+ /**
85
+ * Data transformation to apply. Only \"jsonata\" is valid for Snowflake routes
86
+ * @member {String} format
87
+ * @default 'jsonata'
88
+ */
89
+ SnowflakeTransform.prototype['format'] = 'jsonata';
90
+
91
+ /**
92
+ * JSONata transformation
93
+ * @member {String} jsonata
94
+ */
95
+ SnowflakeTransform.prototype['jsonata'] = undefined;
96
+ var _default = SnowflakeTransform;
97
+ exports["default"] = _default;
@@ -0,0 +1,154 @@
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 _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
9
+ var _HttpTransform = _interopRequireDefault(require("./HttpTransform"));
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
+ 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); } }
14
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
+ 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); }
17
+ /**
18
+ * The Thingworx model module.
19
+ * @module model/Thingworx
20
+ * @version 1.0.4
21
+ */
22
+ var Thingworx = /*#__PURE__*/function () {
23
+ /**
24
+ * Constructs a new <code>Thingworx</code>.
25
+ * Route settings specific to ThingWorx routes. Only used for ThingWorx route types
26
+ * @alias module:model/Thingworx
27
+ */
28
+ function Thingworx() {
29
+ _classCallCheck(this, Thingworx);
30
+ Thingworx.initialize(this);
31
+ }
32
+
33
+ /**
34
+ * Initializes the fields of this object.
35
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
36
+ * Only for internal use.
37
+ */
38
+ _createClass(Thingworx, null, [{
39
+ key: "initialize",
40
+ value: function initialize(obj) {}
41
+
42
+ /**
43
+ * Constructs a <code>Thingworx</code> from a plain JavaScript object, optionally creating a new instance.
44
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
45
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
46
+ * @param {module:model/Thingworx} obj Optional instance to populate.
47
+ * @return {module:model/Thingworx} The populated <code>Thingworx</code> instance.
48
+ */
49
+ }, {
50
+ key: "constructFromObject",
51
+ value: function constructFromObject(data, obj) {
52
+ if (data) {
53
+ obj = obj || new Thingworx();
54
+ if (data.hasOwnProperty('fleets')) {
55
+ obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
56
+ }
57
+ if (data.hasOwnProperty('filter')) {
58
+ obj['filter'] = _HttpFilter["default"].constructFromObject(data['filter']);
59
+ }
60
+ if (data.hasOwnProperty('transform')) {
61
+ obj['transform'] = _HttpTransform["default"].constructFromObject(data['transform']);
62
+ }
63
+ if (data.hasOwnProperty('throttle_ms')) {
64
+ obj['throttle_ms'] = _ApiClient["default"].convertToType(data['throttle_ms'], 'Number');
65
+ }
66
+ if (data.hasOwnProperty('url')) {
67
+ obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('timeout')) {
70
+ obj['timeout'] = _ApiClient["default"].convertToType(data['timeout'], 'Number');
71
+ }
72
+ if (data.hasOwnProperty('app_key')) {
73
+ obj['app_key'] = _ApiClient["default"].convertToType(data['app_key'], 'String');
74
+ }
75
+ } else if (data === null) {
76
+ return null;
77
+ }
78
+ return obj;
79
+ }
80
+
81
+ /**
82
+ * Validates the JSON data with respect to <code>Thingworx</code>.
83
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Thingworx</code>.
85
+ */
86
+ }, {
87
+ key: "validateJSON",
88
+ value: function validateJSON(data) {
89
+ // ensure the json data is an array
90
+ if (!Array.isArray(data['fleets'])) {
91
+ throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
92
+ }
93
+ // validate the optional field `filter`
94
+ if (data['filter']) {
95
+ // data not null
96
+ _HttpFilter["default"].validateJSON(data['filter']);
97
+ }
98
+ // validate the optional field `transform`
99
+ if (data['transform']) {
100
+ // data not null
101
+ _HttpTransform["default"].validateJSON(data['transform']);
102
+ }
103
+ // ensure the json data is a string
104
+ if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
105
+ throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
106
+ }
107
+ // ensure the json data is a string
108
+ if (data['app_key'] && !(typeof data['app_key'] === 'string' || data['app_key'] instanceof String)) {
109
+ throw new Error("Expected the field `app_key` to be a primitive type in the JSON string but got " + data['app_key']);
110
+ }
111
+ return true;
112
+ }
113
+ }]);
114
+ return Thingworx;
115
+ }();
116
+ /**
117
+ * list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
118
+ * @member {Array.<String>} fleets
119
+ */
120
+ Thingworx.prototype['fleets'] = undefined;
121
+
122
+ /**
123
+ * @member {module:model/HttpFilter} filter
124
+ */
125
+ Thingworx.prototype['filter'] = undefined;
126
+
127
+ /**
128
+ * @member {module:model/HttpTransform} transform
129
+ */
130
+ Thingworx.prototype['transform'] = undefined;
131
+
132
+ /**
133
+ * @member {Number} throttle_ms
134
+ */
135
+ Thingworx.prototype['throttle_ms'] = undefined;
136
+
137
+ /**
138
+ * @member {String} url
139
+ */
140
+ Thingworx.prototype['url'] = undefined;
141
+
142
+ /**
143
+ * Timeout in seconds for each request
144
+ * @member {Number} timeout
145
+ * @default 15
146
+ */
147
+ Thingworx.prototype['timeout'] = 15;
148
+
149
+ /**
150
+ * @member {String} app_key
151
+ */
152
+ Thingworx.prototype['app_key'] = undefined;
153
+ var _default = Thingworx;
154
+ exports["default"] = _default;
@@ -0,0 +1,204 @@
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 TowerLocation model module.
17
+ * @module model/TowerLocation
18
+ * @version 1.0.4
19
+ */
20
+ var TowerLocation = /*#__PURE__*/function () {
21
+ /**
22
+ * Constructs a new <code>TowerLocation</code>.
23
+ * @alias module:model/TowerLocation
24
+ */
25
+ function TowerLocation() {
26
+ _classCallCheck(this, TowerLocation);
27
+ TowerLocation.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(TowerLocation, null, [{
36
+ key: "initialize",
37
+ value: function initialize(obj) {}
38
+
39
+ /**
40
+ * Constructs a <code>TowerLocation</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/TowerLocation} obj Optional instance to populate.
44
+ * @return {module:model/TowerLocation} The populated <code>TowerLocation</code> instance.
45
+ */
46
+ }, {
47
+ key: "constructFromObject",
48
+ value: function constructFromObject(data, obj) {
49
+ if (data) {
50
+ obj = obj || new TowerLocation();
51
+ if (data.hasOwnProperty('time')) {
52
+ obj['time'] = _ApiClient["default"].convertToType(data['time'], 'Number');
53
+ }
54
+ if (data.hasOwnProperty('n')) {
55
+ obj['n'] = _ApiClient["default"].convertToType(data['n'], 'String');
56
+ }
57
+ if (data.hasOwnProperty('c')) {
58
+ obj['c'] = _ApiClient["default"].convertToType(data['c'], 'String');
59
+ }
60
+ if (data.hasOwnProperty('lat')) {
61
+ obj['lat'] = _ApiClient["default"].convertToType(data['lat'], 'Number');
62
+ }
63
+ if (data.hasOwnProperty('lon')) {
64
+ obj['lon'] = _ApiClient["default"].convertToType(data['lon'], 'Number');
65
+ }
66
+ if (data.hasOwnProperty('zone')) {
67
+ obj['zone'] = _ApiClient["default"].convertToType(data['zone'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('mcc')) {
70
+ obj['mcc'] = _ApiClient["default"].convertToType(data['mcc'], 'Number');
71
+ }
72
+ if (data.hasOwnProperty('mnc')) {
73
+ obj['mnc'] = _ApiClient["default"].convertToType(data['mnc'], 'Number');
74
+ }
75
+ if (data.hasOwnProperty('lac')) {
76
+ obj['lac'] = _ApiClient["default"].convertToType(data['lac'], 'Number');
77
+ }
78
+ if (data.hasOwnProperty('cid')) {
79
+ obj['cid'] = _ApiClient["default"].convertToType(data['cid'], 'Number');
80
+ }
81
+ if (data.hasOwnProperty('l')) {
82
+ obj['l'] = _ApiClient["default"].convertToType(data['l'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('z')) {
85
+ obj['z'] = _ApiClient["default"].convertToType(data['z'], 'Number');
86
+ }
87
+ if (data.hasOwnProperty('count')) {
88
+ obj['count'] = _ApiClient["default"].convertToType(data['count'], 'Number');
89
+ }
90
+ if (data.hasOwnProperty('towers')) {
91
+ obj['towers'] = _ApiClient["default"].convertToType(data['towers'], 'Number');
92
+ }
93
+ } else if (data === null) {
94
+ return null;
95
+ }
96
+ return obj;
97
+ }
98
+
99
+ /**
100
+ * Validates the JSON data with respect to <code>TowerLocation</code>.
101
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
102
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TowerLocation</code>.
103
+ */
104
+ }, {
105
+ key: "validateJSON",
106
+ value: function validateJSON(data) {
107
+ // ensure the json data is a string
108
+ if (data['n'] && !(typeof data['n'] === 'string' || data['n'] instanceof String)) {
109
+ throw new Error("Expected the field `n` to be a primitive type in the JSON string but got " + data['n']);
110
+ }
111
+ // ensure the json data is a string
112
+ if (data['c'] && !(typeof data['c'] === 'string' || data['c'] instanceof String)) {
113
+ throw new Error("Expected the field `c` to be a primitive type in the JSON string but got " + data['c']);
114
+ }
115
+ // ensure the json data is a string
116
+ if (data['zone'] && !(typeof data['zone'] === 'string' || data['zone'] instanceof String)) {
117
+ throw new Error("Expected the field `zone` to be a primitive type in the JSON string but got " + data['zone']);
118
+ }
119
+ // ensure the json data is a string
120
+ if (data['l'] && !(typeof data['l'] === 'string' || data['l'] instanceof String)) {
121
+ throw new Error("Expected the field `l` to be a primitive type in the JSON string but got " + data['l']);
122
+ }
123
+ return true;
124
+ }
125
+ }]);
126
+ return TowerLocation;
127
+ }();
128
+ /**
129
+ * @member {Number} time
130
+ */
131
+ TowerLocation.prototype['time'] = undefined;
132
+
133
+ /**
134
+ * Name of the location
135
+ * @member {String} n
136
+ */
137
+ TowerLocation.prototype['n'] = undefined;
138
+
139
+ /**
140
+ * Country code
141
+ * @member {String} c
142
+ */
143
+ TowerLocation.prototype['c'] = undefined;
144
+
145
+ /**
146
+ * @member {Number} lat
147
+ */
148
+ TowerLocation.prototype['lat'] = undefined;
149
+
150
+ /**
151
+ * @member {Number} lon
152
+ */
153
+ TowerLocation.prototype['lon'] = undefined;
154
+
155
+ /**
156
+ * @member {String} zone
157
+ */
158
+ TowerLocation.prototype['zone'] = undefined;
159
+
160
+ /**
161
+ * @member {Number} mcc
162
+ */
163
+ TowerLocation.prototype['mcc'] = undefined;
164
+
165
+ /**
166
+ * @member {Number} mnc
167
+ */
168
+ TowerLocation.prototype['mnc'] = undefined;
169
+
170
+ /**
171
+ * @member {Number} lac
172
+ */
173
+ TowerLocation.prototype['lac'] = undefined;
174
+
175
+ /**
176
+ * @member {Number} cid
177
+ */
178
+ TowerLocation.prototype['cid'] = undefined;
179
+
180
+ /**
181
+ * Open location code
182
+ * @member {String} l
183
+ */
184
+ TowerLocation.prototype['l'] = undefined;
185
+
186
+ /**
187
+ * Timezone ID
188
+ * @member {Number} z
189
+ */
190
+ TowerLocation.prototype['z'] = undefined;
191
+
192
+ /**
193
+ * Number of times this location was recently used
194
+ * @member {Number} count
195
+ */
196
+ TowerLocation.prototype['count'] = undefined;
197
+
198
+ /**
199
+ * Number of triangulation points
200
+ * @member {Number} towers
201
+ */
202
+ TowerLocation.prototype['towers'] = undefined;
203
+ var _default = TowerLocation;
204
+ exports["default"] = _default;