]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/activitypub/objects/common-objects.ts
Adding frontend peertubeHelpers.getBaseRouterRoute. (#4153)
[github/Chocobozzz/PeerTube.git] / shared / models / activitypub / objects / common-objects.ts
index 096d422eab117a4aaa3f12c30ff75bf64246b2a7..43d7f7f7480eab9e150a0dff3a17686505389f56 100644 (file)
@@ -1,4 +1,4 @@
-import { VideoAbusePredefinedReasonsString } from '@shared/models/videos'
+import { AbusePredefinedReasonsString } from '../../moderation/abuse/abuse-reason.model'
 
 export interface ActivityIdentifierObject {
   identifier: string
@@ -9,7 +9,7 @@ export interface ActivityIdentifierObject {
 export interface ActivityIconObject {
   type: 'Image'
   url: string
-  mediaType: 'image/jpeg' | 'image/png'
+  mediaType: string
   width?: number
   height?: number
 }
@@ -30,7 +30,7 @@ export type ActivityPlaylistSegmentHashesObject = {
   href: string
 }
 
-export type ActivityVideoFileMetadataObject = {
+export type ActivityVideoFileMetadataUrlObject = {
   type: 'Link'
   rel: [ 'metadata', any ]
   mediaType: 'application/json'
@@ -39,6 +39,13 @@ export type ActivityVideoFileMetadataObject = {
   fps: number
 }
 
+export type ActivityTrackerUrlObject = {
+  type: 'Link'
+  rel: [ 'tracker', 'websocket' | 'http' ]
+  name: string
+  href: string
+}
+
 export type ActivityPlaylistInfohashesObject = {
   type: 'Infohash'
   name: string
@@ -85,7 +92,7 @@ export interface ActivityMentionObject {
 
 export interface ActivityFlagReasonObject {
   type: 'Hashtag'
-  name: VideoAbusePredefinedReasonsString
+  name: AbusePredefinedReasonsString
 }
 
 export type ActivityTagObject =
@@ -96,7 +103,7 @@ export type ActivityTagObject =
   | ActivityMentionObject
   | ActivityBitTorrentUrlObject
   | ActivityMagnetUrlObject
-  | ActivityVideoFileMetadataObject
+  | ActivityVideoFileMetadataUrlObject
 
 export type ActivityUrlObject =
   ActivityVideoUrlObject
@@ -104,7 +111,8 @@ export type ActivityUrlObject =
   | ActivityBitTorrentUrlObject
   | ActivityMagnetUrlObject
   | ActivityHtmlUrlObject
-  | ActivityVideoFileMetadataObject
+  | ActivityVideoFileMetadataUrlObject
+  | ActivityTrackerUrlObject
 
 export interface ActivityPubAttributedTo {
   type: 'Group' | 'Person'