PeerTube/server/typings/models/video/video-playlist-element.ts

16 lines
847 B
TypeScript
Raw Normal View History

2019-08-15 04:53:26 -05:00
import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element'
import { PickWith } from '@server/typings/utils'
import { MVideoPlaylistPrivacy, MVideoThumbnail, MVideoUrl } from '@server/typings/models'
export type MVideoPlaylistElement = Omit<VideoPlaylistElementModel, 'VideoPlaylist' | 'Video'>
export type MVideoPlaylistElementId = Pick<MVideoPlaylistElement, 'id'>
export type MVideoPlaylistElementLight = Pick<MVideoPlaylistElement, 'id' | 'videoId' | 'startTimestamp' | 'stopTimestamp'>
export type MVideoPlaylistVideoThumbnail = MVideoPlaylistElement &
PickWith<VideoPlaylistElementModel, 'Video', MVideoThumbnail>
export type MVideoPlaylistAP = MVideoPlaylistElement &
PickWith<VideoPlaylistElementModel, 'Video', MVideoUrl> &
PickWith<VideoPlaylistElementModel, 'VideoPlaylist', MVideoPlaylistPrivacy>