]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/typings/models/video/video-blacklist.ts
Add ability to disable webtorrent
[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 './video'
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 MVideoBlacklistLightVideo = MVideoBlacklistLight &
17 Use<'Video', MVideo>
18
19 export type MVideoBlacklistVideo = MVideoBlacklist &
20 Use<'Video', MVideo>
21
22 // ############################################################################
23
24 // Format for API or AP object
25
26 export type MVideoBlacklistFormattable = MVideoBlacklist &
27 Use<'Video', MVideoFormattable>