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, 12 insertions, 4 deletions
diff --git a/server/typings/models/video/video-redundancy.ts b/server/typings/models/video/video-redundancy.ts index ec61bfb68..c25eb9c09 100644 --- a/server/typings/models/video/video-redundancy.ts +++ b/server/typings/models/video/video-redundancy.ts | |||
@@ -2,17 +2,25 @@ import { VideoRedundancyModel } from '../../../models/redundancy/video-redundanc | |||
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/typings/utils' |
3 | import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models' | 3 | import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models' |
4 | 4 | ||
5 | type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M> | ||
6 | |||
7 | // ############################################################################ | ||
8 | |||
5 | export type MVideoRedundancy = Omit<VideoRedundancyModel, 'VideoFile' | 'VideoStreamingPlaylist' | 'Actor'> | 9 | export type MVideoRedundancy = Omit<VideoRedundancyModel, 'VideoFile' | 'VideoStreamingPlaylist' | 'Actor'> |
6 | 10 | ||
7 | export type MVideoRedundancyFileUrl = Pick<MVideoRedundancy, 'fileUrl'> | 11 | export type MVideoRedundancyFileUrl = Pick<MVideoRedundancy, 'fileUrl'> |
8 | 12 | ||
13 | // ############################################################################ | ||
14 | |||
9 | export type MVideoRedundancyFile = MVideoRedundancy & | 15 | export type MVideoRedundancyFile = MVideoRedundancy & |
10 | PickWith<VideoRedundancyModel, 'VideoFile', MVideoFile> | 16 | Use<'VideoFile', MVideoFile> |
11 | 17 | ||
12 | export type MVideoRedundancyFileVideo = MVideoRedundancy & | 18 | export type MVideoRedundancyFileVideo = MVideoRedundancy & |
13 | PickWith<VideoRedundancyModel, 'VideoFile', MVideoFileVideo> | 19 | Use<'VideoFile', MVideoFileVideo> |
14 | 20 | ||
15 | export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy & | 21 | export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy & |
16 | PickWith<VideoRedundancyModel, 'VideoStreamingPlaylist', MStreamingPlaylistVideo> | 22 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> |
17 | 23 | ||
18 | export type MVideoRedundancyVideo = MVideoRedundancyFileVideo | MVideoRedundancyStreamingPlaylistVideo | 24 | export type MVideoRedundancyVideo = MVideoRedundancy & |
25 | Use<'VideoFile', MVideoFileVideo> & | ||
26 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> | ||