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