@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/EventApi.js
CHANGED
|
@@ -7,7 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _Error = _interopRequireDefault(require("../model/Error"));
|
|
9
9
|
var _GetEvents200Response = _interopRequireDefault(require("../model/GetEvents200Response"));
|
|
10
|
-
var _GetEventsByCursor200Response = _interopRequireDefault(require("../model/GetEventsByCursor200Response"));
|
|
11
10
|
var _RouteLog = _interopRequireDefault(require("../model/RouteLog"));
|
|
12
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
12
|
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,7 +14,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
|
|
|
15
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); } }
|
|
16
15
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
-
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); } /**
|
|
19
18
|
* Notehub API
|
|
20
19
|
* The OpenAPI definition for the Notehub.io API.
|
|
21
20
|
*
|
|
@@ -30,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
29
|
/**
|
|
31
30
|
* Event service.
|
|
32
31
|
* @module api/EventApi
|
|
33
|
-
* @version
|
|
32
|
+
* @version 7.0.0-beta.2
|
|
34
33
|
*/
|
|
35
34
|
var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
35
|
/**
|
|
@@ -46,26 +45,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
/**
|
|
49
|
-
*
|
|
48
|
+
* List events in a project
|
|
49
|
+
* List a project's events, filtered by device, notefile, date, fleet, session and more. Use `cursor` to read events in the order Notehub stored them and to poll for new ones. Set `format=csv` for CSV. For one fleet, use `GetFleetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
|
|
50
50
|
* @param {String} projectOrProductUID
|
|
51
51
|
* @param {Object} opts Optional parameters
|
|
52
|
-
* @param {Number} opts.pageSize (default to
|
|
52
|
+
* @param {Number} opts.pageSize (default to 1000)
|
|
53
53
|
* @param {Number} opts.pageNum (default to 1)
|
|
54
|
-
* @param {
|
|
55
|
-
* @param {Array.<String>} opts.
|
|
54
|
+
* @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
|
|
55
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
56
|
+
* @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
|
|
56
57
|
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
57
58
|
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
58
59
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
59
60
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
60
|
-
* @param {module:model/String} opts.dateType Which
|
|
61
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
62
|
-
* @param {String} opts.files
|
|
63
|
-
* @param {module:model/String} opts.format Response format
|
|
64
|
-
* @param {Array.<String>} opts.serialNumber
|
|
65
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
66
|
-
* @param {Array.<String>} opts.sessionUID
|
|
67
|
-
* @param {Array.<String>} opts.eventUID
|
|
68
|
-
* @param {String} opts.selectFields Comma-separated
|
|
61
|
+
* @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
|
|
62
|
+
* @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
|
|
63
|
+
* @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
|
|
64
|
+
* @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
|
|
65
|
+
* @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
|
|
66
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
67
|
+
* @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
|
|
68
|
+
* @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
|
|
69
|
+
* @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
|
|
69
70
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEvents200Response} and HTTP response
|
|
70
71
|
*/
|
|
71
72
|
return _createClass(EventApi, [{
|
|
@@ -83,6 +84,7 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
83
84
|
var queryParams = {
|
|
84
85
|
pageSize: opts["pageSize"],
|
|
85
86
|
pageNum: opts["pageNum"],
|
|
87
|
+
cursor: opts["cursor"],
|
|
86
88
|
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
87
89
|
sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi"),
|
|
88
90
|
sortBy: opts["sortBy"],
|
|
@@ -109,26 +111,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
/**
|
|
112
|
-
*
|
|
114
|
+
* List events in a project
|
|
115
|
+
* List a project's events, filtered by device, notefile, date, fleet, session and more. Use `cursor` to read events in the order Notehub stored them and to poll for new ones. Set `format=csv` for CSV. For one fleet, use `GetFleetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
|
|
113
116
|
* @param {String} projectOrProductUID
|
|
114
117
|
* @param {Object} opts Optional parameters
|
|
115
|
-
* @param {Number} opts.pageSize (default to
|
|
118
|
+
* @param {Number} opts.pageSize (default to 1000)
|
|
116
119
|
* @param {Number} opts.pageNum (default to 1)
|
|
117
|
-
* @param {
|
|
118
|
-
* @param {Array.<String>} opts.
|
|
120
|
+
* @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
|
|
121
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
122
|
+
* @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
|
|
119
123
|
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
120
124
|
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
121
125
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
122
126
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
123
|
-
* @param {module:model/String} opts.dateType Which
|
|
124
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
125
|
-
* @param {String} opts.files
|
|
126
|
-
* @param {module:model/String} opts.format Response format
|
|
127
|
-
* @param {Array.<String>} opts.serialNumber
|
|
128
|
-
* @param {Array.<String>} opts.fleetUID Filter by
|
|
129
|
-
* @param {Array.<String>} opts.sessionUID
|
|
130
|
-
* @param {Array.<String>} opts.eventUID
|
|
131
|
-
* @param {String} opts.selectFields Comma-separated
|
|
127
|
+
* @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
|
|
128
|
+
* @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
|
|
129
|
+
* @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
|
|
130
|
+
* @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
|
|
131
|
+
* @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
|
|
132
|
+
* @param {Array.<String>} opts.fleetUID Filter by FleetUID
|
|
133
|
+
* @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
|
|
134
|
+
* @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
|
|
135
|
+
* @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
|
|
132
136
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEvents200Response}
|
|
133
137
|
*/
|
|
134
138
|
}, {
|
|
@@ -140,93 +144,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
140
144
|
}
|
|
141
145
|
|
|
142
146
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* @param {Object} opts Optional parameters
|
|
146
|
-
* @param {Number} opts.limit (default to 50)
|
|
147
|
-
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
148
|
-
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
149
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
150
|
-
* @param {String} opts.files
|
|
151
|
-
* @param {String} opts.fleetUID
|
|
152
|
-
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
153
|
-
* @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
|
|
154
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEventsByCursor200Response} and HTTP response
|
|
155
|
-
*/
|
|
156
|
-
}, {
|
|
157
|
-
key: "getEventsByCursorWithHttpInfo",
|
|
158
|
-
value: function getEventsByCursorWithHttpInfo(projectOrProductUID, opts) {
|
|
159
|
-
opts = opts || {};
|
|
160
|
-
var postBody = null;
|
|
161
|
-
// verify the required parameter 'projectOrProductUID' is set
|
|
162
|
-
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
163
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getEventsByCursor");
|
|
164
|
-
}
|
|
165
|
-
var pathParams = {
|
|
166
|
-
projectOrProductUID: projectOrProductUID
|
|
167
|
-
};
|
|
168
|
-
var queryParams = {
|
|
169
|
-
limit: opts["limit"],
|
|
170
|
-
cursor: opts["cursor"],
|
|
171
|
-
sortOrder: opts["sortOrder"],
|
|
172
|
-
systemFilesOnly: opts["systemFilesOnly"],
|
|
173
|
-
files: opts["files"],
|
|
174
|
-
fleetUID: opts["fleetUID"],
|
|
175
|
-
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
176
|
-
sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi")
|
|
177
|
-
};
|
|
178
|
-
var headerParams = {};
|
|
179
|
-
var formParams = {};
|
|
180
|
-
var authNames = ["personalAccessToken"];
|
|
181
|
-
var contentTypes = [];
|
|
182
|
-
var accepts = ["application/json"];
|
|
183
|
-
var returnType = _GetEventsByCursor200Response["default"];
|
|
184
|
-
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/events-cursor", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Get Events of a Project by cursor
|
|
189
|
-
* @param {String} projectOrProductUID
|
|
190
|
-
* @param {Object} opts Optional parameters
|
|
191
|
-
* @param {Number} opts.limit (default to 50)
|
|
192
|
-
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
193
|
-
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
194
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
195
|
-
* @param {String} opts.files
|
|
196
|
-
* @param {String} opts.fleetUID
|
|
197
|
-
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
198
|
-
* @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
|
|
199
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEventsByCursor200Response}
|
|
200
|
-
*/
|
|
201
|
-
}, {
|
|
202
|
-
key: "getEventsByCursor",
|
|
203
|
-
value: function getEventsByCursor(projectOrProductUID, opts) {
|
|
204
|
-
return this.getEventsByCursorWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
|
|
205
|
-
return response_and_data.data;
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Get Events of a Fleet
|
|
147
|
+
* List events in a fleet
|
|
148
|
+
* List the events from one fleet, with the same filters, `cursor` and CSV output as `GetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
|
|
211
149
|
* @param {String} projectOrProductUID
|
|
212
150
|
* @param {String} fleetUID
|
|
213
151
|
* @param {Object} opts Optional parameters
|
|
214
|
-
* @param {Number} opts.pageSize (default to
|
|
152
|
+
* @param {Number} opts.pageSize (default to 1000)
|
|
215
153
|
* @param {Number} opts.pageNum (default to 1)
|
|
216
|
-
* @param {
|
|
217
|
-
* @param {Array.<String>} opts.
|
|
154
|
+
* @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
|
|
155
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
156
|
+
* @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
|
|
218
157
|
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
219
158
|
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
220
159
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
221
160
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
222
|
-
* @param {module:model/String} opts.dateType Which
|
|
223
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
224
|
-
* @param {String} opts.files
|
|
225
|
-
* @param {module:model/String} opts.format Response format
|
|
226
|
-
* @param {Array.<String>} opts.serialNumber
|
|
227
|
-
* @param {Array.<String>} opts.sessionUID
|
|
228
|
-
* @param {Array.<String>} opts.eventUID
|
|
229
|
-
* @param {String} opts.selectFields Comma-separated
|
|
161
|
+
* @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
|
|
162
|
+
* @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
|
|
163
|
+
* @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
|
|
164
|
+
* @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
|
|
165
|
+
* @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
|
|
166
|
+
* @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
|
|
167
|
+
* @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
|
|
168
|
+
* @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
|
|
230
169
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEvents200Response} and HTTP response
|
|
231
170
|
*/
|
|
232
171
|
}, {
|
|
@@ -249,6 +188,7 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
249
188
|
var queryParams = {
|
|
250
189
|
pageSize: opts["pageSize"],
|
|
251
190
|
pageNum: opts["pageNum"],
|
|
191
|
+
cursor: opts["cursor"],
|
|
252
192
|
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
253
193
|
sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi"),
|
|
254
194
|
sortBy: opts["sortBy"],
|
|
@@ -274,26 +214,28 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
274
214
|
}
|
|
275
215
|
|
|
276
216
|
/**
|
|
277
|
-
*
|
|
217
|
+
* List events in a fleet
|
|
218
|
+
* List the events from one fleet, with the same filters, `cursor` and CSV output as `GetEvents`. Paginated. Returns 403 if the organization is suspended, and 500 if the query times out; narrow the filters and retry.
|
|
278
219
|
* @param {String} projectOrProductUID
|
|
279
220
|
* @param {String} fleetUID
|
|
280
221
|
* @param {Object} opts Optional parameters
|
|
281
|
-
* @param {Number} opts.pageSize (default to
|
|
222
|
+
* @param {Number} opts.pageSize (default to 1000)
|
|
282
223
|
* @param {Number} opts.pageNum (default to 1)
|
|
283
|
-
* @param {
|
|
284
|
-
* @param {Array.<String>} opts.
|
|
224
|
+
* @param {String} opts.cursor If supplied, results are returned in ascending order of modification time. A cursor is a timestamp: Unix epoch microseconds (UTC), optionally followed by `.N`. To start at a time, pass the bare microsecond value (inclusive; e.g. now minus 30 days); 0 starts from the beginning. To resume, pass next_cursor (or X-Next-Cursor) back unchanged; `.N` is the serial of the last row read at that microsecond, so nothing repeats or is skipped.
|
|
225
|
+
* @param {Array.<String>} opts.deviceUID A DeviceUID.
|
|
226
|
+
* @param {Array.<String>} opts.sensorUID SensorUID to filter by, matched exactly. Repeat for more than one.
|
|
285
227
|
* @param {module:model/String} opts.sortBy (default to 'captured')
|
|
286
228
|
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
287
229
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
288
230
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
289
|
-
* @param {module:model/String} opts.dateType Which
|
|
290
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
291
|
-
* @param {String} opts.files
|
|
292
|
-
* @param {module:model/String} opts.format Response format
|
|
293
|
-
* @param {Array.<String>} opts.serialNumber
|
|
294
|
-
* @param {Array.<String>} opts.sessionUID
|
|
295
|
-
* @param {Array.<String>} opts.eventUID
|
|
296
|
-
* @param {String} opts.selectFields Comma-separated
|
|
231
|
+
* @param {module:model/String} opts.dateType Which time `startDate` and `endDate` filter on. - `captured`: when the Notecard created the event - `uploaded`: when Notehub received it (default to 'captured')
|
|
232
|
+
* @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
|
|
233
|
+
* @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
|
|
234
|
+
* @param {module:model/String} opts.format Response format. - `json`: a JSON object with `events` - `csv`: CSV, with the columns in `selectFields` (default to 'json')
|
|
235
|
+
* @param {Array.<String>} opts.serialNumber Serial number to filter by. Repeat for more than one.
|
|
236
|
+
* @param {Array.<String>} opts.sessionUID SessionUID to filter by. Repeat for more than one.
|
|
237
|
+
* @param {Array.<String>} opts.eventUID EventUID to filter by. Repeat for more than one.
|
|
238
|
+
* @param {String} opts.selectFields Comma-separated event fields to return, e.g. `device,when,body.temp`. Also sets the CSV columns.
|
|
297
239
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEvents200Response}
|
|
298
240
|
*/
|
|
299
241
|
}, {
|
|
@@ -305,86 +247,10 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
305
247
|
}
|
|
306
248
|
|
|
307
249
|
/**
|
|
308
|
-
* Get
|
|
309
|
-
*
|
|
310
|
-
* @param {String} fleetUID
|
|
311
|
-
* @param {Object} opts Optional parameters
|
|
312
|
-
* @param {Number} opts.limit (default to 50)
|
|
313
|
-
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
314
|
-
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
315
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
316
|
-
* @param {String} opts.files
|
|
317
|
-
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
318
|
-
* @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
|
|
319
|
-
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
320
|
-
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
321
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEventsByCursor200Response} and HTTP response
|
|
322
|
-
*/
|
|
323
|
-
}, {
|
|
324
|
-
key: "getFleetEventsByCursorWithHttpInfo",
|
|
325
|
-
value: function getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts) {
|
|
326
|
-
opts = opts || {};
|
|
327
|
-
var postBody = null;
|
|
328
|
-
// verify the required parameter 'projectOrProductUID' is set
|
|
329
|
-
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
330
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getFleetEventsByCursor");
|
|
331
|
-
}
|
|
332
|
-
// verify the required parameter 'fleetUID' is set
|
|
333
|
-
if (fleetUID === undefined || fleetUID === null) {
|
|
334
|
-
throw new _Error["default"]("Missing the required parameter 'fleetUID' when calling getFleetEventsByCursor");
|
|
335
|
-
}
|
|
336
|
-
var pathParams = {
|
|
337
|
-
projectOrProductUID: projectOrProductUID,
|
|
338
|
-
fleetUID: fleetUID
|
|
339
|
-
};
|
|
340
|
-
var queryParams = {
|
|
341
|
-
limit: opts["limit"],
|
|
342
|
-
cursor: opts["cursor"],
|
|
343
|
-
sortOrder: opts["sortOrder"],
|
|
344
|
-
systemFilesOnly: opts["systemFilesOnly"],
|
|
345
|
-
files: opts["files"],
|
|
346
|
-
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
347
|
-
sensorUID: this.apiClient.buildCollectionParam(opts["sensorUID"], "multi"),
|
|
348
|
-
startDate: opts["startDate"],
|
|
349
|
-
endDate: opts["endDate"]
|
|
350
|
-
};
|
|
351
|
-
var headerParams = {};
|
|
352
|
-
var formParams = {};
|
|
353
|
-
var authNames = ["personalAccessToken"];
|
|
354
|
-
var contentTypes = [];
|
|
355
|
-
var accepts = ["application/json"];
|
|
356
|
-
var returnType = _GetEventsByCursor200Response["default"];
|
|
357
|
-
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Get Events of a Fleet by cursor
|
|
362
|
-
* @param {String} projectOrProductUID
|
|
363
|
-
* @param {String} fleetUID
|
|
364
|
-
* @param {Object} opts Optional parameters
|
|
365
|
-
* @param {Number} opts.limit (default to 50)
|
|
366
|
-
* @param {String} opts.cursor A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
|
|
367
|
-
* @param {module:model/String} opts.sortOrder (default to 'asc')
|
|
368
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
369
|
-
* @param {String} opts.files
|
|
370
|
-
* @param {Array.<String>} opts.deviceUID A Device UID.
|
|
371
|
-
* @param {Array.<String>} opts.sensorUID A sensor UID to filter events by, matched exactly against the event sensor field. The value may carry any prefix.
|
|
372
|
-
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
373
|
-
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
374
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEventsByCursor200Response}
|
|
375
|
-
*/
|
|
376
|
-
}, {
|
|
377
|
-
key: "getFleetEventsByCursor",
|
|
378
|
-
value: function getFleetEventsByCursor(projectOrProductUID, fleetUID, opts) {
|
|
379
|
-
return this.getFleetEventsByCursorWithHttpInfo(projectOrProductUID, fleetUID, opts).then(function (response_and_data) {
|
|
380
|
-
return response_and_data.data;
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Get Route Logs by Event UID
|
|
250
|
+
* Get an event's route logs
|
|
251
|
+
* Get the log of every attempt to send one event to each route, with the response status, body and duration. For a route's logs across events, use `GetRouteLogsByRoute`. Returns 404 if the event doesn't exist.
|
|
386
252
|
* @param {String} projectOrProductUID
|
|
387
|
-
* @param {String} eventUID
|
|
253
|
+
* @param {String} eventUID EventUID, e.g. `4506f411-dea6-44a0-9743-1130f57d7747`.
|
|
388
254
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/RouteLog>} and HTTP response
|
|
389
255
|
*/
|
|
390
256
|
}, {
|
|
@@ -414,9 +280,10 @@ var EventApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
414
280
|
}
|
|
415
281
|
|
|
416
282
|
/**
|
|
417
|
-
* Get
|
|
283
|
+
* Get an event's route logs
|
|
284
|
+
* Get the log of every attempt to send one event to each route, with the response status, body and duration. For a route's logs across events, use `GetRouteLogsByRoute`. Returns 404 if the event doesn't exist.
|
|
418
285
|
* @param {String} projectOrProductUID
|
|
419
|
-
* @param {String} eventUID
|
|
286
|
+
* @param {String} eventUID EventUID, e.g. `4506f411-dea6-44a0-9743-1130f57d7747`.
|
|
420
287
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/RouteLog>}
|
|
421
288
|
*/
|
|
422
289
|
}, {
|
|
@@ -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
|
* ExternalDevices service.
|
|
31
31
|
* @module api/ExternalDevicesApi
|
|
32
|
-
* @version
|
|
32
|
+
* @version 7.0.0-beta.2
|
|
33
33
|
*/
|
|
34
34
|
var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -45,10 +45,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Add an event from an external device
|
|
49
|
+
* Add an event from a device that isn't a Notecard, adding the device to the project if it's new. The DeviceUID is lower-cased and gets `dev:ext:` unless it has its own sub-prefix, so `dev:123` becomes `dev:ext:123`. Notehub sets `when` to the current time and adds `.qo` to a `file` with no extension. Requires the Owner or Developer role.
|
|
49
50
|
* @param {String} productUID
|
|
50
51
|
* @param {String} deviceUID
|
|
51
|
-
* @param {module:model/Event} event
|
|
52
|
+
* @param {module:model/Event} event The event. `file`, `body` and `payload` are the usual fields.
|
|
52
53
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
53
54
|
*/
|
|
54
55
|
return _createClass(ExternalDevicesApi, [{
|
|
@@ -82,10 +83,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
/**
|
|
85
|
-
*
|
|
86
|
+
* Add an event from an external device
|
|
87
|
+
* Add an event from a device that isn't a Notecard, adding the device to the project if it's new. The DeviceUID is lower-cased and gets `dev:ext:` unless it has its own sub-prefix, so `dev:123` becomes `dev:ext:123`. Notehub sets `when` to the current time and adds `.qo` to a `file` with no extension. Requires the Owner or Developer role.
|
|
86
88
|
* @param {String} productUID
|
|
87
89
|
* @param {String} deviceUID
|
|
88
|
-
* @param {module:model/Event} event
|
|
90
|
+
* @param {module:model/Event} event The event. `file`, `body` and `payload` are the usual fields.
|
|
89
91
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
90
92
|
*/
|
|
91
93
|
}, {
|
|
@@ -97,10 +99,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
/**
|
|
100
|
-
*
|
|
102
|
+
* Close an external device's session
|
|
103
|
+
* Close an external device's session, if one is open, adding the device if it's new. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role.
|
|
101
104
|
* @param {String} productUID
|
|
102
105
|
* @param {String} deviceUID
|
|
103
|
-
* @param {module:model/DeviceSession} deviceSession Session
|
|
106
|
+
* @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
|
|
104
107
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
105
108
|
*/
|
|
106
109
|
}, {
|
|
@@ -134,10 +137,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
/**
|
|
137
|
-
*
|
|
140
|
+
* Close an external device's session
|
|
141
|
+
* Close an external device's session, if one is open, adding the device if it's new. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role.
|
|
138
142
|
* @param {String} productUID
|
|
139
143
|
* @param {String} deviceUID
|
|
140
|
-
* @param {module:model/DeviceSession} deviceSession Session
|
|
144
|
+
* @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
|
|
141
145
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
142
146
|
*/
|
|
143
147
|
}, {
|
|
@@ -149,10 +153,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
/**
|
|
152
|
-
*
|
|
156
|
+
* Open an external device's session
|
|
157
|
+
* Open a session for an external device, adding the device if it's new. An open session is closed first, with `why_session_closed` as the reason. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role. Returns 500 if webhooks are disabled for the project.
|
|
153
158
|
* @param {String} productUID
|
|
154
159
|
* @param {String} deviceUID
|
|
155
|
-
* @param {module:model/DeviceSession} deviceSession Session
|
|
160
|
+
* @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
|
|
156
161
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
157
162
|
*/
|
|
158
163
|
}, {
|
|
@@ -186,10 +191,11 @@ var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
186
191
|
}
|
|
187
192
|
|
|
188
193
|
/**
|
|
189
|
-
*
|
|
194
|
+
* Open an external device's session
|
|
195
|
+
* Open a session for an external device, adding the device if it's new. An open session is closed first, with `why_session_closed` as the reason. The DeviceUID gets `dev:ext:` as in `CreateEventExtDevice`. Requires the Owner or Developer role. Returns 500 if webhooks are disabled for the project.
|
|
190
196
|
* @param {String} productUID
|
|
191
197
|
* @param {String} deviceUID
|
|
192
|
-
* @param {module:model/DeviceSession} deviceSession Session
|
|
198
|
+
* @param {module:model/DeviceSession} deviceSession Session fields, such as `why_session_opened` or `why_session_closed`.
|
|
193
199
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
194
200
|
*/
|
|
195
201
|
}, {
|