]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/activitypub/objects/common-objects.ts
Merge branch 'release/2.1.0' 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 ActivityPlaylistInfohashesObject = {
32 type: 'Infohash'
33 name: string
34 }
35
36 export type ActivityPlaylistUrlObject = {
37 type: 'Link'
38 mediaType: 'application/x-mpegURL'
39 href: string
40 tag?: ActivityTagObject[]
41 }
42
43 export type ActivityBitTorrentUrlObject = {
44 type: 'Link'
45 mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
46 href: string
47 height: number
48 }
49
50 export type ActivityMagnetUrlObject = {
51 type: 'Link'
52 mediaType: 'application/x-bittorrent;x-scheme-handler/magnet'
53 href: string
54 height: number
55 }
56
57 export type ActivityHtmlUrlObject = {
58 type: 'Link'
59 mediaType: 'text/html'
60 href: string
61 }
62
63 export interface ActivityHashTagObject {
64 type: 'Hashtag' | 'Mention'
65 href?: string
66 name: string
67 }
68
69 export interface ActivityMentionObject {
70 type: 'Hashtag' | 'Mention'
71 href?: string
72 name: string
73 }
74
75 export type ActivityTagObject =
76 ActivityPlaylistSegmentHashesObject
77 | ActivityPlaylistInfohashesObject
78 | ActivityVideoUrlObject
79 | ActivityHashTagObject
80 | ActivityMentionObject
81 | ActivityBitTorrentUrlObject
82 | ActivityMagnetUrlObject
83
84 export type ActivityUrlObject =
85 ActivityVideoUrlObject
86 | ActivityPlaylistUrlObject
87 | ActivityBitTorrentUrlObject
88 | ActivityMagnetUrlObject
89 | ActivityHtmlUrlObject
90
91 export interface ActivityPubAttributedTo {
92 type: 'Group' | 'Person'
93 id: string
94 }
95
96 export interface ActivityTombstoneObject {
97 '@context'?: any
98 id: string
99 url?: string
100 type: 'Tombstone'
101 name?: string
102 formerType?: string
103 inReplyTo?: string
104 published: string
105 updated: string
106 deleted: string
107 }