-import { VideoChannelObject, VideoTorrentObject } from './objects'
import { ActivityPubSignature } from './activitypub-signature'
+import { VideoChannelObject, VideoTorrentObject } from './objects'
+import { DislikeObject } from './objects/dislike-object'
import { VideoAbuseObject } from './objects/video-abuse-object'
+import { ViewObject } from './objects/view-object'
-export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag |
- ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce
+export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate |
+ ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce |
+ ActivityUndo | ActivityLike
-// Flag -> report abuse
-export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' | 'Delete' | 'Follow' | 'Accept' | 'Announce'
+export type ActivityType = 'Create' | 'Add' | 'Update' | 'Delete' | 'Follow' | 'Accept' | 'Announce' | 'Undo' | 'Like'
export interface BaseActivity {
'@context'?: any[]
id: string
- to: string[]
+ to?: string[]
+ cc?: string[]
actor: string
type: ActivityType
- signature: ActivityPubSignature
+ signature?: ActivityPubSignature
}
export interface ActivityCreate extends BaseActivity {
type: 'Create'
- object: VideoChannelObject | VideoAbuseObject
+ object: VideoChannelObject | VideoAbuseObject | ViewObject | DislikeObject
}
export interface ActivityAdd extends BaseActivity {
object: VideoTorrentObject | VideoChannelObject
}
-export interface ActivityFlag extends BaseActivity {
- type: 'Flag'
- object: string
-}
-
export interface ActivityDelete extends BaseActivity {
type: 'Delete'
}
type: 'Announce'
object: ActivityCreate | ActivityAdd
}
+
+export interface ActivityUndo extends BaseActivity {
+ type: 'Undo',
+ object: ActivityFollow | ActivityLike | ActivityCreate
+}
+
+export interface ActivityLike extends BaseActivity {
+ type: 'Like',
+ object: string
+}