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