aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/activitypub/objects
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/activitypub/objects')
-rw-r--r--shared/models/activitypub/objects/abuse-object.ts15
-rw-r--r--shared/models/activitypub/objects/activitypub-object.ts17
-rw-r--r--shared/models/activitypub/objects/cache-file-object.ts9
-rw-r--r--shared/models/activitypub/objects/common-objects.ts130
-rw-r--r--shared/models/activitypub/objects/index.ts9
-rw-r--r--shared/models/activitypub/objects/playlist-element-object.ts10
-rw-r--r--shared/models/activitypub/objects/playlist-object.ts29
-rw-r--r--shared/models/activitypub/objects/video-comment-object.ts16
-rw-r--r--shared/models/activitypub/objects/video-object.ts74
-rw-r--r--shared/models/activitypub/objects/watch-action-object.ts22
10 files changed, 0 insertions, 331 deletions
diff --git a/shared/models/activitypub/objects/abuse-object.ts b/shared/models/activitypub/objects/abuse-object.ts
deleted file mode 100644
index d938b8693..000000000
--- a/shared/models/activitypub/objects/abuse-object.ts
+++ /dev/null
@@ -1,15 +0,0 @@
1import { ActivityFlagReasonObject } from './common-objects'
2
3export interface AbuseObject {
4 type: 'Flag'
5
6 content: string
7 mediaType: 'text/markdown'
8
9 object: string | string[]
10
11 tag?: ActivityFlagReasonObject[]
12
13 startAt?: number
14 endAt?: number
15}
diff --git a/shared/models/activitypub/objects/activitypub-object.ts b/shared/models/activitypub/objects/activitypub-object.ts
deleted file mode 100644
index faeac2618..000000000
--- a/shared/models/activitypub/objects/activitypub-object.ts
+++ /dev/null
@@ -1,17 +0,0 @@
1import { AbuseObject } from './abuse-object'
2import { CacheFileObject } from './cache-file-object'
3import { PlaylistObject } from './playlist-object'
4import { VideoCommentObject } from './video-comment-object'
5import { VideoObject } from './video-object'
6import { WatchActionObject } from './watch-action-object'
7
8export type ActivityObject =
9 VideoObject |
10 AbuseObject |
11 VideoCommentObject |
12 CacheFileObject |
13 PlaylistObject |
14 WatchActionObject |
15 string
16
17export type APObjectId = string | { id: string }
diff --git a/shared/models/activitypub/objects/cache-file-object.ts b/shared/models/activitypub/objects/cache-file-object.ts
deleted file mode 100644
index 19a817582..000000000
--- a/shared/models/activitypub/objects/cache-file-object.ts
+++ /dev/null
@@ -1,9 +0,0 @@
1import { ActivityVideoUrlObject, ActivityPlaylistUrlObject } from './common-objects'
2
3export interface CacheFileObject {
4 id: string
5 type: 'CacheFile'
6 object: string
7 expires: string
8 url: ActivityVideoUrlObject | ActivityPlaylistUrlObject
9}
diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts
deleted file mode 100644
index db9c73658..000000000
--- a/shared/models/activitypub/objects/common-objects.ts
+++ /dev/null
@@ -1,130 +0,0 @@
1import { AbusePredefinedReasonsString } from '../../moderation/abuse/abuse-reason.model'
2
3export interface ActivityIdentifierObject {
4 identifier: string
5 name: string
6 url?: string
7}
8
9export interface ActivityIconObject {
10 type: 'Image'
11 url: string
12 mediaType: string
13 width?: number
14 height?: number
15}
16
17export type ActivityVideoUrlObject = {
18 type: 'Link'
19 mediaType: 'video/mp4' | 'video/webm' | 'video/ogg'
20 href: string
21 height: number
22 size: number
23 fps: number
24}
25
26export type ActivityPlaylistSegmentHashesObject = {
27 type: 'Link'
28 name: 'sha256'
29 mediaType: 'application/json'
30 href: string
31}
32
33export type ActivityVideoFileMetadataUrlObject = {
34 type: 'Link'
35 rel: [ 'metadata', any ]
36 mediaType: 'application/json'
37 height: number
38 href: string
39 fps: number
40}
41
42export type ActivityTrackerUrlObject = {
43 type: 'Link'
44 rel: [ 'tracker', 'websocket' | 'http' ]
45 name: string
46 href: string
47}
48
49export type ActivityStreamingPlaylistInfohashesObject = {
50 type: 'Infohash'
51 name: string
52}
53
54export type ActivityPlaylistUrlObject = {
55 type: 'Link'
56 mediaType: 'application/x-mpegURL'
57 href: string
58 tag?: ActivityTagObject[]
59}
60
61export type ActivityBitTorrentUrlObject = {
62 type: 'Link'
63 mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
64 href: string
65 height: number
66}
67
68export type ActivityMagnetUrlObject = {
69 type: 'Link'
70 mediaType: 'application/x-bittorrent;x-scheme-handler/magnet'
71 href: string
72 height: number
73}
74
75export type ActivityHtmlUrlObject = {
76 type: 'Link'
77 mediaType: 'text/html'
78 href: string
79}
80
81export interface ActivityHashTagObject {
82 type: 'Hashtag'
83 href?: string
84 name: string
85}
86
87export interface ActivityMentionObject {
88 type: 'Mention'
89 href?: string
90 name: string
91}
92
93export interface ActivityFlagReasonObject {
94 type: 'Hashtag'
95 name: AbusePredefinedReasonsString
96}
97
98export type ActivityTagObject =
99 ActivityPlaylistSegmentHashesObject
100 | ActivityStreamingPlaylistInfohashesObject
101 | ActivityVideoUrlObject
102 | ActivityHashTagObject
103 | ActivityMentionObject
104 | ActivityBitTorrentUrlObject
105 | ActivityMagnetUrlObject
106 | ActivityVideoFileMetadataUrlObject
107
108export type ActivityUrlObject =
109 ActivityVideoUrlObject
110 | ActivityPlaylistUrlObject
111 | ActivityBitTorrentUrlObject
112 | ActivityMagnetUrlObject
113 | ActivityHtmlUrlObject
114 | ActivityVideoFileMetadataUrlObject
115 | ActivityTrackerUrlObject
116
117export type ActivityPubAttributedTo = { type: 'Group' | 'Person', id: string } | string
118
119export interface ActivityTombstoneObject {
120 '@context'?: any
121 id: string
122 url?: string
123 type: 'Tombstone'
124 name?: string
125 formerType?: string
126 inReplyTo?: string
127 published: string
128 updated: string
129 deleted: string
130}
diff --git a/shared/models/activitypub/objects/index.ts b/shared/models/activitypub/objects/index.ts
deleted file mode 100644
index 753e02003..000000000
--- a/shared/models/activitypub/objects/index.ts
+++ /dev/null
@@ -1,9 +0,0 @@
1export * from './abuse-object'
2export * from './activitypub-object'
3export * from './cache-file-object'
4export * from './common-objects'
5export * from './playlist-element-object'
6export * from './playlist-object'
7export * from './video-comment-object'
8export * from './video-object'
9export * from './watch-action-object'
diff --git a/shared/models/activitypub/objects/playlist-element-object.ts b/shared/models/activitypub/objects/playlist-element-object.ts
deleted file mode 100644
index b85e4fe19..000000000
--- a/shared/models/activitypub/objects/playlist-element-object.ts
+++ /dev/null
@@ -1,10 +0,0 @@
1export interface PlaylistElementObject {
2 id: string
3 type: 'PlaylistElement'
4
5 url: string
6 position: number
7
8 startTimestamp?: number
9 stopTimestamp?: number
10}
diff --git a/shared/models/activitypub/objects/playlist-object.ts b/shared/models/activitypub/objects/playlist-object.ts
deleted file mode 100644
index 0ccb71828..000000000
--- a/shared/models/activitypub/objects/playlist-object.ts
+++ /dev/null
@@ -1,29 +0,0 @@
1import { ActivityIconObject, ActivityPubAttributedTo } from './common-objects'
2
3export interface PlaylistObject {
4 id: string
5 type: 'Playlist'
6
7 name: string
8
9 content: string
10 mediaType: 'text/markdown'
11
12 uuid: string
13
14 totalItems: number
15 attributedTo: ActivityPubAttributedTo[]
16
17 icon?: ActivityIconObject
18
19 published: string
20 updated: string
21
22 orderedItems?: string[]
23
24 partOf?: string
25 next?: string
26 first?: string
27
28 to?: string[]
29}
diff --git a/shared/models/activitypub/objects/video-comment-object.ts b/shared/models/activitypub/objects/video-comment-object.ts
deleted file mode 100644
index fb1e6f8db..000000000
--- a/shared/models/activitypub/objects/video-comment-object.ts
+++ /dev/null
@@ -1,16 +0,0 @@
1import { ActivityPubAttributedTo, ActivityTagObject } from './common-objects'
2
3export interface VideoCommentObject {
4 type: 'Note'
5 id: string
6
7 content: string
8 mediaType: 'text/markdown'
9
10 inReplyTo: string
11 published: string
12 updated: string
13 url: string
14 attributedTo: ActivityPubAttributedTo
15 tag: ActivityTagObject[]
16}
diff --git a/shared/models/activitypub/objects/video-object.ts b/shared/models/activitypub/objects/video-object.ts
deleted file mode 100644
index 409504f0f..000000000
--- a/shared/models/activitypub/objects/video-object.ts
+++ /dev/null
@@ -1,74 +0,0 @@
1import {
2 ActivityIconObject,
3 ActivityIdentifierObject,
4 ActivityPubAttributedTo,
5 ActivityTagObject,
6 ActivityUrlObject
7} from './common-objects'
8import { LiveVideoLatencyMode, VideoState } from '../../videos'
9
10export interface VideoObject {
11 type: 'Video'
12 id: string
13 name: string
14 duration: string
15 uuid: string
16 tag: ActivityTagObject[]
17 category: ActivityIdentifierObject
18 licence: ActivityIdentifierObject
19 language: ActivityIdentifierObject
20 subtitleLanguage: ActivityIdentifierObject[]
21 views: number
22
23 sensitive: boolean
24
25 isLiveBroadcast: boolean
26 liveSaveReplay: boolean
27 permanentLive: boolean
28 latencyMode: LiveVideoLatencyMode
29
30 commentsEnabled: boolean
31 downloadEnabled: boolean
32 waitTranscoding: boolean
33 state: VideoState
34
35 published: string
36 originallyPublishedAt: string
37 updated: string
38 uploadDate: string
39
40 mediaType: 'text/markdown'
41 content: string
42
43 support: string
44
45 icon: ActivityIconObject[]
46
47 url: ActivityUrlObject[]
48
49 likes: string
50 dislikes: string
51 shares: string
52 comments: string
53
54 attributedTo: ActivityPubAttributedTo[]
55
56 preview?: ActivityPubStoryboard[]
57
58 to?: string[]
59 cc?: string[]
60}
61
62export interface ActivityPubStoryboard {
63 type: 'Image'
64 rel: [ 'storyboard' ]
65 url: {
66 href: string
67 mediaType: string
68 width: number
69 height: number
70 tileWidth: number
71 tileHeight: number
72 tileDuration: string
73 }[]
74}
diff --git a/shared/models/activitypub/objects/watch-action-object.ts b/shared/models/activitypub/objects/watch-action-object.ts
deleted file mode 100644
index ed336602f..000000000
--- a/shared/models/activitypub/objects/watch-action-object.ts
+++ /dev/null
@@ -1,22 +0,0 @@
1export interface WatchActionObject {
2 id: string
3 type: 'WatchAction'
4
5 startTime: string
6 endTime: string
7
8 location?: {
9 addressCountry: string
10 }
11
12 uuid: string
13 object: string
14 actionStatus: 'CompletedActionStatus'
15
16 duration: string
17
18 watchSections: {
19 startTimestamp: number
20 endTimestamp: number
21 }[]
22}