]>
Commit | Line | Data |
---|---|---|
453e83ea | 1 | import { VideoImportModel } from '@server/models/video/video-import' |
1ca9f7c3 | 2 | import { PickWith, PickWithOpt } from '@server/typings/utils' |
d7a25329 C |
3 | import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video' |
4 | import { MUser } from '../user/user' | |
453e83ea | 5 | |
0283eaac | 6 | type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M> |
453e83ea | 7 | |
0283eaac | 8 | // ############################################################################ |
453e83ea | 9 | |
0283eaac | 10 | export type MVideoImport = Omit<VideoImportModel, 'User' | 'Video'> |
453e83ea C |
11 | |
12 | export type MVideoImportVideo = MVideoImport & | |
0283eaac C |
13 | Use<'Video', MVideo> |
14 | ||
15 | // ############################################################################ | |
16 | ||
17 | type VideoAssociation = MVideoTag & MVideoAccountLight & MVideoThumbnail | |
18 | ||
19 | export type MVideoImportDefault = MVideoImport & | |
20 | Use<'User', MUser> & | |
21 | Use<'Video', VideoAssociation> | |
22 | ||
23 | export type MVideoImportDefaultFiles = MVideoImport & | |
24 | Use<'User', MUser> & | |
25 | Use<'Video', VideoAssociation & MVideoWithFile> | |
1ca9f7c3 C |
26 | |
27 | // ############################################################################ | |
28 | ||
29 | // Format for API or AP object | |
30 | ||
31 | export type MVideoImportFormattable = MVideoImport & | |
32 | PickWithOpt<VideoImportModel, 'Video', MVideoFormattable & MVideoTag> |