diff options
Diffstat (limited to 'server/types/models/moderation/abuse.ts')
-rw-r--r-- | server/types/models/moderation/abuse.ts | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/server/types/models/moderation/abuse.ts b/server/types/models/moderation/abuse.ts index d793a720f..5409dfd6b 100644 --- a/server/types/models/moderation/abuse.ts +++ b/server/types/models/moderation/abuse.ts | |||
@@ -5,6 +5,7 @@ import { AbuseModel } from '../../../models/abuse/abuse' | |||
5 | import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl, MAccount } from '../account' | 5 | import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl, MAccount } from '../account' |
6 | import { MCommentOwner, MCommentUrl, MVideoUrl, MCommentOwnerVideo, MComment, MCommentVideo } from '../video' | 6 | import { MCommentOwner, MCommentUrl, MVideoUrl, MCommentOwnerVideo, MComment, MCommentVideo } from '../video' |
7 | import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video' | 7 | import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video' |
8 | import { VideoCommentModel } from '@server/models/video/video-comment' | ||
8 | 9 | ||
9 | type Use<K extends keyof AbuseModel, M> = PickWith<AbuseModel, K, M> | 10 | type Use<K extends keyof AbuseModel, M> = PickWith<AbuseModel, K, M> |
10 | type UseVideoAbuse<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M> | 11 | type UseVideoAbuse<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M> |
@@ -34,7 +35,7 @@ export type MVideoAbuseVideoUrl = | |||
34 | 35 | ||
35 | export type MVideoAbuseVideoFull = | 36 | export type MVideoAbuseVideoFull = |
36 | MVideoAbuse & | 37 | MVideoAbuse & |
37 | UseVideoAbuse<'Video', MVideoAccountLightBlacklistAllFiles> | 38 | UseVideoAbuse<'Video', Omit<MVideoAccountLightBlacklistAllFiles, 'VideoFiles' | 'VideoStreamingPlaylists'>> |
38 | 39 | ||
39 | export type MVideoAbuseFormattable = | 40 | export type MVideoAbuseFormattable = |
40 | MVideoAbuse & | 41 | MVideoAbuse & |
@@ -49,7 +50,7 @@ export type MCommentAbuseAccount = | |||
49 | 50 | ||
50 | export type MCommentAbuseAccountVideo = | 51 | export type MCommentAbuseAccountVideo = |
51 | MCommentAbuse & | 52 | MCommentAbuse & |
52 | UseCommentAbuse<'VideoComment', MCommentOwnerVideo> | 53 | UseCommentAbuse<'VideoComment', MCommentOwner & PickWith<VideoCommentModel, 'Video', MVideo>> |
53 | 54 | ||
54 | export type MCommentAbuseUrl = | 55 | export type MCommentAbuseUrl = |
55 | MCommentAbuse & | 56 | MCommentAbuse & |
@@ -79,14 +80,6 @@ export type MAbuseAccountVideo = | |||
79 | Use<'VideoAbuse', MVideoAbuseVideoFull> & | 80 | Use<'VideoAbuse', MVideoAbuseVideoFull> & |
80 | Use<'ReporterAccount', MAccountDefault> | 81 | Use<'ReporterAccount', MAccountDefault> |
81 | 82 | ||
82 | export type MAbuseAP = | ||
83 | MAbuse & | ||
84 | Pick<AbuseModel, 'toActivityPubObject'> & | ||
85 | Use<'ReporterAccount', MAccountUrl> & | ||
86 | Use<'FlaggedAccount', MAccountUrl> & | ||
87 | Use<'VideoAbuse', MVideoAbuseVideo> & | ||
88 | Use<'VideoCommentAbuse', MCommentAbuseAccount> | ||
89 | |||
90 | export type MAbuseFull = | 83 | export type MAbuseFull = |
91 | MAbuse & | 84 | MAbuse & |
92 | Pick<AbuseModel, 'toActivityPubObject'> & | 85 | Pick<AbuseModel, 'toActivityPubObject'> & |
@@ -111,3 +104,11 @@ export type MAbuseUserFormattable = | |||
111 | Use<'FlaggedAccount', MAccountFormattable> & | 104 | Use<'FlaggedAccount', MAccountFormattable> & |
112 | Use<'VideoAbuse', MVideoAbuseFormattable> & | 105 | Use<'VideoAbuse', MVideoAbuseFormattable> & |
113 | Use<'VideoCommentAbuse', MCommentAbuseFormattable> | 106 | Use<'VideoCommentAbuse', MCommentAbuseFormattable> |
107 | |||
108 | export type MAbuseAP = | ||
109 | MAbuse & | ||
110 | Pick<AbuseModel, 'toActivityPubObject'> & | ||
111 | Use<'ReporterAccount', MAccountUrl> & | ||
112 | Use<'FlaggedAccount', MAccountUrl> & | ||
113 | Use<'VideoAbuse', MVideoAbuseVideo> & | ||
114 | Use<'VideoCommentAbuse', MCommentAbuseAccount> | ||