]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/activitypub/activity.ts
Create comment on replied mastodon statutes
[github/Chocobozzz/PeerTube.git] / shared / models / activitypub / activity.ts
CommitLineData
e4f97bab 1import { ActivityPubSignature } from './activitypub-signature'
50d6de9c 2import { VideoTorrentObject } from './objects'
0032ebe9 3import { DislikeObject } from './objects/dislike-object'
8e13fa7d 4import { VideoAbuseObject } from './objects/video-abuse-object'
6d852470 5import { VideoCommentObject } from './objects/video-comment-object'
40ff5707 6import { ViewObject } from './objects/view-object'
e4f97bab 7
50d6de9c 8export type Activity = ActivityCreate | ActivityUpdate |
54141398 9 ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce |
0032ebe9 10 ActivityUndo | ActivityLike
e4f97bab 11
50d6de9c 12export type ActivityType = 'Create' | 'Update' | 'Delete' | 'Follow' | 'Accept' | 'Announce' | 'Undo' | 'Like'
e4f97bab 13
63c93323
C
14export interface ActivityAudience {
15 to: string[]
16 cc: string[]
17}
18
e4f97bab
C
19export interface BaseActivity {
20 '@context'?: any[]
21 id: string
afffe988 22 to?: string[]
9a27cdc2 23 cc?: string[]
e4f97bab
C
24 actor: string
25 type: ActivityType
afffe988 26 signature?: ActivityPubSignature
e4f97bab
C
27}
28
29export interface ActivityCreate extends BaseActivity {
30 type: 'Create'
6d852470 31 object: VideoTorrentObject | VideoAbuseObject | ViewObject | DislikeObject | VideoCommentObject
e4f97bab
C
32}
33
34export interface ActivityUpdate extends BaseActivity {
35 type: 'Update'
50d6de9c 36 object: VideoTorrentObject
e4f97bab
C
37}
38
7a7724e6
C
39export interface ActivityDelete extends BaseActivity {
40 type: 'Delete'
41}
42
43export interface ActivityFollow extends BaseActivity {
44 type: 'Follow'
45 object: string
46}
47
48export interface ActivityAccept extends BaseActivity {
49 type: 'Accept'
e12a0092 50 object: ActivityFollow
7a7724e6 51}
d8465018
C
52
53export interface ActivityAnnounce extends BaseActivity {
54 type: 'Announce'
d7a7c248 55 object: ActivityCreate | string
d8465018 56}
54141398
C
57
58export interface ActivityUndo extends BaseActivity {
59 type: 'Undo',
0032ebe9
C
60 object: ActivityFollow | ActivityLike | ActivityCreate
61}
62
63export interface ActivityLike extends BaseActivity {
64 type: 'Like',
65 object: string
54141398 66}