]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/types/models/video/video-blacklist.ts
Merge branch 'release/2.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / types / models / video / video-blacklist.ts
CommitLineData
453e83ea 1import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
67ed6552 2import { PickWith } from '@shared/core-utils'
d7a25329 3import { MVideo, MVideoFormattable } from './video'
453e83ea 4
0283eaac
C
5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
6
7// ############################################################################
8
453e83ea
C
9export type MVideoBlacklist = Omit<VideoBlacklistModel, 'Video'>
10
11export type MVideoBlacklistLight = Pick<MVideoBlacklist, 'id' | 'reason' | 'unfederated'>
12export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>
13
0283eaac
C
14// ############################################################################
15
a1587156
C
16export type MVideoBlacklistLightVideo =
17 MVideoBlacklistLight &
8424c402
C
18 Use<'Video', MVideo>
19
a1587156
C
20export type MVideoBlacklistVideo =
21 MVideoBlacklist &
0283eaac 22 Use<'Video', MVideo>
1ca9f7c3
C
23
24// ############################################################################
25
26// Format for API or AP object
27
a1587156
C
28export type MVideoBlacklistFormattable =
29 MVideoBlacklist &
1ca9f7c3 30 Use<'Video', MVideoFormattable>