diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:05:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:23:10 +0200 |
commit | 1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (patch) | |
tree | 27fe65c4ea5e9250d2523033d5c65b315bfca23d /server/typings/models/video/video-comment.ts | |
parent | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff) | |
download | PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.gz PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.zst PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.zip |
Type toFormattedJSON
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> | ||