@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,284 @@
|
|
|
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 _GetProjectEvents200Response = _interopRequireDefault(require("../model/GetProjectEvents200Response"));
|
|
10
|
+
var _GetProjectEventsByCursor200Response = _interopRequireDefault(require("../model/GetProjectEventsByCursor200Response"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
/**
|
|
19
|
+
* Event service.
|
|
20
|
+
* @module api/EventApi
|
|
21
|
+
* @version 1.0.4
|
|
22
|
+
*/
|
|
23
|
+
var EventApi = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new EventApi.
|
|
26
|
+
* @alias module:api/EventApi
|
|
27
|
+
* @class
|
|
28
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
29
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
30
|
+
*/
|
|
31
|
+
function EventApi(apiClient) {
|
|
32
|
+
_classCallCheck(this, EventApi);
|
|
33
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get Events of a Fleet
|
|
38
|
+
* @param {String} projectUID
|
|
39
|
+
* @param {String} fleetUID
|
|
40
|
+
* @param {Object} opts Optional parameters
|
|
41
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
42
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
43
|
+
* @param {Array.<String>} opts.deviceUIDs A comma separated list of Device UIDs.
|
|
44
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
45
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
46
|
+
* @param {Number} opts.startDate Unix timestamp
|
|
47
|
+
* @param {Number} opts.endDate Unix timestamp
|
|
48
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEvents200Response} and HTTP response
|
|
49
|
+
*/
|
|
50
|
+
_createClass(EventApi, [{
|
|
51
|
+
key: "getFleetEventsWithHttpInfo",
|
|
52
|
+
value: function getFleetEventsWithHttpInfo(projectUID, fleetUID, opts) {
|
|
53
|
+
opts = opts || {};
|
|
54
|
+
var postBody = null;
|
|
55
|
+
// verify the required parameter 'projectUID' is set
|
|
56
|
+
if (projectUID === undefined || projectUID === null) {
|
|
57
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getFleetEvents");
|
|
58
|
+
}
|
|
59
|
+
// verify the required parameter 'fleetUID' is set
|
|
60
|
+
if (fleetUID === undefined || fleetUID === null) {
|
|
61
|
+
throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEvents");
|
|
62
|
+
}
|
|
63
|
+
var pathParams = {
|
|
64
|
+
'projectUID': projectUID,
|
|
65
|
+
'fleetUID': fleetUID
|
|
66
|
+
};
|
|
67
|
+
var queryParams = {
|
|
68
|
+
'pageSize': opts['pageSize'],
|
|
69
|
+
'pageNum': opts['pageNum'],
|
|
70
|
+
'deviceUIDs': this.apiClient.buildCollectionParam(opts['deviceUIDs'], 'csv'),
|
|
71
|
+
'sortBy': opts['sortBy'],
|
|
72
|
+
'sortOrder': opts['sortOrder'],
|
|
73
|
+
'startDate': opts['startDate'],
|
|
74
|
+
'endDate': opts['endDate']
|
|
75
|
+
};
|
|
76
|
+
var headerParams = {};
|
|
77
|
+
var formParams = {};
|
|
78
|
+
var authNames = ['api_key'];
|
|
79
|
+
var contentTypes = [];
|
|
80
|
+
var accepts = ['application/json'];
|
|
81
|
+
var returnType = _GetProjectEvents200Response["default"];
|
|
82
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/fleets/{fleetUID}/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get Events of a Fleet
|
|
87
|
+
* @param {String} projectUID
|
|
88
|
+
* @param {String} fleetUID
|
|
89
|
+
* @param {Object} opts Optional parameters
|
|
90
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
91
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
92
|
+
* @param {Array.<String>} opts.deviceUIDs A comma separated list of Device UIDs.
|
|
93
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
94
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
95
|
+
* @param {Number} opts.startDate Unix timestamp
|
|
96
|
+
* @param {Number} opts.endDate Unix timestamp
|
|
97
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEvents200Response}
|
|
98
|
+
*/
|
|
99
|
+
}, {
|
|
100
|
+
key: "getFleetEvents",
|
|
101
|
+
value: function getFleetEvents(projectUID, fleetUID, opts) {
|
|
102
|
+
return this.getFleetEventsWithHttpInfo(projectUID, fleetUID, opts).then(function (response_and_data) {
|
|
103
|
+
return response_and_data.data;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get Events of a Fleet by cursor
|
|
109
|
+
* @param {String} projectUID
|
|
110
|
+
* @param {String} fleetUID
|
|
111
|
+
* @param {Object} opts Optional parameters
|
|
112
|
+
* @param {Number} opts.limit (default to 50)
|
|
113
|
+
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
114
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
115
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEventsByCursor200Response} and HTTP response
|
|
116
|
+
*/
|
|
117
|
+
}, {
|
|
118
|
+
key: "getFleetEventsByCursorWithHttpInfo",
|
|
119
|
+
value: function getFleetEventsByCursorWithHttpInfo(projectUID, fleetUID, opts) {
|
|
120
|
+
opts = opts || {};
|
|
121
|
+
var postBody = null;
|
|
122
|
+
// verify the required parameter 'projectUID' is set
|
|
123
|
+
if (projectUID === undefined || projectUID === null) {
|
|
124
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getFleetEventsByCursor");
|
|
125
|
+
}
|
|
126
|
+
// verify the required parameter 'fleetUID' is set
|
|
127
|
+
if (fleetUID === undefined || fleetUID === null) {
|
|
128
|
+
throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEventsByCursor");
|
|
129
|
+
}
|
|
130
|
+
var pathParams = {
|
|
131
|
+
'projectUID': projectUID,
|
|
132
|
+
'fleetUID': fleetUID
|
|
133
|
+
};
|
|
134
|
+
var queryParams = {
|
|
135
|
+
'limit': opts['limit'],
|
|
136
|
+
'cursor': opts['cursor'],
|
|
137
|
+
'sortOrder': opts['sortOrder']
|
|
138
|
+
};
|
|
139
|
+
var headerParams = {};
|
|
140
|
+
var formParams = {};
|
|
141
|
+
var authNames = ['api_key'];
|
|
142
|
+
var contentTypes = [];
|
|
143
|
+
var accepts = ['application/json'];
|
|
144
|
+
var returnType = _GetProjectEventsByCursor200Response["default"];
|
|
145
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/fleets/{fleetUID}/events-cursor', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Get Events of a Fleet by cursor
|
|
150
|
+
* @param {String} projectUID
|
|
151
|
+
* @param {String} fleetUID
|
|
152
|
+
* @param {Object} opts Optional parameters
|
|
153
|
+
* @param {Number} opts.limit (default to 50)
|
|
154
|
+
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
155
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
156
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEventsByCursor200Response}
|
|
157
|
+
*/
|
|
158
|
+
}, {
|
|
159
|
+
key: "getFleetEventsByCursor",
|
|
160
|
+
value: function getFleetEventsByCursor(projectUID, fleetUID, opts) {
|
|
161
|
+
return this.getFleetEventsByCursorWithHttpInfo(projectUID, fleetUID, opts).then(function (response_and_data) {
|
|
162
|
+
return response_and_data.data;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Get Events of a Project
|
|
168
|
+
* @param {String} projectUID
|
|
169
|
+
* @param {Object} opts Optional parameters
|
|
170
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
171
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
172
|
+
* @param {Array.<String>} opts.deviceUIDs A comma separated list of Device UIDs.
|
|
173
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
174
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
175
|
+
* @param {Number} opts.startDate Unix timestamp
|
|
176
|
+
* @param {Number} opts.endDate Unix timestamp
|
|
177
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEvents200Response} and HTTP response
|
|
178
|
+
*/
|
|
179
|
+
}, {
|
|
180
|
+
key: "getProjectEventsWithHttpInfo",
|
|
181
|
+
value: function getProjectEventsWithHttpInfo(projectUID, opts) {
|
|
182
|
+
opts = opts || {};
|
|
183
|
+
var postBody = null;
|
|
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 getProjectEvents");
|
|
187
|
+
}
|
|
188
|
+
var pathParams = {
|
|
189
|
+
'projectUID': projectUID
|
|
190
|
+
};
|
|
191
|
+
var queryParams = {
|
|
192
|
+
'pageSize': opts['pageSize'],
|
|
193
|
+
'pageNum': opts['pageNum'],
|
|
194
|
+
'deviceUIDs': this.apiClient.buildCollectionParam(opts['deviceUIDs'], 'csv'),
|
|
195
|
+
'sortBy': opts['sortBy'],
|
|
196
|
+
'sortOrder': opts['sortOrder'],
|
|
197
|
+
'startDate': opts['startDate'],
|
|
198
|
+
'endDate': opts['endDate']
|
|
199
|
+
};
|
|
200
|
+
var headerParams = {};
|
|
201
|
+
var formParams = {};
|
|
202
|
+
var authNames = ['api_key'];
|
|
203
|
+
var contentTypes = [];
|
|
204
|
+
var accepts = ['application/json'];
|
|
205
|
+
var returnType = _GetProjectEvents200Response["default"];
|
|
206
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Get Events of a Project
|
|
211
|
+
* @param {String} projectUID
|
|
212
|
+
* @param {Object} opts Optional parameters
|
|
213
|
+
* @param {Number} opts.pageSize (default to 50)
|
|
214
|
+
* @param {Number} opts.pageNum (default to 1)
|
|
215
|
+
* @param {Array.<String>} opts.deviceUIDs A comma separated list of Device UIDs.
|
|
216
|
+
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
217
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
218
|
+
* @param {Number} opts.startDate Unix timestamp
|
|
219
|
+
* @param {Number} opts.endDate Unix timestamp
|
|
220
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEvents200Response}
|
|
221
|
+
*/
|
|
222
|
+
}, {
|
|
223
|
+
key: "getProjectEvents",
|
|
224
|
+
value: function getProjectEvents(projectUID, opts) {
|
|
225
|
+
return this.getProjectEventsWithHttpInfo(projectUID, opts).then(function (response_and_data) {
|
|
226
|
+
return response_and_data.data;
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Get Events of a Project by cursor
|
|
232
|
+
* @param {String} projectUID
|
|
233
|
+
* @param {Object} opts Optional parameters
|
|
234
|
+
* @param {Number} opts.limit (default to 50)
|
|
235
|
+
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
236
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
237
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEventsByCursor200Response} and HTTP response
|
|
238
|
+
*/
|
|
239
|
+
}, {
|
|
240
|
+
key: "getProjectEventsByCursorWithHttpInfo",
|
|
241
|
+
value: function getProjectEventsByCursorWithHttpInfo(projectUID, opts) {
|
|
242
|
+
opts = opts || {};
|
|
243
|
+
var postBody = null;
|
|
244
|
+
// verify the required parameter 'projectUID' is set
|
|
245
|
+
if (projectUID === undefined || projectUID === null) {
|
|
246
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling getProjectEventsByCursor");
|
|
247
|
+
}
|
|
248
|
+
var pathParams = {
|
|
249
|
+
'projectUID': projectUID
|
|
250
|
+
};
|
|
251
|
+
var queryParams = {
|
|
252
|
+
'limit': opts['limit'],
|
|
253
|
+
'cursor': opts['cursor'],
|
|
254
|
+
'sortOrder': opts['sortOrder']
|
|
255
|
+
};
|
|
256
|
+
var headerParams = {};
|
|
257
|
+
var formParams = {};
|
|
258
|
+
var authNames = ['api_key'];
|
|
259
|
+
var contentTypes = [];
|
|
260
|
+
var accepts = ['application/json'];
|
|
261
|
+
var returnType = _GetProjectEventsByCursor200Response["default"];
|
|
262
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/events-cursor', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Get Events of a Project by cursor
|
|
267
|
+
* @param {String} projectUID
|
|
268
|
+
* @param {Object} opts Optional parameters
|
|
269
|
+
* @param {Number} opts.limit (default to 50)
|
|
270
|
+
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
271
|
+
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
272
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEventsByCursor200Response}
|
|
273
|
+
*/
|
|
274
|
+
}, {
|
|
275
|
+
key: "getProjectEventsByCursor",
|
|
276
|
+
value: function getProjectEventsByCursor(projectUID, opts) {
|
|
277
|
+
return this.getProjectEventsByCursorWithHttpInfo(projectUID, opts).then(function (response_and_data) {
|
|
278
|
+
return response_and_data.data;
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
}]);
|
|
282
|
+
return EventApi;
|
|
283
|
+
}();
|
|
284
|
+
exports["default"] = EventApi;
|
|
@@ -0,0 +1,193 @@
|
|
|
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 _HandleNotefileChanges200Response = _interopRequireDefault(require("../model/HandleNotefileChanges200Response"));
|
|
10
|
+
var _HandleNotefileChangesPending200Response = _interopRequireDefault(require("../model/HandleNotefileChangesPending200Response"));
|
|
11
|
+
var _HandleNotefileDeleteRequest = _interopRequireDefault(require("../model/HandleNotefileDeleteRequest"));
|
|
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
|
+
* Files service.
|
|
21
|
+
* @module api/FilesApi
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var FilesApi = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new FilesApi.
|
|
27
|
+
* @alias module:api/FilesApi
|
|
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 FilesApi(apiClient) {
|
|
33
|
+
_classCallCheck(this, FilesApi);
|
|
34
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Used to perform queries on a single or multiple files to determine if new Notes are available to read
|
|
39
|
+
* @param {String} projectUID
|
|
40
|
+
* @param {String} deviceUID
|
|
41
|
+
* @param {Object} opts Optional parameters
|
|
42
|
+
* @param {String} opts.tracker The change tracker ID.
|
|
43
|
+
* @param {Array.<String>} opts.files One or more files to obtain change information from.
|
|
44
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNotefileChanges200Response} and HTTP response
|
|
45
|
+
*/
|
|
46
|
+
_createClass(FilesApi, [{
|
|
47
|
+
key: "handleNotefileChangesWithHttpInfo",
|
|
48
|
+
value: function handleNotefileChangesWithHttpInfo(projectUID, deviceUID, opts) {
|
|
49
|
+
opts = opts || {};
|
|
50
|
+
var postBody = null;
|
|
51
|
+
// verify the required parameter 'projectUID' is set
|
|
52
|
+
if (projectUID === undefined || projectUID === null) {
|
|
53
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNotefileChanges");
|
|
54
|
+
}
|
|
55
|
+
// verify the required parameter 'deviceUID' is set
|
|
56
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
57
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileChanges");
|
|
58
|
+
}
|
|
59
|
+
var pathParams = {
|
|
60
|
+
'projectUID': projectUID,
|
|
61
|
+
'deviceUID': deviceUID
|
|
62
|
+
};
|
|
63
|
+
var queryParams = {
|
|
64
|
+
'tracker': opts['tracker'],
|
|
65
|
+
'files': this.apiClient.buildCollectionParam(opts['files'], 'multi')
|
|
66
|
+
};
|
|
67
|
+
var headerParams = {};
|
|
68
|
+
var formParams = {};
|
|
69
|
+
var authNames = ['api_key'];
|
|
70
|
+
var contentTypes = [];
|
|
71
|
+
var accepts = ['application/json'];
|
|
72
|
+
var returnType = _HandleNotefileChanges200Response["default"];
|
|
73
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/files/changes', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Used to perform queries on a single or multiple files to determine if new Notes are available to read
|
|
78
|
+
* @param {String} projectUID
|
|
79
|
+
* @param {String} deviceUID
|
|
80
|
+
* @param {Object} opts Optional parameters
|
|
81
|
+
* @param {String} opts.tracker The change tracker ID.
|
|
82
|
+
* @param {Array.<String>} opts.files One or more files to obtain change information from.
|
|
83
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNotefileChanges200Response}
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "handleNotefileChanges",
|
|
87
|
+
value: function handleNotefileChanges(projectUID, deviceUID, opts) {
|
|
88
|
+
return this.handleNotefileChangesWithHttpInfo(projectUID, deviceUID, opts).then(function (response_and_data) {
|
|
89
|
+
return response_and_data.data;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Returns info about file changes that are pending upload to Notehub or download to the Notecard.
|
|
95
|
+
* @param {String} projectUID
|
|
96
|
+
* @param {String} deviceUID
|
|
97
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HandleNotefileChangesPending200Response} and HTTP response
|
|
98
|
+
*/
|
|
99
|
+
}, {
|
|
100
|
+
key: "handleNotefileChangesPendingWithHttpInfo",
|
|
101
|
+
value: function handleNotefileChangesPendingWithHttpInfo(projectUID, deviceUID) {
|
|
102
|
+
var postBody = null;
|
|
103
|
+
// verify the required parameter 'projectUID' is set
|
|
104
|
+
if (projectUID === undefined || projectUID === null) {
|
|
105
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNotefileChangesPending");
|
|
106
|
+
}
|
|
107
|
+
// verify the required parameter 'deviceUID' is set
|
|
108
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
109
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileChangesPending");
|
|
110
|
+
}
|
|
111
|
+
var pathParams = {
|
|
112
|
+
'projectUID': projectUID,
|
|
113
|
+
'deviceUID': deviceUID
|
|
114
|
+
};
|
|
115
|
+
var queryParams = {};
|
|
116
|
+
var headerParams = {};
|
|
117
|
+
var formParams = {};
|
|
118
|
+
var authNames = ['api_key'];
|
|
119
|
+
var contentTypes = [];
|
|
120
|
+
var accepts = ['application/json'];
|
|
121
|
+
var returnType = _HandleNotefileChangesPending200Response["default"];
|
|
122
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/files/changes/pending', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns info about file changes that are pending upload to Notehub or download to the Notecard.
|
|
127
|
+
* @param {String} projectUID
|
|
128
|
+
* @param {String} deviceUID
|
|
129
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HandleNotefileChangesPending200Response}
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "handleNotefileChangesPending",
|
|
133
|
+
value: function handleNotefileChangesPending(projectUID, deviceUID) {
|
|
134
|
+
return this.handleNotefileChangesPendingWithHttpInfo(projectUID, deviceUID).then(function (response_and_data) {
|
|
135
|
+
return response_and_data.data;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Deletes Notefiles and the Notes they contain.
|
|
141
|
+
* @param {String} projectUID
|
|
142
|
+
* @param {String} deviceUID
|
|
143
|
+
* @param {module:model/HandleNotefileDeleteRequest} handleNotefileDeleteRequest
|
|
144
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
145
|
+
*/
|
|
146
|
+
}, {
|
|
147
|
+
key: "handleNotefileDeleteWithHttpInfo",
|
|
148
|
+
value: function handleNotefileDeleteWithHttpInfo(projectUID, deviceUID, handleNotefileDeleteRequest) {
|
|
149
|
+
var postBody = handleNotefileDeleteRequest;
|
|
150
|
+
// verify the required parameter 'projectUID' is set
|
|
151
|
+
if (projectUID === undefined || projectUID === null) {
|
|
152
|
+
throw new _Error["default"]("Missing the required parameter 'projectUID' when calling handleNotefileDelete");
|
|
153
|
+
}
|
|
154
|
+
// verify the required parameter 'deviceUID' is set
|
|
155
|
+
if (deviceUID === undefined || deviceUID === null) {
|
|
156
|
+
throw new _Error["default"]("Missing the required parameter 'deviceUID' when calling handleNotefileDelete");
|
|
157
|
+
}
|
|
158
|
+
// verify the required parameter 'handleNotefileDeleteRequest' is set
|
|
159
|
+
if (handleNotefileDeleteRequest === undefined || handleNotefileDeleteRequest === null) {
|
|
160
|
+
throw new _Error["default"]("Missing the required parameter 'handleNotefileDeleteRequest' when calling handleNotefileDelete");
|
|
161
|
+
}
|
|
162
|
+
var pathParams = {
|
|
163
|
+
'projectUID': projectUID,
|
|
164
|
+
'deviceUID': deviceUID
|
|
165
|
+
};
|
|
166
|
+
var queryParams = {};
|
|
167
|
+
var headerParams = {};
|
|
168
|
+
var formParams = {};
|
|
169
|
+
var authNames = ['api_key'];
|
|
170
|
+
var contentTypes = ['application/json'];
|
|
171
|
+
var accepts = ['application/json'];
|
|
172
|
+
var returnType = null;
|
|
173
|
+
return this.apiClient.callApi('/v1/projects/{projectUID}/devices/{deviceUID}/files', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Deletes Notefiles and the Notes they contain.
|
|
178
|
+
* @param {String} projectUID
|
|
179
|
+
* @param {String} deviceUID
|
|
180
|
+
* @param {module:model/HandleNotefileDeleteRequest} handleNotefileDeleteRequest
|
|
181
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
182
|
+
*/
|
|
183
|
+
}, {
|
|
184
|
+
key: "handleNotefileDelete",
|
|
185
|
+
value: function handleNotefileDelete(projectUID, deviceUID, handleNotefileDeleteRequest) {
|
|
186
|
+
return this.handleNotefileDeleteWithHttpInfo(projectUID, deviceUID, handleNotefileDeleteRequest).then(function (response_and_data) {
|
|
187
|
+
return response_and_data.data;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}]);
|
|
191
|
+
return FilesApi;
|
|
192
|
+
}();
|
|
193
|
+
exports["default"] = FilesApi;
|