aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/models/video/video-blacklist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-18 10:45:25 +0200
committerChocobozzz <me@florianbigard.com>2020-06-18 10:46:27 +0200
commit26d6bf6533023326fa017812cf31bbe20c752d36 (patch)
tree9c4e3ecdc344420190f17d429bdf05d78fae7a8c /server/types/models/video/video-blacklist.ts
parentd6d951ddc0c492f3261065b5dcb4df0534d252fc (diff)
downloadPeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.gz
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.zst
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.zip
Split types and typings
Diffstat (limited to 'server/types/models/video/video-blacklist.ts')
-rw-r--r--server/types/models/video/video-blacklist.ts30
1 files changed, 30 insertions, 0 deletions
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 @@
1import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
2import { PickWith } from '@server/types/utils'
3import { MVideo, MVideoFormattable } from './video'
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 MVideoBlacklistLightVideo =
17 MVideoBlacklistLight &
18 Use<'Video', MVideo>
19
20export type MVideoBlacklistVideo =
21 MVideoBlacklist &
22 Use<'Video', MVideo>
23
24// ############################################################################
25
26// Format for API or AP object
27
28export type MVideoBlacklistFormattable =
29 MVideoBlacklist &
30 Use<'Video', MVideoFormattable>