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