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