aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/types/models/video/video-caption.ts
blob: 1f761a86615b55a1f7b218caf54ce18195160290 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                             
                                                                       
                                            
 



                                                                                  

                                                            

                                                                               
                                                                   
                                                                                                 
 

                                





                                                                               
                                      
                 

                                   
import { PickWith } from '@shared/core-utils'
import { VideoCaptionModel } from '../../../models/video/video-caption'
import { MVideo, MVideoUUID } from './video'

type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M>

// ############################################################################

export type MVideoCaption = Omit<VideoCaptionModel, 'Video'>

// ############################################################################

export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'>
export type MVideoCaptionLanguageUrl = Pick<MVideoCaption, 'language' | 'fileUrl' | 'getFileUrl'>

export type MVideoCaptionVideo =
  MVideoCaption &
  Use<'Video', Pick<MVideo, 'id' | 'remote' | 'uuid'>>

// ############################################################################

// Format for API or AP object

export type MVideoCaptionFormattable =
  MVideoCaption &
  Pick<MVideoCaption, 'language'> &
  Use<'Video', MVideoUUID>