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