diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:05:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:23:10 +0200 |
commit | 1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (patch) | |
tree | 27fe65c4ea5e9250d2523033d5c65b315bfca23d /server/typings/models/video/video-import.ts | |
parent | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff) | |
download | PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.gz PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.zst PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.zip |
Type toFormattedJSON
Diffstat (limited to 'server/typings/models/video/video-import.ts')
-rw-r--r-- | server/typings/models/video/video-import.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/typings/models/video/video-import.ts b/server/typings/models/video/video-import.ts index ada723713..c6a1c5b66 100644 --- a/server/typings/models/video/video-import.ts +++ b/server/typings/models/video/video-import.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { VideoImportModel } from '@server/models/video/video-import' | 1 | import { VideoImportModel } from '@server/models/video/video-import' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith, PickWithOpt } from '@server/typings/utils' |
3 | import { MUser, MVideo, MVideoAccountLight, MVideoTag, MVideoThumbnail, MVideoWithFile } from '@server/typings/models' | 3 | import { MUser, MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from '@server/typings/models' |
4 | 4 | ||
5 | type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M> | 5 | type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M> |
6 | 6 | ||
@@ -22,3 +22,10 @@ export type MVideoImportDefault = MVideoImport & | |||
22 | export type MVideoImportDefaultFiles = MVideoImport & | 22 | export type MVideoImportDefaultFiles = MVideoImport & |
23 | Use<'User', MUser> & | 23 | Use<'User', MUser> & |
24 | Use<'Video', VideoAssociation & MVideoWithFile> | 24 | Use<'Video', VideoAssociation & MVideoWithFile> |
25 | |||
26 | // ############################################################################ | ||
27 | |||
28 | // Format for API or AP object | ||
29 | |||
30 | export type MVideoImportFormattable = MVideoImport & | ||
31 | PickWithOpt<VideoImportModel, 'Video', MVideoFormattable & MVideoTag> | ||