2020-11-27 19:27:44 +01: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";
|
2021-10-29 10:53:43 +02:00
|
|
|
import { IFollowedGroupEvent } from "./followedGroupEvent.model";
|
2019-09-09 09:31:08 +02:00
|
|
|
|
2019-01-18 14:47:10 +01:00
|
|
|
export interface ICurrentUser {
|
2020-06-27 19:12:45 +02:00
|
|
|
id: string;
|
2019-03-22 10:57:14 +01:00
|
|
|
email: string;
|
2019-04-01 11:49:54 +02:00
|
|
|
isLoggedIn: boolean;
|
2019-09-09 09:31:08 +02:00
|
|
|
role: ICurrentUserRole;
|
2020-06-27 19:12:45 +02:00
|
|
|
defaultActor?: IPerson;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
|
2021-02-12 18:19:49 +01:00
|
|
|
export interface IUserPreferredLocation {
|
2021-04-16 17:18:41 +02:00
|
|
|
range?: number | null;
|
|
|
|
name?: string | null;
|
|
|
|
geohash?: string | null;
|
2021-02-12 18:19:49 +01:00
|
|
|
}
|
|
|
|
|
2020-10-28 18:58:43 +01:00
|
|
|
export interface IUserSettings {
|
2021-02-12 18:19:49 +01:00
|
|
|
timezone?: string;
|
|
|
|
notificationOnDay?: boolean;
|
|
|
|
notificationEachWeek?: boolean;
|
|
|
|
notificationBeforeEvent?: boolean;
|
|
|
|
notificationPendingParticipation?: INotificationPendingEnum;
|
|
|
|
notificationPendingMembership?: INotificationPendingEnum;
|
2021-06-26 15:23:22 +02:00
|
|
|
groupNotifications?: INotificationPendingEnum;
|
2021-02-12 18:19:49 +01:00
|
|
|
location?: IUserPreferredLocation;
|
2020-10-28 18:58:43 +01:00
|
|
|
}
|
|
|
|
|
2021-09-07 17:45:21 +02:00
|
|
|
export type IActivitySettingMethod = "email" | "push";
|
|
|
|
|
2021-06-01 18:08:03 +02:00
|
|
|
export interface IActivitySetting {
|
|
|
|
key: string;
|
2021-09-07 17:45:21 +02:00
|
|
|
method: IActivitySettingMethod;
|
2021-06-01 18:08:03 +02:00
|
|
|
enabled: boolean;
|
|
|
|
}
|
|
|
|
|
2020-06-11 19:13:21 +02:00
|
|
|
export interface IUser extends ICurrentUser {
|
|
|
|
confirmedAt: Date;
|
|
|
|
confirmationSendAt: Date;
|
|
|
|
actors: IPerson[];
|
|
|
|
disabled: boolean;
|
2020-06-27 19:12:45 +02:00
|
|
|
participations: Paginate<IParticipant>;
|
2020-11-23 16:58:50 +01:00
|
|
|
mediaSize: number;
|
2020-06-27 19:12:45 +02:00
|
|
|
drafts: IEvent[];
|
|
|
|
settings: IUserSettings;
|
2021-06-01 18:08:03 +02:00
|
|
|
activitySettings: IActivitySetting[];
|
2021-10-29 10:53:43 +02:00
|
|
|
followedGroupEvents: Paginate<IFollowedGroupEvent>;
|
2020-06-27 19:12:45 +02:00
|
|
|
locale: string;
|
|
|
|
provider?: string;
|
2020-08-31 16:57:13 +02:00
|
|
|
lastSignInAt: string;
|
|
|
|
lastSignInIp: string;
|
|
|
|
currentSignInIp: string;
|
|
|
|
currentSignInAt: string;
|
2020-06-27 19:12:45 +02:00
|
|
|
}
|