@blues-inc/notehub-js 2.3.0-beta.9 → 3.0.0
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 +242 -251
- package/dist/ApiClient.js +154 -154
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +478 -513
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +457 -457
- package/dist/api/RouteApi.js +77 -77
- package/dist/api/UsageApi.js +65 -44
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +14 -14
- package/dist/model/AddDeviceToFleetsRequest.js +8 -8
- package/dist/model/Alert.js +74 -76
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +65 -65
- package/dist/model/AzureRoute.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/BlynkRoute.js +28 -28
- package/dist/model/Body.js +5 -5
- package/dist/model/CellularPlan.js +34 -34
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +17 -17
- package/dist/model/CreateMonitor.js +125 -126
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +17 -17
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DataUsage.js +14 -14
- package/dist/model/DatacakeRoute.js +35 -35
- package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
- package/dist/model/DeleteNotefilesRequest.js +7 -7
- package/dist/model/Device.js +101 -102
- package/dist/model/DeviceDfuHistory.js +19 -20
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +12 -13
- package/dist/model/DeviceDfuStateMachine.js +24 -25
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +12 -13
- package/dist/model/DeviceSession.js +221 -221
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +32 -32
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +67 -69
- package/dist/model/EnvVar.js +18 -18
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Filter.js +16 -16
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +35 -35
- package/dist/model/FleetConnectivityAssurance.js +6 -6
- package/dist/model/GetAlerts200Response.js +14 -15
- package/dist/model/GetBillingAccounts200Response.js +9 -10
- package/dist/model/GetDataUsage200Response.js +9 -10
- package/dist/model/GetDataUsage200ResponseDataInner.js +40 -41
- package/dist/model/GetDbNote200Response.js +13 -13
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatestEvents200Response.js +9 -10
- package/dist/model/GetDevicePlans200Response.js +9 -10
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDevicePublicKeys200Response.js +16 -17
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- package/dist/model/GetDevices200Response.js +16 -17
- package/dist/model/GetEvents200Response.js +20 -21
- package/dist/model/GetEventsByCursor200Response.js +23 -24
- package/dist/model/GetNotefile200Response.js +11 -11
- package/dist/model/GetProducts200Response.js +9 -10
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjects200Response.js +9 -10
- package/dist/model/GetSessionsUsage200Response.js +11 -12
- package/dist/model/GetWebhooks200Response.js +9 -10
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- package/dist/model/ListNotefiles200Response.js +106 -0
- package/dist/model/ListPendingNotefiles200Response.js +14 -14
- package/dist/model/Location.js +40 -40
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +99 -100
- package/dist/model/MonitorAlertRoutesInner.js +10 -9
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +15 -95
- package/dist/model/NotefileSchema.js +18 -19
- package/dist/model/NotehubRoute.js +112 -98
- package/dist/model/NotehubRouteSummary.js +23 -23
- package/dist/model/OAuth2Error.js +20 -20
- package/dist/model/OAuth2TokenResponse.js +23 -23
- package/dist/model/PersonalAccessToken.js +34 -34
- package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
- package/dist/model/PersonalAccessTokenInfo.js +18 -18
- package/dist/model/PersonalAccessTokenSecret.js +12 -12
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/ProvisionDeviceRequest.js +18 -18
- package/dist/model/ProxyRoute.js +29 -29
- package/dist/model/QubitroRoute.js +33 -33
- package/dist/model/RadRoute.js +31 -31
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/RouteTransformSettings.js +18 -18
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatellitePlan.js +26 -26
- package/dist/model/SchemaProperty.js +36 -38
- package/dist/model/SignalDevice200Response.js +5 -5
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +48 -48
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +45 -45
- package/dist/model/SnowpipeStreamingRoute.js +223 -0
- package/dist/model/ThingworxRoute.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/TwilioRoute.js +43 -43
- package/dist/model/UpdateFleetRequest.js +30 -30
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +18 -18
- package/dist/model/UsageEventsData.js +40 -29
- package/dist/model/UsageEventsResponse.js +11 -12
- package/dist/model/UsageRouteLogsData.js +27 -27
- package/dist/model/UsageSessionsData.js +27 -27
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +3 -3
- package/dist/model/Notefile.js +0 -147
- package/dist/model/NotefileTemplate.js +0 -128
package/dist/api/RouteApi.js
CHANGED
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
19
|
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
21
|
*
|
|
22
22
|
* The version of the OpenAPI document: 1.2.0
|
|
23
23
|
* Contact: engineering@blues.io
|
|
@@ -28,18 +28,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
30
|
/**
|
|
31
|
-
* Route service.
|
|
32
|
-
* @module api/RouteApi
|
|
33
|
-
* @version
|
|
34
|
-
*/
|
|
31
|
+
* Route service.
|
|
32
|
+
* @module api/RouteApi
|
|
33
|
+
* @version 3.0.0
|
|
34
|
+
*/
|
|
35
35
|
var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
* Constructs a new RouteApi.
|
|
38
|
+
* @alias module:api/RouteApi
|
|
39
|
+
* @class
|
|
40
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
+
*/
|
|
43
43
|
function RouteApi(apiClient) {
|
|
44
44
|
_classCallCheck(this, RouteApi);
|
|
45
45
|
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
@@ -47,7 +47,7 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Create Route within a Project
|
|
50
|
-
* @param {String} projectOrProductUID
|
|
50
|
+
* @param {String} projectOrProductUID
|
|
51
51
|
* @param {module:model/NotehubRoute} notehubRoute Route to be created
|
|
52
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NotehubRoute} and HTTP response
|
|
53
53
|
*/
|
|
@@ -64,21 +64,21 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
64
64
|
throw new _Error["default"]("Missing the required parameter 'notehubRoute' when calling createRoute");
|
|
65
65
|
}
|
|
66
66
|
var pathParams = {
|
|
67
|
-
|
|
67
|
+
projectOrProductUID: projectOrProductUID
|
|
68
68
|
};
|
|
69
69
|
var queryParams = {};
|
|
70
70
|
var headerParams = {};
|
|
71
71
|
var formParams = {};
|
|
72
|
-
var authNames = [
|
|
73
|
-
var contentTypes = [
|
|
74
|
-
var accepts = [
|
|
72
|
+
var authNames = ["personalAccessToken"];
|
|
73
|
+
var contentTypes = ["application/json"];
|
|
74
|
+
var accepts = ["application/json"];
|
|
75
75
|
var returnType = _NotehubRoute["default"];
|
|
76
|
-
return this.apiClient.callApi(
|
|
76
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/routes", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Create Route within a Project
|
|
81
|
-
* @param {String} projectOrProductUID
|
|
81
|
+
* @param {String} projectOrProductUID
|
|
82
82
|
* @param {module:model/NotehubRoute} notehubRoute Route to be created
|
|
83
83
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NotehubRoute}
|
|
84
84
|
*/
|
|
@@ -92,8 +92,8 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* Delete single route within a project
|
|
95
|
-
* @param {String} projectOrProductUID
|
|
96
|
-
* @param {String} routeUID
|
|
95
|
+
* @param {String} projectOrProductUID
|
|
96
|
+
* @param {String} routeUID
|
|
97
97
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
98
98
|
*/
|
|
99
99
|
}, {
|
|
@@ -109,23 +109,23 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
109
109
|
throw new _Error["default"]("Missing the required parameter 'routeUID' when calling deleteRoute");
|
|
110
110
|
}
|
|
111
111
|
var pathParams = {
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
projectOrProductUID: projectOrProductUID,
|
|
113
|
+
routeUID: routeUID
|
|
114
114
|
};
|
|
115
115
|
var queryParams = {};
|
|
116
116
|
var headerParams = {};
|
|
117
117
|
var formParams = {};
|
|
118
|
-
var authNames = [
|
|
118
|
+
var authNames = ["personalAccessToken"];
|
|
119
119
|
var contentTypes = [];
|
|
120
|
-
var accepts = [
|
|
120
|
+
var accepts = ["application/json"];
|
|
121
121
|
var returnType = null;
|
|
122
|
-
return this.apiClient.callApi(
|
|
122
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/routes/{routeUID}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Delete single route within a project
|
|
127
|
-
* @param {String} projectOrProductUID
|
|
128
|
-
* @param {String} routeUID
|
|
127
|
+
* @param {String} projectOrProductUID
|
|
128
|
+
* @param {String} routeUID
|
|
129
129
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
130
130
|
*/
|
|
131
131
|
}, {
|
|
@@ -138,8 +138,8 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* Get single route within a project
|
|
141
|
-
* @param {String} projectOrProductUID
|
|
142
|
-
* @param {String} routeUID
|
|
141
|
+
* @param {String} projectOrProductUID
|
|
142
|
+
* @param {String} routeUID
|
|
143
143
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NotehubRoute} and HTTP response
|
|
144
144
|
*/
|
|
145
145
|
}, {
|
|
@@ -155,23 +155,23 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
155
155
|
throw new _Error["default"]("Missing the required parameter 'routeUID' when calling getRoute");
|
|
156
156
|
}
|
|
157
157
|
var pathParams = {
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
projectOrProductUID: projectOrProductUID,
|
|
159
|
+
routeUID: routeUID
|
|
160
160
|
};
|
|
161
161
|
var queryParams = {};
|
|
162
162
|
var headerParams = {};
|
|
163
163
|
var formParams = {};
|
|
164
|
-
var authNames = [
|
|
164
|
+
var authNames = ["personalAccessToken"];
|
|
165
165
|
var contentTypes = [];
|
|
166
|
-
var accepts = [
|
|
166
|
+
var accepts = ["application/json"];
|
|
167
167
|
var returnType = _NotehubRoute["default"];
|
|
168
|
-
return this.apiClient.callApi(
|
|
168
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/routes/{routeUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* Get single route within a project
|
|
173
|
-
* @param {String} projectOrProductUID
|
|
174
|
-
* @param {String} routeUID
|
|
173
|
+
* @param {String} projectOrProductUID
|
|
174
|
+
* @param {String} routeUID
|
|
175
175
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NotehubRoute}
|
|
176
176
|
*/
|
|
177
177
|
}, {
|
|
@@ -184,8 +184,8 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* Get Route Logs by Route UID
|
|
187
|
-
* @param {String} projectOrProductUID
|
|
188
|
-
* @param {String} routeUID
|
|
187
|
+
* @param {String} projectOrProductUID
|
|
188
|
+
* @param {String} routeUID
|
|
189
189
|
* @param {Object} opts Optional parameters
|
|
190
190
|
* @param {Number} opts.pageSize (default to 50)
|
|
191
191
|
* @param {Number} opts.pageNum (default to 1)
|
|
@@ -194,9 +194,9 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
194
194
|
* @param {module:model/String} opts.sortOrder (default to 'desc')
|
|
195
195
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
196
196
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
197
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
198
|
-
* @param {Boolean} opts.mostRecentOnly
|
|
199
|
-
* @param {String} opts.files
|
|
197
|
+
* @param {Boolean} opts.systemFilesOnly
|
|
198
|
+
* @param {Boolean} opts.mostRecentOnly
|
|
199
|
+
* @param {String} opts.files
|
|
200
200
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/RouteLog>} and HTTP response
|
|
201
201
|
*/
|
|
202
202
|
}, {
|
|
@@ -213,34 +213,34 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
213
213
|
throw new _Error["default"]("Missing the required parameter 'routeUID' when calling getRouteLogsByRoute");
|
|
214
214
|
}
|
|
215
215
|
var pathParams = {
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
projectOrProductUID: projectOrProductUID,
|
|
217
|
+
routeUID: routeUID
|
|
218
218
|
};
|
|
219
219
|
var queryParams = {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
220
|
+
pageSize: opts["pageSize"],
|
|
221
|
+
pageNum: opts["pageNum"],
|
|
222
|
+
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
223
|
+
sortBy: opts["sortBy"],
|
|
224
|
+
sortOrder: opts["sortOrder"],
|
|
225
|
+
startDate: opts["startDate"],
|
|
226
|
+
endDate: opts["endDate"],
|
|
227
|
+
systemFilesOnly: opts["systemFilesOnly"],
|
|
228
|
+
mostRecentOnly: opts["mostRecentOnly"],
|
|
229
|
+
files: opts["files"]
|
|
230
230
|
};
|
|
231
231
|
var headerParams = {};
|
|
232
232
|
var formParams = {};
|
|
233
|
-
var authNames = [
|
|
233
|
+
var authNames = ["personalAccessToken"];
|
|
234
234
|
var contentTypes = [];
|
|
235
|
-
var accepts = [
|
|
235
|
+
var accepts = ["application/json"];
|
|
236
236
|
var returnType = [_RouteLog["default"]];
|
|
237
|
-
return this.apiClient.callApi(
|
|
237
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* Get Route Logs by Route UID
|
|
242
|
-
* @param {String} projectOrProductUID
|
|
243
|
-
* @param {String} routeUID
|
|
242
|
+
* @param {String} projectOrProductUID
|
|
243
|
+
* @param {String} routeUID
|
|
244
244
|
* @param {Object} opts Optional parameters
|
|
245
245
|
* @param {Number} opts.pageSize (default to 50)
|
|
246
246
|
* @param {Number} opts.pageNum (default to 1)
|
|
@@ -249,9 +249,9 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
249
249
|
* @param {module:model/String} opts.sortOrder (default to 'desc')
|
|
250
250
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
251
251
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
252
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
253
|
-
* @param {Boolean} opts.mostRecentOnly
|
|
254
|
-
* @param {String} opts.files
|
|
252
|
+
* @param {Boolean} opts.systemFilesOnly
|
|
253
|
+
* @param {Boolean} opts.mostRecentOnly
|
|
254
|
+
* @param {String} opts.files
|
|
255
255
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/RouteLog>}
|
|
256
256
|
*/
|
|
257
257
|
}, {
|
|
@@ -264,7 +264,7 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* Get all Routes within a Project
|
|
267
|
-
* @param {String} projectOrProductUID
|
|
267
|
+
* @param {String} projectOrProductUID
|
|
268
268
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/NotehubRouteSummary>} and HTTP response
|
|
269
269
|
*/
|
|
270
270
|
}, {
|
|
@@ -276,21 +276,21 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
276
276
|
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getRoutes");
|
|
277
277
|
}
|
|
278
278
|
var pathParams = {
|
|
279
|
-
|
|
279
|
+
projectOrProductUID: projectOrProductUID
|
|
280
280
|
};
|
|
281
281
|
var queryParams = {};
|
|
282
282
|
var headerParams = {};
|
|
283
283
|
var formParams = {};
|
|
284
|
-
var authNames = [
|
|
284
|
+
var authNames = ["personalAccessToken"];
|
|
285
285
|
var contentTypes = [];
|
|
286
|
-
var accepts = [
|
|
286
|
+
var accepts = ["application/json"];
|
|
287
287
|
var returnType = [_NotehubRouteSummary["default"]];
|
|
288
|
-
return this.apiClient.callApi(
|
|
288
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/routes", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
/**
|
|
292
292
|
* Get all Routes within a Project
|
|
293
|
-
* @param {String} projectOrProductUID
|
|
293
|
+
* @param {String} projectOrProductUID
|
|
294
294
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/NotehubRouteSummary>}
|
|
295
295
|
*/
|
|
296
296
|
}, {
|
|
@@ -303,8 +303,8 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* Update route by UID
|
|
306
|
-
* @param {String} projectOrProductUID
|
|
307
|
-
* @param {String} routeUID
|
|
306
|
+
* @param {String} projectOrProductUID
|
|
307
|
+
* @param {String} routeUID
|
|
308
308
|
* @param {module:model/NotehubRoute} notehubRoute Route settings to be updated
|
|
309
309
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NotehubRoute} and HTTP response
|
|
310
310
|
*/
|
|
@@ -325,23 +325,23 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
325
325
|
throw new _Error["default"]("Missing the required parameter 'notehubRoute' when calling updateRoute");
|
|
326
326
|
}
|
|
327
327
|
var pathParams = {
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
projectOrProductUID: projectOrProductUID,
|
|
329
|
+
routeUID: routeUID
|
|
330
330
|
};
|
|
331
331
|
var queryParams = {};
|
|
332
332
|
var headerParams = {};
|
|
333
333
|
var formParams = {};
|
|
334
|
-
var authNames = [
|
|
335
|
-
var contentTypes = [
|
|
336
|
-
var accepts = [
|
|
334
|
+
var authNames = ["personalAccessToken"];
|
|
335
|
+
var contentTypes = ["application/json"];
|
|
336
|
+
var accepts = ["application/json"];
|
|
337
337
|
var returnType = _NotehubRoute["default"];
|
|
338
|
-
return this.apiClient.callApi(
|
|
338
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/routes/{routeUID}", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
/**
|
|
342
342
|
* Update route by UID
|
|
343
|
-
* @param {String} projectOrProductUID
|
|
344
|
-
* @param {String} routeUID
|
|
343
|
+
* @param {String} projectOrProductUID
|
|
344
|
+
* @param {String} routeUID
|
|
345
345
|
* @param {module:model/NotehubRoute} notehubRoute Route settings to be updated
|
|
346
346
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NotehubRoute}
|
|
347
347
|
*/
|
package/dist/api/UsageApi.js
CHANGED
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
19
|
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
21
|
*
|
|
22
22
|
* The version of the OpenAPI document: 1.2.0
|
|
23
23
|
* Contact: engineering@blues.io
|
|
@@ -28,18 +28,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
30
|
/**
|
|
31
|
-
* Usage service.
|
|
32
|
-
* @module api/UsageApi
|
|
33
|
-
* @version
|
|
34
|
-
*/
|
|
31
|
+
* Usage service.
|
|
32
|
+
* @module api/UsageApi
|
|
33
|
+
* @version 3.0.0
|
|
34
|
+
*/
|
|
35
35
|
var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
* Constructs a new UsageApi.
|
|
38
|
+
* @alias module:api/UsageApi
|
|
39
|
+
* @class
|
|
40
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
+
*/
|
|
43
43
|
function UsageApi(apiClient) {
|
|
44
44
|
_classCallCheck(this, UsageApi);
|
|
45
45
|
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
@@ -47,12 +47,13 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Get data usage in bytes for a project with time range and period aggregation
|
|
50
|
-
* @param {String} projectOrProductUID
|
|
50
|
+
* @param {String} projectOrProductUID
|
|
51
51
|
* @param {module:model/String} period Period type for aggregation
|
|
52
52
|
* @param {Object} opts Optional parameters
|
|
53
53
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
54
54
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
55
55
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
56
|
+
* @param {Array.<String>} opts.fleetUID Filter by Fleet UID
|
|
56
57
|
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
57
58
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDataUsage200Response} and HTTP response
|
|
58
59
|
*/
|
|
@@ -70,32 +71,34 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
70
71
|
throw new _Error["default"]("Missing the required parameter 'period' when calling getDataUsage");
|
|
71
72
|
}
|
|
72
73
|
var pathParams = {
|
|
73
|
-
|
|
74
|
+
projectOrProductUID: projectOrProductUID
|
|
74
75
|
};
|
|
75
76
|
var queryParams = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
startDate: opts["startDate"],
|
|
78
|
+
endDate: opts["endDate"],
|
|
79
|
+
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
80
|
+
fleetUID: this.apiClient.buildCollectionParam(opts["fleetUID"], "multi"),
|
|
81
|
+
period: period,
|
|
82
|
+
aggregate: opts["aggregate"]
|
|
81
83
|
};
|
|
82
84
|
var headerParams = {};
|
|
83
85
|
var formParams = {};
|
|
84
|
-
var authNames = [
|
|
86
|
+
var authNames = ["personalAccessToken"];
|
|
85
87
|
var contentTypes = [];
|
|
86
|
-
var accepts = [
|
|
88
|
+
var accepts = ["application/json"];
|
|
87
89
|
var returnType = _GetDataUsage200Response["default"];
|
|
88
|
-
return this.apiClient.callApi(
|
|
90
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/usage/data", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
/**
|
|
92
94
|
* Get data usage in bytes for a project with time range and period aggregation
|
|
93
|
-
* @param {String} projectOrProductUID
|
|
95
|
+
* @param {String} projectOrProductUID
|
|
94
96
|
* @param {module:model/String} period Period type for aggregation
|
|
95
97
|
* @param {Object} opts Optional parameters
|
|
96
98
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
97
99
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
98
100
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
101
|
+
* @param {Array.<String>} opts.fleetUID Filter by Fleet UID
|
|
99
102
|
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
100
103
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDataUsage200Response}
|
|
101
104
|
*/
|
|
@@ -109,13 +112,17 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
109
112
|
|
|
110
113
|
/**
|
|
111
114
|
* Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
112
|
-
* @param {String} projectOrProductUID
|
|
115
|
+
* @param {String} projectOrProductUID
|
|
113
116
|
* @param {module:model/String} period Period type for aggregation
|
|
114
117
|
* @param {Object} opts Optional parameters
|
|
115
118
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
116
119
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
117
120
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
121
|
+
* @param {Array.<String>} opts.fleetUID Filter by Fleet UID
|
|
118
122
|
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
123
|
+
* @param {Array.<String>} opts.notefile Filter to specific notefiles
|
|
124
|
+
* @param {Boolean} opts.skipRecentData When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. (default to false)
|
|
125
|
+
* @param {Boolean} opts.includeNotefiles Include per-notefile event counts in the response (default to false)
|
|
119
126
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UsageEventsResponse} and HTTP response
|
|
120
127
|
*/
|
|
121
128
|
}, {
|
|
@@ -132,33 +139,41 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
132
139
|
throw new _Error["default"]("Missing the required parameter 'period' when calling getEventsUsage");
|
|
133
140
|
}
|
|
134
141
|
var pathParams = {
|
|
135
|
-
|
|
142
|
+
projectOrProductUID: projectOrProductUID
|
|
136
143
|
};
|
|
137
144
|
var queryParams = {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
145
|
+
startDate: opts["startDate"],
|
|
146
|
+
endDate: opts["endDate"],
|
|
147
|
+
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
148
|
+
fleetUID: this.apiClient.buildCollectionParam(opts["fleetUID"], "multi"),
|
|
149
|
+
period: period,
|
|
150
|
+
aggregate: opts["aggregate"],
|
|
151
|
+
notefile: this.apiClient.buildCollectionParam(opts["notefile"], "multi"),
|
|
152
|
+
skipRecentData: opts["skipRecentData"],
|
|
153
|
+
includeNotefiles: opts["includeNotefiles"]
|
|
143
154
|
};
|
|
144
155
|
var headerParams = {};
|
|
145
156
|
var formParams = {};
|
|
146
|
-
var authNames = [
|
|
157
|
+
var authNames = ["personalAccessToken"];
|
|
147
158
|
var contentTypes = [];
|
|
148
|
-
var accepts = [
|
|
159
|
+
var accepts = ["application/json"];
|
|
149
160
|
var returnType = _UsageEventsResponse["default"];
|
|
150
|
-
return this.apiClient.callApi(
|
|
161
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/usage/events", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
151
162
|
}
|
|
152
163
|
|
|
153
164
|
/**
|
|
154
165
|
* Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
155
|
-
* @param {String} projectOrProductUID
|
|
166
|
+
* @param {String} projectOrProductUID
|
|
156
167
|
* @param {module:model/String} period Period type for aggregation
|
|
157
168
|
* @param {Object} opts Optional parameters
|
|
158
169
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
159
170
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
160
171
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
172
|
+
* @param {Array.<String>} opts.fleetUID Filter by Fleet UID
|
|
161
173
|
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
174
|
+
* @param {Array.<String>} opts.notefile Filter to specific notefiles
|
|
175
|
+
* @param {Boolean} opts.skipRecentData When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. (default to false)
|
|
176
|
+
* @param {Boolean} opts.includeNotefiles Include per-notefile event counts in the response (default to false)
|
|
162
177
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UsageEventsResponse}
|
|
163
178
|
*/
|
|
164
179
|
}, {
|
|
@@ -171,13 +186,15 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
171
186
|
|
|
172
187
|
/**
|
|
173
188
|
* Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
174
|
-
* @param {String} projectOrProductUID
|
|
189
|
+
* @param {String} projectOrProductUID
|
|
175
190
|
* @param {module:model/String} period Period type for aggregation
|
|
176
191
|
* @param {Object} opts Optional parameters
|
|
177
192
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
178
193
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
179
194
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
195
|
+
* @param {Array.<String>} opts.fleetUID Filter by Fleet UID
|
|
180
196
|
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
197
|
+
* @param {Boolean} opts.skipRecentData When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. (default to false)
|
|
181
198
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSessionsUsage200Response} and HTTP response
|
|
182
199
|
*/
|
|
183
200
|
}, {
|
|
@@ -194,33 +211,37 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
194
211
|
throw new _Error["default"]("Missing the required parameter 'period' when calling getSessionsUsage");
|
|
195
212
|
}
|
|
196
213
|
var pathParams = {
|
|
197
|
-
|
|
214
|
+
projectOrProductUID: projectOrProductUID
|
|
198
215
|
};
|
|
199
216
|
var queryParams = {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
217
|
+
startDate: opts["startDate"],
|
|
218
|
+
endDate: opts["endDate"],
|
|
219
|
+
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
220
|
+
fleetUID: this.apiClient.buildCollectionParam(opts["fleetUID"], "multi"),
|
|
221
|
+
period: period,
|
|
222
|
+
aggregate: opts["aggregate"],
|
|
223
|
+
skipRecentData: opts["skipRecentData"]
|
|
205
224
|
};
|
|
206
225
|
var headerParams = {};
|
|
207
226
|
var formParams = {};
|
|
208
|
-
var authNames = [
|
|
227
|
+
var authNames = ["personalAccessToken"];
|
|
209
228
|
var contentTypes = [];
|
|
210
|
-
var accepts = [
|
|
229
|
+
var accepts = ["application/json"];
|
|
211
230
|
var returnType = _GetSessionsUsage200Response["default"];
|
|
212
|
-
return this.apiClient.callApi(
|
|
231
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/usage/sessions", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
213
232
|
}
|
|
214
233
|
|
|
215
234
|
/**
|
|
216
235
|
* Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
217
|
-
* @param {String} projectOrProductUID
|
|
236
|
+
* @param {String} projectOrProductUID
|
|
218
237
|
* @param {module:model/String} period Period type for aggregation
|
|
219
238
|
* @param {Object} opts Optional parameters
|
|
220
239
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
221
240
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
222
241
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
242
|
+
* @param {Array.<String>} opts.fleetUID Filter by Fleet UID
|
|
223
243
|
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
244
|
+
* @param {Boolean} opts.skipRecentData When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects. (default to false)
|
|
224
245
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSessionsUsage200Response}
|
|
225
246
|
*/
|
|
226
247
|
}, {
|