@blues-inc/notehub-js 6.7.0 → 7.0.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 +154 -150
- package/dist/ApiClient.js +3 -3
- package/dist/api/AlertApi.js +13 -8
- package/dist/api/AuthorizationApi.js +12 -51
- package/dist/api/DescriptionApi.js +50 -34
- package/dist/api/DeviceApi.js +278 -135
- package/dist/api/EventApi.js +68 -201
- package/dist/api/ExternalDevicesApi.js +20 -14
- package/dist/api/JobsApi.js +58 -40
- package/dist/api/MonitorApi.js +28 -18
- package/dist/api/OrganizationApi.js +26 -20
- package/dist/api/ProjectApi.js +260 -166
- package/dist/api/RouteApi.js +55 -40
- package/dist/api/SkillsApi.js +279 -0
- package/dist/api/UsageApi.js +74 -64
- package/dist/api/WebhookApi.js +68 -46
- package/dist/index.js +91 -63
- package/dist/model/AWSRoleConfig.js +2 -2
- package/dist/model/AddDeviceToFleetsRequest.js +4 -4
- package/dist/model/Alert.js +15 -10
- package/dist/model/AlertDataInner.js +10 -5
- package/dist/model/AlertNotificationsInner.js +15 -5
- package/dist/model/ArchiveStats.js +2 -2
- package/dist/model/AwsRoute.js +2 -2
- package/dist/model/AzureRoute.js +2 -2
- package/dist/model/BatchJobNoteRequest.js +2 -2
- package/dist/model/BatchJobRequests.js +6 -6
- package/dist/model/BillingAccount.js +2 -2
- package/dist/model/BillingAccountRole.js +1 -1
- package/dist/model/BlynkRoute.js +2 -2
- package/dist/model/Body.js +3 -2
- package/dist/model/CancelJobRun200Response.js +2 -2
- package/dist/model/CellularPlan.js +4 -3
- package/dist/model/CloneProjectRequest.js +8 -8
- package/dist/model/Contact.js +2 -2
- package/dist/model/CreateFleetRequest.js +5 -4
- package/dist/model/CreateJob201Response.js +2 -2
- package/dist/model/CreateMonitor.js +38 -26
- package/dist/model/CreateProductRequest.js +8 -7
- package/dist/model/CreateProjectRequest.js +6 -6
- package/dist/model/CreateProjectSecretRequest.js +6 -6
- package/dist/model/CreateUpdateRepository.js +4 -2
- package/dist/model/CreatedRepository.js +6 -6
- package/dist/model/CurrentFirmware.js +2 -2
- package/dist/model/DFUEnv.js +2 -2
- package/dist/model/DFUState.js +2 -2
- package/dist/model/DataField.js +2 -2
- package/dist/model/DataSet.js +5 -5
- package/dist/model/DataSetField.js +3 -3
- package/dist/model/DataUsage.js +2 -2
- package/dist/model/DatacakeRoute.js +2 -2
- package/dist/model/DatasetReloadProgress.js +2 -2
- package/dist/model/DeleteDeviceFromFleetsRequest.js +4 -4
- package/dist/model/DeleteJob200Response.js +2 -2
- package/dist/model/DeleteNotefilesRequest.js +3 -3
- package/dist/model/DescriptionRecord.js +7 -7
- package/dist/model/DescriptionRecordList.js +2 -2
- package/dist/model/Device.js +37 -9
- package/dist/model/DeviceDfuHistory.js +13 -3
- package/dist/model/DeviceDfuHistoryCurrent.js +3 -3
- package/dist/model/DeviceDfuHistoryPage.js +15 -2
- package/dist/model/DeviceDfuStateMachine.js +3 -2
- package/dist/model/DeviceDfuStateMachineNode.js +3 -3
- package/dist/model/DeviceDfuStatus.js +13 -4
- package/dist/model/DeviceDfuStatusPage.js +15 -2
- package/dist/model/DeviceSensor.js +2 -2
- package/dist/model/DeviceSession.js +6 -6
- package/dist/model/DeviceTowerInfo.js +7 -2
- package/dist/model/DeviceUsage.js +2 -2
- package/dist/model/DfuActionRequest.js +3 -3
- package/dist/model/EmailNotification.js +30 -7
- package/dist/model/EnvTreeJsonNode.js +2 -2
- package/dist/model/EnvVar.js +2 -2
- package/dist/model/EnvironmentVariables.js +2 -2
- package/dist/model/Error.js +2 -2
- package/dist/model/Event.js +17 -8
- package/dist/model/Filter.js +2 -2
- package/dist/model/Firmware.js +2 -2
- package/dist/model/FirmwareInfo.js +7 -7
- package/dist/model/Fleet.js +12 -11
- package/dist/model/FleetConnectivityAssurance.js +2 -2
- package/dist/model/GetAlerts200Response.js +15 -2
- package/dist/model/GetApiUsage200Response.js +3 -3
- package/dist/model/GetDataUsage200Response.js +3 -3
- package/dist/model/GetDataUsage200ResponseDataInner.js +4 -4
- package/dist/model/GetDbNote200Response.js +2 -2
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +2 -2
- package/dist/model/GetDeviceFleets200Response.js +2 -2
- package/dist/model/GetDeviceHealthLog200Response.js +2 -2
- package/dist/model/GetDeviceJourney200Response.js +2 -2
- package/dist/model/GetDeviceJourney200ResponseJourney.js +2 -2
- package/dist/model/GetDeviceJourneys200Response.js +2 -2
- package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +2 -2
- package/dist/model/GetDeviceLatestEvents200Response.js +3 -3
- package/dist/model/GetDevicePlans200Response.js +3 -2
- package/dist/model/GetDevicePublicKey200Response.js +6 -4
- package/dist/model/GetDevicePublicKeys200Response.js +15 -2
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +13 -2
- package/dist/model/GetDeviceSessions200Response.js +15 -2
- package/dist/model/GetDevices200Response.js +15 -2
- package/dist/model/GetEvents200Response.js +15 -2
- package/dist/model/GetJobRuns200Response.js +2 -2
- package/dist/model/GetJobs200Response.js +2 -2
- package/dist/model/GetNotefile200Response.js +2 -2
- package/dist/model/{GetBillingAccount200Response.js → GetOrganization200Response.js} +29 -29
- package/dist/model/{GetBillingAccount200ResponsePlan.js → GetOrganization200ResponsePlan.js} +25 -25
- package/dist/model/{GetBillingAccountBalanceHistory200Response.js → GetOrganizationBalanceHistory200Response.js} +23 -23
- package/dist/model/{GetBillingAccountBalanceHistory200ResponseDataInner.js → GetOrganizationBalanceHistory200ResponseDataInner.js} +23 -23
- package/dist/model/GetOrganizations200Response.js +2 -2
- package/dist/model/GetProducts200Response.js +2 -2
- package/dist/model/GetProjectMembers200Response.js +2 -2
- package/dist/model/GetProjectSecretsResponse.js +2 -2
- package/dist/model/GetProjects200Response.js +2 -2
- package/dist/model/GetRouteLogsUsage200Response.js +3 -3
- package/dist/model/GetSessionsUsage200Response.js +4 -4
- package/dist/model/GetWebhooks200Response.js +2 -2
- package/dist/model/GoogleRoute.js +2 -2
- package/dist/model/HealthLog.js +8 -5
- package/dist/model/HttpRoute.js +2 -2
- package/dist/model/Job.js +2 -2
- package/dist/model/JobDefinition.js +3 -3
- package/dist/model/JobDefinitionReportOptions.js +2 -2
- package/dist/model/JobDefinitionSelect.js +4 -4
- package/dist/model/JobDetail.js +2 -2
- package/dist/model/JobDetailAllOf.js +2 -2
- package/dist/model/JobRun.js +2 -2
- package/dist/model/Location.js +14 -8
- package/dist/model/Monitor.js +19 -13
- package/dist/model/MonitorAlertRoutesInner.js +61 -15
- package/dist/model/MqttRoute.js +2 -2
- package/dist/model/Note.js +3 -3
- package/dist/model/NoteInput.js +2 -2
- package/dist/model/Notefile.js +3 -2
- package/dist/model/NotefileSchema.js +6 -4
- package/dist/model/NotehubRoute.js +8 -4
- package/dist/model/NotehubRouteSummary.js +7 -2
- package/dist/model/OAuth2Error.js +2 -2
- package/dist/model/OAuth2TokenResponse.js +2 -2
- package/dist/model/Organization.js +6 -4
- package/dist/model/OrganizationRole.js +1 -1
- package/dist/model/Product.js +9 -5
- package/dist/model/Project.js +8 -5
- package/dist/model/ProjectMember.js +6 -5
- package/dist/model/ProjectSecret.js +8 -8
- package/dist/model/ProvisionDeviceRequest.js +6 -6
- package/dist/model/ProxyRoute.js +2 -2
- package/dist/model/QubitroRoute.js +2 -2
- package/dist/model/RadRoute.js +2 -2
- package/dist/model/Repository.js +4 -4
- package/dist/model/RepositoryListResponse.js +2 -2
- package/dist/model/RepositoryRecord.js +119 -0
- package/dist/model/RepositoryTokenRequest.js +2 -2
- package/dist/model/RepositoryTokenResponse.js +2 -2
- package/dist/model/Role.js +1 -1
- package/dist/model/RouteLog.js +10 -10
- package/dist/model/RouteTransformSettings.js +2 -2
- package/dist/model/RunJob200Response.js +2 -2
- package/dist/model/S3ArchiveRoute.js +2 -2
- package/dist/model/SatelliteDataUsage.js +2 -2
- package/dist/model/SatellitePlan.js +2 -2
- package/dist/model/SchemaProperty.js +7 -5
- package/dist/model/SignalDevice200Response.js +3 -3
- package/dist/model/SimUsage.js +2 -2
- package/dist/model/Skill.js +207 -0
- package/dist/model/{GetBillingAccounts200Response.js → SkillLinks.js} +60 -41
- package/dist/model/{GetEventsByCursor200Response.js → SkillSet.js} +76 -52
- package/dist/model/SkillSummary.js +205 -0
- package/dist/model/SkillWrite.js +128 -0
- package/dist/model/SkillWriteResult.js +153 -0
- package/dist/model/SlackBearerNotification.js +32 -9
- package/dist/model/SlackRoute.js +2 -2
- package/dist/model/SlackWebHookNotification.js +32 -9
- package/dist/model/SnowflakeRoute.js +2 -2
- package/dist/model/SnowpipeStreamingRoute.js +2 -2
- package/dist/model/ThingworxRoute.js +2 -2
- package/dist/model/TowerLocation.js +2 -2
- package/dist/model/TwilioNotification.js +167 -0
- package/dist/model/TwilioRoute.js +2 -2
- package/dist/model/UpdateFleetRequest.js +8 -7
- package/dist/model/UpdateHostFirmwareRequest.js +5 -5
- package/dist/model/UpdateProjectSecretRequest.js +4 -4
- package/dist/model/UploadMetadata.js +2 -2
- package/dist/model/UsageApiData.js +2 -2
- package/dist/model/UsageData.js +2 -2
- package/dist/model/UsageEventsData.js +2 -2
- package/dist/model/UsageEventsResponse.js +3 -3
- package/dist/model/UsageRouteLogsData.js +3 -3
- package/dist/model/UsageSessionsData.js +2 -2
- package/dist/model/UserDfuStateMachine.js +2 -2
- package/dist/model/UserDfuStateMachineStatus.js +2 -2
- package/dist/model/UserFirmwareInfo.js +2 -2
- package/dist/model/WebhookSettings.js +5 -5
- package/package.json +1 -1
- package/dist/api/BillingAccountApi.js +0 -167
- package/dist/model/Login200Response.js +0 -91
- package/dist/model/LoginRequest.js +0 -103
package/dist/api/UsageApi.js
CHANGED
|
@@ -17,7 +17,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
|
|
|
17
17
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
18
18
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
19
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
-
function _toPrimitive(t,
|
|
20
|
+
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
21
21
|
* Notehub API
|
|
22
22
|
* The OpenAPI definition for the Notehub.io API.
|
|
23
23
|
*
|
|
@@ -32,7 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
32
32
|
/**
|
|
33
33
|
* Usage service.
|
|
34
34
|
* @module api/UsageApi
|
|
35
|
-
* @version
|
|
35
|
+
* @version 7.0.0-beta.2
|
|
36
36
|
*/
|
|
37
37
|
var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
38
38
|
/**
|
|
@@ -48,13 +48,14 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Get billable
|
|
51
|
+
* Get billable API usage
|
|
52
|
+
* Count a project's billable Notehub API requests per day, week or month, by endpoint. Only requests billed against the project's plan are counted. Returns 400 if `startDate` is after `endDate`.
|
|
52
53
|
* @param {String} projectOrProductUID
|
|
53
|
-
* @param {module:model/String} period
|
|
54
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
54
55
|
* @param {Object} opts Optional parameters
|
|
55
56
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
56
57
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
57
|
-
* @param {Number} opts.limit
|
|
58
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
58
59
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetApiUsage200Response} and HTTP response
|
|
59
60
|
*/
|
|
60
61
|
return _createClass(UsageApi, [{
|
|
@@ -89,13 +90,14 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
|
-
* Get billable
|
|
93
|
+
* Get billable API usage
|
|
94
|
+
* Count a project's billable Notehub API requests per day, week or month, by endpoint. Only requests billed against the project's plan are counted. Returns 400 if `startDate` is after `endDate`.
|
|
93
95
|
* @param {String} projectOrProductUID
|
|
94
|
-
* @param {module:model/String} period
|
|
96
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
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
|
-
* @param {Number} opts.limit
|
|
100
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
99
101
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetApiUsage200Response}
|
|
100
102
|
*/
|
|
101
103
|
}, {
|
|
@@ -107,16 +109,17 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
/**
|
|
110
|
-
* Get
|
|
112
|
+
* Get cellular and satellite data usage
|
|
113
|
+
* Get the cellular and satellite data a project's devices used, in bytes. It's counted per day, week or month, by device, fleet or the whole project. If there are more data points than `limit`, the rest are dropped and `truncated` is true. Returns 400 for an unknown device, or if `endDate` is before `startDate`.
|
|
111
114
|
* @param {String} projectOrProductUID
|
|
112
|
-
* @param {module:model/String} period
|
|
115
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
113
116
|
* @param {Object} opts Optional parameters
|
|
114
117
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
115
118
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
116
|
-
* @param {Array.<String>} opts.deviceUID A
|
|
117
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
118
|
-
* @param {Number} opts.limit
|
|
119
|
-
* @param {module:model/String} opts.aggregate
|
|
119
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
120
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
121
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
122
|
+
* @param {module:model/String} opts.aggregate How to group the counts, such as per device or one total for the project. (default to 'device')
|
|
120
123
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetDataUsage200Response} and HTTP response
|
|
121
124
|
*/
|
|
122
125
|
}, {
|
|
@@ -154,16 +157,17 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
154
157
|
}
|
|
155
158
|
|
|
156
159
|
/**
|
|
157
|
-
* Get
|
|
160
|
+
* Get cellular and satellite data usage
|
|
161
|
+
* Get the cellular and satellite data a project's devices used, in bytes. It's counted per day, week or month, by device, fleet or the whole project. If there are more data points than `limit`, the rest are dropped and `truncated` is true. Returns 400 for an unknown device, or if `endDate` is before `startDate`.
|
|
158
162
|
* @param {String} projectOrProductUID
|
|
159
|
-
* @param {module:model/String} period
|
|
163
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
160
164
|
* @param {Object} opts Optional parameters
|
|
161
165
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
162
166
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
163
|
-
* @param {Array.<String>} opts.deviceUID A
|
|
164
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
165
|
-
* @param {Number} opts.limit
|
|
166
|
-
* @param {module:model/String} opts.aggregate
|
|
167
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
168
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
169
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
170
|
+
* @param {module:model/String} opts.aggregate How to group the counts, such as per device or one total for the project. (default to 'device')
|
|
167
171
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetDataUsage200Response}
|
|
168
172
|
*/
|
|
169
173
|
}, {
|
|
@@ -175,19 +179,20 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
/**
|
|
178
|
-
* Get
|
|
182
|
+
* Get event usage
|
|
183
|
+
* Count a project's events per day, week or month, by device, fleet or the whole project, optionally per notefile. Summaries lag; with `period=day` and no `endDate`, the latest day is filled in from recent events unless `skipRecentData` is true. Returns 400 if `startDate` is after `endDate`.
|
|
179
184
|
* @param {String} projectOrProductUID
|
|
180
|
-
* @param {module:model/String} period
|
|
185
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
181
186
|
* @param {Object} opts Optional parameters
|
|
182
187
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
183
188
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
184
|
-
* @param {Array.<String>} opts.deviceUID A
|
|
185
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
186
|
-
* @param {Number} opts.limit
|
|
187
|
-
* @param {module:model/String} opts.aggregate
|
|
188
|
-
* @param {Array.<String>} opts.notefile
|
|
189
|
-
* @param {Boolean} opts.skipRecentData
|
|
190
|
-
* @param {Boolean} opts.includeNotefiles
|
|
189
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
190
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
191
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
192
|
+
* @param {module:model/String} opts.aggregate How to group the counts, such as per device or one total for the project. (default to 'device')
|
|
193
|
+
* @param {Array.<String>} opts.notefile Count only events from these notefiles.
|
|
194
|
+
* @param {Boolean} opts.skipRecentData If true, return only summarized data, without filling in the latest day. Faster for large projects. (default to false)
|
|
195
|
+
* @param {Boolean} opts.includeNotefiles If true, include event counts for each notefile. (default to false)
|
|
191
196
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UsageEventsResponse} and HTTP response
|
|
192
197
|
*/
|
|
193
198
|
}, {
|
|
@@ -228,19 +233,20 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
228
233
|
}
|
|
229
234
|
|
|
230
235
|
/**
|
|
231
|
-
* Get
|
|
236
|
+
* Get event usage
|
|
237
|
+
* Count a project's events per day, week or month, by device, fleet or the whole project, optionally per notefile. Summaries lag; with `period=day` and no `endDate`, the latest day is filled in from recent events unless `skipRecentData` is true. Returns 400 if `startDate` is after `endDate`.
|
|
232
238
|
* @param {String} projectOrProductUID
|
|
233
|
-
* @param {module:model/String} period
|
|
239
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
234
240
|
* @param {Object} opts Optional parameters
|
|
235
241
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
236
242
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
237
|
-
* @param {Array.<String>} opts.deviceUID A
|
|
238
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
239
|
-
* @param {Number} opts.limit
|
|
240
|
-
* @param {module:model/String} opts.aggregate
|
|
241
|
-
* @param {Array.<String>} opts.notefile
|
|
242
|
-
* @param {Boolean} opts.skipRecentData
|
|
243
|
-
* @param {Boolean} opts.includeNotefiles
|
|
243
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
244
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
245
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
246
|
+
* @param {module:model/String} opts.aggregate How to group the counts, such as per device or one total for the project. (default to 'device')
|
|
247
|
+
* @param {Array.<String>} opts.notefile Count only events from these notefiles.
|
|
248
|
+
* @param {Boolean} opts.skipRecentData If true, return only summarized data, without filling in the latest day. Faster for large projects. (default to false)
|
|
249
|
+
* @param {Boolean} opts.includeNotefiles If true, include event counts for each notefile. (default to false)
|
|
244
250
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UsageEventsResponse}
|
|
245
251
|
*/
|
|
246
252
|
}, {
|
|
@@ -252,16 +258,17 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
252
258
|
}
|
|
253
259
|
|
|
254
260
|
/**
|
|
255
|
-
* Get route
|
|
261
|
+
* Get route log usage
|
|
262
|
+
* Count a project's attempts to send events to routes per day, week or month, by route or for the whole project. If there are more data points than `limit`, the rest are dropped and `truncated` is true.
|
|
256
263
|
* @param {String} projectOrProductUID
|
|
257
|
-
* @param {module:model/String} period
|
|
264
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
258
265
|
* @param {Object} opts Optional parameters
|
|
259
266
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
260
267
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
261
|
-
* @param {Array.<String>} opts.routeUID A
|
|
262
|
-
* @param {Number} opts.limit
|
|
263
|
-
* @param {module:model/String} opts.aggregate
|
|
264
|
-
* @param {Boolean} opts.skipRecentData
|
|
268
|
+
* @param {Array.<String>} opts.routeUID A RouteUID.
|
|
269
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
270
|
+
* @param {module:model/String} opts.aggregate How to group the counts, per route or one total for the project. (default to 'route')
|
|
271
|
+
* @param {Boolean} opts.skipRecentData If true, return only summarized data, without filling in the latest day. Faster for large projects. (default to false)
|
|
265
272
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRouteLogsUsage200Response} and HTTP response
|
|
266
273
|
*/
|
|
267
274
|
}, {
|
|
@@ -299,16 +306,17 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
299
306
|
}
|
|
300
307
|
|
|
301
308
|
/**
|
|
302
|
-
* Get route
|
|
309
|
+
* Get route log usage
|
|
310
|
+
* Count a project's attempts to send events to routes per day, week or month, by route or for the whole project. If there are more data points than `limit`, the rest are dropped and `truncated` is true.
|
|
303
311
|
* @param {String} projectOrProductUID
|
|
304
|
-
* @param {module:model/String} period
|
|
312
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
305
313
|
* @param {Object} opts Optional parameters
|
|
306
314
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
307
315
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
308
|
-
* @param {Array.<String>} opts.routeUID A
|
|
309
|
-
* @param {Number} opts.limit
|
|
310
|
-
* @param {module:model/String} opts.aggregate
|
|
311
|
-
* @param {Boolean} opts.skipRecentData
|
|
316
|
+
* @param {Array.<String>} opts.routeUID A RouteUID.
|
|
317
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
318
|
+
* @param {module:model/String} opts.aggregate How to group the counts, per route or one total for the project. (default to 'route')
|
|
319
|
+
* @param {Boolean} opts.skipRecentData If true, return only summarized data, without filling in the latest day. Faster for large projects. (default to false)
|
|
312
320
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRouteLogsUsage200Response}
|
|
313
321
|
*/
|
|
314
322
|
}, {
|
|
@@ -320,17 +328,18 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
320
328
|
}
|
|
321
329
|
|
|
322
330
|
/**
|
|
323
|
-
* Get
|
|
331
|
+
* Get session usage
|
|
332
|
+
* Count a project's device sessions per day, week or month, by device, fleet or the whole project. If there are more data points than `limit`, the rest are dropped and `truncated` is true. Returns 400 if `startDate` is after `endDate`.
|
|
324
333
|
* @param {String} projectOrProductUID
|
|
325
|
-
* @param {module:model/String} period
|
|
334
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
326
335
|
* @param {Object} opts Optional parameters
|
|
327
336
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
328
337
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
329
|
-
* @param {Array.<String>} opts.deviceUID A
|
|
330
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
331
|
-
* @param {Number} opts.limit
|
|
332
|
-
* @param {module:model/String} opts.aggregate
|
|
333
|
-
* @param {Boolean} opts.skipRecentData
|
|
338
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
339
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
340
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
341
|
+
* @param {module:model/String} opts.aggregate How to group the counts, such as per device or one total for the project. (default to 'device')
|
|
342
|
+
* @param {Boolean} opts.skipRecentData If true, return only summarized data, without filling in the latest day. Faster for large projects. (default to false)
|
|
334
343
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSessionsUsage200Response} and HTTP response
|
|
335
344
|
*/
|
|
336
345
|
}, {
|
|
@@ -369,17 +378,18 @@ var UsageApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
369
378
|
}
|
|
370
379
|
|
|
371
380
|
/**
|
|
372
|
-
* Get
|
|
381
|
+
* Get session usage
|
|
382
|
+
* Count a project's device sessions per day, week or month, by device, fleet or the whole project. If there are more data points than `limit`, the rest are dropped and `truncated` is true. Returns 400 if `startDate` is after `endDate`.
|
|
373
383
|
* @param {String} projectOrProductUID
|
|
374
|
-
* @param {module:model/String} period
|
|
384
|
+
* @param {module:model/String} period The length of time each data point covers.
|
|
375
385
|
* @param {Object} opts Optional parameters
|
|
376
386
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
377
387
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
378
|
-
* @param {Array.<String>} opts.deviceUID A
|
|
379
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
380
|
-
* @param {Number} opts.limit
|
|
381
|
-
* @param {module:model/String} opts.aggregate
|
|
382
|
-
* @param {Boolean} opts.skipRecentData
|
|
388
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
389
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
390
|
+
* @param {Number} opts.limit The most data points to return. If there are more, `truncated` is true. (default to 200000)
|
|
391
|
+
* @param {module:model/String} opts.aggregate How to group the counts, such as per device or one total for the project. (default to 'device')
|
|
392
|
+
* @param {Boolean} opts.skipRecentData If true, return only summarized data, without filling in the latest day. Faster for large projects. (default to false)
|
|
383
393
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSessionsUsage200Response}
|
|
384
394
|
*/
|
|
385
395
|
}, {
|
package/dist/api/WebhookApi.js
CHANGED
|
@@ -14,7 +14,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
|
|
|
14
14
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
15
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t,
|
|
17
|
+
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
18
18
|
* Notehub API
|
|
19
19
|
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* Webhook service.
|
|
31
31
|
* @module api/WebhookApi
|
|
32
|
-
* @version
|
|
32
|
+
* @version 7.0.0-beta.2
|
|
33
33
|
*/
|
|
34
34
|
var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -45,7 +45,8 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Add a note-shaped event from a device (legacy)
|
|
49
|
+
* Legacy: add an event from a device, adding the device to the project if it's new. The body is note-shaped: `file`, `body`, an optional base64 `payload`, and other event fields such as `when` and `sn`. No webhook transform applies. New integrations should use `CreateWebhookDeviceEventByProduct`. Requires the Owner or Developer role. Returns 400 if there's no `body` or `payload`.
|
|
49
50
|
* @param {String} productUID
|
|
50
51
|
* @param {String} deviceUID
|
|
51
52
|
* @param {Object.<String, {String: Object}>} requestBody A Note-shaped event. Typically contains the notefile name (file), a JSON body, and an optional base64-encoded payload, but any additional Note fields (e.g. when, sn, where_lat, where_lon) are accepted and honored.
|
|
@@ -82,7 +83,8 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
/**
|
|
85
|
-
*
|
|
86
|
+
* Add a note-shaped event from a device (legacy)
|
|
87
|
+
* Legacy: add an event from a device, adding the device to the project if it's new. The body is note-shaped: `file`, `body`, an optional base64 `payload`, and other event fields such as `when` and `sn`. No webhook transform applies. New integrations should use `CreateWebhookDeviceEventByProduct`. Requires the Owner or Developer role. Returns 400 if there's no `body` or `payload`.
|
|
86
88
|
* @param {String} productUID
|
|
87
89
|
* @param {String} deviceUID
|
|
88
90
|
* @param {Object.<String, {String: Object}>} requestBody A Note-shaped event. Typically contains the notefile name (file), a JSON body, and an optional base64-encoded payload, but any additional Note fields (e.g. when, sn, where_lat, where_lon) are accepted and honored.
|
|
@@ -97,9 +99,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
/**
|
|
100
|
-
*
|
|
102
|
+
* Create a webhook
|
|
103
|
+
* Create an inbound webhook that outside services post to with `CreateWebhookEventByProduct`. Its events go to the notefile `<webhookUID>.qo` unless its JSONata `transform` sets `file`. Use a lower-case ID; the event endpoints look it up in lower case. Requires the Owner or Developer role. Returns 409 if the ID is taken, and 400 if it has characters other than letters, digits, `-` and `_`.
|
|
101
104
|
* @param {String} projectOrProductUID
|
|
102
|
-
* @param {String} webhookUID Webhook
|
|
105
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
103
106
|
* @param {module:model/WebhookSettings} webhookSettings
|
|
104
107
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
105
108
|
*/
|
|
@@ -134,9 +137,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
/**
|
|
137
|
-
*
|
|
140
|
+
* Create a webhook
|
|
141
|
+
* Create an inbound webhook that outside services post to with `CreateWebhookEventByProduct`. Its events go to the notefile `<webhookUID>.qo` unless its JSONata `transform` sets `file`. Use a lower-case ID; the event endpoints look it up in lower case. Requires the Owner or Developer role. Returns 409 if the ID is taken, and 400 if it has characters other than letters, digits, `-` and `_`.
|
|
138
142
|
* @param {String} projectOrProductUID
|
|
139
|
-
* @param {String} webhookUID Webhook
|
|
143
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
140
144
|
* @param {module:model/WebhookSettings} webhookSettings
|
|
141
145
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
142
146
|
*/
|
|
@@ -149,11 +153,12 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
/**
|
|
152
|
-
*
|
|
156
|
+
* Send a device's event through a webhook
|
|
157
|
+
* Post JSON to a webhook as one device's event, like `CreateWebhookEventByProduct`, adding the device if it's new. The DeviceUID is lower-cased and gets `dev:ext:` unless it has its own sub-prefix, so `dev:abc` becomes `dev:ext:abc`, not an existing Notecard. Requires the Owner or Developer role. Returns 400 if the transform fails, and 500 if the webhook is disabled.
|
|
153
158
|
* @param {String} productUID
|
|
154
|
-
* @param {String} webhookUID Webhook
|
|
159
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
155
160
|
* @param {String} deviceUID
|
|
156
|
-
* @param {Object.<String, {String: Object}>} requestBody
|
|
161
|
+
* @param {Object.<String, {String: Object}>} requestBody Any JSON object; it becomes the event body, or the transform's input.
|
|
157
162
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
158
163
|
*/
|
|
159
164
|
}, {
|
|
@@ -192,11 +197,12 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
192
197
|
}
|
|
193
198
|
|
|
194
199
|
/**
|
|
195
|
-
*
|
|
200
|
+
* Send a device's event through a webhook
|
|
201
|
+
* Post JSON to a webhook as one device's event, like `CreateWebhookEventByProduct`, adding the device if it's new. The DeviceUID is lower-cased and gets `dev:ext:` unless it has its own sub-prefix, so `dev:abc` becomes `dev:ext:abc`, not an existing Notecard. Requires the Owner or Developer role. Returns 400 if the transform fails, and 500 if the webhook is disabled.
|
|
196
202
|
* @param {String} productUID
|
|
197
|
-
* @param {String} webhookUID Webhook
|
|
203
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
198
204
|
* @param {String} deviceUID
|
|
199
|
-
* @param {Object.<String, {String: Object}>} requestBody
|
|
205
|
+
* @param {Object.<String, {String: Object}>} requestBody Any JSON object; it becomes the event body, or the transform's input.
|
|
200
206
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
201
207
|
*/
|
|
202
208
|
}, {
|
|
@@ -208,10 +214,11 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
208
214
|
}
|
|
209
215
|
|
|
210
216
|
/**
|
|
211
|
-
*
|
|
217
|
+
* Send an event through a webhook
|
|
218
|
+
* Post JSON to a webhook. The body becomes the event body, in `<webhookUID>.qo`, from `dev:ext:webhook`; a `transform` can change all three, but must set `body`. For a specific device, use `CreateWebhookDeviceEventByProduct`. Requires the Owner or Developer role. Returns 400 if the transform fails or sets no `body`, and 500 if the webhook is disabled.
|
|
212
219
|
* @param {String} productUID
|
|
213
|
-
* @param {String} webhookUID Webhook
|
|
214
|
-
* @param {Object.<String, {String: Object}>} requestBody
|
|
220
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
221
|
+
* @param {Object.<String, {String: Object}>} requestBody Any JSON object; it becomes the event body, or the transform's input.
|
|
215
222
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
216
223
|
*/
|
|
217
224
|
}, {
|
|
@@ -245,10 +252,11 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
245
252
|
}
|
|
246
253
|
|
|
247
254
|
/**
|
|
248
|
-
*
|
|
255
|
+
* Send an event through a webhook
|
|
256
|
+
* Post JSON to a webhook. The body becomes the event body, in `<webhookUID>.qo`, from `dev:ext:webhook`; a `transform` can change all three, but must set `body`. For a specific device, use `CreateWebhookDeviceEventByProduct`. Requires the Owner or Developer role. Returns 400 if the transform fails or sets no `body`, and 500 if the webhook is disabled.
|
|
249
257
|
* @param {String} productUID
|
|
250
|
-
* @param {String} webhookUID Webhook
|
|
251
|
-
* @param {Object.<String, {String: Object}>} requestBody
|
|
258
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
259
|
+
* @param {Object.<String, {String: Object}>} requestBody Any JSON object; it becomes the event body, or the transform's input.
|
|
252
260
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
253
261
|
*/
|
|
254
262
|
}, {
|
|
@@ -260,9 +268,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
260
268
|
}
|
|
261
269
|
|
|
262
270
|
/**
|
|
263
|
-
*
|
|
271
|
+
* Delete a webhook
|
|
272
|
+
* Delete a webhook's settings. Posts to its ID are still accepted, just without a transform; to stop accepting them, set `disabled` with `UpdateWebhook` instead. Requires the Owner or Developer role. Returns 404 if the webhook doesn't exist.
|
|
264
273
|
* @param {String} projectOrProductUID
|
|
265
|
-
* @param {String} webhookUID Webhook
|
|
274
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
266
275
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
267
276
|
*/
|
|
268
277
|
}, {
|
|
@@ -292,9 +301,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
292
301
|
}
|
|
293
302
|
|
|
294
303
|
/**
|
|
295
|
-
*
|
|
304
|
+
* Delete a webhook
|
|
305
|
+
* Delete a webhook's settings. Posts to its ID are still accepted, just without a transform; to stop accepting them, set `disabled` with `UpdateWebhook` instead. Requires the Owner or Developer role. Returns 404 if the webhook doesn't exist.
|
|
296
306
|
* @param {String} projectOrProductUID
|
|
297
|
-
* @param {String} webhookUID Webhook
|
|
307
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
298
308
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
299
309
|
*/
|
|
300
310
|
}, {
|
|
@@ -306,9 +316,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
306
316
|
}
|
|
307
317
|
|
|
308
318
|
/**
|
|
309
|
-
*
|
|
319
|
+
* Get a webhook
|
|
320
|
+
* Get one webhook's transform and whether it's disabled. Requires the Owner or Developer role. Returns 404 if the webhook doesn't exist.
|
|
310
321
|
* @param {String} projectOrProductUID
|
|
311
|
-
* @param {String} webhookUID Webhook
|
|
322
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
312
323
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookSettings} and HTTP response
|
|
313
324
|
*/
|
|
314
325
|
}, {
|
|
@@ -338,9 +349,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
338
349
|
}
|
|
339
350
|
|
|
340
351
|
/**
|
|
341
|
-
*
|
|
352
|
+
* Get a webhook
|
|
353
|
+
* Get one webhook's transform and whether it's disabled. Requires the Owner or Developer role. Returns 404 if the webhook doesn't exist.
|
|
342
354
|
* @param {String} projectOrProductUID
|
|
343
|
-
* @param {String} webhookUID Webhook
|
|
355
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
344
356
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookSettings}
|
|
345
357
|
*/
|
|
346
358
|
}, {
|
|
@@ -352,9 +364,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
352
364
|
}
|
|
353
365
|
|
|
354
366
|
/**
|
|
355
|
-
*
|
|
367
|
+
* Get a webhook by ProductUID
|
|
368
|
+
* Get one webhook's settings, like `GetWebhook`, but addressed by ProductUID instead of the project. Requires the Owner or Developer role. Returns 500, not 404, if the webhook doesn't exist.
|
|
356
369
|
* @param {String} productUID
|
|
357
|
-
* @param {String} webhookUID Webhook
|
|
370
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
358
371
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookSettings} and HTTP response
|
|
359
372
|
*/
|
|
360
373
|
}, {
|
|
@@ -384,9 +397,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
384
397
|
}
|
|
385
398
|
|
|
386
399
|
/**
|
|
387
|
-
*
|
|
400
|
+
* Get a webhook by ProductUID
|
|
401
|
+
* Get one webhook's settings, like `GetWebhook`, but addressed by ProductUID instead of the project. Requires the Owner or Developer role. Returns 500, not 404, if the webhook doesn't exist.
|
|
388
402
|
* @param {String} productUID
|
|
389
|
-
* @param {String} webhookUID Webhook
|
|
403
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
390
404
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookSettings}
|
|
391
405
|
*/
|
|
392
406
|
}, {
|
|
@@ -398,7 +412,8 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
398
412
|
}
|
|
399
413
|
|
|
400
414
|
/**
|
|
401
|
-
*
|
|
415
|
+
* List webhooks
|
|
416
|
+
* List a project's inbound webhooks with their transforms and whether they're disabled. An inbound webhook lets an outside service post data that Notehub turns into events. Requires the Owner or Developer role.
|
|
402
417
|
* @param {String} projectOrProductUID
|
|
403
418
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetWebhooks200Response} and HTTP response
|
|
404
419
|
*/
|
|
@@ -424,7 +439,8 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
424
439
|
}
|
|
425
440
|
|
|
426
441
|
/**
|
|
427
|
-
*
|
|
442
|
+
* List webhooks
|
|
443
|
+
* List a project's inbound webhooks with their transforms and whether they're disabled. An inbound webhook lets an outside service post data that Notehub turns into events. Requires the Owner or Developer role.
|
|
428
444
|
* @param {String} projectOrProductUID
|
|
429
445
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetWebhooks200Response}
|
|
430
446
|
*/
|
|
@@ -437,11 +453,12 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
437
453
|
}
|
|
438
454
|
|
|
439
455
|
/**
|
|
440
|
-
*
|
|
456
|
+
* Open or close a webhook device's session (legacy)
|
|
457
|
+
* Legacy: open, update or close a webhook device's session, adding the device if it's new. The body is a session: set `why_session_opened` to open one, `why_session_closed` to close it, both to close and reopen, or neither to update the open session. Requires the Owner or Developer role. Returns 400 when updating with no session open.
|
|
441
458
|
* @param {String} productUID
|
|
442
459
|
* @param {String} deviceUID
|
|
443
460
|
* @param {Object} opts Optional parameters
|
|
444
|
-
* @param {Object.<String, {String: Object}>} opts.requestBody
|
|
461
|
+
* @param {Object.<String, {String: Object}>} opts.requestBody Session fields, such as `why_session_opened`, `why_session_closed` and signal or location values.
|
|
445
462
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
446
463
|
*/
|
|
447
464
|
}, {
|
|
@@ -472,11 +489,12 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
472
489
|
}
|
|
473
490
|
|
|
474
491
|
/**
|
|
475
|
-
*
|
|
492
|
+
* Open or close a webhook device's session (legacy)
|
|
493
|
+
* Legacy: open, update or close a webhook device's session, adding the device if it's new. The body is a session: set `why_session_opened` to open one, `why_session_closed` to close it, both to close and reopen, or neither to update the open session. Requires the Owner or Developer role. Returns 400 when updating with no session open.
|
|
476
494
|
* @param {String} productUID
|
|
477
495
|
* @param {String} deviceUID
|
|
478
496
|
* @param {Object} opts Optional parameters
|
|
479
|
-
* @param {Object.<String, {String: Object}>} opts.requestBody
|
|
497
|
+
* @param {Object.<String, {String: Object}>} opts.requestBody Session fields, such as `why_session_opened`, `why_session_closed` and signal or location values.
|
|
480
498
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
481
499
|
*/
|
|
482
500
|
}, {
|
|
@@ -488,9 +506,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
488
506
|
}
|
|
489
507
|
|
|
490
508
|
/**
|
|
491
|
-
*
|
|
509
|
+
* Update a webhook
|
|
510
|
+
* Replace a webhook's settings, creating the webhook if it doesn't exist. Send every field: a missing `transform` is cleared and a missing `disabled` enables the webhook. Requires the Owner or Developer role.
|
|
492
511
|
* @param {String} projectOrProductUID
|
|
493
|
-
* @param {String} webhookUID Webhook
|
|
512
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
494
513
|
* @param {module:model/WebhookSettings} webhookSettings
|
|
495
514
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
496
515
|
*/
|
|
@@ -525,9 +544,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
525
544
|
}
|
|
526
545
|
|
|
527
546
|
/**
|
|
528
|
-
*
|
|
547
|
+
* Update a webhook
|
|
548
|
+
* Replace a webhook's settings, creating the webhook if it doesn't exist. Send every field: a missing `transform` is cleared and a missing `disabled` enables the webhook. Requires the Owner or Developer role.
|
|
529
549
|
* @param {String} projectOrProductUID
|
|
530
|
-
* @param {String} webhookUID Webhook
|
|
550
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
531
551
|
* @param {module:model/WebhookSettings} webhookSettings
|
|
532
552
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
533
553
|
*/
|
|
@@ -540,9 +560,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
540
560
|
}
|
|
541
561
|
|
|
542
562
|
/**
|
|
543
|
-
*
|
|
563
|
+
* Update a webhook by ProductUID
|
|
564
|
+
* Replace a webhook's settings, like `UpdateWebhook`, but addressed by ProductUID. Creates the webhook if it doesn't exist. Requires the Owner or Developer role. Returns 400 if the ID has characters other than letters, digits, `-` and `_`.
|
|
544
565
|
* @param {String} productUID
|
|
545
|
-
* @param {String} webhookUID Webhook
|
|
566
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
546
567
|
* @param {module:model/WebhookSettings} webhookSettings
|
|
547
568
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
548
569
|
*/
|
|
@@ -577,9 +598,10 @@ var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
577
598
|
}
|
|
578
599
|
|
|
579
600
|
/**
|
|
580
|
-
*
|
|
601
|
+
* Update a webhook by ProductUID
|
|
602
|
+
* Replace a webhook's settings, like `UpdateWebhook`, but addressed by ProductUID. Creates the webhook if it doesn't exist. Requires the Owner or Developer role. Returns 400 if the ID has characters other than letters, digits, `-` and `_`.
|
|
581
603
|
* @param {String} productUID
|
|
582
|
-
* @param {String} webhookUID Webhook
|
|
604
|
+
* @param {String} webhookUID Webhook ID, e.g. `ttn-uplink`. Use lower case. List with `GetWebhooks`.
|
|
583
605
|
* @param {module:model/WebhookSettings} webhookSettings
|
|
584
606
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
585
607
|
*/
|