]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - server/types/models/video/video-rate.ts
Don't fail remote transcoding on retry
[github/Chocobozzz/PeerTube.git] / server / types / models / video / video-rate.ts
... / ...
CommitLineData
1import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2import { PickWith } from '@shared/typescript-utils'
3import { MAccountAudience, MAccountUrl } from '../account/account'
4import { MVideo, MVideoFormattable } from './video'
5
6type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
7
8// ############################################################################
9
10export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
11
12export type MAccountVideoRateAccountUrl =
13 MAccountVideoRate &
14 Use<'Account', MAccountUrl>
15
16export type MAccountVideoRateAccountVideo =
17 MAccountVideoRate &
18 Use<'Account', MAccountAudience> &
19 Use<'Video', MVideo>
20
21// ############################################################################
22
23// Format for API or AP object
24
25export type MAccountVideoRateFormattable =
26 Pick<MAccountVideoRate, 'type'> &
27 Use<'Video', MVideoFormattable>