diff options
Diffstat (limited to 'shared/models/moderation')
-rw-r--r-- | shared/models/moderation/abuse/abuse-create.model.ts | 21 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse-filter.type.ts | 1 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse-message.model.ts | 10 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse-reason.model.ts | 20 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse-state.model.ts | 5 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse-update.model.ts | 7 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse-video-is.type.ts | 1 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse.model.ts | 70 | ||||
-rw-r--r-- | shared/models/moderation/abuse/index.ts | 8 | ||||
-rw-r--r-- | shared/models/moderation/account-block.model.ts | 7 | ||||
-rw-r--r-- | shared/models/moderation/block-status.model.ts | 15 | ||||
-rw-r--r-- | shared/models/moderation/index.ts | 4 | ||||
-rw-r--r-- | shared/models/moderation/server-block.model.ts | 9 |
13 files changed, 0 insertions, 178 deletions
diff --git a/shared/models/moderation/abuse/abuse-create.model.ts b/shared/models/moderation/abuse/abuse-create.model.ts deleted file mode 100644 index 7d35555c3..000000000 --- a/shared/models/moderation/abuse/abuse-create.model.ts +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | import { AbusePredefinedReasonsString } from './abuse-reason.model' | ||
2 | |||
3 | export interface AbuseCreate { | ||
4 | reason: string | ||
5 | |||
6 | predefinedReasons?: AbusePredefinedReasonsString[] | ||
7 | |||
8 | account?: { | ||
9 | id: number | ||
10 | } | ||
11 | |||
12 | video?: { | ||
13 | id: number | string | ||
14 | startAt?: number | ||
15 | endAt?: number | ||
16 | } | ||
17 | |||
18 | comment?: { | ||
19 | id: number | ||
20 | } | ||
21 | } | ||
diff --git a/shared/models/moderation/abuse/abuse-filter.type.ts b/shared/models/moderation/abuse/abuse-filter.type.ts deleted file mode 100644 index 7dafc6d77..000000000 --- a/shared/models/moderation/abuse/abuse-filter.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type AbuseFilter = 'video' | 'comment' | 'account' | ||
diff --git a/shared/models/moderation/abuse/abuse-message.model.ts b/shared/models/moderation/abuse/abuse-message.model.ts deleted file mode 100644 index 9edd9daff..000000000 --- a/shared/models/moderation/abuse/abuse-message.model.ts +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | import { AccountSummary } from '../../actors/account.model' | ||
2 | |||
3 | export interface AbuseMessage { | ||
4 | id: number | ||
5 | message: string | ||
6 | byModerator: boolean | ||
7 | createdAt: Date | string | ||
8 | |||
9 | account: AccountSummary | ||
10 | } | ||
diff --git a/shared/models/moderation/abuse/abuse-reason.model.ts b/shared/models/moderation/abuse/abuse-reason.model.ts deleted file mode 100644 index 57359aef6..000000000 --- a/shared/models/moderation/abuse/abuse-reason.model.ts +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | export const enum AbusePredefinedReasons { | ||
2 | VIOLENT_OR_REPULSIVE = 1, | ||
3 | HATEFUL_OR_ABUSIVE, | ||
4 | SPAM_OR_MISLEADING, | ||
5 | PRIVACY, | ||
6 | RIGHTS, | ||
7 | SERVER_RULES, | ||
8 | THUMBNAILS, | ||
9 | CAPTIONS | ||
10 | } | ||
11 | |||
12 | export type AbusePredefinedReasonsString = | ||
13 | 'violentOrRepulsive' | | ||
14 | 'hatefulOrAbusive' | | ||
15 | 'spamOrMisleading' | | ||
16 | 'privacy' | | ||
17 | 'rights' | | ||
18 | 'serverRules' | | ||
19 | 'thumbnails' | | ||
20 | 'captions' | ||
diff --git a/shared/models/moderation/abuse/abuse-state.model.ts b/shared/models/moderation/abuse/abuse-state.model.ts deleted file mode 100644 index 8ef6fdada..000000000 --- a/shared/models/moderation/abuse/abuse-state.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export const enum AbuseState { | ||
2 | PENDING = 1, | ||
3 | REJECTED = 2, | ||
4 | ACCEPTED = 3 | ||
5 | } | ||
diff --git a/shared/models/moderation/abuse/abuse-update.model.ts b/shared/models/moderation/abuse/abuse-update.model.ts deleted file mode 100644 index 4360fe7ac..000000000 --- a/shared/models/moderation/abuse/abuse-update.model.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | import { AbuseState } from './abuse-state.model' | ||
2 | |||
3 | export interface AbuseUpdate { | ||
4 | moderationComment?: string | ||
5 | |||
6 | state?: AbuseState | ||
7 | } | ||
diff --git a/shared/models/moderation/abuse/abuse-video-is.type.ts b/shared/models/moderation/abuse/abuse-video-is.type.ts deleted file mode 100644 index 74937f3b9..000000000 --- a/shared/models/moderation/abuse/abuse-video-is.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type AbuseVideoIs = 'deleted' | 'blacklisted' | ||
diff --git a/shared/models/moderation/abuse/abuse.model.ts b/shared/models/moderation/abuse/abuse.model.ts deleted file mode 100644 index 6048777ff..000000000 --- a/shared/models/moderation/abuse/abuse.model.ts +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | import { Account } from '../../actors/account.model' | ||
2 | import { AbuseState } from './abuse-state.model' | ||
3 | import { AbusePredefinedReasonsString } from './abuse-reason.model' | ||
4 | import { VideoConstant } from '../../videos/video-constant.model' | ||
5 | import { VideoChannel } from '../../videos/channel/video-channel.model' | ||
6 | |||
7 | export interface AdminVideoAbuse { | ||
8 | id: number | ||
9 | name: string | ||
10 | uuid: string | ||
11 | nsfw: boolean | ||
12 | |||
13 | deleted: boolean | ||
14 | blacklisted: boolean | ||
15 | |||
16 | startAt: number | null | ||
17 | endAt: number | null | ||
18 | |||
19 | thumbnailPath?: string | ||
20 | channel?: VideoChannel | ||
21 | |||
22 | countReports: number | ||
23 | nthReport: number | ||
24 | } | ||
25 | |||
26 | export interface AdminVideoCommentAbuse { | ||
27 | id: number | ||
28 | threadId: number | ||
29 | |||
30 | video: { | ||
31 | id: number | ||
32 | name: string | ||
33 | uuid: string | ||
34 | } | ||
35 | |||
36 | text: string | ||
37 | |||
38 | deleted: boolean | ||
39 | } | ||
40 | |||
41 | export interface AdminAbuse { | ||
42 | id: number | ||
43 | |||
44 | reason: string | ||
45 | predefinedReasons?: AbusePredefinedReasonsString[] | ||
46 | |||
47 | reporterAccount: Account | ||
48 | flaggedAccount: Account | ||
49 | |||
50 | state: VideoConstant<AbuseState> | ||
51 | moderationComment?: string | ||
52 | |||
53 | video?: AdminVideoAbuse | ||
54 | comment?: AdminVideoCommentAbuse | ||
55 | |||
56 | createdAt: Date | ||
57 | updatedAt: Date | ||
58 | |||
59 | countReportsForReporter?: number | ||
60 | countReportsForReportee?: number | ||
61 | |||
62 | countMessages: number | ||
63 | } | ||
64 | |||
65 | export type UserVideoAbuse = Omit<AdminVideoAbuse, 'countReports' | 'nthReport'> | ||
66 | |||
67 | export type UserVideoCommentAbuse = AdminVideoCommentAbuse | ||
68 | |||
69 | export type UserAbuse = Omit<AdminAbuse, 'reporterAccount' | 'countReportsForReportee' | 'countReportsForReporter' | 'startAt' | 'endAt' | ||
70 | | 'count' | 'nth' | 'moderationComment'> | ||
diff --git a/shared/models/moderation/abuse/index.ts b/shared/models/moderation/abuse/index.ts deleted file mode 100644 index b518517a6..000000000 --- a/shared/models/moderation/abuse/index.ts +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | export * from './abuse-create.model' | ||
2 | export * from './abuse-filter.type' | ||
3 | export * from './abuse-message.model' | ||
4 | export * from './abuse-reason.model' | ||
5 | export * from './abuse-state.model' | ||
6 | export * from './abuse-update.model' | ||
7 | export * from './abuse-video-is.type' | ||
8 | export * from './abuse.model' | ||
diff --git a/shared/models/moderation/account-block.model.ts b/shared/models/moderation/account-block.model.ts deleted file mode 100644 index a942ed614..000000000 --- a/shared/models/moderation/account-block.model.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | import { Account } from '../actors' | ||
2 | |||
3 | export interface AccountBlock { | ||
4 | byAccount: Account | ||
5 | blockedAccount: Account | ||
6 | createdAt: Date | string | ||
7 | } | ||
diff --git a/shared/models/moderation/block-status.model.ts b/shared/models/moderation/block-status.model.ts deleted file mode 100644 index 597312757..000000000 --- a/shared/models/moderation/block-status.model.ts +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | export interface BlockStatus { | ||
2 | accounts: { | ||
3 | [ handle: string ]: { | ||
4 | blockedByServer: boolean | ||
5 | blockedByUser?: boolean | ||
6 | } | ||
7 | } | ||
8 | |||
9 | hosts: { | ||
10 | [ host: string ]: { | ||
11 | blockedByServer: boolean | ||
12 | blockedByUser?: boolean | ||
13 | } | ||
14 | } | ||
15 | } | ||
diff --git a/shared/models/moderation/index.ts b/shared/models/moderation/index.ts deleted file mode 100644 index f8e6d351c..000000000 --- a/shared/models/moderation/index.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export * from './abuse' | ||
2 | export * from './block-status.model' | ||
3 | export * from './account-block.model' | ||
4 | export * from './server-block.model' | ||
diff --git a/shared/models/moderation/server-block.model.ts b/shared/models/moderation/server-block.model.ts deleted file mode 100644 index a8b8af0b7..000000000 --- a/shared/models/moderation/server-block.model.ts +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | import { Account } from '../actors' | ||
2 | |||
3 | export interface ServerBlock { | ||
4 | byAccount: Account | ||
5 | blockedServer: { | ||
6 | host: string | ||
7 | } | ||
8 | createdAt: Date | string | ||
9 | } | ||