mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-06 13:32:53 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca8c4d1c05 | ||
|
|
443cb748fb | ||
|
|
5561b36a34 | ||
|
|
49b55db66f | ||
|
|
01f92baa98 | ||
|
|
ce5856cd86 | ||
|
|
a821bcae83 | ||
|
|
149f3ffff1 | ||
|
|
9ca7870183 | ||
|
|
87ee92b19b |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
||||
# [0.29.0](https://gitlab.com/openstapps/core/compare/v0.28.0...v0.29.0) (2019-09-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add mappingIgnoredTags property to SCBackend ([149f3ff](https://gitlab.com/openstapps/core/commit/149f3ff))
|
||||
|
||||
|
||||
|
||||
# [0.28.0](https://gitlab.com/openstapps/core/compare/v0.27.0...v0.28.0) (2019-09-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add onlyOnType field for SCFacet ([fba63db](https://gitlab.com/openstapps/core/commit/fba63db))
|
||||
|
||||
|
||||
|
||||
# [0.27.0](https://gitlab.com/openstapps/core/compare/v0.26.0...v0.27.0) (2019-09-03)
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,33 @@ The [core tools](https://openstapps.gitlab.io/core-tools) are more or less not d
|
||||
|
||||
App and connectors should be updated regularly to new releases of the core but not as important like API and backend. Since the app is just a view for the data stored in the backend it is not necessary to be up to date with the newest core immediately and the connectors are developed independently by every school and up to their responsibility.
|
||||
|
||||
## Adding new Types
|
||||
|
||||
Adding new types requires changes at multiple locations for it to work correctly
|
||||
|
||||
### Required changes
|
||||
* Add your SCThing and SCThingWithoutReferences to `src/things/your-thing-name.ts` and make them extend `SCThingWithoutReferences` and `SCThing` respectively
|
||||
* Add your SCThingMeta to `src/things/your-thing-name.ts` and make it extend `SCThingMeta`
|
||||
* Add your SCThingMeta to `SCClasses` in `src/meta.ts`
|
||||
* Add your SCThing to `SCThingsWithoutDiff` in `src/meta.ts`
|
||||
* Add your SCThingWithoutReferences to `SCAssociatedThingWithoutReferences` in `src/meta.ts`
|
||||
* Add your SCThing to `SCAssociatedThing` in `src/meta.ts`
|
||||
* Add your SCThing to the `SCThingType` enum in `src/things/abstract/thing.ts`
|
||||
* Add an example file for your SCThing in `test/resources/YourThingName.json`
|
||||
* Add the following lines for your SCThing in `test/type.spec.ts`:
|
||||
```typescript
|
||||
/**
|
||||
* Types of properties of SCYourThingName
|
||||
*/
|
||||
type SCYourThingNamePropertyTypes = PropertyTypesNested<SCYourThingName>;
|
||||
assert<NotHas<SCYourThingNamePropertyTypes, SCThingWithoutReferences>>(false);
|
||||
assert<Has<SCYourThingNamePropertyTypes, SCThingWithoutReferences>>(true);
|
||||
assert<NotHas<SCYourThingNamePropertyTypes, SCThing>>(true);
|
||||
assert<Has<SCYourThingNamePropertyTypes, SCThing>>(false);
|
||||
assert<Extends<SCYourThingNameWithoutReferences, SCThing>>(false);
|
||||
assert<Extends<SCYourThingName, SCThing>>(true);
|
||||
```
|
||||
|
||||
## Additional coding style
|
||||
|
||||
### Extract inline type definitions
|
||||
|
||||
@@ -37,13 +37,14 @@ External dependencies can not be covered by the annotations. Documentation about
|
||||
|
||||
| annotation | description | parameters |
|
||||
|-------------------|-------------------------------------------|---------------|
|
||||
| `@aggregatable` | used for generating of aggregations of the field if the core schema is used to put data into a database/key-value store | |
|
||||
| `@aggregatable` | used for generating of aggregations of the field if the core schema is used to put data into a database/key-value store | whether the property is being used on the top type or across all types: `global` |
|
||||
| `@float` | number field is interpreted as float | |
|
||||
| `@indexable` | marks the type as indexable if the core schema is used to put data into a database/key-value store| |
|
||||
| `@integer` | number field is interpreted as integer | |
|
||||
| `@keyword` | string field is interpreted as keyword | |
|
||||
| `@sortable` | field is sortable if the core schema is used to put data into a database/key-value store | sort method to be used: ducet, price, distance |
|
||||
| `@sortable` | field is sortable if the core schema is used to put data into a database/key-value store | sort method to be used: `ducet`, `price`, `distance` |
|
||||
| `@text` | string field is interpreted as text | |
|
||||
| `@validatable` | marks the type as validatable if the core schema is used to put data into a database/key-value store | |
|
||||
| `@filterable` | non-object/nested field is filterable if the core schema is used to put data into a database/key-value store | |
|
||||
|
||||
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"version": "0.28.0",
|
||||
"version": "0.30.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"version": "0.28.0",
|
||||
"version": "0.30.0",
|
||||
"description": "StAppsCore - Generalized model of data",
|
||||
"keywords": [
|
||||
"Model",
|
||||
|
||||
@@ -37,6 +37,13 @@ export interface SCBackendConfiguration {
|
||||
*/
|
||||
hiddenTypes: SCThingType[];
|
||||
|
||||
/**
|
||||
* A list of tags that will be ignored by the mapping generator
|
||||
*
|
||||
* The ignored tags should mainly be tags that are irrelevant to the mapping. The tags should include the '@'.
|
||||
*/
|
||||
mappingIgnoredTags: string[];
|
||||
|
||||
/**
|
||||
* Maximum number of queries, that can be used in MultiSearchRoute
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ export interface SCCreativeWorkWithoutReferences
|
||||
extends SCThingWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
|
||||
/**
|
||||
* Date the creative work was published
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
datePublished?: SCISO8601Date;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ export interface SCThingThatAcceptsPaymentsWithoutReferences
|
||||
extends SCThingWithoutReferences {
|
||||
/**
|
||||
* Accepted payments of the place
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
paymentsAccepted?: SCThingThatAcceptsPaymentsAcceptedPayments[];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -90,7 +92,7 @@ export interface SCThingWithoutReferences {
|
||||
*
|
||||
* @sortable ducet
|
||||
* @filterable
|
||||
* @aggregatable
|
||||
* @aggregatable global
|
||||
*/
|
||||
type: SCThingType;
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ export interface SCAcademicEventWithoutReferences
|
||||
/**
|
||||
* Original unmapped category from the source of the academic event
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
originalCategory?: string;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -53,6 +53,7 @@ export interface SCBuildingWithoutReferences
|
||||
/**
|
||||
* List of floor names of the place
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
floors?: string[];
|
||||
|
||||
@@ -39,6 +39,7 @@ export interface SCCourseOfStudiesWithoutReferences
|
||||
/**
|
||||
* Actual major of the course of studies (eg. physics)
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
major: string;
|
||||
|
||||
@@ -47,6 +47,8 @@ export interface SCDateSeriesWithoutReferences
|
||||
extends SCThingThatCanBeOfferedWithoutReferences {
|
||||
/**
|
||||
* Dates of the date series that are initially planned to be held
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
dates: SCISO8601Date[];
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -51,6 +55,11 @@ export interface SCMessageWithoutReferences
|
||||
*/
|
||||
messageBody: string;
|
||||
|
||||
/**
|
||||
* An index for applying a custom sorting of multiple messages
|
||||
*/
|
||||
sequenceIndex?: number;
|
||||
|
||||
/**
|
||||
* Translated fields of a message
|
||||
*/
|
||||
@@ -119,6 +128,7 @@ export class SCMessageMeta
|
||||
audiences: 'Zielgruppen',
|
||||
dateCreated: 'Erstellungsdatum',
|
||||
messageBody: 'Nachrichteninhalt',
|
||||
sequenceIndex: 'Sequenzindex',
|
||||
},
|
||||
en: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||
@@ -127,6 +137,7 @@ export class SCMessageMeta
|
||||
audiences: 'audiences',
|
||||
dateCreated: 'date created',
|
||||
messageBody: 'message body',
|
||||
sequenceIndex: 'sequence index',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -58,6 +58,7 @@ export interface SCRoomWithoutReferences
|
||||
/**
|
||||
* The name of the floor in which the room is in.
|
||||
*
|
||||
* @filterable
|
||||
* @text
|
||||
*/
|
||||
floorName?: string;
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -47,6 +47,7 @@ export interface SCStudyModuleWithoutReferences
|
||||
/**
|
||||
* Majors that this study module is meant for
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
majors: string[];
|
||||
|
||||
@@ -35,6 +35,8 @@ export interface SCToDoWithoutReferences
|
||||
|
||||
/**
|
||||
* A date when the "to do" is due
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
dueDate?: SCISO8601Date;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1010,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1020,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1001,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"sequenceIndex": 1004,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "foo",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"type": "organization",
|
||||
"uid": "4806ef14-b631-5c20-91d1-3c627decca5a"
|
||||
}],
|
||||
"sequenceIndex": 1005,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
Reference in New Issue
Block a user