]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/activitypub/objects/common-objects.ts
de1116ab3fd45790dc3a77ab97036cdde558124e
[github/Chocobozzz/PeerTube.git] / shared / models / activitypub / objects / common-objects.ts
1 export interface ActivityIdentifierObject {
2 identifier: string
3 name: string
4 }
5
6 export interface ActivityIconObject {
7 type: 'Image'
8 url: string
9 mediaType: 'image/jpeg'
10 width: number
11 height: number
12 }
13
14 export type ActivityVideoUrlObject = {
15 type: 'Link'
16 mediaType: 'video/mp4' | 'video/webm' | 'video/ogg'
17 href: string
18 height: number
19 size: number
20 fps: number
21 }
22
23 export type ActivityPlaylistSegmentHashesObject = {
24 type: 'Link'
25 name: 'sha256'
26 mediaType: 'application/json'
27 href: string
28 }
29
30 export type ActivityPlaylistInfohashesObject = {
31 type: 'Infohash'
32 name: string
33 }
34
35 export type ActivityPlaylistUrlObject = {
36 type: 'Link'
37 mediaType: 'application/x-mpegURL'
38 href: string
39 tag?: ActivityTagObject[]
40 }
41
42 export type ActivityBitTorrentUrlObject = {
43 type: 'Link'
44 mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
45 href: string
46 height: number
47 }
48
49 export type ActivityMagnetUrlObject = {
50 type: 'Link'
51 mediaType: 'application/x-bittorrent;x-scheme-handler/magnet'
52 href: string
53 height: number
54 }
55
56 export type ActivityHtmlUrlObject = {
57 type: 'Link'
58 mediaType: 'text/html'
59 href: string
60 }
61
62 export interface ActivityHashTagObject {
63 type: 'Hashtag' | 'Mention'
64 href?: string
65 name: string
66 }
67
68 export interface ActivityMentionObject {
69 type: 'Hashtag' | 'Mention'
70 href?: string
71 name: string
72 }
73
74 export type ActivityTagObject = ActivityPlaylistSegmentHashesObject |
75 ActivityPlaylistInfohashesObject |
76 ActivityVideoUrlObject |
77 ActivityHashTagObject |
78 ActivityMentionObject |
79 ActivityBitTorrentUrlObject |
80 ActivityMagnetUrlObject
81
82 export type ActivityUrlObject = ActivityVideoUrlObject |
83 ActivityPlaylistUrlObject |
84 ActivityBitTorrentUrlObject |
85 ActivityMagnetUrlObject |
86 ActivityHtmlUrlObject
87
88 export interface ActivityPubAttributedTo {
89 type: 'Group' | 'Person'
90 id: string
91 }
92
93 export interface ActivityTombstoneObject {
94 '@context'?: any
95 id: string
96 url?: string
97 type: 'Tombstone'
98 name?: string
99 formerType?: string
100 inReplyTo?: string
101 published: string
102 updated: string
103 deleted: string
104 }