aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/videos')
-rw-r--r--shared/models/videos/abuse/index.ts6
-rw-r--r--shared/models/videos/abuse/video-abuse-create.model.ts8
-rw-r--r--shared/models/videos/abuse/video-abuse-reason.model.ts33
-rw-r--r--shared/models/videos/abuse/video-abuse-state.model.ts5
-rw-r--r--shared/models/videos/abuse/video-abuse-update.model.ts6
-rw-r--r--shared/models/videos/abuse/video-abuse-video-is.type.ts1
-rw-r--r--shared/models/videos/abuse/video-abuse.model.ts38
-rw-r--r--shared/models/videos/index.ts1
8 files changed, 0 insertions, 98 deletions
diff --git a/shared/models/videos/abuse/index.ts b/shared/models/videos/abuse/index.ts
deleted file mode 100644
index f70bc736f..000000000
--- a/shared/models/videos/abuse/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
1export * from './video-abuse-create.model'
2export * from './video-abuse-reason.model'
3export * from './video-abuse-state.model'
4export * from './video-abuse-update.model'
5export * from './video-abuse-video-is.type'
6export * from './video-abuse.model'
diff --git a/shared/models/videos/abuse/video-abuse-create.model.ts b/shared/models/videos/abuse/video-abuse-create.model.ts
deleted file mode 100644
index c93cb8b2c..000000000
--- a/shared/models/videos/abuse/video-abuse-create.model.ts
+++ /dev/null
@@ -1,8 +0,0 @@
1import { VideoAbusePredefinedReasonsString } from './video-abuse-reason.model'
2
3export interface VideoAbuseCreate {
4 reason: string
5 predefinedReasons?: VideoAbusePredefinedReasonsString[]
6 startAt?: number
7 endAt?: number
8}
diff --git a/shared/models/videos/abuse/video-abuse-reason.model.ts b/shared/models/videos/abuse/video-abuse-reason.model.ts
deleted file mode 100644
index 9064f0c1a..000000000
--- a/shared/models/videos/abuse/video-abuse-reason.model.ts
+++ /dev/null
@@ -1,33 +0,0 @@
1export enum VideoAbusePredefinedReasons {
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
12export type VideoAbusePredefinedReasonsString =
13 'violentOrRepulsive' |
14 'hatefulOrAbusive' |
15 'spamOrMisleading' |
16 'privacy' |
17 'rights' |
18 'serverRules' |
19 'thumbnails' |
20 'captions'
21
22export const videoAbusePredefinedReasonsMap: {
23 [key in VideoAbusePredefinedReasonsString]: VideoAbusePredefinedReasons
24} = {
25 violentOrRepulsive: VideoAbusePredefinedReasons.VIOLENT_OR_REPULSIVE,
26 hatefulOrAbusive: VideoAbusePredefinedReasons.HATEFUL_OR_ABUSIVE,
27 spamOrMisleading: VideoAbusePredefinedReasons.SPAM_OR_MISLEADING,
28 privacy: VideoAbusePredefinedReasons.PRIVACY,
29 rights: VideoAbusePredefinedReasons.RIGHTS,
30 serverRules: VideoAbusePredefinedReasons.SERVER_RULES,
31 thumbnails: VideoAbusePredefinedReasons.THUMBNAILS,
32 captions: VideoAbusePredefinedReasons.CAPTIONS
33}
diff --git a/shared/models/videos/abuse/video-abuse-state.model.ts b/shared/models/videos/abuse/video-abuse-state.model.ts
deleted file mode 100644
index 529f034bd..000000000
--- a/shared/models/videos/abuse/video-abuse-state.model.ts
+++ /dev/null
@@ -1,5 +0,0 @@
1export enum VideoAbuseState {
2 PENDING = 1,
3 REJECTED = 2,
4 ACCEPTED = 3
5}
diff --git a/shared/models/videos/abuse/video-abuse-update.model.ts b/shared/models/videos/abuse/video-abuse-update.model.ts
deleted file mode 100644
index 9b32aae48..000000000
--- a/shared/models/videos/abuse/video-abuse-update.model.ts
+++ /dev/null
@@ -1,6 +0,0 @@
1import { VideoAbuseState } from './video-abuse-state.model'
2
3export interface VideoAbuseUpdate {
4 moderationComment?: string
5 state?: VideoAbuseState
6}
diff --git a/shared/models/videos/abuse/video-abuse-video-is.type.ts b/shared/models/videos/abuse/video-abuse-video-is.type.ts
deleted file mode 100644
index e86018993..000000000
--- a/shared/models/videos/abuse/video-abuse-video-is.type.ts
+++ /dev/null
@@ -1 +0,0 @@
1export type VideoAbuseVideoIs = 'deleted' | 'blacklisted'
diff --git a/shared/models/videos/abuse/video-abuse.model.ts b/shared/models/videos/abuse/video-abuse.model.ts
deleted file mode 100644
index 38605dcac..000000000
--- a/shared/models/videos/abuse/video-abuse.model.ts
+++ /dev/null
@@ -1,38 +0,0 @@
1import { Account } from '../../actors/index'
2import { VideoConstant } from '../video-constant.model'
3import { VideoAbuseState } from './video-abuse-state.model'
4import { VideoChannel } from '../channel/video-channel.model'
5import { VideoAbusePredefinedReasonsString } from './video-abuse-reason.model'
6
7export interface VideoAbuse {
8 id: number
9 reason: string
10 predefinedReasons?: VideoAbusePredefinedReasonsString[]
11 reporterAccount: Account
12
13 state: VideoConstant<VideoAbuseState>
14 moderationComment?: string
15
16 video: {
17 id: number
18 name: string
19 uuid: string
20 nsfw: boolean
21 deleted: boolean
22 blacklisted: boolean
23 thumbnailPath?: string
24 channel?: VideoChannel
25 }
26
27 createdAt: Date
28 updatedAt: Date
29
30 startAt: number
31 endAt: number
32
33 count?: number
34 nth?: number
35
36 countReportsForReporter?: number
37 countReportsForReportee?: number
38}
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts
index e1d96b40a..20b9638ab 100644
--- a/shared/models/videos/index.ts
+++ b/shared/models/videos/index.ts
@@ -1,4 +1,3 @@
1export * from './abuse'
2export * from './blacklist' 1export * from './blacklist'
3export * from './caption' 2export * from './caption'
4export * from './channel' 3export * from './channel'