]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user.model.ts
328b69df61df185cfcd2dcf2826e1793b03e8185
[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 { VideoPlaylist } from '../videos/playlist/video-playlist.model'
4 import { UserRole } from './user-role'
5 import { NSFWPolicyType } from '../videos/nsfw-policy.type'
6 import { UserNotificationSetting } from './user-notification-setting.model'
7 import { UserAdminFlag } from './user-flag.model'
8 import { VideoPlaylistType } from '@shared/models'
9
10 export interface User {
11 id: number
12 username: string
13 email: string
14 pendingEmail: string | null
15
16 emailVerified: boolean
17 nsfwPolicy: NSFWPolicyType
18
19 adminFlags?: UserAdminFlag
20
21 autoPlayVideo: boolean
22 autoPlayNextVideo: boolean
23 autoPlayNextVideoPlaylist: boolean
24 webTorrentEnabled: boolean
25 videosHistoryEnabled: boolean
26 videoLanguages: string[]
27
28 role: UserRole
29 roleLabel: string
30
31 videoQuota: number
32 videoQuotaDaily: number
33 videoQuotaUsed?: number
34 videoQuotaUsedDaily?: number
35
36 theme: string
37
38 account: Account
39 notificationSettings?: UserNotificationSetting
40 videoChannels?: VideoChannel[]
41
42 blocked: boolean
43 blockedReason?: string
44
45 noInstanceConfigWarningModal: boolean
46 noWelcomeModal: boolean
47
48 createdAt: Date
49 }
50
51 export interface MyUserSpecialPlaylist {
52 id: number
53 name: string
54 type: VideoPlaylistType
55 }
56
57 export interface MyUser extends User {
58 specialPlaylists: MyUserSpecialPlaylist[]
59 }
60
61