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