]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/typings/models/video/video-blacklist.ts
Merge branch 'release/1.4.0' into develop
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-blacklist.ts
1 import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
2 import { PickWith } from '@server/typings/utils'
3 import { MVideo, MVideoFormattable } from '@server/typings/models'
4
5 type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
6
7 // ############################################################################
8
9 export type MVideoBlacklist = Omit<VideoBlacklistModel, 'Video'>
10
11 export type MVideoBlacklistLight = Pick<MVideoBlacklist, 'id' | 'reason' | 'unfederated'>
12 export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>
13
14 // ############################################################################
15
16 export type MVideoBlacklistVideo = MVideoBlacklist &
17 Use<'Video', MVideo>
18
19 // ############################################################################
20
21 // Format for API or AP object
22
23 export type MVideoBlacklistFormattable = MVideoBlacklist &
24 Use<'Video', MVideoFormattable>