@blues-inc/notehub-js 2.1.0 → 2.2.0-beta.2
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 +248 -238
- 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 +374 -374
- 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 +381 -381
- package/dist/api/RouteApi.js +86 -86
- package/dist/api/UsageApi.js +65 -116
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +99 -78
- package/dist/model/Alert.js +76 -74
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +237 -0
- package/dist/model/AzureRoute.js +183 -0
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/BlynkRoute.js +147 -0
- 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 +12 -12
- package/dist/model/CreateMonitor.js +126 -125
- 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 +165 -0
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +102 -101
- package/dist/model/DeviceDfuHistory.js +20 -19
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +13 -12
- package/dist/model/DeviceDfuStateMachine.js +25 -24
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +13 -12
- 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 +69 -67
- 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/{AwsFilter.js → Filter.js} +36 -58
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +30 -30
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/{UsageRouteLogsResponse.js → GetDataUsage200Response.js} +35 -54
- package/dist/model/GetDataUsage200ResponseDataInner.js +217 -0
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +10 -9
- package/dist/model/GetDevicePlans200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/GetProducts200Response.js +10 -9
- package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +17 -16
- package/dist/model/GetProjectEvents200Response.js +21 -20
- package/dist/model/GetProjectEventsByCursor200Response.js +24 -23
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/{UsageSessionsResponse.js → GetSessionsUsage200Response.js} +33 -32
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/{Google.js → GoogleRoute.js} +53 -58
- package/dist/model/HandleNoteChanges200Response.js +11 -11
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +11 -11
- package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/{Http.js → HttpRoute.js} +56 -62
- 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 +100 -99
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/MqttRoute.js +243 -0
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +229 -149
- package/dist/model/{UserDbRoute.js → NotehubRouteSummary.js} +40 -45
- 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/PostProvisionProjectDeviceRequest.js +18 -18
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/{Proxy.js → ProxyRoute.js} +40 -44
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/QubitroRoute.js +159 -0
- package/dist/model/{Radresponder.js → RadRoute.js} +57 -45
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/{SlackTransform.js → RouteTransformSettings.js} +31 -31
- package/dist/model/S3ArchiveRoute.js +271 -0
- package/dist/model/SatellitePlan.js +26 -26
- package/dist/model/SchemaProperty.js +38 -36
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +195 -0
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +187 -0
- package/dist/model/{Thingworx.js → ThingworxRoute.js} +53 -58
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/TwilioRoute.js +181 -0
- package/dist/model/UpdateFleetRequest.js +25 -25
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +18 -18
- package/dist/model/UsageEventsData.js +38 -28
- package/dist/model/UsageEventsResponse.js +12 -11
- package/dist/model/UsageRouteLogsData.js +35 -36
- package/dist/model/UsageSessionsData.js +38 -28
- 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/Aws.js +0 -243
- package/dist/model/AwsTransform.js +0 -148
- package/dist/model/Azure.js +0 -189
- package/dist/model/Mqtt.js +0 -248
- package/dist/model/NotehubRouteSchema.js +0 -506
- package/dist/model/Slack.js +0 -218
- package/dist/model/Snowflake.js +0 -194
- package/dist/model/Twilio.js +0 -190
package/dist/api/UsageApi.js
CHANGED
|
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _Error = _interopRequireDefault(require("../model/Error"));
|
|
9
|
-
var
|
|
9
|
+
var _GetDataUsage200Response = _interopRequireDefault(require("../model/GetDataUsage200Response"));
|
|
10
|
+
var _GetSessionsUsage200Response = _interopRequireDefault(require("../model/GetSessionsUsage200Response"));
|
|
10
11
|
var _UsageEventsResponse = _interopRequireDefault(require("../model/UsageEventsResponse"));
|
|
11
|
-
var _UsageRouteLogsResponse = _interopRequireDefault(require("../model/UsageRouteLogsResponse"));
|
|
12
|
-
var _UsageSessionsResponse = _interopRequireDefault(require("../model/UsageSessionsResponse"));
|
|
13
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
13
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
14
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -18,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
18
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
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); } /**
|
|
20
19
|
* Notehub API
|
|
21
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
22
21
|
*
|
|
23
22
|
* The version of the OpenAPI document: 1.2.0
|
|
24
23
|
* Contact: engineering@blues.io
|
|
@@ -29,18 +28,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
28
|
*
|
|
30
29
|
*/
|
|
31
30
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
* Usage service.
|
|
32
|
+
* @module api/UsageApi
|
|
33
|
+
* @version 2.2.0-beta.2
|
|
34
|
+
*/
|
|
36
35
|
var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
37
36
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
+
*/
|
|
44
43
|
function UsageApi(apiClient) {
|
|
45
44
|
_classCallCheck(this, UsageApi);
|
|
46
45
|
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
@@ -48,71 +47,75 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
48
47
|
|
|
49
48
|
/**
|
|
50
49
|
* Get data usage in bytes for a project with time range and period aggregation
|
|
51
|
-
* @param {String} projectOrProductUID
|
|
50
|
+
* @param {String} projectOrProductUID
|
|
52
51
|
* @param {module:model/String} period Period type for aggregation
|
|
53
52
|
* @param {Object} opts Optional parameters
|
|
54
53
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
55
54
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
56
55
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
57
|
-
* @
|
|
56
|
+
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
57
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDataUsage200Response} and HTTP response
|
|
58
58
|
*/
|
|
59
59
|
return _createClass(UsageApi, [{
|
|
60
|
-
key: "
|
|
61
|
-
value: function
|
|
60
|
+
key: "getDataUsageWithHttpInfo",
|
|
61
|
+
value: function getDataUsageWithHttpInfo(projectOrProductUID, period, opts) {
|
|
62
62
|
opts = opts || {};
|
|
63
63
|
var postBody = null;
|
|
64
64
|
// verify the required parameter 'projectOrProductUID' is set
|
|
65
65
|
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
66
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling
|
|
66
|
+
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getDataUsage");
|
|
67
67
|
}
|
|
68
68
|
// verify the required parameter 'period' is set
|
|
69
69
|
if (period === undefined || period === null) {
|
|
70
|
-
throw new _Error["default"]("Missing the required parameter 'period' when calling
|
|
70
|
+
throw new _Error["default"]("Missing the required parameter 'period' when calling getDataUsage");
|
|
71
71
|
}
|
|
72
72
|
var pathParams = {
|
|
73
|
-
projectOrProductUID: projectOrProductUID
|
|
73
|
+
'projectOrProductUID': projectOrProductUID
|
|
74
74
|
};
|
|
75
75
|
var queryParams = {
|
|
76
|
-
startDate: opts[
|
|
77
|
-
endDate: opts[
|
|
78
|
-
deviceUID: this.apiClient.buildCollectionParam(opts[
|
|
79
|
-
period: period
|
|
76
|
+
'startDate': opts['startDate'],
|
|
77
|
+
'endDate': opts['endDate'],
|
|
78
|
+
'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
|
|
79
|
+
'period': period,
|
|
80
|
+
'aggregate': opts['aggregate']
|
|
80
81
|
};
|
|
81
82
|
var headerParams = {};
|
|
82
83
|
var formParams = {};
|
|
83
|
-
var authNames = [];
|
|
84
|
+
var authNames = ['personalAccessToken'];
|
|
84
85
|
var contentTypes = [];
|
|
85
|
-
var accepts = [
|
|
86
|
-
var returnType = [
|
|
87
|
-
return this.apiClient.callApi(
|
|
86
|
+
var accepts = ['application/json'];
|
|
87
|
+
var returnType = _GetDataUsage200Response["default"];
|
|
88
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/usage/data', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/**
|
|
91
92
|
* Get data usage in bytes for a project with time range and period aggregation
|
|
92
|
-
* @param {String} projectOrProductUID
|
|
93
|
+
* @param {String} projectOrProductUID
|
|
93
94
|
* @param {module:model/String} period Period type for aggregation
|
|
94
95
|
* @param {Object} opts Optional parameters
|
|
95
96
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
96
97
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
97
98
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
98
|
-
* @
|
|
99
|
+
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
100
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDataUsage200Response}
|
|
99
101
|
*/
|
|
100
102
|
}, {
|
|
101
|
-
key: "
|
|
102
|
-
value: function
|
|
103
|
-
return this.
|
|
103
|
+
key: "getDataUsage",
|
|
104
|
+
value: function getDataUsage(projectOrProductUID, period, opts) {
|
|
105
|
+
return this.getDataUsageWithHttpInfo(projectOrProductUID, period, opts).then(function (response_and_data) {
|
|
104
106
|
return response_and_data.data;
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
/**
|
|
109
111
|
* Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
110
|
-
* @param {String} projectOrProductUID
|
|
112
|
+
* @param {String} projectOrProductUID
|
|
111
113
|
* @param {module:model/String} period Period type for aggregation
|
|
112
114
|
* @param {Object} opts Optional parameters
|
|
113
115
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
114
116
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
115
117
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
118
|
+
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
116
119
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UsageEventsResponse} and HTTP response
|
|
117
120
|
*/
|
|
118
121
|
}, {
|
|
@@ -129,31 +132,33 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
129
132
|
throw new _Error["default"]("Missing the required parameter 'period' when calling getProjectEventsUsage");
|
|
130
133
|
}
|
|
131
134
|
var pathParams = {
|
|
132
|
-
projectOrProductUID: projectOrProductUID
|
|
135
|
+
'projectOrProductUID': projectOrProductUID
|
|
133
136
|
};
|
|
134
137
|
var queryParams = {
|
|
135
|
-
startDate: opts[
|
|
136
|
-
endDate: opts[
|
|
137
|
-
deviceUID: this.apiClient.buildCollectionParam(opts[
|
|
138
|
-
period: period
|
|
138
|
+
'startDate': opts['startDate'],
|
|
139
|
+
'endDate': opts['endDate'],
|
|
140
|
+
'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
|
|
141
|
+
'period': period,
|
|
142
|
+
'aggregate': opts['aggregate']
|
|
139
143
|
};
|
|
140
144
|
var headerParams = {};
|
|
141
145
|
var formParams = {};
|
|
142
|
-
var authNames = [
|
|
146
|
+
var authNames = ['personalAccessToken'];
|
|
143
147
|
var contentTypes = [];
|
|
144
|
-
var accepts = [
|
|
148
|
+
var accepts = ['application/json'];
|
|
145
149
|
var returnType = _UsageEventsResponse["default"];
|
|
146
|
-
return this.apiClient.callApi(
|
|
150
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/usage/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
/**
|
|
150
154
|
* Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
151
|
-
* @param {String} projectOrProductUID
|
|
155
|
+
* @param {String} projectOrProductUID
|
|
152
156
|
* @param {module:model/String} period Period type for aggregation
|
|
153
157
|
* @param {Object} opts Optional parameters
|
|
154
158
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
155
159
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
156
160
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
161
|
+
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
157
162
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UsageEventsResponse}
|
|
158
163
|
*/
|
|
159
164
|
}, {
|
|
@@ -164,74 +169,16 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
164
169
|
});
|
|
165
170
|
}
|
|
166
171
|
|
|
167
|
-
/**
|
|
168
|
-
* Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
169
|
-
* @param {String} projectOrProductUID
|
|
170
|
-
* @param {module:model/String} period Period type for aggregation
|
|
171
|
-
* @param {Object} opts Optional parameters
|
|
172
|
-
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
173
|
-
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
174
|
-
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
175
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UsageRouteLogsResponse} and HTTP response
|
|
176
|
-
*/
|
|
177
|
-
}, {
|
|
178
|
-
key: "getRouteLogsUsageWithHttpInfo",
|
|
179
|
-
value: function getRouteLogsUsageWithHttpInfo(projectOrProductUID, period, opts) {
|
|
180
|
-
opts = opts || {};
|
|
181
|
-
var postBody = null;
|
|
182
|
-
// verify the required parameter 'projectOrProductUID' is set
|
|
183
|
-
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
184
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getRouteLogsUsage");
|
|
185
|
-
}
|
|
186
|
-
// verify the required parameter 'period' is set
|
|
187
|
-
if (period === undefined || period === null) {
|
|
188
|
-
throw new _Error["default"]("Missing the required parameter 'period' when calling getRouteLogsUsage");
|
|
189
|
-
}
|
|
190
|
-
var pathParams = {
|
|
191
|
-
projectOrProductUID: projectOrProductUID
|
|
192
|
-
};
|
|
193
|
-
var queryParams = {
|
|
194
|
-
startDate: opts["startDate"],
|
|
195
|
-
endDate: opts["endDate"],
|
|
196
|
-
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
197
|
-
period: period
|
|
198
|
-
};
|
|
199
|
-
var headerParams = {};
|
|
200
|
-
var formParams = {};
|
|
201
|
-
var authNames = ["personalAccessToken"];
|
|
202
|
-
var contentTypes = [];
|
|
203
|
-
var accepts = ["application/json"];
|
|
204
|
-
var returnType = _UsageRouteLogsResponse["default"];
|
|
205
|
-
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/usage/route-logs", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
210
|
-
* @param {String} projectOrProductUID
|
|
211
|
-
* @param {module:model/String} period Period type for aggregation
|
|
212
|
-
* @param {Object} opts Optional parameters
|
|
213
|
-
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
214
|
-
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
215
|
-
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
216
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UsageRouteLogsResponse}
|
|
217
|
-
*/
|
|
218
|
-
}, {
|
|
219
|
-
key: "getRouteLogsUsage",
|
|
220
|
-
value: function getRouteLogsUsage(projectOrProductUID, period, opts) {
|
|
221
|
-
return this.getRouteLogsUsageWithHttpInfo(projectOrProductUID, period, opts).then(function (response_and_data) {
|
|
222
|
-
return response_and_data.data;
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
172
|
/**
|
|
227
173
|
* Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
228
|
-
* @param {String} projectOrProductUID
|
|
174
|
+
* @param {String} projectOrProductUID
|
|
229
175
|
* @param {module:model/String} period Period type for aggregation
|
|
230
176
|
* @param {Object} opts Optional parameters
|
|
231
177
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
232
178
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
233
179
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
234
|
-
* @
|
|
180
|
+
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
181
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSessionsUsage200Response} and HTTP response
|
|
235
182
|
*/
|
|
236
183
|
}, {
|
|
237
184
|
key: "getSessionsUsageWithHttpInfo",
|
|
@@ -247,32 +194,34 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
247
194
|
throw new _Error["default"]("Missing the required parameter 'period' when calling getSessionsUsage");
|
|
248
195
|
}
|
|
249
196
|
var pathParams = {
|
|
250
|
-
projectOrProductUID: projectOrProductUID
|
|
197
|
+
'projectOrProductUID': projectOrProductUID
|
|
251
198
|
};
|
|
252
199
|
var queryParams = {
|
|
253
|
-
startDate: opts[
|
|
254
|
-
endDate: opts[
|
|
255
|
-
deviceUID: this.apiClient.buildCollectionParam(opts[
|
|
256
|
-
period: period
|
|
200
|
+
'startDate': opts['startDate'],
|
|
201
|
+
'endDate': opts['endDate'],
|
|
202
|
+
'deviceUID': this.apiClient.buildCollectionParam(opts['deviceUID'], 'multi'),
|
|
203
|
+
'period': period,
|
|
204
|
+
'aggregate': opts['aggregate']
|
|
257
205
|
};
|
|
258
206
|
var headerParams = {};
|
|
259
207
|
var formParams = {};
|
|
260
|
-
var authNames = [
|
|
208
|
+
var authNames = ['personalAccessToken'];
|
|
261
209
|
var contentTypes = [];
|
|
262
|
-
var accepts = [
|
|
263
|
-
var returnType =
|
|
264
|
-
return this.apiClient.callApi(
|
|
210
|
+
var accepts = ['application/json'];
|
|
211
|
+
var returnType = _GetSessionsUsage200Response["default"];
|
|
212
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/usage/sessions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
265
213
|
}
|
|
266
214
|
|
|
267
215
|
/**
|
|
268
216
|
* Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied
|
|
269
|
-
* @param {String} projectOrProductUID
|
|
217
|
+
* @param {String} projectOrProductUID
|
|
270
218
|
* @param {module:model/String} period Period type for aggregation
|
|
271
219
|
* @param {Object} opts Optional parameters
|
|
272
220
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
273
221
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
274
222
|
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
275
|
-
* @
|
|
223
|
+
* @param {module:model/String} opts.aggregate Aggregation level for results (default to 'device')
|
|
224
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSessionsUsage200Response}
|
|
276
225
|
*/
|
|
277
226
|
}, {
|
|
278
227
|
key: "getSessionsUsage",
|
package/dist/api/WebhookApi.js
CHANGED
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
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); } /**
|
|
18
18
|
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
@@ -27,18 +27,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
* Webhook service.
|
|
31
|
+
* @module api/WebhookApi
|
|
32
|
+
* @version 2.2.0-beta.2
|
|
33
|
+
*/
|
|
34
34
|
var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
* Constructs a new WebhookApi.
|
|
37
|
+
* @alias module:api/WebhookApi
|
|
38
|
+
* @class
|
|
39
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
40
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
41
|
+
*/
|
|
42
42
|
function WebhookApi(apiClient) {
|
|
43
43
|
_classCallCheck(this, WebhookApi);
|
|
44
44
|
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
@@ -46,9 +46,9 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Creates a webhook for the specified product with the given name. The name | must be unique within the project.
|
|
49
|
-
* @param {String} projectOrProductUID
|
|
49
|
+
* @param {String} projectOrProductUID
|
|
50
50
|
* @param {String} webhookUID Webhook UID
|
|
51
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
51
|
+
* @param {module:model/WebhookSettings} webhookSettings
|
|
52
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
53
53
|
*/
|
|
54
54
|
return _createClass(WebhookApi, [{
|
|
@@ -68,24 +68,24 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
68
68
|
throw new _Error["default"]("Missing the required parameter 'webhookSettings' when calling createWebhook");
|
|
69
69
|
}
|
|
70
70
|
var pathParams = {
|
|
71
|
-
projectOrProductUID: projectOrProductUID,
|
|
72
|
-
webhookUID: webhookUID
|
|
71
|
+
'projectOrProductUID': projectOrProductUID,
|
|
72
|
+
'webhookUID': webhookUID
|
|
73
73
|
};
|
|
74
74
|
var queryParams = {};
|
|
75
75
|
var headerParams = {};
|
|
76
76
|
var formParams = {};
|
|
77
|
-
var authNames = [
|
|
78
|
-
var contentTypes = [
|
|
79
|
-
var accepts = [
|
|
77
|
+
var authNames = ['personalAccessToken'];
|
|
78
|
+
var contentTypes = ['application/json'];
|
|
79
|
+
var accepts = ['application/json'];
|
|
80
80
|
var returnType = null;
|
|
81
|
-
return this.apiClient.callApi(
|
|
81
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Creates a webhook for the specified product with the given name. The name | must be unique within the project.
|
|
86
|
-
* @param {String} projectOrProductUID
|
|
86
|
+
* @param {String} projectOrProductUID
|
|
87
87
|
* @param {String} webhookUID Webhook UID
|
|
88
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
88
|
+
* @param {module:model/WebhookSettings} webhookSettings
|
|
89
89
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
90
90
|
*/
|
|
91
91
|
}, {
|
|
@@ -98,7 +98,7 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Deletes the specified webhook
|
|
101
|
-
* @param {String} projectOrProductUID
|
|
101
|
+
* @param {String} projectOrProductUID
|
|
102
102
|
* @param {String} webhookUID Webhook UID
|
|
103
103
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
104
104
|
*/
|
|
@@ -115,22 +115,22 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
115
115
|
throw new _Error["default"]("Missing the required parameter 'webhookUID' when calling deleteWebhook");
|
|
116
116
|
}
|
|
117
117
|
var pathParams = {
|
|
118
|
-
projectOrProductUID: projectOrProductUID,
|
|
119
|
-
webhookUID: webhookUID
|
|
118
|
+
'projectOrProductUID': projectOrProductUID,
|
|
119
|
+
'webhookUID': webhookUID
|
|
120
120
|
};
|
|
121
121
|
var queryParams = {};
|
|
122
122
|
var headerParams = {};
|
|
123
123
|
var formParams = {};
|
|
124
|
-
var authNames = [
|
|
124
|
+
var authNames = ['personalAccessToken'];
|
|
125
125
|
var contentTypes = [];
|
|
126
|
-
var accepts = [
|
|
126
|
+
var accepts = ['application/json'];
|
|
127
127
|
var returnType = null;
|
|
128
|
-
return this.apiClient.callApi(
|
|
128
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* Deletes the specified webhook
|
|
133
|
-
* @param {String} projectOrProductUID
|
|
133
|
+
* @param {String} projectOrProductUID
|
|
134
134
|
* @param {String} webhookUID Webhook UID
|
|
135
135
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
136
136
|
*/
|
|
@@ -144,7 +144,7 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Retrieves the configuration settings for the specified webhook
|
|
147
|
-
* @param {String} projectOrProductUID
|
|
147
|
+
* @param {String} projectOrProductUID
|
|
148
148
|
* @param {String} webhookUID Webhook UID
|
|
149
149
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookSettings} and HTTP response
|
|
150
150
|
*/
|
|
@@ -161,22 +161,22 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
161
161
|
throw new _Error["default"]("Missing the required parameter 'webhookUID' when calling getWebhook");
|
|
162
162
|
}
|
|
163
163
|
var pathParams = {
|
|
164
|
-
projectOrProductUID: projectOrProductUID,
|
|
165
|
-
webhookUID: webhookUID
|
|
164
|
+
'projectOrProductUID': projectOrProductUID,
|
|
165
|
+
'webhookUID': webhookUID
|
|
166
166
|
};
|
|
167
167
|
var queryParams = {};
|
|
168
168
|
var headerParams = {};
|
|
169
169
|
var formParams = {};
|
|
170
|
-
var authNames = [
|
|
170
|
+
var authNames = ['personalAccessToken'];
|
|
171
171
|
var contentTypes = [];
|
|
172
|
-
var accepts = [
|
|
172
|
+
var accepts = ['application/json'];
|
|
173
173
|
var returnType = _WebhookSettings["default"];
|
|
174
|
-
return this.apiClient.callApi(
|
|
174
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Retrieves the configuration settings for the specified webhook
|
|
179
|
-
* @param {String} projectOrProductUID
|
|
179
|
+
* @param {String} projectOrProductUID
|
|
180
180
|
* @param {String} webhookUID Webhook UID
|
|
181
181
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookSettings}
|
|
182
182
|
*/
|
|
@@ -190,7 +190,7 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
192
|
* Retrieves all webhooks for the specified project
|
|
193
|
-
* @param {String} projectOrProductUID
|
|
193
|
+
* @param {String} projectOrProductUID
|
|
194
194
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetWebhooks200Response} and HTTP response
|
|
195
195
|
*/
|
|
196
196
|
}, {
|
|
@@ -202,21 +202,21 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
202
202
|
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getWebhooks");
|
|
203
203
|
}
|
|
204
204
|
var pathParams = {
|
|
205
|
-
projectOrProductUID: projectOrProductUID
|
|
205
|
+
'projectOrProductUID': projectOrProductUID
|
|
206
206
|
};
|
|
207
207
|
var queryParams = {};
|
|
208
208
|
var headerParams = {};
|
|
209
209
|
var formParams = {};
|
|
210
|
-
var authNames = [
|
|
210
|
+
var authNames = ['personalAccessToken'];
|
|
211
211
|
var contentTypes = [];
|
|
212
|
-
var accepts = [
|
|
212
|
+
var accepts = ['application/json'];
|
|
213
213
|
var returnType = _GetWebhooks200Response["default"];
|
|
214
|
-
return this.apiClient.callApi(
|
|
214
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* Retrieves all webhooks for the specified project
|
|
219
|
-
* @param {String} projectOrProductUID
|
|
219
|
+
* @param {String} projectOrProductUID
|
|
220
220
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetWebhooks200Response}
|
|
221
221
|
*/
|
|
222
222
|
}, {
|
|
@@ -229,9 +229,9 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
229
229
|
|
|
230
230
|
/**
|
|
231
231
|
* Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings.
|
|
232
|
-
* @param {String} projectOrProductUID
|
|
232
|
+
* @param {String} projectOrProductUID
|
|
233
233
|
* @param {String} webhookUID Webhook UID
|
|
234
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
234
|
+
* @param {module:model/WebhookSettings} webhookSettings
|
|
235
235
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
236
236
|
*/
|
|
237
237
|
}, {
|
|
@@ -251,24 +251,24 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
251
251
|
throw new _Error["default"]("Missing the required parameter 'webhookSettings' when calling updateWebhook");
|
|
252
252
|
}
|
|
253
253
|
var pathParams = {
|
|
254
|
-
projectOrProductUID: projectOrProductUID,
|
|
255
|
-
webhookUID: webhookUID
|
|
254
|
+
'projectOrProductUID': projectOrProductUID,
|
|
255
|
+
'webhookUID': webhookUID
|
|
256
256
|
};
|
|
257
257
|
var queryParams = {};
|
|
258
258
|
var headerParams = {};
|
|
259
259
|
var formParams = {};
|
|
260
|
-
var authNames = [
|
|
261
|
-
var contentTypes = [
|
|
262
|
-
var accepts = [
|
|
260
|
+
var authNames = ['personalAccessToken'];
|
|
261
|
+
var contentTypes = ['application/json'];
|
|
262
|
+
var accepts = ['application/json'];
|
|
263
263
|
var returnType = null;
|
|
264
|
-
return this.apiClient.callApi(
|
|
264
|
+
return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/webhooks/{webhookUID}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
268
|
* Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings.
|
|
269
|
-
* @param {String} projectOrProductUID
|
|
269
|
+
* @param {String} projectOrProductUID
|
|
270
270
|
* @param {String} webhookUID Webhook UID
|
|
271
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
271
|
+
* @param {module:model/WebhookSettings} webhookSettings
|
|
272
272
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
273
273
|
*/
|
|
274
274
|
}, {
|