1 import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
2 import { PickWith } from '@server/typings/utils'
3 import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models'
5 type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M>
7 // ############################################################################
9 export type MVideoRedundancy = Omit<VideoRedundancyModel, 'VideoFile' | 'VideoStreamingPlaylist' | 'Actor'>
11 export type MVideoRedundancyFileUrl = Pick<MVideoRedundancy, 'fileUrl'>
13 // ############################################################################
15 export type MVideoRedundancyFile = MVideoRedundancy &
16 Use<'VideoFile', MVideoFile>
18 export type MVideoRedundancyFileVideo = MVideoRedundancy &
19 Use<'VideoFile', MVideoFileVideo>
21 export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy &
22 Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo>
24 export type MVideoRedundancyVideo = MVideoRedundancy &
25 Use<'VideoFile', MVideoFileVideo> &
26 Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo>