]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/typings/express/index.d.ts
d95b8925d4d13bcace2420194afcda672726db57
[github/Chocobozzz/PeerTube.git] / server / typings / express / index.d.ts
1 import { RegisterServerAuthExternalOptions } from '@server/types'
2 import {
3 MAbuse,
4 MAbuseMessage,
5 MAccountBlocklist,
6 MActorUrl,
7 MStreamingPlaylist,
8 MVideoChangeOwnershipFull,
9 MVideoFile,
10 MVideoImmutable,
11 MVideoPlaylistFull,
12 MVideoPlaylistFullSummary,
13 MAbuseReporter
14 } from '@server/types/models'
15 import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token'
16 import { MPlugin, MServer, MServerBlocklist } from '@server/types/models/server'
17 import { MVideoImportDefault } from '@server/types/models/video/video-import'
18 import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element'
19 import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate'
20 import { UserRole } from '@shared/models'
21 import { RegisteredPlugin } from '../../lib/plugins/plugin-manager'
22 import {
23 MAccountDefault,
24 MActorAccountChannelId,
25 MActorFollowActorsDefault,
26 MActorFollowActorsDefaultSubscription,
27 MActorFull,
28 MChannelAccountDefault,
29 MComment,
30 MCommentOwnerVideoReply,
31 MUserDefault,
32 MVideoBlacklist,
33 MVideoCaptionVideo,
34 MVideoFullLight,
35 MVideoIdThumbnail,
36 MVideoRedundancyVideo,
37 MVideoShareActor,
38 MVideoThumbnail,
39 MVideoWithRights
40 } from '../../types/models'
41
42 declare module 'express' {
43 export interface Request {
44 query: any
45 }
46
47 interface Response {
48
49 locals: {
50 bypassLogin?: {
51 bypass: boolean
52 pluginName: string
53 authName?: string
54 user: {
55 username: string
56 email: string
57 displayName: string
58 role: UserRole
59 }
60 }
61
62 refreshTokenAuthName?: string
63
64 explicitLogout: boolean
65
66 videoAll?: MVideoFullLight
67 onlyImmutableVideo?: MVideoImmutable
68 onlyVideo?: MVideoThumbnail
69 onlyVideoWithRights?: MVideoWithRights
70 videoId?: MVideoIdThumbnail
71
72 videoShare?: MVideoShareActor
73
74 videoFile?: MVideoFile
75
76 videoImport?: MVideoImportDefault
77
78 videoBlacklist?: MVideoBlacklist
79
80 videoCaption?: MVideoCaptionVideo
81
82 abuse?: MAbuseReporter
83 abuseMessage?: MAbuseMessage
84
85 videoStreamingPlaylist?: MStreamingPlaylist
86
87 videoChannel?: MChannelAccountDefault
88
89 videoPlaylistFull?: MVideoPlaylistFull
90 videoPlaylistSummary?: MVideoPlaylistFullSummary
91
92 videoPlaylistElement?: MVideoPlaylistElement
93 videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy
94
95 accountVideoRate?: MAccountVideoRateAccountVideo
96
97 videoCommentFull?: MCommentOwnerVideoReply
98 videoCommentThread?: MComment
99
100 follow?: MActorFollowActorsDefault
101 subscription?: MActorFollowActorsDefaultSubscription
102
103 nextOwner?: MAccountDefault
104 videoChangeOwnership?: MVideoChangeOwnershipFull
105
106 account?: MAccountDefault
107
108 actorUrl?: MActorUrl
109 actorFull?: MActorFull
110
111 user?: MUserDefault
112
113 server?: MServer
114
115 videoRedundancy?: MVideoRedundancyVideo
116
117 accountBlock?: MAccountBlocklist
118 serverBlock?: MServerBlocklist
119
120 oauth?: {
121 token: MOAuthTokenUser
122 }
123
124 signature?: {
125 actor: MActorAccountChannelId
126 }
127
128 authenticated?: boolean
129
130 registeredPlugin?: RegisteredPlugin
131
132 externalAuth?: RegisterServerAuthExternalOptions
133
134 plugin?: MPlugin
135 }
136 }
137 }