diff options
Diffstat (limited to 'server/typings/models/video')
-rw-r--r-- | server/typings/models/video/schedule-video-update.ts | 3 | ||||
-rw-r--r-- | server/typings/models/video/video-abuse.ts | 9 | ||||
-rw-r--r-- | server/typings/models/video/video-blacklist.ts | 9 | ||||
-rw-r--r-- | server/typings/models/video/video-caption.ts | 6 | ||||
-rw-r--r-- | server/typings/models/video/video-change-ownership.ts | 6 | ||||
-rw-r--r-- | server/typings/models/video/video-channels.ts | 57 | ||||
-rw-r--r-- | server/typings/models/video/video-comment.ts | 27 | ||||
-rw-r--r-- | server/typings/models/video/video-file.ts | 18 | ||||
-rw-r--r-- | server/typings/models/video/video-import.ts | 12 | ||||
-rw-r--r-- | server/typings/models/video/video-playlist-element.ts | 12 | ||||
-rw-r--r-- | server/typings/models/video/video-playlist.ts | 36 | ||||
-rw-r--r-- | server/typings/models/video/video-rate.ts | 9 | ||||
-rw-r--r-- | server/typings/models/video/video-redundancy.ts | 15 | ||||
-rw-r--r-- | server/typings/models/video/video-share.ts | 6 | ||||
-rw-r--r-- | server/typings/models/video/video-streaming-playlist.ts | 18 | ||||
-rw-r--r-- | server/typings/models/video/video.ts | 78 |
16 files changed, 214 insertions, 107 deletions
diff --git a/server/typings/models/video/schedule-video-update.ts b/server/typings/models/video/schedule-video-update.ts index e6f478cdf..95a53d139 100644 --- a/server/typings/models/video/schedule-video-update.ts +++ b/server/typings/models/video/schedule-video-update.ts | |||
@@ -10,7 +10,8 @@ export type MScheduleVideoUpdate = Omit<ScheduleVideoUpdateModel, 'Video'> | |||
10 | 10 | ||
11 | // ############################################################################ | 11 | // ############################################################################ |
12 | 12 | ||
13 | export type MScheduleVideoUpdateVideoAll = MScheduleVideoUpdate & | 13 | export type MScheduleVideoUpdateVideoAll = |
14 | MScheduleVideoUpdate & | ||
14 | Use<'Video', MVideoAPWithoutCaption & MVideoWithBlacklistLight> | 15 | Use<'Video', MVideoAPWithoutCaption & MVideoWithBlacklistLight> |
15 | 16 | ||
16 | // Format for API or AP object | 17 | // Format for API or AP object |
diff --git a/server/typings/models/video/video-abuse.ts b/server/typings/models/video/video-abuse.ts index e38c3f586..955ec4780 100644 --- a/server/typings/models/video/video-abuse.ts +++ b/server/typings/models/video/video-abuse.ts | |||
@@ -13,11 +13,13 @@ export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivit | |||
13 | 13 | ||
14 | export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'> | 14 | export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'> |
15 | 15 | ||
16 | export type MVideoAbuseVideo = MVideoAbuse & | 16 | export type MVideoAbuseVideo = |
17 | MVideoAbuse & | ||
17 | Pick<VideoAbuseModel, 'toActivityPubObject'> & | 18 | Pick<VideoAbuseModel, 'toActivityPubObject'> & |
18 | Use<'Video', MVideo> | 19 | Use<'Video', MVideo> |
19 | 20 | ||
20 | export type MVideoAbuseAccountVideo = MVideoAbuse & | 21 | export type MVideoAbuseAccountVideo = |
22 | MVideoAbuse & | ||
21 | Pick<VideoAbuseModel, 'toActivityPubObject'> & | 23 | Pick<VideoAbuseModel, 'toActivityPubObject'> & |
22 | Use<'Video', MVideo> & | 24 | Use<'Video', MVideo> & |
23 | Use<'Account', MAccountDefault> | 25 | Use<'Account', MAccountDefault> |
@@ -26,6 +28,7 @@ export type MVideoAbuseAccountVideo = MVideoAbuse & | |||
26 | 28 | ||
27 | // Format for API or AP object | 29 | // Format for API or AP object |
28 | 30 | ||
29 | export type MVideoAbuseFormattable = MVideoAbuse & | 31 | export type MVideoAbuseFormattable = |
32 | MVideoAbuse & | ||
30 | Use<'Account', MAccountFormattable> & | 33 | Use<'Account', MAccountFormattable> & |
31 | Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'name'>> | 34 | 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 7122a9dc0..ddb4db832 100644 --- a/server/typings/models/video/video-blacklist.ts +++ b/server/typings/models/video/video-blacklist.ts | |||
@@ -13,15 +13,18 @@ export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'> | |||
13 | 13 | ||
14 | // ############################################################################ | 14 | // ############################################################################ |
15 | 15 | ||
16 | export type MVideoBlacklistLightVideo = MVideoBlacklistLight & | 16 | export type MVideoBlacklistLightVideo = |
17 | MVideoBlacklistLight & | ||
17 | Use<'Video', MVideo> | 18 | Use<'Video', MVideo> |
18 | 19 | ||
19 | export type MVideoBlacklistVideo = MVideoBlacklist & | 20 | export type MVideoBlacklistVideo = |
21 | MVideoBlacklist & | ||
20 | Use<'Video', MVideo> | 22 | Use<'Video', MVideo> |
21 | 23 | ||
22 | // ############################################################################ | 24 | // ############################################################################ |
23 | 25 | ||
24 | // Format for API or AP object | 26 | // Format for API or AP object |
25 | 27 | ||
26 | export type MVideoBlacklistFormattable = MVideoBlacklist & | 28 | export type MVideoBlacklistFormattable = |
29 | MVideoBlacklist & | ||
27 | Use<'Video', MVideoFormattable> | 30 | Use<'Video', MVideoFormattable> |
diff --git a/server/typings/models/video/video-caption.ts b/server/typings/models/video/video-caption.ts index eeddedb40..e7aff6956 100644 --- a/server/typings/models/video/video-caption.ts +++ b/server/typings/models/video/video-caption.ts | |||
@@ -13,13 +13,15 @@ export type MVideoCaption = Omit<VideoCaptionModel, 'Video'> | |||
13 | export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'> | 13 | export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'> |
14 | export type MVideoCaptionLanguageUrl = Pick<MVideoCaption, 'language' | 'fileUrl' | 'getFileUrl'> | 14 | export type MVideoCaptionLanguageUrl = Pick<MVideoCaption, 'language' | 'fileUrl' | 'getFileUrl'> |
15 | 15 | ||
16 | export type MVideoCaptionVideo = MVideoCaption & | 16 | export type MVideoCaptionVideo = |
17 | MVideoCaption & | ||
17 | Use<'Video', Pick<MVideo, 'id' | 'remote' | 'uuid'>> | 18 | Use<'Video', Pick<MVideo, 'id' | 'remote' | 'uuid'>> |
18 | 19 | ||
19 | // ############################################################################ | 20 | // ############################################################################ |
20 | 21 | ||
21 | // Format for API or AP object | 22 | // Format for API or AP object |
22 | 23 | ||
23 | export type MVideoCaptionFormattable = FunctionProperties<MVideoCaption> & | 24 | export type MVideoCaptionFormattable = |
25 | FunctionProperties<MVideoCaption> & | ||
24 | Pick<MVideoCaption, 'language'> & | 26 | Pick<MVideoCaption, 'language'> & |
25 | Use<'Video', MVideoUUID> | 27 | Use<'Video', MVideoUUID> |
diff --git a/server/typings/models/video/video-change-ownership.ts b/server/typings/models/video/video-change-ownership.ts index e5b5bbc1d..971dc3db5 100644 --- a/server/typings/models/video/video-change-ownership.ts +++ b/server/typings/models/video/video-change-ownership.ts | |||
@@ -9,7 +9,8 @@ type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwn | |||
9 | 9 | ||
10 | export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'> | 10 | export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'> |
11 | 11 | ||
12 | export type MVideoChangeOwnershipFull = MVideoChangeOwnership & | 12 | export type MVideoChangeOwnershipFull = |
13 | MVideoChangeOwnership & | ||
13 | Use<'Initiator', MAccountDefault> & | 14 | Use<'Initiator', MAccountDefault> & |
14 | Use<'NextOwner', MAccountDefault> & | 15 | Use<'NextOwner', MAccountDefault> & |
15 | Use<'Video', MVideoWithAllFiles> | 16 | Use<'Video', MVideoWithAllFiles> |
@@ -18,7 +19,8 @@ export type MVideoChangeOwnershipFull = MVideoChangeOwnership & | |||
18 | 19 | ||
19 | // Format for API or AP object | 20 | // Format for API or AP object |
20 | 21 | ||
21 | export type MVideoChangeOwnershipFormattable = Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> & | 22 | export type MVideoChangeOwnershipFormattable = |
23 | Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> & | ||
22 | Use<'Initiator', MAccountFormattable> & | 24 | Use<'Initiator', MAccountFormattable> & |
23 | Use<'NextOwner', MAccountFormattable> & | 25 | Use<'NextOwner', MAccountFormattable> & |
24 | Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'url' | 'name'>> | 26 | 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 292d0ac95..50f7c2d8a 100644 --- a/server/typings/models/video/video-channels.ts +++ b/server/typings/models/video/video-channels.ts | |||
@@ -35,32 +35,39 @@ export type MChannelId = Pick<MChannel, 'id'> | |||
35 | 35 | ||
36 | // ############################################################################ | 36 | // ############################################################################ |
37 | 37 | ||
38 | export type MChannelIdActor = MChannelId & | 38 | export type MChannelIdActor = |
39 | MChannelId & | ||
39 | Use<'Actor', MActorAccountChannelId> | 40 | Use<'Actor', MActorAccountChannelId> |
40 | 41 | ||
41 | export type MChannelUserId = Pick<MChannel, 'accountId'> & | 42 | export type MChannelUserId = |
43 | Pick<MChannel, 'accountId'> & | ||
42 | Use<'Account', MAccountUserId> | 44 | Use<'Account', MAccountUserId> |
43 | 45 | ||
44 | export type MChannelActor = MChannel & | 46 | export type MChannelActor = |
47 | MChannel & | ||
45 | Use<'Actor', MActor> | 48 | Use<'Actor', MActor> |
46 | 49 | ||
47 | export type MChannelUrl = Use<'Actor', MActorUrl> | 50 | export type MChannelUrl = Use<'Actor', MActorUrl> |
48 | 51 | ||
49 | // Default scope | 52 | // Default scope |
50 | export type MChannelDefault = MChannel & | 53 | export type MChannelDefault = |
54 | MChannel & | ||
51 | Use<'Actor', MActorDefault> | 55 | Use<'Actor', MActorDefault> |
52 | 56 | ||
53 | // ############################################################################ | 57 | // ############################################################################ |
54 | 58 | ||
55 | // Not all association attributes | 59 | // Not all association attributes |
56 | 60 | ||
57 | export type MChannelLight = MChannel & | 61 | export type MChannelLight = |
62 | MChannel & | ||
58 | Use<'Actor', MActorDefaultLight> | 63 | Use<'Actor', MActorDefaultLight> |
59 | 64 | ||
60 | export type MChannelActorLight = MChannel & | 65 | export type MChannelActorLight = |
66 | MChannel & | ||
61 | Use<'Actor', MActorLight> | 67 | Use<'Actor', MActorLight> |
62 | 68 | ||
63 | export type MChannelAccountLight = MChannel & | 69 | export type MChannelAccountLight = |
70 | MChannel & | ||
64 | Use<'Actor', MActorDefaultLight> & | 71 | Use<'Actor', MActorDefaultLight> & |
65 | Use<'Account', MAccountLight> | 72 | Use<'Account', MAccountLight> |
66 | 73 | ||
@@ -68,24 +75,29 @@ export type MChannelAccountLight = MChannel & | |||
68 | 75 | ||
69 | // Account associations | 76 | // Account associations |
70 | 77 | ||
71 | export type MChannelAccountActor = MChannel & | 78 | export type MChannelAccountActor = |
79 | MChannel & | ||
72 | Use<'Account', MAccountActor> | 80 | Use<'Account', MAccountActor> |
73 | 81 | ||
74 | export type MChannelAccountDefault = MChannel & | 82 | export type MChannelAccountDefault = |
83 | MChannel & | ||
75 | Use<'Actor', MActorDefault> & | 84 | Use<'Actor', MActorDefault> & |
76 | Use<'Account', MAccountDefault> | 85 | Use<'Account', MAccountDefault> |
77 | 86 | ||
78 | export type MChannelActorAccountActor = MChannel & | 87 | export type MChannelActorAccountActor = |
88 | MChannel & | ||
79 | Use<'Account', MAccountActor> & | 89 | Use<'Account', MAccountActor> & |
80 | Use<'Actor', MActor> | 90 | Use<'Actor', MActor> |
81 | 91 | ||
82 | // ############################################################################ | 92 | // ############################################################################ |
83 | 93 | ||
84 | // Videos associations | 94 | // Videos associations |
85 | export type MChannelVideos = MChannel & | 95 | export type MChannelVideos = |
96 | MChannel & | ||
86 | Use<'Videos', MVideo[]> | 97 | Use<'Videos', MVideo[]> |
87 | 98 | ||
88 | export type MChannelActorAccountDefaultVideos = MChannel & | 99 | export type MChannelActorAccountDefaultVideos = |
100 | MChannel & | ||
89 | Use<'Actor', MActorDefault> & | 101 | Use<'Actor', MActorDefault> & |
90 | Use<'Account', MAccountDefault> & | 102 | Use<'Account', MAccountDefault> & |
91 | Use<'Videos', MVideo[]> | 103 | Use<'Videos', MVideo[]> |
@@ -94,14 +106,17 @@ export type MChannelActorAccountDefaultVideos = MChannel & | |||
94 | 106 | ||
95 | // For API | 107 | // For API |
96 | 108 | ||
97 | export type MChannelSummary = FunctionProperties<MChannel> & | 109 | export type MChannelSummary = |
110 | FunctionProperties<MChannel> & | ||
98 | Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> & | 111 | Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> & |
99 | Use<'Actor', MActorSummary> | 112 | Use<'Actor', MActorSummary> |
100 | 113 | ||
101 | export type MChannelSummaryAccount = MChannelSummary & | 114 | export type MChannelSummaryAccount = |
115 | MChannelSummary & | ||
102 | Use<'Account', MAccountSummaryBlocks> | 116 | Use<'Account', MAccountSummaryBlocks> |
103 | 117 | ||
104 | export type MChannelAPI = MChannel & | 118 | export type MChannelAPI = |
119 | MChannel & | ||
105 | Use<'Actor', MActorAPI> & | 120 | Use<'Actor', MActorAPI> & |
106 | Use<'Account', MAccountAPI> | 121 | Use<'Account', MAccountAPI> |
107 | 122 | ||
@@ -109,18 +124,22 @@ export type MChannelAPI = MChannel & | |||
109 | 124 | ||
110 | // Format for API or AP object | 125 | // Format for API or AP object |
111 | 126 | ||
112 | export type MChannelSummaryFormattable = FunctionProperties<MChannel> & | 127 | export type MChannelSummaryFormattable = |
128 | FunctionProperties<MChannel> & | ||
113 | Pick<MChannel, 'id' | 'name'> & | 129 | Pick<MChannel, 'id' | 'name'> & |
114 | Use<'Actor', MActorSummaryFormattable> | 130 | Use<'Actor', MActorSummaryFormattable> |
115 | 131 | ||
116 | export type MChannelAccountSummaryFormattable = MChannelSummaryFormattable & | 132 | export type MChannelAccountSummaryFormattable = |
133 | MChannelSummaryFormattable & | ||
117 | Use<'Account', MAccountSummaryFormattable> | 134 | Use<'Account', MAccountSummaryFormattable> |
118 | 135 | ||
119 | export type MChannelFormattable = FunctionProperties<MChannel> & | 136 | export type MChannelFormattable = |
137 | FunctionProperties<MChannel> & | ||
120 | Pick<MChannel, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'support'> & | 138 | Pick<MChannel, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'support'> & |
121 | Use<'Actor', MActorFormattable> & | 139 | Use<'Actor', MActorFormattable> & |
122 | PickWithOpt<VideoChannelModel, 'Account', MAccountFormattable> | 140 | PickWithOpt<VideoChannelModel, 'Account', MAccountFormattable> |
123 | 141 | ||
124 | export type MChannelAP = Pick<MChannel, 'name' | 'description' | 'support'> & | 142 | export type MChannelAP = |
143 | Pick<MChannel, 'name' | 'description' | 'support'> & | ||
125 | Use<'Actor', MActorAP> & | 144 | Use<'Actor', MActorAP> & |
126 | Use<'Account', MAccountUrl> | 145 | Use<'Account', MAccountUrl> |
diff --git a/server/typings/models/video/video-comment.ts b/server/typings/models/video/video-comment.ts index d693f9186..d6e0b66f5 100644 --- a/server/typings/models/video/video-comment.ts +++ b/server/typings/models/video/video-comment.ts | |||
@@ -14,30 +14,37 @@ export type MCommentUrl = Pick<MComment, 'url'> | |||
14 | 14 | ||
15 | // ############################################################################ | 15 | // ############################################################################ |
16 | 16 | ||
17 | export type MCommentOwner = MComment & | 17 | export type MCommentOwner = |
18 | MComment & | ||
18 | Use<'Account', MAccountDefault> | 19 | Use<'Account', MAccountDefault> |
19 | 20 | ||
20 | export type MCommentVideo = MComment & | 21 | export type MCommentVideo = |
22 | MComment & | ||
21 | Use<'Video', MVideoAccountLight> | 23 | Use<'Video', MVideoAccountLight> |
22 | 24 | ||
23 | export type MCommentReply = MComment & | 25 | export type MCommentReply = |
26 | MComment & | ||
24 | Use<'InReplyToVideoComment', MComment> | 27 | Use<'InReplyToVideoComment', MComment> |
25 | 28 | ||
26 | export type MCommentOwnerVideo = MComment & | 29 | export type MCommentOwnerVideo = |
30 | MComment & | ||
27 | Use<'Account', MAccountDefault> & | 31 | Use<'Account', MAccountDefault> & |
28 | Use<'Video', MVideoAccountLight> | 32 | Use<'Video', MVideoAccountLight> |
29 | 33 | ||
30 | export type MCommentOwnerVideoReply = MComment & | 34 | export type MCommentOwnerVideoReply = |
35 | MComment & | ||
31 | Use<'Account', MAccountDefault> & | 36 | Use<'Account', MAccountDefault> & |
32 | Use<'Video', MVideoAccountLight> & | 37 | Use<'Video', MVideoAccountLight> & |
33 | Use<'InReplyToVideoComment', MComment> | 38 | Use<'InReplyToVideoComment', MComment> |
34 | 39 | ||
35 | export type MCommentOwnerReplyVideoLight = MComment & | 40 | export type MCommentOwnerReplyVideoLight = |
41 | MComment & | ||
36 | Use<'Account', MAccountDefault> & | 42 | Use<'Account', MAccountDefault> & |
37 | Use<'InReplyToVideoComment', MComment> & | 43 | Use<'InReplyToVideoComment', MComment> & |
38 | Use<'Video', MVideoIdUrl> | 44 | Use<'Video', MVideoIdUrl> |
39 | 45 | ||
40 | export type MCommentOwnerVideoFeed = MCommentOwner & | 46 | export type MCommentOwnerVideoFeed = |
47 | MCommentOwner & | ||
41 | Use<'Video', MVideoFeed> | 48 | Use<'Video', MVideoFeed> |
42 | 49 | ||
43 | // ############################################################################ | 50 | // ############################################################################ |
@@ -48,10 +55,12 @@ export type MCommentAPI = MComment & { totalReplies: number } | |||
48 | 55 | ||
49 | // Format for API or AP object | 56 | // Format for API or AP object |
50 | 57 | ||
51 | export type MCommentFormattable = MCommentTotalReplies & | 58 | export type MCommentFormattable = |
59 | MCommentTotalReplies & | ||
52 | Use<'Account', MAccountFormattable> | 60 | Use<'Account', MAccountFormattable> |
53 | 61 | ||
54 | export type MCommentAP = MComment & | 62 | export type MCommentAP = |
63 | MComment & | ||
55 | Use<'Account', MAccountUrl> & | 64 | Use<'Account', MAccountUrl> & |
56 | PickWithOpt<VideoCommentModel, 'Video', MVideoUrl> & | 65 | PickWithOpt<VideoCommentModel, 'Video', MVideoUrl> & |
57 | PickWithOpt<VideoCommentModel, 'InReplyToVideoComment', MCommentUrl> | 66 | PickWithOpt<VideoCommentModel, 'InReplyToVideoComment', MCommentUrl> |
diff --git a/server/typings/models/video/video-file.ts b/server/typings/models/video/video-file.ts index 139b22b2c..3fcaca78f 100644 --- a/server/typings/models/video/video-file.ts +++ b/server/typings/models/video/video-file.ts | |||
@@ -10,22 +10,28 @@ type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M> | |||
10 | 10 | ||
11 | export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos' | 'VideoStreamingPlaylist'> | 11 | export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos' | 'VideoStreamingPlaylist'> |
12 | 12 | ||
13 | export type MVideoFileVideo = MVideoFile & | 13 | export type MVideoFileVideo = |
14 | MVideoFile & | ||
14 | Use<'Video', MVideo> | 15 | Use<'Video', MVideo> |
15 | 16 | ||
16 | export type MVideoFileStreamingPlaylist = MVideoFile & | 17 | export type MVideoFileStreamingPlaylist = |
18 | MVideoFile & | ||
17 | Use<'VideoStreamingPlaylist', MStreamingPlaylist> | 19 | Use<'VideoStreamingPlaylist', MStreamingPlaylist> |
18 | 20 | ||
19 | export type MVideoFileStreamingPlaylistVideo = MVideoFile & | 21 | export type MVideoFileStreamingPlaylistVideo = |
22 | MVideoFile & | ||
20 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> | 23 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> |
21 | 24 | ||
22 | export type MVideoFileVideoUUID = MVideoFile & | 25 | export type MVideoFileVideoUUID = |
26 | MVideoFile & | ||
23 | Use<'Video', MVideoUUID> | 27 | Use<'Video', MVideoUUID> |
24 | 28 | ||
25 | export type MVideoFileRedundanciesAll = MVideoFile & | 29 | export type MVideoFileRedundanciesAll = |
30 | MVideoFile & | ||
26 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancy[]> | 31 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancy[]> |
27 | 32 | ||
28 | export type MVideoFileRedundanciesOpt = MVideoFile & | 33 | export type MVideoFileRedundanciesOpt = |
34 | MVideoFile & | ||
29 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> | 35 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> |
30 | 36 | ||
31 | export function isStreamingPlaylistFile (file: any): file is MVideoFileStreamingPlaylist { | 37 | export function isStreamingPlaylistFile (file: any): file is MVideoFileStreamingPlaylist { |
diff --git a/server/typings/models/video/video-import.ts b/server/typings/models/video/video-import.ts index e119f17f9..4e5c2e4f0 100644 --- a/server/typings/models/video/video-import.ts +++ b/server/typings/models/video/video-import.ts | |||
@@ -9,18 +9,21 @@ type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M> | |||
9 | 9 | ||
10 | export type MVideoImport = Omit<VideoImportModel, 'User' | 'Video'> | 10 | export type MVideoImport = Omit<VideoImportModel, 'User' | 'Video'> |
11 | 11 | ||
12 | export type MVideoImportVideo = MVideoImport & | 12 | export type MVideoImportVideo = |
13 | MVideoImport & | ||
13 | Use<'Video', MVideo> | 14 | Use<'Video', MVideo> |
14 | 15 | ||
15 | // ############################################################################ | 16 | // ############################################################################ |
16 | 17 | ||
17 | type VideoAssociation = MVideoTag & MVideoAccountLight & MVideoThumbnail | 18 | type VideoAssociation = MVideoTag & MVideoAccountLight & MVideoThumbnail |
18 | 19 | ||
19 | export type MVideoImportDefault = MVideoImport & | 20 | export type MVideoImportDefault = |
21 | MVideoImport & | ||
20 | Use<'User', MUser> & | 22 | Use<'User', MUser> & |
21 | Use<'Video', VideoAssociation> | 23 | Use<'Video', VideoAssociation> |
22 | 24 | ||
23 | export type MVideoImportDefaultFiles = MVideoImport & | 25 | export type MVideoImportDefaultFiles = |
26 | MVideoImport & | ||
24 | Use<'User', MUser> & | 27 | Use<'User', MUser> & |
25 | Use<'Video', VideoAssociation & MVideoWithFile> | 28 | Use<'Video', VideoAssociation & MVideoWithFile> |
26 | 29 | ||
@@ -28,5 +31,6 @@ export type MVideoImportDefaultFiles = MVideoImport & | |||
28 | 31 | ||
29 | // Format for API or AP object | 32 | // Format for API or AP object |
30 | 33 | ||
31 | export type MVideoImportFormattable = MVideoImport & | 34 | export type MVideoImportFormattable = |
35 | MVideoImport & | ||
32 | PickWithOpt<VideoImportModel, 'Video', MVideoFormattable & MVideoTag> | 36 | 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 1aeff78d8..f33c76594 100644 --- a/server/typings/models/video/video-playlist-element.ts +++ b/server/typings/models/video/video-playlist-element.ts | |||
@@ -17,10 +17,12 @@ export type MVideoPlaylistElementLight = Pick<MVideoPlaylistElement, 'id' | 'vid | |||
17 | 17 | ||
18 | // ############################################################################ | 18 | // ############################################################################ |
19 | 19 | ||
20 | export type MVideoPlaylistVideoThumbnail = MVideoPlaylistElement & | 20 | export type MVideoPlaylistVideoThumbnail = |
21 | MVideoPlaylistElement & | ||
21 | Use<'Video', MVideoThumbnail> | 22 | Use<'Video', MVideoThumbnail> |
22 | 23 | ||
23 | export type MVideoPlaylistElementVideoUrlPlaylistPrivacy = MVideoPlaylistElement & | 24 | export type MVideoPlaylistElementVideoUrlPlaylistPrivacy = |
25 | MVideoPlaylistElement & | ||
24 | Use<'Video', MVideoUrl> & | 26 | Use<'Video', MVideoUrl> & |
25 | Use<'VideoPlaylist', MVideoPlaylistPrivacy> | 27 | Use<'VideoPlaylist', MVideoPlaylistPrivacy> |
26 | 28 | ||
@@ -28,8 +30,10 @@ export type MVideoPlaylistElementVideoUrlPlaylistPrivacy = MVideoPlaylistElement | |||
28 | 30 | ||
29 | // Format for API or AP object | 31 | // Format for API or AP object |
30 | 32 | ||
31 | export type MVideoPlaylistElementFormattable = MVideoPlaylistElement & | 33 | export type MVideoPlaylistElementFormattable = |
34 | MVideoPlaylistElement & | ||
32 | Use<'Video', MVideoFormattable> | 35 | Use<'Video', MVideoFormattable> |
33 | 36 | ||
34 | export type MVideoPlaylistElementAP = MVideoPlaylistElement & | 37 | export type MVideoPlaylistElementAP = |
38 | MVideoPlaylistElement & | ||
35 | Use<'Video', MVideoUrl> | 39 | Use<'Video', MVideoUrl> |
diff --git a/server/typings/models/video/video-playlist.ts b/server/typings/models/video/video-playlist.ts index a40c7aca9..49c27f4a7 100644 --- a/server/typings/models/video/video-playlist.ts +++ b/server/typings/models/video/video-playlist.ts | |||
@@ -22,30 +22,36 @@ export type MVideoPlaylistVideosLength = MVideoPlaylist & { videosLength?: numbe | |||
22 | 22 | ||
23 | // With elements | 23 | // With elements |
24 | 24 | ||
25 | export type MVideoPlaylistWithElements = MVideoPlaylist & | 25 | export type MVideoPlaylistWithElements = |
26 | MVideoPlaylist & | ||
26 | Use<'VideoPlaylistElements', MVideoPlaylistElementLight[]> | 27 | Use<'VideoPlaylistElements', MVideoPlaylistElementLight[]> |
27 | 28 | ||
28 | export type MVideoPlaylistIdWithElements = MVideoPlaylistId & | 29 | export type MVideoPlaylistIdWithElements = |
30 | MVideoPlaylistId & | ||
29 | Use<'VideoPlaylistElements', MVideoPlaylistElementLight[]> | 31 | Use<'VideoPlaylistElements', MVideoPlaylistElementLight[]> |
30 | 32 | ||
31 | // ############################################################################ | 33 | // ############################################################################ |
32 | 34 | ||
33 | // With account | 35 | // With account |
34 | 36 | ||
35 | export type MVideoPlaylistOwner = MVideoPlaylist & | 37 | export type MVideoPlaylistOwner = |
38 | MVideoPlaylist & | ||
36 | Use<'OwnerAccount', MAccount> | 39 | Use<'OwnerAccount', MAccount> |
37 | 40 | ||
38 | export type MVideoPlaylistOwnerDefault = MVideoPlaylist & | 41 | export type MVideoPlaylistOwnerDefault = |
42 | MVideoPlaylist & | ||
39 | Use<'OwnerAccount', MAccountDefault> | 43 | Use<'OwnerAccount', MAccountDefault> |
40 | 44 | ||
41 | // ############################################################################ | 45 | // ############################################################################ |
42 | 46 | ||
43 | // With thumbnail | 47 | // With thumbnail |
44 | 48 | ||
45 | export type MVideoPlaylistThumbnail = MVideoPlaylist & | 49 | export type MVideoPlaylistThumbnail = |
50 | MVideoPlaylist & | ||
46 | Use<'Thumbnail', MThumbnail> | 51 | Use<'Thumbnail', MThumbnail> |
47 | 52 | ||
48 | export type MVideoPlaylistAccountThumbnail = MVideoPlaylist & | 53 | export type MVideoPlaylistAccountThumbnail = |
54 | MVideoPlaylist & | ||
49 | Use<'OwnerAccount', MAccountDefault> & | 55 | Use<'OwnerAccount', MAccountDefault> & |
50 | Use<'Thumbnail', MThumbnail> | 56 | Use<'Thumbnail', MThumbnail> |
51 | 57 | ||
@@ -53,7 +59,8 @@ export type MVideoPlaylistAccountThumbnail = MVideoPlaylist & | |||
53 | 59 | ||
54 | // With channel | 60 | // With channel |
55 | 61 | ||
56 | export type MVideoPlaylistAccountChannelDefault = MVideoPlaylist & | 62 | export type MVideoPlaylistAccountChannelDefault = |
63 | MVideoPlaylist & | ||
57 | Use<'OwnerAccount', MAccountDefault> & | 64 | Use<'OwnerAccount', MAccountDefault> & |
58 | Use<'VideoChannel', MChannelDefault> | 65 | Use<'VideoChannel', MChannelDefault> |
59 | 66 | ||
@@ -61,7 +68,8 @@ export type MVideoPlaylistAccountChannelDefault = MVideoPlaylist & | |||
61 | 68 | ||
62 | // With all associations | 69 | // With all associations |
63 | 70 | ||
64 | export type MVideoPlaylistFull = MVideoPlaylist & | 71 | export type MVideoPlaylistFull = |
72 | MVideoPlaylist & | ||
65 | Use<'OwnerAccount', MAccountDefault> & | 73 | Use<'OwnerAccount', MAccountDefault> & |
66 | Use<'VideoChannel', MChannelDefault> & | 74 | Use<'VideoChannel', MChannelDefault> & |
67 | Use<'Thumbnail', MThumbnail> | 75 | Use<'Thumbnail', MThumbnail> |
@@ -70,11 +78,13 @@ export type MVideoPlaylistFull = MVideoPlaylist & | |||
70 | 78 | ||
71 | // For API | 79 | // For API |
72 | 80 | ||
73 | export type MVideoPlaylistAccountChannelSummary = MVideoPlaylist & | 81 | export type MVideoPlaylistAccountChannelSummary = |
82 | MVideoPlaylist & | ||
74 | Use<'OwnerAccount', MAccountSummary> & | 83 | Use<'OwnerAccount', MAccountSummary> & |
75 | Use<'VideoChannel', MChannelSummary> | 84 | Use<'VideoChannel', MChannelSummary> |
76 | 85 | ||
77 | export type MVideoPlaylistFullSummary = MVideoPlaylist & | 86 | export type MVideoPlaylistFullSummary = |
87 | MVideoPlaylist & | ||
78 | Use<'Thumbnail', MThumbnail> & | 88 | Use<'Thumbnail', MThumbnail> & |
79 | Use<'OwnerAccount', MAccountSummary> & | 89 | Use<'OwnerAccount', MAccountSummary> & |
80 | Use<'VideoChannel', MChannelSummary> | 90 | Use<'VideoChannel', MChannelSummary> |
@@ -83,10 +93,12 @@ export type MVideoPlaylistFullSummary = MVideoPlaylist & | |||
83 | 93 | ||
84 | // Format for API or AP object | 94 | // Format for API or AP object |
85 | 95 | ||
86 | export type MVideoPlaylistFormattable = MVideoPlaylistVideosLength & | 96 | export type MVideoPlaylistFormattable = |
97 | MVideoPlaylistVideosLength & | ||
87 | Use<'OwnerAccount', MAccountSummaryFormattable> & | 98 | Use<'OwnerAccount', MAccountSummaryFormattable> & |
88 | Use<'VideoChannel', MChannelSummaryFormattable> | 99 | Use<'VideoChannel', MChannelSummaryFormattable> |
89 | 100 | ||
90 | export type MVideoPlaylistAP = MVideoPlaylist & | 101 | export type MVideoPlaylistAP = |
102 | MVideoPlaylist & | ||
91 | Use<'Thumbnail', MThumbnail> & | 103 | Use<'Thumbnail', MThumbnail> & |
92 | Use<'VideoChannel', MChannelUrl> | 104 | Use<'VideoChannel', MChannelUrl> |
diff --git a/server/typings/models/video/video-rate.ts b/server/typings/models/video/video-rate.ts index f6bb527fc..64ce4965b 100644 --- a/server/typings/models/video/video-rate.ts +++ b/server/typings/models/video/video-rate.ts | |||
@@ -9,10 +9,12 @@ type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateMo | |||
9 | 9 | ||
10 | export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'> | 10 | export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'> |
11 | 11 | ||
12 | export type MAccountVideoRateAccountUrl = MAccountVideoRate & | 12 | export type MAccountVideoRateAccountUrl = |
13 | MAccountVideoRate & | ||
13 | Use<'Account', MAccountUrl> | 14 | Use<'Account', MAccountUrl> |
14 | 15 | ||
15 | export type MAccountVideoRateAccountVideo = MAccountVideoRate & | 16 | export type MAccountVideoRateAccountVideo = |
17 | MAccountVideoRate & | ||
16 | Use<'Account', MAccountAudience> & | 18 | Use<'Account', MAccountAudience> & |
17 | Use<'Video', MVideo> | 19 | Use<'Video', MVideo> |
18 | 20 | ||
@@ -20,5 +22,6 @@ export type MAccountVideoRateAccountVideo = MAccountVideoRate & | |||
20 | 22 | ||
21 | // Format for API or AP object | 23 | // Format for API or AP object |
22 | 24 | ||
23 | export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> & | 25 | export type MAccountVideoRateFormattable = |
26 | Pick<MAccountVideoRate, 'type'> & | ||
24 | Use<'Video', MVideoFormattable> | 27 | Use<'Video', MVideoFormattable> |
diff --git a/server/typings/models/video/video-redundancy.ts b/server/typings/models/video/video-redundancy.ts index 25bdac057..5107aa7f4 100644 --- a/server/typings/models/video/video-redundancy.ts +++ b/server/typings/models/video/video-redundancy.ts | |||
@@ -16,16 +16,20 @@ export type MVideoRedundancyFileUrl = Pick<MVideoRedundancy, 'fileUrl'> | |||
16 | 16 | ||
17 | // ############################################################################ | 17 | // ############################################################################ |
18 | 18 | ||
19 | export type MVideoRedundancyFile = MVideoRedundancy & | 19 | export type MVideoRedundancyFile = |
20 | MVideoRedundancy & | ||
20 | Use<'VideoFile', MVideoFile> | 21 | Use<'VideoFile', MVideoFile> |
21 | 22 | ||
22 | export type MVideoRedundancyFileVideo = MVideoRedundancy & | 23 | export type MVideoRedundancyFileVideo = |
24 | MVideoRedundancy & | ||
23 | Use<'VideoFile', MVideoFileVideo> | 25 | Use<'VideoFile', MVideoFileVideo> |
24 | 26 | ||
25 | export type MVideoRedundancyStreamingPlaylistVideo = MVideoRedundancy & | 27 | export type MVideoRedundancyStreamingPlaylistVideo = |
28 | MVideoRedundancy & | ||
26 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> | 29 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> |
27 | 30 | ||
28 | export type MVideoRedundancyVideo = MVideoRedundancy & | 31 | export type MVideoRedundancyVideo = |
32 | MVideoRedundancy & | ||
29 | Use<'VideoFile', MVideoFileVideo> & | 33 | Use<'VideoFile', MVideoFileVideo> & |
30 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> | 34 | Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo> |
31 | 35 | ||
@@ -33,6 +37,7 @@ export type MVideoRedundancyVideo = MVideoRedundancy & | |||
33 | 37 | ||
34 | // Format for API or AP object | 38 | // Format for API or AP object |
35 | 39 | ||
36 | export type MVideoRedundancyAP = MVideoRedundancy & | 40 | export type MVideoRedundancyAP = |
41 | MVideoRedundancy & | ||
37 | PickWithOpt<VideoRedundancyModel, 'VideoFile', MVideoFile & PickWith<VideoFileModel, 'Video', MVideoUrl>> & | 42 | PickWithOpt<VideoRedundancyModel, 'VideoFile', MVideoFile & PickWith<VideoFileModel, 'Video', MVideoUrl>> & |
38 | PickWithOpt<VideoRedundancyModel, 'VideoStreamingPlaylist', PickWith<VideoStreamingPlaylistModel, 'Video', MVideoUrl>> | 43 | PickWithOpt<VideoRedundancyModel, 'VideoStreamingPlaylist', PickWith<VideoStreamingPlaylistModel, 'Video', MVideoUrl>> |
diff --git a/server/typings/models/video/video-share.ts b/server/typings/models/video/video-share.ts index a7a90beeb..50ca75d26 100644 --- a/server/typings/models/video/video-share.ts +++ b/server/typings/models/video/video-share.ts | |||
@@ -9,9 +9,11 @@ type Use<K extends keyof VideoShareModel, M> = PickWith<VideoShareModel, K, M> | |||
9 | 9 | ||
10 | export type MVideoShare = Omit<VideoShareModel, 'Actor' | 'Video'> | 10 | export type MVideoShare = Omit<VideoShareModel, 'Actor' | 'Video'> |
11 | 11 | ||
12 | export type MVideoShareActor = MVideoShare & | 12 | export type MVideoShareActor = |
13 | MVideoShare & | ||
13 | Use<'Actor', MActorDefault> | 14 | Use<'Actor', MActorDefault> |
14 | 15 | ||
15 | export type MVideoShareFull = MVideoShare & | 16 | export type MVideoShareFull = |
17 | MVideoShare & | ||
16 | Use<'Actor', MActorDefault> & | 18 | Use<'Actor', MActorDefault> & |
17 | Use<'Video', MVideo> | 19 | Use<'Video', MVideo> |
diff --git a/server/typings/models/video/video-streaming-playlist.ts b/server/typings/models/video/video-streaming-playlist.ts index 6fd489945..3f54aa560 100644 --- a/server/typings/models/video/video-streaming-playlist.ts +++ b/server/typings/models/video/video-streaming-playlist.ts | |||
@@ -10,25 +10,31 @@ type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreami | |||
10 | 10 | ||
11 | export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos' | 'VideoFiles'> | 11 | export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos' | 'VideoFiles'> |
12 | 12 | ||
13 | export type MStreamingPlaylistFiles = MStreamingPlaylist & | 13 | export type MStreamingPlaylistFiles = |
14 | MStreamingPlaylist & | ||
14 | Use<'VideoFiles', MVideoFile[]> | 15 | Use<'VideoFiles', MVideoFile[]> |
15 | 16 | ||
16 | export type MStreamingPlaylistVideo = MStreamingPlaylist & | 17 | export type MStreamingPlaylistVideo = |
18 | MStreamingPlaylist & | ||
17 | Use<'Video', MVideo> | 19 | Use<'Video', MVideo> |
18 | 20 | ||
19 | export type MStreamingPlaylistFilesVideo = MStreamingPlaylist & | 21 | export type MStreamingPlaylistFilesVideo = |
22 | MStreamingPlaylist & | ||
20 | Use<'VideoFiles', MVideoFile[]> & | 23 | Use<'VideoFiles', MVideoFile[]> & |
21 | Use<'Video', MVideo> | 24 | Use<'Video', MVideo> |
22 | 25 | ||
23 | export type MStreamingPlaylistRedundanciesAll = MStreamingPlaylist & | 26 | export type MStreamingPlaylistRedundanciesAll = |
27 | MStreamingPlaylist & | ||
24 | Use<'VideoFiles', MVideoFile[]> & | 28 | Use<'VideoFiles', MVideoFile[]> & |
25 | Use<'RedundancyVideos', MVideoRedundancy[]> | 29 | Use<'RedundancyVideos', MVideoRedundancy[]> |
26 | 30 | ||
27 | export type MStreamingPlaylistRedundancies = MStreamingPlaylist & | 31 | export type MStreamingPlaylistRedundancies = |
32 | MStreamingPlaylist & | ||
28 | Use<'VideoFiles', MVideoFile[]> & | 33 | Use<'VideoFiles', MVideoFile[]> & |
29 | Use<'RedundancyVideos', MVideoRedundancyFileUrl[]> | 34 | Use<'RedundancyVideos', MVideoRedundancyFileUrl[]> |
30 | 35 | ||
31 | export type MStreamingPlaylistRedundanciesOpt = MStreamingPlaylist & | 36 | export type MStreamingPlaylistRedundanciesOpt = |
37 | MStreamingPlaylist & | ||
32 | Use<'VideoFiles', MVideoFile[]> & | 38 | Use<'VideoFiles', MVideoFile[]> & |
33 | PickWithOpt<VideoStreamingPlaylistModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> | 39 | PickWithOpt<VideoStreamingPlaylistModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> |
34 | 40 | ||
diff --git a/server/typings/models/video/video.ts b/server/typings/models/video/video.ts index 82d76f40c..7eff0a913 100644 --- a/server/typings/models/video/video.ts +++ b/server/typings/models/video/video.ts | |||
@@ -26,7 +26,8 @@ type Use<K extends keyof VideoModel, M> = PickWith<VideoModel, K, M> | |||
26 | 26 | ||
27 | // ############################################################################ | 27 | // ############################################################################ |
28 | 28 | ||
29 | export type MVideo = Omit<VideoModel, 'VideoChannel' | 'Tags' | 'Thumbnails' | 'VideoPlaylistElements' | 'VideoAbuses' | | 29 | export type MVideo = |
30 | Omit<VideoModel, 'VideoChannel' | 'Tags' | 'Thumbnails' | 'VideoPlaylistElements' | 'VideoAbuses' | | ||
30 | 'VideoFiles' | 'VideoStreamingPlaylists' | 'VideoShares' | 'AccountVideoRates' | 'VideoComments' | 'VideoViews' | 'UserVideoHistories' | | 31 | 'VideoFiles' | 'VideoStreamingPlaylists' | 'VideoShares' | 'AccountVideoRates' | 'VideoComments' | 'VideoViews' | 'UserVideoHistories' | |
31 | 'ScheduleVideoUpdate' | 'VideoBlacklist' | 'VideoImport' | 'VideoCaptions'> | 32 | 'ScheduleVideoUpdate' | 'VideoBlacklist' | 'VideoImport' | 'VideoCaptions'> |
32 | 33 | ||
@@ -44,50 +45,63 @@ export type MVideoFeed = Pick<MVideo, 'name' | 'uuid'> | |||
44 | // Video raw associations: schedules, video files, tags, thumbnails, captions, streaming playlists | 45 | // Video raw associations: schedules, video files, tags, thumbnails, captions, streaming playlists |
45 | 46 | ||
46 | // "With" to not confuse with the VideoFile model | 47 | // "With" to not confuse with the VideoFile model |
47 | export type MVideoWithFile = MVideo & | 48 | export type MVideoWithFile = |
49 | MVideo & | ||
48 | Use<'VideoFiles', MVideoFile[]> & | 50 | Use<'VideoFiles', MVideoFile[]> & |
49 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> | 51 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> |
50 | 52 | ||
51 | export type MVideoThumbnail = MVideo & | 53 | export type MVideoThumbnail = |
54 | MVideo & | ||
52 | Use<'Thumbnails', MThumbnail[]> | 55 | Use<'Thumbnails', MThumbnail[]> |
53 | 56 | ||
54 | export type MVideoIdThumbnail = MVideoId & | 57 | export type MVideoIdThumbnail = |
58 | MVideoId & | ||
55 | Use<'Thumbnails', MThumbnail[]> | 59 | Use<'Thumbnails', MThumbnail[]> |
56 | 60 | ||
57 | export type MVideoWithFileThumbnail = MVideo & | 61 | export type MVideoWithFileThumbnail = |
62 | MVideo & | ||
58 | Use<'VideoFiles', MVideoFile[]> & | 63 | Use<'VideoFiles', MVideoFile[]> & |
59 | Use<'Thumbnails', MThumbnail[]> | 64 | Use<'Thumbnails', MThumbnail[]> |
60 | 65 | ||
61 | export type MVideoThumbnailBlacklist = MVideo & | 66 | export type MVideoThumbnailBlacklist = |
67 | MVideo & | ||
62 | Use<'Thumbnails', MThumbnail[]> & | 68 | Use<'Thumbnails', MThumbnail[]> & |
63 | Use<'VideoBlacklist', MVideoBlacklistLight> | 69 | Use<'VideoBlacklist', MVideoBlacklistLight> |
64 | 70 | ||
65 | export type MVideoTag = MVideo & | 71 | export type MVideoTag = |
72 | MVideo & | ||
66 | Use<'Tags', MTag[]> | 73 | Use<'Tags', MTag[]> |
67 | 74 | ||
68 | export type MVideoWithSchedule = MVideo & | 75 | export type MVideoWithSchedule = |
76 | MVideo & | ||
69 | PickWithOpt<VideoModel, 'ScheduleVideoUpdate', MScheduleVideoUpdate> | 77 | PickWithOpt<VideoModel, 'ScheduleVideoUpdate', MScheduleVideoUpdate> |
70 | 78 | ||
71 | export type MVideoWithCaptions = MVideo & | 79 | export type MVideoWithCaptions = |
80 | MVideo & | ||
72 | Use<'VideoCaptions', MVideoCaptionLanguage[]> | 81 | Use<'VideoCaptions', MVideoCaptionLanguage[]> |
73 | 82 | ||
74 | export type MVideoWithStreamingPlaylist = MVideo & | 83 | export type MVideoWithStreamingPlaylist = |
84 | MVideo & | ||
75 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> | 85 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> |
76 | 86 | ||
77 | // ############################################################################ | 87 | // ############################################################################ |
78 | 88 | ||
79 | // Associations with not all their attributes | 89 | // Associations with not all their attributes |
80 | 90 | ||
81 | export type MVideoUserHistory = MVideo & | 91 | export type MVideoUserHistory = |
92 | MVideo & | ||
82 | Use<'UserVideoHistories', MUserVideoHistoryTime[]> | 93 | Use<'UserVideoHistories', MUserVideoHistoryTime[]> |
83 | 94 | ||
84 | export type MVideoWithBlacklistLight = MVideo & | 95 | export type MVideoWithBlacklistLight = |
96 | MVideo & | ||
85 | Use<'VideoBlacklist', MVideoBlacklistLight> | 97 | Use<'VideoBlacklist', MVideoBlacklistLight> |
86 | 98 | ||
87 | export type MVideoAccountLight = MVideo & | 99 | export type MVideoAccountLight = |
100 | MVideo & | ||
88 | Use<'VideoChannel', MChannelAccountLight> | 101 | Use<'VideoChannel', MChannelAccountLight> |
89 | 102 | ||
90 | export type MVideoWithRights = MVideo & | 103 | export type MVideoWithRights = |
104 | MVideo & | ||
91 | Use<'VideoBlacklist', MVideoBlacklistLight> & | 105 | Use<'VideoBlacklist', MVideoBlacklistLight> & |
92 | Use<'Thumbnails', MThumbnail[]> & | 106 | Use<'Thumbnails', MThumbnail[]> & |
93 | Use<'VideoChannel', MChannelUserId> | 107 | Use<'VideoChannel', MChannelUserId> |
@@ -96,12 +110,14 @@ export type MVideoWithRights = MVideo & | |||
96 | 110 | ||
97 | // All files with some additional associations | 111 | // All files with some additional associations |
98 | 112 | ||
99 | export type MVideoWithAllFiles = MVideo & | 113 | export type MVideoWithAllFiles = |
114 | MVideo & | ||
100 | Use<'VideoFiles', MVideoFile[]> & | 115 | Use<'VideoFiles', MVideoFile[]> & |
101 | Use<'Thumbnails', MThumbnail[]> & | 116 | Use<'Thumbnails', MThumbnail[]> & |
102 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> | 117 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> |
103 | 118 | ||
104 | export type MVideoAccountLightBlacklistAllFiles = MVideo & | 119 | export type MVideoAccountLightBlacklistAllFiles = |
120 | MVideo & | ||
105 | Use<'VideoFiles', MVideoFile[]> & | 121 | Use<'VideoFiles', MVideoFile[]> & |
106 | Use<'Thumbnails', MThumbnail[]> & | 122 | Use<'Thumbnails', MThumbnail[]> & |
107 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> & | 123 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> & |
@@ -112,17 +128,21 @@ export type MVideoAccountLightBlacklistAllFiles = MVideo & | |||
112 | 128 | ||
113 | // With account | 129 | // With account |
114 | 130 | ||
115 | export type MVideoAccountDefault = MVideo & | 131 | export type MVideoAccountDefault = |
132 | MVideo & | ||
116 | Use<'VideoChannel', MChannelAccountDefault> | 133 | Use<'VideoChannel', MChannelAccountDefault> |
117 | 134 | ||
118 | export type MVideoThumbnailAccountDefault = MVideo & | 135 | export type MVideoThumbnailAccountDefault = |
136 | MVideo & | ||
119 | Use<'Thumbnails', MThumbnail[]> & | 137 | Use<'Thumbnails', MThumbnail[]> & |
120 | Use<'VideoChannel', MChannelAccountDefault> | 138 | Use<'VideoChannel', MChannelAccountDefault> |
121 | 139 | ||
122 | export type MVideoWithChannelActor = MVideo & | 140 | export type MVideoWithChannelActor = |
141 | MVideo & | ||
123 | Use<'VideoChannel', MChannelActor> | 142 | Use<'VideoChannel', MChannelActor> |
124 | 143 | ||
125 | export type MVideoFullLight = MVideo & | 144 | export type MVideoFullLight = |
145 | MVideo & | ||
126 | Use<'Thumbnails', MThumbnail[]> & | 146 | Use<'Thumbnails', MThumbnail[]> & |
127 | Use<'VideoBlacklist', MVideoBlacklistLight> & | 147 | Use<'VideoBlacklist', MVideoBlacklistLight> & |
128 | Use<'Tags', MTag[]> & | 148 | Use<'Tags', MTag[]> & |
@@ -136,7 +156,8 @@ export type MVideoFullLight = MVideo & | |||
136 | 156 | ||
137 | // API | 157 | // API |
138 | 158 | ||
139 | export type MVideoAP = MVideo & | 159 | export type MVideoAP = |
160 | MVideo & | ||
140 | Use<'Tags', MTag[]> & | 161 | Use<'Tags', MTag[]> & |
141 | Use<'VideoChannel', MChannelAccountLight> & | 162 | Use<'VideoChannel', MChannelAccountLight> & |
142 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> & | 163 | Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> & |
@@ -147,7 +168,8 @@ export type MVideoAP = MVideo & | |||
147 | 168 | ||
148 | export type MVideoAPWithoutCaption = Omit<MVideoAP, 'VideoCaptions'> | 169 | export type MVideoAPWithoutCaption = Omit<MVideoAP, 'VideoCaptions'> |
149 | 170 | ||
150 | export type MVideoDetails = MVideo & | 171 | export type MVideoDetails = |
172 | MVideo & | ||
151 | Use<'VideoBlacklist', MVideoBlacklistLight> & | 173 | Use<'VideoBlacklist', MVideoBlacklistLight> & |
152 | Use<'Tags', MTag[]> & | 174 | Use<'Tags', MTag[]> & |
153 | Use<'VideoChannel', MChannelAccountLight> & | 175 | Use<'VideoChannel', MChannelAccountLight> & |
@@ -157,13 +179,15 @@ export type MVideoDetails = MVideo & | |||
157 | Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundancies[]> & | 179 | Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundancies[]> & |
158 | Use<'VideoFiles', MVideoFileRedundanciesOpt[]> | 180 | Use<'VideoFiles', MVideoFileRedundanciesOpt[]> |
159 | 181 | ||
160 | export type MVideoForUser = MVideo & | 182 | export type MVideoForUser = |
183 | MVideo & | ||
161 | Use<'VideoChannel', MChannelAccountDefault> & | 184 | Use<'VideoChannel', MChannelAccountDefault> & |
162 | Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> & | 185 | Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> & |
163 | Use<'VideoBlacklist', MVideoBlacklistLight> & | 186 | Use<'VideoBlacklist', MVideoBlacklistLight> & |
164 | Use<'Thumbnails', MThumbnail[]> | 187 | Use<'Thumbnails', MThumbnail[]> |
165 | 188 | ||
166 | export type MVideoForRedundancyAPI = MVideo & | 189 | export type MVideoForRedundancyAPI = |
190 | MVideo & | ||
167 | Use<'VideoFiles', MVideoFileRedundanciesAll[]> & | 191 | Use<'VideoFiles', MVideoFileRedundanciesAll[]> & |
168 | Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesAll[]> | 192 | Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesAll[]> |
169 | 193 | ||
@@ -171,13 +195,15 @@ export type MVideoForRedundancyAPI = MVideo & | |||
171 | 195 | ||
172 | // Format for API or AP object | 196 | // Format for API or AP object |
173 | 197 | ||
174 | export type MVideoFormattable = MVideo & | 198 | export type MVideoFormattable = |
199 | MVideo & | ||
175 | PickWithOpt<VideoModel, 'UserVideoHistories', MUserVideoHistoryTime[]> & | 200 | PickWithOpt<VideoModel, 'UserVideoHistories', MUserVideoHistoryTime[]> & |
176 | Use<'VideoChannel', MChannelAccountSummaryFormattable> & | 201 | Use<'VideoChannel', MChannelAccountSummaryFormattable> & |
177 | PickWithOpt<VideoModel, 'ScheduleVideoUpdate', Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'>> & | 202 | PickWithOpt<VideoModel, 'ScheduleVideoUpdate', Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'>> & |
178 | PickWithOpt<VideoModel, 'VideoBlacklist', Pick<MVideoBlacklist, 'reason'>> | 203 | PickWithOpt<VideoModel, 'VideoBlacklist', Pick<MVideoBlacklist, 'reason'>> |
179 | 204 | ||
180 | export type MVideoFormattableDetails = MVideoFormattable & | 205 | export type MVideoFormattableDetails = |
206 | MVideoFormattable & | ||
181 | Use<'VideoChannel', MChannelFormattable> & | 207 | Use<'VideoChannel', MChannelFormattable> & |
182 | Use<'Tags', MTag[]> & | 208 | Use<'Tags', MTag[]> & |
183 | Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesOpt[]> & | 209 | Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesOpt[]> & |