aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/accounts/account.model.ts5
-rw-r--r--shared/models/accounts/follow.model.ts1
-rw-r--r--shared/models/accounts/index.ts2
-rw-r--r--shared/models/activitypub/activity.ts18
-rw-r--r--shared/models/index.ts1
5 files changed, 25 insertions, 2 deletions
diff --git a/shared/models/accounts/account.model.ts b/shared/models/accounts/account.model.ts
new file mode 100644
index 000000000..338426dc7
--- /dev/null
+++ b/shared/models/accounts/account.model.ts
@@ -0,0 +1,5 @@
1export interface Account {
2 id: number
3 name: string
4 host: string
5}
diff --git a/shared/models/accounts/follow.model.ts b/shared/models/accounts/follow.model.ts
new file mode 100644
index 000000000..80cfe07e4
--- /dev/null
+++ b/shared/models/accounts/follow.model.ts
@@ -0,0 +1 @@
export type FollowState = 'pending' | 'accepted'
diff --git a/shared/models/accounts/index.ts b/shared/models/accounts/index.ts
new file mode 100644
index 000000000..8fe437b81
--- /dev/null
+++ b/shared/models/accounts/index.ts
@@ -0,0 +1,2 @@
1export * from './account.model'
2export * from './follow.model'
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts
index a2494da25..254daf118 100644
--- a/shared/models/activitypub/activity.ts
+++ b/shared/models/activitypub/activity.ts
@@ -4,10 +4,11 @@ import {
4} from './objects' 4} from './objects'
5import { ActivityPubSignature } from './activitypub-signature' 5import { ActivityPubSignature } from './activitypub-signature'
6 6
7export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag 7export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag |
8 ActivityDelete | ActivityFollow | ActivityAccept
8 9
9// Flag -> report abuse 10// Flag -> report abuse
10export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' 11export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' | 'Delete' | 'Follow' | 'Accept'
11 12
12export interface BaseActivity { 13export interface BaseActivity {
13 '@context'?: any[] 14 '@context'?: any[]
@@ -37,3 +38,16 @@ export interface ActivityFlag extends BaseActivity {
37 type: 'Flag' 38 type: 'Flag'
38 object: string 39 object: string
39} 40}
41
42export interface ActivityDelete extends BaseActivity {
43 type: 'Delete'
44}
45
46export interface ActivityFollow extends BaseActivity {
47 type: 'Follow'
48 object: string
49}
50
51export interface ActivityAccept extends BaseActivity {
52 type: 'Accept'
53}
diff --git a/shared/models/index.ts b/shared/models/index.ts
index 0ccb84d24..28decac03 100644
--- a/shared/models/index.ts
+++ b/shared/models/index.ts
@@ -1,3 +1,4 @@
1export * from './accounts'
1export * from './activitypub' 2export * from './activitypub'
2export * from './pods' 3export * from './pods'
3export * from './users' 4export * from './users'