@blues-inc/notehub-js 1.0.19 → 1.0.20

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 (100) hide show
  1. package/README.md +86 -96
  2. package/dist/ApiClient.js +18 -9
  3. package/dist/api/AlertApi.js +95 -0
  4. package/dist/api/AuthorizationApi.js +18 -9
  5. package/dist/api/BillingAccountApi.js +18 -9
  6. package/dist/api/DeviceApi.js +904 -182
  7. package/dist/api/EventApi.js +68 -9
  8. package/dist/api/FirmwareApi.js +109 -0
  9. package/dist/api/MonitorApi.js +275 -0
  10. package/dist/api/ProjectApi.js +435 -286
  11. package/dist/api/RouteApi.js +96 -9
  12. package/dist/index.js +76 -41
  13. package/dist/model/Alert.js +259 -0
  14. package/dist/model/AlertDataInner.js +184 -0
  15. package/dist/model/AlertNotificationsInner.js +132 -0
  16. package/dist/model/Aws.js +17 -8
  17. package/dist/model/Azure.js +17 -8
  18. package/dist/model/BillingAccount.js +17 -8
  19. package/dist/model/BillingAccountRole.js +29 -8
  20. package/dist/model/Body.js +17 -8
  21. package/dist/model/CloneProjectRequest.js +17 -8
  22. package/dist/model/Contact.js +17 -8
  23. package/dist/model/CreateFleetRequest.js +17 -8
  24. package/dist/model/CreateMonitor.js +428 -0
  25. package/dist/model/CreateProductRequest.js +17 -8
  26. package/dist/model/CreateProjectRequest.js +17 -8
  27. package/dist/model/DFUEnv.js +17 -8
  28. package/dist/model/DFUState.js +17 -8
  29. package/dist/model/DeleteDeviceFleetsRequest.js +17 -8
  30. package/dist/model/Device.js +21 -14
  31. package/dist/model/DeviceSession.js +17 -8
  32. package/dist/model/DeviceTowerInfo.js +17 -8
  33. package/dist/model/DeviceUsage.js +17 -8
  34. package/dist/model/EnvironmentVariables.js +17 -8
  35. package/dist/model/Error.js +17 -8
  36. package/dist/model/Event.js +17 -8
  37. package/dist/model/FirmwareInfo.js +231 -0
  38. package/dist/model/Fleet.js +17 -8
  39. package/dist/model/GetAlerts200Response.js +143 -0
  40. package/dist/model/GetBillingAccounts200Response.js +17 -8
  41. package/dist/model/GetDeviceEnvironmentVariables200Response.js +17 -8
  42. package/dist/model/GetDeviceHealthLog200Response.js +17 -8
  43. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +17 -8
  44. package/dist/model/GetDeviceLatest200Response.js +17 -8
  45. package/dist/model/GetDevicePublicKey200Response.js +17 -8
  46. package/dist/model/GetDeviceSessions200Response.js +17 -8
  47. package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -8
  48. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +17 -8
  49. package/dist/model/GetProjectDevices200Response.js +17 -8
  50. package/dist/model/GetProjectEvents200Response.js +21 -27
  51. package/dist/model/GetProjectEventsByCursor200Response.js +17 -8
  52. package/dist/model/GetProjectFleets200Response.js +17 -8
  53. package/dist/model/GetProjectMembers200Response.js +17 -8
  54. package/dist/model/GetProjectProducts200Response.js +17 -8
  55. package/dist/model/GetProjects200Response.js +17 -8
  56. package/dist/model/GetRouteLogsByRoute200ResponseInner.js +17 -8
  57. package/dist/model/Google.js +17 -8
  58. package/dist/model/HandleNoteChanges200Response.js +17 -8
  59. package/dist/model/HandleNoteGet200Response.js +17 -8
  60. package/dist/model/HandleNoteSignal200Response.js +17 -8
  61. package/dist/model/HandleNotefileChanges200Response.js +17 -8
  62. package/dist/model/HandleNotefileChangesPending200Response.js +17 -8
  63. package/dist/model/HandleNotefileDeleteRequest.js +17 -8
  64. package/dist/model/Http.js +17 -8
  65. package/dist/model/HttpFilter.js +17 -8
  66. package/dist/model/HttpTransform.js +17 -8
  67. package/dist/model/Location.js +17 -8
  68. package/dist/model/Login200Response.js +17 -8
  69. package/dist/model/LoginRequest.js +17 -8
  70. package/dist/model/Monitor.js +328 -0
  71. package/dist/model/MonitorAlertRoutesInner.js +92 -0
  72. package/dist/model/MonitorThresholds.js +88 -0
  73. package/dist/model/Mqtt.js +17 -8
  74. package/dist/model/Note.js +17 -8
  75. package/dist/model/PostProvisionProjectDeviceRequest.js +17 -8
  76. package/dist/model/Product.js +17 -8
  77. package/dist/model/Project.js +17 -8
  78. package/dist/model/ProjectMember.js +17 -8
  79. package/dist/model/Proxy.js +17 -8
  80. package/dist/model/PutDeviceFleetsRequest.js +17 -8
  81. package/dist/model/Radresponder.js +17 -8
  82. package/dist/model/Role.js +37 -8
  83. package/dist/model/Route.js +17 -8
  84. package/dist/model/RouteSchema.js +29 -14
  85. package/dist/model/Slack.js +17 -8
  86. package/dist/model/Snowflake.js +17 -8
  87. package/dist/model/SnowflakeTransform.js +17 -8
  88. package/dist/model/Thingworx.js +17 -8
  89. package/dist/model/TowerLocation.js +17 -8
  90. package/dist/model/Twilio.js +17 -8
  91. package/dist/model/UpdateFleetRequest.js +17 -8
  92. package/dist/model/UserDbRoute.js +17 -8
  93. package/package.json +1 -1
  94. package/dist/api/DevicesApi.js +0 -346
  95. package/dist/api/EnvironmentVariablesApi.js +0 -567
  96. package/dist/api/FilesApi.js +0 -193
  97. package/dist/api/FleetApi.js +0 -736
  98. package/dist/api/NotesApi.js +0 -435
  99. package/dist/api/ProductApi.js +0 -163
  100. package/dist/api/RouteLogsApi.js +0 -160
@@ -1,736 +0,0 @@
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 _CreateFleetRequest = _interopRequireDefault(require("../model/CreateFleetRequest"));
9
- var _DeleteDeviceFleetsRequest = _interopRequireDefault(require("../model/DeleteDeviceFleetsRequest"));
10
- var _EnvironmentVariables = _interopRequireDefault(require("../model/EnvironmentVariables"));
11
- var _Error = _interopRequireDefault(require("../model/Error"));
12
- var _Fleet = _interopRequireDefault(require("../model/Fleet"));
13
- var _GetProjectDevices200Response = _interopRequireDefault(require("../model/GetProjectDevices200Response"));
14
- var _GetProjectEvents200Response = _interopRequireDefault(require("../model/GetProjectEvents200Response"));
15
- var _GetProjectEventsByCursor200Response = _interopRequireDefault(require("../model/GetProjectEventsByCursor200Response"));
16
- var _GetProjectFleets200Response = _interopRequireDefault(require("../model/GetProjectFleets200Response"));
17
- var _PutDeviceFleetsRequest = _interopRequireDefault(require("../model/PutDeviceFleetsRequest"));
18
- var _UpdateFleetRequest = _interopRequireDefault(require("../model/UpdateFleetRequest"));
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
- 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); }
21
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22
- 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); } }
23
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
24
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
25
- 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); }
26
- /**
27
- * Fleet service.
28
- * @module api/FleetApi
29
- * @version 1.0.19
30
- */
31
- var FleetApi = /*#__PURE__*/function () {
32
- /**
33
- * Constructs a new FleetApi.
34
- * @alias module:api/FleetApi
35
- * @class
36
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
37
- * default to {@link module:ApiClient#instance} if unspecified.
38
- */
39
- function FleetApi(apiClient) {
40
- _classCallCheck(this, FleetApi);
41
- this.apiClient = apiClient || _ApiClient["default"].instance;
42
- }
43
-
44
- /**
45
- * Create Fleet
46
- * @param {String} projectUID
47
- * @param {module:model/CreateFleetRequest} createFleetRequest Fleet to be added
48
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Fleet} and HTTP response
49
- */
50
- _createClass(FleetApi, [{
51
- key: "createFleetWithHttpInfo",
52
- value: function createFleetWithHttpInfo(projectUID, createFleetRequest) {
53
- var postBody = createFleetRequest;
54
- // verify the required parameter 'projectUID' is set
55
- if (projectUID === undefined || projectUID === null) {
56
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling createFleet");
57
- }
58
- // verify the required parameter 'createFleetRequest' is set
59
- if (createFleetRequest === undefined || createFleetRequest === null) {
60
- throw new _Error["default"]("Missing the required parameter 'createFleetRequest' when calling createFleet");
61
- }
62
- var pathParams = {
63
- projectUID: projectUID
64
- };
65
- var queryParams = {};
66
- var headerParams = {};
67
- var formParams = {};
68
- var authNames = ["api_key"];
69
- var contentTypes = ["application/json"];
70
- var accepts = ["application/json"];
71
- var returnType = _Fleet["default"];
72
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
73
- }
74
-
75
- /**
76
- * Create Fleet
77
- * @param {String} projectUID
78
- * @param {module:model/CreateFleetRequest} createFleetRequest Fleet to be added
79
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Fleet}
80
- */
81
- }, {
82
- key: "createFleet",
83
- value: function createFleet(projectUID, createFleetRequest) {
84
- return this.createFleetWithHttpInfo(projectUID, createFleetRequest).then(function (response_and_data) {
85
- return response_and_data.data;
86
- });
87
- }
88
-
89
- /**
90
- * Remove Device from Fleets
91
- * @param {String} projectUID
92
- * @param {String} deviceUID
93
- * @param {module:model/DeleteDeviceFleetsRequest} deleteDeviceFleetsRequest The fleets to remove from the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
94
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectFleets200Response} and HTTP response
95
- */
96
- }, {
97
- key: "deleteDeviceFleetsWithHttpInfo",
98
- value: function deleteDeviceFleetsWithHttpInfo(projectUID, deviceUID, deleteDeviceFleetsRequest) {
99
- var postBody = deleteDeviceFleetsRequest;
100
- // verify the required parameter 'projectUID' is set
101
- if (projectUID === undefined || projectUID === null) {
102
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling deleteDeviceFleets");
103
- }
104
- // verify the required parameter 'deviceUID' is set
105
- if (deviceUID === undefined || deviceUID === null) {
106
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling deleteDeviceFleets");
107
- }
108
- // verify the required parameter 'deleteDeviceFleetsRequest' is set
109
- if (deleteDeviceFleetsRequest === undefined || deleteDeviceFleetsRequest === null) {
110
- throw new _Error["default"]("Missing the required parameter 'deleteDeviceFleetsRequest' when calling deleteDeviceFleets");
111
- }
112
- var pathParams = {
113
- projectUID: projectUID,
114
- deviceUID: deviceUID
115
- };
116
- var queryParams = {};
117
- var headerParams = {};
118
- var formParams = {};
119
- var authNames = ["api_key"];
120
- var contentTypes = ["application/json"];
121
- var accepts = ["application/json"];
122
- var returnType = _GetProjectFleets200Response["default"];
123
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/fleets", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
124
- }
125
-
126
- /**
127
- * Remove Device from Fleets
128
- * @param {String} projectUID
129
- * @param {String} deviceUID
130
- * @param {module:model/DeleteDeviceFleetsRequest} deleteDeviceFleetsRequest The fleets to remove from the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
131
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectFleets200Response}
132
- */
133
- }, {
134
- key: "deleteDeviceFleets",
135
- value: function deleteDeviceFleets(projectUID, deviceUID, deleteDeviceFleetsRequest) {
136
- return this.deleteDeviceFleetsWithHttpInfo(projectUID, deviceUID, deleteDeviceFleetsRequest).then(function (response_and_data) {
137
- return response_and_data.data;
138
- });
139
- }
140
-
141
- /**
142
- * Delete Fleet
143
- * @param {String} projectUID
144
- * @param {String} fleetUID
145
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
146
- */
147
- }, {
148
- key: "deleteFleetWithHttpInfo",
149
- value: function deleteFleetWithHttpInfo(projectUID, fleetUID) {
150
- var postBody = null;
151
- // verify the required parameter 'projectUID' is set
152
- if (projectUID === undefined || projectUID === null) {
153
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling deleteFleet");
154
- }
155
- // verify the required parameter 'fleetUID' is set
156
- if (fleetUID === undefined || fleetUID === null) {
157
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling deleteFleet");
158
- }
159
- var pathParams = {
160
- projectUID: projectUID,
161
- fleetUID: fleetUID
162
- };
163
- var queryParams = {};
164
- var headerParams = {};
165
- var formParams = {};
166
- var authNames = ["api_key"];
167
- var contentTypes = [];
168
- var accepts = ["application/json"];
169
- var returnType = null;
170
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
171
- }
172
-
173
- /**
174
- * Delete Fleet
175
- * @param {String} projectUID
176
- * @param {String} fleetUID
177
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
178
- */
179
- }, {
180
- key: "deleteFleet",
181
- value: function deleteFleet(projectUID, fleetUID) {
182
- return this.deleteFleetWithHttpInfo(projectUID, fleetUID).then(function (response_and_data) {
183
- return response_and_data.data;
184
- });
185
- }
186
-
187
- /**
188
- * Delete environment variables of a fleet
189
- * @param {String} projectUID
190
- * @param {String} fleetUID
191
- * @param {String} key The environment variable key to delete.
192
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
193
- */
194
- }, {
195
- key: "deleteFleetEnvironmentVariableWithHttpInfo",
196
- value: function deleteFleetEnvironmentVariableWithHttpInfo(projectUID, fleetUID, key) {
197
- var postBody = null;
198
- // verify the required parameter 'projectUID' is set
199
- if (projectUID === undefined || projectUID === null) {
200
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling deleteFleetEnvironmentVariable");
201
- }
202
- // verify the required parameter 'fleetUID' is set
203
- if (fleetUID === undefined || fleetUID === null) {
204
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling deleteFleetEnvironmentVariable");
205
- }
206
- // verify the required parameter 'key' is set
207
- if (key === undefined || key === null) {
208
- throw new _Error["default"]("Missing the required parameter 'key' when calling deleteFleetEnvironmentVariable");
209
- }
210
- var pathParams = {
211
- projectUID: projectUID,
212
- fleetUID: fleetUID,
213
- key: key
214
- };
215
- var queryParams = {};
216
- var headerParams = {};
217
- var formParams = {};
218
- var authNames = ["api_key"];
219
- var contentTypes = [];
220
- var accepts = ["application/json"];
221
- var returnType = _EnvironmentVariables["default"];
222
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
223
- }
224
-
225
- /**
226
- * Delete environment variables of a fleet
227
- * @param {String} projectUID
228
- * @param {String} fleetUID
229
- * @param {String} key The environment variable key to delete.
230
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
231
- */
232
- }, {
233
- key: "deleteFleetEnvironmentVariable",
234
- value: function deleteFleetEnvironmentVariable(projectUID, fleetUID, key) {
235
- return this.deleteFleetEnvironmentVariableWithHttpInfo(projectUID, fleetUID, key).then(function (response_and_data) {
236
- return response_and_data.data;
237
- });
238
- }
239
-
240
- /**
241
- * Get Device Fleets
242
- * @param {String} projectUID
243
- * @param {String} deviceUID
244
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectFleets200Response} and HTTP response
245
- */
246
- }, {
247
- key: "getDeviceFleetsWithHttpInfo",
248
- value: function getDeviceFleetsWithHttpInfo(projectUID, deviceUID) {
249
- var postBody = null;
250
- // verify the required parameter 'projectUID' is set
251
- if (projectUID === undefined || projectUID === null) {
252
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getDeviceFleets");
253
- }
254
- // verify the required parameter 'deviceUID' is set
255
- if (deviceUID === undefined || deviceUID === null) {
256
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceFleets");
257
- }
258
- var pathParams = {
259
- projectUID: projectUID,
260
- deviceUID: deviceUID
261
- };
262
- var queryParams = {};
263
- var headerParams = {};
264
- var formParams = {};
265
- var authNames = ["api_key"];
266
- var contentTypes = [];
267
- var accepts = ["application/json"];
268
- var returnType = _GetProjectFleets200Response["default"];
269
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/fleets", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
270
- }
271
-
272
- /**
273
- * Get Device Fleets
274
- * @param {String} projectUID
275
- * @param {String} deviceUID
276
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectFleets200Response}
277
- */
278
- }, {
279
- key: "getDeviceFleets",
280
- value: function getDeviceFleets(projectUID, deviceUID) {
281
- return this.getDeviceFleetsWithHttpInfo(projectUID, deviceUID).then(function (response_and_data) {
282
- return response_and_data.data;
283
- });
284
- }
285
-
286
- /**
287
- * Get environment variables of a fleet
288
- * @param {String} projectUID
289
- * @param {String} fleetUID
290
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
291
- */
292
- }, {
293
- key: "getFleetEnvironmentVariablesWithHttpInfo",
294
- value: function getFleetEnvironmentVariablesWithHttpInfo(projectUID, fleetUID) {
295
- var postBody = null;
296
- // verify the required parameter 'projectUID' is set
297
- if (projectUID === undefined || projectUID === null) {
298
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getFleetEnvironmentVariables");
299
- }
300
- // verify the required parameter 'fleetUID' is set
301
- if (fleetUID === undefined || fleetUID === null) {
302
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEnvironmentVariables");
303
- }
304
- var pathParams = {
305
- projectUID: projectUID,
306
- fleetUID: fleetUID
307
- };
308
- var queryParams = {};
309
- var headerParams = {};
310
- var formParams = {};
311
- var authNames = ["api_key"];
312
- var contentTypes = [];
313
- var accepts = ["application/json"];
314
- var returnType = _EnvironmentVariables["default"];
315
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
316
- }
317
-
318
- /**
319
- * Get environment variables of a fleet
320
- * @param {String} projectUID
321
- * @param {String} fleetUID
322
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
323
- */
324
- }, {
325
- key: "getFleetEnvironmentVariables",
326
- value: function getFleetEnvironmentVariables(projectUID, fleetUID) {
327
- return this.getFleetEnvironmentVariablesWithHttpInfo(projectUID, fleetUID).then(function (response_and_data) {
328
- return response_and_data.data;
329
- });
330
- }
331
-
332
- /**
333
- * Get Events of a Fleet
334
- * @param {String} projectUID
335
- * @param {String} fleetUID
336
- * @param {Object} opts Optional parameters
337
- * @param {Number} opts.pageSize (default to 50)
338
- * @param {Number} opts.pageNum (default to 1)
339
- * @param {String} opts.deviceUID A Device UID.
340
- * @param {module:model/String} opts.sortBy (default to 'captured')
341
- * @param {module:model/String} opts.sortOrder (default to 'asc')
342
- * @param {Number} opts.startDate Unix timestamp
343
- * @param {Number} opts.endDate Unix timestamp
344
- * @param {Boolean} opts.systemFilesOnly
345
- * @param {String} opts.files
346
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEvents200Response} and HTTP response
347
- */
348
- }, {
349
- key: "getFleetEventsWithHttpInfo",
350
- value: function getFleetEventsWithHttpInfo(projectUID, fleetUID, opts) {
351
- opts = opts || {};
352
- var postBody = null;
353
- // verify the required parameter 'projectUID' is set
354
- if (projectUID === undefined || projectUID === null) {
355
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getFleetEvents");
356
- }
357
- // verify the required parameter 'fleetUID' is set
358
- if (fleetUID === undefined || fleetUID === null) {
359
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEvents");
360
- }
361
- var pathParams = {
362
- projectUID: projectUID,
363
- fleetUID: fleetUID
364
- };
365
- var queryParams = {
366
- pageSize: opts["pageSize"],
367
- pageNum: opts["pageNum"],
368
- deviceUID: opts["deviceUID"],
369
- sortBy: opts["sortBy"],
370
- sortOrder: opts["sortOrder"],
371
- startDate: opts["startDate"],
372
- endDate: opts["endDate"],
373
- systemFilesOnly: opts["systemFilesOnly"],
374
- files: opts["files"]
375
- };
376
- var headerParams = {};
377
- var formParams = {};
378
- var authNames = ["api_key"];
379
- var contentTypes = [];
380
- var accepts = ["application/json"];
381
- var returnType = _GetProjectEvents200Response["default"];
382
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}/events", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
383
- }
384
-
385
- /**
386
- * Get Events of a Fleet
387
- * @param {String} projectUID
388
- * @param {String} fleetUID
389
- * @param {Object} opts Optional parameters
390
- * @param {Number} opts.pageSize (default to 50)
391
- * @param {Number} opts.pageNum (default to 1)
392
- * @param {String} opts.deviceUID A Device UID.
393
- * @param {module:model/String} opts.sortBy (default to 'captured')
394
- * @param {module:model/String} opts.sortOrder (default to 'asc')
395
- * @param {Number} opts.startDate Unix timestamp
396
- * @param {Number} opts.endDate Unix timestamp
397
- * @param {Boolean} opts.systemFilesOnly
398
- * @param {String} opts.files
399
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEvents200Response}
400
- */
401
- }, {
402
- key: "getFleetEvents",
403
- value: function getFleetEvents(projectUID, fleetUID, opts) {
404
- return this.getFleetEventsWithHttpInfo(projectUID, fleetUID, opts).then(function (response_and_data) {
405
- return response_and_data.data;
406
- });
407
- }
408
-
409
- /**
410
- * Get Events of a Fleet by cursor
411
- * @param {String} projectUID
412
- * @param {String} fleetUID
413
- * @param {Object} opts Optional parameters
414
- * @param {Number} opts.limit (default to 50)
415
- * @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.
416
- * @param {module:model/String} opts.sortOrder (default to 'asc')
417
- * @param {Boolean} opts.systemFilesOnly
418
- * @param {String} opts.files
419
- * @param {String} opts.deviceUID A Device UID.
420
- * @param {Number} opts.startDate Unix timestamp
421
- * @param {Number} opts.endDate Unix timestamp
422
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEventsByCursor200Response} and HTTP response
423
- */
424
- }, {
425
- key: "getFleetEventsByCursorWithHttpInfo",
426
- value: function getFleetEventsByCursorWithHttpInfo(projectUID, fleetUID, opts) {
427
- opts = opts || {};
428
- var postBody = null;
429
- // verify the required parameter 'projectUID' is set
430
- if (projectUID === undefined || projectUID === null) {
431
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getFleetEventsByCursor");
432
- }
433
- // verify the required parameter 'fleetUID' is set
434
- if (fleetUID === undefined || fleetUID === null) {
435
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEventsByCursor");
436
- }
437
- var pathParams = {
438
- projectUID: projectUID,
439
- fleetUID: fleetUID
440
- };
441
- var queryParams = {
442
- limit: opts["limit"],
443
- cursor: opts["cursor"],
444
- sortOrder: opts["sortOrder"],
445
- systemFilesOnly: opts["systemFilesOnly"],
446
- files: opts["files"],
447
- deviceUID: opts["deviceUID"],
448
- startDate: opts["startDate"],
449
- endDate: opts["endDate"]
450
- };
451
- var headerParams = {};
452
- var formParams = {};
453
- var authNames = ["api_key"];
454
- var contentTypes = [];
455
- var accepts = ["application/json"];
456
- var returnType = _GetProjectEventsByCursor200Response["default"];
457
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}/events-cursor", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
458
- }
459
-
460
- /**
461
- * Get Events of a Fleet by cursor
462
- * @param {String} projectUID
463
- * @param {String} fleetUID
464
- * @param {Object} opts Optional parameters
465
- * @param {Number} opts.limit (default to 50)
466
- * @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.
467
- * @param {module:model/String} opts.sortOrder (default to 'asc')
468
- * @param {Boolean} opts.systemFilesOnly
469
- * @param {String} opts.files
470
- * @param {String} opts.deviceUID A Device UID.
471
- * @param {Number} opts.startDate Unix timestamp
472
- * @param {Number} opts.endDate Unix timestamp
473
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEventsByCursor200Response}
474
- */
475
- }, {
476
- key: "getFleetEventsByCursor",
477
- value: function getFleetEventsByCursor(projectUID, fleetUID, opts) {
478
- return this.getFleetEventsByCursorWithHttpInfo(projectUID, fleetUID, opts).then(function (response_and_data) {
479
- return response_and_data.data;
480
- });
481
- }
482
-
483
- /**
484
- * Get Devices of a Fleet within a Project
485
- * @param {String} projectUID
486
- * @param {String} fleetUID
487
- * @param {Object} opts Optional parameters
488
- * @param {Number} opts.pageSize (default to 50)
489
- * @param {Number} opts.pageNum (default to 1)
490
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevices200Response} and HTTP response
491
- */
492
- }, {
493
- key: "getProjectFleetDevicesWithHttpInfo",
494
- value: function getProjectFleetDevicesWithHttpInfo(projectUID, fleetUID, opts) {
495
- opts = opts || {};
496
- var postBody = null;
497
- // verify the required parameter 'projectUID' is set
498
- if (projectUID === undefined || projectUID === null) {
499
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectFleetDevices");
500
- }
501
- // verify the required parameter 'fleetUID' is set
502
- if (fleetUID === undefined || fleetUID === null) {
503
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getProjectFleetDevices");
504
- }
505
- var pathParams = {
506
- projectUID: projectUID,
507
- fleetUID: fleetUID
508
- };
509
- var queryParams = {
510
- pageSize: opts["pageSize"],
511
- pageNum: opts["pageNum"]
512
- };
513
- var headerParams = {};
514
- var formParams = {};
515
- var authNames = ["api_key"];
516
- var contentTypes = [];
517
- var accepts = ["application/json"];
518
- var returnType = _GetProjectDevices200Response["default"];
519
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}/devices", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
520
- }
521
-
522
- /**
523
- * Get Devices of a Fleet within a Project
524
- * @param {String} projectUID
525
- * @param {String} fleetUID
526
- * @param {Object} opts Optional parameters
527
- * @param {Number} opts.pageSize (default to 50)
528
- * @param {Number} opts.pageNum (default to 1)
529
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevices200Response}
530
- */
531
- }, {
532
- key: "getProjectFleetDevices",
533
- value: function getProjectFleetDevices(projectUID, fleetUID, opts) {
534
- return this.getProjectFleetDevicesWithHttpInfo(projectUID, fleetUID, opts).then(function (response_and_data) {
535
- return response_and_data.data;
536
- });
537
- }
538
-
539
- /**
540
- * Get Project Fleets
541
- * @param {String} projectUID
542
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectFleets200Response} and HTTP response
543
- */
544
- }, {
545
- key: "getProjectFleetsWithHttpInfo",
546
- value: function getProjectFleetsWithHttpInfo(projectUID) {
547
- var postBody = null;
548
- // verify the required parameter 'projectUID' is set
549
- if (projectUID === undefined || projectUID === null) {
550
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectFleets");
551
- }
552
- var pathParams = {
553
- projectUID: projectUID
554
- };
555
- var queryParams = {};
556
- var headerParams = {};
557
- var formParams = {};
558
- var authNames = ["api_key"];
559
- var contentTypes = [];
560
- var accepts = ["application/json"];
561
- var returnType = _GetProjectFleets200Response["default"];
562
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
563
- }
564
-
565
- /**
566
- * Get Project Fleets
567
- * @param {String} projectUID
568
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectFleets200Response}
569
- */
570
- }, {
571
- key: "getProjectFleets",
572
- value: function getProjectFleets(projectUID) {
573
- return this.getProjectFleetsWithHttpInfo(projectUID).then(function (response_and_data) {
574
- return response_and_data.data;
575
- });
576
- }
577
-
578
- /**
579
- * Add Device to Fleets
580
- * @param {String} projectUID
581
- * @param {String} deviceUID
582
- * @param {module:model/PutDeviceFleetsRequest} putDeviceFleetsRequest The fleets to add to the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
583
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectFleets200Response} and HTTP response
584
- */
585
- }, {
586
- key: "putDeviceFleetsWithHttpInfo",
587
- value: function putDeviceFleetsWithHttpInfo(projectUID, deviceUID, putDeviceFleetsRequest) {
588
- var postBody = putDeviceFleetsRequest;
589
- // verify the required parameter 'projectUID' is set
590
- if (projectUID === undefined || projectUID === null) {
591
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling putDeviceFleets");
592
- }
593
- // verify the required parameter 'deviceUID' is set
594
- if (deviceUID === undefined || deviceUID === null) {
595
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceFleets");
596
- }
597
- // verify the required parameter 'putDeviceFleetsRequest' is set
598
- if (putDeviceFleetsRequest === undefined || putDeviceFleetsRequest === null) {
599
- throw new _Error["default"]("Missing the required parameter 'putDeviceFleetsRequest' when calling putDeviceFleets");
600
- }
601
- var pathParams = {
602
- projectUID: projectUID,
603
- deviceUID: deviceUID
604
- };
605
- var queryParams = {};
606
- var headerParams = {};
607
- var formParams = {};
608
- var authNames = ["api_key"];
609
- var contentTypes = ["application/json"];
610
- var accepts = ["application/json"];
611
- var returnType = _GetProjectFleets200Response["default"];
612
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/fleets", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
613
- }
614
-
615
- /**
616
- * Add Device to Fleets
617
- * @param {String} projectUID
618
- * @param {String} deviceUID
619
- * @param {module:model/PutDeviceFleetsRequest} putDeviceFleetsRequest The fleets to add to the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
620
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectFleets200Response}
621
- */
622
- }, {
623
- key: "putDeviceFleets",
624
- value: function putDeviceFleets(projectUID, deviceUID, putDeviceFleetsRequest) {
625
- return this.putDeviceFleetsWithHttpInfo(projectUID, deviceUID, putDeviceFleetsRequest).then(function (response_and_data) {
626
- return response_and_data.data;
627
- });
628
- }
629
-
630
- /**
631
- * Put environment variables of a fleet
632
- * @param {String} projectUID
633
- * @param {String} fleetUID
634
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the fleet
635
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
636
- */
637
- }, {
638
- key: "putFleetEnvironmentVariablesWithHttpInfo",
639
- value: function putFleetEnvironmentVariablesWithHttpInfo(projectUID, fleetUID, environmentVariables) {
640
- var postBody = environmentVariables;
641
- // verify the required parameter 'projectUID' is set
642
- if (projectUID === undefined || projectUID === null) {
643
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling putFleetEnvironmentVariables");
644
- }
645
- // verify the required parameter 'fleetUID' is set
646
- if (fleetUID === undefined || fleetUID === null) {
647
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling putFleetEnvironmentVariables");
648
- }
649
- // verify the required parameter 'environmentVariables' is set
650
- if (environmentVariables === undefined || environmentVariables === null) {
651
- throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling putFleetEnvironmentVariables");
652
- }
653
- var pathParams = {
654
- projectUID: projectUID,
655
- fleetUID: fleetUID
656
- };
657
- var queryParams = {};
658
- var headerParams = {};
659
- var formParams = {};
660
- var authNames = ["api_key"];
661
- var contentTypes = ["application/json"];
662
- var accepts = ["application/json"];
663
- var returnType = _EnvironmentVariables["default"];
664
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
665
- }
666
-
667
- /**
668
- * Put environment variables of a fleet
669
- * @param {String} projectUID
670
- * @param {String} fleetUID
671
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the fleet
672
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
673
- */
674
- }, {
675
- key: "putFleetEnvironmentVariables",
676
- value: function putFleetEnvironmentVariables(projectUID, fleetUID, environmentVariables) {
677
- return this.putFleetEnvironmentVariablesWithHttpInfo(projectUID, fleetUID, environmentVariables).then(function (response_and_data) {
678
- return response_and_data.data;
679
- });
680
- }
681
-
682
- /**
683
- * Update Fleet
684
- * @param {String} projectUID
685
- * @param {String} fleetUID
686
- * @param {module:model/UpdateFleetRequest} updateFleetRequest Fleet details to update
687
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Fleet} and HTTP response
688
- */
689
- }, {
690
- key: "updateFleetWithHttpInfo",
691
- value: function updateFleetWithHttpInfo(projectUID, fleetUID, updateFleetRequest) {
692
- var postBody = updateFleetRequest;
693
- // verify the required parameter 'projectUID' is set
694
- if (projectUID === undefined || projectUID === null) {
695
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling updateFleet");
696
- }
697
- // verify the required parameter 'fleetUID' is set
698
- if (fleetUID === undefined || fleetUID === null) {
699
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling updateFleet");
700
- }
701
- // verify the required parameter 'updateFleetRequest' is set
702
- if (updateFleetRequest === undefined || updateFleetRequest === null) {
703
- throw new _Error["default"]("Missing the required parameter 'updateFleetRequest' when calling updateFleet");
704
- }
705
- var pathParams = {
706
- projectUID: projectUID,
707
- fleetUID: fleetUID
708
- };
709
- var queryParams = {};
710
- var headerParams = {};
711
- var formParams = {};
712
- var authNames = ["api_key"];
713
- var contentTypes = ["application/json"];
714
- var accepts = ["application/json"];
715
- var returnType = _Fleet["default"];
716
- return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
717
- }
718
-
719
- /**
720
- * Update Fleet
721
- * @param {String} projectUID
722
- * @param {String} fleetUID
723
- * @param {module:model/UpdateFleetRequest} updateFleetRequest Fleet details to update
724
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Fleet}
725
- */
726
- }, {
727
- key: "updateFleet",
728
- value: function updateFleet(projectUID, fleetUID, updateFleetRequest) {
729
- return this.updateFleetWithHttpInfo(projectUID, fleetUID, updateFleetRequest).then(function (response_and_data) {
730
- return response_and_data.data;
731
- });
732
- }
733
- }]);
734
- return FleetApi;
735
- }();
736
- exports["default"] = FleetApi;