aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-blacklist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/typings/models/video/video-blacklist.ts')
-rw-r--r--server/typings/models/video/video-blacklist.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/server/typings/models/video/video-blacklist.ts b/server/typings/models/video/video-blacklist.ts
new file mode 100644
index 000000000..1dedfa37f
--- /dev/null
+++ b/server/typings/models/video/video-blacklist.ts
@@ -0,0 +1,24 @@
1import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
2import { PickWith } from '@server/typings/utils'
3import { MVideo, MVideoFormattable } from '@server/typings/models'
4
5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
6
7// ############################################################################
8
9export type MVideoBlacklist = Omit<VideoBlacklistModel, 'Video'>
10
11export type MVideoBlacklistLight = Pick<MVideoBlacklist, 'id' | 'reason' | 'unfederated'>
12export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>
13
14// ############################################################################
15
16export type MVideoBlacklistVideo = MVideoBlacklist &
17 Use<'Video', MVideo>
18
19// ############################################################################
20
21// Format for API or AP object
22
23export type MVideoBlacklistFormattable = MVideoBlacklist &
24 Use<'Video', MVideoFormattable>