aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/models/account/actor.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-06 11:35:56 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-04-08 10:07:53 +0200
commitf479685678406a5df864d89615b33d29085ebfc6 (patch)
tree8de15e90cd8d97d8810715df8585c61f48d5282a /server/types/models/account/actor.ts
parent968aaed2066873fc1c39f95168284122d9d15e21 (diff)
downloadPeerTube-f479685678406a5df864d89615b33d29085ebfc6.tar.gz
PeerTube-f479685678406a5df864d89615b33d29085ebfc6.tar.zst
PeerTube-f479685678406a5df864d89615b33d29085ebfc6.zip
Agnostic actor image storage
Diffstat (limited to 'server/types/models/account/actor.ts')
-rw-r--r--server/types/models/account/actor.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/server/types/models/account/actor.ts b/server/types/models/account/actor.ts
index ee0d05f4e..8af19c4da 100644
--- a/server/types/models/account/actor.ts
+++ b/server/types/models/account/actor.ts
@@ -1,15 +1,15 @@
1import { ActorModel } from '../../../models/activitypub/actor'
2import { FunctionProperties, PickWith, PickWithOpt } from '@shared/core-utils' 1import { FunctionProperties, PickWith, PickWithOpt } from '@shared/core-utils'
3import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from './account' 2import { ActorModel } from '../../../models/activitypub/actor'
4import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server' 3import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server'
5import { MAvatar, MAvatarFormattable } from './avatar'
6import { MChannel, MChannelAccountActor, MChannelAccountDefault, MChannelId, MChannelIdActor } from '../video' 4import { MChannel, MChannelAccountActor, MChannelAccountDefault, MChannelId, MChannelIdActor } from '../video'
5import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from './account'
6import { MActorImage, MActorImageFormattable } from './actor-image'
7 7
8type Use<K extends keyof ActorModel, M> = PickWith<ActorModel, K, M> 8type Use<K extends keyof ActorModel, M> = PickWith<ActorModel, K, M>
9 9
10// ############################################################################ 10// ############################################################################
11 11
12export type MActor = Omit<ActorModel, 'Account' | 'VideoChannel' | 'ActorFollowing' | 'Avatar' | 'ActorFollowers' | 'Server'> 12export type MActor = Omit<ActorModel, 'Account' | 'VideoChannel' | 'ActorFollowing' | 'Avatar' | 'ActorFollowers' | 'Server' | 'Banner'>
13 13
14// ############################################################################ 14// ############################################################################
15 15
@@ -34,7 +34,7 @@ export type MActorRedundancyAllowedOpt = PickWithOpt<ActorModel, 'Server', MServ
34export type MActorDefaultLight = 34export type MActorDefaultLight =
35 MActorLight & 35 MActorLight &
36 Use<'Server', MServerHost> & 36 Use<'Server', MServerHost> &
37 Use<'Avatar', MAvatar> 37 Use<'Avatar', MActorImage>
38 38
39export type MActorAccountId = 39export type MActorAccountId =
40 MActor & 40 MActor &
@@ -78,7 +78,7 @@ export type MActorServer =
78export type MActorDefault = 78export type MActorDefault =
79 MActor & 79 MActor &
80 Use<'Server', MServer> & 80 Use<'Server', MServer> &
81 Use<'Avatar', MAvatar> 81 Use<'Avatar', MActorImage>
82 82
83// Actor with channel that is associated to an account and its actor 83// Actor with channel that is associated to an account and its actor
84// Actor -> VideoChannel -> Account -> Actor 84// Actor -> VideoChannel -> Account -> Actor
@@ -89,7 +89,7 @@ export type MActorChannelAccountActor =
89export type MActorFull = 89export type MActorFull =
90 MActor & 90 MActor &
91 Use<'Server', MServer> & 91 Use<'Server', MServer> &
92 Use<'Avatar', MAvatar> & 92 Use<'Avatar', MActorImage> &
93 Use<'Account', MAccount> & 93 Use<'Account', MAccount> &
94 Use<'VideoChannel', MChannelAccountActor> 94 Use<'VideoChannel', MChannelAccountActor>
95 95
@@ -97,7 +97,7 @@ export type MActorFull =
97export type MActorFullActor = 97export type MActorFullActor =
98 MActor & 98 MActor &
99 Use<'Server', MServer> & 99 Use<'Server', MServer> &
100 Use<'Avatar', MAvatar> & 100 Use<'Avatar', MActorImage> &
101 Use<'Account', MAccountDefault> & 101 Use<'Account', MAccountDefault> &
102 Use<'VideoChannel', MChannelAccountDefault> 102 Use<'VideoChannel', MChannelAccountDefault>
103 103
@@ -109,7 +109,7 @@ export type MActorSummary =
109 FunctionProperties<MActor> & 109 FunctionProperties<MActor> &
110 Pick<MActor, 'id' | 'preferredUsername' | 'url' | 'serverId' | 'avatarId'> & 110 Pick<MActor, 'id' | 'preferredUsername' | 'url' | 'serverId' | 'avatarId'> &
111 Use<'Server', MServerHost> & 111 Use<'Server', MServerHost> &
112 Use<'Avatar', MAvatar> 112 Use<'Avatar', MActorImage>
113 113
114export type MActorSummaryBlocks = 114export type MActorSummaryBlocks =
115 MActorSummary & 115 MActorSummary &
@@ -127,7 +127,7 @@ export type MActorSummaryFormattable =
127 FunctionProperties<MActor> & 127 FunctionProperties<MActor> &
128 Pick<MActor, 'url' | 'preferredUsername'> & 128 Pick<MActor, 'url' | 'preferredUsername'> &
129 Use<'Server', MServerHost> & 129 Use<'Server', MServerHost> &
130 Use<'Avatar', MAvatarFormattable> 130 Use<'Avatar', MActorImageFormattable>
131 131
132export type MActorFormattable = 132export type MActorFormattable =
133 MActorSummaryFormattable & 133 MActorSummaryFormattable &
@@ -136,4 +136,4 @@ export type MActorFormattable =
136 136
137export type MActorAP = 137export type MActorAP =
138 MActor & 138 MActor &
139 Use<'Avatar', MAvatar> 139 Use<'Avatar', MActorImage>