aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/accounts/follow.model.ts7
-rw-r--r--shared/models/index.ts2
-rw-r--r--shared/models/pods/index.ts3
-rw-r--r--shared/models/pods/pod-signature.model.ts4
-rw-r--r--shared/models/pods/pod.model.ts6
-rw-r--r--shared/models/pods/remote-video/index.ts12
-rw-r--r--shared/models/pods/remote-video/remote-qadu-video-request.model.ts10
-rw-r--r--shared/models/pods/remote-video/remote-video-author-create-request.model.ts11
-rw-r--r--shared/models/pods/remote-video/remote-video-author-remove-request.model.ts10
-rw-r--r--shared/models/pods/remote-video/remote-video-channel-create-request.model.ts15
-rw-r--r--shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts10
-rw-r--r--shared/models/pods/remote-video/remote-video-channel-update-request.model.ts15
-rw-r--r--shared/models/pods/remote-video/remote-video-create-request.model.ts32
-rw-r--r--shared/models/pods/remote-video/remote-video-event-request.model.ts11
-rw-r--r--shared/models/pods/remote-video/remote-video-remove-request.model.ts10
-rw-r--r--shared/models/pods/remote-video/remote-video-report-abuse-request.model.ts12
-rw-r--r--shared/models/pods/remote-video/remote-video-request.model.ts9
-rw-r--r--shared/models/pods/remote-video/remote-video-update-request.model.ts30
-rw-r--r--shared/models/request-scheduler.model.ts19
-rw-r--r--shared/models/videos/video-abuse.model.ts2
-rw-r--r--shared/models/videos/video.model.ts2
21 files changed, 9 insertions, 223 deletions
diff --git a/shared/models/accounts/follow.model.ts b/shared/models/accounts/follow.model.ts
index 80cfe07e4..8094634c1 100644
--- a/shared/models/accounts/follow.model.ts
+++ b/shared/models/accounts/follow.model.ts
@@ -1 +1,8 @@
1export type FollowState = 'pending' | 'accepted' 1export type FollowState = 'pending' | 'accepted'
2
3export interface AccountFollow {
4 id: number
5 name: string
6 score?: number // Used for followers
7 host: string
8}
diff --git a/shared/models/index.ts b/shared/models/index.ts
index 28decac03..faf616bfc 100644
--- a/shared/models/index.ts
+++ b/shared/models/index.ts
@@ -1,10 +1,8 @@
1export * from './accounts' 1export * from './accounts'
2export * from './activitypub' 2export * from './activitypub'
3export * from './pods'
4export * from './users' 3export * from './users'
5export * from './videos' 4export * from './videos'
6export * from './job.model' 5export * from './job.model'
7export * from './oauth-client-local.model' 6export * from './oauth-client-local.model'
8export * from './result-list.model' 7export * from './result-list.model'
9export * from './request-scheduler.model'
10export * from './server-config.model' 8export * from './server-config.model'
diff --git a/shared/models/pods/index.ts b/shared/models/pods/index.ts
deleted file mode 100644
index f59d01540..000000000
--- a/shared/models/pods/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
1export * from './pod-signature.model'
2export * from './pod.model'
3export * from './remote-video'
diff --git a/shared/models/pods/pod-signature.model.ts b/shared/models/pods/pod-signature.model.ts
deleted file mode 100644
index b7988a40c..000000000
--- a/shared/models/pods/pod-signature.model.ts
+++ /dev/null
@@ -1,4 +0,0 @@
1export interface PodSignature {
2 host: string
3 signature: string
4}
diff --git a/shared/models/pods/pod.model.ts b/shared/models/pods/pod.model.ts
deleted file mode 100644
index ff9e8f2f5..000000000
--- a/shared/models/pods/pod.model.ts
+++ /dev/null
@@ -1,6 +0,0 @@
1export interface Pod {
2 id: number,
3 host: string,
4 score: number,
5 createdAt: Date
6}
diff --git a/shared/models/pods/remote-video/index.ts b/shared/models/pods/remote-video/index.ts
deleted file mode 100644
index 918b9e1f6..000000000
--- a/shared/models/pods/remote-video/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
1export * from './remote-qadu-video-request.model'
2export * from './remote-video-author-create-request.model'
3export * from './remote-video-author-remove-request.model'
4export * from './remote-video-event-request.model'
5export * from './remote-video-request.model'
6export * from './remote-video-create-request.model'
7export * from './remote-video-update-request.model'
8export * from './remote-video-remove-request.model'
9export * from './remote-video-channel-create-request.model'
10export * from './remote-video-channel-update-request.model'
11export * from './remote-video-channel-remove-request.model'
12export * from './remote-video-report-abuse-request.model'
diff --git a/shared/models/pods/remote-video/remote-qadu-video-request.model.ts b/shared/models/pods/remote-video/remote-qadu-video-request.model.ts
deleted file mode 100644
index 6128c5801..000000000
--- a/shared/models/pods/remote-video/remote-qadu-video-request.model.ts
+++ /dev/null
@@ -1,10 +0,0 @@
1export interface RemoteQaduVideoData {
2 uuid: string
3 views?: number
4 likes?: number
5 dislikes?: number
6}
7
8export interface RemoteQaduVideoRequest {
9 data: RemoteQaduVideoData
10}
diff --git a/shared/models/pods/remote-video/remote-video-author-create-request.model.ts b/shared/models/pods/remote-video/remote-video-author-create-request.model.ts
deleted file mode 100644
index ae364d177..000000000
--- a/shared/models/pods/remote-video/remote-video-author-create-request.model.ts
+++ /dev/null
@@ -1,11 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoAuthorCreateData {
4 uuid: string
5 name: string
6}
7
8export interface RemoteVideoAuthorCreateRequest extends RemoteVideoRequest {
9 type: 'add-author'
10 data: RemoteVideoAuthorCreateData
11}
diff --git a/shared/models/pods/remote-video/remote-video-author-remove-request.model.ts b/shared/models/pods/remote-video/remote-video-author-remove-request.model.ts
deleted file mode 100644
index 8738e92f0..000000000
--- a/shared/models/pods/remote-video/remote-video-author-remove-request.model.ts
+++ /dev/null
@@ -1,10 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoAuthorRemoveData {
4 uuid: string
5}
6
7export interface RemoteVideoAuthorRemoveRequest extends RemoteVideoRequest {
8 type: 'remove-author'
9 data: RemoteVideoAuthorRemoveData
10}
diff --git a/shared/models/pods/remote-video/remote-video-channel-create-request.model.ts b/shared/models/pods/remote-video/remote-video-channel-create-request.model.ts
deleted file mode 100644
index 54163a2db..000000000
--- a/shared/models/pods/remote-video/remote-video-channel-create-request.model.ts
+++ /dev/null
@@ -1,15 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoChannelCreateData {
4 uuid: string
5 name: string
6 description: string
7 createdAt: Date
8 updatedAt: Date
9 ownerUUID: string
10}
11
12export interface RemoteVideoChannelCreateRequest extends RemoteVideoRequest {
13 type: 'add-channel'
14 data: RemoteVideoChannelCreateData
15}
diff --git a/shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts b/shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts
deleted file mode 100644
index 7aa3fe112..000000000
--- a/shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts
+++ /dev/null
@@ -1,10 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoChannelRemoveData {
4 uuid: string
5}
6
7export interface RemoteVideoChannelRemoveRequest extends RemoteVideoRequest {
8 type: 'remove-channel'
9 data: RemoteVideoChannelRemoveData
10}
diff --git a/shared/models/pods/remote-video/remote-video-channel-update-request.model.ts b/shared/models/pods/remote-video/remote-video-channel-update-request.model.ts
deleted file mode 100644
index 70250d109..000000000
--- a/shared/models/pods/remote-video/remote-video-channel-update-request.model.ts
+++ /dev/null
@@ -1,15 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoChannelUpdateData {
4 uuid: string
5 name: string
6 description: string
7 createdAt: Date
8 updatedAt: Date
9 ownerUUID: string
10}
11
12export interface RemoteVideoChannelUpdateRequest extends RemoteVideoRequest {
13 type: 'update-channel'
14 data: RemoteVideoChannelUpdateData
15}
diff --git a/shared/models/pods/remote-video/remote-video-create-request.model.ts b/shared/models/pods/remote-video/remote-video-create-request.model.ts
deleted file mode 100644
index 9a382e654..000000000
--- a/shared/models/pods/remote-video/remote-video-create-request.model.ts
+++ /dev/null
@@ -1,32 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoCreateData {
4 uuid: string
5 channelUUID: string
6 tags: string[]
7 name: string
8 category: number
9 licence: number
10 language: number
11 nsfw: boolean
12 truncatedDescription: string
13 duration: number
14 createdAt: Date
15 updatedAt: Date
16 views: number
17 likes: number
18 dislikes: number
19 privacy: number
20 thumbnailData: string
21 files: {
22 infoHash: string
23 extname: string
24 resolution: number
25 size: number
26 }[]
27}
28
29export interface RemoteVideoCreateRequest extends RemoteVideoRequest {
30 type: 'add-video'
31 data: RemoteVideoCreateData
32}
diff --git a/shared/models/pods/remote-video/remote-video-event-request.model.ts b/shared/models/pods/remote-video/remote-video-event-request.model.ts
deleted file mode 100644
index ecc374750..000000000
--- a/shared/models/pods/remote-video/remote-video-event-request.model.ts
+++ /dev/null
@@ -1,11 +0,0 @@
1export type RemoteVideoEventType = 'views' | 'likes' | 'dislikes'
2
3export interface RemoteVideoEventData {
4 uuid: string
5 eventType: RemoteVideoEventType
6 count: number
7}
8
9export interface RemoteVideoEventRequest {
10 data: RemoteVideoEventData
11}
diff --git a/shared/models/pods/remote-video/remote-video-remove-request.model.ts b/shared/models/pods/remote-video/remote-video-remove-request.model.ts
deleted file mode 100644
index 79a5e0a5f..000000000
--- a/shared/models/pods/remote-video/remote-video-remove-request.model.ts
+++ /dev/null
@@ -1,10 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoRemoveData {
4 uuid: string
5}
6
7export interface RemoteVideoRemoveRequest extends RemoteVideoRequest {
8 type: 'remove-video'
9 data: RemoteVideoRemoveData
10}
diff --git a/shared/models/pods/remote-video/remote-video-report-abuse-request.model.ts b/shared/models/pods/remote-video/remote-video-report-abuse-request.model.ts
deleted file mode 100644
index 05ad132cf..000000000
--- a/shared/models/pods/remote-video/remote-video-report-abuse-request.model.ts
+++ /dev/null
@@ -1,12 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoReportAbuseData {
4 videoUUID: string
5 reporterUsername: string
6 reportReason: string
7}
8
9export interface RemoteVideoReportAbuseRequest extends RemoteVideoRequest {
10 type: 'report-abuse'
11 data: RemoteVideoReportAbuseData
12}
diff --git a/shared/models/pods/remote-video/remote-video-request.model.ts b/shared/models/pods/remote-video/remote-video-request.model.ts
deleted file mode 100644
index 56f8136c2..000000000
--- a/shared/models/pods/remote-video/remote-video-request.model.ts
+++ /dev/null
@@ -1,9 +0,0 @@
1export interface RemoteVideoRequest {
2 type: RemoteVideoRequestType
3 data: any
4}
5
6export type RemoteVideoRequestType = 'add-video' | 'update-video' | 'remove-video' |
7 'add-channel' | 'update-channel' | 'remove-channel' |
8 'report-abuse' |
9 'add-author' | 'remove-author'
diff --git a/shared/models/pods/remote-video/remote-video-update-request.model.ts b/shared/models/pods/remote-video/remote-video-update-request.model.ts
deleted file mode 100644
index 924489c75..000000000
--- a/shared/models/pods/remote-video/remote-video-update-request.model.ts
+++ /dev/null
@@ -1,30 +0,0 @@
1import { RemoteVideoRequest } from './remote-video-request.model'
2
3export interface RemoteVideoUpdateData {
4 uuid: string
5 tags: string[]
6 name: string
7 category: number
8 licence: number
9 language: number
10 nsfw: boolean
11 truncatedDescription: string
12 duration: number
13 createdAt: Date
14 updatedAt: Date
15 views: number
16 likes: number
17 dislikes: number
18 privacy: number
19 files: {
20 infoHash: string
21 extname: string
22 resolution: number
23 size: number
24 }[]
25}
26
27export interface RemoteVideoUpdateRequest extends RemoteVideoRequest {
28 type: 'update-video'
29 data: RemoteVideoUpdateData
30}
diff --git a/shared/models/request-scheduler.model.ts b/shared/models/request-scheduler.model.ts
deleted file mode 100644
index 8df184a09..000000000
--- a/shared/models/request-scheduler.model.ts
+++ /dev/null
@@ -1,19 +0,0 @@
1export type RequestEndpoint = 'videos'
2
3export type RequestVideoQaduType = 'likes' | 'dislikes' | 'views'
4
5export type RequestVideoEventType = 'likes' | 'dislikes' | 'views'
6
7export type RequestSchedulerStatsAttributes = {
8 totalRequests: number
9 requestsLimitPods: number
10 requestsLimitPerPod: number
11 remainingMilliSeconds: number
12 milliSecondsInterval: number
13}
14
15export interface RequestSchedulerStats {
16 requestScheduler: RequestSchedulerStatsAttributes
17 requestVideoQaduScheduler: RequestSchedulerStatsAttributes
18 requestVideoEventScheduler: RequestSchedulerStatsAttributes
19}
diff --git a/shared/models/videos/video-abuse.model.ts b/shared/models/videos/video-abuse.model.ts
index e005a1fd5..38041e491 100644
--- a/shared/models/videos/video-abuse.model.ts
+++ b/shared/models/videos/video-abuse.model.ts
@@ -1,6 +1,6 @@
1export interface VideoAbuse { 1export interface VideoAbuse {
2 id: number 2 id: number
3 reporterPodHost: string 3 reporterServerHost: string
4 reason: string 4 reason: string
5 reporterUsername: string 5 reporterUsername: string
6 videoId: number 6 videoId: number
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index 0606f1aec..08b29425c 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -26,7 +26,7 @@ export interface Video {
26 duration: number 26 duration: number
27 isLocal: boolean 27 isLocal: boolean
28 name: string 28 name: string
29 podHost: string 29 serverHost: string
30 tags: string[] 30 tags: string[]
31 thumbnailPath: string 31 thumbnailPath: string
32 previewPath: string 32 previewPath: string