2019-08-15 04:53:26 -05:00
|
|
|
import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
|
|
|
|
import { PickWith } from '@server/typings/utils'
|
2019-08-20 12:05:31 -05:00
|
|
|
import { MVideo, MVideoFormattable } from '@server/typings/models'
|
2019-08-15 04:53:26 -05:00
|
|
|
|
2019-08-20 06:52:49 -05:00
|
|
|
type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
|
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 04:53:26 -05:00
|
|
|
export type MVideoBlacklist = Omit<VideoBlacklistModel, 'Video'>
|
|
|
|
|
|
|
|
export type MVideoBlacklistLight = Pick<MVideoBlacklist, 'id' | 'reason' | 'unfederated'>
|
|
|
|
export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>
|
|
|
|
|
2019-08-20 06:52:49 -05:00
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-30 09:50:12 -05:00
|
|
|
export type MVideoBlacklistLightVideo = MVideoBlacklistLight &
|
|
|
|
Use<'Video', MVideo>
|
|
|
|
|
2019-08-15 04:53:26 -05:00
|
|
|
export type MVideoBlacklistVideo = MVideoBlacklist &
|
2019-08-20 06:52:49 -05:00
|
|
|
Use<'Video', MVideo>
|
2019-08-20 12:05:31 -05:00
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
|
|
|
// Format for API or AP object
|
|
|
|
|
|
|
|
export type MVideoBlacklistFormattable = MVideoBlacklist &
|
|
|
|
Use<'Video', MVideoFormattable>
|