]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/activitypub/objects/common-objects.ts
Merge branch 'develop' into pr/1285
[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 ActivityTagObject {
7 type: 'Hashtag' | 'Mention'
8 href?: string
9 name: string
10 }
11
12 export interface ActivityIconObject {
13 type: 'Image'
14 url: string
15 mediaType: 'image/jpeg'
16 width: number
17 height: number
18 }
19
20 export type ActivityVideoUrlObject = {
21 type: 'Link'
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'
25 href: string
26 height: number
27 size: number
28 fps: number
29 }
30
31 export type ActivityPlaylistSegmentHashesObject = {
32 type: 'Link'
33 name: 'sha256'
34 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
35 mimeType?: 'application/json'
36 mediaType: 'application/json'
37 href: string
38 }
39
40 export type ActivityPlaylistInfohashesObject = {
41 type: 'Infohash'
42 name: string
43 }
44
45 export 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
54 export 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
63 export 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
71 export type ActivityUrlObject = ActivityVideoUrlObject | ActivityPlaylistUrlObject | ActivityBitTorrentUrlObject | ActivityHtmlUrlObject
72
73 export interface ActivityPubAttributedTo {
74 type: 'Group' | 'Person'
75 id: string
76 }