]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/types/models/video/local-video-viewer.ts
Support video views/viewers stats in server
[github/Chocobozzz/PeerTube.git] / server / types / models / video / local-video-viewer.ts
CommitLineData
b2111066
C
1import { LocalVideoViewerModel } from '@server/models/view/local-video-viewer'
2import { PickWith } from '@shared/typescript-utils'
3import { MLocalVideoViewerWatchSection } from './local-video-viewer-watch-section'
4import { MVideo } from './video'
5
6type Use<K extends keyof LocalVideoViewerModel, M> = PickWith<LocalVideoViewerModel, K, M>
7
8// ############################################################################
9
10export type MLocalVideoViewer = Omit<LocalVideoViewerModel, 'Video'>
11
12export type MLocalVideoViewerVideo =
13 MLocalVideoViewer &
14 Use<'Video', MVideo>
15
16export type MLocalVideoViewerWithWatchSections =
17 MLocalVideoViewer &
18 Use<'Video', MVideo> &
19 Use<'WatchSections', MLocalVideoViewerWatchSection[]>