@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
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _Body = _interopRequireDefault(require("../model/Body"));
9
- var _DeleteDeviceFleetsRequest = _interopRequireDefault(require("../model/DeleteDeviceFleetsRequest"));
9
+ var _Device = _interopRequireDefault(require("../model/Device"));
10
10
  var _EnvironmentVariables = _interopRequireDefault(require("../model/EnvironmentVariables"));
11
11
  var _Error = _interopRequireDefault(require("../model/Error"));
12
12
  var _GetDeviceEnvironmentVariables200Response = _interopRequireDefault(require("../model/GetDeviceEnvironmentVariables200Response"));
@@ -14,22 +14,40 @@ var _GetDeviceHealthLog200Response = _interopRequireDefault(require("../model/Ge
14
14
  var _GetDeviceLatest200Response = _interopRequireDefault(require("../model/GetDeviceLatest200Response"));
15
15
  var _GetDevicePublicKey200Response = _interopRequireDefault(require("../model/GetDevicePublicKey200Response"));
16
16
  var _GetDeviceSessions200Response = _interopRequireDefault(require("../model/GetDeviceSessions200Response"));
17
- var _GetProjectFleets200Response = _interopRequireDefault(require("../model/GetProjectFleets200Response"));
17
+ var _GetProjectDevicePublicKeys200Response = _interopRequireDefault(require("../model/GetProjectDevicePublicKeys200Response"));
18
+ var _GetProjectDevices200Response = _interopRequireDefault(require("../model/GetProjectDevices200Response"));
19
+ var _HandleNoteChanges200Response = _interopRequireDefault(require("../model/HandleNoteChanges200Response"));
20
+ var _HandleNoteGet200Response = _interopRequireDefault(require("../model/HandleNoteGet200Response"));
18
21
  var _HandleNoteSignal200Response = _interopRequireDefault(require("../model/HandleNoteSignal200Response"));
19
- var _PutDeviceFleetsRequest = _interopRequireDefault(require("../model/PutDeviceFleetsRequest"));
22
+ var _HandleNotefileChanges200Response = _interopRequireDefault(require("../model/HandleNotefileChanges200Response"));
23
+ var _HandleNotefileChangesPending200Response = _interopRequireDefault(require("../model/HandleNotefileChangesPending200Response"));
24
+ var _HandleNotefileDeleteRequest = _interopRequireDefault(require("../model/HandleNotefileDeleteRequest"));
25
+ var _Note = _interopRequireDefault(require("../model/Note"));
26
+ var _PostProvisionProjectDeviceRequest = _interopRequireDefault(require("../model/PostProvisionProjectDeviceRequest"));
20
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
- 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); }
28
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
22
29
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
30
  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); } }
24
31
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
26
- 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); }
32
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
33
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
34
+ * Notehub API
35
+ * The OpenAPI definition for the Notehub.io API.
36
+ *
37
+ * The version of the OpenAPI document: 1.0.0
38
+ * Contact: engineering@blues.io
39
+ *
40
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
41
+ * https://openapi-generator.tech
42
+ * Do not edit the class manually.
43
+ *
44
+ */
27
45
  /**
28
46
  * Device service.
29
47
  * @module api/DeviceApi
30
- * @version 1.0.19
48
+ * @version 1.0.20
31
49
  */
32
- var DeviceApi = /*#__PURE__*/function () {
50
+ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
33
51
  /**
34
52
  * Constructs a new DeviceApi.
35
53
  * @alias module:api/DeviceApi
@@ -49,7 +67,7 @@ var DeviceApi = /*#__PURE__*/function () {
49
67
  * @param {String} key The environment variable key to delete.
50
68
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
51
69
  */
52
- _createClass(DeviceApi, [{
70
+ return _createClass(DeviceApi, [{
53
71
  key: "deleteDeviceEnvironmentVariableWithHttpInfo",
54
72
  value: function deleteDeviceEnvironmentVariableWithHttpInfo(projectUID, deviceUID, key) {
55
73
  var postBody = null;
@@ -96,53 +114,55 @@ var DeviceApi = /*#__PURE__*/function () {
96
114
  }
97
115
 
98
116
  /**
99
- * Remove Device from Fleets
117
+ * Delete Device
100
118
  * @param {String} projectUID
101
119
  * @param {String} deviceUID
102
- * @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.
103
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectFleets200Response} and HTTP response
120
+ * @param {module:model/String} purge
121
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
104
122
  */
105
123
  }, {
106
- key: "deleteDeviceFleetsWithHttpInfo",
107
- value: function deleteDeviceFleetsWithHttpInfo(projectUID, deviceUID, deleteDeviceFleetsRequest) {
108
- var postBody = deleteDeviceFleetsRequest;
124
+ key: "deleteProjectDeviceWithHttpInfo",
125
+ value: function deleteProjectDeviceWithHttpInfo(projectUID, deviceUID, purge) {
126
+ var postBody = null;
109
127
  // verify the required parameter 'projectUID' is set
110
128
  if (projectUID === undefined || projectUID === null) {
111
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling deleteDeviceFleets");
129
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling deleteProjectDevice");
112
130
  }
113
131
  // verify the required parameter 'deviceUID' is set
114
132
  if (deviceUID === undefined || deviceUID === null) {
115
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling deleteDeviceFleets");
133
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling deleteProjectDevice");
116
134
  }
117
- // verify the required parameter 'deleteDeviceFleetsRequest' is set
118
- if (deleteDeviceFleetsRequest === undefined || deleteDeviceFleetsRequest === null) {
119
- throw new _Error["default"]("Missing the required parameter 'deleteDeviceFleetsRequest' when calling deleteDeviceFleets");
135
+ // verify the required parameter 'purge' is set
136
+ if (purge === undefined || purge === null) {
137
+ throw new _Error["default"]("Missing the required parameter 'purge' when calling deleteProjectDevice");
120
138
  }
121
139
  var pathParams = {
122
140
  projectUID: projectUID,
123
141
  deviceUID: deviceUID
124
142
  };
125
- var queryParams = {};
143
+ var queryParams = {
144
+ purge: purge
145
+ };
126
146
  var headerParams = {};
127
147
  var formParams = {};
128
148
  var authNames = ["api_key"];
129
- var contentTypes = ["application/json"];
149
+ var contentTypes = [];
130
150
  var accepts = ["application/json"];
131
- var returnType = _GetProjectFleets200Response["default"];
132
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/fleets", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
151
+ var returnType = null;
152
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
133
153
  }
134
154
 
135
155
  /**
136
- * Remove Device from Fleets
156
+ * Delete Device
137
157
  * @param {String} projectUID
138
158
  * @param {String} deviceUID
139
- * @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.
140
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectFleets200Response}
159
+ * @param {module:model/String} purge
160
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
141
161
  */
142
162
  }, {
143
- key: "deleteDeviceFleets",
144
- value: function deleteDeviceFleets(projectUID, deviceUID, deleteDeviceFleetsRequest) {
145
- return this.deleteDeviceFleetsWithHttpInfo(projectUID, deviceUID, deleteDeviceFleetsRequest).then(function (response_and_data) {
163
+ key: "deleteProjectDevice",
164
+ value: function deleteProjectDevice(projectUID, deviceUID, purge) {
165
+ return this.deleteProjectDeviceWithHttpInfo(projectUID, deviceUID, purge).then(function (response_and_data) {
146
166
  return response_and_data.data;
147
167
  });
148
168
  }
@@ -331,6 +351,52 @@ var DeviceApi = /*#__PURE__*/function () {
331
351
  });
332
352
  }
333
353
 
354
+ /**
355
+ * Get Device
356
+ * @param {String} projectUID
357
+ * @param {String} deviceUID
358
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Device} and HTTP response
359
+ */
360
+ }, {
361
+ key: "getDeviceWithHttpInfo",
362
+ value: function getDeviceWithHttpInfo(projectUID, deviceUID) {
363
+ var postBody = null;
364
+ // verify the required parameter 'projectUID' is set
365
+ if (projectUID === undefined || projectUID === null) {
366
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getDevice");
367
+ }
368
+ // verify the required parameter 'deviceUID' is set
369
+ if (deviceUID === undefined || deviceUID === null) {
370
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDevice");
371
+ }
372
+ var pathParams = {
373
+ projectUID: projectUID,
374
+ deviceUID: deviceUID
375
+ };
376
+ var queryParams = {};
377
+ var headerParams = {};
378
+ var formParams = {};
379
+ var authNames = ["api_key"];
380
+ var contentTypes = [];
381
+ var accepts = ["application/json"];
382
+ var returnType = _Device["default"];
383
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
384
+ }
385
+
386
+ /**
387
+ * Get Device
388
+ * @param {String} projectUID
389
+ * @param {String} deviceUID
390
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Device}
391
+ */
392
+ }, {
393
+ key: "getDevice",
394
+ value: function getDevice(projectUID, deviceUID) {
395
+ return this.getDeviceWithHttpInfo(projectUID, deviceUID).then(function (response_and_data) {
396
+ return response_and_data.data;
397
+ });
398
+ }
399
+
334
400
  /**
335
401
  * Get environment variables of a device
336
402
  * @param {String} projectUID
@@ -423,52 +489,6 @@ var DeviceApi = /*#__PURE__*/function () {
423
489
  });
424
490
  }
425
491
 
426
- /**
427
- * Get Device Fleets
428
- * @param {String} projectUID
429
- * @param {String} deviceUID
430
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectFleets200Response} and HTTP response
431
- */
432
- }, {
433
- key: "getDeviceFleetsWithHttpInfo",
434
- value: function getDeviceFleetsWithHttpInfo(projectUID, deviceUID) {
435
- var postBody = null;
436
- // verify the required parameter 'projectUID' is set
437
- if (projectUID === undefined || projectUID === null) {
438
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getDeviceFleets");
439
- }
440
- // verify the required parameter 'deviceUID' is set
441
- if (deviceUID === undefined || deviceUID === null) {
442
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceFleets");
443
- }
444
- var pathParams = {
445
- projectUID: projectUID,
446
- deviceUID: deviceUID
447
- };
448
- var queryParams = {};
449
- var headerParams = {};
450
- var formParams = {};
451
- var authNames = ["api_key"];
452
- var contentTypes = [];
453
- var accepts = ["application/json"];
454
- var returnType = _GetProjectFleets200Response["default"];
455
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/fleets", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
456
- }
457
-
458
- /**
459
- * Get Device Fleets
460
- * @param {String} projectUID
461
- * @param {String} deviceUID
462
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectFleets200Response}
463
- */
464
- }, {
465
- key: "getDeviceFleets",
466
- value: function getDeviceFleets(projectUID, deviceUID) {
467
- return this.getDeviceFleetsWithHttpInfo(projectUID, deviceUID).then(function (response_and_data) {
468
- return response_and_data.data;
469
- });
470
- }
471
-
472
492
  /**
473
493
  * Get Device Health Log
474
494
  * @param {String} projectUID
@@ -664,213 +684,915 @@ var DeviceApi = /*#__PURE__*/function () {
664
684
  }
665
685
 
666
686
  /**
667
- * Send a signal from Notehub to a Notecard.
687
+ * Get Device Public Keys of a Project
668
688
  * @param {String} projectUID
669
- * @param {String} deviceUID
670
- * @param {module:model/Body} body Body or payload of singnal to be sent to the device
671
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteSignal200Response} and HTTP response
689
+ * @param {Object} opts Optional parameters
690
+ * @param {Number} opts.pageSize (default to 50)
691
+ * @param {Number} opts.pageNum (default to 1)
692
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevicePublicKeys200Response} and HTTP response
672
693
  */
673
694
  }, {
674
- key: "handleNoteSignalWithHttpInfo",
675
- value: function handleNoteSignalWithHttpInfo(projectUID, deviceUID, body) {
676
- var postBody = body;
695
+ key: "getProjectDevicePublicKeysWithHttpInfo",
696
+ value: function getProjectDevicePublicKeysWithHttpInfo(projectUID, opts) {
697
+ opts = opts || {};
698
+ var postBody = null;
677
699
  // verify the required parameter 'projectUID' is set
678
700
  if (projectUID === undefined || projectUID === null) {
679
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteSignal");
680
- }
681
- // verify the required parameter 'deviceUID' is set
682
- if (deviceUID === undefined || deviceUID === null) {
683
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteSignal");
684
- }
685
- // verify the required parameter 'body' is set
686
- if (body === undefined || body === null) {
687
- throw new _Error["default"]("Missing the required parameter 'body' when calling handleNoteSignal");
701
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectDevicePublicKeys");
688
702
  }
689
703
  var pathParams = {
690
- projectUID: projectUID,
691
- deviceUID: deviceUID
704
+ projectUID: projectUID
705
+ };
706
+ var queryParams = {
707
+ pageSize: opts["pageSize"],
708
+ pageNum: opts["pageNum"]
692
709
  };
693
- var queryParams = {};
694
710
  var headerParams = {};
695
711
  var formParams = {};
696
712
  var authNames = ["api_key"];
697
- var contentTypes = ["application/json"];
713
+ var contentTypes = [];
698
714
  var accepts = ["application/json"];
699
- var returnType = _HandleNoteSignal200Response["default"];
700
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/signal", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
715
+ var returnType = _GetProjectDevicePublicKeys200Response["default"];
716
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/public-keys", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
701
717
  }
702
718
 
703
719
  /**
704
- * Send a signal from Notehub to a Notecard.
720
+ * Get Device Public Keys of a Project
705
721
  * @param {String} projectUID
706
- * @param {String} deviceUID
707
- * @param {module:model/Body} body Body or payload of singnal to be sent to the device
708
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteSignal200Response}
722
+ * @param {Object} opts Optional parameters
723
+ * @param {Number} opts.pageSize (default to 50)
724
+ * @param {Number} opts.pageNum (default to 1)
725
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevicePublicKeys200Response}
709
726
  */
710
727
  }, {
711
- key: "handleNoteSignal",
712
- value: function handleNoteSignal(projectUID, deviceUID, body) {
713
- return this.handleNoteSignalWithHttpInfo(projectUID, deviceUID, body).then(function (response_and_data) {
728
+ key: "getProjectDevicePublicKeys",
729
+ value: function getProjectDevicePublicKeys(projectUID, opts) {
730
+ return this.getProjectDevicePublicKeysWithHttpInfo(projectUID, opts).then(function (response_and_data) {
714
731
  return response_and_data.data;
715
732
  });
716
733
  }
717
734
 
718
735
  /**
719
- * Put environment variables of a device
736
+ * Get Devices of a Project
720
737
  * @param {String} projectUID
721
- * @param {String} deviceUID
722
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
723
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
738
+ * @param {Object} opts Optional parameters
739
+ * @param {Number} opts.pageSize (default to 50)
740
+ * @param {Number} opts.pageNum (default to 1)
741
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevices200Response} and HTTP response
724
742
  */
725
743
  }, {
726
- key: "putDeviceEnvironmentVariablesWithHttpInfo",
727
- value: function putDeviceEnvironmentVariablesWithHttpInfo(projectUID, deviceUID, environmentVariables) {
728
- var postBody = environmentVariables;
744
+ key: "getProjectDevicesWithHttpInfo",
745
+ value: function getProjectDevicesWithHttpInfo(projectUID, opts) {
746
+ opts = opts || {};
747
+ var postBody = null;
729
748
  // verify the required parameter 'projectUID' is set
730
749
  if (projectUID === undefined || projectUID === null) {
731
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling putDeviceEnvironmentVariables");
750
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectDevices");
732
751
  }
733
- // verify the required parameter 'deviceUID' is set
734
- if (deviceUID === undefined || deviceUID === null) {
735
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceEnvironmentVariables");
752
+ var pathParams = {
753
+ projectUID: projectUID
754
+ };
755
+ var queryParams = {
756
+ pageSize: opts["pageSize"],
757
+ pageNum: opts["pageNum"]
758
+ };
759
+ var headerParams = {};
760
+ var formParams = {};
761
+ var authNames = ["api_key"];
762
+ var contentTypes = [];
763
+ var accepts = ["application/json"];
764
+ var returnType = _GetProjectDevices200Response["default"];
765
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
766
+ }
767
+
768
+ /**
769
+ * Get Devices of a Project
770
+ * @param {String} projectUID
771
+ * @param {Object} opts Optional parameters
772
+ * @param {Number} opts.pageSize (default to 50)
773
+ * @param {Number} opts.pageNum (default to 1)
774
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevices200Response}
775
+ */
776
+ }, {
777
+ key: "getProjectDevices",
778
+ value: function getProjectDevices(projectUID, opts) {
779
+ return this.getProjectDevicesWithHttpInfo(projectUID, opts).then(function (response_and_data) {
780
+ return response_and_data.data;
781
+ });
782
+ }
783
+
784
+ /**
785
+ * Get Devices of a Fleet within a Project
786
+ * @param {String} projectUID
787
+ * @param {String} fleetUID
788
+ * @param {Object} opts Optional parameters
789
+ * @param {Number} opts.pageSize (default to 50)
790
+ * @param {Number} opts.pageNum (default to 1)
791
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevices200Response} and HTTP response
792
+ */
793
+ }, {
794
+ key: "getProjectFleetDevicesWithHttpInfo",
795
+ value: function getProjectFleetDevicesWithHttpInfo(projectUID, fleetUID, opts) {
796
+ opts = opts || {};
797
+ var postBody = null;
798
+ // verify the required parameter 'projectUID' is set
799
+ if (projectUID === undefined || projectUID === null) {
800
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectFleetDevices");
736
801
  }
737
- // verify the required parameter 'environmentVariables' is set
738
- if (environmentVariables === undefined || environmentVariables === null) {
739
- throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling putDeviceEnvironmentVariables");
802
+ // verify the required parameter 'fleetUID' is set
803
+ if (fleetUID === undefined || fleetUID === null) {
804
+ throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getProjectFleetDevices");
740
805
  }
741
806
  var pathParams = {
742
807
  projectUID: projectUID,
743
- deviceUID: deviceUID
808
+ fleetUID: fleetUID
809
+ };
810
+ var queryParams = {
811
+ pageSize: opts["pageSize"],
812
+ pageNum: opts["pageNum"]
744
813
  };
745
- var queryParams = {};
746
814
  var headerParams = {};
747
815
  var formParams = {};
748
816
  var authNames = ["api_key"];
749
- var contentTypes = ["application/json"];
817
+ var contentTypes = [];
750
818
  var accepts = ["application/json"];
751
- var returnType = _EnvironmentVariables["default"];
752
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/environment_variables", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
819
+ var returnType = _GetProjectDevices200Response["default"];
820
+ return this.apiClient.callApi("/v1/projects/{projectUID}/fleets/{fleetUID}/devices", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
753
821
  }
754
822
 
755
823
  /**
756
- * Put environment variables of a device
824
+ * Get Devices of a Fleet within a Project
757
825
  * @param {String} projectUID
758
- * @param {String} deviceUID
759
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
760
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
826
+ * @param {String} fleetUID
827
+ * @param {Object} opts Optional parameters
828
+ * @param {Number} opts.pageSize (default to 50)
829
+ * @param {Number} opts.pageNum (default to 1)
830
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevices200Response}
761
831
  */
762
832
  }, {
763
- key: "putDeviceEnvironmentVariables",
764
- value: function putDeviceEnvironmentVariables(projectUID, deviceUID, environmentVariables) {
765
- return this.putDeviceEnvironmentVariablesWithHttpInfo(projectUID, deviceUID, environmentVariables).then(function (response_and_data) {
833
+ key: "getProjectFleetDevices",
834
+ value: function getProjectFleetDevices(projectUID, fleetUID, opts) {
835
+ return this.getProjectFleetDevicesWithHttpInfo(projectUID, fleetUID, opts).then(function (response_and_data) {
766
836
  return response_and_data.data;
767
837
  });
768
838
  }
769
839
 
770
840
  /**
771
- * Put environment variables of a device with device pin authorization
772
- * @param {String} productUID
841
+ * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
842
+ * @param {String} projectUID
773
843
  * @param {String} deviceUID
774
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
775
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
844
+ * @param {String} notefileID
845
+ * @param {module:model/Note} note Body or payload of note to be added to the device
846
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
776
847
  */
777
848
  }, {
778
- key: "putDeviceEnvironmentVariablesByPinWithHttpInfo",
779
- value: function putDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables) {
780
- var postBody = environmentVariables;
781
- // verify the required parameter 'productUID' is set
782
- if (productUID === undefined || productUID === null) {
783
- throw new _Error["default"]("Missing the required parameter 'productUID' when calling putDeviceEnvironmentVariablesByPin");
849
+ key: "handleNoteAddWithHttpInfo",
850
+ value: function handleNoteAddWithHttpInfo(projectUID, deviceUID, notefileID, note) {
851
+ var postBody = note;
852
+ // verify the required parameter 'projectUID' is set
853
+ if (projectUID === undefined || projectUID === null) {
854
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteAdd");
784
855
  }
785
856
  // verify the required parameter 'deviceUID' is set
786
857
  if (deviceUID === undefined || deviceUID === null) {
787
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceEnvironmentVariablesByPin");
858
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteAdd");
788
859
  }
789
- // verify the required parameter 'environmentVariables' is set
790
- if (environmentVariables === undefined || environmentVariables === null) {
791
- throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling putDeviceEnvironmentVariablesByPin");
860
+ // verify the required parameter 'notefileID' is set
861
+ if (notefileID === undefined || notefileID === null) {
862
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteAdd");
863
+ }
864
+ // verify the required parameter 'note' is set
865
+ if (note === undefined || note === null) {
866
+ throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteAdd");
792
867
  }
793
868
  var pathParams = {
794
- productUID: productUID,
795
- deviceUID: deviceUID
869
+ projectUID: projectUID,
870
+ deviceUID: deviceUID,
871
+ notefileID: notefileID
796
872
  };
797
873
  var queryParams = {};
798
874
  var headerParams = {};
799
875
  var formParams = {};
800
- var authNames = ["pin"];
876
+ var authNames = ["api_key"];
801
877
  var contentTypes = ["application/json"];
802
878
  var accepts = ["application/json"];
803
- var returnType = _EnvironmentVariables["default"];
804
- return this.apiClient.callApi("/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
879
+ var returnType = null;
880
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
805
881
  }
806
882
 
807
883
  /**
808
- * Put environment variables of a device with device pin authorization
809
- * @param {String} productUID
884
+ * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
885
+ * @param {String} projectUID
810
886
  * @param {String} deviceUID
811
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
812
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
887
+ * @param {String} notefileID
888
+ * @param {module:model/Note} note Body or payload of note to be added to the device
889
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
813
890
  */
814
891
  }, {
815
- key: "putDeviceEnvironmentVariablesByPin",
816
- value: function putDeviceEnvironmentVariablesByPin(productUID, deviceUID, environmentVariables) {
817
- return this.putDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables).then(function (response_and_data) {
892
+ key: "handleNoteAdd",
893
+ value: function handleNoteAdd(projectUID, deviceUID, notefileID, note) {
894
+ return this.handleNoteAddWithHttpInfo(projectUID, deviceUID, notefileID, note).then(function (response_and_data) {
818
895
  return response_and_data.data;
819
896
  });
820
897
  }
821
898
 
822
899
  /**
823
- * Add Device to Fleets
900
+ * Incrementally retrieve changes within a specific Notefile.
824
901
  * @param {String} projectUID
825
902
  * @param {String} deviceUID
826
- * @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.
827
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectFleets200Response} and HTTP response
903
+ * @param {String} notefileID
904
+ * @param {Object} opts Optional parameters
905
+ * @param {String} opts.tracker The change tracker ID.
906
+ * @param {Number} opts.max The maximum number of Notes to return in the request.
907
+ * @param {Boolean} opts.start true to reset the tracker to the beginning.
908
+ * @param {Boolean} opts.stop true to delete the tracker.
909
+ * @param {Boolean} opts.deleted true to return deleted notes.
910
+ * @param {Boolean} opts._delete true to delete the notes returned by the request.
911
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteChanges200Response} and HTTP response
828
912
  */
829
913
  }, {
830
- key: "putDeviceFleetsWithHttpInfo",
831
- value: function putDeviceFleetsWithHttpInfo(projectUID, deviceUID, putDeviceFleetsRequest) {
832
- var postBody = putDeviceFleetsRequest;
914
+ key: "handleNoteChangesWithHttpInfo",
915
+ value: function handleNoteChangesWithHttpInfo(projectUID, deviceUID, notefileID, opts) {
916
+ opts = opts || {};
917
+ var postBody = null;
833
918
  // verify the required parameter 'projectUID' is set
834
919
  if (projectUID === undefined || projectUID === null) {
835
- throw new _Error["default"]("Missing the required parameter 'projectUID' when calling putDeviceFleets");
920
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteChanges");
836
921
  }
837
922
  // verify the required parameter 'deviceUID' is set
838
923
  if (deviceUID === undefined || deviceUID === null) {
839
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceFleets");
924
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteChanges");
840
925
  }
841
- // verify the required parameter 'putDeviceFleetsRequest' is set
842
- if (putDeviceFleetsRequest === undefined || putDeviceFleetsRequest === null) {
843
- throw new _Error["default"]("Missing the required parameter 'putDeviceFleetsRequest' when calling putDeviceFleets");
926
+ // verify the required parameter 'notefileID' is set
927
+ if (notefileID === undefined || notefileID === null) {
928
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteChanges");
844
929
  }
845
930
  var pathParams = {
846
931
  projectUID: projectUID,
847
- deviceUID: deviceUID
932
+ deviceUID: deviceUID,
933
+ notefileID: notefileID
934
+ };
935
+ var queryParams = {
936
+ tracker: opts["tracker"],
937
+ max: opts["max"],
938
+ start: opts["start"],
939
+ stop: opts["stop"],
940
+ deleted: opts["deleted"],
941
+ "delete": opts["_delete"]
848
942
  };
849
- var queryParams = {};
850
943
  var headerParams = {};
851
944
  var formParams = {};
852
945
  var authNames = ["api_key"];
853
- var contentTypes = ["application/json"];
946
+ var contentTypes = [];
854
947
  var accepts = ["application/json"];
855
- var returnType = _GetProjectFleets200Response["default"];
856
- return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/fleets", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
948
+ var returnType = _HandleNoteChanges200Response["default"];
949
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/changes", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
950
+ }
951
+
952
+ /**
953
+ * Incrementally retrieve changes within a specific Notefile.
954
+ * @param {String} projectUID
955
+ * @param {String} deviceUID
956
+ * @param {String} notefileID
957
+ * @param {Object} opts Optional parameters
958
+ * @param {String} opts.tracker The change tracker ID.
959
+ * @param {Number} opts.max The maximum number of Notes to return in the request.
960
+ * @param {Boolean} opts.start true to reset the tracker to the beginning.
961
+ * @param {Boolean} opts.stop true to delete the tracker.
962
+ * @param {Boolean} opts.deleted true to return deleted notes.
963
+ * @param {Boolean} opts._delete true to delete the notes returned by the request.
964
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteChanges200Response}
965
+ */
966
+ }, {
967
+ key: "handleNoteChanges",
968
+ value: function handleNoteChanges(projectUID, deviceUID, notefileID, opts) {
969
+ return this.handleNoteChangesWithHttpInfo(projectUID, deviceUID, notefileID, opts).then(function (response_and_data) {
970
+ return response_and_data.data;
971
+ });
857
972
  }
858
973
 
859
974
  /**
860
- * Add Device to Fleets
975
+ * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
861
976
  * @param {String} projectUID
862
977
  * @param {String} deviceUID
863
- * @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.
864
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectFleets200Response}
978
+ * @param {String} notefileID
979
+ * @param {String} noteID
980
+ * @param {module:model/Note} note Body or payload of note to be added to the device
981
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
865
982
  */
866
983
  }, {
867
- key: "putDeviceFleets",
868
- value: function putDeviceFleets(projectUID, deviceUID, putDeviceFleetsRequest) {
869
- return this.putDeviceFleetsWithHttpInfo(projectUID, deviceUID, putDeviceFleetsRequest).then(function (response_and_data) {
984
+ key: "handleNoteCreateAddWithHttpInfo",
985
+ value: function handleNoteCreateAddWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note) {
986
+ var postBody = note;
987
+ // verify the required parameter 'projectUID' is set
988
+ if (projectUID === undefined || projectUID === null) {
989
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteCreateAdd");
990
+ }
991
+ // verify the required parameter 'deviceUID' is set
992
+ if (deviceUID === undefined || deviceUID === null) {
993
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteCreateAdd");
994
+ }
995
+ // verify the required parameter 'notefileID' is set
996
+ if (notefileID === undefined || notefileID === null) {
997
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteCreateAdd");
998
+ }
999
+ // verify the required parameter 'noteID' is set
1000
+ if (noteID === undefined || noteID === null) {
1001
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteCreateAdd");
1002
+ }
1003
+ // verify the required parameter 'note' is set
1004
+ if (note === undefined || note === null) {
1005
+ throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteCreateAdd");
1006
+ }
1007
+ var pathParams = {
1008
+ projectUID: projectUID,
1009
+ deviceUID: deviceUID,
1010
+ notefileID: notefileID,
1011
+ noteID: noteID
1012
+ };
1013
+ var queryParams = {};
1014
+ var headerParams = {};
1015
+ var formParams = {};
1016
+ var authNames = ["api_key"];
1017
+ var contentTypes = ["application/json"];
1018
+ var accepts = ["application/json"];
1019
+ var returnType = null;
1020
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1021
+ }
1022
+
1023
+ /**
1024
+ * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
1025
+ * @param {String} projectUID
1026
+ * @param {String} deviceUID
1027
+ * @param {String} notefileID
1028
+ * @param {String} noteID
1029
+ * @param {module:model/Note} note Body or payload of note to be added to the device
1030
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1031
+ */
1032
+ }, {
1033
+ key: "handleNoteCreateAdd",
1034
+ value: function handleNoteCreateAdd(projectUID, deviceUID, notefileID, noteID, note) {
1035
+ return this.handleNoteCreateAddWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
1036
+ return response_and_data.data;
1037
+ });
1038
+ }
1039
+
1040
+ /**
1041
+ * Delete a note from a DB notefile
1042
+ * @param {String} projectUID
1043
+ * @param {String} deviceUID
1044
+ * @param {String} notefileID
1045
+ * @param {String} noteID
1046
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1047
+ */
1048
+ }, {
1049
+ key: "handleNoteDeleteWithHttpInfo",
1050
+ value: function handleNoteDeleteWithHttpInfo(projectUID, deviceUID, notefileID, noteID) {
1051
+ var postBody = null;
1052
+ // verify the required parameter 'projectUID' is set
1053
+ if (projectUID === undefined || projectUID === null) {
1054
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteDelete");
1055
+ }
1056
+ // verify the required parameter 'deviceUID' is set
1057
+ if (deviceUID === undefined || deviceUID === null) {
1058
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteDelete");
1059
+ }
1060
+ // verify the required parameter 'notefileID' is set
1061
+ if (notefileID === undefined || notefileID === null) {
1062
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteDelete");
1063
+ }
1064
+ // verify the required parameter 'noteID' is set
1065
+ if (noteID === undefined || noteID === null) {
1066
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteDelete");
1067
+ }
1068
+ var pathParams = {
1069
+ projectUID: projectUID,
1070
+ deviceUID: deviceUID,
1071
+ notefileID: notefileID,
1072
+ noteID: noteID
1073
+ };
1074
+ var queryParams = {};
1075
+ var headerParams = {};
1076
+ var formParams = {};
1077
+ var authNames = ["api_key"];
1078
+ var contentTypes = [];
1079
+ var accepts = ["application/json"];
1080
+ var returnType = null;
1081
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1082
+ }
1083
+
1084
+ /**
1085
+ * Delete a note from a DB notefile
1086
+ * @param {String} projectUID
1087
+ * @param {String} deviceUID
1088
+ * @param {String} notefileID
1089
+ * @param {String} noteID
1090
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1091
+ */
1092
+ }, {
1093
+ key: "handleNoteDelete",
1094
+ value: function handleNoteDelete(projectUID, deviceUID, notefileID, noteID) {
1095
+ return this.handleNoteDeleteWithHttpInfo(projectUID, deviceUID, notefileID, noteID).then(function (response_and_data) {
1096
+ return response_and_data.data;
1097
+ });
1098
+ }
1099
+
1100
+ /**
1101
+ * Get a note from a DB notefile
1102
+ * @param {String} projectUID
1103
+ * @param {String} deviceUID
1104
+ * @param {String} notefileID
1105
+ * @param {String} noteID
1106
+ * @param {Object} opts Optional parameters
1107
+ * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
1108
+ * @param {Boolean} opts.deleted Whether to return deleted notes
1109
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteGet200Response} and HTTP response
1110
+ */
1111
+ }, {
1112
+ key: "handleNoteGetWithHttpInfo",
1113
+ value: function handleNoteGetWithHttpInfo(projectUID, deviceUID, notefileID, noteID, opts) {
1114
+ opts = opts || {};
1115
+ var postBody = null;
1116
+ // verify the required parameter 'projectUID' is set
1117
+ if (projectUID === undefined || projectUID === null) {
1118
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteGet");
1119
+ }
1120
+ // verify the required parameter 'deviceUID' is set
1121
+ if (deviceUID === undefined || deviceUID === null) {
1122
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteGet");
1123
+ }
1124
+ // verify the required parameter 'notefileID' is set
1125
+ if (notefileID === undefined || notefileID === null) {
1126
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteGet");
1127
+ }
1128
+ // verify the required parameter 'noteID' is set
1129
+ if (noteID === undefined || noteID === null) {
1130
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteGet");
1131
+ }
1132
+ var pathParams = {
1133
+ projectUID: projectUID,
1134
+ deviceUID: deviceUID,
1135
+ notefileID: notefileID,
1136
+ noteID: noteID
1137
+ };
1138
+ var queryParams = {
1139
+ "delete": opts["_delete"],
1140
+ deleted: opts["deleted"]
1141
+ };
1142
+ var headerParams = {};
1143
+ var formParams = {};
1144
+ var authNames = ["api_key"];
1145
+ var contentTypes = [];
1146
+ var accepts = ["application/json"];
1147
+ var returnType = _HandleNoteGet200Response["default"];
1148
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1149
+ }
1150
+
1151
+ /**
1152
+ * Get a note from a DB notefile
1153
+ * @param {String} projectUID
1154
+ * @param {String} deviceUID
1155
+ * @param {String} notefileID
1156
+ * @param {String} noteID
1157
+ * @param {Object} opts Optional parameters
1158
+ * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
1159
+ * @param {Boolean} opts.deleted Whether to return deleted notes
1160
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteGet200Response}
1161
+ */
1162
+ }, {
1163
+ key: "handleNoteGet",
1164
+ value: function handleNoteGet(projectUID, deviceUID, notefileID, noteID, opts) {
1165
+ return this.handleNoteGetWithHttpInfo(projectUID, deviceUID, notefileID, noteID, opts).then(function (response_and_data) {
1166
+ return response_and_data.data;
1167
+ });
1168
+ }
1169
+
1170
+ /**
1171
+ * Send a signal from Notehub to a Notecard.
1172
+ * @param {String} projectUID
1173
+ * @param {String} deviceUID
1174
+ * @param {module:model/Body} body Body or payload of singnal to be sent to the device
1175
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteSignal200Response} and HTTP response
1176
+ */
1177
+ }, {
1178
+ key: "handleNoteSignalWithHttpInfo",
1179
+ value: function handleNoteSignalWithHttpInfo(projectUID, deviceUID, body) {
1180
+ var postBody = body;
1181
+ // verify the required parameter 'projectUID' is set
1182
+ if (projectUID === undefined || projectUID === null) {
1183
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteSignal");
1184
+ }
1185
+ // verify the required parameter 'deviceUID' is set
1186
+ if (deviceUID === undefined || deviceUID === null) {
1187
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteSignal");
1188
+ }
1189
+ // verify the required parameter 'body' is set
1190
+ if (body === undefined || body === null) {
1191
+ throw new _Error["default"]("Missing the required parameter 'body' when calling handleNoteSignal");
1192
+ }
1193
+ var pathParams = {
1194
+ projectUID: projectUID,
1195
+ deviceUID: deviceUID
1196
+ };
1197
+ var queryParams = {};
1198
+ var headerParams = {};
1199
+ var formParams = {};
1200
+ var authNames = ["api_key"];
1201
+ var contentTypes = ["application/json"];
1202
+ var accepts = ["application/json"];
1203
+ var returnType = _HandleNoteSignal200Response["default"];
1204
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/signal", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1205
+ }
1206
+
1207
+ /**
1208
+ * Send a signal from Notehub to a Notecard.
1209
+ * @param {String} projectUID
1210
+ * @param {String} deviceUID
1211
+ * @param {module:model/Body} body Body or payload of singnal to be sent to the device
1212
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteSignal200Response}
1213
+ */
1214
+ }, {
1215
+ key: "handleNoteSignal",
1216
+ value: function handleNoteSignal(projectUID, deviceUID, body) {
1217
+ return this.handleNoteSignalWithHttpInfo(projectUID, deviceUID, body).then(function (response_and_data) {
1218
+ return response_and_data.data;
1219
+ });
1220
+ }
1221
+
1222
+ /**
1223
+ * Update a note in a DB notefile
1224
+ * @param {String} projectUID
1225
+ * @param {String} deviceUID
1226
+ * @param {String} notefileID
1227
+ * @param {String} noteID
1228
+ * @param {module:model/Note} note Body or payload of note to be added to the device
1229
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1230
+ */
1231
+ }, {
1232
+ key: "handleNoteUpdateWithHttpInfo",
1233
+ value: function handleNoteUpdateWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note) {
1234
+ var postBody = note;
1235
+ // verify the required parameter 'projectUID' is set
1236
+ if (projectUID === undefined || projectUID === null) {
1237
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteUpdate");
1238
+ }
1239
+ // verify the required parameter 'deviceUID' is set
1240
+ if (deviceUID === undefined || deviceUID === null) {
1241
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteUpdate");
1242
+ }
1243
+ // verify the required parameter 'notefileID' is set
1244
+ if (notefileID === undefined || notefileID === null) {
1245
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteUpdate");
1246
+ }
1247
+ // verify the required parameter 'noteID' is set
1248
+ if (noteID === undefined || noteID === null) {
1249
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteUpdate");
1250
+ }
1251
+ // verify the required parameter 'note' is set
1252
+ if (note === undefined || note === null) {
1253
+ throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteUpdate");
1254
+ }
1255
+ var pathParams = {
1256
+ projectUID: projectUID,
1257
+ deviceUID: deviceUID,
1258
+ notefileID: notefileID,
1259
+ noteID: noteID
1260
+ };
1261
+ var queryParams = {};
1262
+ var headerParams = {};
1263
+ var formParams = {};
1264
+ var authNames = ["api_key"];
1265
+ var contentTypes = ["application/json"];
1266
+ var accepts = ["application/json"];
1267
+ var returnType = null;
1268
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1269
+ }
1270
+
1271
+ /**
1272
+ * Update a note in a DB notefile
1273
+ * @param {String} projectUID
1274
+ * @param {String} deviceUID
1275
+ * @param {String} notefileID
1276
+ * @param {String} noteID
1277
+ * @param {module:model/Note} note Body or payload of note to be added to the device
1278
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1279
+ */
1280
+ }, {
1281
+ key: "handleNoteUpdate",
1282
+ value: function handleNoteUpdate(projectUID, deviceUID, notefileID, noteID, note) {
1283
+ return this.handleNoteUpdateWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
1284
+ return response_and_data.data;
1285
+ });
1286
+ }
1287
+
1288
+ /**
1289
+ * Used to perform queries on a single or multiple files to determine if new Notes are available to read
1290
+ * @param {String} projectUID
1291
+ * @param {String} deviceUID
1292
+ * @param {Object} opts Optional parameters
1293
+ * @param {String} opts.tracker The change tracker ID.
1294
+ * @param {Array.<String>} opts.files One or more files to obtain change information from.
1295
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNotefileChanges200Response} and HTTP response
1296
+ */
1297
+ }, {
1298
+ key: "handleNotefileChangesWithHttpInfo",
1299
+ value: function handleNotefileChangesWithHttpInfo(projectUID, deviceUID, opts) {
1300
+ opts = opts || {};
1301
+ var postBody = null;
1302
+ // verify the required parameter 'projectUID' is set
1303
+ if (projectUID === undefined || projectUID === null) {
1304
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNotefileChanges");
1305
+ }
1306
+ // verify the required parameter 'deviceUID' is set
1307
+ if (deviceUID === undefined || deviceUID === null) {
1308
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileChanges");
1309
+ }
1310
+ var pathParams = {
1311
+ projectUID: projectUID,
1312
+ deviceUID: deviceUID
1313
+ };
1314
+ var queryParams = {
1315
+ tracker: opts["tracker"],
1316
+ files: this.apiClient.buildCollectionParam(opts["files"], "multi")
1317
+ };
1318
+ var headerParams = {};
1319
+ var formParams = {};
1320
+ var authNames = ["api_key"];
1321
+ var contentTypes = [];
1322
+ var accepts = ["application/json"];
1323
+ var returnType = _HandleNotefileChanges200Response["default"];
1324
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/files/changes", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1325
+ }
1326
+
1327
+ /**
1328
+ * Used to perform queries on a single or multiple files to determine if new Notes are available to read
1329
+ * @param {String} projectUID
1330
+ * @param {String} deviceUID
1331
+ * @param {Object} opts Optional parameters
1332
+ * @param {String} opts.tracker The change tracker ID.
1333
+ * @param {Array.<String>} opts.files One or more files to obtain change information from.
1334
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNotefileChanges200Response}
1335
+ */
1336
+ }, {
1337
+ key: "handleNotefileChanges",
1338
+ value: function handleNotefileChanges(projectUID, deviceUID, opts) {
1339
+ return this.handleNotefileChangesWithHttpInfo(projectUID, deviceUID, opts).then(function (response_and_data) {
1340
+ return response_and_data.data;
1341
+ });
1342
+ }
1343
+
1344
+ /**
1345
+ * Returns info about file changes that are pending upload to Notehub or download to the Notecard.
1346
+ * @param {String} projectUID
1347
+ * @param {String} deviceUID
1348
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNotefileChangesPending200Response} and HTTP response
1349
+ */
1350
+ }, {
1351
+ key: "handleNotefileChangesPendingWithHttpInfo",
1352
+ value: function handleNotefileChangesPendingWithHttpInfo(projectUID, deviceUID) {
1353
+ var postBody = null;
1354
+ // verify the required parameter 'projectUID' is set
1355
+ if (projectUID === undefined || projectUID === null) {
1356
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNotefileChangesPending");
1357
+ }
1358
+ // verify the required parameter 'deviceUID' is set
1359
+ if (deviceUID === undefined || deviceUID === null) {
1360
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileChangesPending");
1361
+ }
1362
+ var pathParams = {
1363
+ projectUID: projectUID,
1364
+ deviceUID: deviceUID
1365
+ };
1366
+ var queryParams = {};
1367
+ var headerParams = {};
1368
+ var formParams = {};
1369
+ var authNames = ["api_key"];
1370
+ var contentTypes = [];
1371
+ var accepts = ["application/json"];
1372
+ var returnType = _HandleNotefileChangesPending200Response["default"];
1373
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/files/changes/pending", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1374
+ }
1375
+
1376
+ /**
1377
+ * Returns info about file changes that are pending upload to Notehub or download to the Notecard.
1378
+ * @param {String} projectUID
1379
+ * @param {String} deviceUID
1380
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNotefileChangesPending200Response}
1381
+ */
1382
+ }, {
1383
+ key: "handleNotefileChangesPending",
1384
+ value: function handleNotefileChangesPending(projectUID, deviceUID) {
1385
+ return this.handleNotefileChangesPendingWithHttpInfo(projectUID, deviceUID).then(function (response_and_data) {
1386
+ return response_and_data.data;
1387
+ });
1388
+ }
1389
+
1390
+ /**
1391
+ * Deletes Notefiles and the Notes they contain.
1392
+ * @param {String} projectUID
1393
+ * @param {String} deviceUID
1394
+ * @param {module:model/HandleNotefileDeleteRequest} handleNotefileDeleteRequest
1395
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1396
+ */
1397
+ }, {
1398
+ key: "handleNotefileDeleteWithHttpInfo",
1399
+ value: function handleNotefileDeleteWithHttpInfo(projectUID, deviceUID, handleNotefileDeleteRequest) {
1400
+ var postBody = handleNotefileDeleteRequest;
1401
+ // verify the required parameter 'projectUID' is set
1402
+ if (projectUID === undefined || projectUID === null) {
1403
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNotefileDelete");
1404
+ }
1405
+ // verify the required parameter 'deviceUID' is set
1406
+ if (deviceUID === undefined || deviceUID === null) {
1407
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileDelete");
1408
+ }
1409
+ // verify the required parameter 'handleNotefileDeleteRequest' is set
1410
+ if (handleNotefileDeleteRequest === undefined || handleNotefileDeleteRequest === null) {
1411
+ throw new _Error["default"]("Missing the required parameter 'handleNotefileDeleteRequest' when calling handleNotefileDelete");
1412
+ }
1413
+ var pathParams = {
1414
+ projectUID: projectUID,
1415
+ deviceUID: deviceUID
1416
+ };
1417
+ var queryParams = {};
1418
+ var headerParams = {};
1419
+ var formParams = {};
1420
+ var authNames = ["api_key"];
1421
+ var contentTypes = ["application/json"];
1422
+ var accepts = ["application/json"];
1423
+ var returnType = null;
1424
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/files", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1425
+ }
1426
+
1427
+ /**
1428
+ * Deletes Notefiles and the Notes they contain.
1429
+ * @param {String} projectUID
1430
+ * @param {String} deviceUID
1431
+ * @param {module:model/HandleNotefileDeleteRequest} handleNotefileDeleteRequest
1432
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1433
+ */
1434
+ }, {
1435
+ key: "handleNotefileDelete",
1436
+ value: function handleNotefileDelete(projectUID, deviceUID, handleNotefileDeleteRequest) {
1437
+ return this.handleNotefileDeleteWithHttpInfo(projectUID, deviceUID, handleNotefileDeleteRequest).then(function (response_and_data) {
1438
+ return response_and_data.data;
1439
+ });
1440
+ }
1441
+
1442
+ /**
1443
+ * Provision Device for a Project
1444
+ * @param {String} projectUID
1445
+ * @param {String} deviceUID
1446
+ * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID
1447
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
1448
+ */
1449
+ }, {
1450
+ key: "postProvisionProjectDeviceWithHttpInfo",
1451
+ value: function postProvisionProjectDeviceWithHttpInfo(projectUID, deviceUID, postProvisionProjectDeviceRequest) {
1452
+ var postBody = postProvisionProjectDeviceRequest;
1453
+ // verify the required parameter 'projectUID' is set
1454
+ if (projectUID === undefined || projectUID === null) {
1455
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling postProvisionProjectDevice");
1456
+ }
1457
+ // verify the required parameter 'deviceUID' is set
1458
+ if (deviceUID === undefined || deviceUID === null) {
1459
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling postProvisionProjectDevice");
1460
+ }
1461
+ // verify the required parameter 'postProvisionProjectDeviceRequest' is set
1462
+ if (postProvisionProjectDeviceRequest === undefined || postProvisionProjectDeviceRequest === null) {
1463
+ throw new _Error["default"]("Missing the required parameter 'postProvisionProjectDeviceRequest' when calling postProvisionProjectDevice");
1464
+ }
1465
+ var pathParams = {
1466
+ projectUID: projectUID,
1467
+ deviceUID: deviceUID
1468
+ };
1469
+ var queryParams = {};
1470
+ var headerParams = {};
1471
+ var formParams = {};
1472
+ var authNames = ["api_key"];
1473
+ var contentTypes = ["application/json"];
1474
+ var accepts = ["application/json"];
1475
+ var returnType = Object;
1476
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/provision", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1477
+ }
1478
+
1479
+ /**
1480
+ * Provision Device for a Project
1481
+ * @param {String} projectUID
1482
+ * @param {String} deviceUID
1483
+ * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID
1484
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
1485
+ */
1486
+ }, {
1487
+ key: "postProvisionProjectDevice",
1488
+ value: function postProvisionProjectDevice(projectUID, deviceUID, postProvisionProjectDeviceRequest) {
1489
+ return this.postProvisionProjectDeviceWithHttpInfo(projectUID, deviceUID, postProvisionProjectDeviceRequest).then(function (response_and_data) {
1490
+ return response_and_data.data;
1491
+ });
1492
+ }
1493
+
1494
+ /**
1495
+ * Put environment variables of a device
1496
+ * @param {String} projectUID
1497
+ * @param {String} deviceUID
1498
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1499
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
1500
+ */
1501
+ }, {
1502
+ key: "putDeviceEnvironmentVariablesWithHttpInfo",
1503
+ value: function putDeviceEnvironmentVariablesWithHttpInfo(projectUID, deviceUID, environmentVariables) {
1504
+ var postBody = environmentVariables;
1505
+ // verify the required parameter 'projectUID' is set
1506
+ if (projectUID === undefined || projectUID === null) {
1507
+ throw new _Error["default"]("Missing the required parameter 'projectUID' when calling putDeviceEnvironmentVariables");
1508
+ }
1509
+ // verify the required parameter 'deviceUID' is set
1510
+ if (deviceUID === undefined || deviceUID === null) {
1511
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceEnvironmentVariables");
1512
+ }
1513
+ // verify the required parameter 'environmentVariables' is set
1514
+ if (environmentVariables === undefined || environmentVariables === null) {
1515
+ throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling putDeviceEnvironmentVariables");
1516
+ }
1517
+ var pathParams = {
1518
+ projectUID: projectUID,
1519
+ deviceUID: deviceUID
1520
+ };
1521
+ var queryParams = {};
1522
+ var headerParams = {};
1523
+ var formParams = {};
1524
+ var authNames = ["api_key"];
1525
+ var contentTypes = ["application/json"];
1526
+ var accepts = ["application/json"];
1527
+ var returnType = _EnvironmentVariables["default"];
1528
+ return this.apiClient.callApi("/v1/projects/{projectUID}/devices/{deviceUID}/environment_variables", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1529
+ }
1530
+
1531
+ /**
1532
+ * Put environment variables of a device
1533
+ * @param {String} projectUID
1534
+ * @param {String} deviceUID
1535
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1536
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
1537
+ */
1538
+ }, {
1539
+ key: "putDeviceEnvironmentVariables",
1540
+ value: function putDeviceEnvironmentVariables(projectUID, deviceUID, environmentVariables) {
1541
+ return this.putDeviceEnvironmentVariablesWithHttpInfo(projectUID, deviceUID, environmentVariables).then(function (response_and_data) {
1542
+ return response_and_data.data;
1543
+ });
1544
+ }
1545
+
1546
+ /**
1547
+ * Put environment variables of a device with device pin authorization
1548
+ * @param {String} productUID
1549
+ * @param {String} deviceUID
1550
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1551
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
1552
+ */
1553
+ }, {
1554
+ key: "putDeviceEnvironmentVariablesByPinWithHttpInfo",
1555
+ value: function putDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables) {
1556
+ var postBody = environmentVariables;
1557
+ // verify the required parameter 'productUID' is set
1558
+ if (productUID === undefined || productUID === null) {
1559
+ throw new _Error["default"]("Missing the required parameter 'productUID' when calling putDeviceEnvironmentVariablesByPin");
1560
+ }
1561
+ // verify the required parameter 'deviceUID' is set
1562
+ if (deviceUID === undefined || deviceUID === null) {
1563
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceEnvironmentVariablesByPin");
1564
+ }
1565
+ // verify the required parameter 'environmentVariables' is set
1566
+ if (environmentVariables === undefined || environmentVariables === null) {
1567
+ throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling putDeviceEnvironmentVariablesByPin");
1568
+ }
1569
+ var pathParams = {
1570
+ productUID: productUID,
1571
+ deviceUID: deviceUID
1572
+ };
1573
+ var queryParams = {};
1574
+ var headerParams = {};
1575
+ var formParams = {};
1576
+ var authNames = ["pin"];
1577
+ var contentTypes = ["application/json"];
1578
+ var accepts = ["application/json"];
1579
+ var returnType = _EnvironmentVariables["default"];
1580
+ return this.apiClient.callApi("/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1581
+ }
1582
+
1583
+ /**
1584
+ * Put environment variables of a device with device pin authorization
1585
+ * @param {String} productUID
1586
+ * @param {String} deviceUID
1587
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1588
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
1589
+ */
1590
+ }, {
1591
+ key: "putDeviceEnvironmentVariablesByPin",
1592
+ value: function putDeviceEnvironmentVariablesByPin(productUID, deviceUID, environmentVariables) {
1593
+ return this.putDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables).then(function (response_and_data) {
870
1594
  return response_and_data.data;
871
1595
  });
872
1596
  }
873
1597
  }]);
874
- return DeviceApi;
875
- }();
876
- exports["default"] = DeviceApi;
1598
+ }();