]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/typings/models/video/video-import.ts
Add missing button roles for the language chooser and keyboard shortcut menu items
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-import.ts
CommitLineData
453e83ea 1import { VideoImportModel } from '@server/models/video/video-import'
1ca9f7c3
C
2import { PickWith, PickWithOpt } from '@server/typings/utils'
3import { MUser, MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from '@server/typings/models'
453e83ea 4
0283eaac 5type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M>
453e83ea 6
0283eaac 7// ############################################################################
453e83ea 8
0283eaac 9export type MVideoImport = Omit<VideoImportModel, 'User' | 'Video'>
453e83ea
C
10
11export type MVideoImportVideo = MVideoImport &
0283eaac
C
12 Use<'Video', MVideo>
13
14// ############################################################################
15
16type VideoAssociation = MVideoTag & MVideoAccountLight & MVideoThumbnail
17
18export type MVideoImportDefault = MVideoImport &
19 Use<'User', MUser> &
20 Use<'Video', VideoAssociation>
21
22export type MVideoImportDefaultFiles = MVideoImport &
23 Use<'User', MUser> &
24 Use<'Video', VideoAssociation & MVideoWithFile>
1ca9f7c3
C
25
26// ############################################################################
27
28// Format for API or AP object
29
30export type MVideoImportFormattable = MVideoImport &
31 PickWithOpt<VideoImportModel, 'Video', MVideoFormattable & MVideoTag>