diff options
Diffstat (limited to 'server/typings/express.ts')
-rw-r--r-- | server/typings/express.ts | 123 |
1 files changed, 68 insertions, 55 deletions
diff --git a/server/typings/express.ts b/server/typings/express.ts index f7da55ab0..260091461 100644 --- a/server/typings/express.ts +++ b/server/typings/express.ts | |||
@@ -1,89 +1,102 @@ | |||
1 | import { VideoChannelModel } from '../models/video/video-channel' | ||
2 | import { VideoPlaylistModel } from '../models/video/video-playlist' | ||
3 | import { VideoPlaylistElementModel } from '../models/video/video-playlist-element' | ||
4 | import { UserModel } from '../models/account/user' | ||
5 | import { VideoModel } from '../models/video/video' | ||
6 | import { AccountModel } from '../models/account/account' | ||
7 | import { VideoChangeOwnershipModel } from '../models/video/video-change-ownership' | ||
8 | import { ActorModel } from '../models/activitypub/actor' | ||
9 | import { VideoCommentModel } from '../models/video/video-comment' | ||
10 | import { VideoShareModel } from '../models/video/video-share' | ||
11 | import { AccountVideoRateModel } from '../models/account/account-video-rate' | ||
12 | import { ActorFollowModel } from '../models/activitypub/actor-follow' | ||
13 | import { ServerModel } from '../models/server/server' | ||
14 | import { VideoFileModel } from '../models/video/video-file' | ||
15 | import { VideoRedundancyModel } from '../models/redundancy/video-redundancy' | ||
16 | import { ServerBlocklistModel } from '../models/server/server-blocklist' | ||
17 | import { AccountBlocklistModel } from '../models/account/account-blocklist' | ||
18 | import { VideoImportModel } from '../models/video/video-import' | ||
19 | import { VideoAbuseModel } from '../models/video/video-abuse' | ||
20 | import { VideoBlacklistModel } from '../models/video/video-blacklist' | ||
21 | import { VideoCaptionModel } from '../models/video/video-caption' | ||
22 | import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' | ||
23 | import { RegisteredPlugin } from '../lib/plugins/plugin-manager' | 1 | import { RegisteredPlugin } from '../lib/plugins/plugin-manager' |
24 | import { PluginModel } from '../models/server/plugin' | 2 | import { |
25 | import { SignatureActorModel } from './models' | 3 | MAccountDefault, |
4 | MActorAccountChannelId, | ||
5 | MActorFollowActorsDefault, | ||
6 | MActorFollowActorsDefaultSubscription, | ||
7 | MActorFull, | ||
8 | MChannelActorAccountDefault, | ||
9 | MComment, | ||
10 | MCommentOwnerVideoReply, | ||
11 | MUserDefault, | ||
12 | MVideoAbuse, | ||
13 | MVideoBlacklist, | ||
14 | MVideoCaptionVideo, | ||
15 | MVideoFullLight, | ||
16 | MVideoIdThumbnail, | ||
17 | MVideoRedundancyVideo, | ||
18 | MVideoShareActor, | ||
19 | MVideoThumbnail, | ||
20 | MVideoWithRights | ||
21 | } from './models' | ||
22 | import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from './models/video/video-playlist' | ||
23 | import { MVideoImportDefault } from '@server/typings/models/video/video-import' | ||
24 | import { MAccountBlocklist, MStreamingPlaylist, MVideoFile } from '@server/typings/models' | ||
25 | import { MVideoPlaylistElement } from '@server/typings/models/video/video-playlist-element' | ||
26 | import { MAccountVideoRateAccountVideo } from '@server/typings/models/video/video-rate' | ||
27 | import { MVideoChangeOwnershipFull } from './models/video/video-change-ownership' | ||
28 | import { MPlugin, MServer } from '@server/typings/models/server' | ||
29 | import { MServerBlocklist } from './models/server/server-blocklist' | ||
30 | import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' | ||
26 | 31 | ||
27 | declare module 'express' { | 32 | declare module 'express' { |
28 | 33 | ||
29 | interface Response { | 34 | interface Response { |
35 | |||
30 | locals: { | 36 | locals: { |
31 | video?: VideoModel | 37 | videoAll?: MVideoFullLight |
32 | videoShare?: VideoShareModel | 38 | onlyVideo?: MVideoThumbnail |
33 | videoFile?: VideoFileModel | 39 | onlyVideoWithRights?: MVideoWithRights |
40 | videoId?: MVideoIdThumbnail | ||
41 | |||
42 | videoShare?: MVideoShareActor | ||
43 | |||
44 | videoFile?: MVideoFile | ||
45 | |||
46 | videoImport?: MVideoImportDefault | ||
47 | |||
48 | videoBlacklist?: MVideoBlacklist | ||
49 | |||
50 | videoCaption?: MVideoCaptionVideo | ||
51 | |||
52 | videoAbuse?: MVideoAbuse | ||
34 | 53 | ||
35 | videoImport?: VideoImportModel | 54 | videoStreamingPlaylist?: MStreamingPlaylist |
36 | 55 | ||
37 | videoBlacklist?: VideoBlacklistModel | 56 | videoChannel?: MChannelActorAccountDefault |
38 | 57 | ||
39 | videoCaption?: VideoCaptionModel | 58 | videoPlaylistFull?: MVideoPlaylistFull |
59 | videoPlaylistSummary?: MVideoPlaylistFullSummary | ||
40 | 60 | ||
41 | videoAbuse?: VideoAbuseModel | 61 | videoPlaylistElement?: MVideoPlaylistElement |
42 | 62 | ||
43 | videoStreamingPlaylist?: VideoStreamingPlaylistModel | 63 | accountVideoRate?: MAccountVideoRateAccountVideo |
44 | 64 | ||
45 | videoChannel?: VideoChannelModel | 65 | videoCommentFull?: MCommentOwnerVideoReply |
66 | videoCommentThread?: MComment | ||
46 | 67 | ||
47 | videoPlaylist?: VideoPlaylistModel | 68 | follow?: MActorFollowActorsDefault |
48 | videoPlaylistElement?: VideoPlaylistElementModel | 69 | subscription?: MActorFollowActorsDefaultSubscription |
49 | 70 | ||
50 | accountVideoRate?: AccountVideoRateModel | 71 | nextOwner?: MAccountDefault |
72 | videoChangeOwnership?: MVideoChangeOwnershipFull | ||
51 | 73 | ||
52 | videoComment?: VideoCommentModel | 74 | account?: MAccountDefault |
53 | videoCommentThread?: VideoCommentModel | ||
54 | 75 | ||
55 | follow?: ActorFollowModel | 76 | actorFull?: MActorFull |
56 | subscription?: ActorFollowModel | ||
57 | 77 | ||
58 | nextOwner?: AccountModel | 78 | user?: MUserDefault |
59 | videoChangeOwnership?: VideoChangeOwnershipModel | ||
60 | account?: AccountModel | ||
61 | actor?: ActorModel | ||
62 | user?: UserModel | ||
63 | 79 | ||
64 | server?: ServerModel | 80 | server?: MServer |
65 | 81 | ||
66 | videoRedundancy?: VideoRedundancyModel | 82 | videoRedundancy?: MVideoRedundancyVideo |
67 | 83 | ||
68 | accountBlock?: AccountBlocklistModel | 84 | accountBlock?: MAccountBlocklist |
69 | serverBlock?: ServerBlocklistModel | 85 | serverBlock?: MServerBlocklist |
70 | 86 | ||
71 | oauth?: { | 87 | oauth?: { |
72 | token: { | 88 | token: MOAuthTokenUser |
73 | User: UserModel | ||
74 | user: UserModel | ||
75 | } | ||
76 | } | 89 | } |
77 | 90 | ||
78 | signature?: { | 91 | signature?: { |
79 | actor: SignatureActorModel | 92 | actor: MActorAccountChannelId |
80 | } | 93 | } |
81 | 94 | ||
82 | authenticated?: boolean | 95 | authenticated?: boolean |
83 | 96 | ||
84 | registeredPlugin?: RegisteredPlugin | 97 | registeredPlugin?: RegisteredPlugin |
85 | 98 | ||
86 | plugin?: PluginModel | 99 | plugin?: MPlugin |
87 | } | 100 | } |
88 | } | 101 | } |
89 | } | 102 | } |