From 5561b36a34c34db30bc8a6ad8a33605ec80e377c Mon Sep 17 00:00:00 2001 From: Sebastian Lange Date: Mon, 16 Sep 2019 11:21:09 +0200 Subject: [PATCH] refactor: add @filterable tag to filterable properties --- src/general/i18n.ts | 4 ++++ src/things/abstract/academic-degree.ts | 2 ++ src/things/abstract/academic-term.ts | 8 ++++++++ src/things/abstract/creative-work.ts | 2 ++ src/things/abstract/place.ts | 12 ++++++++++++ src/things/abstract/thing-that-accepts-payments.ts | 2 ++ src/things/abstract/thing.ts | 2 ++ src/things/academic-event.ts | 1 + src/things/book.ts | 2 ++ src/things/building.ts | 1 + src/things/course-of-studies.ts | 1 + src/things/date-series.ts | 2 ++ src/things/dish.ts | 2 ++ src/things/message.ts | 4 ++++ src/things/person.ts | 13 +++++++++++++ src/things/room.ts | 1 + src/things/semester.ts | 1 + src/things/study-module.ts | 1 + src/things/todo.ts | 2 ++ src/things/video.ts | 4 ++++ 20 files changed, 67 insertions(+) diff --git a/src/general/i18n.ts b/src/general/i18n.ts index 5b834eb9..1a2b0a29 100644 --- a/src/general/i18n.ts +++ b/src/general/i18n.ts @@ -18,11 +18,15 @@ export interface SCLanguage { /** * The two letter ISO 639-1 Code of the Language + * + * @filterable */ code: SCLanguageCode; /** * The Fulltext name of the Language + * + * @filterable */ name: SCLanguageName; } diff --git a/src/things/abstract/academic-degree.ts b/src/things/abstract/academic-degree.ts index 75ca8b3b..1623cb69 100644 --- a/src/things/abstract/academic-degree.ts +++ b/src/things/abstract/academic-degree.ts @@ -29,6 +29,7 @@ export interface SCAcademicDegreeWithoutReferences * The achievable academic degree with academic field specification * (eg. Master of Science) * + * @filterable * @keyword */ academicDegreewithField: string; @@ -37,6 +38,7 @@ export interface SCAcademicDegreeWithoutReferences * The achievable academic degree with academic field specification * shorted (eg. M.Sc.). * + * @filterable * @keyword */ academicDegreewithFieldShort: string; diff --git a/src/things/abstract/academic-term.ts b/src/things/abstract/academic-term.ts index f6210f9d..e45d8ce4 100644 --- a/src/things/abstract/academic-term.ts +++ b/src/things/abstract/academic-term.ts @@ -32,21 +32,29 @@ export interface SCAcademicTermWithoutReferences /** * End date of the academic term + * + * @filterable */ endDate: SCISO8601Date; /** * End date of lectures in the academic term + * + * @filterable */ eventsEndDate?: SCISO8601Date; /** * Start date of lectures in the academic term + * + * @filterable */ eventsStartDate?: SCISO8601Date; /** * Start date of the academic term + * + * @filterable */ startDate: SCISO8601Date; } diff --git a/src/things/abstract/creative-work.ts b/src/things/abstract/creative-work.ts index 703cd851..5220c68b 100644 --- a/src/things/abstract/creative-work.ts +++ b/src/things/abstract/creative-work.ts @@ -32,6 +32,8 @@ export interface SCCreativeWorkWithoutReferences extends SCThingWithoutReferences, SCThingThatCanBeOfferedWithoutReferences { /** * Date the creative work was published + * + * @filterable */ datePublished?: SCISO8601Date; diff --git a/src/things/abstract/place.ts b/src/things/abstract/place.ts index bd6f17c4..e4ee2389 100644 --- a/src/things/abstract/place.ts +++ b/src/things/abstract/place.ts @@ -40,31 +40,43 @@ export interface SCGeoInformation { export interface SCPostalAddress { /** * Country of the address + * + * @filterable */ addressCountry: string; /** * City of the address + * + * @filterable */ addressLocality: string; /** * State of the address + * + * @filterable */ addressRegion?: string; /** * Zip code of the address + * + * @filterable */ postalCode: string; /** * Optional post box number + * + * @filterable */ postOfficeBoxNumber?: string; /** * Street of the address - with house number! + * + * @filterable */ streetAddress: string; } diff --git a/src/things/abstract/thing-that-accepts-payments.ts b/src/things/abstract/thing-that-accepts-payments.ts index 58f087a4..bf26f068 100644 --- a/src/things/abstract/thing-that-accepts-payments.ts +++ b/src/things/abstract/thing-that-accepts-payments.ts @@ -30,6 +30,8 @@ export interface SCThingThatAcceptsPaymentsWithoutReferences extends SCThingWithoutReferences { /** * Accepted payments of the place + * + * @filterable */ paymentsAccepted?: SCThingThatAcceptsPaymentsAcceptedPayments[]; } diff --git a/src/things/abstract/thing.ts b/src/things/abstract/thing.ts index ebcbc248..e9a04eb6 100644 --- a/src/things/abstract/thing.ts +++ b/src/things/abstract/thing.ts @@ -55,6 +55,7 @@ export interface SCThingWithoutReferences { /** * Alternate names of the thing * + * @filterable * @keyword */ alternateNames?: string[]; @@ -74,6 +75,7 @@ export interface SCThingWithoutReferences { /** * Name of the thing * + * @filterable * @minLength 1 * @sortable ducet * @text diff --git a/src/things/academic-event.ts b/src/things/academic-event.ts index 2f02d96d..69c8ec20 100644 --- a/src/things/academic-event.ts +++ b/src/things/academic-event.ts @@ -41,6 +41,7 @@ export interface SCAcademicEventWithoutReferences /** * Original unmapped category from the source of the academic event * + * @filterable * @keyword */ originalCategory?: string; diff --git a/src/things/book.ts b/src/things/book.ts index 5c19b4cd..7d2505ab 100644 --- a/src/things/book.ts +++ b/src/things/book.ts @@ -31,6 +31,7 @@ export interface SCBookWithoutReferences /** * Edition of a book * + * @filterable * @keyword */ bookEdition?: string; @@ -38,6 +39,7 @@ export interface SCBookWithoutReferences /** * ISBN of a book * + * @filterable * @keyword */ isbn: string; diff --git a/src/things/building.ts b/src/things/building.ts index 08c66682..aa7d788c 100644 --- a/src/things/building.ts +++ b/src/things/building.ts @@ -53,6 +53,7 @@ export interface SCBuildingWithoutReferences /** * List of floor names of the place * + * @filterable * @keyword */ floors?: string[]; diff --git a/src/things/course-of-studies.ts b/src/things/course-of-studies.ts index a05bd0e6..718d7c4c 100644 --- a/src/things/course-of-studies.ts +++ b/src/things/course-of-studies.ts @@ -39,6 +39,7 @@ export interface SCCourseOfStudiesWithoutReferences /** * Actual major of the course of studies (eg. physics) * + * @filterable * @keyword */ major: string; diff --git a/src/things/date-series.ts b/src/things/date-series.ts index 83c08553..bd77e8a6 100644 --- a/src/things/date-series.ts +++ b/src/things/date-series.ts @@ -47,6 +47,8 @@ export interface SCDateSeriesWithoutReferences extends SCThingThatCanBeOfferedWithoutReferences { /** * Dates of the date series that are initially planned to be held + * + * @filterable */ dates: SCISO8601Date[]; diff --git a/src/things/dish.ts b/src/things/dish.ts index 2fca8d8f..739b2500 100644 --- a/src/things/dish.ts +++ b/src/things/dish.ts @@ -38,6 +38,7 @@ export interface SCDishWithoutReferences /** * Additives of the dish * + * @filterable * @keyword */ additives?: string[]; @@ -119,6 +120,7 @@ export interface SCDishCharacteristic { /** * Name of the characteristic * + * @filterable * @text */ name: string; diff --git a/src/things/message.ts b/src/things/message.ts index f4cfa82c..d7ff9113 100644 --- a/src/things/message.ts +++ b/src/things/message.ts @@ -36,11 +36,15 @@ export interface SCMessageWithoutReferences /** * Roles for which the message is intended + * + * @filterable */ audiences: SCMessageAudience[]; /** * When the message was created + * + * @filterable */ dateCreated?: SCISO8601Date; diff --git a/src/things/person.ts b/src/things/person.ts index c6076214..1515f967 100644 --- a/src/things/person.ts +++ b/src/things/person.ts @@ -28,12 +28,15 @@ export interface SCPersonWithoutReferences /** * Additional first names of the person. * + * @filterable * @keyword */ additionalName?: string; /** * The birth date of the person. + * + * @filterable */ birthDate?: SCISO8601Date; @@ -42,6 +45,7 @@ export interface SCPersonWithoutReferences * * @TJS-format email * + * @filterable * @keyword */ email?: string; @@ -49,6 +53,7 @@ export interface SCPersonWithoutReferences /** * The family name of the person. * + * @filterable * @keyword */ familyName: string; @@ -56,18 +61,22 @@ export interface SCPersonWithoutReferences /** * The private fax number of the person. * + * @filterable * @keyword */ faxNumber?: string; /** * The gender of the person. + * + * @filterable */ gender?: SCPersonGender; /** * The first name of the person. * + * @filterable * @keyword */ givenName: string; @@ -75,6 +84,7 @@ export interface SCPersonWithoutReferences /** * Honorific prefix of the person. * + * @filterable * @keyword */ honorificPrefix?: string; @@ -82,6 +92,7 @@ export interface SCPersonWithoutReferences /** * Honorific suffix of the person. * + * @filterable * @keyword */ honorificSuffix?: string; @@ -89,6 +100,7 @@ export interface SCPersonWithoutReferences /** * Titles of jobs that the person has. * + * @filterable * @keyword */ jobTitles?: string[]; @@ -96,6 +108,7 @@ export interface SCPersonWithoutReferences /** * The complete name of the person combining all the parts of the name into one. * + * @filterable * @text */ name: string; diff --git a/src/things/room.ts b/src/things/room.ts index 9953cc25..546f79ab 100644 --- a/src/things/room.ts +++ b/src/things/room.ts @@ -58,6 +58,7 @@ export interface SCRoomWithoutReferences /** * The name of the floor in which the room is in. * + * @filterable * @text */ floorName?: string; diff --git a/src/things/semester.ts b/src/things/semester.ts index 9545c5e3..2a562ba8 100644 --- a/src/things/semester.ts +++ b/src/things/semester.ts @@ -28,6 +28,7 @@ export interface SCSemesterWithoutReferences /** * The short name of the semester, using the given pattern. * + * @filterable * @pattern ^(WS|SS) [0-9]{4}(/[0-9]{2})?$ * @keyword */ diff --git a/src/things/study-module.ts b/src/things/study-module.ts index 2a272a99..4fe87beb 100644 --- a/src/things/study-module.ts +++ b/src/things/study-module.ts @@ -47,6 +47,7 @@ export interface SCStudyModuleWithoutReferences /** * Majors that this study module is meant for * + * @filterable * @keyword */ majors: string[]; diff --git a/src/things/todo.ts b/src/things/todo.ts index 0bd981b5..bde63e71 100644 --- a/src/things/todo.ts +++ b/src/things/todo.ts @@ -35,6 +35,8 @@ export interface SCToDoWithoutReferences /** * A date when the "to do" is due + * + * @filterable */ dueDate?: SCISO8601Date; diff --git a/src/things/video.ts b/src/things/video.ts index 5140e537..16b48c03 100644 --- a/src/things/video.ts +++ b/src/things/video.ts @@ -68,6 +68,8 @@ export interface SCVideoSource { /** * MIME-Type of the source File + * + * @filterable */ mimeType: SCVideoMimeType; @@ -101,6 +103,8 @@ export interface SCVideoTrack { /** * Content Type of the Track File + * + * @filterable */ type: SCVideoTrackTypes;