2020-07-01 10:05:30 -04:00
|
|
|
import { Account } from '../../actors/account.model'
|
|
|
|
import { AbuseState } from './abuse-state.model'
|
|
|
|
import { AbusePredefinedReasonsString } from './abuse-reason.model'
|
|
|
|
import { VideoConstant } from '../../videos/video-constant.model'
|
|
|
|
import { VideoChannel } from '../../videos/channel/video-channel.model'
|
|
|
|
|
2020-07-24 09:05:51 -04:00
|
|
|
export interface AdminVideoAbuse {
|
2020-07-01 10:05:30 -04:00
|
|
|
id: number
|
|
|
|
name: string
|
|
|
|
uuid: string
|
|
|
|
nsfw: boolean
|
2020-07-07 04:57:04 -04:00
|
|
|
|
2020-07-01 10:05:30 -04:00
|
|
|
deleted: boolean
|
|
|
|
blacklisted: boolean
|
|
|
|
|
|
|
|
startAt: number | null
|
|
|
|
endAt: number | null
|
|
|
|
|
|
|
|
thumbnailPath?: string
|
|
|
|
channel?: VideoChannel
|
2020-07-07 08:34:16 -04:00
|
|
|
|
|
|
|
countReports: number
|
|
|
|
nthReport: number
|
2020-07-01 10:05:30 -04:00
|
|
|
}
|
|
|
|
|
2020-07-24 09:05:51 -04:00
|
|
|
export interface AdminVideoCommentAbuse {
|
2020-07-01 10:05:30 -04:00
|
|
|
id: number
|
2020-07-09 05:58:46 -04:00
|
|
|
threadId: number
|
2020-07-07 04:57:04 -04:00
|
|
|
|
|
|
|
video: {
|
|
|
|
id: number
|
|
|
|
name: string
|
|
|
|
uuid: string
|
|
|
|
}
|
|
|
|
|
2020-07-01 10:05:30 -04:00
|
|
|
text: string
|
2020-07-07 04:57:04 -04:00
|
|
|
|
2020-07-01 10:05:30 -04:00
|
|
|
deleted: boolean
|
|
|
|
}
|
|
|
|
|
2020-07-24 09:05:51 -04:00
|
|
|
export interface AdminAbuse {
|
2020-07-01 10:05:30 -04:00
|
|
|
id: number
|
2020-07-07 08:34:16 -04:00
|
|
|
|
2020-07-01 10:05:30 -04:00
|
|
|
reason: string
|
|
|
|
predefinedReasons?: AbusePredefinedReasonsString[]
|
2020-07-07 08:34:16 -04:00
|
|
|
|
2020-07-01 10:05:30 -04:00
|
|
|
reporterAccount: Account
|
2020-07-07 08:34:16 -04:00
|
|
|
flaggedAccount: Account
|
2020-07-01 10:05:30 -04:00
|
|
|
|
|
|
|
state: VideoConstant<AbuseState>
|
|
|
|
moderationComment?: string
|
|
|
|
|
2020-07-24 09:05:51 -04:00
|
|
|
video?: AdminVideoAbuse
|
|
|
|
comment?: AdminVideoCommentAbuse
|
2020-07-01 10:05:30 -04:00
|
|
|
|
|
|
|
createdAt: Date
|
|
|
|
updatedAt: Date
|
|
|
|
|
|
|
|
countReportsForReporter?: number
|
|
|
|
countReportsForReportee?: number
|
2020-07-07 08:34:16 -04:00
|
|
|
|
2020-07-24 09:05:51 -04:00
|
|
|
countMessages: number
|
|
|
|
|
2020-07-07 08:34:16 -04:00
|
|
|
// FIXME: deprecated in 2.3, remove the following properties
|
|
|
|
|
2020-07-07 11:18:26 -04:00
|
|
|
// @deprecated
|
2020-07-09 09:54:24 -04:00
|
|
|
startAt?: null
|
2020-07-07 11:18:26 -04:00
|
|
|
// @deprecated
|
2020-07-09 09:54:24 -04:00
|
|
|
endAt?: null
|
2020-07-07 11:18:26 -04:00
|
|
|
|
|
|
|
// @deprecated
|
|
|
|
count?: number
|
|
|
|
// @deprecated
|
|
|
|
nth?: number
|
2020-07-01 10:05:30 -04:00
|
|
|
}
|
2020-07-24 09:05:51 -04:00
|
|
|
|
|
|
|
export type UserVideoAbuse = Omit<AdminVideoAbuse, 'countReports' | 'nthReport'>
|
|
|
|
|
|
|
|
export type UserVideoCommentAbuse = AdminVideoCommentAbuse
|
|
|
|
|
|
|
|
export type UserAbuse = Omit<AdminAbuse, 'reporterAccount' | 'countReportsForReportee' | 'countReportsForReporter' | 'startAt' | 'endAt'
|
|
|
|
| 'count' | 'nth'>
|