]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/typings/models/video/video-file.ts
Merge branch 'release/1.4.0' into develop
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-file.ts
CommitLineData
453e83ea
C
1import { VideoFileModel } from '../../../models/video/video-file'
2import { PickWith, PickWithOpt } from '../../utils'
3import { MVideo, MVideoUUID } from './video'
4import { MVideoRedundancyFileUrl } from './video-redundancy'
5
0283eaac
C
6type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M>
7
8// ############################################################################
9
453e83ea
C
10export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos'>
11
12export type MVideoFileVideo = MVideoFile &
0283eaac 13 Use<'Video', MVideo>
453e83ea
C
14
15export type MVideoFileVideoUUID = MVideoFile &
0283eaac 16 Use<'Video', MVideoUUID>
453e83ea
C
17
18export type MVideoFileRedundanciesOpt = MVideoFile &
19 PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]>