aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/express.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 10:35:15 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 10:35:15 +0100
commitdae86118ed5d4026d04acb9d0e36829b9ad8eb4e (patch)
treea5bf9c4487240bf75a9b328cad459a0587f90dea /server/typings/express.ts
parente65c0c5b1fab9c3d93f51721b2458cf5cf471f20 (diff)
downloadPeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.tar.gz
PeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.tar.zst
PeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.zip
Cleanup express locals typings
Diffstat (limited to 'server/typings/express.ts')
-rw-r--r--server/typings/express.ts82
1 files changed, 82 insertions, 0 deletions
diff --git a/server/typings/express.ts b/server/typings/express.ts
new file mode 100644
index 000000000..324d78662
--- /dev/null
+++ b/server/typings/express.ts
@@ -0,0 +1,82 @@
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'
23
24declare module 'express' {
25
26 interface Response {
27 locals: {
28 video?: VideoModel
29 videoShare?: VideoShareModel
30 videoFile?: VideoFileModel
31
32 videoImport?: VideoImportModel
33
34 videoBlacklist?: VideoBlacklistModel
35
36 videoCaption?: VideoCaptionModel
37
38 videoAbuse?: VideoAbuseModel
39
40 videoStreamingPlaylist?: VideoStreamingPlaylistModel
41
42 videoChannel?: VideoChannelModel
43
44 videoPlaylist?: VideoPlaylistModel
45 videoPlaylistElement?: VideoPlaylistElementModel
46
47 accountVideoRate?: AccountVideoRateModel
48
49 videoComment?: VideoCommentModel
50 videoCommentThread?: VideoCommentModel
51
52 follow?: ActorFollowModel
53 subscription?: ActorFollowModel
54
55 nextOwner?: AccountModel
56 videoChangeOwnership?: VideoChangeOwnershipModel
57 account?: AccountModel
58 actor?: ActorModel
59 user?: UserModel
60
61 server?: ServerModel
62
63 videoRedundancy?: VideoRedundancyModel
64
65 accountBlock?: AccountBlocklistModel
66 serverBlock?: ServerBlocklistModel
67
68 oauth?: {
69 token: {
70 User: UserModel
71 user: UserModel
72 }
73 }
74
75 signature?: {
76 actor: ActorModel
77 }
78
79 authenticated?: boolean
80 }
81 }
82}