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