@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,716 @@
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 _CreateProductRequest = _interopRequireDefault(require("../model/CreateProductRequest"));
9
+ var _CreateProjectRequest = _interopRequireDefault(require("../model/CreateProjectRequest"));
10
+ var _EnvironmentVariables = _interopRequireDefault(require("../model/EnvironmentVariables"));
11
+ var _Error = _interopRequireDefault(require("../model/Error"));
12
+ var _GetProjectDevicePublicKeys200Response = _interopRequireDefault(require("../model/GetProjectDevicePublicKeys200Response"));
13
+ var _GetProjectDevices200Response = _interopRequireDefault(require("../model/GetProjectDevices200Response"));
14
+ var _GetProjectEvents200Response = _interopRequireDefault(require("../model/GetProjectEvents200Response"));
15
+ var _GetProjectEventsByCursor200Response = _interopRequireDefault(require("../model/GetProjectEventsByCursor200Response"));
16
+ var _GetProjectMembers200Response = _interopRequireDefault(require("../model/GetProjectMembers200Response"));
17
+ var _GetProjectProducts200Response = _interopRequireDefault(require("../model/GetProjectProducts200Response"));
18
+ var _GetProjects200Response = _interopRequireDefault(require("../model/GetProjects200Response"));
19
+ var _Product = _interopRequireDefault(require("../model/Product"));
20
+ var _Project = _interopRequireDefault(require("../model/Project"));
21
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
22
+ 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); }
23
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
+ 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); } }
25
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
26
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
+ 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); }
28
+ /**
29
+ * Project service.
30
+ * @module api/ProjectApi
31
+ * @version 1.0.4
32
+ */
33
+ var ProjectApi = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new ProjectApi.
36
+ * @alias module:api/ProjectApi
37
+ * @class
38
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
+ * default to {@link module:ApiClient#instance} if unspecified.
40
+ */
41
+ function ProjectApi(apiClient) {
42
+ _classCallCheck(this, ProjectApi);
43
+ this.apiClient = apiClient || _ApiClient["default"].instance;
44
+ }
45
+
46
+ /**
47
+ * Create Product within a Project
48
+ * @param {String} projectUID
49
+ * @param {module:model/CreateProductRequest} createProductRequest Product to be created
50
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Product} and HTTP response
51
+ */
52
+ _createClass(ProjectApi, [{
53
+ key: "createProductWithHttpInfo",
54
+ value: function createProductWithHttpInfo(projectUID, createProductRequest) {
55
+ var postBody = createProductRequest;
56
+ // verify the required parameter 'projectUID' is set
57
+ if (projectUID === undefined || projectUID === null) {
58
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling createProduct");
59
+ }
60
+ // verify the required parameter 'createProductRequest' is set
61
+ if (createProductRequest === undefined || createProductRequest === null) {
62
+ throw new _Error["default"]("Missing the required parameter 'createProductRequest' when calling createProduct");
63
+ }
64
+ var pathParams = {
65
+ 'projectUID': projectUID
66
+ };
67
+ var queryParams = {};
68
+ var headerParams = {};
69
+ var formParams = {};
70
+ var authNames = ['api_key'];
71
+ var contentTypes = ['application/json'];
72
+ var accepts = ['application/json'];
73
+ var returnType = _Product["default"];
74
+ return this.apiClient.callApi('/v1/projects/{projectUID}/products', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
75
+ }
76
+
77
+ /**
78
+ * Create Product within a Project
79
+ * @param {String} projectUID
80
+ * @param {module:model/CreateProductRequest} createProductRequest Product to be created
81
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Product}
82
+ */
83
+ }, {
84
+ key: "createProduct",
85
+ value: function createProduct(projectUID, createProductRequest) {
86
+ return this.createProductWithHttpInfo(projectUID, createProductRequest).then(function (response_and_data) {
87
+ return response_and_data.data;
88
+ });
89
+ }
90
+
91
+ /**
92
+ * Create a Project
93
+ * @param {module:model/CreateProjectRequest} createProjectRequest Project to be created
94
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response
95
+ */
96
+ }, {
97
+ key: "createProjectWithHttpInfo",
98
+ value: function createProjectWithHttpInfo(createProjectRequest) {
99
+ var postBody = createProjectRequest;
100
+ // verify the required parameter 'createProjectRequest' is set
101
+ if (createProjectRequest === undefined || createProjectRequest === null) {
102
+ throw new _Error["default"]("Missing the required parameter 'createProjectRequest' when calling createProject");
103
+ }
104
+ var pathParams = {};
105
+ var queryParams = {};
106
+ var headerParams = {};
107
+ var formParams = {};
108
+ var authNames = ['api_key'];
109
+ var contentTypes = ['application/json'];
110
+ var accepts = ['application/json'];
111
+ var returnType = _Project["default"];
112
+ return this.apiClient.callApi('/v1/projects', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
113
+ }
114
+
115
+ /**
116
+ * Create a Project
117
+ * @param {module:model/CreateProjectRequest} createProjectRequest Project to be created
118
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project}
119
+ */
120
+ }, {
121
+ key: "createProject",
122
+ value: function createProject(createProjectRequest) {
123
+ return this.createProjectWithHttpInfo(createProjectRequest).then(function (response_and_data) {
124
+ return response_and_data.data;
125
+ });
126
+ }
127
+
128
+ /**
129
+ * Delete an environment variable of a project by key
130
+ * @param {String} projectUID
131
+ * @param {String} key The environment variable key to delete.
132
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
133
+ */
134
+ }, {
135
+ key: "deleteProjectEnvironmentVariableWithHttpInfo",
136
+ value: function deleteProjectEnvironmentVariableWithHttpInfo(projectUID, key) {
137
+ var postBody = null;
138
+ // verify the required parameter 'projectUID' is set
139
+ if (projectUID === undefined || projectUID === null) {
140
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling deleteProjectEnvironmentVariable");
141
+ }
142
+ // verify the required parameter 'key' is set
143
+ if (key === undefined || key === null) {
144
+ throw new _Error["default"]("Missing the required parameter 'key' when calling deleteProjectEnvironmentVariable");
145
+ }
146
+ var pathParams = {
147
+ 'projectUID': projectUID,
148
+ 'key': key
149
+ };
150
+ var queryParams = {};
151
+ var headerParams = {};
152
+ var formParams = {};
153
+ var authNames = ['api_key'];
154
+ var contentTypes = [];
155
+ var accepts = ['application/json'];
156
+ var returnType = _EnvironmentVariables["default"];
157
+ return this.apiClient.callApi('/v1/projects/{projectUID}/environment_variables/{key}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
158
+ }
159
+
160
+ /**
161
+ * Delete an environment variable of a project by key
162
+ * @param {String} projectUID
163
+ * @param {String} key The environment variable key to delete.
164
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
165
+ */
166
+ }, {
167
+ key: "deleteProjectEnvironmentVariable",
168
+ value: function deleteProjectEnvironmentVariable(projectUID, key) {
169
+ return this.deleteProjectEnvironmentVariableWithHttpInfo(projectUID, key).then(function (response_and_data) {
170
+ return response_and_data.data;
171
+ });
172
+ }
173
+
174
+ /**
175
+ * Get a Project by ProjectUID
176
+ * @param {String} projectUID
177
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response
178
+ */
179
+ }, {
180
+ key: "getProjectWithHttpInfo",
181
+ value: function getProjectWithHttpInfo(projectUID) {
182
+ var postBody = null;
183
+ // verify the required parameter 'projectUID' is set
184
+ if (projectUID === undefined || projectUID === null) {
185
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProject");
186
+ }
187
+ var pathParams = {
188
+ 'projectUID': projectUID
189
+ };
190
+ var queryParams = {};
191
+ var headerParams = {};
192
+ var formParams = {};
193
+ var authNames = ['api_key'];
194
+ var contentTypes = [];
195
+ var accepts = ['application/json'];
196
+ var returnType = _Project["default"];
197
+ return this.apiClient.callApi('/v1/projects/{projectUID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
198
+ }
199
+
200
+ /**
201
+ * Get a Project by ProjectUID
202
+ * @param {String} projectUID
203
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project}
204
+ */
205
+ }, {
206
+ key: "getProject",
207
+ value: function getProject(projectUID) {
208
+ return this.getProjectWithHttpInfo(projectUID).then(function (response_and_data) {
209
+ return response_and_data.data;
210
+ });
211
+ }
212
+
213
+ /**
214
+ * Get a Project by ProductUID
215
+ * @param {String} productUID
216
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response
217
+ */
218
+ }, {
219
+ key: "getProjectByProductWithHttpInfo",
220
+ value: function getProjectByProductWithHttpInfo(productUID) {
221
+ var postBody = null;
222
+ // verify the required parameter 'productUID' is set
223
+ if (productUID === undefined || productUID === null) {
224
+ throw new _Error["default"]("Missing the required parameter 'productUID' when calling getProjectByProduct");
225
+ }
226
+ var pathParams = {
227
+ 'productUID': productUID
228
+ };
229
+ var queryParams = {};
230
+ var headerParams = {};
231
+ var formParams = {};
232
+ var authNames = ['api_key'];
233
+ var contentTypes = [];
234
+ var accepts = ['application/json'];
235
+ var returnType = _Project["default"];
236
+ return this.apiClient.callApi('/v1/products/{productUID}/project', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
237
+ }
238
+
239
+ /**
240
+ * Get a Project by ProductUID
241
+ * @param {String} productUID
242
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project}
243
+ */
244
+ }, {
245
+ key: "getProjectByProduct",
246
+ value: function getProjectByProduct(productUID) {
247
+ return this.getProjectByProductWithHttpInfo(productUID).then(function (response_and_data) {
248
+ return response_and_data.data;
249
+ });
250
+ }
251
+
252
+ /**
253
+ * Get Device Public Keys of a Project
254
+ * @param {String} projectUID
255
+ * @param {Object} opts Optional parameters
256
+ * @param {Number} opts.pageSize (default to 50)
257
+ * @param {Number} opts.pageNum (default to 1)
258
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevicePublicKeys200Response} and HTTP response
259
+ */
260
+ }, {
261
+ key: "getProjectDevicePublicKeysWithHttpInfo",
262
+ value: function getProjectDevicePublicKeysWithHttpInfo(projectUID, opts) {
263
+ opts = opts || {};
264
+ var postBody = null;
265
+ // verify the required parameter 'projectUID' is set
266
+ if (projectUID === undefined || projectUID === null) {
267
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectDevicePublicKeys");
268
+ }
269
+ var pathParams = {
270
+ 'projectUID': projectUID
271
+ };
272
+ var queryParams = {
273
+ 'pageSize': opts['pageSize'],
274
+ 'pageNum': opts['pageNum']
275
+ };
276
+ var headerParams = {};
277
+ var formParams = {};
278
+ var authNames = ['api_key'];
279
+ var contentTypes = [];
280
+ var accepts = ['application/json'];
281
+ var returnType = _GetProjectDevicePublicKeys200Response["default"];
282
+ return this.apiClient.callApi('/v1/projects/{projectUID}/devices/public-keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
283
+ }
284
+
285
+ /**
286
+ * Get Device Public Keys of a Project
287
+ * @param {String} projectUID
288
+ * @param {Object} opts Optional parameters
289
+ * @param {Number} opts.pageSize (default to 50)
290
+ * @param {Number} opts.pageNum (default to 1)
291
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevicePublicKeys200Response}
292
+ */
293
+ }, {
294
+ key: "getProjectDevicePublicKeys",
295
+ value: function getProjectDevicePublicKeys(projectUID, opts) {
296
+ return this.getProjectDevicePublicKeysWithHttpInfo(projectUID, opts).then(function (response_and_data) {
297
+ return response_and_data.data;
298
+ });
299
+ }
300
+
301
+ /**
302
+ * Get Devices of a Project
303
+ * @param {String} projectUID
304
+ * @param {Object} opts Optional parameters
305
+ * @param {Number} opts.pageSize (default to 50)
306
+ * @param {Number} opts.pageNum (default to 1)
307
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevices200Response} and HTTP response
308
+ */
309
+ }, {
310
+ key: "getProjectDevicesWithHttpInfo",
311
+ value: function getProjectDevicesWithHttpInfo(projectUID, opts) {
312
+ opts = opts || {};
313
+ var postBody = null;
314
+ // verify the required parameter 'projectUID' is set
315
+ if (projectUID === undefined || projectUID === null) {
316
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectDevices");
317
+ }
318
+ var pathParams = {
319
+ 'projectUID': projectUID
320
+ };
321
+ var queryParams = {
322
+ 'pageSize': opts['pageSize'],
323
+ 'pageNum': opts['pageNum']
324
+ };
325
+ var headerParams = {};
326
+ var formParams = {};
327
+ var authNames = ['api_key'];
328
+ var contentTypes = [];
329
+ var accepts = ['application/json'];
330
+ var returnType = _GetProjectDevices200Response["default"];
331
+ return this.apiClient.callApi('/v1/projects/{projectUID}/devices', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
332
+ }
333
+
334
+ /**
335
+ * Get Devices of a Project
336
+ * @param {String} projectUID
337
+ * @param {Object} opts Optional parameters
338
+ * @param {Number} opts.pageSize (default to 50)
339
+ * @param {Number} opts.pageNum (default to 1)
340
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevices200Response}
341
+ */
342
+ }, {
343
+ key: "getProjectDevices",
344
+ value: function getProjectDevices(projectUID, opts) {
345
+ return this.getProjectDevicesWithHttpInfo(projectUID, opts).then(function (response_and_data) {
346
+ return response_and_data.data;
347
+ });
348
+ }
349
+
350
+ /**
351
+ * Get environment variables of a project
352
+ * @param {String} projectUID
353
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
354
+ */
355
+ }, {
356
+ key: "getProjectEnvironmentVariablesWithHttpInfo",
357
+ value: function getProjectEnvironmentVariablesWithHttpInfo(projectUID) {
358
+ var postBody = null;
359
+ // verify the required parameter 'projectUID' is set
360
+ if (projectUID === undefined || projectUID === null) {
361
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectEnvironmentVariables");
362
+ }
363
+ var pathParams = {
364
+ 'projectUID': projectUID
365
+ };
366
+ var queryParams = {};
367
+ var headerParams = {};
368
+ var formParams = {};
369
+ var authNames = ['api_key'];
370
+ var contentTypes = [];
371
+ var accepts = ['application/json'];
372
+ var returnType = _EnvironmentVariables["default"];
373
+ return this.apiClient.callApi('/v1/projects/{projectUID}/environment_variables', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
374
+ }
375
+
376
+ /**
377
+ * Get environment variables of a project
378
+ * @param {String} projectUID
379
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
380
+ */
381
+ }, {
382
+ key: "getProjectEnvironmentVariables",
383
+ value: function getProjectEnvironmentVariables(projectUID) {
384
+ return this.getProjectEnvironmentVariablesWithHttpInfo(projectUID).then(function (response_and_data) {
385
+ return response_and_data.data;
386
+ });
387
+ }
388
+
389
+ /**
390
+ * Get Events of a Project
391
+ * @param {String} projectUID
392
+ * @param {Object} opts Optional parameters
393
+ * @param {Number} opts.pageSize (default to 50)
394
+ * @param {Number} opts.pageNum (default to 1)
395
+ * @param {Array.<String>} opts.deviceUIDs A comma separated list of Device UIDs.
396
+ * @param {module:model/String} opts.sortBy (default to 'captured')
397
+ * @param {module:model/String} opts.sortOrder (default to 'asc')
398
+ * @param {Number} opts.startDate Unix timestamp
399
+ * @param {Number} opts.endDate Unix timestamp
400
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEvents200Response} and HTTP response
401
+ */
402
+ }, {
403
+ key: "getProjectEventsWithHttpInfo",
404
+ value: function getProjectEventsWithHttpInfo(projectUID, opts) {
405
+ opts = opts || {};
406
+ var postBody = null;
407
+ // verify the required parameter 'projectUID' is set
408
+ if (projectUID === undefined || projectUID === null) {
409
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectEvents");
410
+ }
411
+ var pathParams = {
412
+ 'projectUID': projectUID
413
+ };
414
+ var queryParams = {
415
+ 'pageSize': opts['pageSize'],
416
+ 'pageNum': opts['pageNum'],
417
+ 'deviceUIDs': this.apiClient.buildCollectionParam(opts['deviceUIDs'], 'csv'),
418
+ 'sortBy': opts['sortBy'],
419
+ 'sortOrder': opts['sortOrder'],
420
+ 'startDate': opts['startDate'],
421
+ 'endDate': opts['endDate']
422
+ };
423
+ var headerParams = {};
424
+ var formParams = {};
425
+ var authNames = ['api_key'];
426
+ var contentTypes = [];
427
+ var accepts = ['application/json'];
428
+ var returnType = _GetProjectEvents200Response["default"];
429
+ return this.apiClient.callApi('/v1/projects/{projectUID}/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
430
+ }
431
+
432
+ /**
433
+ * Get Events of a Project
434
+ * @param {String} projectUID
435
+ * @param {Object} opts Optional parameters
436
+ * @param {Number} opts.pageSize (default to 50)
437
+ * @param {Number} opts.pageNum (default to 1)
438
+ * @param {Array.<String>} opts.deviceUIDs A comma separated list of Device UIDs.
439
+ * @param {module:model/String} opts.sortBy (default to 'captured')
440
+ * @param {module:model/String} opts.sortOrder (default to 'asc')
441
+ * @param {Number} opts.startDate Unix timestamp
442
+ * @param {Number} opts.endDate Unix timestamp
443
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEvents200Response}
444
+ */
445
+ }, {
446
+ key: "getProjectEvents",
447
+ value: function getProjectEvents(projectUID, opts) {
448
+ return this.getProjectEventsWithHttpInfo(projectUID, opts).then(function (response_and_data) {
449
+ return response_and_data.data;
450
+ });
451
+ }
452
+
453
+ /**
454
+ * Get Events of a Project by cursor
455
+ * @param {String} projectUID
456
+ * @param {Object} opts Optional parameters
457
+ * @param {Number} opts.limit (default to 50)
458
+ * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
459
+ * @param {module:model/String} opts.sortOrder (default to 'asc')
460
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEventsByCursor200Response} and HTTP response
461
+ */
462
+ }, {
463
+ key: "getProjectEventsByCursorWithHttpInfo",
464
+ value: function getProjectEventsByCursorWithHttpInfo(projectUID, opts) {
465
+ opts = opts || {};
466
+ var postBody = null;
467
+ // verify the required parameter 'projectUID' is set
468
+ if (projectUID === undefined || projectUID === null) {
469
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectEventsByCursor");
470
+ }
471
+ var pathParams = {
472
+ 'projectUID': projectUID
473
+ };
474
+ var queryParams = {
475
+ 'limit': opts['limit'],
476
+ 'cursor': opts['cursor'],
477
+ 'sortOrder': opts['sortOrder']
478
+ };
479
+ var headerParams = {};
480
+ var formParams = {};
481
+ var authNames = ['api_key'];
482
+ var contentTypes = [];
483
+ var accepts = ['application/json'];
484
+ var returnType = _GetProjectEventsByCursor200Response["default"];
485
+ return this.apiClient.callApi('/v1/projects/{projectUID}/events-cursor', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
486
+ }
487
+
488
+ /**
489
+ * Get Events of a Project by cursor
490
+ * @param {String} projectUID
491
+ * @param {Object} opts Optional parameters
492
+ * @param {Number} opts.limit (default to 50)
493
+ * @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
494
+ * @param {module:model/String} opts.sortOrder (default to 'asc')
495
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEventsByCursor200Response}
496
+ */
497
+ }, {
498
+ key: "getProjectEventsByCursor",
499
+ value: function getProjectEventsByCursor(projectUID, opts) {
500
+ return this.getProjectEventsByCursorWithHttpInfo(projectUID, opts).then(function (response_and_data) {
501
+ return response_and_data.data;
502
+ });
503
+ }
504
+
505
+ /**
506
+ * Get Devices of a Fleet within a Project
507
+ * @param {String} projectUID
508
+ * @param {String} fleetUID
509
+ * @param {Object} opts Optional parameters
510
+ * @param {Number} opts.pageSize (default to 50)
511
+ * @param {Number} opts.pageNum (default to 1)
512
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevices200Response} and HTTP response
513
+ */
514
+ }, {
515
+ key: "getProjectFleetDevicesWithHttpInfo",
516
+ value: function getProjectFleetDevicesWithHttpInfo(projectUID, fleetUID, opts) {
517
+ opts = opts || {};
518
+ var postBody = null;
519
+ // verify the required parameter 'projectUID' is set
520
+ if (projectUID === undefined || projectUID === null) {
521
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectFleetDevices");
522
+ }
523
+ // verify the required parameter 'fleetUID' is set
524
+ if (fleetUID === undefined || fleetUID === null) {
525
+ throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getProjectFleetDevices");
526
+ }
527
+ var pathParams = {
528
+ 'projectUID': projectUID,
529
+ 'fleetUID': fleetUID
530
+ };
531
+ var queryParams = {
532
+ 'pageSize': opts['pageSize'],
533
+ 'pageNum': opts['pageNum']
534
+ };
535
+ var headerParams = {};
536
+ var formParams = {};
537
+ var authNames = ['api_key'];
538
+ var contentTypes = [];
539
+ var accepts = ['application/json'];
540
+ var returnType = _GetProjectDevices200Response["default"];
541
+ return this.apiClient.callApi('/v1/projects/{projectUID}/fleets/{fleetUID}/devices', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
542
+ }
543
+
544
+ /**
545
+ * Get Devices of a Fleet within a Project
546
+ * @param {String} projectUID
547
+ * @param {String} fleetUID
548
+ * @param {Object} opts Optional parameters
549
+ * @param {Number} opts.pageSize (default to 50)
550
+ * @param {Number} opts.pageNum (default to 1)
551
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevices200Response}
552
+ */
553
+ }, {
554
+ key: "getProjectFleetDevices",
555
+ value: function getProjectFleetDevices(projectUID, fleetUID, opts) {
556
+ return this.getProjectFleetDevicesWithHttpInfo(projectUID, fleetUID, opts).then(function (response_and_data) {
557
+ return response_and_data.data;
558
+ });
559
+ }
560
+
561
+ /**
562
+ * Get Project Members
563
+ * @param {String} projectUID
564
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectMembers200Response} and HTTP response
565
+ */
566
+ }, {
567
+ key: "getProjectMembersWithHttpInfo",
568
+ value: function getProjectMembersWithHttpInfo(projectUID) {
569
+ var postBody = null;
570
+ // verify the required parameter 'projectUID' is set
571
+ if (projectUID === undefined || projectUID === null) {
572
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectMembers");
573
+ }
574
+ var pathParams = {
575
+ 'projectUID': projectUID
576
+ };
577
+ var queryParams = {};
578
+ var headerParams = {};
579
+ var formParams = {};
580
+ var authNames = ['api_key'];
581
+ var contentTypes = [];
582
+ var accepts = ['application/json'];
583
+ var returnType = _GetProjectMembers200Response["default"];
584
+ return this.apiClient.callApi('/v1/projects/{projectUID}/members', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
585
+ }
586
+
587
+ /**
588
+ * Get Project Members
589
+ * @param {String} projectUID
590
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectMembers200Response}
591
+ */
592
+ }, {
593
+ key: "getProjectMembers",
594
+ value: function getProjectMembers(projectUID) {
595
+ return this.getProjectMembersWithHttpInfo(projectUID).then(function (response_and_data) {
596
+ return response_and_data.data;
597
+ });
598
+ }
599
+
600
+ /**
601
+ * Get Products within a Project
602
+ * @param {String} projectUID
603
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectProducts200Response} and HTTP response
604
+ */
605
+ }, {
606
+ key: "getProjectProductsWithHttpInfo",
607
+ value: function getProjectProductsWithHttpInfo(projectUID) {
608
+ var postBody = null;
609
+ // verify the required parameter 'projectUID' is set
610
+ if (projectUID === undefined || projectUID === null) {
611
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectProducts");
612
+ }
613
+ var pathParams = {
614
+ 'projectUID': projectUID
615
+ };
616
+ var queryParams = {};
617
+ var headerParams = {};
618
+ var formParams = {};
619
+ var authNames = ['api_key'];
620
+ var contentTypes = [];
621
+ var accepts = ['application/json'];
622
+ var returnType = _GetProjectProducts200Response["default"];
623
+ return this.apiClient.callApi('/v1/projects/{projectUID}/products', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
624
+ }
625
+
626
+ /**
627
+ * Get Products within a Project
628
+ * @param {String} projectUID
629
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectProducts200Response}
630
+ */
631
+ }, {
632
+ key: "getProjectProducts",
633
+ value: function getProjectProducts(projectUID) {
634
+ return this.getProjectProductsWithHttpInfo(projectUID).then(function (response_and_data) {
635
+ return response_and_data.data;
636
+ });
637
+ }
638
+
639
+ /**
640
+ * Get Projects accessible by the api_key
641
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjects200Response} and HTTP response
642
+ */
643
+ }, {
644
+ key: "getProjectsWithHttpInfo",
645
+ value: function getProjectsWithHttpInfo() {
646
+ var postBody = null;
647
+ var pathParams = {};
648
+ var queryParams = {};
649
+ var headerParams = {};
650
+ var formParams = {};
651
+ var authNames = ['api_key'];
652
+ var contentTypes = [];
653
+ var accepts = ['application/json'];
654
+ var returnType = _GetProjects200Response["default"];
655
+ return this.apiClient.callApi('/v1/projects', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
656
+ }
657
+
658
+ /**
659
+ * Get Projects accessible by the api_key
660
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjects200Response}
661
+ */
662
+ }, {
663
+ key: "getProjects",
664
+ value: function getProjects() {
665
+ return this.getProjectsWithHttpInfo().then(function (response_and_data) {
666
+ return response_and_data.data;
667
+ });
668
+ }
669
+
670
+ /**
671
+ * Put environment variables of a project
672
+ * @param {String} projectUID
673
+ * @param {Object} opts Optional parameters
674
+ * @param {module:model/EnvironmentVariables} opts.environmentVariables
675
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
676
+ */
677
+ }, {
678
+ key: "putProjectEnvironmentVariablesWithHttpInfo",
679
+ value: function putProjectEnvironmentVariablesWithHttpInfo(projectUID, opts) {
680
+ opts = opts || {};
681
+ var postBody = opts['environmentVariables'];
682
+ // verify the required parameter 'projectUID' is set
683
+ if (projectUID === undefined || projectUID === null) {
684
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling putProjectEnvironmentVariables");
685
+ }
686
+ var pathParams = {
687
+ 'projectUID': projectUID
688
+ };
689
+ var queryParams = {};
690
+ var headerParams = {};
691
+ var formParams = {};
692
+ var authNames = ['api_key'];
693
+ var contentTypes = ['application/json'];
694
+ var accepts = ['application/json'];
695
+ var returnType = _EnvironmentVariables["default"];
696
+ return this.apiClient.callApi('/v1/projects/{projectUID}/environment_variables', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
697
+ }
698
+
699
+ /**
700
+ * Put environment variables of a project
701
+ * @param {String} projectUID
702
+ * @param {Object} opts Optional parameters
703
+ * @param {module:model/EnvironmentVariables} opts.environmentVariables
704
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
705
+ */
706
+ }, {
707
+ key: "putProjectEnvironmentVariables",
708
+ value: function putProjectEnvironmentVariables(projectUID, opts) {
709
+ return this.putProjectEnvironmentVariablesWithHttpInfo(projectUID, opts).then(function (response_and_data) {
710
+ return response_and_data.data;
711
+ });
712
+ }
713
+ }]);
714
+ return ProjectApi;
715
+ }();
716
+ exports["default"] = ProjectApi;