2017-12-14 16:38:41 +00:00
|
|
|
import { Account } from '../actors'
|
2018-08-14 12:59:53 +00:00
|
|
|
import { VideoChannel } from '../videos/channel/video-channel.model'
|
2020-01-02 12:07:18 +00:00
|
|
|
import { VideoPlaylist } from '../videos/playlist/video-playlist.model'
|
2017-10-27 14:55:03 +00:00
|
|
|
import { UserRole } from './user-role'
|
2018-04-19 09:01:34 +00:00
|
|
|
import { NSFWPolicyType } from '../videos/nsfw-policy.type'
|
2018-12-26 09:36:24 +00:00
|
|
|
import { UserNotificationSetting } from './user-notification-setting.model'
|
2019-04-15 08:49:46 +00:00
|
|
|
import { UserAdminFlag } from './user-flag.model'
|
2020-01-03 13:17:57 +00:00
|
|
|
import { VideoPlaylistType } from '@shared/models'
|
2017-06-16 08:36:18 +00:00
|
|
|
|
2017-06-10 20:15:25 +00:00
|
|
|
export interface User {
|
|
|
|
id: number
|
|
|
|
username: string
|
|
|
|
email: string
|
2019-06-11 09:54:33 +00:00
|
|
|
pendingEmail: string | null
|
2019-08-28 12:40:06 +00:00
|
|
|
|
2018-11-21 07:48:29 +00:00
|
|
|
emailVerified: boolean
|
2018-04-19 09:01:34 +00:00
|
|
|
nsfwPolicy: NSFWPolicyType
|
2018-12-18 10:32:37 +00:00
|
|
|
|
2019-04-15 08:49:46 +00:00
|
|
|
adminFlags?: UserAdminFlag
|
|
|
|
|
2017-12-19 09:45:49 +00:00
|
|
|
autoPlayVideo: boolean
|
2019-09-24 06:48:01 +00:00
|
|
|
autoPlayNextVideo: boolean
|
2019-12-11 19:20:42 +00:00
|
|
|
autoPlayNextVideoPlaylist: boolean
|
2018-12-18 10:32:37 +00:00
|
|
|
webTorrentEnabled: boolean
|
|
|
|
videosHistoryEnabled: boolean
|
2019-08-28 12:40:06 +00:00
|
|
|
videoLanguages: string[]
|
2018-12-18 10:32:37 +00:00
|
|
|
|
2017-06-16 08:36:18 +00:00
|
|
|
role: UserRole
|
2019-04-15 08:49:46 +00:00
|
|
|
roleLabel: string
|
|
|
|
|
2017-09-04 18:07:54 +00:00
|
|
|
videoQuota: number
|
2018-08-28 07:01:35 +00:00
|
|
|
videoQuotaDaily: number
|
2019-08-28 12:40:06 +00:00
|
|
|
videoQuotaUsed?: number
|
|
|
|
videoQuotaUsedDaily?: number
|
2019-07-10 12:06:19 +00:00
|
|
|
|
|
|
|
theme: string
|
|
|
|
|
2017-12-04 09:34:40 +00:00
|
|
|
account: Account
|
2018-12-26 09:36:24 +00:00
|
|
|
notificationSettings?: UserNotificationSetting
|
2017-10-24 17:41:09 +00:00
|
|
|
videoChannels?: VideoChannel[]
|
2018-08-08 15:36:10 +00:00
|
|
|
|
|
|
|
blocked: boolean
|
|
|
|
blockedReason?: string
|
2018-08-14 15:56:51 +00:00
|
|
|
|
2019-08-28 12:40:06 +00:00
|
|
|
noInstanceConfigWarningModal: boolean
|
|
|
|
noWelcomeModal: boolean
|
|
|
|
|
|
|
|
createdAt: Date
|
2017-06-10 20:15:25 +00:00
|
|
|
}
|
2020-01-02 12:07:18 +00:00
|
|
|
|
2020-01-03 13:17:57 +00:00
|
|
|
export interface MyUserSpecialPlaylist {
|
|
|
|
id: number
|
|
|
|
name: string
|
|
|
|
type: VideoPlaylistType
|
|
|
|
}
|
|
|
|
|
2020-01-02 12:07:18 +00:00
|
|
|
export interface MyUser extends User {
|
2020-01-03 13:17:57 +00:00
|
|
|
specialPlaylists: MyUserSpecialPlaylist[]
|
2020-01-02 12:07:18 +00:00
|
|
|
}
|