]>
Commit | Line | Data |
---|---|---|
8e13fa7d | 1 | import { VideoChannelObject, VideoTorrentObject } from './objects' |
e4f97bab | 2 | import { ActivityPubSignature } from './activitypub-signature' |
8e13fa7d | 3 | import { VideoAbuseObject } from './objects/video-abuse-object' |
e4f97bab | 4 | |
7a7724e6 | 5 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag | |
d8465018 | 6 | ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce |
e4f97bab C |
7 | |
8 | // Flag -> report abuse | |
d8465018 | 9 | export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' | 'Delete' | 'Follow' | 'Accept' | 'Announce' |
e4f97bab C |
10 | |
11 | export interface BaseActivity { | |
12 | '@context'?: any[] | |
13 | id: string | |
14 | to: string[] | |
15 | actor: string | |
16 | type: ActivityType | |
17 | signature: ActivityPubSignature | |
18 | } | |
19 | ||
20 | export interface ActivityCreate extends BaseActivity { | |
21 | type: 'Create' | |
8e13fa7d | 22 | object: VideoChannelObject | VideoAbuseObject |
0d0e8dd0 C |
23 | } |
24 | ||
25 | export interface ActivityAdd extends BaseActivity { | |
26 | type: 'Add' | |
27 | object: VideoTorrentObject | |
e4f97bab C |
28 | } |
29 | ||
30 | export interface ActivityUpdate extends BaseActivity { | |
31 | type: 'Update' | |
32 | object: VideoTorrentObject | VideoChannelObject | |
33 | } | |
34 | ||
35 | export interface ActivityFlag extends BaseActivity { | |
36 | type: 'Flag' | |
37 | object: string | |
38 | } | |
7a7724e6 C |
39 | |
40 | export interface ActivityDelete extends BaseActivity { | |
41 | type: 'Delete' | |
42 | } | |
43 | ||
44 | export interface ActivityFollow extends BaseActivity { | |
45 | type: 'Follow' | |
46 | object: string | |
47 | } | |
48 | ||
49 | export interface ActivityAccept extends BaseActivity { | |
50 | type: 'Accept' | |
51 | } | |
d8465018 C |
52 | |
53 | export interface ActivityAnnounce extends BaseActivity { | |
54 | type: 'Announce' | |
55 | object: VideoChannelObject | VideoTorrentObject | |
56 | } |