]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/typings/express.ts
e6e120403963466422d164a27d6916cc96b6b942
[github/Chocobozzz/PeerTube.git] / server / typings / express.ts
1 import { RegisteredPlugin } from '../lib/plugins/plugin-manager'
2 import {
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'
22 import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from './models/video/video-playlist'
23 import { MVideoImportDefault } from '@server/typings/models/video/video-import'
24 import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile, MVideoImmutable } from '@server/typings/models'
25 import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } 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'
31 import { UserRole } from '@shared/models'
32
33 declare module 'express' {
34 interface Response {
35
36 locals: {
37 bypassLogin?: {
38 bypass: boolean
39 pluginName: string
40 authName?: string
41 user: {
42 username: string
43 email: string
44 displayName: string
45 role: UserRole
46 }
47 }
48
49 refreshTokenAuthName?: string
50
51 explicitLogout: boolean
52
53 videoAll?: MVideoFullLight
54 onlyImmutableVideo?: MVideoImmutable
55 onlyVideo?: MVideoThumbnail
56 onlyVideoWithRights?: MVideoWithRights
57 videoId?: MVideoIdThumbnail
58
59 videoShare?: MVideoShareActor
60
61 videoFile?: MVideoFile
62
63 videoImport?: MVideoImportDefault
64
65 videoBlacklist?: MVideoBlacklist
66
67 videoCaption?: MVideoCaptionVideo
68
69 videoAbuse?: MVideoAbuse
70
71 videoStreamingPlaylist?: MStreamingPlaylist
72
73 videoChannel?: MChannelAccountDefault
74
75 videoPlaylistFull?: MVideoPlaylistFull
76 videoPlaylistSummary?: MVideoPlaylistFullSummary
77
78 videoPlaylistElement?: MVideoPlaylistElement
79 videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy
80
81 accountVideoRate?: MAccountVideoRateAccountVideo
82
83 videoCommentFull?: MCommentOwnerVideoReply
84 videoCommentThread?: MComment
85
86 follow?: MActorFollowActorsDefault
87 subscription?: MActorFollowActorsDefaultSubscription
88
89 nextOwner?: MAccountDefault
90 videoChangeOwnership?: MVideoChangeOwnershipFull
91
92 account?: MAccountDefault
93
94 actorUrl?: MActorUrl
95 actorFull?: MActorFull
96
97 user?: MUserDefault
98
99 server?: MServer
100
101 videoRedundancy?: MVideoRedundancyVideo
102
103 accountBlock?: MAccountBlocklist
104 serverBlock?: MServerBlocklist
105
106 oauth?: {
107 token: MOAuthTokenUser
108 }
109
110 signature?: {
111 actor: MActorAccountChannelId
112 }
113
114 authenticated?: boolean
115
116 registeredPlugin?: RegisteredPlugin
117
118 plugin?: MPlugin
119 }
120 }
121 }