@blues-inc/notehub-js 2.2.1 → 2.3.0-beta.10

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 (146) hide show
  1. package/README.md +252 -241
  2. package/dist/ApiClient.js +154 -154
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +31 -31
  5. package/dist/api/BillingAccountApi.js +14 -14
  6. package/dist/api/DeviceApi.js +996 -949
  7. package/dist/api/EventApi.js +178 -178
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/MonitorApi.js +52 -52
  10. package/dist/api/ProjectApi.js +601 -601
  11. package/dist/api/RouteApi.js +77 -77
  12. package/dist/api/UsageApi.js +53 -44
  13. package/dist/api/WebhookApi.js +51 -51
  14. package/dist/index.js +91 -77
  15. package/dist/model/{PutDeviceFleetsRequest.js → AddDeviceToFleetsRequest.js} +26 -26
  16. package/dist/model/Alert.js +76 -74
  17. package/dist/model/AlertDataInner.js +35 -35
  18. package/dist/model/AlertNotificationsInner.js +18 -18
  19. package/dist/model/AwsRoute.js +65 -65
  20. package/dist/model/AzureRoute.js +43 -43
  21. package/dist/model/BillingAccount.js +21 -21
  22. package/dist/model/BillingAccountRole.js +9 -9
  23. package/dist/model/BlynkRoute.js +28 -28
  24. package/dist/model/Body.js +5 -5
  25. package/dist/model/CellularPlan.js +34 -34
  26. package/dist/model/CloneProjectRequest.js +20 -20
  27. package/dist/model/Contact.js +22 -22
  28. package/dist/model/CreateFleetRequest.js +17 -17
  29. package/dist/model/CreateMonitor.js +126 -125
  30. package/dist/model/CreateProductRequest.js +22 -22
  31. package/dist/model/CreateProjectRequest.js +16 -16
  32. package/dist/model/CreateUpdateRepository.js +17 -17
  33. package/dist/model/CurrentFirmware.js +12 -12
  34. package/dist/model/DFUEnv.js +12 -12
  35. package/dist/model/DFUState.js +65 -65
  36. package/dist/model/DataField.js +7 -7
  37. package/dist/model/DataSetField.js +19 -19
  38. package/dist/model/DataUsage.js +14 -14
  39. package/dist/model/DatacakeRoute.js +35 -35
  40. package/dist/model/{DeleteDeviceFleetsRequest.js → DeleteDeviceFromFleetsRequest.js} +26 -26
  41. package/dist/model/{HandleNotefileDeleteRequest.js → DeleteNotefilesRequest.js} +24 -24
  42. package/dist/model/Device.js +102 -101
  43. package/dist/model/DeviceDfuHistory.js +20 -19
  44. package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
  45. package/dist/model/DeviceDfuHistoryPage.js +13 -12
  46. package/dist/model/DeviceDfuStateMachine.js +25 -24
  47. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  48. package/dist/model/DeviceDfuStatus.js +20 -20
  49. package/dist/model/DeviceDfuStatusPage.js +13 -12
  50. package/dist/model/DeviceSession.js +221 -221
  51. package/dist/model/DeviceTowerInfo.js +14 -14
  52. package/dist/model/DeviceUsage.js +32 -32
  53. package/dist/model/DfuActionRequest.js +7 -7
  54. package/dist/model/EmailNotification.js +7 -7
  55. package/dist/model/EnvTreeJsonNode.js +69 -67
  56. package/dist/model/EnvVar.js +18 -18
  57. package/dist/model/EnvironmentVariables.js +8 -8
  58. package/dist/model/Error.js +31 -31
  59. package/dist/model/Event.js +248 -248
  60. package/dist/model/Filter.js +16 -16
  61. package/dist/model/Firmware.js +49 -49
  62. package/dist/model/FirmwareInfo.js +60 -60
  63. package/dist/model/Fleet.js +35 -35
  64. package/dist/model/FleetConnectivityAssurance.js +6 -6
  65. package/dist/model/GetAlerts200Response.js +15 -14
  66. package/dist/model/GetBillingAccounts200Response.js +10 -9
  67. package/dist/model/GetDataUsage200Response.js +10 -9
  68. package/dist/model/GetDataUsage200ResponseDataInner.js +41 -40
  69. package/dist/model/{HandleNoteGet200Response.js → GetDbNote200Response.js} +29 -29
  70. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
  71. package/dist/model/GetDeviceFleets200Response.js +12 -11
  72. package/dist/model/GetDeviceHealthLog200Response.js +12 -11
  73. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  74. package/dist/model/{GetDeviceLatest200Response.js → GetDeviceLatestEvents200Response.js} +26 -25
  75. package/dist/model/GetDevicePlans200Response.js +10 -9
  76. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  77. package/dist/model/{GetProjectDevicePublicKeys200Response.js → GetDevicePublicKeys200Response.js} +38 -37
  78. package/dist/model/{GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js → GetDevicePublicKeys200ResponseDevicePublicKeysInner.js} +28 -28
  79. package/dist/model/GetDeviceSessions200Response.js +17 -16
  80. package/dist/model/{GetProjectDevices200Response.js → GetDevices200Response.js} +35 -34
  81. package/dist/model/{GetProjectEvents200Response.js → GetEvents200Response.js} +39 -38
  82. package/dist/model/{GetProjectEventsByCursor200Response.js → GetEventsByCursor200Response.js} +42 -41
  83. package/dist/model/{HandleNoteChanges200Response.js → GetNotefile200Response.js} +27 -27
  84. package/dist/model/GetProducts200Response.js +10 -9
  85. package/dist/model/GetProjectMembers200Response.js +12 -11
  86. package/dist/model/GetProjects200Response.js +10 -9
  87. package/dist/model/GetSessionsUsage200Response.js +12 -11
  88. package/dist/model/GetWebhooks200Response.js +10 -9
  89. package/dist/model/GoogleRoute.js +33 -33
  90. package/dist/model/HttpRoute.js +35 -35
  91. package/dist/model/{HandleNotefileChanges200Response.js → ListPendingNotefiles200Response.js} +36 -27
  92. package/dist/model/Location.js +40 -40
  93. package/dist/model/Login200Response.js +7 -7
  94. package/dist/model/LoginRequest.js +12 -12
  95. package/dist/model/Monitor.js +100 -99
  96. package/dist/model/MonitorAlertRoutesInner.js +9 -10
  97. package/dist/model/MqttRoute.js +68 -68
  98. package/dist/model/Note.js +95 -15
  99. package/dist/model/Notefile.js +147 -0
  100. package/dist/model/NotefileSchema.js +19 -18
  101. package/dist/model/NotefileTemplate.js +128 -0
  102. package/dist/model/NotehubRoute.js +112 -98
  103. package/dist/model/NotehubRouteSummary.js +23 -23
  104. package/dist/model/OAuth2Error.js +20 -20
  105. package/dist/model/OAuth2TokenResponse.js +23 -23
  106. package/dist/model/PersonalAccessToken.js +34 -34
  107. package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
  108. package/dist/model/PersonalAccessTokenInfo.js +18 -18
  109. package/dist/model/PersonalAccessTokenSecret.js +12 -12
  110. package/dist/model/Product.js +26 -26
  111. package/dist/model/Project.js +34 -34
  112. package/dist/model/ProjectMember.js +22 -22
  113. package/dist/model/{PostProvisionProjectDeviceRequest.js → ProvisionDeviceRequest.js} +36 -36
  114. package/dist/model/ProxyRoute.js +38 -24
  115. package/dist/model/QubitroRoute.js +33 -33
  116. package/dist/model/RadRoute.js +31 -31
  117. package/dist/model/Repository.js +22 -22
  118. package/dist/model/Role.js +9 -9
  119. package/dist/model/RouteLog.js +38 -38
  120. package/dist/model/RouteTransformSettings.js +27 -14
  121. package/dist/model/S3ArchiveRoute.js +79 -79
  122. package/dist/model/SatellitePlan.js +26 -26
  123. package/dist/model/SchemaProperty.js +38 -36
  124. package/dist/model/{HandleNoteSignal200Response.js → SignalDevice200Response.js} +21 -21
  125. package/dist/model/SimUsage.js +19 -19
  126. package/dist/model/SlackBearerNotification.js +25 -25
  127. package/dist/model/SlackRoute.js +48 -48
  128. package/dist/model/SlackWebHookNotification.js +20 -20
  129. package/dist/model/SnowflakeRoute.js +45 -45
  130. package/dist/model/SnowpipeStreamingRoute.js +223 -0
  131. package/dist/model/ThingworxRoute.js +33 -33
  132. package/dist/model/TowerLocation.js +54 -54
  133. package/dist/model/TwilioRoute.js +43 -43
  134. package/dist/model/UpdateFleetRequest.js +30 -30
  135. package/dist/model/UploadMetadata.js +64 -64
  136. package/dist/model/UsageData.js +18 -18
  137. package/dist/model/UsageEventsData.js +29 -29
  138. package/dist/model/UsageEventsResponse.js +12 -11
  139. package/dist/model/UsageRouteLogsData.js +27 -27
  140. package/dist/model/UsageSessionsData.js +27 -27
  141. package/dist/model/UserDfuStateMachine.js +20 -20
  142. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  143. package/dist/model/UserFirmwareInfo.js +12 -12
  144. package/dist/model/WebhookSettings.js +15 -15
  145. package/package.json +3 -3
  146. package/dist/model/HandleNotefileChangesPending200Response.js +0 -115
@@ -6,26 +6,27 @@ 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 _DeleteNotefilesRequest = _interopRequireDefault(require("../model/DeleteNotefilesRequest"));
9
10
  var _Device = _interopRequireDefault(require("../model/Device"));
10
11
  var _EnvTreeJsonNode = _interopRequireDefault(require("../model/EnvTreeJsonNode"));
11
12
  var _EnvironmentVariables = _interopRequireDefault(require("../model/EnvironmentVariables"));
12
13
  var _Error = _interopRequireDefault(require("../model/Error"));
14
+ var _GetDbNote200Response = _interopRequireDefault(require("../model/GetDbNote200Response"));
13
15
  var _GetDeviceEnvironmentVariablesByPin200Response = _interopRequireDefault(require("../model/GetDeviceEnvironmentVariablesByPin200Response"));
14
16
  var _GetDeviceHealthLog200Response = _interopRequireDefault(require("../model/GetDeviceHealthLog200Response"));
15
- var _GetDeviceLatest200Response = _interopRequireDefault(require("../model/GetDeviceLatest200Response"));
17
+ var _GetDeviceLatestEvents200Response = _interopRequireDefault(require("../model/GetDeviceLatestEvents200Response"));
16
18
  var _GetDevicePlans200Response = _interopRequireDefault(require("../model/GetDevicePlans200Response"));
17
19
  var _GetDevicePublicKey200Response = _interopRequireDefault(require("../model/GetDevicePublicKey200Response"));
20
+ var _GetDevicePublicKeys200Response = _interopRequireDefault(require("../model/GetDevicePublicKeys200Response"));
18
21
  var _GetDeviceSessions200Response = _interopRequireDefault(require("../model/GetDeviceSessions200Response"));
19
- var _GetProjectDevicePublicKeys200Response = _interopRequireDefault(require("../model/GetProjectDevicePublicKeys200Response"));
20
- var _GetProjectDevices200Response = _interopRequireDefault(require("../model/GetProjectDevices200Response"));
21
- var _HandleNoteChanges200Response = _interopRequireDefault(require("../model/HandleNoteChanges200Response"));
22
- var _HandleNoteGet200Response = _interopRequireDefault(require("../model/HandleNoteGet200Response"));
23
- var _HandleNoteSignal200Response = _interopRequireDefault(require("../model/HandleNoteSignal200Response"));
24
- var _HandleNotefileChanges200Response = _interopRequireDefault(require("../model/HandleNotefileChanges200Response"));
25
- var _HandleNotefileChangesPending200Response = _interopRequireDefault(require("../model/HandleNotefileChangesPending200Response"));
26
- var _HandleNotefileDeleteRequest = _interopRequireDefault(require("../model/HandleNotefileDeleteRequest"));
22
+ var _GetDevices200Response = _interopRequireDefault(require("../model/GetDevices200Response"));
23
+ var _GetNotefile200Response = _interopRequireDefault(require("../model/GetNotefile200Response"));
24
+ var _ListPendingNotefiles200Response = _interopRequireDefault(require("../model/ListPendingNotefiles200Response"));
27
25
  var _Note = _interopRequireDefault(require("../model/Note"));
28
- var _PostProvisionProjectDeviceRequest = _interopRequireDefault(require("../model/PostProvisionProjectDeviceRequest"));
26
+ var _Notefile = _interopRequireDefault(require("../model/Notefile"));
27
+ var _NotefileTemplate = _interopRequireDefault(require("../model/NotefileTemplate"));
28
+ var _ProvisionDeviceRequest = _interopRequireDefault(require("../model/ProvisionDeviceRequest"));
29
+ var _SignalDevice200Response = _interopRequireDefault(require("../model/SignalDevice200Response"));
29
30
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
30
31
  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); }
31
32
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -34,7 +35,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
34
35
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
35
36
  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); } /**
36
37
  * Notehub API
37
- * The OpenAPI definition for the Notehub.io API.
38
+ * The OpenAPI definition for the Notehub.io API.
38
39
  *
39
40
  * The version of the OpenAPI document: 1.2.0
40
41
  * Contact: engineering@blues.io
@@ -45,31 +46,374 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
45
46
  *
46
47
  */
47
48
  /**
48
- * Device service.
49
- * @module api/DeviceApi
50
- * @version 2.2.1
51
- */
49
+ * Device service.
50
+ * @module api/DeviceApi
51
+ * @version 2.3.0-beta.10
52
+ */
52
53
  var DeviceApi = exports["default"] = /*#__PURE__*/function () {
53
54
  /**
54
- * Constructs a new DeviceApi.
55
- * @alias module:api/DeviceApi
56
- * @class
57
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
58
- * default to {@link module:ApiClient#instance} if unspecified.
59
- */
55
+ * Constructs a new DeviceApi.
56
+ * @alias module:api/DeviceApi
57
+ * @class
58
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
59
+ * default to {@link module:ApiClient#instance} if unspecified.
60
+ */
60
61
  function DeviceApi(apiClient) {
61
62
  _classCallCheck(this, DeviceApi);
62
63
  this.apiClient = apiClient || _ApiClient["default"].instance;
63
64
  }
64
65
 
65
66
  /**
66
- * Delete environment variable of a device
67
- * @param {String} projectOrProductUID
68
- * @param {String} deviceUID
69
- * @param {String} key The environment variable key to delete.
70
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
67
+ * Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created
68
+ * @param {String} projectOrProductUID
69
+ * @param {String} deviceUID
70
+ * @param {String} notefileID
71
+ * @param {String} noteID
72
+ * @param {module:model/Note} note Body or payload of note to be added to the device
73
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
71
74
  */
72
75
  return _createClass(DeviceApi, [{
76
+ key: "addDbNoteWithHttpInfo",
77
+ value: function addDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note) {
78
+ var postBody = note;
79
+ // verify the required parameter 'projectOrProductUID' is set
80
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
81
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling addDbNote");
82
+ }
83
+ // verify the required parameter 'deviceUID' is set
84
+ if (deviceUID === undefined || deviceUID === null) {
85
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling addDbNote");
86
+ }
87
+ // verify the required parameter 'notefileID' is set
88
+ if (notefileID === undefined || notefileID === null) {
89
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling addDbNote");
90
+ }
91
+ // verify the required parameter 'noteID' is set
92
+ if (noteID === undefined || noteID === null) {
93
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling addDbNote");
94
+ }
95
+ // verify the required parameter 'note' is set
96
+ if (note === undefined || note === null) {
97
+ throw new _Error["default"]("Missing the required parameter 'note' when calling addDbNote");
98
+ }
99
+ var pathParams = {
100
+ 'projectOrProductUID': projectOrProductUID,
101
+ 'deviceUID': deviceUID,
102
+ 'notefileID': notefileID,
103
+ 'noteID': noteID
104
+ };
105
+ var queryParams = {};
106
+ var headerParams = {};
107
+ var formParams = {};
108
+ var authNames = ['personalAccessToken'];
109
+ var contentTypes = ['application/json'];
110
+ var accepts = ['application/json'];
111
+ var returnType = null;
112
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
113
+ }
114
+
115
+ /**
116
+ * Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created
117
+ * @param {String} projectOrProductUID
118
+ * @param {String} deviceUID
119
+ * @param {String} notefileID
120
+ * @param {String} noteID
121
+ * @param {module:model/Note} note Body or payload of note to be added to the device
122
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
123
+ */
124
+ }, {
125
+ key: "addDbNote",
126
+ value: function addDbNote(projectOrProductUID, deviceUID, notefileID, noteID, note) {
127
+ return this.addDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
128
+ return response_and_data.data;
129
+ });
130
+ }
131
+
132
+ /**
133
+ * Add environment variables of a device
134
+ * @param {String} projectOrProductUID
135
+ * @param {String} deviceUID
136
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
137
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
138
+ */
139
+ }, {
140
+ key: "addDeviceEnvironmentVariablesWithHttpInfo",
141
+ value: function addDeviceEnvironmentVariablesWithHttpInfo(projectOrProductUID, deviceUID, environmentVariables) {
142
+ var postBody = environmentVariables;
143
+ // verify the required parameter 'projectOrProductUID' is set
144
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
145
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling addDeviceEnvironmentVariables");
146
+ }
147
+ // verify the required parameter 'deviceUID' is set
148
+ if (deviceUID === undefined || deviceUID === null) {
149
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling addDeviceEnvironmentVariables");
150
+ }
151
+ // verify the required parameter 'environmentVariables' is set
152
+ if (environmentVariables === undefined || environmentVariables === null) {
153
+ throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling addDeviceEnvironmentVariables");
154
+ }
155
+ var pathParams = {
156
+ 'projectOrProductUID': projectOrProductUID,
157
+ 'deviceUID': deviceUID
158
+ };
159
+ var queryParams = {};
160
+ var headerParams = {};
161
+ var formParams = {};
162
+ var authNames = ['personalAccessToken'];
163
+ var contentTypes = ['application/json'];
164
+ var accepts = ['application/json'];
165
+ var returnType = _EnvironmentVariables["default"];
166
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
167
+ }
168
+
169
+ /**
170
+ * Add environment variables of a device
171
+ * @param {String} projectOrProductUID
172
+ * @param {String} deviceUID
173
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
174
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
175
+ */
176
+ }, {
177
+ key: "addDeviceEnvironmentVariables",
178
+ value: function addDeviceEnvironmentVariables(projectOrProductUID, deviceUID, environmentVariables) {
179
+ return this.addDeviceEnvironmentVariablesWithHttpInfo(projectOrProductUID, deviceUID, environmentVariables).then(function (response_and_data) {
180
+ return response_and_data.data;
181
+ });
182
+ }
183
+
184
+ /**
185
+ * Add environment variables of a device with device pin authorization
186
+ * @param {String} productUID
187
+ * @param {String} deviceUID
188
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
189
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
190
+ */
191
+ }, {
192
+ key: "addDeviceEnvironmentVariablesByPinWithHttpInfo",
193
+ value: function addDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables) {
194
+ var postBody = environmentVariables;
195
+ // verify the required parameter 'productUID' is set
196
+ if (productUID === undefined || productUID === null) {
197
+ throw new _Error["default"]("Missing the required parameter 'productUID' when calling addDeviceEnvironmentVariablesByPin");
198
+ }
199
+ // verify the required parameter 'deviceUID' is set
200
+ if (deviceUID === undefined || deviceUID === null) {
201
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling addDeviceEnvironmentVariablesByPin");
202
+ }
203
+ // verify the required parameter 'environmentVariables' is set
204
+ if (environmentVariables === undefined || environmentVariables === null) {
205
+ throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling addDeviceEnvironmentVariablesByPin");
206
+ }
207
+ var pathParams = {
208
+ 'productUID': productUID,
209
+ 'deviceUID': deviceUID
210
+ };
211
+ var queryParams = {};
212
+ var headerParams = {};
213
+ var formParams = {};
214
+ var authNames = ['pin'];
215
+ var contentTypes = ['application/json'];
216
+ var accepts = ['application/json'];
217
+ var returnType = _EnvironmentVariables["default"];
218
+ return this.apiClient.callApi('/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
219
+ }
220
+
221
+ /**
222
+ * Add environment variables of a device with device pin authorization
223
+ * @param {String} productUID
224
+ * @param {String} deviceUID
225
+ * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
226
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
227
+ */
228
+ }, {
229
+ key: "addDeviceEnvironmentVariablesByPin",
230
+ value: function addDeviceEnvironmentVariablesByPin(productUID, deviceUID, environmentVariables) {
231
+ return this.addDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables).then(function (response_and_data) {
232
+ return response_and_data.data;
233
+ });
234
+ }
235
+
236
+ /**
237
+ * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
238
+ * @param {String} projectOrProductUID
239
+ * @param {String} deviceUID
240
+ * @param {String} notefileID
241
+ * @param {module:model/Note} note Body or payload of note to be added to the device
242
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
243
+ */
244
+ }, {
245
+ key: "addQiNoteWithHttpInfo",
246
+ value: function addQiNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, note) {
247
+ var postBody = note;
248
+ // verify the required parameter 'projectOrProductUID' is set
249
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
250
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling addQiNote");
251
+ }
252
+ // verify the required parameter 'deviceUID' is set
253
+ if (deviceUID === undefined || deviceUID === null) {
254
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling addQiNote");
255
+ }
256
+ // verify the required parameter 'notefileID' is set
257
+ if (notefileID === undefined || notefileID === null) {
258
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling addQiNote");
259
+ }
260
+ // verify the required parameter 'note' is set
261
+ if (note === undefined || note === null) {
262
+ throw new _Error["default"]("Missing the required parameter 'note' when calling addQiNote");
263
+ }
264
+ var pathParams = {
265
+ 'projectOrProductUID': projectOrProductUID,
266
+ 'deviceUID': deviceUID,
267
+ 'notefileID': notefileID
268
+ };
269
+ var queryParams = {};
270
+ var headerParams = {};
271
+ var formParams = {};
272
+ var authNames = ['personalAccessToken'];
273
+ var contentTypes = ['application/json'];
274
+ var accepts = ['application/json'];
275
+ var returnType = null;
276
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
277
+ }
278
+
279
+ /**
280
+ * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
281
+ * @param {String} projectOrProductUID
282
+ * @param {String} deviceUID
283
+ * @param {String} notefileID
284
+ * @param {module:model/Note} note Body or payload of note to be added to the device
285
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
286
+ */
287
+ }, {
288
+ key: "addQiNote",
289
+ value: function addQiNote(projectOrProductUID, deviceUID, notefileID, note) {
290
+ return this.addQiNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, note).then(function (response_and_data) {
291
+ return response_and_data.data;
292
+ });
293
+ }
294
+
295
+ /**
296
+ * Delete a note from a .db or .qi notefile
297
+ * @param {String} projectOrProductUID
298
+ * @param {String} deviceUID
299
+ * @param {String} notefileID
300
+ * @param {String} noteID
301
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
302
+ */
303
+ }, {
304
+ key: "deleteDbNoteWithHttpInfo",
305
+ value: function deleteDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID) {
306
+ var postBody = null;
307
+ // verify the required parameter 'projectOrProductUID' is set
308
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
309
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling deleteDbNote");
310
+ }
311
+ // verify the required parameter 'deviceUID' is set
312
+ if (deviceUID === undefined || deviceUID === null) {
313
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling deleteDbNote");
314
+ }
315
+ // verify the required parameter 'notefileID' is set
316
+ if (notefileID === undefined || notefileID === null) {
317
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling deleteDbNote");
318
+ }
319
+ // verify the required parameter 'noteID' is set
320
+ if (noteID === undefined || noteID === null) {
321
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling deleteDbNote");
322
+ }
323
+ var pathParams = {
324
+ 'projectOrProductUID': projectOrProductUID,
325
+ 'deviceUID': deviceUID,
326
+ 'notefileID': notefileID,
327
+ 'noteID': noteID
328
+ };
329
+ var queryParams = {};
330
+ var headerParams = {};
331
+ var formParams = {};
332
+ var authNames = ['personalAccessToken'];
333
+ var contentTypes = [];
334
+ var accepts = ['application/json'];
335
+ var returnType = null;
336
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
337
+ }
338
+
339
+ /**
340
+ * Delete a note from a .db or .qi notefile
341
+ * @param {String} projectOrProductUID
342
+ * @param {String} deviceUID
343
+ * @param {String} notefileID
344
+ * @param {String} noteID
345
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
346
+ */
347
+ }, {
348
+ key: "deleteDbNote",
349
+ value: function deleteDbNote(projectOrProductUID, deviceUID, notefileID, noteID) {
350
+ return this.deleteDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID).then(function (response_and_data) {
351
+ return response_and_data.data;
352
+ });
353
+ }
354
+
355
+ /**
356
+ * Delete Device
357
+ * @param {String} projectOrProductUID
358
+ * @param {String} deviceUID
359
+ * @param {Boolean} purge
360
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
361
+ */
362
+ }, {
363
+ key: "deleteDeviceWithHttpInfo",
364
+ value: function deleteDeviceWithHttpInfo(projectOrProductUID, deviceUID, purge) {
365
+ var postBody = null;
366
+ // verify the required parameter 'projectOrProductUID' is set
367
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
368
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling deleteDevice");
369
+ }
370
+ // verify the required parameter 'deviceUID' is set
371
+ if (deviceUID === undefined || deviceUID === null) {
372
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling deleteDevice");
373
+ }
374
+ // verify the required parameter 'purge' is set
375
+ if (purge === undefined || purge === null) {
376
+ throw new _Error["default"]("Missing the required parameter 'purge' when calling deleteDevice");
377
+ }
378
+ var pathParams = {
379
+ 'projectOrProductUID': projectOrProductUID,
380
+ 'deviceUID': deviceUID
381
+ };
382
+ var queryParams = {
383
+ 'purge': purge
384
+ };
385
+ var headerParams = {};
386
+ var formParams = {};
387
+ var authNames = ['personalAccessToken'];
388
+ var contentTypes = [];
389
+ var accepts = ['application/json'];
390
+ var returnType = null;
391
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
392
+ }
393
+
394
+ /**
395
+ * Delete Device
396
+ * @param {String} projectOrProductUID
397
+ * @param {String} deviceUID
398
+ * @param {Boolean} purge
399
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
400
+ */
401
+ }, {
402
+ key: "deleteDevice",
403
+ value: function deleteDevice(projectOrProductUID, deviceUID, purge) {
404
+ return this.deleteDeviceWithHttpInfo(projectOrProductUID, deviceUID, purge).then(function (response_and_data) {
405
+ return response_and_data.data;
406
+ });
407
+ }
408
+
409
+ /**
410
+ * Delete environment variable of a device
411
+ * @param {String} projectOrProductUID
412
+ * @param {String} deviceUID
413
+ * @param {String} key The environment variable key to delete.
414
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
415
+ */
416
+ }, {
73
417
  key: "deleteDeviceEnvironmentVariableWithHttpInfo",
74
418
  value: function deleteDeviceEnvironmentVariableWithHttpInfo(projectOrProductUID, deviceUID, key) {
75
419
  var postBody = null;
@@ -86,24 +430,24 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
86
430
  throw new _Error["default"]("Missing the required parameter 'key' when calling deleteDeviceEnvironmentVariable");
87
431
  }
88
432
  var pathParams = {
89
- projectOrProductUID: projectOrProductUID,
90
- deviceUID: deviceUID,
91
- key: key
433
+ 'projectOrProductUID': projectOrProductUID,
434
+ 'deviceUID': deviceUID,
435
+ 'key': key
92
436
  };
93
437
  var queryParams = {};
94
438
  var headerParams = {};
95
439
  var formParams = {};
96
- var authNames = ["personalAccessToken"];
440
+ var authNames = ['personalAccessToken'];
97
441
  var contentTypes = [];
98
- var accepts = ["application/json"];
442
+ var accepts = ['application/json'];
99
443
  var returnType = _EnvironmentVariables["default"];
100
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
444
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
101
445
  }
102
446
 
103
447
  /**
104
448
  * Delete environment variable of a device
105
- * @param {String} projectOrProductUID
106
- * @param {String} deviceUID
449
+ * @param {String} projectOrProductUID
450
+ * @param {String} deviceUID
107
451
  * @param {String} key The environment variable key to delete.
108
452
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
109
453
  */
@@ -116,63 +460,61 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
116
460
  }
117
461
 
118
462
  /**
119
- * Delete Device
120
- * @param {String} projectOrProductUID
121
- * @param {String} deviceUID
122
- * @param {Boolean} purge
463
+ * Deletes Notefiles and the Notes they contain.
464
+ * @param {String} projectOrProductUID
465
+ * @param {String} deviceUID
466
+ * @param {module:model/DeleteNotefilesRequest} deleteNotefilesRequest
123
467
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
124
468
  */
125
469
  }, {
126
- key: "deleteProjectDeviceWithHttpInfo",
127
- value: function deleteProjectDeviceWithHttpInfo(projectOrProductUID, deviceUID, purge) {
128
- var postBody = null;
470
+ key: "deleteNotefilesWithHttpInfo",
471
+ value: function deleteNotefilesWithHttpInfo(projectOrProductUID, deviceUID, deleteNotefilesRequest) {
472
+ var postBody = deleteNotefilesRequest;
129
473
  // verify the required parameter 'projectOrProductUID' is set
130
474
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
131
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling deleteProjectDevice");
475
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling deleteNotefiles");
132
476
  }
133
477
  // verify the required parameter 'deviceUID' is set
134
478
  if (deviceUID === undefined || deviceUID === null) {
135
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling deleteProjectDevice");
479
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling deleteNotefiles");
136
480
  }
137
- // verify the required parameter 'purge' is set
138
- if (purge === undefined || purge === null) {
139
- throw new _Error["default"]("Missing the required parameter 'purge' when calling deleteProjectDevice");
481
+ // verify the required parameter 'deleteNotefilesRequest' is set
482
+ if (deleteNotefilesRequest === undefined || deleteNotefilesRequest === null) {
483
+ throw new _Error["default"]("Missing the required parameter 'deleteNotefilesRequest' when calling deleteNotefiles");
140
484
  }
141
485
  var pathParams = {
142
- projectOrProductUID: projectOrProductUID,
143
- deviceUID: deviceUID
144
- };
145
- var queryParams = {
146
- purge: purge
486
+ 'projectOrProductUID': projectOrProductUID,
487
+ 'deviceUID': deviceUID
147
488
  };
489
+ var queryParams = {};
148
490
  var headerParams = {};
149
491
  var formParams = {};
150
- var authNames = ["personalAccessToken"];
151
- var contentTypes = [];
152
- var accepts = ["application/json"];
492
+ var authNames = ['personalAccessToken'];
493
+ var contentTypes = ['application/json'];
494
+ var accepts = ['application/json'];
153
495
  var returnType = null;
154
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
496
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
155
497
  }
156
498
 
157
499
  /**
158
- * Delete Device
159
- * @param {String} projectOrProductUID
160
- * @param {String} deviceUID
161
- * @param {Boolean} purge
500
+ * Deletes Notefiles and the Notes they contain.
501
+ * @param {String} projectOrProductUID
502
+ * @param {String} deviceUID
503
+ * @param {module:model/DeleteNotefilesRequest} deleteNotefilesRequest
162
504
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
163
505
  */
164
506
  }, {
165
- key: "deleteProjectDevice",
166
- value: function deleteProjectDevice(projectOrProductUID, deviceUID, purge) {
167
- return this.deleteProjectDeviceWithHttpInfo(projectOrProductUID, deviceUID, purge).then(function (response_and_data) {
507
+ key: "deleteNotefiles",
508
+ value: function deleteNotefiles(projectOrProductUID, deviceUID, deleteNotefilesRequest) {
509
+ return this.deleteNotefilesWithHttpInfo(projectOrProductUID, deviceUID, deleteNotefilesRequest).then(function (response_and_data) {
168
510
  return response_and_data.data;
169
511
  });
170
512
  }
171
513
 
172
514
  /**
173
515
  * Disable Device
174
- * @param {String} projectOrProductUID
175
- * @param {String} deviceUID
516
+ * @param {String} projectOrProductUID
517
+ * @param {String} deviceUID
176
518
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
177
519
  */
178
520
  }, {
@@ -188,23 +530,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
188
530
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling disableDevice");
189
531
  }
190
532
  var pathParams = {
191
- projectOrProductUID: projectOrProductUID,
192
- deviceUID: deviceUID
533
+ 'projectOrProductUID': projectOrProductUID,
534
+ 'deviceUID': deviceUID
193
535
  };
194
536
  var queryParams = {};
195
537
  var headerParams = {};
196
538
  var formParams = {};
197
- var authNames = ["personalAccessToken"];
539
+ var authNames = ['personalAccessToken'];
198
540
  var contentTypes = [];
199
- var accepts = ["application/json"];
541
+ var accepts = ['application/json'];
200
542
  var returnType = null;
201
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
543
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
202
544
  }
203
545
 
204
546
  /**
205
547
  * Disable Device
206
- * @param {String} projectOrProductUID
207
- * @param {String} deviceUID
548
+ * @param {String} projectOrProductUID
549
+ * @param {String} deviceUID
208
550
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
209
551
  */
210
552
  }, {
@@ -217,8 +559,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
217
559
 
218
560
  /**
219
561
  * Disable Connectivity Assurance
220
- * @param {String} projectOrProductUID
221
- * @param {String} deviceUID
562
+ * @param {String} projectOrProductUID
563
+ * @param {String} deviceUID
222
564
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
223
565
  */
224
566
  }, {
@@ -234,23 +576,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
234
576
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling disableDeviceConnectivityAssurance");
235
577
  }
236
578
  var pathParams = {
237
- projectOrProductUID: projectOrProductUID,
238
- deviceUID: deviceUID
579
+ 'projectOrProductUID': projectOrProductUID,
580
+ 'deviceUID': deviceUID
239
581
  };
240
582
  var queryParams = {};
241
583
  var headerParams = {};
242
584
  var formParams = {};
243
- var authNames = ["personalAccessToken"];
585
+ var authNames = ['personalAccessToken'];
244
586
  var contentTypes = [];
245
- var accepts = ["application/json"];
587
+ var accepts = ['application/json'];
246
588
  var returnType = null;
247
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable-connectivity-assurance", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
589
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable-connectivity-assurance', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
248
590
  }
249
591
 
250
592
  /**
251
593
  * Disable Connectivity Assurance
252
- * @param {String} projectOrProductUID
253
- * @param {String} deviceUID
594
+ * @param {String} projectOrProductUID
595
+ * @param {String} deviceUID
254
596
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
255
597
  */
256
598
  }, {
@@ -263,8 +605,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
263
605
 
264
606
  /**
265
607
  * Enable Device
266
- * @param {String} projectOrProductUID
267
- * @param {String} deviceUID
608
+ * @param {String} projectOrProductUID
609
+ * @param {String} deviceUID
268
610
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
269
611
  */
270
612
  }, {
@@ -280,23 +622,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
280
622
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling enableDevice");
281
623
  }
282
624
  var pathParams = {
283
- projectOrProductUID: projectOrProductUID,
284
- deviceUID: deviceUID
625
+ 'projectOrProductUID': projectOrProductUID,
626
+ 'deviceUID': deviceUID
285
627
  };
286
628
  var queryParams = {};
287
629
  var headerParams = {};
288
630
  var formParams = {};
289
- var authNames = ["personalAccessToken"];
631
+ var authNames = ['personalAccessToken'];
290
632
  var contentTypes = [];
291
- var accepts = ["application/json"];
633
+ var accepts = ['application/json'];
292
634
  var returnType = null;
293
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
635
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
294
636
  }
295
637
 
296
638
  /**
297
639
  * Enable Device
298
- * @param {String} projectOrProductUID
299
- * @param {String} deviceUID
640
+ * @param {String} projectOrProductUID
641
+ * @param {String} deviceUID
300
642
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
301
643
  */
302
644
  }, {
@@ -309,8 +651,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
309
651
 
310
652
  /**
311
653
  * Enable Connectivity Assurance
312
- * @param {String} projectOrProductUID
313
- * @param {String} deviceUID
654
+ * @param {String} projectOrProductUID
655
+ * @param {String} deviceUID
314
656
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
315
657
  */
316
658
  }, {
@@ -326,23 +668,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
326
668
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling enableDeviceConnectivityAssurance");
327
669
  }
328
670
  var pathParams = {
329
- projectOrProductUID: projectOrProductUID,
330
- deviceUID: deviceUID
671
+ 'projectOrProductUID': projectOrProductUID,
672
+ 'deviceUID': deviceUID
331
673
  };
332
674
  var queryParams = {};
333
675
  var headerParams = {};
334
676
  var formParams = {};
335
- var authNames = ["personalAccessToken"];
677
+ var authNames = ['personalAccessToken'];
336
678
  var contentTypes = [];
337
- var accepts = ["application/json"];
679
+ var accepts = ['application/json'];
338
680
  var returnType = null;
339
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable-connectivity-assurance", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
681
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable-connectivity-assurance', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
340
682
  }
341
683
 
342
684
  /**
343
685
  * Enable Connectivity Assurance
344
- * @param {String} projectOrProductUID
345
- * @param {String} deviceUID
686
+ * @param {String} projectOrProductUID
687
+ * @param {String} deviceUID
346
688
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}
347
689
  */
348
690
  }, {
@@ -353,10 +695,80 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
353
695
  });
354
696
  }
355
697
 
698
+ /**
699
+ * Get a note from a .db or .qi notefile
700
+ * @param {String} projectOrProductUID
701
+ * @param {String} deviceUID
702
+ * @param {String} notefileID
703
+ * @param {String} noteID
704
+ * @param {Object} opts Optional parameters
705
+ * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
706
+ * @param {Boolean} opts.deleted Whether to return deleted notes
707
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDbNote200Response} and HTTP response
708
+ */
709
+ }, {
710
+ key: "getDbNoteWithHttpInfo",
711
+ value: function getDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, opts) {
712
+ opts = opts || {};
713
+ var postBody = null;
714
+ // verify the required parameter 'projectOrProductUID' is set
715
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
716
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDbNote");
717
+ }
718
+ // verify the required parameter 'deviceUID' is set
719
+ if (deviceUID === undefined || deviceUID === null) {
720
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDbNote");
721
+ }
722
+ // verify the required parameter 'notefileID' is set
723
+ if (notefileID === undefined || notefileID === null) {
724
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling getDbNote");
725
+ }
726
+ // verify the required parameter 'noteID' is set
727
+ if (noteID === undefined || noteID === null) {
728
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling getDbNote");
729
+ }
730
+ var pathParams = {
731
+ 'projectOrProductUID': projectOrProductUID,
732
+ 'deviceUID': deviceUID,
733
+ 'notefileID': notefileID,
734
+ 'noteID': noteID
735
+ };
736
+ var queryParams = {
737
+ 'delete': opts['_delete'],
738
+ 'deleted': opts['deleted']
739
+ };
740
+ var headerParams = {};
741
+ var formParams = {};
742
+ var authNames = ['personalAccessToken'];
743
+ var contentTypes = [];
744
+ var accepts = ['application/json'];
745
+ var returnType = _GetDbNote200Response["default"];
746
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
747
+ }
748
+
749
+ /**
750
+ * Get a note from a .db or .qi notefile
751
+ * @param {String} projectOrProductUID
752
+ * @param {String} deviceUID
753
+ * @param {String} notefileID
754
+ * @param {String} noteID
755
+ * @param {Object} opts Optional parameters
756
+ * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
757
+ * @param {Boolean} opts.deleted Whether to return deleted notes
758
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDbNote200Response}
759
+ */
760
+ }, {
761
+ key: "getDbNote",
762
+ value: function getDbNote(projectOrProductUID, deviceUID, notefileID, noteID, opts) {
763
+ return this.getDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, opts).then(function (response_and_data) {
764
+ return response_and_data.data;
765
+ });
766
+ }
767
+
356
768
  /**
357
769
  * Get Device
358
- * @param {String} projectOrProductUID
359
- * @param {String} deviceUID
770
+ * @param {String} projectOrProductUID
771
+ * @param {String} deviceUID
360
772
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Device} and HTTP response
361
773
  */
362
774
  }, {
@@ -372,23 +784,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
372
784
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDevice");
373
785
  }
374
786
  var pathParams = {
375
- projectOrProductUID: projectOrProductUID,
376
- deviceUID: deviceUID
787
+ 'projectOrProductUID': projectOrProductUID,
788
+ 'deviceUID': deviceUID
377
789
  };
378
790
  var queryParams = {};
379
791
  var headerParams = {};
380
792
  var formParams = {};
381
- var authNames = ["personalAccessToken"];
793
+ var authNames = ['personalAccessToken'];
382
794
  var contentTypes = [];
383
- var accepts = ["application/json"];
795
+ var accepts = ['application/json'];
384
796
  var returnType = _Device["default"];
385
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
797
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
386
798
  }
387
799
 
388
800
  /**
389
801
  * Get Device
390
- * @param {String} projectOrProductUID
391
- * @param {String} deviceUID
802
+ * @param {String} projectOrProductUID
803
+ * @param {String} deviceUID
392
804
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Device}
393
805
  */
394
806
  }, {
@@ -401,8 +813,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
401
813
 
402
814
  /**
403
815
  * Get environment variable hierarchy for a device
404
- * @param {String} projectOrProductUID
405
- * @param {String} deviceUID
816
+ * @param {String} projectOrProductUID
817
+ * @param {String} deviceUID
406
818
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvTreeJsonNode} and HTTP response
407
819
  */
408
820
  }, {
@@ -418,23 +830,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
418
830
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceEnvironmentHierarchy");
419
831
  }
420
832
  var pathParams = {
421
- projectOrProductUID: projectOrProductUID,
422
- deviceUID: deviceUID
833
+ 'projectOrProductUID': projectOrProductUID,
834
+ 'deviceUID': deviceUID
423
835
  };
424
836
  var queryParams = {};
425
837
  var headerParams = {};
426
838
  var formParams = {};
427
- var authNames = ["personalAccessToken"];
839
+ var authNames = ['personalAccessToken'];
428
840
  var contentTypes = [];
429
- var accepts = ["application/json"];
841
+ var accepts = ['application/json'];
430
842
  var returnType = _EnvTreeJsonNode["default"];
431
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
843
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
432
844
  }
433
845
 
434
846
  /**
435
847
  * Get environment variable hierarchy for a device
436
- * @param {String} projectOrProductUID
437
- * @param {String} deviceUID
848
+ * @param {String} projectOrProductUID
849
+ * @param {String} deviceUID
438
850
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvTreeJsonNode}
439
851
  */
440
852
  }, {
@@ -447,8 +859,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
447
859
 
448
860
  /**
449
861
  * Get environment variables of a device
450
- * @param {String} projectOrProductUID
451
- * @param {String} deviceUID
862
+ * @param {String} projectOrProductUID
863
+ * @param {String} deviceUID
452
864
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response} and HTTP response
453
865
  */
454
866
  }, {
@@ -464,23 +876,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
464
876
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceEnvironmentVariables");
465
877
  }
466
878
  var pathParams = {
467
- projectOrProductUID: projectOrProductUID,
468
- deviceUID: deviceUID
879
+ 'projectOrProductUID': projectOrProductUID,
880
+ 'deviceUID': deviceUID
469
881
  };
470
882
  var queryParams = {};
471
883
  var headerParams = {};
472
884
  var formParams = {};
473
- var authNames = ["personalAccessToken"];
885
+ var authNames = ['personalAccessToken'];
474
886
  var contentTypes = [];
475
- var accepts = ["application/json"];
887
+ var accepts = ['application/json'];
476
888
  var returnType = _GetDeviceEnvironmentVariablesByPin200Response["default"];
477
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
889
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
478
890
  }
479
891
 
480
892
  /**
481
893
  * Get environment variables of a device
482
- * @param {String} projectOrProductUID
483
- * @param {String} deviceUID
894
+ * @param {String} projectOrProductUID
895
+ * @param {String} deviceUID
484
896
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response}
485
897
  */
486
898
  }, {
@@ -493,8 +905,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
493
905
 
494
906
  /**
495
907
  * Get environment variables of a device with device pin authorization
496
- * @param {String} productUID
497
- * @param {String} deviceUID
908
+ * @param {String} productUID
909
+ * @param {String} deviceUID
498
910
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response} and HTTP response
499
911
  */
500
912
  }, {
@@ -510,23 +922,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
510
922
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceEnvironmentVariablesByPin");
511
923
  }
512
924
  var pathParams = {
513
- productUID: productUID,
514
- deviceUID: deviceUID
925
+ 'productUID': productUID,
926
+ 'deviceUID': deviceUID
515
927
  };
516
928
  var queryParams = {};
517
929
  var headerParams = {};
518
930
  var formParams = {};
519
- var authNames = ["pin"];
931
+ var authNames = ['pin'];
520
932
  var contentTypes = [];
521
- var accepts = ["application/json"];
933
+ var accepts = ['application/json'];
522
934
  var returnType = _GetDeviceEnvironmentVariablesByPin200Response["default"];
523
- return this.apiClient.callApi("/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
935
+ return this.apiClient.callApi('/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
524
936
  }
525
937
 
526
938
  /**
527
939
  * Get environment variables of a device with device pin authorization
528
- * @param {String} productUID
529
- * @param {String} deviceUID
940
+ * @param {String} productUID
941
+ * @param {String} deviceUID
530
942
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceEnvironmentVariablesByPin200Response}
531
943
  */
532
944
  }, {
@@ -539,8 +951,8 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
539
951
 
540
952
  /**
541
953
  * Get Device Health Log
542
- * @param {String} projectOrProductUID
543
- * @param {String} deviceUID
954
+ * @param {String} projectOrProductUID
955
+ * @param {String} deviceUID
544
956
  * @param {Object} opts Optional parameters
545
957
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
546
958
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
@@ -561,27 +973,27 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
561
973
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceHealthLog");
562
974
  }
563
975
  var pathParams = {
564
- projectOrProductUID: projectOrProductUID,
565
- deviceUID: deviceUID
976
+ 'projectOrProductUID': projectOrProductUID,
977
+ 'deviceUID': deviceUID
566
978
  };
567
979
  var queryParams = {
568
- startDate: opts["startDate"],
569
- endDate: opts["endDate"],
570
- log_type: this.apiClient.buildCollectionParam(opts["logType"], "multi")
980
+ 'startDate': opts['startDate'],
981
+ 'endDate': opts['endDate'],
982
+ 'log_type': this.apiClient.buildCollectionParam(opts['logType'], 'multi')
571
983
  };
572
984
  var headerParams = {};
573
985
  var formParams = {};
574
- var authNames = ["personalAccessToken"];
986
+ var authNames = ['personalAccessToken'];
575
987
  var contentTypes = [];
576
- var accepts = ["application/json"];
988
+ var accepts = ['application/json'];
577
989
  var returnType = _GetDeviceHealthLog200Response["default"];
578
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
990
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
579
991
  }
580
992
 
581
993
  /**
582
994
  * Get Device Health Log
583
- * @param {String} projectOrProductUID
584
- * @param {String} deviceUID
995
+ * @param {String} projectOrProductUID
996
+ * @param {String} deviceUID
585
997
  * @param {Object} opts Optional parameters
586
998
  * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
587
999
  * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
@@ -598,54 +1010,54 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
598
1010
 
599
1011
  /**
600
1012
  * Get Device Latest Events
601
- * @param {String} projectOrProductUID
602
- * @param {String} deviceUID
603
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceLatest200Response} and HTTP response
1013
+ * @param {String} projectOrProductUID
1014
+ * @param {String} deviceUID
1015
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceLatestEvents200Response} and HTTP response
604
1016
  */
605
1017
  }, {
606
- key: "getDeviceLatestWithHttpInfo",
607
- value: function getDeviceLatestWithHttpInfo(projectOrProductUID, deviceUID) {
1018
+ key: "getDeviceLatestEventsWithHttpInfo",
1019
+ value: function getDeviceLatestEventsWithHttpInfo(projectOrProductUID, deviceUID) {
608
1020
  var postBody = null;
609
1021
  // verify the required parameter 'projectOrProductUID' is set
610
1022
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
611
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDeviceLatest");
1023
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDeviceLatestEvents");
612
1024
  }
613
1025
  // verify the required parameter 'deviceUID' is set
614
1026
  if (deviceUID === undefined || deviceUID === null) {
615
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceLatest");
1027
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceLatestEvents");
616
1028
  }
617
1029
  var pathParams = {
618
- projectOrProductUID: projectOrProductUID,
619
- deviceUID: deviceUID
1030
+ 'projectOrProductUID': projectOrProductUID,
1031
+ 'deviceUID': deviceUID
620
1032
  };
621
1033
  var queryParams = {};
622
1034
  var headerParams = {};
623
1035
  var formParams = {};
624
- var authNames = ["personalAccessToken"];
1036
+ var authNames = ['personalAccessToken'];
625
1037
  var contentTypes = [];
626
- var accepts = ["application/json"];
627
- var returnType = _GetDeviceLatest200Response["default"];
628
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1038
+ var accepts = ['application/json'];
1039
+ var returnType = _GetDeviceLatestEvents200Response["default"];
1040
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
629
1041
  }
630
1042
 
631
1043
  /**
632
1044
  * Get Device Latest Events
633
- * @param {String} projectOrProductUID
634
- * @param {String} deviceUID
635
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceLatest200Response}
1045
+ * @param {String} projectOrProductUID
1046
+ * @param {String} deviceUID
1047
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceLatestEvents200Response}
636
1048
  */
637
1049
  }, {
638
- key: "getDeviceLatest",
639
- value: function getDeviceLatest(projectOrProductUID, deviceUID) {
640
- return this.getDeviceLatestWithHttpInfo(projectOrProductUID, deviceUID).then(function (response_and_data) {
1050
+ key: "getDeviceLatestEvents",
1051
+ value: function getDeviceLatestEvents(projectOrProductUID, deviceUID) {
1052
+ return this.getDeviceLatestEventsWithHttpInfo(projectOrProductUID, deviceUID).then(function (response_and_data) {
641
1053
  return response_and_data.data;
642
1054
  });
643
1055
  }
644
1056
 
645
1057
  /**
646
1058
  * Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.
647
- * @param {String} projectOrProductUID
648
- * @param {String} deviceUID
1059
+ * @param {String} projectOrProductUID
1060
+ * @param {String} deviceUID
649
1061
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevicePlans200Response} and HTTP response
650
1062
  */
651
1063
  }, {
@@ -661,23 +1073,23 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
661
1073
  throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDevicePlans");
662
1074
  }
663
1075
  var pathParams = {
664
- projectOrProductUID: projectOrProductUID,
665
- deviceUID: deviceUID
1076
+ 'projectOrProductUID': projectOrProductUID,
1077
+ 'deviceUID': deviceUID
666
1078
  };
667
1079
  var queryParams = {};
668
1080
  var headerParams = {};
669
1081
  var formParams = {};
670
- var authNames = ["personalAccessToken"];
1082
+ var authNames = ['personalAccessToken'];
671
1083
  var contentTypes = [];
672
- var accepts = ["application/json"];
1084
+ var accepts = ['application/json'];
673
1085
  var returnType = _GetDevicePlans200Response["default"];
674
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1086
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
675
1087
  }
676
1088
 
677
1089
  /**
678
1090
  * Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.
679
- * @param {String} projectOrProductUID
680
- * @param {String} deviceUID
1091
+ * @param {String} projectOrProductUID
1092
+ * @param {String} deviceUID
681
1093
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevicePlans200Response}
682
1094
  */
683
1095
  }, {
@@ -689,1060 +1101,695 @@ var DeviceApi = exports["default"] = /*#__PURE__*/function () {
689
1101
  }
690
1102
 
691
1103
  /**
692
- * Get Device Public Key
693
- * @param {String} projectOrProductUID
694
- * @param {String} deviceUID
695
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevicePublicKey200Response} and HTTP response
696
- */
697
- }, {
698
- key: "getDevicePublicKeyWithHttpInfo",
699
- value: function getDevicePublicKeyWithHttpInfo(projectOrProductUID, deviceUID) {
700
- var postBody = null;
701
- // verify the required parameter 'projectOrProductUID' is set
702
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
703
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDevicePublicKey");
704
- }
705
- // verify the required parameter 'deviceUID' is set
706
- if (deviceUID === undefined || deviceUID === null) {
707
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDevicePublicKey");
708
- }
709
- var pathParams = {
710
- projectOrProductUID: projectOrProductUID,
711
- deviceUID: deviceUID
712
- };
713
- var queryParams = {};
714
- var headerParams = {};
715
- var formParams = {};
716
- var authNames = ["personalAccessToken"];
717
- var contentTypes = [];
718
- var accepts = ["application/json"];
719
- var returnType = _GetDevicePublicKey200Response["default"];
720
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
721
- }
722
-
723
- /**
724
- * Get Device Public Key
725
- * @param {String} projectOrProductUID
726
- * @param {String} deviceUID
727
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevicePublicKey200Response}
728
- */
729
- }, {
730
- key: "getDevicePublicKey",
731
- value: function getDevicePublicKey(projectOrProductUID, deviceUID) {
732
- return this.getDevicePublicKeyWithHttpInfo(projectOrProductUID, deviceUID).then(function (response_and_data) {
733
- return response_and_data.data;
734
- });
735
- }
736
-
737
- /**
738
- * Get Device Sessions
739
- * @param {String} projectOrProductUID
740
- * @param {String} deviceUID
741
- * @param {Object} opts Optional parameters
742
- * @param {Number} opts.pageSize (default to 50)
743
- * @param {Number} opts.pageNum (default to 1)
744
- * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
745
- * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
746
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceSessions200Response} and HTTP response
747
- */
748
- }, {
749
- key: "getDeviceSessionsWithHttpInfo",
750
- value: function getDeviceSessionsWithHttpInfo(projectOrProductUID, deviceUID, opts) {
751
- opts = opts || {};
752
- var postBody = null;
753
- // verify the required parameter 'projectOrProductUID' is set
754
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
755
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDeviceSessions");
756
- }
757
- // verify the required parameter 'deviceUID' is set
758
- if (deviceUID === undefined || deviceUID === null) {
759
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceSessions");
760
- }
761
- var pathParams = {
762
- projectOrProductUID: projectOrProductUID,
763
- deviceUID: deviceUID
764
- };
765
- var queryParams = {
766
- pageSize: opts["pageSize"],
767
- pageNum: opts["pageNum"],
768
- startDate: opts["startDate"],
769
- endDate: opts["endDate"]
770
- };
771
- var headerParams = {};
772
- var formParams = {};
773
- var authNames = ["personalAccessToken"];
774
- var contentTypes = [];
775
- var accepts = ["application/json"];
776
- var returnType = _GetDeviceSessions200Response["default"];
777
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
778
- }
779
-
780
- /**
781
- * Get Device Sessions
782
- * @param {String} projectOrProductUID
783
- * @param {String} deviceUID
784
- * @param {Object} opts Optional parameters
785
- * @param {Number} opts.pageSize (default to 50)
786
- * @param {Number} opts.pageNum (default to 1)
787
- * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
788
- * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
789
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceSessions200Response}
790
- */
791
- }, {
792
- key: "getDeviceSessions",
793
- value: function getDeviceSessions(projectOrProductUID, deviceUID, opts) {
794
- return this.getDeviceSessionsWithHttpInfo(projectOrProductUID, deviceUID, opts).then(function (response_and_data) {
795
- return response_and_data.data;
796
- });
797
- }
798
-
799
- /**
800
- * Get Device Public Keys of a Project
801
- * @param {String} projectOrProductUID
802
- * @param {Object} opts Optional parameters
803
- * @param {Number} opts.pageSize (default to 50)
804
- * @param {Number} opts.pageNum (default to 1)
805
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevicePublicKeys200Response} and HTTP response
806
- */
807
- }, {
808
- key: "getProjectDevicePublicKeysWithHttpInfo",
809
- value: function getProjectDevicePublicKeysWithHttpInfo(projectOrProductUID, opts) {
810
- opts = opts || {};
811
- var postBody = null;
812
- // verify the required parameter 'projectOrProductUID' is set
813
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
814
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getProjectDevicePublicKeys");
815
- }
816
- var pathParams = {
817
- projectOrProductUID: projectOrProductUID
818
- };
819
- var queryParams = {
820
- pageSize: opts["pageSize"],
821
- pageNum: opts["pageNum"]
822
- };
823
- var headerParams = {};
824
- var formParams = {};
825
- var authNames = ["personalAccessToken"];
826
- var contentTypes = [];
827
- var accepts = ["application/json"];
828
- var returnType = _GetProjectDevicePublicKeys200Response["default"];
829
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/public-keys", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
830
- }
831
-
832
- /**
833
- * Get Device Public Keys of a Project
834
- * @param {String} projectOrProductUID
835
- * @param {Object} opts Optional parameters
836
- * @param {Number} opts.pageSize (default to 50)
837
- * @param {Number} opts.pageNum (default to 1)
838
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevicePublicKeys200Response}
839
- */
840
- }, {
841
- key: "getProjectDevicePublicKeys",
842
- value: function getProjectDevicePublicKeys(projectOrProductUID, opts) {
843
- return this.getProjectDevicePublicKeysWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
844
- return response_and_data.data;
845
- });
846
- }
847
-
848
- /**
849
- * Get Devices of a Project
850
- * @param {String} projectOrProductUID
851
- * @param {Object} opts Optional parameters
852
- * @param {Number} opts.pageSize (default to 50)
853
- * @param {Number} opts.pageNum (default to 1)
854
- * @param {Array.<String>} opts.deviceUID A Device UID.
855
- * @param {Array.<String>} opts.tag Tag filter
856
- * @param {Array.<String>} opts.serialNumber Serial number filter
857
- * @param {Array.<String>} opts.fleetUID
858
- * @param {Array.<String>} opts.notecardFirmware Firmware version filter
859
- * @param {Array.<String>} opts.location Location filter
860
- * @param {Array.<String>} opts.hostFirmware Host firmware filter
861
- * @param {Array.<String>} opts.productUID
862
- * @param {Array.<String>} opts.sku SKU filter
863
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevices200Response} and HTTP response
864
- */
865
- }, {
866
- key: "getProjectDevicesWithHttpInfo",
867
- value: function getProjectDevicesWithHttpInfo(projectOrProductUID, opts) {
868
- opts = opts || {};
869
- var postBody = null;
870
- // verify the required parameter 'projectOrProductUID' is set
871
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
872
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getProjectDevices");
873
- }
874
- var pathParams = {
875
- projectOrProductUID: projectOrProductUID
876
- };
877
- var queryParams = {
878
- pageSize: opts["pageSize"],
879
- pageNum: opts["pageNum"],
880
- deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
881
- tag: this.apiClient.buildCollectionParam(opts["tag"], "multi"),
882
- serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
883
- fleetUID: this.apiClient.buildCollectionParam(opts["fleetUID"], "multi"),
884
- notecardFirmware: this.apiClient.buildCollectionParam(opts["notecardFirmware"], "multi"),
885
- location: this.apiClient.buildCollectionParam(opts["location"], "multi"),
886
- hostFirmware: this.apiClient.buildCollectionParam(opts["hostFirmware"], "multi"),
887
- productUID: this.apiClient.buildCollectionParam(opts["productUID"], "multi"),
888
- sku: this.apiClient.buildCollectionParam(opts["sku"], "multi")
889
- };
890
- var headerParams = {};
891
- var formParams = {};
892
- var authNames = ["personalAccessToken"];
893
- var contentTypes = [];
894
- var accepts = ["application/json"];
895
- var returnType = _GetProjectDevices200Response["default"];
896
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
897
- }
898
-
899
- /**
900
- * Get Devices of a Project
901
- * @param {String} projectOrProductUID
902
- * @param {Object} opts Optional parameters
903
- * @param {Number} opts.pageSize (default to 50)
904
- * @param {Number} opts.pageNum (default to 1)
905
- * @param {Array.<String>} opts.deviceUID A Device UID.
906
- * @param {Array.<String>} opts.tag Tag filter
907
- * @param {Array.<String>} opts.serialNumber Serial number filter
908
- * @param {Array.<String>} opts.fleetUID
909
- * @param {Array.<String>} opts.notecardFirmware Firmware version filter
910
- * @param {Array.<String>} opts.location Location filter
911
- * @param {Array.<String>} opts.hostFirmware Host firmware filter
912
- * @param {Array.<String>} opts.productUID
913
- * @param {Array.<String>} opts.sku SKU filter
914
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevices200Response}
915
- */
916
- }, {
917
- key: "getProjectDevices",
918
- value: function getProjectDevices(projectOrProductUID, opts) {
919
- return this.getProjectDevicesWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
920
- return response_and_data.data;
921
- });
922
- }
923
-
924
- /**
925
- * Get Devices of a Fleet within a Project
926
- * @param {String} projectOrProductUID
927
- * @param {String} fleetUID
928
- * @param {Object} opts Optional parameters
929
- * @param {Number} opts.pageSize (default to 50)
930
- * @param {Number} opts.pageNum (default to 1)
931
- * @param {Array.<String>} opts.deviceUID A Device UID.
932
- * @param {Array.<String>} opts.tag Tag filter
933
- * @param {Array.<String>} opts.serialNumber Serial number filter
934
- * @param {Array.<String>} opts.notecardFirmware Firmware version filter
935
- * @param {Array.<String>} opts.location Location filter
936
- * @param {Array.<String>} opts.hostFirmware Host firmware filter
937
- * @param {Array.<String>} opts.productUID
938
- * @param {Array.<String>} opts.sku SKU filter
939
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectDevices200Response} and HTTP response
940
- */
941
- }, {
942
- key: "getProjectFleetDevicesWithHttpInfo",
943
- value: function getProjectFleetDevicesWithHttpInfo(projectOrProductUID, fleetUID, opts) {
944
- opts = opts || {};
945
- var postBody = null;
946
- // verify the required parameter 'projectOrProductUID' is set
947
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
948
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getProjectFleetDevices");
949
- }
950
- // verify the required parameter 'fleetUID' is set
951
- if (fleetUID === undefined || fleetUID === null) {
952
- throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getProjectFleetDevices");
953
- }
954
- var pathParams = {
955
- projectOrProductUID: projectOrProductUID,
956
- fleetUID: fleetUID
957
- };
958
- var queryParams = {
959
- pageSize: opts["pageSize"],
960
- pageNum: opts["pageNum"],
961
- deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
962
- tag: this.apiClient.buildCollectionParam(opts["tag"], "multi"),
963
- serialNumber: this.apiClient.buildCollectionParam(opts["serialNumber"], "multi"),
964
- notecardFirmware: this.apiClient.buildCollectionParam(opts["notecardFirmware"], "multi"),
965
- location: this.apiClient.buildCollectionParam(opts["location"], "multi"),
966
- hostFirmware: this.apiClient.buildCollectionParam(opts["hostFirmware"], "multi"),
967
- productUID: this.apiClient.buildCollectionParam(opts["productUID"], "multi"),
968
- sku: this.apiClient.buildCollectionParam(opts["sku"], "multi")
969
- };
970
- var headerParams = {};
971
- var formParams = {};
972
- var authNames = ["personalAccessToken"];
973
- var contentTypes = [];
974
- var accepts = ["application/json"];
975
- var returnType = _GetProjectDevices200Response["default"];
976
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
977
- }
978
-
979
- /**
980
- * Get Devices of a Fleet within a Project
981
- * @param {String} projectOrProductUID
982
- * @param {String} fleetUID
983
- * @param {Object} opts Optional parameters
984
- * @param {Number} opts.pageSize (default to 50)
985
- * @param {Number} opts.pageNum (default to 1)
986
- * @param {Array.<String>} opts.deviceUID A Device UID.
987
- * @param {Array.<String>} opts.tag Tag filter
988
- * @param {Array.<String>} opts.serialNumber Serial number filter
989
- * @param {Array.<String>} opts.notecardFirmware Firmware version filter
990
- * @param {Array.<String>} opts.location Location filter
991
- * @param {Array.<String>} opts.hostFirmware Host firmware filter
992
- * @param {Array.<String>} opts.productUID
993
- * @param {Array.<String>} opts.sku SKU filter
994
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectDevices200Response}
995
- */
996
- }, {
997
- key: "getProjectFleetDevices",
998
- value: function getProjectFleetDevices(projectOrProductUID, fleetUID, opts) {
999
- return this.getProjectFleetDevicesWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
1000
- return response_and_data.data;
1001
- });
1002
- }
1003
-
1004
- /**
1005
- * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
1006
- * @param {String} projectOrProductUID
1007
- * @param {String} deviceUID
1008
- * @param {String} notefileID
1009
- * @param {module:model/Note} note Body or payload of note to be added to the device
1010
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1011
- */
1012
- }, {
1013
- key: "handleNoteAddWithHttpInfo",
1014
- value: function handleNoteAddWithHttpInfo(projectOrProductUID, deviceUID, notefileID, note) {
1015
- var postBody = note;
1016
- // verify the required parameter 'projectOrProductUID' is set
1017
- if (projectOrProductUID === undefined || projectOrProductUID === null) {
1018
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNoteAdd");
1019
- }
1020
- // verify the required parameter 'deviceUID' is set
1021
- if (deviceUID === undefined || deviceUID === null) {
1022
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteAdd");
1023
- }
1024
- // verify the required parameter 'notefileID' is set
1025
- if (notefileID === undefined || notefileID === null) {
1026
- throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteAdd");
1027
- }
1028
- // verify the required parameter 'note' is set
1029
- if (note === undefined || note === null) {
1030
- throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteAdd");
1031
- }
1032
- var pathParams = {
1033
- projectOrProductUID: projectOrProductUID,
1034
- deviceUID: deviceUID,
1035
- notefileID: notefileID
1036
- };
1037
- var queryParams = {};
1038
- var headerParams = {};
1039
- var formParams = {};
1040
- var authNames = ["personalAccessToken"];
1041
- var contentTypes = ["application/json"];
1042
- var accepts = ["application/json"];
1043
- var returnType = null;
1044
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1045
- }
1046
-
1047
- /**
1048
- * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
1049
- * @param {String} projectOrProductUID
1050
- * @param {String} deviceUID
1051
- * @param {String} notefileID
1052
- * @param {module:model/Note} note Body or payload of note to be added to the device
1053
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1054
- */
1055
- }, {
1056
- key: "handleNoteAdd",
1057
- value: function handleNoteAdd(projectOrProductUID, deviceUID, notefileID, note) {
1058
- return this.handleNoteAddWithHttpInfo(projectOrProductUID, deviceUID, notefileID, note).then(function (response_and_data) {
1059
- return response_and_data.data;
1060
- });
1061
- }
1062
-
1063
- /**
1064
- * Incrementally retrieve changes within a specific Notefile.
1065
- * @param {String} projectOrProductUID
1066
- * @param {String} deviceUID
1067
- * @param {String} notefileID
1068
- * @param {Object} opts Optional parameters
1069
- * @param {Number} opts.max The maximum number of Notes to return in the request.
1070
- * @param {Boolean} opts.deleted true to return deleted notes.
1071
- * @param {Boolean} opts._delete true to delete the notes returned by the request.
1072
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteChanges200Response} and HTTP response
1104
+ * Get Device Public Key
1105
+ * @param {String} projectOrProductUID
1106
+ * @param {String} deviceUID
1107
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevicePublicKey200Response} and HTTP response
1073
1108
  */
1074
1109
  }, {
1075
- key: "handleNoteChangesWithHttpInfo",
1076
- value: function handleNoteChangesWithHttpInfo(projectOrProductUID, deviceUID, notefileID, opts) {
1077
- opts = opts || {};
1110
+ key: "getDevicePublicKeyWithHttpInfo",
1111
+ value: function getDevicePublicKeyWithHttpInfo(projectOrProductUID, deviceUID) {
1078
1112
  var postBody = null;
1079
1113
  // verify the required parameter 'projectOrProductUID' is set
1080
1114
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1081
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNoteChanges");
1115
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDevicePublicKey");
1082
1116
  }
1083
1117
  // verify the required parameter 'deviceUID' is set
1084
1118
  if (deviceUID === undefined || deviceUID === null) {
1085
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteChanges");
1086
- }
1087
- // verify the required parameter 'notefileID' is set
1088
- if (notefileID === undefined || notefileID === null) {
1089
- throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteChanges");
1119
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDevicePublicKey");
1090
1120
  }
1091
1121
  var pathParams = {
1092
- projectOrProductUID: projectOrProductUID,
1093
- deviceUID: deviceUID,
1094
- notefileID: notefileID
1095
- };
1096
- var queryParams = {
1097
- max: opts["max"],
1098
- deleted: opts["deleted"],
1099
- "delete": opts["_delete"]
1122
+ 'projectOrProductUID': projectOrProductUID,
1123
+ 'deviceUID': deviceUID
1100
1124
  };
1125
+ var queryParams = {};
1101
1126
  var headerParams = {};
1102
1127
  var formParams = {};
1103
- var authNames = ["personalAccessToken"];
1128
+ var authNames = ['personalAccessToken'];
1104
1129
  var contentTypes = [];
1105
- var accepts = ["application/json"];
1106
- var returnType = _HandleNoteChanges200Response["default"];
1107
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/changes", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1130
+ var accepts = ['application/json'];
1131
+ var returnType = _GetDevicePublicKey200Response["default"];
1132
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1108
1133
  }
1109
1134
 
1110
1135
  /**
1111
- * Incrementally retrieve changes within a specific Notefile.
1112
- * @param {String} projectOrProductUID
1113
- * @param {String} deviceUID
1114
- * @param {String} notefileID
1115
- * @param {Object} opts Optional parameters
1116
- * @param {Number} opts.max The maximum number of Notes to return in the request.
1117
- * @param {Boolean} opts.deleted true to return deleted notes.
1118
- * @param {Boolean} opts._delete true to delete the notes returned by the request.
1119
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteChanges200Response}
1136
+ * Get Device Public Key
1137
+ * @param {String} projectOrProductUID
1138
+ * @param {String} deviceUID
1139
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevicePublicKey200Response}
1120
1140
  */
1121
1141
  }, {
1122
- key: "handleNoteChanges",
1123
- value: function handleNoteChanges(projectOrProductUID, deviceUID, notefileID, opts) {
1124
- return this.handleNoteChangesWithHttpInfo(projectOrProductUID, deviceUID, notefileID, opts).then(function (response_and_data) {
1142
+ key: "getDevicePublicKey",
1143
+ value: function getDevicePublicKey(projectOrProductUID, deviceUID) {
1144
+ return this.getDevicePublicKeyWithHttpInfo(projectOrProductUID, deviceUID).then(function (response_and_data) {
1125
1145
  return response_and_data.data;
1126
1146
  });
1127
1147
  }
1128
1148
 
1129
1149
  /**
1130
- * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
1131
- * @param {String} projectOrProductUID
1132
- * @param {String} deviceUID
1133
- * @param {String} notefileID
1134
- * @param {String} noteID
1135
- * @param {module:model/Note} note Body or payload of note to be added to the device
1136
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1150
+ * Get Device Public Keys of a Project
1151
+ * @param {String} projectOrProductUID
1152
+ * @param {Object} opts Optional parameters
1153
+ * @param {Number} opts.pageSize (default to 50)
1154
+ * @param {Number} opts.pageNum (default to 1)
1155
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevicePublicKeys200Response} and HTTP response
1137
1156
  */
1138
1157
  }, {
1139
- key: "handleNoteCreateAddWithHttpInfo",
1140
- value: function handleNoteCreateAddWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note) {
1141
- var postBody = note;
1158
+ key: "getDevicePublicKeysWithHttpInfo",
1159
+ value: function getDevicePublicKeysWithHttpInfo(projectOrProductUID, opts) {
1160
+ opts = opts || {};
1161
+ var postBody = null;
1142
1162
  // verify the required parameter 'projectOrProductUID' is set
1143
1163
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1144
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNoteCreateAdd");
1145
- }
1146
- // verify the required parameter 'deviceUID' is set
1147
- if (deviceUID === undefined || deviceUID === null) {
1148
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteCreateAdd");
1149
- }
1150
- // verify the required parameter 'notefileID' is set
1151
- if (notefileID === undefined || notefileID === null) {
1152
- throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteCreateAdd");
1153
- }
1154
- // verify the required parameter 'noteID' is set
1155
- if (noteID === undefined || noteID === null) {
1156
- throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteCreateAdd");
1157
- }
1158
- // verify the required parameter 'note' is set
1159
- if (note === undefined || note === null) {
1160
- throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteCreateAdd");
1164
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDevicePublicKeys");
1161
1165
  }
1162
1166
  var pathParams = {
1163
- projectOrProductUID: projectOrProductUID,
1164
- deviceUID: deviceUID,
1165
- notefileID: notefileID,
1166
- noteID: noteID
1167
+ 'projectOrProductUID': projectOrProductUID
1168
+ };
1169
+ var queryParams = {
1170
+ 'pageSize': opts['pageSize'],
1171
+ 'pageNum': opts['pageNum']
1167
1172
  };
1168
- var queryParams = {};
1169
1173
  var headerParams = {};
1170
1174
  var formParams = {};
1171
- var authNames = ["personalAccessToken"];
1172
- var contentTypes = ["application/json"];
1173
- var accepts = ["application/json"];
1174
- var returnType = null;
1175
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1175
+ var authNames = ['personalAccessToken'];
1176
+ var contentTypes = [];
1177
+ var accepts = ['application/json'];
1178
+ var returnType = _GetDevicePublicKeys200Response["default"];
1179
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/public-keys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1176
1180
  }
1177
1181
 
1178
1182
  /**
1179
- * Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
1180
- * @param {String} projectOrProductUID
1181
- * @param {String} deviceUID
1182
- * @param {String} notefileID
1183
- * @param {String} noteID
1184
- * @param {module:model/Note} note Body or payload of note to be added to the device
1185
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1183
+ * Get Device Public Keys of a Project
1184
+ * @param {String} projectOrProductUID
1185
+ * @param {Object} opts Optional parameters
1186
+ * @param {Number} opts.pageSize (default to 50)
1187
+ * @param {Number} opts.pageNum (default to 1)
1188
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevicePublicKeys200Response}
1186
1189
  */
1187
1190
  }, {
1188
- key: "handleNoteCreateAdd",
1189
- value: function handleNoteCreateAdd(projectOrProductUID, deviceUID, notefileID, noteID, note) {
1190
- return this.handleNoteCreateAddWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
1191
+ key: "getDevicePublicKeys",
1192
+ value: function getDevicePublicKeys(projectOrProductUID, opts) {
1193
+ return this.getDevicePublicKeysWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
1191
1194
  return response_and_data.data;
1192
1195
  });
1193
1196
  }
1194
1197
 
1195
1198
  /**
1196
- * Delete a note from a DB notefile
1197
- * @param {String} projectOrProductUID
1198
- * @param {String} deviceUID
1199
- * @param {String} notefileID
1200
- * @param {String} noteID
1201
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1199
+ * Get Device Sessions
1200
+ * @param {String} projectOrProductUID
1201
+ * @param {String} deviceUID
1202
+ * @param {Object} opts Optional parameters
1203
+ * @param {Number} opts.pageSize (default to 50)
1204
+ * @param {Number} opts.pageNum (default to 1)
1205
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
1206
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
1207
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDeviceSessions200Response} and HTTP response
1202
1208
  */
1203
1209
  }, {
1204
- key: "handleNoteDeleteWithHttpInfo",
1205
- value: function handleNoteDeleteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID) {
1210
+ key: "getDeviceSessionsWithHttpInfo",
1211
+ value: function getDeviceSessionsWithHttpInfo(projectOrProductUID, deviceUID, opts) {
1212
+ opts = opts || {};
1206
1213
  var postBody = null;
1207
1214
  // verify the required parameter 'projectOrProductUID' is set
1208
1215
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1209
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNoteDelete");
1216
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDeviceSessions");
1210
1217
  }
1211
1218
  // verify the required parameter 'deviceUID' is set
1212
1219
  if (deviceUID === undefined || deviceUID === null) {
1213
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteDelete");
1214
- }
1215
- // verify the required parameter 'notefileID' is set
1216
- if (notefileID === undefined || notefileID === null) {
1217
- throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteDelete");
1218
- }
1219
- // verify the required parameter 'noteID' is set
1220
- if (noteID === undefined || noteID === null) {
1221
- throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteDelete");
1220
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getDeviceSessions");
1222
1221
  }
1223
1222
  var pathParams = {
1224
- projectOrProductUID: projectOrProductUID,
1225
- deviceUID: deviceUID,
1226
- notefileID: notefileID,
1227
- noteID: noteID
1223
+ 'projectOrProductUID': projectOrProductUID,
1224
+ 'deviceUID': deviceUID
1225
+ };
1226
+ var queryParams = {
1227
+ 'pageSize': opts['pageSize'],
1228
+ 'pageNum': opts['pageNum'],
1229
+ 'startDate': opts['startDate'],
1230
+ 'endDate': opts['endDate']
1228
1231
  };
1229
- var queryParams = {};
1230
1232
  var headerParams = {};
1231
1233
  var formParams = {};
1232
- var authNames = ["personalAccessToken"];
1234
+ var authNames = ['personalAccessToken'];
1233
1235
  var contentTypes = [];
1234
- var accepts = ["application/json"];
1235
- var returnType = null;
1236
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1236
+ var accepts = ['application/json'];
1237
+ var returnType = _GetDeviceSessions200Response["default"];
1238
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1237
1239
  }
1238
1240
 
1239
1241
  /**
1240
- * Delete a note from a DB notefile
1241
- * @param {String} projectOrProductUID
1242
- * @param {String} deviceUID
1243
- * @param {String} notefileID
1244
- * @param {String} noteID
1245
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1242
+ * Get Device Sessions
1243
+ * @param {String} projectOrProductUID
1244
+ * @param {String} deviceUID
1245
+ * @param {Object} opts Optional parameters
1246
+ * @param {Number} opts.pageSize (default to 50)
1247
+ * @param {Number} opts.pageNum (default to 1)
1248
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
1249
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
1250
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDeviceSessions200Response}
1246
1251
  */
1247
1252
  }, {
1248
- key: "handleNoteDelete",
1249
- value: function handleNoteDelete(projectOrProductUID, deviceUID, notefileID, noteID) {
1250
- return this.handleNoteDeleteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID).then(function (response_and_data) {
1253
+ key: "getDeviceSessions",
1254
+ value: function getDeviceSessions(projectOrProductUID, deviceUID, opts) {
1255
+ return this.getDeviceSessionsWithHttpInfo(projectOrProductUID, deviceUID, opts).then(function (response_and_data) {
1251
1256
  return response_and_data.data;
1252
1257
  });
1253
1258
  }
1254
1259
 
1255
1260
  /**
1256
- * Get a note from a DB notefile
1257
- * @param {String} projectOrProductUID
1258
- * @param {String} deviceUID
1259
- * @param {String} notefileID
1260
- * @param {String} noteID
1261
+ * Get Devices of a Project
1262
+ * @param {String} projectOrProductUID
1261
1263
  * @param {Object} opts Optional parameters
1262
- * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
1263
- * @param {Boolean} opts.deleted Whether to return deleted notes
1264
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteGet200Response} and HTTP response
1264
+ * @param {Number} opts.pageSize (default to 50)
1265
+ * @param {Number} opts.pageNum (default to 1)
1266
+ * @param {Array.<String>} opts.deviceUID A Device UID.
1267
+ * @param {Array.<String>} opts.tag Tag filter
1268
+ * @param {Array.<String>} opts.serialNumber Serial number filter
1269
+ * @param {Array.<String>} opts.fleetUID
1270
+ * @param {Array.<String>} opts.notecardFirmware Firmware version filter
1271
+ * @param {Array.<String>} opts.location Location filter
1272
+ * @param {Array.<String>} opts.hostFirmware Host firmware filter
1273
+ * @param {Array.<String>} opts.productUID
1274
+ * @param {Array.<String>} opts.sku SKU filter
1275
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevices200Response} and HTTP response
1265
1276
  */
1266
1277
  }, {
1267
- key: "handleNoteGetWithHttpInfo",
1268
- value: function handleNoteGetWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, opts) {
1278
+ key: "getDevicesWithHttpInfo",
1279
+ value: function getDevicesWithHttpInfo(projectOrProductUID, opts) {
1269
1280
  opts = opts || {};
1270
1281
  var postBody = null;
1271
1282
  // verify the required parameter 'projectOrProductUID' is set
1272
1283
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1273
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNoteGet");
1274
- }
1275
- // verify the required parameter 'deviceUID' is set
1276
- if (deviceUID === undefined || deviceUID === null) {
1277
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteGet");
1278
- }
1279
- // verify the required parameter 'notefileID' is set
1280
- if (notefileID === undefined || notefileID === null) {
1281
- throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteGet");
1282
- }
1283
- // verify the required parameter 'noteID' is set
1284
- if (noteID === undefined || noteID === null) {
1285
- throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteGet");
1284
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDevices");
1286
1285
  }
1287
1286
  var pathParams = {
1288
- projectOrProductUID: projectOrProductUID,
1289
- deviceUID: deviceUID,
1290
- notefileID: notefileID,
1291
- noteID: noteID
1287
+ 'projectOrProductUID': projectOrProductUID
1292
1288
  };
1293
1289
  var queryParams = {
1294
- "delete": opts["_delete"],
1295
- deleted: opts["deleted"]
1290
+ 'pageSize': opts['pageSize'],
1291
+ 'pageNum': opts['pageNum'],
1292
+ 'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
1293
+ 'tag': this.apiClient.buildCollectionParam(opts['tag'], 'multi'),
1294
+ 'serialNumber': this.apiClient.buildCollectionParam(opts['serialNumber'], 'multi'),
1295
+ 'fleetUID': this.apiClient.buildCollectionParam(opts['fleetUID'], 'multi'),
1296
+ 'notecardFirmware': this.apiClient.buildCollectionParam(opts['notecardFirmware'], 'multi'),
1297
+ 'location': this.apiClient.buildCollectionParam(opts['location'], 'multi'),
1298
+ 'hostFirmware': this.apiClient.buildCollectionParam(opts['hostFirmware'], 'multi'),
1299
+ 'productUID': this.apiClient.buildCollectionParam(opts['productUID'], 'multi'),
1300
+ 'sku': this.apiClient.buildCollectionParam(opts['sku'], 'multi')
1296
1301
  };
1297
1302
  var headerParams = {};
1298
1303
  var formParams = {};
1299
- var authNames = ["personalAccessToken"];
1304
+ var authNames = ['personalAccessToken'];
1300
1305
  var contentTypes = [];
1301
- var accepts = ["application/json"];
1302
- var returnType = _HandleNoteGet200Response["default"];
1303
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1306
+ var accepts = ['application/json'];
1307
+ var returnType = _GetDevices200Response["default"];
1308
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1304
1309
  }
1305
1310
 
1306
1311
  /**
1307
- * Get a note from a DB notefile
1308
- * @param {String} projectOrProductUID
1309
- * @param {String} deviceUID
1310
- * @param {String} notefileID
1311
- * @param {String} noteID
1312
+ * Get Devices of a Project
1313
+ * @param {String} projectOrProductUID
1312
1314
  * @param {Object} opts Optional parameters
1313
- * @param {Boolean} opts._delete Whether to delete the note from the DB notefile
1314
- * @param {Boolean} opts.deleted Whether to return deleted notes
1315
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteGet200Response}
1315
+ * @param {Number} opts.pageSize (default to 50)
1316
+ * @param {Number} opts.pageNum (default to 1)
1317
+ * @param {Array.<String>} opts.deviceUID A Device UID.
1318
+ * @param {Array.<String>} opts.tag Tag filter
1319
+ * @param {Array.<String>} opts.serialNumber Serial number filter
1320
+ * @param {Array.<String>} opts.fleetUID
1321
+ * @param {Array.<String>} opts.notecardFirmware Firmware version filter
1322
+ * @param {Array.<String>} opts.location Location filter
1323
+ * @param {Array.<String>} opts.hostFirmware Host firmware filter
1324
+ * @param {Array.<String>} opts.productUID
1325
+ * @param {Array.<String>} opts.sku SKU filter
1326
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevices200Response}
1316
1327
  */
1317
1328
  }, {
1318
- key: "handleNoteGet",
1319
- value: function handleNoteGet(projectOrProductUID, deviceUID, notefileID, noteID, opts) {
1320
- return this.handleNoteGetWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, opts).then(function (response_and_data) {
1329
+ key: "getDevices",
1330
+ value: function getDevices(projectOrProductUID, opts) {
1331
+ return this.getDevicesWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
1321
1332
  return response_and_data.data;
1322
1333
  });
1323
1334
  }
1324
1335
 
1325
1336
  /**
1326
- * Send a signal from Notehub to a Notecard.
1327
- * @param {String} projectOrProductUID
1328
- * @param {String} deviceUID
1329
- * @param {module:model/Body} body Body or payload of singnal to be sent to the device
1330
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteSignal200Response} and HTTP response
1337
+ * Get Devices of a Fleet within a Project
1338
+ * @param {String} projectOrProductUID
1339
+ * @param {String} fleetUID
1340
+ * @param {Object} opts Optional parameters
1341
+ * @param {Number} opts.pageSize (default to 50)
1342
+ * @param {Number} opts.pageNum (default to 1)
1343
+ * @param {Array.<String>} opts.deviceUID A Device UID.
1344
+ * @param {Array.<String>} opts.tag Tag filter
1345
+ * @param {Array.<String>} opts.serialNumber Serial number filter
1346
+ * @param {Array.<String>} opts.notecardFirmware Firmware version filter
1347
+ * @param {Array.<String>} opts.location Location filter
1348
+ * @param {Array.<String>} opts.hostFirmware Host firmware filter
1349
+ * @param {Array.<String>} opts.productUID
1350
+ * @param {Array.<String>} opts.sku SKU filter
1351
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDevices200Response} and HTTP response
1331
1352
  */
1332
1353
  }, {
1333
- key: "handleNoteSignalWithHttpInfo",
1334
- value: function handleNoteSignalWithHttpInfo(projectOrProductUID, deviceUID, body) {
1335
- var postBody = body;
1354
+ key: "getFleetDevicesWithHttpInfo",
1355
+ value: function getFleetDevicesWithHttpInfo(projectOrProductUID, fleetUID, opts) {
1356
+ opts = opts || {};
1357
+ var postBody = null;
1336
1358
  // verify the required parameter 'projectOrProductUID' is set
1337
1359
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1338
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNoteSignal");
1360
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getFleetDevices");
1339
1361
  }
1340
- // verify the required parameter 'deviceUID' is set
1341
- if (deviceUID === undefined || deviceUID === null) {
1342
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteSignal");
1343
- }
1344
- // verify the required parameter 'body' is set
1345
- if (body === undefined || body === null) {
1346
- throw new _Error["default"]("Missing the required parameter 'body' when calling handleNoteSignal");
1362
+ // verify the required parameter 'fleetUID' is set
1363
+ if (fleetUID === undefined || fleetUID === null) {
1364
+ throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetDevices");
1347
1365
  }
1348
1366
  var pathParams = {
1349
- projectOrProductUID: projectOrProductUID,
1350
- deviceUID: deviceUID
1367
+ 'projectOrProductUID': projectOrProductUID,
1368
+ 'fleetUID': fleetUID
1369
+ };
1370
+ var queryParams = {
1371
+ 'pageSize': opts['pageSize'],
1372
+ 'pageNum': opts['pageNum'],
1373
+ 'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
1374
+ 'tag': this.apiClient.buildCollectionParam(opts['tag'], 'multi'),
1375
+ 'serialNumber': this.apiClient.buildCollectionParam(opts['serialNumber'], 'multi'),
1376
+ 'notecardFirmware': this.apiClient.buildCollectionParam(opts['notecardFirmware'], 'multi'),
1377
+ 'location': this.apiClient.buildCollectionParam(opts['location'], 'multi'),
1378
+ 'hostFirmware': this.apiClient.buildCollectionParam(opts['hostFirmware'], 'multi'),
1379
+ 'productUID': this.apiClient.buildCollectionParam(opts['productUID'], 'multi'),
1380
+ 'sku': this.apiClient.buildCollectionParam(opts['sku'], 'multi')
1351
1381
  };
1352
- var queryParams = {};
1353
1382
  var headerParams = {};
1354
1383
  var formParams = {};
1355
- var authNames = ["personalAccessToken"];
1356
- var contentTypes = ["application/json"];
1357
- var accepts = ["application/json"];
1358
- var returnType = _HandleNoteSignal200Response["default"];
1359
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1384
+ var authNames = ['personalAccessToken'];
1385
+ var contentTypes = [];
1386
+ var accepts = ['application/json'];
1387
+ var returnType = _GetDevices200Response["default"];
1388
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1360
1389
  }
1361
1390
 
1362
1391
  /**
1363
- * Send a signal from Notehub to a Notecard.
1364
- * @param {String} projectOrProductUID
1365
- * @param {String} deviceUID
1366
- * @param {module:model/Body} body Body or payload of singnal to be sent to the device
1367
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteSignal200Response}
1392
+ * Get Devices of a Fleet within a Project
1393
+ * @param {String} projectOrProductUID
1394
+ * @param {String} fleetUID
1395
+ * @param {Object} opts Optional parameters
1396
+ * @param {Number} opts.pageSize (default to 50)
1397
+ * @param {Number} opts.pageNum (default to 1)
1398
+ * @param {Array.<String>} opts.deviceUID A Device UID.
1399
+ * @param {Array.<String>} opts.tag Tag filter
1400
+ * @param {Array.<String>} opts.serialNumber Serial number filter
1401
+ * @param {Array.<String>} opts.notecardFirmware Firmware version filter
1402
+ * @param {Array.<String>} opts.location Location filter
1403
+ * @param {Array.<String>} opts.hostFirmware Host firmware filter
1404
+ * @param {Array.<String>} opts.productUID
1405
+ * @param {Array.<String>} opts.sku SKU filter
1406
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDevices200Response}
1368
1407
  */
1369
1408
  }, {
1370
- key: "handleNoteSignal",
1371
- value: function handleNoteSignal(projectOrProductUID, deviceUID, body) {
1372
- return this.handleNoteSignalWithHttpInfo(projectOrProductUID, deviceUID, body).then(function (response_and_data) {
1409
+ key: "getFleetDevices",
1410
+ value: function getFleetDevices(projectOrProductUID, fleetUID, opts) {
1411
+ return this.getFleetDevicesWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
1373
1412
  return response_and_data.data;
1374
1413
  });
1375
1414
  }
1376
1415
 
1377
1416
  /**
1378
- * Update a note in a DB notefile
1379
- * @param {String} projectOrProductUID
1380
- * @param {String} deviceUID
1381
- * @param {String} notefileID
1382
- * @param {String} noteID
1383
- * @param {module:model/Note} note Body or payload of note to be added to the device
1384
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1417
+ * For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile
1418
+ * @param {String} projectOrProductUID
1419
+ * @param {String} deviceUID
1420
+ * @param {String} notefileID
1421
+ * @param {Object} opts Optional parameters
1422
+ * @param {Number} opts.max The maximum number of Notes to return in the request.
1423
+ * @param {Boolean} opts.deleted true to return deleted notes.
1424
+ * @param {Boolean} opts._delete true to delete the notes returned by the request.
1425
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetNotefile200Response} and HTTP response
1385
1426
  */
1386
1427
  }, {
1387
- key: "handleNoteUpdateWithHttpInfo",
1388
- value: function handleNoteUpdateWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note) {
1389
- var postBody = note;
1428
+ key: "getNotefileWithHttpInfo",
1429
+ value: function getNotefileWithHttpInfo(projectOrProductUID, deviceUID, notefileID, opts) {
1430
+ opts = opts || {};
1431
+ var postBody = null;
1390
1432
  // verify the required parameter 'projectOrProductUID' is set
1391
1433
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1392
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNoteUpdate");
1434
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getNotefile");
1393
1435
  }
1394
1436
  // verify the required parameter 'deviceUID' is set
1395
1437
  if (deviceUID === undefined || deviceUID === null) {
1396
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteUpdate");
1438
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getNotefile");
1397
1439
  }
1398
1440
  // verify the required parameter 'notefileID' is set
1399
1441
  if (notefileID === undefined || notefileID === null) {
1400
- throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteUpdate");
1401
- }
1402
- // verify the required parameter 'noteID' is set
1403
- if (noteID === undefined || noteID === null) {
1404
- throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteUpdate");
1405
- }
1406
- // verify the required parameter 'note' is set
1407
- if (note === undefined || note === null) {
1408
- throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteUpdate");
1442
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling getNotefile");
1409
1443
  }
1410
1444
  var pathParams = {
1411
- projectOrProductUID: projectOrProductUID,
1412
- deviceUID: deviceUID,
1413
- notefileID: notefileID,
1414
- noteID: noteID
1445
+ 'projectOrProductUID': projectOrProductUID,
1446
+ 'deviceUID': deviceUID,
1447
+ 'notefileID': notefileID
1448
+ };
1449
+ var queryParams = {
1450
+ 'max': opts['max'],
1451
+ 'deleted': opts['deleted'],
1452
+ 'delete': opts['_delete']
1415
1453
  };
1416
- var queryParams = {};
1417
1454
  var headerParams = {};
1418
1455
  var formParams = {};
1419
- var authNames = ["personalAccessToken"];
1420
- var contentTypes = ["application/json"];
1421
- var accepts = ["application/json"];
1422
- var returnType = null;
1423
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1456
+ var authNames = ['personalAccessToken'];
1457
+ var contentTypes = [];
1458
+ var accepts = ['application/json'];
1459
+ var returnType = _GetNotefile200Response["default"];
1460
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1424
1461
  }
1425
1462
 
1426
1463
  /**
1427
- * Update a note in a DB notefile
1428
- * @param {String} projectOrProductUID
1429
- * @param {String} deviceUID
1430
- * @param {String} notefileID
1431
- * @param {String} noteID
1432
- * @param {module:model/Note} note Body or payload of note to be added to the device
1433
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1464
+ * For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile
1465
+ * @param {String} projectOrProductUID
1466
+ * @param {String} deviceUID
1467
+ * @param {String} notefileID
1468
+ * @param {Object} opts Optional parameters
1469
+ * @param {Number} opts.max The maximum number of Notes to return in the request.
1470
+ * @param {Boolean} opts.deleted true to return deleted notes.
1471
+ * @param {Boolean} opts._delete true to delete the notes returned by the request.
1472
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetNotefile200Response}
1434
1473
  */
1435
1474
  }, {
1436
- key: "handleNoteUpdate",
1437
- value: function handleNoteUpdate(projectOrProductUID, deviceUID, notefileID, noteID, note) {
1438
- return this.handleNoteUpdateWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
1475
+ key: "getNotefile",
1476
+ value: function getNotefile(projectOrProductUID, deviceUID, notefileID, opts) {
1477
+ return this.getNotefileWithHttpInfo(projectOrProductUID, deviceUID, notefileID, opts).then(function (response_and_data) {
1439
1478
  return response_and_data.data;
1440
1479
  });
1441
1480
  }
1442
1481
 
1443
1482
  /**
1444
- * Used to perform queries on a single or multiple files to determine if new Notes are available to read
1445
- * @param {String} projectOrProductUID
1446
- * @param {String} deviceUID
1447
- * @param {Object} opts Optional parameters
1448
- * @param {Array.<String>} opts.files One or more files to obtain change information from.
1449
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNotefileChanges200Response} and HTTP response
1483
+ * Get Notefile Templates
1484
+ * @param {String} projectOrProductUID
1485
+ * @param {String} deviceUID
1486
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/NotefileTemplate>} and HTTP response
1450
1487
  */
1451
1488
  }, {
1452
- key: "handleNotefileChangesWithHttpInfo",
1453
- value: function handleNotefileChangesWithHttpInfo(projectOrProductUID, deviceUID, opts) {
1454
- opts = opts || {};
1489
+ key: "getNotefileTemplatesWithHttpInfo",
1490
+ value: function getNotefileTemplatesWithHttpInfo(projectOrProductUID, deviceUID) {
1455
1491
  var postBody = null;
1456
1492
  // verify the required parameter 'projectOrProductUID' is set
1457
1493
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1458
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNotefileChanges");
1494
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getNotefileTemplates");
1459
1495
  }
1460
1496
  // verify the required parameter 'deviceUID' is set
1461
1497
  if (deviceUID === undefined || deviceUID === null) {
1462
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileChanges");
1498
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling getNotefileTemplates");
1463
1499
  }
1464
1500
  var pathParams = {
1465
- projectOrProductUID: projectOrProductUID,
1466
- deviceUID: deviceUID
1467
- };
1468
- var queryParams = {
1469
- files: this.apiClient.buildCollectionParam(opts["files"], "multi")
1501
+ 'projectOrProductUID': projectOrProductUID,
1502
+ 'deviceUID': deviceUID
1470
1503
  };
1504
+ var queryParams = {};
1471
1505
  var headerParams = {};
1472
1506
  var formParams = {};
1473
- var authNames = ["personalAccessToken"];
1507
+ var authNames = ['personalAccessToken'];
1474
1508
  var contentTypes = [];
1475
- var accepts = ["application/json"];
1476
- var returnType = _HandleNotefileChanges200Response["default"];
1477
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files/changes", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1509
+ var accepts = ['application/json'];
1510
+ var returnType = [_NotefileTemplate["default"]];
1511
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files/templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1478
1512
  }
1479
1513
 
1480
1514
  /**
1481
- * Used to perform queries on a single or multiple files to determine if new Notes are available to read
1482
- * @param {String} projectOrProductUID
1483
- * @param {String} deviceUID
1484
- * @param {Object} opts Optional parameters
1485
- * @param {Array.<String>} opts.files One or more files to obtain change information from.
1486
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNotefileChanges200Response}
1515
+ * Get Notefile Templates
1516
+ * @param {String} projectOrProductUID
1517
+ * @param {String} deviceUID
1518
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/NotefileTemplate>}
1487
1519
  */
1488
1520
  }, {
1489
- key: "handleNotefileChanges",
1490
- value: function handleNotefileChanges(projectOrProductUID, deviceUID, opts) {
1491
- return this.handleNotefileChangesWithHttpInfo(projectOrProductUID, deviceUID, opts).then(function (response_and_data) {
1521
+ key: "getNotefileTemplates",
1522
+ value: function getNotefileTemplates(projectOrProductUID, deviceUID) {
1523
+ return this.getNotefileTemplatesWithHttpInfo(projectOrProductUID, deviceUID).then(function (response_and_data) {
1492
1524
  return response_and_data.data;
1493
1525
  });
1494
1526
  }
1495
1527
 
1496
1528
  /**
1497
- * Returns info about file changes that are pending upload to Notehub or download to the Notecard.
1498
- * @param {String} projectOrProductUID
1499
- * @param {String} deviceUID
1500
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNotefileChangesPending200Response} and HTTP response
1529
+ * Lists .qi and .db files for the device
1530
+ * @param {String} projectOrProductUID
1531
+ * @param {String} deviceUID
1532
+ * @param {Object} opts Optional parameters
1533
+ * @param {Array.<String>} opts.files One or more files to obtain change information from.
1534
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/Notefile>} and HTTP response
1501
1535
  */
1502
1536
  }, {
1503
- key: "handleNotefileChangesPendingWithHttpInfo",
1504
- value: function handleNotefileChangesPendingWithHttpInfo(projectOrProductUID, deviceUID) {
1537
+ key: "listNotefilesWithHttpInfo",
1538
+ value: function listNotefilesWithHttpInfo(projectOrProductUID, deviceUID, opts) {
1539
+ opts = opts || {};
1505
1540
  var postBody = null;
1506
1541
  // verify the required parameter 'projectOrProductUID' is set
1507
1542
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1508
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNotefileChangesPending");
1543
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling listNotefiles");
1509
1544
  }
1510
1545
  // verify the required parameter 'deviceUID' is set
1511
1546
  if (deviceUID === undefined || deviceUID === null) {
1512
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileChangesPending");
1547
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling listNotefiles");
1513
1548
  }
1514
1549
  var pathParams = {
1515
- projectOrProductUID: projectOrProductUID,
1516
- deviceUID: deviceUID
1550
+ 'projectOrProductUID': projectOrProductUID,
1551
+ 'deviceUID': deviceUID
1552
+ };
1553
+ var queryParams = {
1554
+ 'files': this.apiClient.buildCollectionParam(opts['files'], 'multi')
1517
1555
  };
1518
- var queryParams = {};
1519
1556
  var headerParams = {};
1520
1557
  var formParams = {};
1521
- var authNames = ["personalAccessToken"];
1558
+ var authNames = ['personalAccessToken'];
1522
1559
  var contentTypes = [];
1523
- var accepts = ["application/json"];
1524
- var returnType = _HandleNotefileChangesPending200Response["default"];
1525
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files/changes/pending", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1560
+ var accepts = ['application/json'];
1561
+ var returnType = [_Notefile["default"]];
1562
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1526
1563
  }
1527
1564
 
1528
1565
  /**
1529
- * Returns info about file changes that are pending upload to Notehub or download to the Notecard.
1530
- * @param {String} projectOrProductUID
1531
- * @param {String} deviceUID
1532
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNotefileChangesPending200Response}
1566
+ * Lists .qi and .db files for the device
1567
+ * @param {String} projectOrProductUID
1568
+ * @param {String} deviceUID
1569
+ * @param {Object} opts Optional parameters
1570
+ * @param {Array.<String>} opts.files One or more files to obtain change information from.
1571
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Notefile>}
1533
1572
  */
1534
1573
  }, {
1535
- key: "handleNotefileChangesPending",
1536
- value: function handleNotefileChangesPending(projectOrProductUID, deviceUID) {
1537
- return this.handleNotefileChangesPendingWithHttpInfo(projectOrProductUID, deviceUID).then(function (response_and_data) {
1574
+ key: "listNotefiles",
1575
+ value: function listNotefiles(projectOrProductUID, deviceUID, opts) {
1576
+ return this.listNotefilesWithHttpInfo(projectOrProductUID, deviceUID, opts).then(function (response_and_data) {
1538
1577
  return response_and_data.data;
1539
1578
  });
1540
1579
  }
1541
1580
 
1542
1581
  /**
1543
- * Deletes Notefiles and the Notes they contain.
1544
- * @param {String} projectOrProductUID
1545
- * @param {String} deviceUID
1546
- * @param {module:model/HandleNotefileDeleteRequest} handleNotefileDeleteRequest
1547
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1582
+ * Lists .qi and .db files that are pending sync to the Notecard
1583
+ * @param {String} projectOrProductUID
1584
+ * @param {String} deviceUID
1585
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPendingNotefiles200Response} and HTTP response
1548
1586
  */
1549
1587
  }, {
1550
- key: "handleNotefileDeleteWithHttpInfo",
1551
- value: function handleNotefileDeleteWithHttpInfo(projectOrProductUID, deviceUID, handleNotefileDeleteRequest) {
1552
- var postBody = handleNotefileDeleteRequest;
1588
+ key: "listPendingNotefilesWithHttpInfo",
1589
+ value: function listPendingNotefilesWithHttpInfo(projectOrProductUID, deviceUID) {
1590
+ var postBody = null;
1553
1591
  // verify the required parameter 'projectOrProductUID' is set
1554
1592
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1555
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling handleNotefileDelete");
1593
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling listPendingNotefiles");
1556
1594
  }
1557
1595
  // verify the required parameter 'deviceUID' is set
1558
1596
  if (deviceUID === undefined || deviceUID === null) {
1559
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileDelete");
1560
- }
1561
- // verify the required parameter 'handleNotefileDeleteRequest' is set
1562
- if (handleNotefileDeleteRequest === undefined || handleNotefileDeleteRequest === null) {
1563
- throw new _Error["default"]("Missing the required parameter 'handleNotefileDeleteRequest' when calling handleNotefileDelete");
1597
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling listPendingNotefiles");
1564
1598
  }
1565
1599
  var pathParams = {
1566
- projectOrProductUID: projectOrProductUID,
1567
- deviceUID: deviceUID
1600
+ 'projectOrProductUID': projectOrProductUID,
1601
+ 'deviceUID': deviceUID
1568
1602
  };
1569
1603
  var queryParams = {};
1570
1604
  var headerParams = {};
1571
1605
  var formParams = {};
1572
- var authNames = ["personalAccessToken"];
1573
- var contentTypes = ["application/json"];
1574
- var accepts = ["application/json"];
1575
- var returnType = null;
1576
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1606
+ var authNames = ['personalAccessToken'];
1607
+ var contentTypes = [];
1608
+ var accepts = ['application/json'];
1609
+ var returnType = _ListPendingNotefiles200Response["default"];
1610
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/files/changes/pending', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1577
1611
  }
1578
1612
 
1579
1613
  /**
1580
- * Deletes Notefiles and the Notes they contain.
1581
- * @param {String} projectOrProductUID
1582
- * @param {String} deviceUID
1583
- * @param {module:model/HandleNotefileDeleteRequest} handleNotefileDeleteRequest
1584
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1614
+ * Lists .qi and .db files that are pending sync to the Notecard
1615
+ * @param {String} projectOrProductUID
1616
+ * @param {String} deviceUID
1617
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPendingNotefiles200Response}
1585
1618
  */
1586
1619
  }, {
1587
- key: "handleNotefileDelete",
1588
- value: function handleNotefileDelete(projectOrProductUID, deviceUID, handleNotefileDeleteRequest) {
1589
- return this.handleNotefileDeleteWithHttpInfo(projectOrProductUID, deviceUID, handleNotefileDeleteRequest).then(function (response_and_data) {
1620
+ key: "listPendingNotefiles",
1621
+ value: function listPendingNotefiles(projectOrProductUID, deviceUID) {
1622
+ return this.listPendingNotefilesWithHttpInfo(projectOrProductUID, deviceUID).then(function (response_and_data) {
1590
1623
  return response_and_data.data;
1591
1624
  });
1592
1625
  }
1593
1626
 
1594
1627
  /**
1595
1628
  * Provision Device for a Project
1596
- * @param {String} projectOrProductUID
1597
- * @param {String} deviceUID
1598
- * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID
1629
+ * @param {String} projectOrProductUID
1630
+ * @param {String} deviceUID
1631
+ * @param {module:model/ProvisionDeviceRequest} provisionDeviceRequest Provision a device to a specific ProductUID
1599
1632
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
1600
1633
  */
1601
1634
  }, {
1602
- key: "postProvisionProjectDeviceWithHttpInfo",
1603
- value: function postProvisionProjectDeviceWithHttpInfo(projectOrProductUID, deviceUID, postProvisionProjectDeviceRequest) {
1604
- var postBody = postProvisionProjectDeviceRequest;
1635
+ key: "provisionDeviceWithHttpInfo",
1636
+ value: function provisionDeviceWithHttpInfo(projectOrProductUID, deviceUID, provisionDeviceRequest) {
1637
+ var postBody = provisionDeviceRequest;
1605
1638
  // verify the required parameter 'projectOrProductUID' is set
1606
1639
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1607
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling postProvisionProjectDevice");
1640
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling provisionDevice");
1608
1641
  }
1609
1642
  // verify the required parameter 'deviceUID' is set
1610
1643
  if (deviceUID === undefined || deviceUID === null) {
1611
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling postProvisionProjectDevice");
1644
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling provisionDevice");
1612
1645
  }
1613
- // verify the required parameter 'postProvisionProjectDeviceRequest' is set
1614
- if (postProvisionProjectDeviceRequest === undefined || postProvisionProjectDeviceRequest === null) {
1615
- throw new _Error["default"]("Missing the required parameter 'postProvisionProjectDeviceRequest' when calling postProvisionProjectDevice");
1646
+ // verify the required parameter 'provisionDeviceRequest' is set
1647
+ if (provisionDeviceRequest === undefined || provisionDeviceRequest === null) {
1648
+ throw new _Error["default"]("Missing the required parameter 'provisionDeviceRequest' when calling provisionDevice");
1616
1649
  }
1617
1650
  var pathParams = {
1618
- projectOrProductUID: projectOrProductUID,
1619
- deviceUID: deviceUID
1651
+ 'projectOrProductUID': projectOrProductUID,
1652
+ 'deviceUID': deviceUID
1620
1653
  };
1621
1654
  var queryParams = {};
1622
1655
  var headerParams = {};
1623
1656
  var formParams = {};
1624
- var authNames = ["personalAccessToken"];
1625
- var contentTypes = ["application/json"];
1626
- var accepts = ["application/json"];
1657
+ var authNames = ['personalAccessToken'];
1658
+ var contentTypes = ['application/json'];
1659
+ var accepts = ['application/json'];
1627
1660
  var returnType = Object;
1628
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1661
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1629
1662
  }
1630
1663
 
1631
1664
  /**
1632
1665
  * Provision Device for a Project
1633
- * @param {String} projectOrProductUID
1634
- * @param {String} deviceUID
1635
- * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID
1666
+ * @param {String} projectOrProductUID
1667
+ * @param {String} deviceUID
1668
+ * @param {module:model/ProvisionDeviceRequest} provisionDeviceRequest Provision a device to a specific ProductUID
1636
1669
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
1637
1670
  */
1638
1671
  }, {
1639
- key: "postProvisionProjectDevice",
1640
- value: function postProvisionProjectDevice(projectOrProductUID, deviceUID, postProvisionProjectDeviceRequest) {
1641
- return this.postProvisionProjectDeviceWithHttpInfo(projectOrProductUID, deviceUID, postProvisionProjectDeviceRequest).then(function (response_and_data) {
1672
+ key: "provisionDevice",
1673
+ value: function provisionDevice(projectOrProductUID, deviceUID, provisionDeviceRequest) {
1674
+ return this.provisionDeviceWithHttpInfo(projectOrProductUID, deviceUID, provisionDeviceRequest).then(function (response_and_data) {
1642
1675
  return response_and_data.data;
1643
1676
  });
1644
1677
  }
1645
1678
 
1646
1679
  /**
1647
- * Put environment variables of a device
1648
- * @param {String} projectOrProductUID
1649
- * @param {String} deviceUID
1650
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1651
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
1680
+ * Send a signal from Notehub to a Notecard.
1681
+ * @param {String} projectOrProductUID
1682
+ * @param {String} deviceUID
1683
+ * @param {module:model/Body} body Body or payload of signal to be sent to the device
1684
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignalDevice200Response} and HTTP response
1652
1685
  */
1653
1686
  }, {
1654
- key: "putDeviceEnvironmentVariablesWithHttpInfo",
1655
- value: function putDeviceEnvironmentVariablesWithHttpInfo(projectOrProductUID, deviceUID, environmentVariables) {
1656
- var postBody = environmentVariables;
1687
+ key: "signalDeviceWithHttpInfo",
1688
+ value: function signalDeviceWithHttpInfo(projectOrProductUID, deviceUID, body) {
1689
+ var postBody = body;
1657
1690
  // verify the required parameter 'projectOrProductUID' is set
1658
1691
  if (projectOrProductUID === undefined || projectOrProductUID === null) {
1659
- throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling putDeviceEnvironmentVariables");
1692
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling signalDevice");
1660
1693
  }
1661
1694
  // verify the required parameter 'deviceUID' is set
1662
1695
  if (deviceUID === undefined || deviceUID === null) {
1663
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceEnvironmentVariables");
1696
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling signalDevice");
1664
1697
  }
1665
- // verify the required parameter 'environmentVariables' is set
1666
- if (environmentVariables === undefined || environmentVariables === null) {
1667
- throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling putDeviceEnvironmentVariables");
1698
+ // verify the required parameter 'body' is set
1699
+ if (body === undefined || body === null) {
1700
+ throw new _Error["default"]("Missing the required parameter 'body' when calling signalDevice");
1668
1701
  }
1669
1702
  var pathParams = {
1670
- projectOrProductUID: projectOrProductUID,
1671
- deviceUID: deviceUID
1703
+ 'projectOrProductUID': projectOrProductUID,
1704
+ 'deviceUID': deviceUID
1672
1705
  };
1673
1706
  var queryParams = {};
1674
1707
  var headerParams = {};
1675
1708
  var formParams = {};
1676
- var authNames = ["personalAccessToken"];
1677
- var contentTypes = ["application/json"];
1678
- var accepts = ["application/json"];
1679
- var returnType = _EnvironmentVariables["default"];
1680
- return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1709
+ var authNames = ['personalAccessToken'];
1710
+ var contentTypes = ['application/json'];
1711
+ var accepts = ['application/json'];
1712
+ var returnType = _SignalDevice200Response["default"];
1713
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1681
1714
  }
1682
1715
 
1683
1716
  /**
1684
- * Put environment variables of a device
1685
- * @param {String} projectOrProductUID
1686
- * @param {String} deviceUID
1687
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1688
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
1717
+ * Send a signal from Notehub to a Notecard.
1718
+ * @param {String} projectOrProductUID
1719
+ * @param {String} deviceUID
1720
+ * @param {module:model/Body} body Body or payload of signal to be sent to the device
1721
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignalDevice200Response}
1689
1722
  */
1690
1723
  }, {
1691
- key: "putDeviceEnvironmentVariables",
1692
- value: function putDeviceEnvironmentVariables(projectOrProductUID, deviceUID, environmentVariables) {
1693
- return this.putDeviceEnvironmentVariablesWithHttpInfo(projectOrProductUID, deviceUID, environmentVariables).then(function (response_and_data) {
1724
+ key: "signalDevice",
1725
+ value: function signalDevice(projectOrProductUID, deviceUID, body) {
1726
+ return this.signalDeviceWithHttpInfo(projectOrProductUID, deviceUID, body).then(function (response_and_data) {
1694
1727
  return response_and_data.data;
1695
1728
  });
1696
1729
  }
1697
1730
 
1698
1731
  /**
1699
- * Put environment variables of a device with device pin authorization
1700
- * @param {String} productUID
1701
- * @param {String} deviceUID
1702
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1703
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentVariables} and HTTP response
1732
+ * Update a note in a .db or .qi notefile
1733
+ * @param {String} projectOrProductUID
1734
+ * @param {String} deviceUID
1735
+ * @param {String} notefileID
1736
+ * @param {String} noteID
1737
+ * @param {module:model/Note} note Body or payload of note to be added to the device
1738
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
1704
1739
  */
1705
1740
  }, {
1706
- key: "putDeviceEnvironmentVariablesByPinWithHttpInfo",
1707
- value: function putDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables) {
1708
- var postBody = environmentVariables;
1709
- // verify the required parameter 'productUID' is set
1710
- if (productUID === undefined || productUID === null) {
1711
- throw new _Error["default"]("Missing the required parameter 'productUID' when calling putDeviceEnvironmentVariablesByPin");
1741
+ key: "updateDbNoteWithHttpInfo",
1742
+ value: function updateDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note) {
1743
+ var postBody = note;
1744
+ // verify the required parameter 'projectOrProductUID' is set
1745
+ if (projectOrProductUID === undefined || projectOrProductUID === null) {
1746
+ throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling updateDbNote");
1712
1747
  }
1713
1748
  // verify the required parameter 'deviceUID' is set
1714
1749
  if (deviceUID === undefined || deviceUID === null) {
1715
- throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling putDeviceEnvironmentVariablesByPin");
1750
+ throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling updateDbNote");
1716
1751
  }
1717
- // verify the required parameter 'environmentVariables' is set
1718
- if (environmentVariables === undefined || environmentVariables === null) {
1719
- throw new _Error["default"]("Missing the required parameter 'environmentVariables' when calling putDeviceEnvironmentVariablesByPin");
1752
+ // verify the required parameter 'notefileID' is set
1753
+ if (notefileID === undefined || notefileID === null) {
1754
+ throw new _Error["default"]("Missing the required parameter 'notefileID' when calling updateDbNote");
1755
+ }
1756
+ // verify the required parameter 'noteID' is set
1757
+ if (noteID === undefined || noteID === null) {
1758
+ throw new _Error["default"]("Missing the required parameter 'noteID' when calling updateDbNote");
1759
+ }
1760
+ // verify the required parameter 'note' is set
1761
+ if (note === undefined || note === null) {
1762
+ throw new _Error["default"]("Missing the required parameter 'note' when calling updateDbNote");
1720
1763
  }
1721
1764
  var pathParams = {
1722
- productUID: productUID,
1723
- deviceUID: deviceUID
1765
+ 'projectOrProductUID': projectOrProductUID,
1766
+ 'deviceUID': deviceUID,
1767
+ 'notefileID': notefileID,
1768
+ 'noteID': noteID
1724
1769
  };
1725
1770
  var queryParams = {};
1726
1771
  var headerParams = {};
1727
1772
  var formParams = {};
1728
- var authNames = ["pin"];
1729
- var contentTypes = ["application/json"];
1730
- var accepts = ["application/json"];
1731
- var returnType = _EnvironmentVariables["default"];
1732
- return this.apiClient.callApi("/v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1773
+ var authNames = ['personalAccessToken'];
1774
+ var contentTypes = ['application/json'];
1775
+ var accepts = ['application/json'];
1776
+ var returnType = null;
1777
+ return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1733
1778
  }
1734
1779
 
1735
1780
  /**
1736
- * Put environment variables of a device with device pin authorization
1737
- * @param {String} productUID
1738
- * @param {String} deviceUID
1739
- * @param {module:model/EnvironmentVariables} environmentVariables Environment variables to be added to the device
1740
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentVariables}
1781
+ * Update a note in a .db or .qi notefile
1782
+ * @param {String} projectOrProductUID
1783
+ * @param {String} deviceUID
1784
+ * @param {String} notefileID
1785
+ * @param {String} noteID
1786
+ * @param {module:model/Note} note Body or payload of note to be added to the device
1787
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
1741
1788
  */
1742
1789
  }, {
1743
- key: "putDeviceEnvironmentVariablesByPin",
1744
- value: function putDeviceEnvironmentVariablesByPin(productUID, deviceUID, environmentVariables) {
1745
- return this.putDeviceEnvironmentVariablesByPinWithHttpInfo(productUID, deviceUID, environmentVariables).then(function (response_and_data) {
1790
+ key: "updateDbNote",
1791
+ value: function updateDbNote(projectOrProductUID, deviceUID, notefileID, noteID, note) {
1792
+ return this.updateDbNoteWithHttpInfo(projectOrProductUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
1746
1793
  return response_and_data.data;
1747
1794
  });
1748
1795
  }