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.ts124
1 files changed, 69 insertions, 55 deletions
diff --git a/server/typings/express.ts b/server/typings/express.ts
index f7da55ab0..3cc7c7632 100644
--- a/server/typings/express.ts
+++ b/server/typings/express.ts
@@ -1,89 +1,103 @@
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 MChannelAccountDefault,
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, MVideoPlaylistElementVideoUrlPlaylistPrivacy } 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?: MChannelAccountDefault
38 57
39 videoCaption?: VideoCaptionModel 58 videoPlaylistFull?: MVideoPlaylistFull
59 videoPlaylistSummary?: MVideoPlaylistFullSummary
40 60
41 videoAbuse?: VideoAbuseModel 61 videoPlaylistElement?: MVideoPlaylistElement
62 videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy
42 63
43 videoStreamingPlaylist?: VideoStreamingPlaylistModel 64 accountVideoRate?: MAccountVideoRateAccountVideo
44 65
45 videoChannel?: VideoChannelModel 66 videoCommentFull?: MCommentOwnerVideoReply
67 videoCommentThread?: MComment
46 68
47 videoPlaylist?: VideoPlaylistModel 69 follow?: MActorFollowActorsDefault
48 videoPlaylistElement?: VideoPlaylistElementModel 70 subscription?: MActorFollowActorsDefaultSubscription
49 71
50 accountVideoRate?: AccountVideoRateModel 72 nextOwner?: MAccountDefault
73 videoChangeOwnership?: MVideoChangeOwnershipFull
51 74
52 videoComment?: VideoCommentModel 75 account?: MAccountDefault
53 videoCommentThread?: VideoCommentModel
54 76
55 follow?: ActorFollowModel 77 actorFull?: MActorFull
56 subscription?: ActorFollowModel
57 78
58 nextOwner?: AccountModel 79 user?: MUserDefault
59 videoChangeOwnership?: VideoChangeOwnershipModel
60 account?: AccountModel
61 actor?: ActorModel
62 user?: UserModel
63 80
64 server?: ServerModel 81 server?: MServer
65 82
66 videoRedundancy?: VideoRedundancyModel 83 videoRedundancy?: MVideoRedundancyVideo
67 84
68 accountBlock?: AccountBlocklistModel 85 accountBlock?: MAccountBlocklist
69 serverBlock?: ServerBlocklistModel 86 serverBlock?: MServerBlocklist
70 87
71 oauth?: { 88 oauth?: {
72 token: { 89 token: MOAuthTokenUser
73 User: UserModel
74 user: UserModel
75 }
76 } 90 }
77 91
78 signature?: { 92 signature?: {
79 actor: SignatureActorModel 93 actor: MActorAccountChannelId
80 } 94 }
81 95
82 authenticated?: boolean 96 authenticated?: boolean
83 97
84 registeredPlugin?: RegisteredPlugin 98 registeredPlugin?: RegisteredPlugin
85 99
86 plugin?: PluginModel 100 plugin?: MPlugin
87 } 101 }
88 } 102 }
89} 103}