X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Factivitypub%2Fobjects%2Fcommon-objects.ts;h=43d7f7f7480eab9e150a0dff3a17686505389f56;hb=9777fe9eebe53debdf45091cab98f72a5987e05a;hp=e94d054295448fdf3d1c60780b81a3b500963f8a;hpb=a3b7421abb4192e215aa280418b62e96958c5e42;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts index e94d05429..43d7f7f74 100644 --- a/shared/models/activitypub/objects/common-objects.ts +++ b/shared/models/activitypub/objects/common-objects.ts @@ -1,3 +1,5 @@ +import { AbusePredefinedReasonsString } from '../../moderation/abuse/abuse-reason.model' + export interface ActivityIdentifierObject { identifier: string name: string @@ -7,7 +9,7 @@ export interface ActivityIdentifierObject { export interface ActivityIconObject { type: 'Image' url: string - mediaType: 'image/jpeg' | 'image/png' + mediaType: string width?: number height?: number } @@ -28,6 +30,22 @@ export type ActivityPlaylistSegmentHashesObject = { href: string } +export type ActivityVideoFileMetadataUrlObject = { + type: 'Link' + rel: [ 'metadata', any ] + mediaType: 'application/json' + height: number + href: string + fps: number +} + +export type ActivityTrackerUrlObject = { + type: 'Link' + rel: [ 'tracker', 'websocket' | 'http' ] + name: string + href: string +} + export type ActivityPlaylistInfohashesObject = { type: 'Infohash' name: string @@ -61,17 +79,22 @@ export type ActivityHtmlUrlObject = { } export interface ActivityHashTagObject { - type: 'Hashtag' | 'Mention' + type: 'Hashtag' href?: string name: string } export interface ActivityMentionObject { - type: 'Hashtag' | 'Mention' + type: 'Mention' href?: string name: string } +export interface ActivityFlagReasonObject { + type: 'Hashtag' + name: AbusePredefinedReasonsString +} + export type ActivityTagObject = ActivityPlaylistSegmentHashesObject | ActivityPlaylistInfohashesObject @@ -80,6 +103,7 @@ export type ActivityTagObject = | ActivityMentionObject | ActivityBitTorrentUrlObject | ActivityMagnetUrlObject + | ActivityVideoFileMetadataUrlObject export type ActivityUrlObject = ActivityVideoUrlObject @@ -87,6 +111,8 @@ export type ActivityUrlObject = | ActivityBitTorrentUrlObject | ActivityMagnetUrlObject | ActivityHtmlUrlObject + | ActivityVideoFileMetadataUrlObject + | ActivityTrackerUrlObject export interface ActivityPubAttributedTo { type: 'Group' | 'Person'