]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user.model.ts
761a2edbab661752324f414f695f676e62959e3a
[github/Chocobozzz/PeerTube.git] / shared / models / users / user.model.ts
1 import { Account } from '../actors'
2 import { VideoChannel } from '../videos/channel/video-channel.model'
3 import { UserRole } from './user-role'
4 import { NSFWPolicyType } from '../videos/nsfw-policy.type'
5 import { UserNotificationSetting } from './user-notification-setting.model'
6 import { UserAdminFlag } from './user-flag.model'
7 import { VideoPlaylistType } from '../videos/playlist/video-playlist-type.model'
8
9 export interface User {
10 id: number
11 username: string
12 email: string
13 pendingEmail: string | null
14
15 emailVerified: boolean
16 nsfwPolicy: NSFWPolicyType
17
18 adminFlags?: UserAdminFlag
19
20 autoPlayVideo: boolean
21 autoPlayNextVideo: boolean
22 autoPlayNextVideoPlaylist: boolean
23
24 // @deprecated in favour of p2pEnabled
25 webTorrentEnabled: boolean
26 p2pEnabled: boolean
27
28 videosHistoryEnabled: boolean
29 videoLanguages: string[]
30
31 role: {
32 id: UserRole
33 label: string
34 }
35
36 videoQuota: number
37 videoQuotaDaily: number
38 videoQuotaUsed?: number
39 videoQuotaUsedDaily?: number
40
41 videosCount?: number
42
43 abusesCount?: number
44 abusesAcceptedCount?: number
45 abusesCreatedCount?: number
46
47 videoCommentsCount?: number
48
49 theme: string
50
51 account: Account
52 notificationSettings?: UserNotificationSetting
53 videoChannels?: VideoChannel[]
54
55 blocked: boolean
56 blockedReason?: string
57
58 noInstanceConfigWarningModal: boolean
59 noWelcomeModal: boolean
60 noAccountSetupWarningModal: boolean
61
62 createdAt: Date
63
64 pluginAuth: string | null
65
66 lastLoginDate: Date | null
67
68 twoFactorEnabled: boolean
69 }
70
71 export interface MyUserSpecialPlaylist {
72 id: number
73 name: string
74 type: VideoPlaylistType
75 }
76
77 export interface MyUser extends User {
78 specialPlaylists: MyUserSpecialPlaylist[]
79 }