1
0
Fork 0
peertube/server/typings/models/video/video-rate.ts
Chocobozzz d7a25329f9
Add ability to disable webtorrent
In favour of HLS
2019-11-25 10:59:43 +01:00

24 lines
948 B
TypeScript

import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
import { PickWith } from '@server/typings/utils'
import { MAccountAudience, MAccountUrl } from '../account/account'
import { MVideo, MVideoFormattable } from './video'
type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
// ############################################################################
export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
export type MAccountVideoRateAccountUrl = MAccountVideoRate &
Use<'Account', MAccountUrl>
export type MAccountVideoRateAccountVideo = MAccountVideoRate &
Use<'Account', MAccountAudience> &
Use<'Video', MVideo>
// ############################################################################
// Format for API or AP object
export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> &
Use<'Video', MVideoFormattable>