blob: dc562c00a4c366e86054dff81783c1d496827fcf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
import {
VideoChannelObject,
VideoTorrentObject
} from './objects'
import { ActivityPubSignature } from './activitypub-signature'
export type Activity = ActivityCreate | ActivityUpdate | ActivityFlag
// Flag -> report abuse
export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag'
export interface BaseActivity {
'@context'?: any[]
id: string
to: string[]
actor: string
type: ActivityType
signature: ActivityPubSignature
}
export interface ActivityCreate extends BaseActivity {
type: 'Create'
object: VideoChannelObject
}
export interface ActivityAdd extends BaseActivity {
type: 'Add'
object: VideoTorrentObject
}
export interface ActivityUpdate extends BaseActivity {
type: 'Update'
object: VideoTorrentObject | VideoChannelObject
}
export interface ActivityFlag extends BaseActivity {
type: 'Flag'
object: string
}
|