@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,435 @@
|
|
|
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 _Error = _interopRequireDefault(require("../model/Error"));
|
|
9
|
+
var _HandleNoteChanges200Response = _interopRequireDefault(require("../model/HandleNoteChanges200Response"));
|
|
10
|
+
var _HandleNoteGet200Response = _interopRequireDefault(require("../model/HandleNoteGet200Response"));
|
|
11
|
+
var _Note = _interopRequireDefault(require("../model/Note"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
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); }
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
19
|
+
/**
|
|
20
|
+
* Notes service.
|
|
21
|
+
* @module api/NotesApi
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var NotesApi = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new NotesApi.
|
|
27
|
+
* @alias module:api/NotesApi
|
|
28
|
+
* @class
|
|
29
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
30
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
31
|
+
*/
|
|
32
|
+
function NotesApi(apiClient) {
|
|
33
|
+
_classCallCheck(this, NotesApi);
|
|
34
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
|
|
39
|
+
* @param {String} projectUID
|
|
40
|
+
* @param {String} deviceUID
|
|
41
|
+
* @param {String} notefileID
|
|
42
|
+
* @param {module:model/Note} note Body or payload of note to be added to the device
|
|
43
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
44
|
+
*/
|
|
45
|
+
_createClass(NotesApi, [{
|
|
46
|
+
key: "handleNoteAddWithHttpInfo",
|
|
47
|
+
value: function handleNoteAddWithHttpInfo(projectUID, deviceUID, notefileID, note) {
|
|
48
|
+
var postBody = note;
|
|
49
|
+
// verify the required parameter 'projectUID' is set
|
|
50
|
+
if (projectUID === undefined || projectUID === null) {
|
|
51
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteAdd");
|
|
52
|
+
}
|
|
53
|
+
// verify the required parameter 'deviceUID' is set
|
|
54
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
55
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteAdd");
|
|
56
|
+
}
|
|
57
|
+
// verify the required parameter 'notefileID' is set
|
|
58
|
+
if (notefileID === undefined || notefileID === null) {
|
|
59
|
+
throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteAdd");
|
|
60
|
+
}
|
|
61
|
+
// verify the required parameter 'note' is set
|
|
62
|
+
if (note === undefined || note === null) {
|
|
63
|
+
throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteAdd");
|
|
64
|
+
}
|
|
65
|
+
var pathParams = {
|
|
66
|
+
'projectUID': projectUID,
|
|
67
|
+
'deviceUID': deviceUID,
|
|
68
|
+
'notefileID': notefileID
|
|
69
|
+
};
|
|
70
|
+
var queryParams = {};
|
|
71
|
+
var headerParams = {};
|
|
72
|
+
var formParams = {};
|
|
73
|
+
var authNames = ['api_key'];
|
|
74
|
+
var contentTypes = ['application/json'];
|
|
75
|
+
var accepts = ['application/json'];
|
|
76
|
+
var returnType = null;
|
|
77
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
|
|
82
|
+
* @param {String} projectUID
|
|
83
|
+
* @param {String} deviceUID
|
|
84
|
+
* @param {String} notefileID
|
|
85
|
+
* @param {module:model/Note} note Body or payload of note to be added to the device
|
|
86
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
87
|
+
*/
|
|
88
|
+
}, {
|
|
89
|
+
key: "handleNoteAdd",
|
|
90
|
+
value: function handleNoteAdd(projectUID, deviceUID, notefileID, note) {
|
|
91
|
+
return this.handleNoteAddWithHttpInfo(projectUID, deviceUID, notefileID, note).then(function (response_and_data) {
|
|
92
|
+
return response_and_data.data;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Incrementally retrieve changes within a specific Notefile.
|
|
98
|
+
* @param {String} projectUID
|
|
99
|
+
* @param {String} deviceUID
|
|
100
|
+
* @param {String} notefileID
|
|
101
|
+
* @param {Object} opts Optional parameters
|
|
102
|
+
* @param {String} opts.tracker The change tracker ID.
|
|
103
|
+
* @param {Number} opts.max The maximum number of Notes to return in the request.
|
|
104
|
+
* @param {Boolean} opts.start true to reset the tracker to the beginning.
|
|
105
|
+
* @param {Boolean} opts.stop true to delete the tracker.
|
|
106
|
+
* @param {Boolean} opts.deleted true to return deleted notes.
|
|
107
|
+
* @param {Boolean} opts._delete true to delete the notes returned by the request.
|
|
108
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteChanges200Response} and HTTP response
|
|
109
|
+
*/
|
|
110
|
+
}, {
|
|
111
|
+
key: "handleNoteChangesWithHttpInfo",
|
|
112
|
+
value: function handleNoteChangesWithHttpInfo(projectUID, deviceUID, notefileID, opts) {
|
|
113
|
+
opts = opts || {};
|
|
114
|
+
var postBody = null;
|
|
115
|
+
// verify the required parameter 'projectUID' is set
|
|
116
|
+
if (projectUID === undefined || projectUID === null) {
|
|
117
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteChanges");
|
|
118
|
+
}
|
|
119
|
+
// verify the required parameter 'deviceUID' is set
|
|
120
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
121
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteChanges");
|
|
122
|
+
}
|
|
123
|
+
// verify the required parameter 'notefileID' is set
|
|
124
|
+
if (notefileID === undefined || notefileID === null) {
|
|
125
|
+
throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteChanges");
|
|
126
|
+
}
|
|
127
|
+
var pathParams = {
|
|
128
|
+
'projectUID': projectUID,
|
|
129
|
+
'deviceUID': deviceUID,
|
|
130
|
+
'notefileID': notefileID
|
|
131
|
+
};
|
|
132
|
+
var queryParams = {
|
|
133
|
+
'tracker': opts['tracker'],
|
|
134
|
+
'max': opts['max'],
|
|
135
|
+
'start': opts['start'],
|
|
136
|
+
'stop': opts['stop'],
|
|
137
|
+
'deleted': opts['deleted'],
|
|
138
|
+
'delete': opts['_delete']
|
|
139
|
+
};
|
|
140
|
+
var headerParams = {};
|
|
141
|
+
var formParams = {};
|
|
142
|
+
var authNames = ['api_key'];
|
|
143
|
+
var contentTypes = [];
|
|
144
|
+
var accepts = ['application/json'];
|
|
145
|
+
var returnType = _HandleNoteChanges200Response["default"];
|
|
146
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/changes', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Incrementally retrieve changes within a specific Notefile.
|
|
151
|
+
* @param {String} projectUID
|
|
152
|
+
* @param {String} deviceUID
|
|
153
|
+
* @param {String} notefileID
|
|
154
|
+
* @param {Object} opts Optional parameters
|
|
155
|
+
* @param {String} opts.tracker The change tracker ID.
|
|
156
|
+
* @param {Number} opts.max The maximum number of Notes to return in the request.
|
|
157
|
+
* @param {Boolean} opts.start true to reset the tracker to the beginning.
|
|
158
|
+
* @param {Boolean} opts.stop true to delete the tracker.
|
|
159
|
+
* @param {Boolean} opts.deleted true to return deleted notes.
|
|
160
|
+
* @param {Boolean} opts._delete true to delete the notes returned by the request.
|
|
161
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteChanges200Response}
|
|
162
|
+
*/
|
|
163
|
+
}, {
|
|
164
|
+
key: "handleNoteChanges",
|
|
165
|
+
value: function handleNoteChanges(projectUID, deviceUID, notefileID, opts) {
|
|
166
|
+
return this.handleNoteChangesWithHttpInfo(projectUID, deviceUID, notefileID, opts).then(function (response_and_data) {
|
|
167
|
+
return response_and_data.data;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
|
|
173
|
+
* @param {String} projectUID
|
|
174
|
+
* @param {String} deviceUID
|
|
175
|
+
* @param {String} notefileID
|
|
176
|
+
* @param {String} noteID
|
|
177
|
+
* @param {module:model/Note} note Body or payload of note to be added to the device
|
|
178
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
179
|
+
*/
|
|
180
|
+
}, {
|
|
181
|
+
key: "handleNoteCreateAddWithHttpInfo",
|
|
182
|
+
value: function handleNoteCreateAddWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note) {
|
|
183
|
+
var postBody = note;
|
|
184
|
+
// verify the required parameter 'projectUID' is set
|
|
185
|
+
if (projectUID === undefined || projectUID === null) {
|
|
186
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteCreateAdd");
|
|
187
|
+
}
|
|
188
|
+
// verify the required parameter 'deviceUID' is set
|
|
189
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
190
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteCreateAdd");
|
|
191
|
+
}
|
|
192
|
+
// verify the required parameter 'notefileID' is set
|
|
193
|
+
if (notefileID === undefined || notefileID === null) {
|
|
194
|
+
throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteCreateAdd");
|
|
195
|
+
}
|
|
196
|
+
// verify the required parameter 'noteID' is set
|
|
197
|
+
if (noteID === undefined || noteID === null) {
|
|
198
|
+
throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteCreateAdd");
|
|
199
|
+
}
|
|
200
|
+
// verify the required parameter 'note' is set
|
|
201
|
+
if (note === undefined || note === null) {
|
|
202
|
+
throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteCreateAdd");
|
|
203
|
+
}
|
|
204
|
+
var pathParams = {
|
|
205
|
+
'projectUID': projectUID,
|
|
206
|
+
'deviceUID': deviceUID,
|
|
207
|
+
'notefileID': notefileID,
|
|
208
|
+
'noteID': noteID
|
|
209
|
+
};
|
|
210
|
+
var queryParams = {};
|
|
211
|
+
var headerParams = {};
|
|
212
|
+
var formParams = {};
|
|
213
|
+
var authNames = ['api_key'];
|
|
214
|
+
var contentTypes = ['application/json'];
|
|
215
|
+
var accepts = ['application/json'];
|
|
216
|
+
var returnType = null;
|
|
217
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.
|
|
222
|
+
* @param {String} projectUID
|
|
223
|
+
* @param {String} deviceUID
|
|
224
|
+
* @param {String} notefileID
|
|
225
|
+
* @param {String} noteID
|
|
226
|
+
* @param {module:model/Note} note Body or payload of note to be added to the device
|
|
227
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
228
|
+
*/
|
|
229
|
+
}, {
|
|
230
|
+
key: "handleNoteCreateAdd",
|
|
231
|
+
value: function handleNoteCreateAdd(projectUID, deviceUID, notefileID, noteID, note) {
|
|
232
|
+
return this.handleNoteCreateAddWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
|
|
233
|
+
return response_and_data.data;
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Delete a note from a DB notefile
|
|
239
|
+
* @param {String} projectUID
|
|
240
|
+
* @param {String} deviceUID
|
|
241
|
+
* @param {String} notefileID
|
|
242
|
+
* @param {String} noteID
|
|
243
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
244
|
+
*/
|
|
245
|
+
}, {
|
|
246
|
+
key: "handleNoteDeleteWithHttpInfo",
|
|
247
|
+
value: function handleNoteDeleteWithHttpInfo(projectUID, deviceUID, notefileID, noteID) {
|
|
248
|
+
var postBody = null;
|
|
249
|
+
// verify the required parameter 'projectUID' is set
|
|
250
|
+
if (projectUID === undefined || projectUID === null) {
|
|
251
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteDelete");
|
|
252
|
+
}
|
|
253
|
+
// verify the required parameter 'deviceUID' is set
|
|
254
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
255
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteDelete");
|
|
256
|
+
}
|
|
257
|
+
// verify the required parameter 'notefileID' is set
|
|
258
|
+
if (notefileID === undefined || notefileID === null) {
|
|
259
|
+
throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteDelete");
|
|
260
|
+
}
|
|
261
|
+
// verify the required parameter 'noteID' is set
|
|
262
|
+
if (noteID === undefined || noteID === null) {
|
|
263
|
+
throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteDelete");
|
|
264
|
+
}
|
|
265
|
+
var pathParams = {
|
|
266
|
+
'projectUID': projectUID,
|
|
267
|
+
'deviceUID': deviceUID,
|
|
268
|
+
'notefileID': notefileID,
|
|
269
|
+
'noteID': noteID
|
|
270
|
+
};
|
|
271
|
+
var queryParams = {};
|
|
272
|
+
var headerParams = {};
|
|
273
|
+
var formParams = {};
|
|
274
|
+
var authNames = ['api_key'];
|
|
275
|
+
var contentTypes = [];
|
|
276
|
+
var accepts = ['application/json'];
|
|
277
|
+
var returnType = null;
|
|
278
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Delete a note from a DB notefile
|
|
283
|
+
* @param {String} projectUID
|
|
284
|
+
* @param {String} deviceUID
|
|
285
|
+
* @param {String} notefileID
|
|
286
|
+
* @param {String} noteID
|
|
287
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
288
|
+
*/
|
|
289
|
+
}, {
|
|
290
|
+
key: "handleNoteDelete",
|
|
291
|
+
value: function handleNoteDelete(projectUID, deviceUID, notefileID, noteID) {
|
|
292
|
+
return this.handleNoteDeleteWithHttpInfo(projectUID, deviceUID, notefileID, noteID).then(function (response_and_data) {
|
|
293
|
+
return response_and_data.data;
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Get a note from a DB notefile
|
|
299
|
+
* @param {String} projectUID
|
|
300
|
+
* @param {String} deviceUID
|
|
301
|
+
* @param {String} notefileID
|
|
302
|
+
* @param {String} noteID
|
|
303
|
+
* @param {Object} opts Optional parameters
|
|
304
|
+
* @param {Boolean} opts._delete Whether to delete the note from the DB notefile
|
|
305
|
+
* @param {Boolean} opts.deleted Whether to return deleted notes
|
|
306
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNoteGet200Response} and HTTP response
|
|
307
|
+
*/
|
|
308
|
+
}, {
|
|
309
|
+
key: "handleNoteGetWithHttpInfo",
|
|
310
|
+
value: function handleNoteGetWithHttpInfo(projectUID, deviceUID, notefileID, noteID, opts) {
|
|
311
|
+
opts = opts || {};
|
|
312
|
+
var postBody = null;
|
|
313
|
+
// verify the required parameter 'projectUID' is set
|
|
314
|
+
if (projectUID === undefined || projectUID === null) {
|
|
315
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteGet");
|
|
316
|
+
}
|
|
317
|
+
// verify the required parameter 'deviceUID' is set
|
|
318
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
319
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteGet");
|
|
320
|
+
}
|
|
321
|
+
// verify the required parameter 'notefileID' is set
|
|
322
|
+
if (notefileID === undefined || notefileID === null) {
|
|
323
|
+
throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteGet");
|
|
324
|
+
}
|
|
325
|
+
// verify the required parameter 'noteID' is set
|
|
326
|
+
if (noteID === undefined || noteID === null) {
|
|
327
|
+
throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteGet");
|
|
328
|
+
}
|
|
329
|
+
var pathParams = {
|
|
330
|
+
'projectUID': projectUID,
|
|
331
|
+
'deviceUID': deviceUID,
|
|
332
|
+
'notefileID': notefileID,
|
|
333
|
+
'noteID': noteID
|
|
334
|
+
};
|
|
335
|
+
var queryParams = {
|
|
336
|
+
'delete': opts['_delete'],
|
|
337
|
+
'deleted': opts['deleted']
|
|
338
|
+
};
|
|
339
|
+
var headerParams = {};
|
|
340
|
+
var formParams = {};
|
|
341
|
+
var authNames = ['api_key'];
|
|
342
|
+
var contentTypes = [];
|
|
343
|
+
var accepts = ['application/json'];
|
|
344
|
+
var returnType = _HandleNoteGet200Response["default"];
|
|
345
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Get a note from a DB notefile
|
|
350
|
+
* @param {String} projectUID
|
|
351
|
+
* @param {String} deviceUID
|
|
352
|
+
* @param {String} notefileID
|
|
353
|
+
* @param {String} noteID
|
|
354
|
+
* @param {Object} opts Optional parameters
|
|
355
|
+
* @param {Boolean} opts._delete Whether to delete the note from the DB notefile
|
|
356
|
+
* @param {Boolean} opts.deleted Whether to return deleted notes
|
|
357
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNoteGet200Response}
|
|
358
|
+
*/
|
|
359
|
+
}, {
|
|
360
|
+
key: "handleNoteGet",
|
|
361
|
+
value: function handleNoteGet(projectUID, deviceUID, notefileID, noteID, opts) {
|
|
362
|
+
return this.handleNoteGetWithHttpInfo(projectUID, deviceUID, notefileID, noteID, opts).then(function (response_and_data) {
|
|
363
|
+
return response_and_data.data;
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Update a note in a DB notefile
|
|
369
|
+
* @param {String} projectUID
|
|
370
|
+
* @param {String} deviceUID
|
|
371
|
+
* @param {String} notefileID
|
|
372
|
+
* @param {String} noteID
|
|
373
|
+
* @param {module:model/Note} note Body or payload of note to be added to the device
|
|
374
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
375
|
+
*/
|
|
376
|
+
}, {
|
|
377
|
+
key: "handleNoteUpdateWithHttpInfo",
|
|
378
|
+
value: function handleNoteUpdateWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note) {
|
|
379
|
+
var postBody = note;
|
|
380
|
+
// verify the required parameter 'projectUID' is set
|
|
381
|
+
if (projectUID === undefined || projectUID === null) {
|
|
382
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNoteUpdate");
|
|
383
|
+
}
|
|
384
|
+
// verify the required parameter 'deviceUID' is set
|
|
385
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
386
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNoteUpdate");
|
|
387
|
+
}
|
|
388
|
+
// verify the required parameter 'notefileID' is set
|
|
389
|
+
if (notefileID === undefined || notefileID === null) {
|
|
390
|
+
throw new _Error["default"]("Missing the required parameter 'notefileID' when calling handleNoteUpdate");
|
|
391
|
+
}
|
|
392
|
+
// verify the required parameter 'noteID' is set
|
|
393
|
+
if (noteID === undefined || noteID === null) {
|
|
394
|
+
throw new _Error["default"]("Missing the required parameter 'noteID' when calling handleNoteUpdate");
|
|
395
|
+
}
|
|
396
|
+
// verify the required parameter 'note' is set
|
|
397
|
+
if (note === undefined || note === null) {
|
|
398
|
+
throw new _Error["default"]("Missing the required parameter 'note' when calling handleNoteUpdate");
|
|
399
|
+
}
|
|
400
|
+
var pathParams = {
|
|
401
|
+
'projectUID': projectUID,
|
|
402
|
+
'deviceUID': deviceUID,
|
|
403
|
+
'notefileID': notefileID,
|
|
404
|
+
'noteID': noteID
|
|
405
|
+
};
|
|
406
|
+
var queryParams = {};
|
|
407
|
+
var headerParams = {};
|
|
408
|
+
var formParams = {};
|
|
409
|
+
var authNames = ['api_key'];
|
|
410
|
+
var contentTypes = ['application/json'];
|
|
411
|
+
var accepts = ['application/json'];
|
|
412
|
+
var returnType = null;
|
|
413
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Update a note in a DB notefile
|
|
418
|
+
* @param {String} projectUID
|
|
419
|
+
* @param {String} deviceUID
|
|
420
|
+
* @param {String} notefileID
|
|
421
|
+
* @param {String} noteID
|
|
422
|
+
* @param {module:model/Note} note Body or payload of note to be added to the device
|
|
423
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
424
|
+
*/
|
|
425
|
+
}, {
|
|
426
|
+
key: "handleNoteUpdate",
|
|
427
|
+
value: function handleNoteUpdate(projectUID, deviceUID, notefileID, noteID, note) {
|
|
428
|
+
return this.handleNoteUpdateWithHttpInfo(projectUID, deviceUID, notefileID, noteID, note).then(function (response_and_data) {
|
|
429
|
+
return response_and_data.data;
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
}]);
|
|
433
|
+
return NotesApi;
|
|
434
|
+
}();
|
|
435
|
+
exports["default"] = NotesApi;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CreateProductRequest = _interopRequireDefault(require("../model/CreateProductRequest"));
|
|
9
|
+
var _Error = _interopRequireDefault(require("../model/Error"));
|
|
10
|
+
var _GetProjectProducts200Response = _interopRequireDefault(require("../model/GetProjectProducts200Response"));
|
|
11
|
+
var _Product = _interopRequireDefault(require("../model/Product"));
|
|
12
|
+
var _Project = _interopRequireDefault(require("../model/Project"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
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); }
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
/**
|
|
21
|
+
* Product service.
|
|
22
|
+
* @module api/ProductApi
|
|
23
|
+
* @version 1.0.4
|
|
24
|
+
*/
|
|
25
|
+
var ProductApi = /*#__PURE__*/function () {
|
|
26
|
+
/**
|
|
27
|
+
* Constructs a new ProductApi.
|
|
28
|
+
* @alias module:api/ProductApi
|
|
29
|
+
* @class
|
|
30
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
31
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
32
|
+
*/
|
|
33
|
+
function ProductApi(apiClient) {
|
|
34
|
+
_classCallCheck(this, ProductApi);
|
|
35
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create Product within a Project
|
|
40
|
+
* @param {String} projectUID
|
|
41
|
+
* @param {module:model/CreateProductRequest} createProductRequest Product to be created
|
|
42
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Product} and HTTP response
|
|
43
|
+
*/
|
|
44
|
+
_createClass(ProductApi, [{
|
|
45
|
+
key: "createProductWithHttpInfo",
|
|
46
|
+
value: function createProductWithHttpInfo(projectUID, createProductRequest) {
|
|
47
|
+
var postBody = createProductRequest;
|
|
48
|
+
// verify the required parameter 'projectUID' is set
|
|
49
|
+
if (projectUID === undefined || projectUID === null) {
|
|
50
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling createProduct");
|
|
51
|
+
}
|
|
52
|
+
// verify the required parameter 'createProductRequest' is set
|
|
53
|
+
if (createProductRequest === undefined || createProductRequest === null) {
|
|
54
|
+
throw new _Error["default"]("Missing the required parameter 'createProductRequest' when calling createProduct");
|
|
55
|
+
}
|
|
56
|
+
var pathParams = {
|
|
57
|
+
'projectUID': projectUID
|
|
58
|
+
};
|
|
59
|
+
var queryParams = {};
|
|
60
|
+
var headerParams = {};
|
|
61
|
+
var formParams = {};
|
|
62
|
+
var authNames = ['api_key'];
|
|
63
|
+
var contentTypes = ['application/json'];
|
|
64
|
+
var accepts = ['application/json'];
|
|
65
|
+
var returnType = _Product["default"];
|
|
66
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/products', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Create Product within a Project
|
|
71
|
+
* @param {String} projectUID
|
|
72
|
+
* @param {module:model/CreateProductRequest} createProductRequest Product to be created
|
|
73
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Product}
|
|
74
|
+
*/
|
|
75
|
+
}, {
|
|
76
|
+
key: "createProduct",
|
|
77
|
+
value: function createProduct(projectUID, createProductRequest) {
|
|
78
|
+
return this.createProductWithHttpInfo(projectUID, createProductRequest).then(function (response_and_data) {
|
|
79
|
+
return response_and_data.data;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get a Project by ProductUID
|
|
85
|
+
* @param {String} productUID
|
|
86
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response
|
|
87
|
+
*/
|
|
88
|
+
}, {
|
|
89
|
+
key: "getProjectByProductWithHttpInfo",
|
|
90
|
+
value: function getProjectByProductWithHttpInfo(productUID) {
|
|
91
|
+
var postBody = null;
|
|
92
|
+
// verify the required parameter 'productUID' is set
|
|
93
|
+
if (productUID === undefined || productUID === null) {
|
|
94
|
+
throw new _Error["default"]("Missing the required parameter 'productUID' when calling getProjectByProduct");
|
|
95
|
+
}
|
|
96
|
+
var pathParams = {
|
|
97
|
+
'productUID': productUID
|
|
98
|
+
};
|
|
99
|
+
var queryParams = {};
|
|
100
|
+
var headerParams = {};
|
|
101
|
+
var formParams = {};
|
|
102
|
+
var authNames = ['api_key'];
|
|
103
|
+
var contentTypes = [];
|
|
104
|
+
var accepts = ['application/json'];
|
|
105
|
+
var returnType = _Project["default"];
|
|
106
|
+
return this.apiClient.callApi('/v1/products/{productUID}/project', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Get a Project by ProductUID
|
|
111
|
+
* @param {String} productUID
|
|
112
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project}
|
|
113
|
+
*/
|
|
114
|
+
}, {
|
|
115
|
+
key: "getProjectByProduct",
|
|
116
|
+
value: function getProjectByProduct(productUID) {
|
|
117
|
+
return this.getProjectByProductWithHttpInfo(productUID).then(function (response_and_data) {
|
|
118
|
+
return response_and_data.data;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Get Products within a Project
|
|
124
|
+
* @param {String} projectUID
|
|
125
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectProducts200Response} and HTTP response
|
|
126
|
+
*/
|
|
127
|
+
}, {
|
|
128
|
+
key: "getProjectProductsWithHttpInfo",
|
|
129
|
+
value: function getProjectProductsWithHttpInfo(projectUID) {
|
|
130
|
+
var postBody = null;
|
|
131
|
+
// verify the required parameter 'projectUID' is set
|
|
132
|
+
if (projectUID === undefined || projectUID === null) {
|
|
133
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectProducts");
|
|
134
|
+
}
|
|
135
|
+
var pathParams = {
|
|
136
|
+
'projectUID': projectUID
|
|
137
|
+
};
|
|
138
|
+
var queryParams = {};
|
|
139
|
+
var headerParams = {};
|
|
140
|
+
var formParams = {};
|
|
141
|
+
var authNames = ['api_key'];
|
|
142
|
+
var contentTypes = [];
|
|
143
|
+
var accepts = ['application/json'];
|
|
144
|
+
var returnType = _GetProjectProducts200Response["default"];
|
|
145
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/products', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Get Products within a Project
|
|
150
|
+
* @param {String} projectUID
|
|
151
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectProducts200Response}
|
|
152
|
+
*/
|
|
153
|
+
}, {
|
|
154
|
+
key: "getProjectProducts",
|
|
155
|
+
value: function getProjectProducts(projectUID) {
|
|
156
|
+
return this.getProjectProductsWithHttpInfo(projectUID).then(function (response_and_data) {
|
|
157
|
+
return response_and_data.data;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}]);
|
|
161
|
+
return ProductApi;
|
|
162
|
+
}();
|
|
163
|
+
exports["default"] = ProductApi;
|