2020-11-27 18:27:44 +00:00
|
|
|
import type { IEvent } from "@/types/event.model";
|
|
|
|
import type { IPerson } from "@/types/actor/person.model";
|
|
|
|
import type { Paginate } from "./paginate";
|
|
|
|
import type { IParticipant } from "./participant.model";
|
|
|
|
import { ICurrentUserRole, INotificationPendingEnum } from "./enums";
|
2019-09-09 07:31:08 +00:00
|
|
|
|
2019-01-18 13:47:10 +00:00
|
|
|
export interface ICurrentUser {
|
2020-06-27 17:12:45 +00:00
|
|
|
id: string;
|
2019-03-22 09:57:14 +00:00
|
|
|
email: string;
|
2019-04-01 09:49:54 +00:00
|
|
|
isLoggedIn: boolean;
|
2019-09-09 07:31:08 +00:00
|
|
|
role: ICurrentUserRole;
|
2020-06-27 17:12:45 +00:00
|
|
|
defaultActor?: IPerson;
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
|
|
|
|
2021-02-12 17:19:49 +00:00
|
|
|
export interface IUserPreferredLocation {
|
|
|
|
range?: number;
|
|
|
|
name?: string;
|
|
|
|
geohash?: string;
|
|
|
|
}
|
|
|
|
|
2020-10-28 17:58:43 +00:00
|
|
|
export interface IUserSettings {
|
2021-02-12 17:19:49 +00:00
|
|
|
timezone?: string;
|
|
|
|
notificationOnDay?: boolean;
|
|
|
|
notificationEachWeek?: boolean;
|
|
|
|
notificationBeforeEvent?: boolean;
|
|
|
|
notificationPendingParticipation?: INotificationPendingEnum;
|
|
|
|
notificationPendingMembership?: INotificationPendingEnum;
|
|
|
|
location?: IUserPreferredLocation;
|
2020-10-28 17:58:43 +00:00
|
|
|
}
|
|
|
|
|
2020-06-11 17:13:21 +00:00
|
|
|
export interface IUser extends ICurrentUser {
|
|
|
|
confirmedAt: Date;
|
|
|
|
confirmationSendAt: Date;
|
|
|
|
actors: IPerson[];
|
|
|
|
disabled: boolean;
|
2020-06-27 17:12:45 +00:00
|
|
|
participations: Paginate<IParticipant>;
|
2020-11-23 15:58:50 +00:00
|
|
|
mediaSize: number;
|
2020-06-27 17:12:45 +00:00
|
|
|
drafts: IEvent[];
|
|
|
|
settings: IUserSettings;
|
|
|
|
locale: string;
|
|
|
|
provider?: string;
|
2020-08-31 14:57:13 +00:00
|
|
|
lastSignInAt: string;
|
|
|
|
lastSignInIp: string;
|
|
|
|
currentSignInIp: string;
|
|
|
|
currentSignInAt: string;
|
2020-06-27 17:12:45 +00:00
|
|
|
}
|