aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-blacklist.ts
blob: ddb4db832fd6b08298463fc5d291318f06c8efe3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
import { PickWith } from '@server/typings/utils'
import { MVideo, MVideoFormattable } from './video'

type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>

// ############################################################################

export type MVideoBlacklist = Omit<VideoBlacklistModel, 'Video'>

export type MVideoBlacklistLight = Pick<MVideoBlacklist, 'id' | 'reason' | 'unfederated'>
export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>

// ############################################################################

export type MVideoBlacklistLightVideo =
  MVideoBlacklistLight &
  Use<'Video', MVideo>

export type MVideoBlacklistVideo =
  MVideoBlacklist &
  Use<'Video', MVideo>

// ############################################################################

// Format for API or AP object

export type MVideoBlacklistFormattable =
  MVideoBlacklist &
  Use<'Video', MVideoFormattable>