]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/typings/models/video/video-caption.ts
Add auto follow back support for instances
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-caption.ts
index fe0e664c2a7ea2247cb60210f50e2b37c12c4d7e..7cb2a2ad32abfad899337f90ce0056174b72b484 100644 (file)
@@ -1,6 +1,6 @@
 import { VideoCaptionModel } from '../../../models/video/video-caption'
-import { PickWith } from '@server/typings/utils'
-import { VideoModel } from '@server/models/video/video'
+import { FunctionProperties, PickWith } from '@server/typings/utils'
+import { MVideo, MVideoUUID } from '@server/typings/models'
 
 type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M>
 
@@ -13,4 +13,12 @@ export type MVideoCaption = Omit<VideoCaptionModel, 'Video'>
 export type MVideoCaptionLanguage = Pick<MVideoCaption, 'language'>
 
 export type MVideoCaptionVideo = MVideoCaption &
-  Use<'Video', Pick<VideoModel, 'id' | 'remote' | 'uuid'>>
+  Use<'Video', Pick<MVideo, 'id' | 'remote' | 'uuid'>>
+
+// ############################################################################
+
+// Format for API or AP object
+
+export type MVideoCaptionFormattable = FunctionProperties<MVideoCaption> &
+  Pick<MVideoCaption, 'language'> &
+  Use<'Video', MVideoUUID>