diff --git a/src/core/files/ConfigFile.ts b/src/core/files/ConfigFile.ts index d2faf2c5..3c10dafa 100644 --- a/src/core/files/ConfigFile.ts +++ b/src/core/files/ConfigFile.ts @@ -12,12 +12,13 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -import { SCAppConfiguration } from '../types/config/App'; -import { SCBackendConfiguration, SCBackendInternalConfiguration } from '../types/config/Backend'; -import { SCLicensePlate } from '../types/namespaces'; +import {SCAppConfiguration} from '../types/config/App'; +import {SCBackendConfiguration, SCBackendInternalConfiguration} from '../types/config/Backend'; +import {SCLicensePlate} from '../types/namespaces'; /** * A configuration file that configures app and backend + * @validatable */ export interface SCConfigFile { diff --git a/src/core/protocol/errors/ErrorResponse.ts b/src/core/protocol/errors/ErrorResponse.ts index 893b7356..15a9868d 100644 --- a/src/core/protocol/errors/ErrorResponse.ts +++ b/src/core/protocol/errors/ErrorResponse.ts @@ -16,6 +16,8 @@ import {ValidationError} from 'jsonschema'; /** * A generic error that can be returned by the backend if somethings fails during the processing of a request + * + * @validatable */ export interface SCErrorResponse extends Error { /** @@ -126,11 +128,11 @@ export class SCNotFoundErrorResponse extends SCError { } /** - * An error that is returned, when an internal server error occured + * An error that is returned, when an internal server error occurred */ export class SCInternalServerErrorResponse extends SCError { /** - * Internal error that occured. If the stack is disabled this error is not set for security reasons + * Internal error that occurred. If the stack is disabled this error is not set for security reasons */ additionalData?: Error; diff --git a/src/core/protocol/routes/INDEX/IndexRequest.ts b/src/core/protocol/routes/INDEX/IndexRequest.ts index 5fb4fbb7..03925a84 100644 --- a/src/core/protocol/routes/INDEX/IndexRequest.ts +++ b/src/core/protocol/routes/INDEX/IndexRequest.ts @@ -16,6 +16,8 @@ import {SCAbstractRoute} from '../../../Route'; /** * Index request + * + * @validatable */ export interface SCIndexRequest { } diff --git a/src/core/protocol/routes/INDEX/IndexResponse.ts b/src/core/protocol/routes/INDEX/IndexResponse.ts index e1844f53..a855b0e2 100644 --- a/src/core/protocol/routes/INDEX/IndexResponse.ts +++ b/src/core/protocol/routes/INDEX/IndexResponse.ts @@ -17,6 +17,8 @@ import {SCBackendConfiguration} from '../../../types/config/Backend'; /** * A response to an index request + * + * @validatable */ export interface SCIndexResponse { app: SCAppConfiguration; diff --git a/src/core/protocol/routes/TYPE/UID/ThingUpdateRequest.ts b/src/core/protocol/routes/TYPE/UID/ThingUpdateRequest.ts index d3628540..b22b34e1 100644 --- a/src/core/protocol/routes/TYPE/UID/ThingUpdateRequest.ts +++ b/src/core/protocol/routes/TYPE/UID/ThingUpdateRequest.ts @@ -17,6 +17,8 @@ import {SCAbstractRoute} from '../../../../Route'; /** * Request to update an existing thing + * + * @validatable */ export type SCThingUpdateRequest = SCThings; diff --git a/src/core/protocol/routes/TYPE/UID/ThingUpdateResponse.ts b/src/core/protocol/routes/TYPE/UID/ThingUpdateResponse.ts index 7c845180..ac3a0b13 100644 --- a/src/core/protocol/routes/TYPE/UID/ThingUpdateResponse.ts +++ b/src/core/protocol/routes/TYPE/UID/ThingUpdateResponse.ts @@ -14,6 +14,8 @@ */ /** * Response for an entity update request + * + * @validatable */ export interface SCThingUpdateResponse { } diff --git a/src/core/protocol/routes/bookAvailability/BookAvailabilityRequest.ts b/src/core/protocol/routes/bookAvailability/BookAvailabilityRequest.ts index 3f28e362..e57ee09e 100644 --- a/src/core/protocol/routes/bookAvailability/BookAvailabilityRequest.ts +++ b/src/core/protocol/routes/bookAvailability/BookAvailabilityRequest.ts @@ -17,6 +17,7 @@ import {SCUuid} from '../../../types/UUID'; /** * Request to check the availability of books + * @validatable */ export type SCBookAvailabilityRequest = SCBookAvailabilityRequestByIsbn | SCBookAvailabilityRequestByUuid; diff --git a/src/core/protocol/routes/bookAvailability/BookAvailabilityResponse.ts b/src/core/protocol/routes/bookAvailability/BookAvailabilityResponse.ts index 796a6baf..4107db3d 100644 --- a/src/core/protocol/routes/bookAvailability/BookAvailabilityResponse.ts +++ b/src/core/protocol/routes/bookAvailability/BookAvailabilityResponse.ts @@ -16,5 +16,6 @@ import {SCAcademicPriceGroup, SCThingThatCanBeOfferedOffer} from '../../../base/ /** * List of availabilities of a book + * @validatable */ export type SCBookAvailabilityResponse = Array>; diff --git a/src/core/protocol/routes/bulk/BulkRequest.ts b/src/core/protocol/routes/bulk/BulkRequest.ts index b7aabc60..a157f02f 100644 --- a/src/core/protocol/routes/bulk/BulkRequest.ts +++ b/src/core/protocol/routes/bulk/BulkRequest.ts @@ -20,6 +20,8 @@ import {SCISO8601Date} from '../../../types/Time'; * A bulk request * * Parameters to be sent to request a new bulk. + * + * @validatable */ export interface SCBulkRequest extends SCBulkParameters { } diff --git a/src/core/protocol/routes/bulk/BulkResponse.ts b/src/core/protocol/routes/bulk/BulkResponse.ts index d6743240..8a9b3dfa 100644 --- a/src/core/protocol/routes/bulk/BulkResponse.ts +++ b/src/core/protocol/routes/bulk/BulkResponse.ts @@ -17,6 +17,8 @@ import {SCBulkParameters} from './BulkRequest'; /** * Requested Bulk from backend + * + * @validatable */ export interface SCBulkResponse extends SCBulkParameters { /** diff --git a/src/core/protocol/routes/bulk/UID/BulkAddRequest.ts b/src/core/protocol/routes/bulk/UID/BulkAddRequest.ts index 819ff29e..bcde6a95 100644 --- a/src/core/protocol/routes/bulk/UID/BulkAddRequest.ts +++ b/src/core/protocol/routes/bulk/UID/BulkAddRequest.ts @@ -17,6 +17,7 @@ import {SCAbstractRoute} from '../../../../Route'; /** * Request to add a thing to a bulk + * @validatable */ export type SCBulkAddRequest = SCThings; diff --git a/src/core/protocol/routes/bulk/UID/BulkAddResponse.ts b/src/core/protocol/routes/bulk/UID/BulkAddResponse.ts index 2a26c3a5..6b489471 100644 --- a/src/core/protocol/routes/bulk/UID/BulkAddResponse.ts +++ b/src/core/protocol/routes/bulk/UID/BulkAddResponse.ts @@ -14,6 +14,7 @@ */ /** * Response to a request to add a thing to a bulk + * @validatable */ export interface SCBulkAddResponse { } diff --git a/src/core/protocol/routes/bulk/UID/BulkDoneRequest.ts b/src/core/protocol/routes/bulk/UID/BulkDoneRequest.ts index ff585dfd..f305de5a 100644 --- a/src/core/protocol/routes/bulk/UID/BulkDoneRequest.ts +++ b/src/core/protocol/routes/bulk/UID/BulkDoneRequest.ts @@ -16,6 +16,7 @@ import {SCAbstractRoute} from '../../../../Route'; /** * Request to change the bulk state to done (close the bulk process) + * @validatable */ export interface SCBulkDoneRequest { } diff --git a/src/core/protocol/routes/bulk/UID/BulkDoneResponse.ts b/src/core/protocol/routes/bulk/UID/BulkDoneResponse.ts index a7c48e8f..01a6aa66 100644 --- a/src/core/protocol/routes/bulk/UID/BulkDoneResponse.ts +++ b/src/core/protocol/routes/bulk/UID/BulkDoneResponse.ts @@ -14,6 +14,7 @@ */ /** * Response to a request to change the state of a bulk to done + * @validatable */ export interface SCBulkDoneResponse { } diff --git a/src/core/protocol/routes/feedback/FeedbackRequest.ts b/src/core/protocol/routes/feedback/FeedbackRequest.ts index f0aad4f8..9151f5ea 100644 --- a/src/core/protocol/routes/feedback/FeedbackRequest.ts +++ b/src/core/protocol/routes/feedback/FeedbackRequest.ts @@ -17,6 +17,8 @@ import {SCMessage} from '../../../things/Message'; /** * User feedback + * + * @validatable */ export interface SCFeedbackRequest extends SCMessage { /** diff --git a/src/core/protocol/routes/feedback/FeedbackResponse.ts b/src/core/protocol/routes/feedback/FeedbackResponse.ts index c8f0a774..75492258 100644 --- a/src/core/protocol/routes/feedback/FeedbackResponse.ts +++ b/src/core/protocol/routes/feedback/FeedbackResponse.ts @@ -14,6 +14,8 @@ */ /** * A response to a feedback request + * + * @validatable */ export interface SCFeedbackResponse { } diff --git a/src/core/protocol/routes/search/MultiSearchRequest.ts b/src/core/protocol/routes/search/MultiSearchRequest.ts index cb84d524..0866d53e 100644 --- a/src/core/protocol/routes/search/MultiSearchRequest.ts +++ b/src/core/protocol/routes/search/MultiSearchRequest.ts @@ -21,6 +21,8 @@ import {SCSearchQuery} from './SearchRequest'; * 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 interface SCMultiSearchRequest { [k: string]: SCSearchQuery; diff --git a/src/core/protocol/routes/search/MultiSearchResponse.ts b/src/core/protocol/routes/search/MultiSearchResponse.ts index 3c47ce92..bf3eef5d 100644 --- a/src/core/protocol/routes/search/MultiSearchResponse.ts +++ b/src/core/protocol/routes/search/MultiSearchResponse.ts @@ -18,6 +18,8 @@ import {SCSearchResult} from './SearchResponse'; * A multi search response * * This is a map of [[SCSearchResponse]]s indexed by name + * + * @validatable */ export interface SCMultiSearchResponse { [k: string]: SCSearchResult; diff --git a/src/core/protocol/routes/search/SearchRequest.ts b/src/core/protocol/routes/search/SearchRequest.ts index 9ae7bae3..85e47fca 100644 --- a/src/core/protocol/routes/search/SearchRequest.ts +++ b/src/core/protocol/routes/search/SearchRequest.ts @@ -18,6 +18,8 @@ import {SCSearchSort} from '../../../types/sorts/Abstract'; /** * A search request + * + * @validatable */ export interface SCSearchRequest extends SCSearchQuery { } diff --git a/src/core/protocol/routes/search/SearchResponse.ts b/src/core/protocol/routes/search/SearchResponse.ts index b4c25bb3..2717996a 100644 --- a/src/core/protocol/routes/search/SearchResponse.ts +++ b/src/core/protocol/routes/search/SearchResponse.ts @@ -16,6 +16,8 @@ import {SCThings, SCThingsField} from '../../../Classes'; /** * A search response + * + * @validatable */ export interface SCSearchResponse extends SCSearchResult { } diff --git a/src/core/things/AcademicEvent.ts b/src/core/things/AcademicEvent.ts index 63ccdce1..5ba3bc6b 100644 --- a/src/core/things/AcademicEvent.ts +++ b/src/core/things/AcademicEvent.ts @@ -49,6 +49,11 @@ export interface SCAcademicEventWithoutReferences type: SCThingType.AcademicEvent; } +/** + * An academic event + * + * @validatable + */ export interface SCAcademicEvent extends SCEvent, SCAcademicEventWithoutReferences { /** * Translated fields of an academic event diff --git a/src/core/things/Article.ts b/src/core/things/Article.ts index 6bc3f044..73b7a407 100644 --- a/src/core/things/Article.ts +++ b/src/core/things/Article.ts @@ -50,6 +50,8 @@ export interface SCArticleWithoutReferences /** * An article + * + * @validatable */ export interface SCArticle extends SCCreativeWork, SCArticleWithoutReferences { /** diff --git a/src/core/things/Book.ts b/src/core/things/Book.ts index 27a6142f..d559a062 100644 --- a/src/core/things/Book.ts +++ b/src/core/things/Book.ts @@ -54,6 +54,8 @@ export interface SCBookWithoutReferences extends SCCreativeWorkWithoutReferences /** * A book + * + * @validatable */ export interface SCBook extends SCCreativeWork, SCBookWithoutReferences { /** diff --git a/src/core/things/Building.ts b/src/core/things/Building.ts index fa9acf5a..04732a24 100644 --- a/src/core/things/Building.ts +++ b/src/core/things/Building.ts @@ -56,6 +56,11 @@ export interface SCBuildingWithoutReferences type: SCThingType.Building; } +/** + * A building + * + * @validatable + */ export interface SCBuilding extends SCBuildingWithoutReferences { /** * Type of the building diff --git a/src/core/things/Catalog.ts b/src/core/things/Catalog.ts index 2465ccec..03c6f3bc 100644 --- a/src/core/things/Catalog.ts +++ b/src/core/things/Catalog.ts @@ -37,6 +37,8 @@ export interface SCCatalogWithoutReferences /** * A catalog + * + * @validatable */ export interface SCCatalog extends SCCatalogWithoutReferences { /** diff --git a/src/core/things/CourseOfStudies.ts b/src/core/things/CourseOfStudies.ts index 3cbe8123..2fadb569 100644 --- a/src/core/things/CourseOfStudies.ts +++ b/src/core/things/CourseOfStudies.ts @@ -61,6 +61,8 @@ export interface SCCourseOfStudiesWithoutReferences extends /** * A course of studies + * + * @validatable */ export interface SCCourseOfStudies extends SCCourseOfStudiesWithoutReferences { /** diff --git a/src/core/things/DateSeries.ts b/src/core/things/DateSeries.ts index 87046c4b..36b9df59 100644 --- a/src/core/things/DateSeries.ts +++ b/src/core/things/DateSeries.ts @@ -73,6 +73,8 @@ export interface SCDateSeriesWithoutReferences /** * A date series + * + * @validatable */ export interface SCDateSeries extends SCDateSeriesWithoutReferences, SCThingInPlace { /** diff --git a/src/core/things/Diff.ts b/src/core/things/Diff.ts index 28036a17..16c0d50e 100644 --- a/src/core/things/Diff.ts +++ b/src/core/things/Diff.ts @@ -12,6 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ +import * as jsonpatch from 'json-patch'; import {SCThingsWithoutDiff} from '../Classes'; import {SCThing, SCThingMeta, SCThingType} from '../Thing'; import {SCISO8601Date} from '../types/Time'; @@ -43,6 +44,8 @@ export interface SCDiffWithoutReferences extends SCThing { /** * A diff + * + * @validatable */ export interface SCDiff extends SCDiffWithoutReferences { /** diff --git a/src/core/things/Dish.ts b/src/core/things/Dish.ts index 983565e7..aaffed81 100644 --- a/src/core/things/Dish.ts +++ b/src/core/things/Dish.ts @@ -66,6 +66,8 @@ export interface SCDishWithoutReferences /** * A dish + * + * @validatable */ export interface SCDish extends SCDishWithoutReferences, SCThingInPlace { /** diff --git a/src/core/things/Favorite.ts b/src/core/things/Favorite.ts index e2715660..e80ff297 100644 --- a/src/core/things/Favorite.ts +++ b/src/core/things/Favorite.ts @@ -50,6 +50,8 @@ export interface SCFavoriteWithoutReferences extends SCThing { /** * A favorite + * + * @validatable */ export interface SCFavorite extends SCFavoriteWithoutReferences { /** diff --git a/src/core/things/Floor.ts b/src/core/things/Floor.ts index 45f00bd7..13011313 100644 --- a/src/core/things/Floor.ts +++ b/src/core/things/Floor.ts @@ -46,6 +46,8 @@ export interface SCFloorWithoutReferences extends SCThing { /** * A floor + * + * @validatable */ export interface SCFloor extends SCFloorWithoutReferences, SCThingInPlace { /** diff --git a/src/core/things/Message.ts b/src/core/things/Message.ts index 5ac97d03..75f3ab76 100644 --- a/src/core/things/Message.ts +++ b/src/core/things/Message.ts @@ -54,6 +54,8 @@ export interface SCMessageWithoutReferences extends SCCreativeWorkWithoutReferen /** * A message + * + * @validatable */ export interface SCMessage extends SCCreativeWork, SCMessageWithoutReferences { /** diff --git a/src/core/things/Organization.ts b/src/core/things/Organization.ts index 5b6506b8..867cbe16 100644 --- a/src/core/things/Organization.ts +++ b/src/core/things/Organization.ts @@ -27,6 +27,8 @@ export interface SCOrganizationWithoutReferences extends SCThing { /** * An organization + * + * @validatable */ export interface SCOrganization extends SCOrganizationWithoutReferences, SCThingInPlace { /** diff --git a/src/core/things/Person.ts b/src/core/things/Person.ts index 7fc214d3..89d32913 100644 --- a/src/core/things/Person.ts +++ b/src/core/things/Person.ts @@ -99,6 +99,8 @@ export interface SCPersonWithoutReferences extends SCThing { /** * A person + * + * @validatable */ export interface SCPerson extends SCPersonWithoutReferences { /** diff --git a/src/core/things/PointOfInterest.ts b/src/core/things/PointOfInterest.ts index c26026c1..32e9ca2d 100644 --- a/src/core/things/PointOfInterest.ts +++ b/src/core/things/PointOfInterest.ts @@ -42,6 +42,8 @@ export interface SCPointOfInterestWithoutReferences /** * A point of interest + * + * @validatable */ export interface SCPointOfInterest extends SCPointOfInterestWithoutReferences, SCThingInPlace { /** diff --git a/src/core/things/Room.ts b/src/core/things/Room.ts index d17811d6..6cbe26f3 100644 --- a/src/core/things/Room.ts +++ b/src/core/things/Room.ts @@ -70,6 +70,8 @@ export interface SCRoomWithoutReferences /** * A room + * + * @validatable */ export interface SCRoom extends SCRoomWithoutReferences, SCThingInPlace { /** diff --git a/src/core/things/Semester.ts b/src/core/things/Semester.ts index 24cbb02b..e7a55d5b 100644 --- a/src/core/things/Semester.ts +++ b/src/core/things/Semester.ts @@ -34,6 +34,8 @@ export interface SCSemesterWithoutReferences extends SCAcademicTermWithoutRefere /** * A semester + * + * @validatable */ export interface SCSemester extends SCSemesterWithoutReferences { /** diff --git a/src/core/things/Setting.ts b/src/core/things/Setting.ts index 95d2e78f..aad2e66d 100644 --- a/src/core/things/Setting.ts +++ b/src/core/things/Setting.ts @@ -13,11 +13,12 @@ * this program. If not, see . */ import { - SCThingWithCategoriesSpecificValues, SCThingWithCategoriesTranslatableProperties, + SCThingWithCategoriesSpecificValues, + SCThingWithCategoriesTranslatableProperties, SCThingWithCategoriesWithoutReferences, } from '../base/ThingWithCategories'; import {SCThingMeta, SCThingType} from '../Thing'; -import { SCTranslations } from '../types/i18n'; +import {SCTranslations} from '../types/i18n'; export type SCSettingCategories = string; @@ -56,6 +57,8 @@ export type SCSettingInputType = SCSettingSingleChoice /** * A setting with references + * + * @validatable */ export interface SCSetting extends SCSettingWithoutReferences { /** diff --git a/src/core/things/SportCourse.ts b/src/core/things/SportCourse.ts index 1be50c30..78e7208e 100644 --- a/src/core/things/SportCourse.ts +++ b/src/core/things/SportCourse.ts @@ -27,6 +27,8 @@ export interface SCSportCourseWithoutReferences extends SCEventWithoutReferences /** * A sport course + * + * @validatable */ export interface SCSportCourse extends SCEvent, SCSportCourseWithoutReferences { /** diff --git a/src/core/things/Ticket.ts b/src/core/things/Ticket.ts index 519b018d..f8494a99 100644 --- a/src/core/things/Ticket.ts +++ b/src/core/things/Ticket.ts @@ -43,6 +43,8 @@ export interface SCTicketWithoutReferences extends SCThing { /** * A ticket + * + * @validatable */ export interface SCTicket extends SCTicketWithoutReferences, SCThingInPlace { /** diff --git a/src/core/things/Tour.ts b/src/core/things/Tour.ts index 3d5ee2e3..992a3650 100644 --- a/src/core/things/Tour.ts +++ b/src/core/things/Tour.ts @@ -36,6 +36,8 @@ export interface SCTourWithoutReferences extends SCThing { /** * A tour + * + * @validatable */ export interface SCTour extends SCTourWithoutReferences { /** diff --git a/src/core/things/Video.ts b/src/core/things/Video.ts index c7cf72a1..c777ac61 100644 --- a/src/core/things/Video.ts +++ b/src/core/things/Video.ts @@ -99,6 +99,8 @@ export interface SCVideoTrack { /** * A video + * + * @validatable */ export interface SCVideo extends SCCreativeWork, SCVideoWithoutReferences { /**