diff options
Diffstat (limited to 'server/typings/models/video/video-comment.ts')
-rw-r--r-- | server/typings/models/video/video-comment.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/typings/models/video/video-comment.ts b/server/typings/models/video/video-comment.ts index e8bccba0f..4fd1c29e8 100644 --- a/server/typings/models/video/video-comment.ts +++ b/server/typings/models/video/video-comment.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { VideoCommentModel } from '../../../models/video/video-comment' | 1 | import { VideoCommentModel } from '../../../models/video/video-comment' |
2 | import { PickWith } from '../../utils' | 2 | import { PickWith, PickWithOpt } from '../../utils' |
3 | import { MAccountDefault, MAccountFormattable } from '../account' | 3 | import { MAccountDefault, MAccountFormattable, MAccountUrl, MActorUrl } from '../account' |
4 | import { MVideoAccountLight, MVideoFeed, MVideoIdUrl } from './video' | 4 | import { MVideoAccountLight, MVideoFeed, MVideoIdUrl, MVideoUrl } 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> |
7 | 7 | ||
@@ -10,6 +10,7 @@ type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, | |||
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 MCommentTotalReplies = MComment & { totalReplies?: number } |
12 | export type MCommentId = Pick<MComment, 'id'> | 12 | export type MCommentId = Pick<MComment, 'id'> |
13 | export type MCommentUrl = Pick<MComment, 'url'> | ||
13 | 14 | ||
14 | // ############################################################################ | 15 | // ############################################################################ |
15 | 16 | ||
@@ -49,3 +50,8 @@ export type MCommentAPI = MComment & { totalReplies: number } | |||
49 | 50 | ||
50 | export type MCommentFormattable = MCommentTotalReplies & | 51 | export type MCommentFormattable = MCommentTotalReplies & |
51 | Use<'Account', MAccountFormattable> | 52 | Use<'Account', MAccountFormattable> |
53 | |||
54 | export type MCommentAP = MComment & | ||
55 | Use<'Account', MAccountUrl> & | ||
56 | PickWithOpt<VideoCommentModel, 'Video', MVideoUrl> & | ||
57 | PickWithOpt<VideoCommentModel, 'InReplyToVideoComment', MCommentUrl> | ||