2020-02-18 07:57:00 +00:00
|
|
|
import { IEvent, IParticipant } from "@/types/event.model";
|
|
|
|
import { IPerson } from "@/types/actor/person.model";
|
|
|
|
import { Paginate } from "./paginate";
|
2019-09-18 15:32:37 +00:00
|
|
|
|
2019-09-09 07:31:08 +00:00
|
|
|
export enum ICurrentUserRole {
|
2020-02-18 07:57:00 +00:00
|
|
|
USER = "USER",
|
|
|
|
MODERATOR = "MODERATOR",
|
|
|
|
ADMINISTRATOR = "ADMINISTRATOR",
|
2019-09-09 07:31:08 +00:00
|
|
|
}
|
|
|
|
|
2019-01-18 13:47:10 +00:00
|
|
|
export interface ICurrentUser {
|
2019-03-22 09:57:14 +00:00
|
|
|
id: number;
|
|
|
|
email: string;
|
2019-04-01 09:49:54 +00:00
|
|
|
isLoggedIn: boolean;
|
2019-09-09 07:31:08 +00:00
|
|
|
role: ICurrentUserRole;
|
2020-02-18 07:57:00 +00:00
|
|
|
participations: Paginate<IParticipant>;
|
2019-10-07 11:47:46 +00:00
|
|
|
defaultActor: IPerson;
|
2019-10-03 14:54:56 +00:00
|
|
|
drafts: IEvent[];
|
2020-02-18 07:57:00 +00:00
|
|
|
settings: IUserSettings;
|
|
|
|
}
|
|
|
|
|
2020-06-08 10:28:19 +00:00
|
|
|
export enum INotificationPendingParticipationEnum {
|
|
|
|
NONE = "NONE",
|
|
|
|
DIRECT = "DIRECT",
|
|
|
|
ONE_DAY = "ONE_DAY",
|
|
|
|
ONE_HOUR = "ONE_HOUR",
|
|
|
|
}
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
export interface IUserSettings {
|
|
|
|
timezone: string;
|
|
|
|
notificationOnDay: string;
|
|
|
|
notificationEachWeek: string;
|
|
|
|
notificationBeforeEvent: string;
|
2020-06-08 10:28:19 +00:00
|
|
|
notificationPendingParticipation: INotificationPendingParticipationEnum;
|
2019-01-18 13:47:10 +00:00
|
|
|
}
|