]>
Commit | Line | Data |
---|---|---|
453e83ea C |
1 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' |
2 | import { PickWith } from '@server/typings/utils' | |
3 | import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models' | |
4 | ||
0283eaac C |
5 | type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M> |
6 | ||
7 | // ############################################################################ | |
8 | ||
453e83ea C |
9 | export type MVideoRedundancy = Omit<VideoRedundancyModel, 'VideoFile' | 'VideoStreamingPlaylist' | 'Actor'> |
10 | ||
11 | export type MVideoRedundancyFileUrl = Pick<MVideoRedundancy, 'fileUrl'> | |
12 | ||
0283eaac C |
13 | // ############################################################################ |
14 | ||
453e83ea | 15 | export type MVideoRedundancyFile = MVideoRedundancy & |
0283eaac | 16 | Use<'VideoFile', MVideoFile> |
453e83ea C |
17 | |
18 | export type MVideoRedundancyFileVideo = MVideoRedundancy & | |
0283eaac | 19 | Use<'VideoFile', MVideoFileVideo> |
453e83ea C |
20 | |
21 | export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy & | |
0283eaac | 22 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> |
453e83ea | 23 | |
0283eaac C |
24 | export type MVideoRedundancyVideo = MVideoRedundancy & |
25 | Use<'VideoFile', MVideoFileVideo> & | |
26 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> |