feat: add core tools

This commit is contained in:
Karl-Philipp Wulfert
2018-12-18 17:41:03 +01:00
commit 1ac90ef633
23 changed files with 3788 additions and 0 deletions

156
routes.md Normal file
View File

@@ -0,0 +1,156 @@
# Routes
## `POST /` [Index route](https://openstapps.gitlab.io/core/classes/_protocol_routes_index_indexrequest_.scindexroute.html)
**Route to request meta information about the deployment**
### Definition
| parameter | value |
| --- | --- |
| request | [SCIndexRequest](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_index_indexrequest_.scindexrequest.html) |
| response | [SCIndexResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_index_indexresponse_.scindexresponse.html) |
| success code | 200 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
## `PUT /:TYPE/:UID` [Thing update route](https://openstapps.gitlab.io/core/classes/_protocol_routes_type_uid_thingupdaterequest_.scthingupdateroute.html)
**Route for updating existing things**
### Definition
| parameter | value |
| --- | --- |
| request | [SCThingUpdateRequest](https://openstapps.gitlab.io/core/modules/_protocol_routes_type_uid_thingupdaterequest_.html#scthingupdaterequest) |
| response | [SCThingUpdateResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_type_uid_thingupdateresponse_.scthingupdateresponse.html) |
| success code | 200 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCNotFoundErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scnotfounderrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
| obligatory parameters | <table><tr><th>parameter</th><th>type</th></tr><tr><td>TYPE</td><td>[SCThingTypes](https://openstapps.gitlab.io/core/modules/_thing_.html#scthingtypes)</td></tr><tr><td>UID</td><td>[SCUuid](https://openstapps.gitlab.io/core/modules/_types_uuid_.html#scuuid)</td></tr></table> |
## `POST /bookAvailability` [Book availability route](https://openstapps.gitlab.io/core/classes/_protocol_routes_bookavailability_bookavailabilityrequest_.scbookavailabilityroute.html)
**Route for book availability**
This checks if a book is available in a library.<br>
**Example**:
`POST https://example.com/bookAvailability`
```json
{
"isbn": "978-3-16-148410-0"
}
```
### Definition
| parameter | value |
| --- | --- |
| request | [SCBookAvailabilityRequest](https://openstapps.gitlab.io/core/modules/_protocol_routes_bookavailability_bookavailabilityrequest_.html#scbookavailabilityrequest) |
| response | [SCBookAvailabilityResponse](https://openstapps.gitlab.io/core/modules/_protocol_routes_bookavailability_bookavailabilityresponse_.html#scbookavailabilityresponse) |
| success code | 200 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCNotFoundErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scnotfounderrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
## `POST /bulk` [Bulk route](https://openstapps.gitlab.io/core/classes/_protocol_routes_bulk_bulkrequest_.scbulkroute.html)
**Route for bulk creation**
### Definition
| parameter | value |
| --- | --- |
| request | [SCBulkRequest](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_bulk_bulkrequest_.scbulkrequest.html) |
| response | [SCBulkResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_bulk_bulkresponse_.scbulkresponse.html) |
| success code | 200 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
## `POST /bulk/:UID` [Bulk add route](https://openstapps.gitlab.io/core/classes/_protocol_routes_bulk_uid_bulkaddrequest_.scbulkaddroute.html)
**Route for indexing SC things in a bulk**
### Definition
| parameter | value |
| --- | --- |
| request | [SCBulkAddRequest](https://openstapps.gitlab.io/core/modules/_protocol_routes_bulk_uid_bulkaddrequest_.html#scbulkaddrequest) |
| response | [SCBulkAddResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_bulk_uid_bulkaddresponse_.scbulkaddresponse.html) |
| success code | 201 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCNotFoundErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scnotfounderrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
| obligatory parameters | <table><tr><th>parameter</th><th>type</th></tr><tr><td>UID</td><td>[SCUuid](https://openstapps.gitlab.io/core/modules/_types_uuid_.html#scuuid)</td></tr></table> |
## `POST /bulk/:UID/done` [Bulk done route](https://openstapps.gitlab.io/core/classes/_protocol_routes_bulk_uid_bulkdonerequest_.scbulkdoneroute.html)
**Route for closing bulks**
### Definition
| parameter | value |
| --- | --- |
| request | [SCBulkDoneRequest](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_bulk_uid_bulkdonerequest_.scbulkdonerequest.html) |
| response | [SCBulkDoneResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_bulk_uid_bulkdoneresponse_.scbulkdoneresponse.html) |
| success code | 204 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCNotFoundErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scnotfounderrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
| obligatory parameters | <table><tr><th>parameter</th><th>type</th></tr><tr><td>UID</td><td>[SCUuid](https://openstapps.gitlab.io/core/modules/_types_uuid_.html#scuuid)</td></tr></table> |
## `POST /feedback` [Feedback route](https://openstapps.gitlab.io/core/classes/_protocol_routes_feedback_feedbackrequest_.scfeedbackroute.html)
**Route for feedback submission**
### Definition
| parameter | value |
| --- | --- |
| request | [SCFeedbackRequest](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_feedback_feedbackrequest_.scfeedbackrequest.html) |
| response | [SCFeedbackResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_feedback_feedbackresponse_.scfeedbackresponse.html) |
| success code | 204 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
## `POST /search/multi` [Multi search route](https://openstapps.gitlab.io/core/classes/_protocol_routes_search_multisearchrequest_.scmultisearchroute.html)
**Route for submission of multiple search requests at once**
### Definition
| parameter | value |
| --- | --- |
| request | [SCMultiSearchRequest](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_search_multisearchrequest_.scmultisearchrequest.html) |
| response | [SCMultiSearchResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_search_multisearchresponse_.scmultisearchresponse.html) |
| success code | 200 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCTooManyRequestsErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.sctoomanyrequestserrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |
## `POST /search` [Search route](https://openstapps.gitlab.io/core/classes/_protocol_routes_search_searchrequest_.scsearchroute.html)
**Route for searching things**
### Definition
| parameter | value |
| --- | --- |
| request | [SCSearchRequest](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_search_searchrequest_.scsearchrequest.html) |
| response | [SCSearchResponse](https://openstapps.gitlab.io/core/interfaces/_protocol_routes_search_searchresponse_.scsearchresponse.html) |
| success code | 200 |
| errors | [SCInternalServerErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scinternalservererrorresponse.html)<br>[SCMethodNotAllowedErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scmethodnotallowederrorresponse.html)<br>[SCUnsupportedMediaTypeErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scunsupportedmediatypeerrorresponse.html)<br>[SCValidationErrorResponse](https://openstapps.gitlab.io/core/classes/_protocol_errors_errorresponse_.scvalidationerrorresponse.html) |