refactor: split api into api, api-cli & api-plugin

This commit is contained in:
2023-06-02 16:41:25 +02:00
parent 495a63977c
commit b21833de40
205 changed files with 1981 additions and 1492 deletions

View File

@@ -29,7 +29,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
/**
* Request to check the availability of books
*
* @validatable
*/
export type SCBookAvailabilityRequest = SCBookAvailabilityRequestByIsbn | SCBookAvailabilityRequestByUuid;
@@ -56,7 +55,6 @@ export interface SCBookAvailabilityRequestByUuid {
/**
* List of availabilities of a book
*
* @validatable
*/
export type SCBookAvailabilityResponse = Array<SCThingThatCanBeOfferedOffer<SCAcademicPriceGroup>>;

View File

@@ -25,14 +25,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
/**
* Request to add a thing to a bulk
*
* @validatable
*/
export type SCBulkAddRequest = SCThings;
/**
* Response to a request to add a thing to a bulk
*
* @validatable
*/
export interface SCBulkAddResponse {}

View File

@@ -24,14 +24,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
/**
* Request to change the bulk state to done (close the bulk process)
*
* @validatable
*/
export interface SCBulkDoneRequest {}
/**
* Response to a request to change the state of a bulk to done
*
* @validatable
*/
export interface SCBulkDoneResponse {}

View File

@@ -28,7 +28,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
* A bulk request
*
* Parameters to be sent to request a new bulk.
*
* @validatable
*/
export type SCBulkRequest = SCBulkParameters;
@@ -62,7 +61,6 @@ export interface SCBulkParameters {
/**
* Requested Bulk from backend
*
* @validatable
*/
export interface SCBulkResponse extends SCBulkParameters {

View File

@@ -24,7 +24,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
/**
* User feedback
*
* @validatable
*/
export interface SCFeedbackRequest extends SCMessage {
@@ -36,7 +35,6 @@ export interface SCFeedbackRequest extends SCMessage {
/**
* A response to a feedback request
*
* @validatable
*/
export interface SCFeedbackResponse {}

View File

@@ -26,14 +26,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
/**
* Index request
*
* @validatable
*/
export interface SCIndexRequest {}
/**
* A response to an index request
*
* @validatable
*/
export interface SCIndexResponse {

View File

@@ -26,7 +26,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
/**
* Plugin register request
*
* @validatable
*/
export type SCPluginRegisterRequest = SCPluginAdd | SCPluginRemove;
@@ -93,7 +92,6 @@ export interface SCPluginMetaData {
/**
* Plugin register response
*
* @validatable
*/
export interface SCPluginRegisterResponse {

View File

@@ -27,7 +27,6 @@ import {SCValidationErrorResponse} from '../errors/validation.js';
* User rating from the app
* Plugin needs to define its own rating request to hit the target rating system.
* That request should extend this one and contain timestamp and other needed data.
*
* @validatable
*/
export interface SCRatingRequest {
@@ -49,7 +48,6 @@ export interface SCRatingRequest {
/**
* A response to a rating request
*
* @validatable
*/
export interface SCRatingResponse {}

View File

@@ -31,7 +31,6 @@ import {SCSearchResult} from '../search/result.js';
* This is a map of [[SCSearchRequest]]s indexed by name.
*
* **CAUTION: This is limited to an amount of queries. Currently this limit is 5.**
*
* @validatable
*/
export type SCMultiSearchRequest = SCMap<SCSearchQuery>;
@@ -40,7 +39,6 @@ export type SCMultiSearchRequest = SCMap<SCSearchQuery>;
* A multi search response
*
* This is a map of [[SCSearchResponse]]s indexed by name
*
* @validatable
*/
export type SCMultiSearchResponse = SCMap<SCSearchResult>;

View File

@@ -25,14 +25,12 @@ import {SCSearchResult} from '../search/result.js';
/**
* A search request
*
* @validatable
*/
export type SCSearchRequest = SCSearchQuery;
/**
* A search response
*
* @validatable
*/
export type SCSearchResponse = SCSearchResult;

View File

@@ -25,14 +25,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
/**
* Request to update an existing thing
*
* @validatable
*/
export type SCThingUpdateRequest = SCThings;
/**
* Response for an entity update request
*
* @validatable
*/
export interface SCThingUpdateResponse {}