mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
refactor: refactor SCThingTypes from union-type to enum. SCThingType-type-attributes are now string-type-attributes.
This commit is contained in:
@@ -23,29 +23,31 @@ import {SCUuid} from './types/UUID';
|
||||
/**
|
||||
* Types a thing can be
|
||||
*/
|
||||
export type SCThingTypes = 'article'
|
||||
| 'academic event'
|
||||
| 'book'
|
||||
| 'building'
|
||||
| 'catalog'
|
||||
| 'course of studies'
|
||||
| 'date series'
|
||||
| 'diff'
|
||||
| 'dish'
|
||||
| 'favorite'
|
||||
| 'floor'
|
||||
| 'message'
|
||||
| 'offer'
|
||||
| 'organization'
|
||||
| 'person'
|
||||
| 'point of interest'
|
||||
| 'room'
|
||||
| 'semester'
|
||||
| 'setting'
|
||||
| 'sport course'
|
||||
| 'ticket'
|
||||
| 'tour'
|
||||
| 'video';
|
||||
export enum SCThingType {
|
||||
AcademicEvent = 'academic event',
|
||||
Article = 'article',
|
||||
Book = 'book',
|
||||
Building = 'building',
|
||||
Catalog = 'catalog',
|
||||
CourseOfStudies = 'course of studies',
|
||||
DateSeries = 'date series',
|
||||
Diff = 'diff',
|
||||
Dish = 'dish',
|
||||
Favorite = 'favorite',
|
||||
Floor = 'floor',
|
||||
Message = 'message',
|
||||
Offer = 'offer', // Currently not in use
|
||||
Organization = 'organization',
|
||||
Person = 'person',
|
||||
PointOfInterest = 'point of interest',
|
||||
Room = 'room',
|
||||
Semester = 'semester',
|
||||
Setting = 'setting',
|
||||
SportCourse = 'sport course',
|
||||
Ticket = 'ticket',
|
||||
Tour = 'tour',
|
||||
Video = 'video',
|
||||
}
|
||||
|
||||
/**
|
||||
* A thing
|
||||
@@ -84,7 +86,7 @@ export interface SCThing {
|
||||
/**
|
||||
* Type of the thing
|
||||
*/
|
||||
type: SCThingTypes;
|
||||
type: string;
|
||||
/**
|
||||
* Universally unique identifier of the thing
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user