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