import { VideoAbuseModel } from '@server/models/abuse/video-abuse' import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse' import { VideoCommentModel } from '@server/models/video/video-comment' import { PickWith } from '@shared/core-utils' import { AbuseModel } from '../../../models/abuse/abuse' import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account' import { MComment, MCommentOwner, MCommentUrl, MCommentVideo, MVideoUrl } from '../video' import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video' type Use = PickWith type UseVideoAbuse = PickWith type UseCommentAbuse = PickWith // ############################################################################ export type MAbuse = Omit export type MVideoAbuse = Omit export type MCommentAbuse = Omit export type MAbuseReporter = MAbuse & Use<'ReporterAccount', MAccountDefault> // ############################################################################ export type MVideoAbuseVideo = MVideoAbuse & UseVideoAbuse<'Video', MVideo> export type MVideoAbuseVideoUrl = MVideoAbuse & UseVideoAbuse<'Video', MVideoUrl> export type MVideoAbuseVideoFull = MVideoAbuse & UseVideoAbuse<'Video', Omit> export type MVideoAbuseFormattable = MVideoAbuse & UseVideoAbuse<'Video', Pick> // ############################################################################ export type MCommentAbuseAccount = MCommentAbuse & UseCommentAbuse<'VideoComment', MCommentOwner> export type MCommentAbuseAccountVideo = MCommentAbuse & UseCommentAbuse<'VideoComment', MCommentOwner & PickWith> export type MCommentAbuseUrl = MCommentAbuse & UseCommentAbuse<'VideoComment', MCommentUrl> export type MCommentAbuseFormattable = MCommentAbuse & UseCommentAbuse<'VideoComment', MComment & PickWith>> // ############################################################################ export type MAbuseId = Pick export type MAbuseVideo = MAbuse & Pick & Use<'VideoAbuse', MVideoAbuseVideo> export type MAbuseUrl = MAbuse & Use<'VideoAbuse', MVideoAbuseVideoUrl> & Use<'VideoCommentAbuse', MCommentAbuseUrl> export type MAbuseAccountVideo = MAbuse & Pick & Use<'VideoAbuse', MVideoAbuseVideoFull> & Use<'ReporterAccount', MAccountDefault> export type MAbuseFull = MAbuse & Pick & Use<'ReporterAccount', MAccountLight> & Use<'FlaggedAccount', MAccountLight> & Use<'VideoAbuse', MVideoAbuseVideoFull> & Use<'VideoCommentAbuse', MCommentAbuseAccountVideo> // ############################################################################ // Format for API or AP object export type MAbuseAdminFormattable = MAbuse & Use<'ReporterAccount', MAccountFormattable> & Use<'FlaggedAccount', MAccountFormattable> & Use<'VideoAbuse', MVideoAbuseFormattable> & Use<'VideoCommentAbuse', MCommentAbuseFormattable> export type MAbuseUserFormattable = MAbuse & Use<'FlaggedAccount', MAccountFormattable> & Use<'VideoAbuse', MVideoAbuseFormattable> & Use<'VideoCommentAbuse', MCommentAbuseFormattable> export type MAbuseAP = MAbuse & Pick & Use<'ReporterAccount', MAccountUrl> & Use<'FlaggedAccount', MAccountUrl> & Use<'VideoAbuse', MVideoAbuseVideo> & Use<'VideoCommentAbuse', MCommentAbuseAccount>