@blues-inc/notehub-js 6.7.0 → 7.0.0-beta.1
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 +156 -152
- package/dist/ApiClient.js +3 -3
- package/dist/api/AlertApi.js +17 -12
- package/dist/api/AuthorizationApi.js +12 -51
- package/dist/api/DescriptionApi.js +58 -42
- package/dist/api/DeviceApi.js +434 -291
- package/dist/api/EventApi.js +88 -221
- package/dist/api/ExternalDevicesApi.js +32 -26
- package/dist/api/JobsApi.js +76 -58
- package/dist/api/MonitorApi.js +38 -28
- package/dist/api/OrganizationApi.js +26 -20
- package/dist/api/ProjectApi.js +424 -330
- package/dist/api/RouteApi.js +69 -54
- package/dist/api/SkillsApi.js +279 -0
- package/dist/api/UsageApi.js +84 -74
- package/dist/api/WebhookApi.js +96 -74
- 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 +17 -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 +15 -3
- package/dist/model/AzureRoute.js +9 -2
- package/dist/model/BatchJobNoteRequest.js +2 -2
- package/dist/model/BatchJobRequests.js +7 -6
- package/dist/model/BillingAccount.js +6 -4
- package/dist/model/BillingAccountRole.js +1 -1
- package/dist/model/BlynkRoute.js +7 -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 +6 -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 +3 -2
- package/dist/model/DataField.js +2 -2
- package/dist/model/DataSet.js +6 -5
- package/dist/model/DataSetField.js +3 -3
- package/dist/model/DataUsage.js +2 -2
- package/dist/model/DatacakeRoute.js +8 -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 +4 -3
- 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 +17 -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 +17 -2
- package/dist/model/DeviceSensor.js +2 -2
- package/dist/model/DeviceSession.js +38 -6
- package/dist/model/DeviceTowerInfo.js +7 -2
- package/dist/model/DeviceUsage.js +8 -2
- package/dist/model/DfuActionRequest.js +3 -3
- package/dist/model/EmailNotification.js +30 -7
- package/dist/model/EnvTreeJsonNode.js +18 -7
- package/dist/model/EnvVar.js +6 -2
- package/dist/model/EnvironmentVariables.js +4 -3
- package/dist/model/Error.js +5 -2
- package/dist/model/Event.js +17 -8
- package/dist/model/Filter.js +6 -6
- 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 +4 -3
- 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 +7 -2
- package/dist/model/HealthLog.js +8 -5
- package/dist/model/HttpRoute.js +8 -3
- package/dist/model/Job.js +2 -2
- package/dist/model/JobDefinition.js +3 -3
- package/dist/model/JobDefinitionReportOptions.js +3 -2
- package/dist/model/JobDefinitionSelect.js +5 -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 +15 -2
- package/dist/model/Note.js +3 -3
- package/dist/model/NoteInput.js +2 -2
- package/dist/model/Notefile.js +5 -3
- 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 +7 -2
- package/dist/model/QubitroRoute.js +8 -2
- package/dist/model/RadRoute.js +10 -2
- package/dist/model/Repository.js +4 -4
- package/dist/model/RepositoryListResponse.js +4 -3
- 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 +6 -6
- package/dist/model/RunJob200Response.js +2 -2
- package/dist/model/S3ArchiveRoute.js +17 -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 +210 -0
- package/dist/model/{GetBillingAccounts200Response.js → SkillLinks.js} +60 -41
- package/dist/model/SkillSet.js +185 -0
- package/dist/model/SkillSummary.js +208 -0
- package/dist/model/SkillWrite.js +128 -0
- package/dist/model/{GetEventsByCursor200Response.js → SkillWriteResult.js} +62 -65
- package/dist/model/SlackBearerNotification.js +32 -9
- package/dist/model/SlackRoute.js +10 -2
- package/dist/model/SlackWebHookNotification.js +32 -9
- package/dist/model/SnowflakeRoute.js +10 -2
- package/dist/model/SnowpipeStreamingRoute.js +13 -2
- package/dist/model/ThingworxRoute.js +7 -2
- package/dist/model/TowerLocation.js +2 -2
- package/dist/model/TwilioNotification.js +167 -0
- package/dist/model/TwilioRoute.js +10 -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 +4 -3
- package/dist/model/UsageData.js +8 -4
- package/dist/model/UsageEventsData.js +6 -3
- package/dist/model/UsageEventsResponse.js +5 -4
- package/dist/model/UsageRouteLogsData.js +11 -7
- package/dist/model/UsageSessionsData.js +12 -6
- 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/RouteApi.js
CHANGED
|
@@ -15,7 +15,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
|
|
|
15
15
|
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
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
-
function _toPrimitive(t,
|
|
18
|
+
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
19
|
* Notehub API
|
|
20
20
|
* The OpenAPI definition for the Notehub.io API.
|
|
21
21
|
*
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* Route service.
|
|
32
32
|
* @module api/RouteApi
|
|
33
|
-
* @version
|
|
33
|
+
* @version 7.0.0-beta.1
|
|
34
34
|
*/
|
|
35
35
|
var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -46,8 +46,9 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* Create
|
|
50
|
-
*
|
|
49
|
+
* Create a route
|
|
50
|
+
* Create a route that sends a project's events to a destination such as a URL, an MQTT broker or a cloud service. Set `type` and fill in the object it names. Omit `fleets` to send every fleet's events. Unknown FleetUIDs are ignored, so `fleets: []` or a list of only unknown UIDs gives a route that sends nothing. Requires the Owner or Developer role. Returns 400 for invalid settings.
|
|
51
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
51
52
|
* @param {module:model/NotehubRoute} notehubRoute Route to be created
|
|
52
53
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NotehubRoute} and HTTP response
|
|
53
54
|
*/
|
|
@@ -77,8 +78,9 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
/**
|
|
80
|
-
* Create
|
|
81
|
-
*
|
|
81
|
+
* Create a route
|
|
82
|
+
* Create a route that sends a project's events to a destination such as a URL, an MQTT broker or a cloud service. Set `type` and fill in the object it names. Omit `fleets` to send every fleet's events. Unknown FleetUIDs are ignored, so `fleets: []` or a list of only unknown UIDs gives a route that sends nothing. Requires the Owner or Developer role. Returns 400 for invalid settings.
|
|
83
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
82
84
|
* @param {module:model/NotehubRoute} notehubRoute Route to be created
|
|
83
85
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NotehubRoute}
|
|
84
86
|
*/
|
|
@@ -91,9 +93,10 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
/**
|
|
94
|
-
* Delete
|
|
95
|
-
*
|
|
96
|
-
* @param {String}
|
|
96
|
+
* Delete a route
|
|
97
|
+
* Delete a route so it stops sending events. Requires the Owner or Developer role.
|
|
98
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
99
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
97
100
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
98
101
|
*/
|
|
99
102
|
}, {
|
|
@@ -123,9 +126,10 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
/**
|
|
126
|
-
* Delete
|
|
127
|
-
*
|
|
128
|
-
* @param {String}
|
|
129
|
+
* Delete a route
|
|
130
|
+
* Delete a route so it stops sending events. Requires the Owner or Developer role.
|
|
131
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
132
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
129
133
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
130
134
|
*/
|
|
131
135
|
}, {
|
|
@@ -137,9 +141,10 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
137
141
|
}
|
|
138
142
|
|
|
139
143
|
/**
|
|
140
|
-
* Get
|
|
141
|
-
*
|
|
142
|
-
* @param {String}
|
|
144
|
+
* Get a route
|
|
145
|
+
* Get one route's full settings: destination, filter, transform and fleets. Secrets such as passwords and keys come back as `(omitted)`. Requires the Owner or Developer role. Viewers can use `GetRoutes`. Returns 404 if the route doesn't exist.
|
|
146
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
147
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
143
148
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NotehubRoute} and HTTP response
|
|
144
149
|
*/
|
|
145
150
|
}, {
|
|
@@ -169,9 +174,10 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
/**
|
|
172
|
-
* Get
|
|
173
|
-
*
|
|
174
|
-
* @param {String}
|
|
177
|
+
* Get a route
|
|
178
|
+
* Get one route's full settings: destination, filter, transform and fleets. Secrets such as passwords and keys come back as `(omitted)`. Requires the Owner or Developer role. Viewers can use `GetRoutes`. Returns 404 if the route doesn't exist.
|
|
179
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
180
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
175
181
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NotehubRoute}
|
|
176
182
|
*/
|
|
177
183
|
}, {
|
|
@@ -183,22 +189,24 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
183
189
|
}
|
|
184
190
|
|
|
185
191
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* @param {String}
|
|
192
|
+
* List a route's logs
|
|
193
|
+
* List a route's attempts to send events, newest first, with each one's event, response status, body and duration. Filter by device, notefile, date, success or HTTP status. For one event, use `GetRouteLogsByEvent`. Paginated. Returns 404 if the route doesn't exist.
|
|
194
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
195
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
189
196
|
* @param {Object} opts Optional parameters
|
|
190
|
-
* @param {Number} opts.pageSize
|
|
191
|
-
* @param {Number} opts.pageNum
|
|
192
|
-
* @param {
|
|
193
|
-
* @param {
|
|
194
|
-
* @param {module:model/String} opts.
|
|
197
|
+
* @param {Number} opts.pageSize How many results to return per page. (default to 1000)
|
|
198
|
+
* @param {Number} opts.pageNum Page number, starting at 1. Can't be combined with `cursor`. (default to 1)
|
|
199
|
+
* @param {String} opts.cursor Read in ascending modification order. Start with `0` for the beginning, or a Unix time in microseconds (inclusive), e.g. now minus 30 days. To resume, pass back `next_cursor` or `X-Next-Cursor` unchanged; its `.N` suffix ensures no row repeats or is skipped.
|
|
200
|
+
* @param {Array.<String>} opts.deviceUID DeviceUIDs to filter by. Device and DFU calls match substrings, any case.
|
|
201
|
+
* @param {module:model/String} opts.sortBy Field to sort by. - `date`: when the attempt was made - `event`: the order the events arrived in, then the attempt time (default to 'date')
|
|
202
|
+
* @param {module:model/String} opts.sortOrder Sort direction. - `asc`: oldest first - `desc`: newest first (default to 'desc')
|
|
195
203
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
196
204
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
197
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
198
|
-
* @param {Boolean} opts.mostRecentOnly
|
|
199
|
-
* @param {String} opts.files
|
|
200
|
-
* @param {Array.<module:model/String>} opts.routingStatus
|
|
201
|
-
* @param {Array.<String>} opts.responseStatus
|
|
205
|
+
* @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
|
|
206
|
+
* @param {Boolean} opts.mostRecentOnly If true, return only the latest attempt for each event.
|
|
207
|
+
* @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
|
|
208
|
+
* @param {Array.<module:model/String>} opts.routingStatus Return only attempts with this outcome. - `success`: the destination accepted the event - `failure`: the attempt failed
|
|
209
|
+
* @param {Array.<String>} opts.responseStatus Response status codes to include, e.g. `500`.
|
|
202
210
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/RouteLog>} and HTTP response
|
|
203
211
|
*/
|
|
204
212
|
}, {
|
|
@@ -221,6 +229,7 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
221
229
|
var queryParams = {
|
|
222
230
|
pageSize: opts["pageSize"],
|
|
223
231
|
pageNum: opts["pageNum"],
|
|
232
|
+
cursor: opts["cursor"],
|
|
224
233
|
deviceUID: this.apiClient.buildCollectionParam(opts["deviceUID"], "multi"),
|
|
225
234
|
sortBy: opts["sortBy"],
|
|
226
235
|
sortOrder: opts["sortOrder"],
|
|
@@ -242,22 +251,24 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
242
251
|
}
|
|
243
252
|
|
|
244
253
|
/**
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
* @param {String}
|
|
254
|
+
* List a route's logs
|
|
255
|
+
* List a route's attempts to send events, newest first, with each one's event, response status, body and duration. Filter by device, notefile, date, success or HTTP status. For one event, use `GetRouteLogsByEvent`. Paginated. Returns 404 if the route doesn't exist.
|
|
256
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
257
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
248
258
|
* @param {Object} opts Optional parameters
|
|
249
|
-
* @param {Number} opts.pageSize
|
|
250
|
-
* @param {Number} opts.pageNum
|
|
251
|
-
* @param {
|
|
252
|
-
* @param {
|
|
253
|
-
* @param {module:model/String} opts.
|
|
259
|
+
* @param {Number} opts.pageSize How many results to return per page. (default to 1000)
|
|
260
|
+
* @param {Number} opts.pageNum Page number, starting at 1. Can't be combined with `cursor`. (default to 1)
|
|
261
|
+
* @param {String} opts.cursor Read in ascending modification order. Start with `0` for the beginning, or a Unix time in microseconds (inclusive), e.g. now minus 30 days. To resume, pass back `next_cursor` or `X-Next-Cursor` unchanged; its `.N` suffix ensures no row repeats or is skipped.
|
|
262
|
+
* @param {Array.<String>} opts.deviceUID DeviceUIDs to filter by. Device and DFU calls match substrings, any case.
|
|
263
|
+
* @param {module:model/String} opts.sortBy Field to sort by. - `date`: when the attempt was made - `event`: the order the events arrived in, then the attempt time (default to 'date')
|
|
264
|
+
* @param {module:model/String} opts.sortOrder Sort direction. - `asc`: oldest first - `desc`: newest first (default to 'desc')
|
|
254
265
|
* @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
|
|
255
266
|
* @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
|
|
256
|
-
* @param {Boolean} opts.systemFilesOnly
|
|
257
|
-
* @param {Boolean} opts.mostRecentOnly
|
|
258
|
-
* @param {String} opts.files
|
|
259
|
-
* @param {Array.<module:model/String>} opts.routingStatus
|
|
260
|
-
* @param {Array.<String>} opts.responseStatus
|
|
267
|
+
* @param {Boolean} opts.systemFilesOnly If true, return only events from system notefiles, such as `_session.qo` and `_health.qo`.
|
|
268
|
+
* @param {Boolean} opts.mostRecentOnly If true, return only the latest attempt for each event.
|
|
269
|
+
* @param {String} opts.files Comma-separated notefiles, e.g. `data.qo,_health.qo`. Don't combine with `systemFilesOnly`.
|
|
270
|
+
* @param {Array.<module:model/String>} opts.routingStatus Return only attempts with this outcome. - `success`: the destination accepted the event - `failure`: the attempt failed
|
|
271
|
+
* @param {Array.<String>} opts.responseStatus Response status codes to include, e.g. `500`.
|
|
261
272
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/RouteLog>}
|
|
262
273
|
*/
|
|
263
274
|
}, {
|
|
@@ -269,8 +280,9 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
269
280
|
}
|
|
270
281
|
|
|
271
282
|
/**
|
|
272
|
-
*
|
|
273
|
-
*
|
|
283
|
+
* List routes
|
|
284
|
+
* List a project's routes with their type and label and whether they're disabled, without their settings. For a route's settings, use `GetRoute`.
|
|
285
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
274
286
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/NotehubRouteSummary>} and HTTP response
|
|
275
287
|
*/
|
|
276
288
|
}, {
|
|
@@ -295,8 +307,9 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
295
307
|
}
|
|
296
308
|
|
|
297
309
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
310
|
+
* List routes
|
|
311
|
+
* List a project's routes with their type and label and whether they're disabled, without their settings. For a route's settings, use `GetRoute`.
|
|
312
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
300
313
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/NotehubRouteSummary>}
|
|
301
314
|
*/
|
|
302
315
|
}, {
|
|
@@ -308,9 +321,10 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
308
321
|
}
|
|
309
322
|
|
|
310
323
|
/**
|
|
311
|
-
* Update route
|
|
312
|
-
*
|
|
313
|
-
* @param {String}
|
|
324
|
+
* Update a route
|
|
325
|
+
* Replace a route's settings with what `GetRoute` returns, with the fields you send merged over it. `false`, `0`, `\"\"` and `[]` are ignored, so this can't re-enable a route or clear a value or list; but leaving out `notes` clears it. A secret sent back as `(omitted)` is kept, except Slack's. Every update resets settings the API doesn't show: auto-retry, denied fleets, Basic auth credentials, proxy caching, and the transform on Slack and S3 routes. A route sending from no fleets starts sending from all of them unless you send a non-empty `fleets`. Requires the Owner or Developer role. Returns 404 if the route doesn't exist, and 400 for invalid settings.
|
|
326
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
327
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
314
328
|
* @param {module:model/NotehubRoute} notehubRoute Route settings to be updated
|
|
315
329
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NotehubRoute} and HTTP response
|
|
316
330
|
*/
|
|
@@ -345,9 +359,10 @@ var RouteApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
345
359
|
}
|
|
346
360
|
|
|
347
361
|
/**
|
|
348
|
-
* Update route
|
|
349
|
-
*
|
|
350
|
-
* @param {String}
|
|
362
|
+
* Update a route
|
|
363
|
+
* Replace a route's settings with what `GetRoute` returns, with the fields you send merged over it. `false`, `0`, `\"\"` and `[]` are ignored, so this can't re-enable a route or clear a value or list; but leaving out `notes` clears it. A secret sent back as `(omitted)` is kept, except Slack's. Every update resets settings the API doesn't show: auto-retry, denied fleets, Basic auth credentials, proxy caching, and the transform on Slack and S3 routes. A route sending from no fleets starts sending from all of them unless you send a non-empty `fleets`. Requires the Owner or Developer role. Returns 404 if the route doesn't exist, and 400 for invalid settings.
|
|
364
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
365
|
+
* @param {String} routeUID RouteUID, e.g. `route:cbd20093cba58392c9f9bbdd0cdeb1a0`. List with `GetRoutes`.
|
|
351
366
|
* @param {module:model/NotehubRoute} notehubRoute Route settings to be updated
|
|
352
367
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NotehubRoute}
|
|
353
368
|
*/
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Error = _interopRequireDefault(require("../model/Error"));
|
|
9
|
+
var _Skill = _interopRequireDefault(require("../model/Skill"));
|
|
10
|
+
var _SkillSet = _interopRequireDefault(require("../model/SkillSet"));
|
|
11
|
+
var _SkillWrite = _interopRequireDefault(require("../model/SkillWrite"));
|
|
12
|
+
var _SkillWriteResult = _interopRequireDefault(require("../model/SkillWriteResult"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
* Notehub API
|
|
21
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: 1.2.0
|
|
24
|
+
* Contact: engineering@blues.io
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Skills service.
|
|
33
|
+
* @module api/SkillsApi
|
|
34
|
+
* @version 7.0.0-beta.1
|
|
35
|
+
*/
|
|
36
|
+
var SkillsApi = exports["default"] = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new SkillsApi.
|
|
39
|
+
* @alias module:api/SkillsApi
|
|
40
|
+
* @class
|
|
41
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
42
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
43
|
+
*/
|
|
44
|
+
function SkillsApi(apiClient) {
|
|
45
|
+
_classCallCheck(this, SkillsApi);
|
|
46
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Delete a project skill
|
|
51
|
+
* Delete a skill and all its stored versions. Requires `If-Match` set to the revision from `GetSkill`. Requires the Owner or Developer role. Subprojects must write to their parent project.
|
|
52
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
53
|
+
* @param {String} skillName Relative .md name, case-insensitive, at most 512 UTF-8 bytes. In URLs, encode the whole name once: references/devices.md becomes references%2Fdevices.md; a literal % becomes %25. Pass the unencoded name to SDKs. Spaces, Unicode and punctuation are allowed. No absolute paths, dot segments, empty segments, backslashes, colons, control characters or surrounding segment whitespace.
|
|
54
|
+
* @param {String} ifMatch Required; use one strong ETag or quoted skill revision. Wildcards and weak tags are rejected.
|
|
55
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
56
|
+
*/
|
|
57
|
+
return _createClass(SkillsApi, [{
|
|
58
|
+
key: "deleteSkillWithHttpInfo",
|
|
59
|
+
value: function deleteSkillWithHttpInfo(projectOrProductUID, skillName, ifMatch) {
|
|
60
|
+
var postBody = null;
|
|
61
|
+
// verify the required parameter 'projectOrProductUID' is set
|
|
62
|
+
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
63
|
+
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling deleteSkill");
|
|
64
|
+
}
|
|
65
|
+
// verify the required parameter 'skillName' is set
|
|
66
|
+
if (skillName === undefined || skillName === null) {
|
|
67
|
+
throw new _Error["default"]("Missing the required parameter 'skillName' when calling deleteSkill");
|
|
68
|
+
}
|
|
69
|
+
// verify the required parameter 'ifMatch' is set
|
|
70
|
+
if (ifMatch === undefined || ifMatch === null) {
|
|
71
|
+
throw new _Error["default"]("Missing the required parameter 'ifMatch' when calling deleteSkill");
|
|
72
|
+
}
|
|
73
|
+
var pathParams = {
|
|
74
|
+
projectOrProductUID: projectOrProductUID,
|
|
75
|
+
skillName: skillName
|
|
76
|
+
};
|
|
77
|
+
var queryParams = {};
|
|
78
|
+
var headerParams = {
|
|
79
|
+
"If-Match": ifMatch
|
|
80
|
+
};
|
|
81
|
+
var formParams = {};
|
|
82
|
+
var authNames = ["personalAccessToken"];
|
|
83
|
+
var contentTypes = [];
|
|
84
|
+
var accepts = ["application/json"];
|
|
85
|
+
var returnType = null;
|
|
86
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/skills/{skillName}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Delete a project skill
|
|
91
|
+
* Delete a skill and all its stored versions. Requires `If-Match` set to the revision from `GetSkill`. Requires the Owner or Developer role. Subprojects must write to their parent project.
|
|
92
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
93
|
+
* @param {String} skillName Relative .md name, case-insensitive, at most 512 UTF-8 bytes. In URLs, encode the whole name once: references/devices.md becomes references%2Fdevices.md; a literal % becomes %25. Pass the unencoded name to SDKs. Spaces, Unicode and punctuation are allowed. No absolute paths, dot segments, empty segments, backslashes, colons, control characters or surrounding segment whitespace.
|
|
94
|
+
* @param {String} ifMatch Required; use one strong ETag or quoted skill revision. Wildcards and weak tags are rejected.
|
|
95
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "deleteSkill",
|
|
99
|
+
value: function deleteSkill(projectOrProductUID, skillName, ifMatch) {
|
|
100
|
+
return this.deleteSkillWithHttpInfo(projectOrProductUID, skillName, ifMatch).then(function (response_and_data) {
|
|
101
|
+
return response_and_data.data;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get a project skill
|
|
107
|
+
* Get one skill's metadata and exact Markdown content. Use `links.self` from `GetSkills`, or URL-encode the whole skill name as one path parameter. `If-Match` requires a revision; `If-None-Match` skips unchanged content. Any role can read it, and so can anonymous callers when the project's default access is Viewer.
|
|
108
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
109
|
+
* @param {String} skillName Relative .md name, case-insensitive, at most 512 UTF-8 bytes. In URLs, encode the whole name once: references/devices.md becomes references%2Fdevices.md; a literal % becomes %25. Pass the unencoded name to SDKs. Spaces, Unicode and punctuation are allowed. No absolute paths, dot segments, empty segments, backslashes, colons, control characters or surrounding segment whitespace.
|
|
110
|
+
* @param {Object} opts Optional parameters
|
|
111
|
+
* @param {String} opts.ifMatch Optionally require one strong ETag or quoted skill revision; wildcards and weak tags are rejected.
|
|
112
|
+
* @param {String} opts.ifNoneMatch Return 304 if an ETag for this skill matches, or use * to match any existing skill at this name.
|
|
113
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Skill} and HTTP response
|
|
114
|
+
*/
|
|
115
|
+
}, {
|
|
116
|
+
key: "getSkillWithHttpInfo",
|
|
117
|
+
value: function getSkillWithHttpInfo(projectOrProductUID, skillName, opts) {
|
|
118
|
+
opts = opts || {};
|
|
119
|
+
var postBody = null;
|
|
120
|
+
// verify the required parameter 'projectOrProductUID' is set
|
|
121
|
+
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
122
|
+
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getSkill");
|
|
123
|
+
}
|
|
124
|
+
// verify the required parameter 'skillName' is set
|
|
125
|
+
if (skillName === undefined || skillName === null) {
|
|
126
|
+
throw new _Error["default"]("Missing the required parameter 'skillName' when calling getSkill");
|
|
127
|
+
}
|
|
128
|
+
var pathParams = {
|
|
129
|
+
projectOrProductUID: projectOrProductUID,
|
|
130
|
+
skillName: skillName
|
|
131
|
+
};
|
|
132
|
+
var queryParams = {};
|
|
133
|
+
var headerParams = {
|
|
134
|
+
"If-Match": opts["ifMatch"],
|
|
135
|
+
"If-None-Match": opts["ifNoneMatch"]
|
|
136
|
+
};
|
|
137
|
+
var formParams = {};
|
|
138
|
+
var authNames = ["personalAccessToken"];
|
|
139
|
+
var contentTypes = [];
|
|
140
|
+
var accepts = ["application/json"];
|
|
141
|
+
var returnType = _Skill["default"];
|
|
142
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/skills/{skillName}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get a project skill
|
|
147
|
+
* Get one skill's metadata and exact Markdown content. Use `links.self` from `GetSkills`, or URL-encode the whole skill name as one path parameter. `If-Match` requires a revision; `If-None-Match` skips unchanged content. Any role can read it, and so can anonymous callers when the project's default access is Viewer.
|
|
148
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
149
|
+
* @param {String} skillName Relative .md name, case-insensitive, at most 512 UTF-8 bytes. In URLs, encode the whole name once: references/devices.md becomes references%2Fdevices.md; a literal % becomes %25. Pass the unencoded name to SDKs. Spaces, Unicode and punctuation are allowed. No absolute paths, dot segments, empty segments, backslashes, colons, control characters or surrounding segment whitespace.
|
|
150
|
+
* @param {Object} opts Optional parameters
|
|
151
|
+
* @param {String} opts.ifMatch Optionally require one strong ETag or quoted skill revision; wildcards and weak tags are rejected.
|
|
152
|
+
* @param {String} opts.ifNoneMatch Return 304 if an ETag for this skill matches, or use * to match any existing skill at this name.
|
|
153
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Skill}
|
|
154
|
+
*/
|
|
155
|
+
}, {
|
|
156
|
+
key: "getSkill",
|
|
157
|
+
value: function getSkill(projectOrProductUID, skillName, opts) {
|
|
158
|
+
return this.getSkillWithHttpInfo(projectOrProductUID, skillName, opts).then(function (response_and_data) {
|
|
159
|
+
return response_and_data.data;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* List project skills
|
|
165
|
+
* List a project's skills, the Markdown guides agents read, with metadata only unless `includeContent=true`. Not paginated; a project with none returns `skills: []`. On 413, list metadata and use `GetSkill` for each document. Subprojects read their parent's skills. Any role can read them, and so can anonymous callers when the project's default access is Viewer.
|
|
166
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
167
|
+
* @param {Object} opts Optional parameters
|
|
168
|
+
* @param {Boolean} opts.includeContent Use true to include exact Markdown content. Omit or use false for metadata only. (default to false)
|
|
169
|
+
* @param {String} opts.ifNoneMatch Return 304 if an ETag from GetSkills matches, or use * to match any current representation.
|
|
170
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SkillSet} and HTTP response
|
|
171
|
+
*/
|
|
172
|
+
}, {
|
|
173
|
+
key: "getSkillsWithHttpInfo",
|
|
174
|
+
value: function getSkillsWithHttpInfo(projectOrProductUID, opts) {
|
|
175
|
+
opts = opts || {};
|
|
176
|
+
var postBody = null;
|
|
177
|
+
// verify the required parameter 'projectOrProductUID' is set
|
|
178
|
+
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
179
|
+
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getSkills");
|
|
180
|
+
}
|
|
181
|
+
var pathParams = {
|
|
182
|
+
projectOrProductUID: projectOrProductUID
|
|
183
|
+
};
|
|
184
|
+
var queryParams = {
|
|
185
|
+
includeContent: opts["includeContent"]
|
|
186
|
+
};
|
|
187
|
+
var headerParams = {
|
|
188
|
+
"If-None-Match": opts["ifNoneMatch"]
|
|
189
|
+
};
|
|
190
|
+
var formParams = {};
|
|
191
|
+
var authNames = ["personalAccessToken"];
|
|
192
|
+
var contentTypes = [];
|
|
193
|
+
var accepts = ["application/json"];
|
|
194
|
+
var returnType = _SkillSet["default"];
|
|
195
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/skills", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* List project skills
|
|
200
|
+
* List a project's skills, the Markdown guides agents read, with metadata only unless `includeContent=true`. Not paginated; a project with none returns `skills: []`. On 413, list metadata and use `GetSkill` for each document. Subprojects read their parent's skills. Any role can read them, and so can anonymous callers when the project's default access is Viewer.
|
|
201
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
202
|
+
* @param {Object} opts Optional parameters
|
|
203
|
+
* @param {Boolean} opts.includeContent Use true to include exact Markdown content. Omit or use false for metadata only. (default to false)
|
|
204
|
+
* @param {String} opts.ifNoneMatch Return 304 if an ETag from GetSkills matches, or use * to match any current representation.
|
|
205
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SkillSet}
|
|
206
|
+
*/
|
|
207
|
+
}, {
|
|
208
|
+
key: "getSkills",
|
|
209
|
+
value: function getSkills(projectOrProductUID, opts) {
|
|
210
|
+
return this.getSkillsWithHttpInfo(projectOrProductUID, opts).then(function (response_and_data) {
|
|
211
|
+
return response_and_data.data;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Create or replace a project skill
|
|
217
|
+
* Create a skill with `If-None-Match: *`, or replace it with `If-Match` set to the revision from `GetSkill`. Send `content` and optional `kinds`; omit `kinds` to keep them, or send `[]` to clear them. An identical write returns unchanged. Requires the Owner or Developer role. Subprojects must write to their parent project.
|
|
218
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
219
|
+
* @param {String} skillName Relative .md name, case-insensitive, at most 512 UTF-8 bytes. In URLs, encode the whole name once: references/devices.md becomes references%2Fdevices.md; a literal % becomes %25. Pass the unencoded name to SDKs. Spaces, Unicode and punctuation are allowed. No absolute paths, dot segments, empty segments, backslashes, colons, control characters or surrounding segment whitespace.
|
|
220
|
+
* @param {module:model/SkillWrite} skillWrite
|
|
221
|
+
* @param {Object} opts Optional parameters
|
|
222
|
+
* @param {String} opts.ifMatch Required for replacement; use one strong ETag or quoted skill revision. Wildcards and weak tags are rejected.
|
|
223
|
+
* @param {String} opts.ifNoneMatch Use * to create only if the name is absent; cannot be combined with If-Match.
|
|
224
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SkillWriteResult} and HTTP response
|
|
225
|
+
*/
|
|
226
|
+
}, {
|
|
227
|
+
key: "putSkillWithHttpInfo",
|
|
228
|
+
value: function putSkillWithHttpInfo(projectOrProductUID, skillName, skillWrite, opts) {
|
|
229
|
+
opts = opts || {};
|
|
230
|
+
var postBody = skillWrite;
|
|
231
|
+
// verify the required parameter 'projectOrProductUID' is set
|
|
232
|
+
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
233
|
+
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling putSkill");
|
|
234
|
+
}
|
|
235
|
+
// verify the required parameter 'skillName' is set
|
|
236
|
+
if (skillName === undefined || skillName === null) {
|
|
237
|
+
throw new _Error["default"]("Missing the required parameter 'skillName' when calling putSkill");
|
|
238
|
+
}
|
|
239
|
+
// verify the required parameter 'skillWrite' is set
|
|
240
|
+
if (skillWrite === undefined || skillWrite === null) {
|
|
241
|
+
throw new _Error["default"]("Missing the required parameter 'skillWrite' when calling putSkill");
|
|
242
|
+
}
|
|
243
|
+
var pathParams = {
|
|
244
|
+
projectOrProductUID: projectOrProductUID,
|
|
245
|
+
skillName: skillName
|
|
246
|
+
};
|
|
247
|
+
var queryParams = {};
|
|
248
|
+
var headerParams = {
|
|
249
|
+
"If-Match": opts["ifMatch"],
|
|
250
|
+
"If-None-Match": opts["ifNoneMatch"]
|
|
251
|
+
};
|
|
252
|
+
var formParams = {};
|
|
253
|
+
var authNames = ["personalAccessToken"];
|
|
254
|
+
var contentTypes = ["application/json"];
|
|
255
|
+
var accepts = ["application/json"];
|
|
256
|
+
var returnType = _SkillWriteResult["default"];
|
|
257
|
+
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/skills/{skillName}", "PUT", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Create or replace a project skill
|
|
262
|
+
* Create a skill with `If-None-Match: *`, or replace it with `If-Match` set to the revision from `GetSkill`. Send `content` and optional `kinds`; omit `kinds` to keep them, or send `[]` to clear them. An identical write returns unchanged. Requires the Owner or Developer role. Subprojects must write to their parent project.
|
|
263
|
+
* @param {String} projectOrProductUID ProjectUID, e.g. `app:2606f411-dea6-44a0-9743-1130f57d77d8`, or one of the project's ProductUIDs.
|
|
264
|
+
* @param {String} skillName Relative .md name, case-insensitive, at most 512 UTF-8 bytes. In URLs, encode the whole name once: references/devices.md becomes references%2Fdevices.md; a literal % becomes %25. Pass the unencoded name to SDKs. Spaces, Unicode and punctuation are allowed. No absolute paths, dot segments, empty segments, backslashes, colons, control characters or surrounding segment whitespace.
|
|
265
|
+
* @param {module:model/SkillWrite} skillWrite
|
|
266
|
+
* @param {Object} opts Optional parameters
|
|
267
|
+
* @param {String} opts.ifMatch Required for replacement; use one strong ETag or quoted skill revision. Wildcards and weak tags are rejected.
|
|
268
|
+
* @param {String} opts.ifNoneMatch Use * to create only if the name is absent; cannot be combined with If-Match.
|
|
269
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SkillWriteResult}
|
|
270
|
+
*/
|
|
271
|
+
}, {
|
|
272
|
+
key: "putSkill",
|
|
273
|
+
value: function putSkill(projectOrProductUID, skillName, skillWrite, opts) {
|
|
274
|
+
return this.putSkillWithHttpInfo(projectOrProductUID, skillName, skillWrite, opts).then(function (response_and_data) {
|
|
275
|
+
return response_and_data.data;
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}]);
|
|
279
|
+
}();
|