diff options
Diffstat (limited to 'server/typings/models/video/video-redundancy.ts')
-rw-r--r-- | server/typings/models/video/video-redundancy.ts | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/server/typings/models/video/video-redundancy.ts b/server/typings/models/video/video-redundancy.ts index c25eb9c09..f3846afd7 100644 --- a/server/typings/models/video/video-redundancy.ts +++ b/server/typings/models/video/video-redundancy.ts | |||
@@ -1,6 +1,10 @@ | |||
1 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' | 1 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith, PickWithOpt } from '@server/typings/utils' |
3 | import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models' | 3 | import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo, MVideoUrl } from '@server/typings/models' |
4 | import { VideoStreamingPlaylist } from '../../../../shared/models/videos/video-streaming-playlist.model' | ||
5 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | ||
6 | import { VideoFile } from '../../../../shared/models/videos' | ||
7 | import { VideoFileModel } from '@server/models/video/video-file' | ||
4 | 8 | ||
5 | type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M> | 9 | type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M> |
6 | 10 | ||
@@ -24,3 +28,11 @@ export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy & | |||
24 | export type MVideoRedundancyVideo = MVideoRedundancy & | 28 | export type MVideoRedundancyVideo = MVideoRedundancy & |
25 | Use<'VideoFile', MVideoFileVideo> & | 29 | Use<'VideoFile', MVideoFileVideo> & |
26 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> | 30 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> |
31 | |||
32 | // ############################################################################ | ||
33 | |||
34 | // Format for API or AP object | ||
35 | |||
36 | export type MVideoRedundancyAP = MVideoRedundancy & | ||
37 | PickWithOpt<VideoRedundancyModel, 'VideoFile', MVideoFile & PickWith<VideoFileModel, 'Video', MVideoUrl>> & | ||
38 | PickWithOpt<VideoRedundancyModel, 'VideoStreamingPlaylist', PickWith<VideoStreamingPlaylistModel, 'Video', MVideoUrl>> | ||