aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 19:05:31 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 19:23:10 +0200
commit1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (patch)
tree27fe65c4ea5e9250d2523033d5c65b315bfca23d /server/typings/models/video
parent0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff)
downloadPeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.gz
PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.zst
PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.zip
Type toFormattedJSON
Diffstat (limited to 'server/typings/models/video')
-rw-r--r--server/typings/models/video/schedule-video-update.ts6
-rw-r--r--server/typings/models/video/video-abuse.ts10
-rw-r--r--server/typings/models/video/video-blacklist.ts9
-rw-r--r--server/typings/models/video/video-caption.ts14
-rw-r--r--server/typings/models/video/video-change-ownership.ts11
-rw-r--r--server/typings/models/video/video-channels.ts27
-rw-r--r--server/typings/models/video/video-comment.ts10
-rw-r--r--server/typings/models/video/video-import.ts11
-rw-r--r--server/typings/models/video/video-playlist-element.ts11
-rw-r--r--server/typings/models/video/video-playlist.ts14
-rw-r--r--server/typings/models/video/video-rate.ts9
-rw-r--r--server/typings/models/video/video.ts27
12 files changed, 139 insertions, 20 deletions
diff --git a/server/typings/models/video/schedule-video-update.ts b/server/typings/models/video/schedule-video-update.ts
index 069705536..ada9af06e 100644
--- a/server/typings/models/video/schedule-video-update.ts
+++ b/server/typings/models/video/schedule-video-update.ts
@@ -1,3 +1,9 @@
1import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' 1import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update'
2 2
3export type MScheduleVideoUpdate = Omit<ScheduleVideoUpdateModel, 'Video'> 3export type MScheduleVideoUpdate = Omit<ScheduleVideoUpdateModel, 'Video'>
4
5// ############################################################################
6
7// Format for API or AP object
8
9export type MScheduleVideoUpdateFormattable = Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'>
diff --git a/server/typings/models/video/video-abuse.ts b/server/typings/models/video/video-abuse.ts
index 0474cac5b..e38c3f586 100644
--- a/server/typings/models/video/video-abuse.ts
+++ b/server/typings/models/video/video-abuse.ts
@@ -1,7 +1,7 @@
1import { VideoAbuseModel } from '../../../models/video/video-abuse' 1import { VideoAbuseModel } from '../../../models/video/video-abuse'
2import { PickWith } from '../../utils' 2import { PickWith } from '../../utils'
3import { MVideo } from './video' 3import { MVideo } from './video'
4import { MAccountDefault } from '../account' 4import { MAccountDefault, MAccountFormattable } from '../account'
5 5
6type Use<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M> 6type Use<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M>
7 7
@@ -21,3 +21,11 @@ export type MVideoAbuseAccountVideo = MVideoAbuse &
21 Pick<VideoAbuseModel, 'toActivityPubObject'> & 21 Pick<VideoAbuseModel, 'toActivityPubObject'> &
22 Use<'Video', MVideo> & 22 Use<'Video', MVideo> &
23 Use<'Account', MAccountDefault> 23 Use<'Account', MAccountDefault>
24
25// ############################################################################
26
27// Format for API or AP object
28
29export type MVideoAbuseFormattable = MVideoAbuse &
30 Use<'Account', MAccountFormattable> &
31 Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'name'>>
diff --git a/server/typings/models/video/video-blacklist.ts b/server/typings/models/video/video-blacklist.ts
index cc539f95c..1dedfa37f 100644
--- a/server/typings/models/video/video-blacklist.ts
+++ b/server/typings/models/video/video-blacklist.ts
@@ -1,6 +1,6 @@
1import { VideoBlacklistModel } from '../../../models/video/video-blacklist' 1import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MVideo } from '@server/typings/models' 3import { MVideo, MVideoFormattable } from '@server/typings/models'
4 4
5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M> 5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
6 6
@@ -15,3 +15,10 @@ export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>
15 15
16export type MVideoBlacklistVideo = MVideoBlacklist & 16export type MVideoBlacklistVideo = MVideoBlacklist &
17 Use<'Video', MVideo> 17 Use<'Video', MVideo>
18
19// ############################################################################
20
21// Format for API or AP object
22
23export type MVideoBlacklistFormattable = MVideoBlacklist &
24 Use<'Video', MVideoFormattable>
diff --git a/server/typings/models/video/video-caption.ts b/server/typings/models/video/video-caption.ts
index fe0e664c2..7cb2a2ad3 100644
--- a/server/typings/models/video/video-caption.ts
+++ b/server/typings/models/video/video-caption.ts
@@ -1,6 +1,6 @@
1import { VideoCaptionModel } from '../../../models/video/video-caption' 1import { VideoCaptionModel } from '../../../models/video/video-caption'
2import { PickWith } from '@server/typings/utils' 2import { FunctionProperties, PickWith } from '@server/typings/utils'
3import { VideoModel } from '@server/models/video/video' 3import { MVideo, MVideoUUID } from '@server/typings/models'
4 4
5type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M> 5type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M>
6 6
@@ -13,4 +13,12 @@ export type MVideoCaption = Omit<VideoCaptionModel, 'Video'>
13export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'> 13export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'>
14 14
15export type MVideoCaptionVideo = MVideoCaption & 15export type MVideoCaptionVideo = MVideoCaption &
16 Use<'Video', Pick<VideoModel, 'id' | 'remote' | 'uuid'>> 16 Use<'Video', Pick<MVideo, 'id' | 'remote' | 'uuid'>>
17
18// ############################################################################
19
20// Format for API or AP object
21
22export type MVideoCaptionFormattable = FunctionProperties<MVideoCaption> &
23 Pick<MVideoCaption, 'language'> &
24 Use<'Video', MVideoUUID>
diff --git a/server/typings/models/video/video-change-ownership.ts b/server/typings/models/video/video-change-ownership.ts
index 0410115c6..72634cdb2 100644
--- a/server/typings/models/video/video-change-ownership.ts
+++ b/server/typings/models/video/video-change-ownership.ts
@@ -1,6 +1,6 @@
1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' 1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MAccountDefault, MVideoWithFileThumbnail } from '@server/typings/models' 3import { MAccountDefault, MAccountFormattable, MVideo, MVideoWithFileThumbnail } from '@server/typings/models'
4 4
5type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M> 5type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
6 6
@@ -12,3 +12,12 @@ export type MVideoChangeOwnershipFull = MVideoChangeOwnership &
12 Use<'Initiator', MAccountDefault> & 12 Use<'Initiator', MAccountDefault> &
13 Use<'NextOwner', MAccountDefault> & 13 Use<'NextOwner', MAccountDefault> &
14 Use<'Video', MVideoWithFileThumbnail> 14 Use<'Video', MVideoWithFileThumbnail>
15
16// ############################################################################
17
18// Format for API or AP object
19
20export type MVideoChangeOwnershipFormattable = Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> &
21 Use<'Initiator', MAccountFormattable> &
22 Use<'NextOwner', MAccountFormattable> &
23 Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'url' | 'name'>>
diff --git a/server/typings/models/video/video-channels.ts b/server/typings/models/video/video-channels.ts
index b6506ed9f..2be7dd7ed 100644
--- a/server/typings/models/video/video-channels.ts
+++ b/server/typings/models/video/video-channels.ts
@@ -1,19 +1,23 @@
1import { PickWith } from '../../utils' 1import { FunctionProperties, PickWith, PickWithOpt } from '../../utils'
2import { VideoChannelModel } from '../../../models/video/video-channel' 2import { VideoChannelModel } from '../../../models/video/video-channel'
3import { 3import {
4 MAccountActor, 4 MAccountActor,
5 MAccountAPI, 5 MAccountAPI,
6 MAccountDefault, 6 MAccountDefault,
7 MAccountFormattable,
7 MAccountLight, 8 MAccountLight,
8 MAccountSummaryBlocks, 9 MAccountSummaryBlocks,
10 MAccountSummaryFormattable,
9 MAccountUserId, 11 MAccountUserId,
10 MActor, 12 MActor,
11 MActorAccountChannelId, 13 MActorAccountChannelId,
12 MActorAPI, 14 MActorAPI,
13 MActorDefault, 15 MActorDefault,
14 MActorDefaultLight, 16 MActorDefaultLight,
17 MActorFormattable,
15 MActorLight, 18 MActorLight,
16 MActorSummary 19 MActorSummary,
20 MActorSummaryFormattable
17} from '../account' 21} from '../account'
18import { MVideo } from './video' 22import { MVideo } from './video'
19 23
@@ -86,7 +90,8 @@ export type MChannelActorAccountDefaultVideos = MChannel &
86 90
87// For API 91// For API
88 92
89export type MChannelSummary = Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> & 93export type MChannelSummary = FunctionProperties<MChannel> &
94 Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> &
90 Use<'Actor', MActorSummary> 95 Use<'Actor', MActorSummary>
91 96
92export type MChannelSummaryAccount = MChannelSummary & 97export type MChannelSummaryAccount = MChannelSummary &
@@ -95,3 +100,19 @@ export type MChannelSummaryAccount = MChannelSummary &
95export type MChannelAPI = MChannel & 100export type MChannelAPI = MChannel &
96 Use<'Actor', MActorAPI> & 101 Use<'Actor', MActorAPI> &
97 Use<'Account', MAccountAPI> 102 Use<'Account', MAccountAPI>
103
104// ############################################################################
105
106// Format for API or AP object
107
108export type MChannelSummaryFormattable = FunctionProperties<MChannel> &
109 Pick<MChannel, 'id' | 'name'> &
110 Use<'Actor', MActorSummaryFormattable>
111
112export type MChannelAccountSummaryFormattable = MChannelSummaryFormattable &
113 Use<'Account', MAccountSummaryFormattable>
114
115export type MChannelFormattable = FunctionProperties<MChannel> &
116 Pick<MChannel, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'support'> &
117 Use<'Actor', MActorFormattable> &
118 PickWithOpt<VideoChannelModel, 'Account', MAccountFormattable>
diff --git a/server/typings/models/video/video-comment.ts b/server/typings/models/video/video-comment.ts
index 187461213..e8bccba0f 100644
--- a/server/typings/models/video/video-comment.ts
+++ b/server/typings/models/video/video-comment.ts
@@ -1,6 +1,6 @@
1import { VideoCommentModel } from '../../../models/video/video-comment' 1import { VideoCommentModel } from '../../../models/video/video-comment'
2import { PickWith } from '../../utils' 2import { PickWith } from '../../utils'
3import { MAccountDefault } from '../account' 3import { MAccountDefault, MAccountFormattable } from '../account'
4import { MVideoAccountLight, MVideoFeed, MVideoIdUrl } from './video' 4import { MVideoAccountLight, MVideoFeed, MVideoIdUrl } from './video'
5 5
6type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M> 6type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M>
@@ -8,6 +8,7 @@ type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K,
8// ############################################################################ 8// ############################################################################
9 9
10export type MComment = Omit<VideoCommentModel, 'OriginVideoComment' | 'InReplyToVideoComment' | 'Video' | 'Account'> 10export type MComment = Omit<VideoCommentModel, 'OriginVideoComment' | 'InReplyToVideoComment' | 'Video' | 'Account'>
11export type MCommentTotalReplies = MComment & { totalReplies?: number }
11export type MCommentId = Pick<MComment, 'id'> 12export type MCommentId = Pick<MComment, 'id'>
12 13
13// ############################################################################ 14// ############################################################################
@@ -41,3 +42,10 @@ export type MCommentOwnerVideoFeed = MCommentOwner &
41// ############################################################################ 42// ############################################################################
42 43
43export type MCommentAPI = MComment & { totalReplies: number } 44export type MCommentAPI = MComment & { totalReplies: number }
45
46// ############################################################################
47
48// Format for API or AP object
49
50export type MCommentFormattable = MCommentTotalReplies &
51 Use<'Account', MAccountFormattable>
diff --git a/server/typings/models/video/video-import.ts b/server/typings/models/video/video-import.ts
index ada723713..c6a1c5b66 100644
--- a/server/typings/models/video/video-import.ts
+++ b/server/typings/models/video/video-import.ts
@@ -1,6 +1,6 @@
1import { VideoImportModel } from '@server/models/video/video-import' 1import { VideoImportModel } from '@server/models/video/video-import'
2import { PickWith } from '@server/typings/utils' 2import { PickWith, PickWithOpt } from '@server/typings/utils'
3import { MUser, MVideo, MVideoAccountLight, MVideoTag, MVideoThumbnail, MVideoWithFile } from '@server/typings/models' 3import { MUser, MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from '@server/typings/models'
4 4
5type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M> 5type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M>
6 6
@@ -22,3 +22,10 @@ export type MVideoImportDefault = MVideoImport &
22export type MVideoImportDefaultFiles = MVideoImport & 22export type MVideoImportDefaultFiles = MVideoImport &
23 Use<'User', MUser> & 23 Use<'User', MUser> &
24 Use<'Video', VideoAssociation & MVideoWithFile> 24 Use<'Video', VideoAssociation & MVideoWithFile>
25
26// ############################################################################
27
28// Format for API or AP object
29
30export type MVideoImportFormattable = MVideoImport &
31 PickWithOpt<VideoImportModel, 'Video', MVideoFormattable & MVideoTag>
diff --git a/server/typings/models/video/video-playlist-element.ts b/server/typings/models/video/video-playlist-element.ts
index 5a039d7b1..1c256fd25 100644
--- a/server/typings/models/video/video-playlist-element.ts
+++ b/server/typings/models/video/video-playlist-element.ts
@@ -1,6 +1,6 @@
1import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' 1import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MVideoPlaylistPrivacy, MVideoThumbnail, MVideoUrl } from '@server/typings/models' 3import { MVideoFormattable, MVideoPlaylistPrivacy, MVideoThumbnail, MVideoUrl } from '@server/typings/models'
4 4
5type Use<K extends keyof VideoPlaylistElementModel, M> = PickWith<VideoPlaylistElementModel, K, M> 5type Use<K extends keyof VideoPlaylistElementModel, M> = PickWith<VideoPlaylistElementModel, K, M>
6 6
@@ -23,6 +23,13 @@ export type MVideoPlaylistVideoThumbnail = MVideoPlaylistElement &
23 23
24// For API 24// For API
25 25
26export type MVideoPlaylistAP = MVideoPlaylistElement & 26export type MVideoPlaylistElementAP = MVideoPlaylistElement &
27 Use<'Video', MVideoUrl> & 27 Use<'Video', MVideoUrl> &
28 Use<'VideoPlaylist', MVideoPlaylistPrivacy> 28 Use<'VideoPlaylist', MVideoPlaylistPrivacy>
29
30// ############################################################################
31
32// Format for API or AP object
33
34export type MVideoPlaylistElementFormattable = MVideoPlaylistElement &
35 Use<'Video', MVideoFormattable>
diff --git a/server/typings/models/video/video-playlist.ts b/server/typings/models/video/video-playlist.ts
index 633818405..a926106c5 100644
--- a/server/typings/models/video/video-playlist.ts
+++ b/server/typings/models/video/video-playlist.ts
@@ -1,8 +1,8 @@
1import { VideoPlaylistModel } from '../../../models/video/video-playlist' 1import { VideoPlaylistModel } from '../../../models/video/video-playlist'
2import { PickWith } from '../../utils' 2import { PickWith } from '../../utils'
3import { MAccount, MAccountDefault, MAccountSummary } from '../account' 3import { MAccount, MAccountDefault, MAccountSummary, MAccountSummaryFormattable } from '../account'
4import { MThumbnail } from './thumbnail' 4import { MThumbnail } from './thumbnail'
5import { MChannelDefault, MChannelSummary } from './video-channels' 5import { MChannelDefault, MChannelSummary, MChannelSummaryFormattable } from './video-channels'
6import { MVideoPlaylistElementLight } from '@server/typings/models/video/video-playlist-element' 6import { MVideoPlaylistElementLight } from '@server/typings/models/video/video-playlist-element'
7 7
8type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M> 8type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M>
@@ -16,7 +16,7 @@ export type MVideoPlaylist = Omit<VideoPlaylistModel, 'OwnerAccount' | 'VideoCha
16export type MVideoPlaylistId = Pick<MVideoPlaylist, 'id'> 16export type MVideoPlaylistId = Pick<MVideoPlaylist, 'id'>
17export type MVideoPlaylistPrivacy = Pick<MVideoPlaylist, 'privacy'> 17export type MVideoPlaylistPrivacy = Pick<MVideoPlaylist, 'privacy'>
18export type MVideoPlaylistUUID = Pick<MVideoPlaylist, 'uuid'> 18export type MVideoPlaylistUUID = Pick<MVideoPlaylist, 'uuid'>
19export type MVideoPlaylistVideosLength = MVideoPlaylist & { videosLength: number } 19export type MVideoPlaylistVideosLength = MVideoPlaylist & { videosLength?: number }
20 20
21// ############################################################################ 21// ############################################################################
22 22
@@ -78,3 +78,11 @@ export type MVideoPlaylistFullSummary = MVideoPlaylist &
78 Use<'Thumbnail', MThumbnail> & 78 Use<'Thumbnail', MThumbnail> &
79 Use<'OwnerAccount', MAccountSummary> & 79 Use<'OwnerAccount', MAccountSummary> &
80 Use<'VideoChannel', MChannelSummary> 80 Use<'VideoChannel', MChannelSummary>
81
82// ############################################################################
83
84// Format for API or AP object
85
86export type MVideoPlaylistFormattable = MVideoPlaylistVideosLength &
87 Use<'OwnerAccount', MAccountSummaryFormattable> &
88 Use<'VideoChannel', MChannelSummaryFormattable>
diff --git a/server/typings/models/video/video-rate.ts b/server/typings/models/video/video-rate.ts
index fc9329993..2ff8a625b 100644
--- a/server/typings/models/video/video-rate.ts
+++ b/server/typings/models/video/video-rate.ts
@@ -1,6 +1,6 @@
1import { AccountVideoRateModel } from '@server/models/account/account-video-rate' 1import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MAccountAudience, MAccountUrl, MVideo } from '..' 3import { MAccountAudience, MAccountUrl, MVideo, MVideoFormattable } from '..'
4 4
5type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M> 5type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
6 6
@@ -14,3 +14,10 @@ export type MAccountVideoRateAccountUrl = MAccountVideoRate &
14export type MAccountVideoRateAccountVideo = MAccountVideoRate & 14export type MAccountVideoRateAccountVideo = MAccountVideoRate &
15 Use<'Account', MAccountAudience> & 15 Use<'Account', MAccountAudience> &
16 Use<'Video', MVideo> 16 Use<'Video', MVideo>
17
18// ############################################################################
19
20// Format for API or AP object
21
22export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> &
23 Use<'Video', MVideoFormattable>
diff --git a/server/typings/models/video/video.ts b/server/typings/models/video/video.ts
index 914eb7f57..bc6d56607 100644
--- a/server/typings/models/video/video.ts
+++ b/server/typings/models/video/video.ts
@@ -1,12 +1,19 @@
1import { VideoModel } from '../../../models/video/video' 1import { VideoModel } from '../../../models/video/video'
2import { PickWith, PickWithOpt } from '../../utils' 2import { PickWith, PickWithOpt } from '../../utils'
3import { MChannelAccountDefault, MChannelAccountLight, MChannelActor, MChannelUserId } from './video-channels' 3import {
4 MChannelAccountDefault,
5 MChannelAccountLight,
6 MChannelAccountSummaryFormattable,
7 MChannelActor,
8 MChannelFormattable,
9 MChannelUserId
10} from './video-channels'
4import { MTag } from './tag' 11import { MTag } from './tag'
5import { MVideoCaptionLanguage } from './video-caption' 12import { MVideoCaptionLanguage } from './video-caption'
6import { MStreamingPlaylist, MStreamingPlaylistRedundancies } from './video-streaming-playlist' 13import { MStreamingPlaylist, MStreamingPlaylistRedundancies } from './video-streaming-playlist'
7import { MVideoFile, MVideoFileRedundanciesOpt } from './video-file' 14import { MVideoFile, MVideoFileRedundanciesOpt } from './video-file'
8import { MThumbnail } from './thumbnail' 15import { MThumbnail } from './thumbnail'
9import { MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist' 16import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist'
10import { MScheduleVideoUpdate } from './schedule-video-update' 17import { MScheduleVideoUpdate } from './schedule-video-update'
11import { MUserVideoHistoryTime } from '../user/user-video-history' 18import { MUserVideoHistoryTime } from '../user/user-video-history'
12 19
@@ -144,3 +151,19 @@ export type MVideoForUser = MVideo &
144 Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> & 151 Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> &
145 Use<'VideoBlacklist', MVideoBlacklistLight> & 152 Use<'VideoBlacklist', MVideoBlacklistLight> &
146 Use<'Thumbnails', MThumbnail[]> 153 Use<'Thumbnails', MThumbnail[]>
154
155// ############################################################################
156
157// Format for API or AP object
158
159export type MVideoFormattable = MVideo &
160 PickWithOpt<VideoModel, 'UserVideoHistories', MUserVideoHistoryTime[]> &
161 Use<'VideoChannel', MChannelAccountSummaryFormattable> &
162 PickWithOpt<VideoModel, 'ScheduleVideoUpdate', Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'>> &
163 PickWithOpt<VideoModel, 'VideoBlacklist', Pick<MVideoBlacklist, 'reason'>>
164
165export type MVideoFormattableDetails = MVideoFormattable &
166 Use<'VideoChannel', MChannelFormattable> &
167 Use<'Tags', MTag[]> &
168 Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundancies[]> &
169 Use<'VideoFiles', MVideoFileRedundanciesOpt[]>