2019-08-15 11:53:26 +02:00
|
|
|
import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
|
|
|
|
import { PickWith } from '@server/typings/utils'
|
|
|
|
import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models'
|
|
|
|
|
2019-08-20 13:52:49 +02:00
|
|
|
type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M>
|
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 11:53:26 +02:00
|
|
|
export type MVideoRedundancy = Omit<VideoRedundancyModel, 'VideoFile' | 'VideoStreamingPlaylist' | 'Actor'>
|
|
|
|
|
|
|
|
export type MVideoRedundancyFileUrl = Pick<MVideoRedundancy, 'fileUrl'>
|
|
|
|
|
2019-08-20 13:52:49 +02:00
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 11:53:26 +02:00
|
|
|
export type MVideoRedundancyFile = MVideoRedundancy &
|
2019-08-20 13:52:49 +02:00
|
|
|
Use<'VideoFile', MVideoFile>
|
2019-08-15 11:53:26 +02:00
|
|
|
|
|
|
|
export type MVideoRedundancyFileVideo = MVideoRedundancy &
|
2019-08-20 13:52:49 +02:00
|
|
|
Use<'VideoFile', MVideoFileVideo>
|
2019-08-15 11:53:26 +02:00
|
|
|
|
|
|
|
export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy &
|
2019-08-20 13:52:49 +02:00
|
|
|
Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo>
|
2019-08-15 11:53:26 +02:00
|
|
|
|
2019-08-20 13:52:49 +02:00
|
|
|
export type MVideoRedundancyVideo = MVideoRedundancy &
|
|
|
|
Use<'VideoFile', MVideoFileVideo> &
|
|
|
|
Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo>
|