1 import { VideoAbuseModel } from '../../../models/video/video-abuse'
2 import { PickWith } from '../../utils'
3 import { MVideoAccountLightBlacklistAllFiles } from './video'
4 import { MAccountDefault, MAccountFormattable } from '../account'
6 type Use<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M>
8 // ############################################################################
10 export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivityPubObject'>
12 // ############################################################################
14 export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'>
16 export type MVideoAbuseVideo =
18 Pick<VideoAbuseModel, 'toActivityPubObject'> &
19 Use<'Video', MVideoAccountLightBlacklistAllFiles>
21 export type MVideoAbuseAccountVideo =
23 Pick<VideoAbuseModel, 'toActivityPubObject'> &
24 Use<'Video', MVideoAccountLightBlacklistAllFiles> &
25 Use<'Account', MAccountDefault>
27 // ############################################################################
29 // Format for API or AP object
31 export type MVideoAbuseFormattable =
33 Use<'Account', MAccountFormattable> &
34 Use<'Video', Pick<MVideoAccountLightBlacklistAllFiles,
35 'id' | 'uuid' | 'name' | 'nsfw' | 'getMiniatureStaticPath' | 'isBlacklisted' | 'VideoChannel'>>