aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/moderation/abuse/abuse-message.model.ts9
-rw-r--r--shared/models/moderation/abuse/abuse.model.ts19
-rw-r--r--shared/models/moderation/abuse/index.ts1
3 files changed, 24 insertions, 5 deletions
diff --git a/shared/models/moderation/abuse/abuse-message.model.ts b/shared/models/moderation/abuse/abuse-message.model.ts
new file mode 100644
index 000000000..02072d5ce
--- /dev/null
+++ b/shared/models/moderation/abuse/abuse-message.model.ts
@@ -0,0 +1,9 @@
1import { AccountSummary } from '@shared/models'
2
3export interface AbuseMessage {
4 id: number
5 message: string
6 byModerator: boolean
7
8 account: AccountSummary
9}
diff --git a/shared/models/moderation/abuse/abuse.model.ts b/shared/models/moderation/abuse/abuse.model.ts
index 0a0c6bd35..7f126ba4a 100644
--- a/shared/models/moderation/abuse/abuse.model.ts
+++ b/shared/models/moderation/abuse/abuse.model.ts
@@ -4,7 +4,7 @@ import { AbusePredefinedReasonsString } from './abuse-reason.model'
4import { VideoConstant } from '../../videos/video-constant.model' 4import { VideoConstant } from '../../videos/video-constant.model'
5import { VideoChannel } from '../../videos/channel/video-channel.model' 5import { VideoChannel } from '../../videos/channel/video-channel.model'
6 6
7export interface VideoAbuse { 7export interface AdminVideoAbuse {
8 id: number 8 id: number
9 name: string 9 name: string
10 uuid: string 10 uuid: string
@@ -23,7 +23,7 @@ export interface VideoAbuse {
23 nthReport: number 23 nthReport: number
24} 24}
25 25
26export interface VideoCommentAbuse { 26export interface AdminVideoCommentAbuse {
27 id: number 27 id: number
28 threadId: number 28 threadId: number
29 29
@@ -38,7 +38,7 @@ export interface VideoCommentAbuse {
38 deleted: boolean 38 deleted: boolean
39} 39}
40 40
41export interface Abuse { 41export interface AdminAbuse {
42 id: number 42 id: number
43 43
44 reason: string 44 reason: string
@@ -50,8 +50,8 @@ export interface Abuse {
50 state: VideoConstant<AbuseState> 50 state: VideoConstant<AbuseState>
51 moderationComment?: string 51 moderationComment?: string
52 52
53 video?: VideoAbuse 53 video?: AdminVideoAbuse
54 comment?: VideoCommentAbuse 54 comment?: AdminVideoCommentAbuse
55 55
56 createdAt: Date 56 createdAt: Date
57 updatedAt: Date 57 updatedAt: Date
@@ -59,6 +59,8 @@ export interface Abuse {
59 countReportsForReporter?: number 59 countReportsForReporter?: number
60 countReportsForReportee?: number 60 countReportsForReportee?: number
61 61
62 countMessages: number
63
62 // FIXME: deprecated in 2.3, remove the following properties 64 // FIXME: deprecated in 2.3, remove the following properties
63 65
64 // @deprecated 66 // @deprecated
@@ -71,3 +73,10 @@ export interface Abuse {
71 // @deprecated 73 // @deprecated
72 nth?: number 74 nth?: number
73} 75}
76
77export type UserVideoAbuse = Omit<AdminVideoAbuse, 'countReports' | 'nthReport'>
78
79export type UserVideoCommentAbuse = AdminVideoCommentAbuse
80
81export type UserAbuse = Omit<AdminAbuse, 'reporterAccount' | 'countReportsForReportee' | 'countReportsForReporter' | 'startAt' | 'endAt'
82| 'count' | 'nth'>
diff --git a/shared/models/moderation/abuse/index.ts b/shared/models/moderation/abuse/index.ts
index 55046426a..b518517a6 100644
--- a/shared/models/moderation/abuse/index.ts
+++ b/shared/models/moderation/abuse/index.ts
@@ -1,5 +1,6 @@
1export * from './abuse-create.model' 1export * from './abuse-create.model'
2export * from './abuse-filter.type' 2export * from './abuse-filter.type'
3export * from './abuse-message.model'
3export * from './abuse-reason.model' 4export * from './abuse-reason.model'
4export * from './abuse-state.model' 5export * from './abuse-state.model'
5export * from './abuse-update.model' 6export * from './abuse-update.model'