X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fusers%2Fuser.model.ts;h=859736b2fbf04bf7a51a8f15f40f0f7f991bffab;hb=4f32032fed8587ea97d45e235b167e8958efd81f;hp=4b17881e5cd6e382b8e8d93d52c7ee1442e3a243;hpb=fada8d75550dc7365f7e18ee1569b9406251d660;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts index 4b17881e5..859736b2f 100644 --- a/shared/models/users/user.model.ts +++ b/shared/models/users/user.model.ts @@ -1,15 +1,70 @@ -import { Account } from '../accounts' -import { VideoChannel } from '../videos/video-channel.model' +import { Account } from '../actors' +import { VideoChannel } from '../videos/channel/video-channel.model' import { UserRole } from './user-role' +import { NSFWPolicyType } from '../videos/nsfw-policy.type' +import { UserNotificationSetting } from './user-notification-setting.model' +import { UserAdminFlag } from './user-flag.model' +import { VideoPlaylistType } from '@shared/models' export interface User { id: number username: string email: string - displayNSFW: boolean + pendingEmail: string | null + + emailVerified: boolean + nsfwPolicy: NSFWPolicyType + + adminFlags?: UserAdminFlag + + autoPlayVideo: boolean + autoPlayNextVideo: boolean + autoPlayNextVideoPlaylist: boolean + webTorrentEnabled: boolean + videosHistoryEnabled: boolean + videoLanguages: string[] + role: UserRole + roleLabel: string + videoQuota: number - createdAt: Date + videoQuotaDaily: number + videoQuotaUsed?: number + videoQuotaUsedDaily?: number + + videosCount?: number + + abusesCount?: number + abusesAcceptedCount?: number + abusesCreatedCount?: number + + videoCommentsCount? : number + + theme: string + account: Account + notificationSettings?: UserNotificationSetting videoChannels?: VideoChannel[] + + blocked: boolean + blockedReason?: string + + noInstanceConfigWarningModal: boolean + noWelcomeModal: boolean + + createdAt: Date + + pluginAuth: string | null + + lastLoginDate: Date | null +} + +export interface MyUserSpecialPlaylist { + id: number + name: string + type: VideoPlaylistType +} + +export interface MyUser extends User { + specialPlaylists: MyUserSpecialPlaylist[] }