aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/express.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/typings/express.ts')
-rw-r--r--server/typings/express.ts123
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 @@
1import { VideoChannelModel } from '../models/video/video-channel'
2import { VideoPlaylistModel } from '../models/video/video-playlist'
3import { VideoPlaylistElementModel } from '../models/video/video-playlist-element'
4import { UserModel } from '../models/account/user'
5import { VideoModel } from '../models/video/video'
6import { AccountModel } from '../models/account/account'
7import { VideoChangeOwnershipModel } from '../models/video/video-change-ownership'
8import { ActorModel } from '../models/activitypub/actor'
9import { VideoCommentModel } from '../models/video/video-comment'
10import { VideoShareModel } from '../models/video/video-share'
11import { AccountVideoRateModel } from '../models/account/account-video-rate'
12import { ActorFollowModel } from '../models/activitypub/actor-follow'
13import { ServerModel } from '../models/server/server'
14import { VideoFileModel } from '../models/video/video-file'
15import { VideoRedundancyModel } from '../models/redundancy/video-redundancy'
16import { ServerBlocklistModel } from '../models/server/server-blocklist'
17import { AccountBlocklistModel } from '../models/account/account-blocklist'
18import { VideoImportModel } from '../models/video/video-import'
19import { VideoAbuseModel } from '../models/video/video-abuse'
20import { VideoBlacklistModel } from '../models/video/video-blacklist'
21import { VideoCaptionModel } from '../models/video/video-caption'
22import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist'
23import { RegisteredPlugin } from '../lib/plugins/plugin-manager' 1import { RegisteredPlugin } from '../lib/plugins/plugin-manager'
24import { PluginModel } from '../models/server/plugin' 2import {
25import { 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'
22import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from './models/video/video-playlist'
23import { MVideoImportDefault } from '@server/typings/models/video/video-import'
24import { MAccountBlocklist, MStreamingPlaylist, MVideoFile } from '@server/typings/models'
25import { MVideoPlaylistElement } from '@server/typings/models/video/video-playlist-element'
26import { MAccountVideoRateAccountVideo } from '@server/typings/models/video/video-rate'
27import { MVideoChangeOwnershipFull } from './models/video/video-change-ownership'
28import { MPlugin, MServer } from '@server/typings/models/server'
29import { MServerBlocklist } from './models/server/server-blocklist'
30import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token'
26 31
27declare module 'express' { 32declare 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}