]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/typings/models/video/video-rate.ts
Add ability to disable webtorrent
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-rate.ts
CommitLineData
453e83ea
C
1import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2import { PickWith } from '@server/typings/utils'
d7a25329
C
3import { MAccountAudience, MAccountUrl } from '../account/account'
4import { MVideo, MVideoFormattable } from './video'
453e83ea 5
0283eaac
C
6type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
7
8// ############################################################################
9
453e83ea
C
10export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
11
12export type MAccountVideoRateAccountUrl = MAccountVideoRate &
0283eaac 13 Use<'Account', MAccountUrl>
453e83ea
C
14
15export type MAccountVideoRateAccountVideo = MAccountVideoRate &
0283eaac
C
16 Use<'Account', MAccountAudience> &
17 Use<'Video', MVideo>
1ca9f7c3
C
18
19// ############################################################################
20
21// Format for API or AP object
22
23export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> &
24 Use<'Video', MVideoFormattable>