From 26d6bf6533023326fa017812cf31bbe20c752d36 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Jun 2020 10:45:25 +0200 Subject: Split types and typings --- server/types/models/video/video-abuse.ts | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 server/types/models/video/video-abuse.ts (limited to 'server/types/models/video/video-abuse.ts') diff --git a/server/types/models/video/video-abuse.ts b/server/types/models/video/video-abuse.ts new file mode 100644 index 000000000..d60f05e4c --- /dev/null +++ b/server/types/models/video/video-abuse.ts @@ -0,0 +1,35 @@ +import { VideoAbuseModel } from '../../../models/video/video-abuse' +import { PickWith } from '../../utils' +import { MVideoAccountLightBlacklistAllFiles, MVideo } from './video' +import { MAccountDefault, MAccountFormattable } from '../account' + +type Use = PickWith + +// ############################################################################ + +export type MVideoAbuse = Omit + +// ############################################################################ + +export type MVideoAbuseId = Pick + +export type MVideoAbuseVideo = + MVideoAbuse & + Pick & + Use<'Video', MVideo> + +export type MVideoAbuseAccountVideo = + MVideoAbuse & + Pick & + Use<'Video', MVideoAccountLightBlacklistAllFiles> & + Use<'Account', MAccountDefault> + +// ############################################################################ + +// Format for API or AP object + +export type MVideoAbuseFormattable = + MVideoAbuse & + Use<'Account', MAccountFormattable> & + Use<'Video', Pick> -- cgit v1.2.3