aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-comment.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/typings/models/video/video-comment.ts')
-rw-r--r--server/typings/models/video/video-comment.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/typings/models/video/video-comment.ts b/server/typings/models/video/video-comment.ts
index 187461213..e8bccba0f 100644
--- a/server/typings/models/video/video-comment.ts
+++ b/server/typings/models/video/video-comment.ts
@@ -1,6 +1,6 @@
1import { VideoCommentModel } from '../../../models/video/video-comment' 1import { VideoCommentModel } from '../../../models/video/video-comment'
2import { PickWith } from '../../utils' 2import { PickWith } from '../../utils'
3import { MAccountDefault } from '../account' 3import { MAccountDefault, MAccountFormattable } from '../account'
4import { MVideoAccountLight, MVideoFeed, MVideoIdUrl } from './video' 4import { MVideoAccountLight, MVideoFeed, MVideoIdUrl } from './video'
5 5
6type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M> 6type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M>
@@ -8,6 +8,7 @@ type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K,
8// ############################################################################ 8// ############################################################################
9 9
10export type MComment = Omit<VideoCommentModel, 'OriginVideoComment' | 'InReplyToVideoComment' | 'Video' | 'Account'> 10export type MComment = Omit<VideoCommentModel, 'OriginVideoComment' | 'InReplyToVideoComment' | 'Video' | 'Account'>
11export type MCommentTotalReplies = MComment & { totalReplies?: number }
11export type MCommentId = Pick<MComment, 'id'> 12export type MCommentId = Pick<MComment, 'id'>
12 13
13// ############################################################################ 14// ############################################################################
@@ -41,3 +42,10 @@ export type MCommentOwnerVideoFeed = MCommentOwner &
41// ############################################################################ 42// ############################################################################
42 43
43export type MCommentAPI = MComment & { totalReplies: number } 44export type MCommentAPI = MComment & { totalReplies: number }
45
46// ############################################################################
47
48// Format for API or AP object
49
50export type MCommentFormattable = MCommentTotalReplies &
51 Use<'Account', MAccountFormattable>