]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/typings/models/video/video-comment.ts
Add auto follow back support for instances
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-comment.ts
index e8bccba0f097a89cbe6f8af9174456a5d8c1d965..4fd1c29e8cfcb9758dfc498f24ef3c1956d185ed 100644 (file)
@@ -1,7 +1,7 @@
 import { VideoCommentModel } from '../../../models/video/video-comment'
-import { PickWith } from '../../utils'
-import { MAccountDefault, MAccountFormattable } from '../account'
-import { MVideoAccountLight, MVideoFeed, MVideoIdUrl } from './video'
+import { PickWith, PickWithOpt } from '../../utils'
+import { MAccountDefault, MAccountFormattable, MAccountUrl, MActorUrl } from '../account'
+import { MVideoAccountLight, MVideoFeed, MVideoIdUrl, MVideoUrl } from './video'
 
 type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M>
 
@@ -10,6 +10,7 @@ type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K,
 export type MComment = Omit<VideoCommentModel, 'OriginVideoComment' | 'InReplyToVideoComment' | 'Video' | 'Account'>
 export type MCommentTotalReplies = MComment & { totalReplies?: number }
 export type MCommentId = Pick<MComment, 'id'>
+export type MCommentUrl = Pick<MComment, 'url'>
 
 // ############################################################################
 
@@ -49,3 +50,8 @@ export type MCommentAPI = MComment & { totalReplies: number }
 
 export type MCommentFormattable = MCommentTotalReplies &
   Use<'Account', MAccountFormattable>
+
+export type MCommentAP = MComment &
+  Use<'Account', MAccountUrl> &
+  PickWithOpt<VideoCommentModel, 'Video', MVideoUrl> &
+  PickWithOpt<VideoCommentModel, 'InReplyToVideoComment', MCommentUrl>