diff options
Diffstat (limited to 'packages/models/src/activitypub')
19 files changed, 564 insertions, 0 deletions
diff --git a/packages/models/src/activitypub/activity.ts b/packages/models/src/activitypub/activity.ts new file mode 100644 index 000000000..78a3ab33b --- /dev/null +++ b/packages/models/src/activitypub/activity.ts | |||
@@ -0,0 +1,135 @@ | |||
1 | import { ActivityPubActor } from './activitypub-actor.js' | ||
2 | import { ActivityPubSignature } from './activitypub-signature.js' | ||
3 | import { | ||
4 | ActivityFlagReasonObject, | ||
5 | ActivityObject, | ||
6 | APObjectId, | ||
7 | CacheFileObject, | ||
8 | PlaylistObject, | ||
9 | VideoCommentObject, | ||
10 | VideoObject, | ||
11 | WatchActionObject | ||
12 | } from './objects/index.js' | ||
13 | |||
14 | export type ActivityUpdateObject = | ||
15 | Extract<ActivityObject, VideoObject | CacheFileObject | PlaylistObject | ActivityPubActor | string> | ActivityPubActor | ||
16 | |||
17 | // Cannot Extract from Activity because of circular reference | ||
18 | export type ActivityUndoObject = | ||
19 | ActivityFollow | ActivityLike | ActivityDislike | ActivityCreate<CacheFileObject | string> | ActivityAnnounce | ||
20 | |||
21 | export type ActivityCreateObject = | ||
22 | Extract<ActivityObject, VideoObject | CacheFileObject | WatchActionObject | VideoCommentObject | PlaylistObject | string> | ||
23 | |||
24 | export type Activity = | ||
25 | ActivityCreate<ActivityCreateObject> | | ||
26 | ActivityUpdate<ActivityUpdateObject> | | ||
27 | ActivityDelete | | ||
28 | ActivityFollow | | ||
29 | ActivityAccept | | ||
30 | ActivityAnnounce | | ||
31 | ActivityUndo<ActivityUndoObject> | | ||
32 | ActivityLike | | ||
33 | ActivityReject | | ||
34 | ActivityView | | ||
35 | ActivityDislike | | ||
36 | ActivityFlag | ||
37 | |||
38 | export type ActivityType = | ||
39 | 'Create' | | ||
40 | 'Update' | | ||
41 | 'Delete' | | ||
42 | 'Follow' | | ||
43 | 'Accept' | | ||
44 | 'Announce' | | ||
45 | 'Undo' | | ||
46 | 'Like' | | ||
47 | 'Reject' | | ||
48 | 'View' | | ||
49 | 'Dislike' | | ||
50 | 'Flag' | ||
51 | |||
52 | export interface ActivityAudience { | ||
53 | to: string[] | ||
54 | cc: string[] | ||
55 | } | ||
56 | |||
57 | export interface BaseActivity { | ||
58 | '@context'?: any[] | ||
59 | id: string | ||
60 | to?: string[] | ||
61 | cc?: string[] | ||
62 | actor: string | ActivityPubActor | ||
63 | type: ActivityType | ||
64 | signature?: ActivityPubSignature | ||
65 | } | ||
66 | |||
67 | export interface ActivityCreate <T extends ActivityCreateObject> extends BaseActivity { | ||
68 | type: 'Create' | ||
69 | object: T | ||
70 | } | ||
71 | |||
72 | export interface ActivityUpdate <T extends ActivityUpdateObject> extends BaseActivity { | ||
73 | type: 'Update' | ||
74 | object: T | ||
75 | } | ||
76 | |||
77 | export interface ActivityDelete extends BaseActivity { | ||
78 | type: 'Delete' | ||
79 | object: APObjectId | ||
80 | } | ||
81 | |||
82 | export interface ActivityFollow extends BaseActivity { | ||
83 | type: 'Follow' | ||
84 | object: string | ||
85 | } | ||
86 | |||
87 | export interface ActivityAccept extends BaseActivity { | ||
88 | type: 'Accept' | ||
89 | object: ActivityFollow | ||
90 | } | ||
91 | |||
92 | export interface ActivityReject extends BaseActivity { | ||
93 | type: 'Reject' | ||
94 | object: ActivityFollow | ||
95 | } | ||
96 | |||
97 | export interface ActivityAnnounce extends BaseActivity { | ||
98 | type: 'Announce' | ||
99 | object: APObjectId | ||
100 | } | ||
101 | |||
102 | export interface ActivityUndo <T extends ActivityUndoObject> extends BaseActivity { | ||
103 | type: 'Undo' | ||
104 | object: T | ||
105 | } | ||
106 | |||
107 | export interface ActivityLike extends BaseActivity { | ||
108 | type: 'Like' | ||
109 | object: APObjectId | ||
110 | } | ||
111 | |||
112 | export interface ActivityView extends BaseActivity { | ||
113 | type: 'View' | ||
114 | actor: string | ||
115 | object: APObjectId | ||
116 | |||
117 | // If sending a "viewer" event | ||
118 | expires?: string | ||
119 | } | ||
120 | |||
121 | export interface ActivityDislike extends BaseActivity { | ||
122 | id: string | ||
123 | type: 'Dislike' | ||
124 | actor: string | ||
125 | object: APObjectId | ||
126 | } | ||
127 | |||
128 | export interface ActivityFlag extends BaseActivity { | ||
129 | type: 'Flag' | ||
130 | content: string | ||
131 | object: APObjectId | APObjectId[] | ||
132 | tag?: ActivityFlagReasonObject[] | ||
133 | startAt?: number | ||
134 | endAt?: number | ||
135 | } | ||
diff --git a/packages/models/src/activitypub/activitypub-actor.ts b/packages/models/src/activitypub/activitypub-actor.ts new file mode 100644 index 000000000..85b37c5ad --- /dev/null +++ b/packages/models/src/activitypub/activitypub-actor.ts | |||
@@ -0,0 +1,34 @@ | |||
1 | import { ActivityIconObject, ActivityPubAttributedTo } from './objects/common-objects.js' | ||
2 | |||
3 | export type ActivityPubActorType = 'Person' | 'Application' | 'Group' | 'Service' | 'Organization' | ||
4 | |||
5 | export interface ActivityPubActor { | ||
6 | '@context': any[] | ||
7 | type: ActivityPubActorType | ||
8 | id: string | ||
9 | following: string | ||
10 | followers: string | ||
11 | playlists?: string | ||
12 | inbox: string | ||
13 | outbox: string | ||
14 | preferredUsername: string | ||
15 | url: string | ||
16 | name: string | ||
17 | endpoints: { | ||
18 | sharedInbox: string | ||
19 | } | ||
20 | summary: string | ||
21 | attributedTo: ActivityPubAttributedTo[] | ||
22 | |||
23 | support?: string | ||
24 | publicKey: { | ||
25 | id: string | ||
26 | owner: string | ||
27 | publicKeyPem: string | ||
28 | } | ||
29 | |||
30 | image?: ActivityIconObject | ActivityIconObject[] | ||
31 | icon?: ActivityIconObject | ActivityIconObject[] | ||
32 | |||
33 | published?: string | ||
34 | } | ||
diff --git a/packages/models/src/activitypub/activitypub-collection.ts b/packages/models/src/activitypub/activitypub-collection.ts new file mode 100644 index 000000000..b98ad37c2 --- /dev/null +++ b/packages/models/src/activitypub/activitypub-collection.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | import { Activity } from './activity.js' | ||
2 | |||
3 | export interface ActivityPubCollection { | ||
4 | '@context': string[] | ||
5 | type: 'Collection' | 'CollectionPage' | ||
6 | totalItems: number | ||
7 | partOf?: string | ||
8 | items: Activity[] | ||
9 | } | ||
diff --git a/packages/models/src/activitypub/activitypub-ordered-collection.ts b/packages/models/src/activitypub/activitypub-ordered-collection.ts new file mode 100644 index 000000000..3de0890bb --- /dev/null +++ b/packages/models/src/activitypub/activitypub-ordered-collection.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | export interface ActivityPubOrderedCollection<T> { | ||
2 | '@context': string[] | ||
3 | type: 'OrderedCollection' | 'OrderedCollectionPage' | ||
4 | totalItems: number | ||
5 | orderedItems: T[] | ||
6 | |||
7 | partOf?: string | ||
8 | next?: string | ||
9 | first?: string | ||
10 | } | ||
diff --git a/packages/models/src/activitypub/activitypub-root.ts b/packages/models/src/activitypub/activitypub-root.ts new file mode 100644 index 000000000..2fa1970c7 --- /dev/null +++ b/packages/models/src/activitypub/activitypub-root.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | import { Activity } from './activity.js' | ||
2 | import { ActivityPubCollection } from './activitypub-collection.js' | ||
3 | import { ActivityPubOrderedCollection } from './activitypub-ordered-collection.js' | ||
4 | |||
5 | export type RootActivity = Activity | ActivityPubCollection | ActivityPubOrderedCollection<Activity> | ||
diff --git a/packages/models/src/activitypub/activitypub-signature.ts b/packages/models/src/activitypub/activitypub-signature.ts new file mode 100644 index 000000000..fafdc246d --- /dev/null +++ b/packages/models/src/activitypub/activitypub-signature.ts | |||
@@ -0,0 +1,6 @@ | |||
1 | export interface ActivityPubSignature { | ||
2 | type: string | ||
3 | created: Date | ||
4 | creator: string | ||
5 | signatureValue: string | ||
6 | } | ||
diff --git a/packages/models/src/activitypub/context.ts b/packages/models/src/activitypub/context.ts new file mode 100644 index 000000000..e9df38207 --- /dev/null +++ b/packages/models/src/activitypub/context.ts | |||
@@ -0,0 +1,16 @@ | |||
1 | export type ContextType = | ||
2 | 'Video' | | ||
3 | 'Comment' | | ||
4 | 'Playlist' | | ||
5 | 'Follow' | | ||
6 | 'Reject' | | ||
7 | 'Accept' | | ||
8 | 'View' | | ||
9 | 'Announce' | | ||
10 | 'CacheFile' | | ||
11 | 'Delete' | | ||
12 | 'Rate' | | ||
13 | 'Flag' | | ||
14 | 'Actor' | | ||
15 | 'Collection' | | ||
16 | 'WatchAction' | ||
diff --git a/packages/models/src/activitypub/index.ts b/packages/models/src/activitypub/index.ts new file mode 100644 index 000000000..f36aa1bc5 --- /dev/null +++ b/packages/models/src/activitypub/index.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | export * from './objects/index.js' | ||
2 | export * from './activity.js' | ||
3 | export * from './activitypub-actor.js' | ||
4 | export * from './activitypub-collection.js' | ||
5 | export * from './activitypub-ordered-collection.js' | ||
6 | export * from './activitypub-root.js' | ||
7 | export * from './activitypub-signature.js' | ||
8 | export * from './context.js' | ||
9 | export * from './webfinger.js' | ||
diff --git a/packages/models/src/activitypub/objects/abuse-object.ts b/packages/models/src/activitypub/objects/abuse-object.ts new file mode 100644 index 000000000..2c0f2832b --- /dev/null +++ b/packages/models/src/activitypub/objects/abuse-object.ts | |||
@@ -0,0 +1,15 @@ | |||
1 | import { ActivityFlagReasonObject } from './common-objects.js' | ||
2 | |||
3 | export interface AbuseObject { | ||
4 | type: 'Flag' | ||
5 | |||
6 | content: string | ||
7 | mediaType: 'text/markdown' | ||
8 | |||
9 | object: string | string[] | ||
10 | |||
11 | tag?: ActivityFlagReasonObject[] | ||
12 | |||
13 | startAt?: number | ||
14 | endAt?: number | ||
15 | } | ||
diff --git a/packages/models/src/activitypub/objects/activitypub-object.ts b/packages/models/src/activitypub/objects/activitypub-object.ts new file mode 100644 index 000000000..93c925ae0 --- /dev/null +++ b/packages/models/src/activitypub/objects/activitypub-object.ts | |||
@@ -0,0 +1,17 @@ | |||
1 | import { AbuseObject } from './abuse-object.js' | ||
2 | import { CacheFileObject } from './cache-file-object.js' | ||
3 | import { PlaylistObject } from './playlist-object.js' | ||
4 | import { VideoCommentObject } from './video-comment-object.js' | ||
5 | import { VideoObject } from './video-object.js' | ||
6 | import { WatchActionObject } from './watch-action-object.js' | ||
7 | |||
8 | export type ActivityObject = | ||
9 | VideoObject | | ||
10 | AbuseObject | | ||
11 | VideoCommentObject | | ||
12 | CacheFileObject | | ||
13 | PlaylistObject | | ||
14 | WatchActionObject | | ||
15 | string | ||
16 | |||
17 | export type APObjectId = string | { id: string } | ||
diff --git a/packages/models/src/activitypub/objects/cache-file-object.ts b/packages/models/src/activitypub/objects/cache-file-object.ts new file mode 100644 index 000000000..a40ef339c --- /dev/null +++ b/packages/models/src/activitypub/objects/cache-file-object.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | import { ActivityVideoUrlObject, ActivityPlaylistUrlObject } from './common-objects.js' | ||
2 | |||
3 | export interface CacheFileObject { | ||
4 | id: string | ||
5 | type: 'CacheFile' | ||
6 | object: string | ||
7 | expires: string | ||
8 | url: ActivityVideoUrlObject | ActivityPlaylistUrlObject | ||
9 | } | ||
diff --git a/packages/models/src/activitypub/objects/common-objects.ts b/packages/models/src/activitypub/objects/common-objects.ts new file mode 100644 index 000000000..a332c26f3 --- /dev/null +++ b/packages/models/src/activitypub/objects/common-objects.ts | |||
@@ -0,0 +1,130 @@ | |||
1 | import { AbusePredefinedReasonsString } from '../../moderation/abuse/abuse-reason.model.js' | ||
2 | |||
3 | export interface ActivityIdentifierObject { | ||
4 | identifier: string | ||
5 | name: string | ||
6 | url?: string | ||
7 | } | ||
8 | |||
9 | export interface ActivityIconObject { | ||
10 | type: 'Image' | ||
11 | url: string | ||
12 | mediaType: string | ||
13 | width?: number | ||
14 | height?: number | ||
15 | } | ||
16 | |||
17 | export type ActivityVideoUrlObject = { | ||
18 | type: 'Link' | ||
19 | mediaType: 'video/mp4' | 'video/webm' | 'video/ogg' | ||
20 | href: string | ||
21 | height: number | ||
22 | size: number | ||
23 | fps: number | ||
24 | } | ||
25 | |||
26 | export type ActivityPlaylistSegmentHashesObject = { | ||
27 | type: 'Link' | ||
28 | name: 'sha256' | ||
29 | mediaType: 'application/json' | ||
30 | href: string | ||
31 | } | ||
32 | |||
33 | export type ActivityVideoFileMetadataUrlObject = { | ||
34 | type: 'Link' | ||
35 | rel: [ 'metadata', any ] | ||
36 | mediaType: 'application/json' | ||
37 | height: number | ||
38 | href: string | ||
39 | fps: number | ||
40 | } | ||
41 | |||
42 | export type ActivityTrackerUrlObject = { | ||
43 | type: 'Link' | ||
44 | rel: [ 'tracker', 'websocket' | 'http' ] | ||
45 | name: string | ||
46 | href: string | ||
47 | } | ||
48 | |||
49 | export type ActivityStreamingPlaylistInfohashesObject = { | ||
50 | type: 'Infohash' | ||
51 | name: string | ||
52 | } | ||
53 | |||
54 | export type ActivityPlaylistUrlObject = { | ||
55 | type: 'Link' | ||
56 | mediaType: 'application/x-mpegURL' | ||
57 | href: string | ||
58 | tag?: ActivityTagObject[] | ||
59 | } | ||
60 | |||
61 | export type ActivityBitTorrentUrlObject = { | ||
62 | type: 'Link' | ||
63 | mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet' | ||
64 | href: string | ||
65 | height: number | ||
66 | } | ||
67 | |||
68 | export type ActivityMagnetUrlObject = { | ||
69 | type: 'Link' | ||
70 | mediaType: 'application/x-bittorrent;x-scheme-handler/magnet' | ||
71 | href: string | ||
72 | height: number | ||
73 | } | ||
74 | |||
75 | export type ActivityHtmlUrlObject = { | ||
76 | type: 'Link' | ||
77 | mediaType: 'text/html' | ||
78 | href: string | ||
79 | } | ||
80 | |||
81 | export interface ActivityHashTagObject { | ||
82 | type: 'Hashtag' | ||
83 | href?: string | ||
84 | name: string | ||
85 | } | ||
86 | |||
87 | export interface ActivityMentionObject { | ||
88 | type: 'Mention' | ||
89 | href?: string | ||
90 | name: string | ||
91 | } | ||
92 | |||
93 | export interface ActivityFlagReasonObject { | ||
94 | type: 'Hashtag' | ||
95 | name: AbusePredefinedReasonsString | ||
96 | } | ||
97 | |||
98 | export type ActivityTagObject = | ||
99 | ActivityPlaylistSegmentHashesObject | ||
100 | | ActivityStreamingPlaylistInfohashesObject | ||
101 | | ActivityVideoUrlObject | ||
102 | | ActivityHashTagObject | ||
103 | | ActivityMentionObject | ||
104 | | ActivityBitTorrentUrlObject | ||
105 | | ActivityMagnetUrlObject | ||
106 | | ActivityVideoFileMetadataUrlObject | ||
107 | |||
108 | export type ActivityUrlObject = | ||
109 | ActivityVideoUrlObject | ||
110 | | ActivityPlaylistUrlObject | ||
111 | | ActivityBitTorrentUrlObject | ||
112 | | ActivityMagnetUrlObject | ||
113 | | ActivityHtmlUrlObject | ||
114 | | ActivityVideoFileMetadataUrlObject | ||
115 | | ActivityTrackerUrlObject | ||
116 | |||
117 | export type ActivityPubAttributedTo = { type: 'Group' | 'Person', id: string } | string | ||
118 | |||
119 | export interface ActivityTombstoneObject { | ||
120 | '@context'?: any | ||
121 | id: string | ||
122 | url?: string | ||
123 | type: 'Tombstone' | ||
124 | name?: string | ||
125 | formerType?: string | ||
126 | inReplyTo?: string | ||
127 | published: string | ||
128 | updated: string | ||
129 | deleted: string | ||
130 | } | ||
diff --git a/packages/models/src/activitypub/objects/index.ts b/packages/models/src/activitypub/objects/index.ts new file mode 100644 index 000000000..510f621ea --- /dev/null +++ b/packages/models/src/activitypub/objects/index.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | export * from './abuse-object.js' | ||
2 | export * from './activitypub-object.js' | ||
3 | export * from './cache-file-object.js' | ||
4 | export * from './common-objects.js' | ||
5 | export * from './playlist-element-object.js' | ||
6 | export * from './playlist-object.js' | ||
7 | export * from './video-comment-object.js' | ||
8 | export * from './video-object.js' | ||
9 | export * from './watch-action-object.js' | ||
diff --git a/packages/models/src/activitypub/objects/playlist-element-object.ts b/packages/models/src/activitypub/objects/playlist-element-object.ts new file mode 100644 index 000000000..b85e4fe19 --- /dev/null +++ b/packages/models/src/activitypub/objects/playlist-element-object.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | export interface PlaylistElementObject { | ||
2 | id: string | ||
3 | type: 'PlaylistElement' | ||
4 | |||
5 | url: string | ||
6 | position: number | ||
7 | |||
8 | startTimestamp?: number | ||
9 | stopTimestamp?: number | ||
10 | } | ||
diff --git a/packages/models/src/activitypub/objects/playlist-object.ts b/packages/models/src/activitypub/objects/playlist-object.ts new file mode 100644 index 000000000..c68a28780 --- /dev/null +++ b/packages/models/src/activitypub/objects/playlist-object.ts | |||
@@ -0,0 +1,29 @@ | |||
1 | import { ActivityIconObject, ActivityPubAttributedTo } from './common-objects.js' | ||
2 | |||
3 | export interface PlaylistObject { | ||
4 | id: string | ||
5 | type: 'Playlist' | ||
6 | |||
7 | name: string | ||
8 | |||
9 | content: string | ||
10 | mediaType: 'text/markdown' | ||
11 | |||
12 | uuid: string | ||
13 | |||
14 | totalItems: number | ||
15 | attributedTo: ActivityPubAttributedTo[] | ||
16 | |||
17 | icon?: ActivityIconObject | ||
18 | |||
19 | published: string | ||
20 | updated: string | ||
21 | |||
22 | orderedItems?: string[] | ||
23 | |||
24 | partOf?: string | ||
25 | next?: string | ||
26 | first?: string | ||
27 | |||
28 | to?: string[] | ||
29 | } | ||
diff --git a/packages/models/src/activitypub/objects/video-comment-object.ts b/packages/models/src/activitypub/objects/video-comment-object.ts new file mode 100644 index 000000000..880dd2ee2 --- /dev/null +++ b/packages/models/src/activitypub/objects/video-comment-object.ts | |||
@@ -0,0 +1,16 @@ | |||
1 | import { ActivityPubAttributedTo, ActivityTagObject } from './common-objects.js' | ||
2 | |||
3 | export interface VideoCommentObject { | ||
4 | type: 'Note' | ||
5 | id: string | ||
6 | |||
7 | content: string | ||
8 | mediaType: 'text/markdown' | ||
9 | |||
10 | inReplyTo: string | ||
11 | published: string | ||
12 | updated: string | ||
13 | url: string | ||
14 | attributedTo: ActivityPubAttributedTo | ||
15 | tag: ActivityTagObject[] | ||
16 | } | ||
diff --git a/packages/models/src/activitypub/objects/video-object.ts b/packages/models/src/activitypub/objects/video-object.ts new file mode 100644 index 000000000..14afd85a2 --- /dev/null +++ b/packages/models/src/activitypub/objects/video-object.ts | |||
@@ -0,0 +1,74 @@ | |||
1 | import { LiveVideoLatencyModeType, VideoStateType } from '../../videos/index.js' | ||
2 | import { | ||
3 | ActivityIconObject, | ||
4 | ActivityIdentifierObject, | ||
5 | ActivityPubAttributedTo, | ||
6 | ActivityTagObject, | ||
7 | ActivityUrlObject | ||
8 | } from './common-objects.js' | ||
9 | |||
10 | export interface VideoObject { | ||
11 | type: 'Video' | ||
12 | id: string | ||
13 | name: string | ||
14 | duration: string | ||
15 | uuid: string | ||
16 | tag: ActivityTagObject[] | ||
17 | category: ActivityIdentifierObject | ||
18 | licence: ActivityIdentifierObject | ||
19 | language: ActivityIdentifierObject | ||
20 | subtitleLanguage: ActivityIdentifierObject[] | ||
21 | views: number | ||
22 | |||
23 | sensitive: boolean | ||
24 | |||
25 | isLiveBroadcast: boolean | ||
26 | liveSaveReplay: boolean | ||
27 | permanentLive: boolean | ||
28 | latencyMode: LiveVideoLatencyModeType | ||
29 | |||
30 | commentsEnabled: boolean | ||
31 | downloadEnabled: boolean | ||
32 | waitTranscoding: boolean | ||
33 | state: VideoStateType | ||
34 | |||
35 | published: string | ||
36 | originallyPublishedAt: string | ||
37 | updated: string | ||
38 | uploadDate: string | ||
39 | |||
40 | mediaType: 'text/markdown' | ||
41 | content: string | ||
42 | |||
43 | support: string | ||
44 | |||
45 | icon: ActivityIconObject[] | ||
46 | |||
47 | url: ActivityUrlObject[] | ||
48 | |||
49 | likes: string | ||
50 | dislikes: string | ||
51 | shares: string | ||
52 | comments: string | ||
53 | |||
54 | attributedTo: ActivityPubAttributedTo[] | ||
55 | |||
56 | preview?: ActivityPubStoryboard[] | ||
57 | |||
58 | to?: string[] | ||
59 | cc?: string[] | ||
60 | } | ||
61 | |||
62 | export interface ActivityPubStoryboard { | ||
63 | type: 'Image' | ||
64 | rel: [ 'storyboard' ] | ||
65 | url: { | ||
66 | href: string | ||
67 | mediaType: string | ||
68 | width: number | ||
69 | height: number | ||
70 | tileWidth: number | ||
71 | tileHeight: number | ||
72 | tileDuration: string | ||
73 | }[] | ||
74 | } | ||
diff --git a/packages/models/src/activitypub/objects/watch-action-object.ts b/packages/models/src/activitypub/objects/watch-action-object.ts new file mode 100644 index 000000000..ed336602f --- /dev/null +++ b/packages/models/src/activitypub/objects/watch-action-object.ts | |||
@@ -0,0 +1,22 @@ | |||
1 | export interface WatchActionObject { | ||
2 | id: string | ||
3 | type: 'WatchAction' | ||
4 | |||
5 | startTime: string | ||
6 | endTime: string | ||
7 | |||
8 | location?: { | ||
9 | addressCountry: string | ||
10 | } | ||
11 | |||
12 | uuid: string | ||
13 | object: string | ||
14 | actionStatus: 'CompletedActionStatus' | ||
15 | |||
16 | duration: string | ||
17 | |||
18 | watchSections: { | ||
19 | startTimestamp: number | ||
20 | endTimestamp: number | ||
21 | }[] | ||
22 | } | ||
diff --git a/packages/models/src/activitypub/webfinger.ts b/packages/models/src/activitypub/webfinger.ts new file mode 100644 index 000000000..b94baf996 --- /dev/null +++ b/packages/models/src/activitypub/webfinger.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | export interface WebFingerData { | ||
2 | subject: string | ||
3 | aliases: string[] | ||
4 | links: { | ||
5 | rel: 'self' | ||
6 | type: 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' | ||
7 | href: string | ||
8 | }[] | ||
9 | } | ||