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