]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user.model.ts
More specific message when signup is not allowed
[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 emailPublic: boolean
17 nsfwPolicy: NSFWPolicyType
18
19 adminFlags?: UserAdminFlag
20
21 autoPlayVideo: boolean
22 autoPlayNextVideo: boolean
23 autoPlayNextVideoPlaylist: boolean
24
25 // @deprecated in favour of p2pEnabled
26 webTorrentEnabled: boolean
27 p2pEnabled: boolean
28
29 videosHistoryEnabled: boolean
30 videoLanguages: string[]
31
32 role: {
33 id: UserRole
34 label: string
35 }
36
37 videoQuota: number
38 videoQuotaDaily: number
39 videoQuotaUsed?: number
40 videoQuotaUsedDaily?: number
41
42 videosCount?: number
43
44 abusesCount?: number
45 abusesAcceptedCount?: number
46 abusesCreatedCount?: number
47
48 videoCommentsCount?: number
49
50 theme: string
51
52 account: Account
53 notificationSettings?: UserNotificationSetting
54 videoChannels?: VideoChannel[]
55
56 blocked: boolean
57 blockedReason?: string
58
59 noInstanceConfigWarningModal: boolean
60 noWelcomeModal: boolean
61 noAccountSetupWarningModal: boolean
62
63 createdAt: Date
64
65 pluginAuth: string | null
66
67 lastLoginDate: Date | null
68
69 twoFactorEnabled: boolean
70 }
71
72 export interface MyUserSpecialPlaylist {
73 id: number
74 name: string
75 type: VideoPlaylistType
76 }
77
78 export interface MyUser extends User {
79 specialPlaylists: MyUserSpecialPlaylist[]
80 }