aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/actor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/typings/models/actor.ts')
-rw-r--r--server/typings/models/actor.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/server/typings/models/actor.ts b/server/typings/models/actor.ts
new file mode 100644
index 000000000..2656c7b66
--- /dev/null
+++ b/server/typings/models/actor.ts
@@ -0,0 +1,22 @@
1import { ActorModel } from '../../models/activitypub/actor'
2import { VideoChannelModel } from '../../models/video/video-channel'
3import { AccountModel } from '../../models/account/account'
4import { FunctionProperties } from '../utils'
5
6export type VideoChannelModelId = FunctionProperties<VideoChannelModel>
7export type AccountModelId = FunctionProperties<AccountModel> | Pick<AccountModel, 'id'>
8
9export type VideoChannelModelIdActor = VideoChannelModelId & Pick<VideoChannelModel, 'Actor'>
10export type AccountModelIdActor = AccountModelId & Pick<AccountModel, 'Actor'>
11
12export type ActorModelUrl = Pick<ActorModel, 'url'>
13export type ActorModelOnly = Omit<ActorModel, 'Account' | 'VideoChannel' | 'ActorFollowing' | 'Avatar' | 'ActorFollowers' | 'Server'>
14export type ActorModelId = Pick<ActorModelOnly, 'id'>
15
16export type SignatureActorModel = ActorModelOnly & {
17 VideoChannel: VideoChannelModelIdActor
18
19 Account: AccountModelIdActor
20}
21
22export type ActorFollowerException = Pick<ActorModel, 'sharedInboxUrl' | 'inboxUrl'>