]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/typings/models/video/video-abuse.ts
Fix tests
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-abuse.ts
CommitLineData
453e83ea
C
1import { VideoAbuseModel } from '../../../models/video/video-abuse'
2import { PickWith } from '../../utils'
3import { MVideo } from './video'
1ca9f7c3 4import { MAccountDefault, MAccountFormattable } from '../account'
453e83ea 5
0283eaac
C
6type Use<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M>
7
8// ############################################################################
9
453e83ea
C
10export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivityPubObject'>
11
0283eaac
C
12// ############################################################################
13
453e83ea
C
14export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'>
15
16export type MVideoAbuseVideo = MVideoAbuse &
17 Pick<VideoAbuseModel, 'toActivityPubObject'> &
0283eaac 18 Use<'Video', MVideo>
453e83ea 19
0283eaac
C
20export type MVideoAbuseAccountVideo = MVideoAbuse &
21 Pick<VideoAbuseModel, 'toActivityPubObject'> &
22 Use<'Video', MVideo> &
23 Use<'Account', MAccountDefault>
1ca9f7c3
C
24
25// ############################################################################
26
27// Format for API or AP object
28
29export type MVideoAbuseFormattable = MVideoAbuse &
30 Use<'Account', MAccountFormattable> &
31 Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'name'>>