]>
Commit | Line | Data |
---|---|---|
453e83ea C |
1 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' |
2 | import { PickWith } from '../../utils' | |
3 | import { MAccount, MAccountDefault, MAccountSummary } from '../account' | |
4 | import { MThumbnail } from './thumbnail' | |
5 | import { MChannelDefault, MChannelSummary } from './video-channels' | |
6 | import { MVideoPlaylistElementLight } from '@server/typings/models/video/video-playlist-element' | |
7 | ||
8 | export type MVideoPlaylist = Omit<VideoPlaylistModel, 'OwnerAccount' | 'VideoChannel' | 'VideoPlaylistElements' | 'Thumbnail'> | |
9 | export type MVideoPlaylistId = Pick<MVideoPlaylist, 'id'> | |
10 | export type MVideoPlaylistPrivacy = Pick<MVideoPlaylist, 'privacy'> | |
11 | ||
12 | export type MVideoPlaylistWithElements = MVideoPlaylist & | |
13 | PickWith<VideoPlaylistModel, 'VideoPlaylistElements', MVideoPlaylistElementLight[]> | |
14 | export type MVideoPlaylistIdWithElements = MVideoPlaylistId & MVideoPlaylistWithElements | |
15 | ||
16 | export type MVideoPlaylistUUID = Pick<MVideoPlaylist, 'uuid'> | |
17 | ||
18 | export type MVideoPlaylistOwner = MVideoPlaylist & | |
19 | PickWith<VideoPlaylistModel, 'OwnerAccount', MAccount> | |
20 | ||
21 | export type MVideoPlaylistOwnerDefault = MVideoPlaylist & | |
22 | PickWith<VideoPlaylistModel, 'OwnerAccount', MAccountDefault> | |
23 | ||
24 | export type MVideoPlaylistThumbnail = MVideoPlaylist & | |
25 | PickWith<VideoPlaylistModel, 'Thumbnail', MThumbnail> | |
26 | ||
27 | export type MVideoPlaylistAccountThumbnail = MVideoPlaylistOwnerDefault & | |
28 | PickWith<VideoPlaylistModel, 'Thumbnail', MThumbnail> | |
29 | ||
30 | export type MVideoPlaylistAccountChannelSummary = MVideoPlaylist & | |
31 | PickWith<VideoPlaylistModel, 'OwnerAccount', MAccountSummary> & | |
32 | PickWith<VideoPlaylistModel, 'VideoChannel', MChannelSummary> | |
33 | ||
34 | export type MVideoPlaylistAccountChannelDefault = MVideoPlaylist & | |
35 | PickWith<VideoPlaylistModel, 'OwnerAccount', MAccountDefault> & | |
36 | PickWith<VideoPlaylistModel, 'VideoChannel', MChannelDefault> | |
37 | ||
38 | export type MVideoPlaylistVideosLength = MVideoPlaylist & { videosLength: number } | |
39 | ||
40 | export type MVideoPlaylistFullSummary = MVideoPlaylistAccountChannelSummary & MVideoPlaylistThumbnail | |
41 | ||
42 | export type MVideoPlaylistFull = MVideoPlaylist & MVideoPlaylistThumbnail & MVideoPlaylistAccountChannelDefault |