]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/typings/models/video/video-change-ownership.ts
Fix tests
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-change-ownership.ts
CommitLineData
453e83ea
C
1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
2import { PickWith } from '@server/typings/utils'
d7a25329
C
3import { MAccountDefault, MAccountFormattable } from '../account/account'
4import { MVideo, MVideoWithAllFiles } from './video'
453e83ea 5
0283eaac
C
6type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
7
8// ############################################################################
9
453e83ea
C
10export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'>
11
12export type MVideoChangeOwnershipFull = MVideoChangeOwnership &
0283eaac
C
13 Use<'Initiator', MAccountDefault> &
14 Use<'NextOwner', MAccountDefault> &
d7a25329 15 Use<'Video', MVideoWithAllFiles>
1ca9f7c3
C
16
17// ############################################################################
18
19// Format for API or AP object
20
21export type MVideoChangeOwnershipFormattable = Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> &
22 Use<'Initiator', MAccountFormattable> &
23 Use<'NextOwner', MAccountFormattable> &
24 Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'url' | 'name'>>