aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/typings/models/video/video-redundancy.ts')
-rw-r--r--server/typings/models/video/video-redundancy.ts16
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 @@
1import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' 1import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
2import { PickWith } from '@server/typings/utils' 2import { PickWith, PickWithOpt } from '@server/typings/utils'
3import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models' 3import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo, MVideoUrl } from '@server/typings/models'
4import { VideoStreamingPlaylist } from '../../../../shared/models/videos/video-streaming-playlist.model'
5import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
6import { VideoFile } from '../../../../shared/models/videos'
7import { VideoFileModel } from '@server/models/video/video-file'
4 8
5type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M> 9type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M>
6 10
@@ -24,3 +28,11 @@ export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy &
24export type MVideoRedundancyVideo = MVideoRedundancy & 28export 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
36export type MVideoRedundancyAP = MVideoRedundancy &
37 PickWithOpt<VideoRedundancyModel, 'VideoFile', MVideoFile & PickWith<VideoFileModel, 'Video', MVideoUrl>> &
38 PickWithOpt<VideoRedundancyModel, 'VideoStreamingPlaylist', PickWith<VideoStreamingPlaylistModel, 'Video', MVideoUrl>>