50ca75d269b8858b8a3609fcec1d72db7b95006b
[oweals/peertube.git] / server / typings / models / video / video-share.ts
1 import { VideoShareModel } from '../../../models/video/video-share'
2 import { PickWith } from '../../utils'
3 import { MActorDefault } from '../account'
4 import { MVideo } from './video'
5
6 type Use<K extends keyof VideoShareModel, M> = PickWith<VideoShareModel, K, M>
7
8 // ############################################################################
9
10 export type MVideoShare = Omit<VideoShareModel, 'Actor' | 'Video'>
11
12 export type MVideoShareActor =
13   MVideoShare &
14   Use<'Actor', MActorDefault>
15
16 export type MVideoShareFull =
17   MVideoShare &
18   Use<'Actor', MActorDefault> &
19   Use<'Video', MVideo>