diff options
Diffstat (limited to 'server/types')
-rw-r--r-- | server/types/express.d.ts | 2 | ||||
-rw-r--r-- | server/types/models/account/account.ts | 7 | ||||
-rw-r--r-- | server/types/models/actor/actor-follow.ts | 4 | ||||
-rw-r--r-- | server/types/models/actor/actor.ts | 10 | ||||
-rw-r--r-- | server/types/models/video/video-channels.ts | 7 | ||||
-rw-r--r-- | server/types/models/video/video.ts | 4 |
6 files changed, 22 insertions, 12 deletions
diff --git a/server/types/express.d.ts b/server/types/express.d.ts index a8aeabb3a..510b9f94e 100644 --- a/server/types/express.d.ts +++ b/server/types/express.d.ts | |||
@@ -110,6 +110,8 @@ declare module 'express' { | |||
110 | locals: { | 110 | locals: { |
111 | requestStart: number | 111 | requestStart: number |
112 | 112 | ||
113 | apicacheGroups: string[] | ||
114 | |||
113 | apicache: { | 115 | apicache: { |
114 | content: string | Buffer | 116 | content: string | Buffer |
115 | write: Writable['write'] | 117 | write: Writable['write'] |
diff --git a/server/types/models/account/account.ts b/server/types/models/account/account.ts index 282a2971b..d10b904ab 100644 --- a/server/types/models/account/account.ts +++ b/server/types/models/account/account.ts | |||
@@ -8,8 +8,8 @@ import { | |||
8 | MActorDefault, | 8 | MActorDefault, |
9 | MActorDefaultLight, | 9 | MActorDefaultLight, |
10 | MActorFormattable, | 10 | MActorFormattable, |
11 | MActorHost, | ||
11 | MActorId, | 12 | MActorId, |
12 | MActorServer, | ||
13 | MActorSummary, | 13 | MActorSummary, |
14 | MActorSummaryFormattable, | 14 | MActorSummaryFormattable, |
15 | MActorUrl | 15 | MActorUrl |
@@ -68,10 +68,9 @@ export type MAccountActor = | |||
68 | MAccount & | 68 | MAccount & |
69 | Use<'Actor', MActor> | 69 | Use<'Actor', MActor> |
70 | 70 | ||
71 | // Full actor with server | 71 | export type MAccountHost = |
72 | export type MAccountServer = | ||
73 | MAccount & | 72 | MAccount & |
74 | Use<'Actor', MActorServer> | 73 | Use<'Actor', MActorHost> |
75 | 74 | ||
76 | // ############################################################################ | 75 | // ############################################################################ |
77 | 76 | ||
diff --git a/server/types/models/actor/actor-follow.ts b/server/types/models/actor/actor-follow.ts index 338158561..84042e228 100644 --- a/server/types/models/actor/actor-follow.ts +++ b/server/types/models/actor/actor-follow.ts | |||
@@ -7,7 +7,7 @@ import { | |||
7 | MActorDefaultAccountChannel, | 7 | MActorDefaultAccountChannel, |
8 | MActorDefaultChannelId, | 8 | MActorDefaultChannelId, |
9 | MActorFormattable, | 9 | MActorFormattable, |
10 | MActorHost, | 10 | MActorHostOnly, |
11 | MActorUsername | 11 | MActorUsername |
12 | } from './actor' | 12 | } from './actor' |
13 | 13 | ||
@@ -21,7 +21,7 @@ export type MActorFollow = Omit<ActorFollowModel, 'ActorFollower' | 'ActorFollow | |||
21 | 21 | ||
22 | export type MActorFollowFollowingHost = | 22 | export type MActorFollowFollowingHost = |
23 | MActorFollow & | 23 | MActorFollow & |
24 | Use<'ActorFollowing', MActorUsername & MActorHost> | 24 | Use<'ActorFollowing', MActorUsername & MActorHostOnly> |
25 | 25 | ||
26 | // ############################################################################ | 26 | // ############################################################################ |
27 | 27 | ||
diff --git a/server/types/models/actor/actor.ts b/server/types/models/actor/actor.ts index 280256bab..47e7b7091 100644 --- a/server/types/models/actor/actor.ts +++ b/server/types/models/actor/actor.ts | |||
@@ -29,7 +29,11 @@ export type MActorLight = Omit<MActor, 'privateKey' | 'privateKey'> | |||
29 | 29 | ||
30 | // Some association attributes | 30 | // Some association attributes |
31 | 31 | ||
32 | export type MActorHost = Use<'Server', MServerHost> | 32 | export type MActorHostOnly = Use<'Server', MServerHost> |
33 | export type MActorHost = | ||
34 | MActorLight & | ||
35 | Use<'Server', MServerHost> | ||
36 | |||
33 | export type MActorRedundancyAllowedOpt = PickWithOpt<ActorModel, 'Server', MServerRedundancyAllowed> | 37 | export type MActorRedundancyAllowedOpt = PickWithOpt<ActorModel, 'Server', MServerRedundancyAllowed> |
34 | 38 | ||
35 | export type MActorDefaultLight = | 39 | export type MActorDefaultLight = |
@@ -68,8 +72,8 @@ export type MActorChannel = | |||
68 | 72 | ||
69 | export type MActorDefaultAccountChannel = MActorDefault & MActorAccount & MActorChannel | 73 | export type MActorDefaultAccountChannel = MActorDefault & MActorAccount & MActorChannel |
70 | 74 | ||
71 | export type MActorServer = | 75 | export type MActorServerLight = |
72 | MActor & | 76 | MActorLight & |
73 | Use<'Server', MServer> | 77 | Use<'Server', MServer> |
74 | 78 | ||
75 | // ############################################################################ | 79 | // ############################################################################ |
diff --git a/server/types/models/video/video-channels.ts b/server/types/models/video/video-channels.ts index af8c2ffe4..57e991494 100644 --- a/server/types/models/video/video-channels.ts +++ b/server/types/models/video/video-channels.ts | |||
@@ -21,6 +21,7 @@ import { | |||
21 | MActorDefaultLight, | 21 | MActorDefaultLight, |
22 | MActorFormattable, | 22 | MActorFormattable, |
23 | MActorHost, | 23 | MActorHost, |
24 | MActorHostOnly, | ||
24 | MActorLight, | 25 | MActorLight, |
25 | MActorSummary, | 26 | MActorSummary, |
26 | MActorSummaryFormattable, | 27 | MActorSummaryFormattable, |
@@ -77,9 +78,13 @@ export type MChannelAccountLight = | |||
77 | Use<'Account', MAccountLight> | 78 | Use<'Account', MAccountLight> |
78 | 79 | ||
79 | export type MChannelHost = | 80 | export type MChannelHost = |
80 | MChannelId & | 81 | MChannel & |
81 | Use<'Actor', MActorHost> | 82 | Use<'Actor', MActorHost> |
82 | 83 | ||
84 | export type MChannelHostOnly = | ||
85 | MChannelId & | ||
86 | Use<'Actor', MActorHostOnly> | ||
87 | |||
83 | // ############################################################################ | 88 | // ############################################################################ |
84 | 89 | ||
85 | // Account associations | 90 | // Account associations |
diff --git a/server/types/models/video/video.ts b/server/types/models/video/video.ts index d1af53b92..58ae7baad 100644 --- a/server/types/models/video/video.ts +++ b/server/types/models/video/video.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | MChannelAccountSummaryFormattable, | 13 | MChannelAccountSummaryFormattable, |
14 | MChannelActor, | 14 | MChannelActor, |
15 | MChannelFormattable, | 15 | MChannelFormattable, |
16 | MChannelHost, | 16 | MChannelHostOnly, |
17 | MChannelUserId | 17 | MChannelUserId |
18 | } from './video-channels' | 18 | } from './video-channels' |
19 | import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file' | 19 | import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file' |
@@ -146,7 +146,7 @@ export type MVideoWithChannelActor = | |||
146 | 146 | ||
147 | export type MVideoWithHost = | 147 | export type MVideoWithHost = |
148 | MVideo & | 148 | MVideo & |
149 | Use<'VideoChannel', MChannelHost> | 149 | Use<'VideoChannel', MChannelHostOnly> |
150 | 150 | ||
151 | export type MVideoFullLight = | 151 | export type MVideoFullLight = |
152 | MVideo & | 152 | MVideo & |