diff --git a/src/things/abstract/user-groups.ts b/src/things/abstract/user-groups.ts new file mode 100644 index 00000000..1750cb8c --- /dev/null +++ b/src/things/abstract/user-groups.ts @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2021 StApps + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +/** + * Types of data consumers + */ +export type SCUserGroup = + 'students' + | 'employees' + | 'guests'; diff --git a/src/things/message.ts b/src/things/message.ts index d7ff9113..cf4f6da8 100644 --- a/src/things/message.ts +++ b/src/things/message.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 StApps + * Copyright (C) 2019-2021 StApps * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 3. @@ -22,6 +22,7 @@ import { } from './abstract/creative-work'; import {SCThingMeta, SCThingType} from './abstract/thing'; import {SCThingThatCanBeOfferedTranslatableProperties} from './abstract/thing-that-can-be-offered'; +import {SCUserGroup} from './abstract/user-groups'; import {SCOrganizationWithoutReferences} from './organization'; /** @@ -39,7 +40,7 @@ export interface SCMessageWithoutReferences * * @filterable */ - audiences: SCMessageAudience[]; + audiences: SCUserGroup[]; /** * When the message was created @@ -90,14 +91,6 @@ export interface SCMessage type: SCThingType.Message; } -/** - * Audiences for messages - */ -export type SCMessageAudience = - 'students' - | 'employees' - | 'guests'; - /** * Translatable properties of a message */