]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/moderation/abuse/abuse.model.ts
Don't guess remote tracker URL
[github/Chocobozzz/PeerTube.git] / shared / models / moderation / abuse / abuse.model.ts
index a120803e67966786241ba2ac1fef06edbd684dc7..6048777ffc6689054656a5d5bc987674cc24c1bf 100644 (file)
@@ -4,7 +4,7 @@ import { AbusePredefinedReasonsString } from './abuse-reason.model'
 import { VideoConstant } from '../../videos/video-constant.model'
 import { VideoChannel } from '../../videos/channel/video-channel.model'
 
-export interface VideoAbuse {
+export interface AdminVideoAbuse {
   id: number
   name: string
   uuid: string
@@ -18,10 +18,14 @@ export interface VideoAbuse {
 
   thumbnailPath?: string
   channel?: VideoChannel
+
+  countReports: number
+  nthReport: number
 }
 
-export interface VideoCommentAbuse {
+export interface AdminVideoCommentAbuse {
   id: number
+  threadId: number
 
   video: {
     id: number
@@ -34,28 +38,33 @@ export interface VideoCommentAbuse {
   deleted: boolean
 }
 
-export interface Abuse {
+export interface AdminAbuse {
   id: number
+
   reason: string
   predefinedReasons?: AbusePredefinedReasonsString[]
+
   reporterAccount: Account
+  flaggedAccount: Account
 
   state: VideoConstant<AbuseState>
   moderationComment?: string
 
-  video?: VideoAbuse
-  comment?: VideoCommentAbuse
+  video?: AdminVideoAbuse
+  comment?: AdminVideoCommentAbuse
 
   createdAt: Date
   updatedAt: Date
 
-  // FIXME: deprecated in 2.3, remove this
-  startAt: null
-  endAt: null
-
-  count?: number
-  nth?: number
-
   countReportsForReporter?: number
   countReportsForReportee?: number
+
+  countMessages: number
 }
+
+export type UserVideoAbuse = Omit<AdminVideoAbuse, 'countReports' | 'nthReport'>
+
+export type UserVideoCommentAbuse = AdminVideoCommentAbuse
+
+export type UserAbuse = Omit<AdminAbuse, 'reporterAccount' | 'countReportsForReportee' | 'countReportsForReporter' | 'startAt' | 'endAt'
+| 'count' | 'nth' | 'moderationComment'>