90d59ac56d6614c268eae7281cca4a0ddee0ea28
[oweals/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
8 export interface User {
9   id: number
10   username: string
11   email: string
12   pendingEmail: string | null
13
14   emailVerified: boolean
15   nsfwPolicy: NSFWPolicyType
16
17   adminFlags?: UserAdminFlag
18
19   autoPlayVideo: boolean
20   autoPlayNextVideo: boolean
21   autoPlayNextVideoPlaylist: boolean
22   webTorrentEnabled: boolean
23   videosHistoryEnabled: boolean
24   videoLanguages: string[]
25
26   role: UserRole
27   roleLabel: string
28
29   videoQuota: number
30   videoQuotaDaily: number
31   videoQuotaUsed?: number
32   videoQuotaUsedDaily?: number
33
34   theme: string
35
36   account: Account
37   notificationSettings?: UserNotificationSetting
38   videoChannels?: VideoChannel[]
39
40   blocked: boolean
41   blockedReason?: string
42
43   noInstanceConfigWarningModal: boolean
44   noWelcomeModal: boolean
45
46   createdAt: Date
47 }