aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-redundancy.ts
blob: ec61bfb68d5b15ee99554f00a78f8fdae4862b12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
import { PickWith } from '@server/typings/utils'
import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo } from '@server/typings/models'

export type MVideoRedundancy = Omit<VideoRedundancyModel, 'VideoFile' | 'VideoStreamingPlaylist' | 'Actor'>

export type MVideoRedundancyFileUrl = Pick<MVideoRedundancy, 'fileUrl'>

export type MVideoRedundancyFile = MVideoRedundancy &
  PickWith<VideoRedundancyModel, 'VideoFile', MVideoFile>

export type MVideoRedundancyFileVideo = MVideoRedundancy &
  PickWith<VideoRedundancyModel, 'VideoFile', MVideoFileVideo>

export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy &
  PickWith<VideoRedundancyModel, 'VideoStreamingPlaylist', MStreamingPlaylistVideo>

export type MVideoRedundancyVideo = MVideoRedundancyFileVideo | MVideoRedundancyStreamingPlaylistVideo