2019-08-15 04:53:26 -05:00
|
|
|
import { VideoCaptionModel } from '../../../models/video/video-caption'
|
2019-08-20 12:05:31 -05:00
|
|
|
import { FunctionProperties, PickWith } from '@server/typings/utils'
|
2019-11-15 08:06:03 -06:00
|
|
|
import { MVideo, MVideoUUID } from './video'
|
2019-08-15 04:53:26 -05:00
|
|
|
|
2019-08-20 06:52:49 -05:00
|
|
|
type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M>
|
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 04:53:26 -05:00
|
|
|
export type MVideoCaption = Omit<VideoCaptionModel, 'Video'>
|
|
|
|
|
2019-08-20 06:52:49 -05:00
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 04:53:26 -05:00
|
|
|
export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'>
|
2020-01-30 04:53:38 -06:00
|
|
|
export type MVideoCaptionLanguageUrl = Pick<MVideoCaption, 'language' | 'fileUrl' | 'getFileUrl'>
|
2019-08-15 04:53:26 -05:00
|
|
|
|
2020-01-31 09:56:52 -06:00
|
|
|
export type MVideoCaptionVideo =
|
|
|
|
MVideoCaption &
|
2019-08-20 12:05:31 -05:00
|
|
|
Use<'Video', Pick<MVideo, 'id' | 'remote' | 'uuid'>>
|
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
|
|
|
// Format for API or AP object
|
|
|
|
|
2020-01-31 09:56:52 -06:00
|
|
|
export type MVideoCaptionFormattable =
|
|
|
|
FunctionProperties<MVideoCaption> &
|
2019-08-20 12:05:31 -05:00
|
|
|
Pick<MVideoCaption, 'language'> &
|
|
|
|
Use<'Video', MVideoUUID>
|