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