]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user.model.ts
Support video views/viewers stats in server
[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: UserRole
32 roleLabel: string
33
34 videoQuota: number
35 videoQuotaDaily: number
36 videoQuotaUsed?: number
37 videoQuotaUsedDaily?: number
38
39 videosCount?: number
40
41 abusesCount?: number
42 abusesAcceptedCount?: number
43 abusesCreatedCount?: number
44
45 videoCommentsCount?: number
46
47 theme: string
48
49 account: Account
50 notificationSettings?: UserNotificationSetting
51 videoChannels?: VideoChannel[]
52
53 blocked: boolean
54 blockedReason?: string
55
56 noInstanceConfigWarningModal: boolean
57 noWelcomeModal: boolean
58 noAccountSetupWarningModal: boolean
59
60 createdAt: Date
61
62 pluginAuth: string | null
63
64 lastLoginDate: Date | null
65 }
66
67 export interface MyUserSpecialPlaylist {
68 id: number
69 name: string
70 type: VideoPlaylistType
71 }
72
73 export interface MyUser extends User {
74 specialPlaylists: MyUserSpecialPlaylist[]
75 }