]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/typings/models/video/video-change-ownership.ts
Add missing button roles for the language chooser and keyboard shortcut menu items
[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'
1ca9f7c3 3import { MAccountDefault, MAccountFormattable, MVideo, MVideoWithFileThumbnail } from '@server/typings/models'
453e83ea 4
0283eaac
C
5type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
6
7// ############################################################################
8
453e83ea
C
9export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'>
10
11export type MVideoChangeOwnershipFull = MVideoChangeOwnership &
0283eaac
C
12 Use<'Initiator', MAccountDefault> &
13 Use<'NextOwner', MAccountDefault> &
14 Use<'Video', MVideoWithFileThumbnail>
1ca9f7c3
C
15
16// ############################################################################
17
18// Format for API or AP object
19
20export type MVideoChangeOwnershipFormattable = Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> &
21 Use<'Initiator', MAccountFormattable> &
22 Use<'NextOwner', MAccountFormattable> &
23 Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'url' | 'name'>>