aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/activitypub/objects/common-objects.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/activitypub/objects/common-objects.ts')
-rw-r--r--shared/models/activitypub/objects/common-objects.ts60
1 files changed, 44 insertions, 16 deletions
diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts
index 1de60da94..8c89810d6 100644
--- a/shared/models/activitypub/objects/common-objects.ts
+++ b/shared/models/activitypub/objects/common-objects.ts
@@ -19,28 +19,56 @@ export interface ActivityIconObject {
19 19
20export type ActivityVideoUrlObject = { 20export type ActivityVideoUrlObject = {
21 type: 'Link' 21 type: 'Link'
22 mimeType: 'video/mp4' | 'video/webm' | 'video/ogg' 22 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
23 mimeType?: 'video/mp4' | 'video/webm' | 'video/ogg'
24 mediaType: 'video/mp4' | 'video/webm' | 'video/ogg'
23 href: string 25 href: string
24 height: number 26 height: number
25 size: number 27 size: number
26 fps: number 28 fps: number
27} 29}
28 30
29export type ActivityUrlObject = 31export type ActivityPlaylistSegmentHashesObject = {
30 ActivityVideoUrlObject 32 type: 'Link'
31 | 33 name: 'sha256'
32 { 34 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
33 type: 'Link' 35 mimeType?: 'application/json'
34 mimeType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet' 36 mediaType: 'application/json'
35 href: string 37 href: string
36 height: number 38}
37 } 39
38 | 40export type ActivityPlaylistInfohashesObject = {
39 { 41 type: 'Infohash'
40 type: 'Link' 42 name: string
41 mimeType: 'text/html' 43}
42 href: string 44
43 } 45export type ActivityPlaylistUrlObject = {
46 type: 'Link'
47 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
48 mimeType?: 'application/x-mpegURL'
49 mediaType: 'application/x-mpegURL'
50 href: string
51 tag?: (ActivityPlaylistSegmentHashesObject | ActivityPlaylistInfohashesObject)[]
52}
53
54export type ActivityBitTorrentUrlObject = {
55 type: 'Link'
56 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
57 mimeType?: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
58 mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
59 href: string
60 height: number
61}
62
63export type ActivityHtmlUrlObject = {
64 type: 'Link'
65 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
66 mimeType?: 'text/html'
67 mediaType: 'text/html'
68 href: string
69}
70
71export type ActivityUrlObject = ActivityVideoUrlObject | ActivityPlaylistUrlObject | ActivityBitTorrentUrlObject | ActivityHtmlUrlObject
44 72
45export interface ActivityPubAttributedTo { 73export interface ActivityPubAttributedTo {
46 type: 'Group' | 'Person' 74 type: 'Group' | 'Person'