aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/activitypub/activity.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-09 17:51:58 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commite4f97babf701481b55cc10fb3448feab5f97c867 (patch)
treeaf37402a594dc5ff09f71ecb0687e8cfe4cdb471 /shared/models/activitypub/activity.ts
parent343ad675f2a26c15b86150a9a3552e619d5d44f4 (diff)
downloadPeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.tar.gz
PeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.tar.zst
PeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.zip
Begin activitypub
Diffstat (limited to 'shared/models/activitypub/activity.ts')
-rw-r--r--shared/models/activitypub/activity.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts
new file mode 100644
index 000000000..0274416b2
--- /dev/null
+++ b/shared/models/activitypub/activity.ts
@@ -0,0 +1,34 @@
1import {
2 VideoChannelObject,
3 VideoTorrentObject
4} from './objects'
5import { ActivityPubSignature } from './activitypub-signature'
6
7export type Activity = ActivityCreate | ActivityUpdate | ActivityFlag
8
9// Flag -> report abuse
10export type ActivityType = 'Create' | 'Update' | 'Flag'
11
12export interface BaseActivity {
13 '@context'?: any[]
14 id: string
15 to: string[]
16 actor: string
17 type: ActivityType
18 signature: ActivityPubSignature
19}
20
21export interface ActivityCreate extends BaseActivity {
22 type: 'Create'
23 object: VideoTorrentObject | VideoChannelObject
24}
25
26export interface ActivityUpdate extends BaseActivity {
27 type: 'Update'
28 object: VideoTorrentObject | VideoChannelObject
29}
30
31export interface ActivityFlag extends BaseActivity {
32 type: 'Flag'
33 object: string
34}