2019-08-15 05:53:26 -04:00
|
|
|
import { VideoAbuseModel } from '../../../models/video/video-abuse'
|
|
|
|
import { PickWith } from '../../utils'
|
2020-04-17 04:47:22 -04:00
|
|
|
import { MVideoAccountLightBlacklistAllFiles } from './video'
|
2019-08-20 13:05:31 -04:00
|
|
|
import { MAccountDefault, MAccountFormattable } from '../account'
|
2019-08-15 05:53:26 -04:00
|
|
|
|
2019-08-20 07:52:49 -04:00
|
|
|
type Use<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M>
|
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 05:53:26 -04:00
|
|
|
export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivityPubObject'>
|
|
|
|
|
2019-08-20 07:52:49 -04:00
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 05:53:26 -04:00
|
|
|
export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'>
|
|
|
|
|
2020-01-31 10:56:52 -05:00
|
|
|
export type MVideoAbuseVideo =
|
|
|
|
MVideoAbuse &
|
2019-08-15 05:53:26 -04:00
|
|
|
Pick<VideoAbuseModel, 'toActivityPubObject'> &
|
2020-04-17 04:47:22 -04:00
|
|
|
Use<'Video', MVideoAccountLightBlacklistAllFiles>
|
2019-08-15 05:53:26 -04:00
|
|
|
|
2020-01-31 10:56:52 -05:00
|
|
|
export type MVideoAbuseAccountVideo =
|
|
|
|
MVideoAbuse &
|
2019-08-20 07:52:49 -04:00
|
|
|
Pick<VideoAbuseModel, 'toActivityPubObject'> &
|
2020-04-17 04:47:22 -04:00
|
|
|
Use<'Video', MVideoAccountLightBlacklistAllFiles> &
|
2019-08-20 07:52:49 -04:00
|
|
|
Use<'Account', MAccountDefault>
|
2019-08-20 13:05:31 -04:00
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
|
|
|
// Format for API or AP object
|
|
|
|
|
2020-01-31 10:56:52 -05:00
|
|
|
export type MVideoAbuseFormattable =
|
|
|
|
MVideoAbuse &
|
2019-08-20 13:05:31 -04:00
|
|
|
Use<'Account', MAccountFormattable> &
|
2020-04-17 04:47:22 -04:00
|
|
|
Use<'Video', Pick<MVideoAccountLightBlacklistAllFiles,
|
|
|
|
'id' | 'uuid' | 'name' | 'nsfw' | 'getMiniatureStaticPath' | 'isBlacklisted' | 'VideoChannel'>>
|