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-blacklist.ts | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 server/types/models/video/video-blacklist.ts (limited to 'server/types/models/video/video-blacklist.ts') diff --git a/server/types/models/video/video-blacklist.ts b/server/types/models/video/video-blacklist.ts new file mode 100644 index 000000000..08e59284a --- /dev/null +++ b/server/types/models/video/video-blacklist.ts @@ -0,0 +1,30 @@ +import { VideoBlacklistModel } from '../../../models/video/video-blacklist' +import { PickWith } from '@server/types/utils' +import { MVideo, MVideoFormattable } from './video' + +type Use = PickWith + +// ############################################################################ + +export type MVideoBlacklist = Omit + +export type MVideoBlacklistLight = Pick +export type MVideoBlacklistUnfederated = Pick + +// ############################################################################ + +export type MVideoBlacklistLightVideo = + MVideoBlacklistLight & + Use<'Video', MVideo> + +export type MVideoBlacklistVideo = + MVideoBlacklist & + Use<'Video', MVideo> + +// ############################################################################ + +// Format for API or AP object + +export type MVideoBlacklistFormattable = + MVideoBlacklist & + Use<'Video', MVideoFormattable> -- cgit v1.2.3