PeerTube/server/typings/models/video/video-blacklist.ts

18 lines
735 B
TypeScript
Raw Normal View History

2019-08-15 09:53:26 +00:00
import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
import { PickWith } from '@server/typings/utils'
import { MVideo } from '@server/typings/models'
2019-08-20 11:52:49 +00:00
type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
// ############################################################################
2019-08-15 09:53:26 +00:00
export type MVideoBlacklist = Omit<VideoBlacklistModel, 'Video'>
export type MVideoBlacklistLight = Pick<MVideoBlacklist, 'id' | 'reason' | 'unfederated'>
export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>
2019-08-20 11:52:49 +00:00
// ############################################################################
2019-08-15 09:53:26 +00:00
export type MVideoBlacklistVideo = MVideoBlacklist &
2019-08-20 11:52:49 +00:00
Use<'Video', MVideo>