diff options
Diffstat (limited to 'server/typings/models/video/video-playlist.ts')
-rw-r--r-- | server/typings/models/video/video-playlist.ts | 14 |
1 files changed, 11 insertions, 3 deletions
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 @@ | |||
1 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' | 1 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' |
2 | import { PickWith } from '../../utils' | 2 | import { PickWith } from '../../utils' |
3 | import { MAccount, MAccountDefault, MAccountSummary } from '../account' | 3 | import { MAccount, MAccountDefault, MAccountSummary, MAccountSummaryFormattable } from '../account' |
4 | import { MThumbnail } from './thumbnail' | 4 | import { MThumbnail } from './thumbnail' |
5 | import { MChannelDefault, MChannelSummary } from './video-channels' | 5 | import { MChannelDefault, MChannelSummary, MChannelSummaryFormattable } from './video-channels' |
6 | import { MVideoPlaylistElementLight } from '@server/typings/models/video/video-playlist-element' | 6 | import { MVideoPlaylistElementLight } from '@server/typings/models/video/video-playlist-element' |
7 | 7 | ||
8 | type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M> | 8 | type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M> |
@@ -16,7 +16,7 @@ export type MVideoPlaylist = Omit<VideoPlaylistModel, 'OwnerAccount' | 'VideoCha | |||
16 | export type MVideoPlaylistId = Pick<MVideoPlaylist, 'id'> | 16 | export type MVideoPlaylistId = Pick<MVideoPlaylist, 'id'> |
17 | export type MVideoPlaylistPrivacy = Pick<MVideoPlaylist, 'privacy'> | 17 | export type MVideoPlaylistPrivacy = Pick<MVideoPlaylist, 'privacy'> |
18 | export type MVideoPlaylistUUID = Pick<MVideoPlaylist, 'uuid'> | 18 | export type MVideoPlaylistUUID = Pick<MVideoPlaylist, 'uuid'> |
19 | export type MVideoPlaylistVideosLength = MVideoPlaylist & { videosLength: number } | 19 | export 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 | |||
86 | export type MVideoPlaylistFormattable = MVideoPlaylistVideosLength & | ||
87 | Use<'OwnerAccount', MAccountSummaryFormattable> & | ||
88 | Use<'VideoChannel', MChannelSummaryFormattable> | ||