]>
Commit | Line | Data |
---|---|---|
453e83ea C |
1 | import { VideoBlacklistModel } from '../../../models/video/video-blacklist' |
2 | import { PickWith } from '@server/typings/utils' | |
d7a25329 | 3 | import { MVideo, MVideoFormattable } from './video' |
453e83ea | 4 | |
0283eaac C |
5 | type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M> |
6 | ||
7 | // ############################################################################ | |
8 | ||
453e83ea C |
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 | ||
0283eaac C |
14 | // ############################################################################ |
15 | ||
a1587156 C |
16 | export type MVideoBlacklistLightVideo = |
17 | MVideoBlacklistLight & | |
8424c402 C |
18 | Use<'Video', MVideo> |
19 | ||
a1587156 C |
20 | export type MVideoBlacklistVideo = |
21 | MVideoBlacklist & | |
0283eaac | 22 | Use<'Video', MVideo> |
1ca9f7c3 C |
23 | |
24 | // ############################################################################ | |
25 | ||
26 | // Format for API or AP object | |
27 | ||
a1587156 C |
28 | export type MVideoBlacklistFormattable = |
29 | MVideoBlacklist & | |
1ca9f7c3 | 30 | Use<'Video', MVideoFormattable> |