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