diff options
Diffstat (limited to 'server/typings')
-rw-r--r-- | server/typings/models/video/video-file.ts | 5 | ||||
-rw-r--r-- | server/typings/models/video/video-streaming-playlist.ts | 6 | ||||
-rw-r--r-- | server/typings/models/video/video.ts | 13 |
3 files changed, 20 insertions, 4 deletions
diff --git a/server/typings/models/video/video-file.ts b/server/typings/models/video/video-file.ts index 352fe3d32..139b22b2c 100644 --- a/server/typings/models/video/video-file.ts +++ b/server/typings/models/video/video-file.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { VideoFileModel } from '../../../models/video/video-file' | 1 | import { VideoFileModel } from '../../../models/video/video-file' |
2 | import { PickWith, PickWithOpt } from '../../utils' | 2 | import { PickWith, PickWithOpt } from '../../utils' |
3 | import { MVideo, MVideoUUID } from './video' | 3 | import { MVideo, MVideoUUID } from './video' |
4 | import { MVideoRedundancyFileUrl } from './video-redundancy' | 4 | import { MVideoRedundancy, MVideoRedundancyFileUrl } from './video-redundancy' |
5 | import { MStreamingPlaylistVideo, MStreamingPlaylist } from './video-streaming-playlist' | 5 | import { MStreamingPlaylistVideo, MStreamingPlaylist } from './video-streaming-playlist' |
6 | 6 | ||
7 | type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M> | 7 | type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M> |
@@ -22,6 +22,9 @@ export type MVideoFileStreamingPlaylistVideo = MVideoFile & | |||
22 | export type MVideoFileVideoUUID = MVideoFile & | 22 | export type MVideoFileVideoUUID = MVideoFile & |
23 | Use<'Video', MVideoUUID> | 23 | Use<'Video', MVideoUUID> |
24 | 24 | ||
25 | export type MVideoFileRedundanciesAll = MVideoFile & | ||
26 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancy[]> | ||
27 | |||
25 | export type MVideoFileRedundanciesOpt = MVideoFile & | 28 | export type MVideoFileRedundanciesOpt = MVideoFile & |
26 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> | 29 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> |
27 | 30 | ||
diff --git a/server/typings/models/video/video-streaming-playlist.ts b/server/typings/models/video/video-streaming-playlist.ts index 436c0c072..6fd489945 100644 --- a/server/typings/models/video/video-streaming-playlist.ts +++ b/server/typings/models/video/video-streaming-playlist.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist' | 1 | import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist' |
2 | import { PickWith, PickWithOpt } from '../../utils' | 2 | import { PickWith, PickWithOpt } from '../../utils' |
3 | import { MVideoRedundancyFileUrl } from './video-redundancy' | 3 | import { MVideoRedundancyFileUrl, MVideoRedundancy } from './video-redundancy' |
4 | import { MVideo } from './video' | 4 | import { MVideo } from './video' |
5 | import { MVideoFile } from './video-file' | 5 | import { MVideoFile } from './video-file' |
6 | 6 | ||
@@ -20,6 +20,10 @@ export type MStreamingPlaylistFilesVideo = MStreamingPlaylist & | |||
20 | Use<'VideoFiles', MVideoFile[]> & | 20 | Use<'VideoFiles', MVideoFile[]> & |
21 | Use<'Video', MVideo> | 21 | Use<'Video', MVideo> |
22 | 22 | ||
23 | export type MStreamingPlaylistRedundanciesAll = MStreamingPlaylist & | ||
24 | Use<'VideoFiles', MVideoFile[]> & | ||
25 | Use<'RedundancyVideos', MVideoRedundancy[]> | ||
26 | |||
23 | export type MStreamingPlaylistRedundancies = MStreamingPlaylist & | 27 | export type MStreamingPlaylistRedundancies = MStreamingPlaylist & |
24 | Use<'VideoFiles', MVideoFile[]> & | 28 | Use<'VideoFiles', MVideoFile[]> & |
25 | Use<'RedundancyVideos', MVideoRedundancyFileUrl[]> | 29 | Use<'RedundancyVideos', MVideoRedundancyFileUrl[]> |
diff --git a/server/typings/models/video/video.ts b/server/typings/models/video/video.ts index 7f69a91de..bcc5e5028 100644 --- a/server/typings/models/video/video.ts +++ b/server/typings/models/video/video.ts | |||
@@ -10,8 +10,13 @@ import { | |||
10 | } from './video-channels' | 10 | } from './video-channels' |
11 | import { MTag } from './tag' | 11 | import { MTag } from './tag' |
12 | import { MVideoCaptionLanguage } from './video-caption' | 12 | import { MVideoCaptionLanguage } from './video-caption' |
13 | import { MStreamingPlaylistFiles, MStreamingPlaylistRedundancies, MStreamingPlaylistRedundanciesOpt } from './video-streaming-playlist' | 13 | import { |
14 | import { MVideoFile, MVideoFileRedundanciesOpt } from './video-file' | 14 | MStreamingPlaylistFiles, |
15 | MStreamingPlaylistRedundancies, | ||
16 | MStreamingPlaylistRedundanciesAll, | ||
17 | MStreamingPlaylistRedundanciesOpt | ||
18 | } from './video-streaming-playlist' | ||
19 | import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file' | ||
15 | import { MThumbnail } from './thumbnail' | 20 | import { MThumbnail } from './thumbnail' |
16 | import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist' | 21 | import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist' |
17 | import { MScheduleVideoUpdate } from './schedule-video-update' | 22 | import { MScheduleVideoUpdate } from './schedule-video-update' |
@@ -158,6 +163,10 @@ export type MVideoForUser = MVideo & | |||
158 | Use<'VideoBlacklist', MVideoBlacklistLight> & | 163 | Use<'VideoBlacklist', MVideoBlacklistLight> & |
159 | Use<'Thumbnails', MThumbnail[]> | 164 | Use<'Thumbnails', MThumbnail[]> |
160 | 165 | ||
166 | export type MVideoForRedundancyAPI = MVideo & | ||
167 | Use<'VideoFiles', MVideoFileRedundanciesAll[]> & | ||
168 | Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesAll[]> | ||
169 | |||
161 | // ############################################################################ | 170 | // ############################################################################ |
162 | 171 | ||
163 | // Format for API or AP object | 172 | // Format for API or AP object |