]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/users/user.model.ts
Breaking API: Consistency with role id/label
[github/Chocobozzz/PeerTube.git] / shared / models / users / user.model.ts
CommitLineData
50d6de9c 1import { Account } from '../actors'
59c76ffa 2import { VideoChannel } from '../videos/channel/video-channel.model'
954605a8 3import { UserRole } from './user-role'
0883b324 4import { NSFWPolicyType } from '../videos/nsfw-policy.type'
cef534ed 5import { UserNotificationSetting } from './user-notification-setting.model'
1eddc9a7 6import { UserAdminFlag } from './user-flag.model'
0fecf427 7import { VideoPlaylistType } from '../videos/playlist/video-playlist-type.model'
ee9e7b61 8
69818c93
C
9export interface User {
10 id: number
11 username: string
12 email: string
d1ab89de 13 pendingEmail: string | null
43d0ea7f 14
fc2ec87a 15 emailVerified: boolean
0883b324 16 nsfwPolicy: NSFWPolicyType
276d9652 17
1eddc9a7
C
18 adminFlags?: UserAdminFlag
19
7efe153b 20 autoPlayVideo: boolean
6aa54148 21 autoPlayNextVideo: boolean
bee29df8 22 autoPlayNextVideoPlaylist: boolean
a9bfa85d
C
23
24 // @deprecated in favour of p2pEnabled
276d9652 25 webTorrentEnabled: boolean
a9bfa85d
C
26 p2pEnabled: boolean
27
276d9652 28 videosHistoryEnabled: boolean
43d0ea7f 29 videoLanguages: string[]
276d9652 30
9e5cf66b
C
31 role: {
32 id: UserRole
33 label: string
34 }
1eddc9a7 35
b0f9f39e 36 videoQuota: number
bee0abff 37 videoQuotaDaily: number
43d0ea7f
C
38 videoQuotaUsed?: number
39 videoQuotaUsedDaily?: number
4f32032f 40
76314386 41 videosCount?: number
4f32032f
C
42
43 abusesCount?: number
44 abusesAcceptedCount?: number
45 abusesCreatedCount?: number
46
1a578165 47 videoCommentsCount?: number
ffb321be
C
48
49 theme: string
50
2295ce6c 51 account: Account
cef534ed 52 notificationSettings?: UserNotificationSetting
72c7248b 53 videoChannels?: VideoChannel[]
eacb25c4
C
54
55 blocked: boolean
56 blockedReason?: string
a76138ff 57
43d0ea7f
C
58 noInstanceConfigWarningModal: boolean
59 noWelcomeModal: boolean
8f581725 60 noAccountSetupWarningModal: boolean
43d0ea7f
C
61
62 createdAt: Date
8bb71f2e
C
63
64 pluginAuth: string | null
3cc665f4
C
65
66 lastLoginDate: Date | null
56f47830
C
67
68 twoFactorEnabled: boolean
69818c93 69}
29128b2f 70
ac0868bc
C
71export interface MyUserSpecialPlaylist {
72 id: number
73 name: string
74 type: VideoPlaylistType
75}
76
29128b2f 77export interface MyUser extends User {
ac0868bc 78 specialPlaylists: MyUserSpecialPlaylist[]
29128b2f 79}