]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/typings/express/index.d.ts
Upgrade server dependencies
[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 MVideoLive,
12 MVideoPlaylistFull,
13 MVideoPlaylistFullSummary
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 interface Response {
47 locals: PeerTubeLocals
48 }
49 }
50
51 interface PeerTubeLocals {
52 bypassLogin?: {
53 bypass: boolean
54 pluginName: string
55 authName?: string
56 user: {
57 username: string
58 email: string
59 displayName: string
60 role: UserRole
61 }
62 }
63
64 refreshTokenAuthName?: string
65
66 explicitLogout?: boolean
67
68 videoAll?: MVideoFullLight
69 onlyImmutableVideo?: MVideoImmutable
70 onlyVideo?: MVideoThumbnail
71 onlyVideoWithRights?: MVideoWithRights
72 videoId?: MVideoIdThumbnail
73
74 videoLive?: MVideoLive
75
76 videoShare?: MVideoShareActor
77
78 videoFile?: MVideoFile
79
80 videoImport?: MVideoImportDefault
81
82 videoBlacklist?: MVideoBlacklist
83
84 videoCaption?: MVideoCaptionVideo
85
86 abuse?: MAbuseReporter
87 abuseMessage?: MAbuseMessage
88
89 videoStreamingPlaylist?: MStreamingPlaylist
90
91 videoChannel?: MChannelAccountDefault
92
93 videoPlaylistFull?: MVideoPlaylistFull
94 videoPlaylistSummary?: MVideoPlaylistFullSummary
95
96 videoPlaylistElement?: MVideoPlaylistElement
97 videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy
98
99 accountVideoRate?: MAccountVideoRateAccountVideo
100
101 videoCommentFull?: MCommentOwnerVideoReply
102 videoCommentThread?: MComment
103
104 follow?: MActorFollowActorsDefault
105 subscription?: MActorFollowActorsDefaultSubscription
106
107 nextOwner?: MAccountDefault
108 videoChangeOwnership?: MVideoChangeOwnershipFull
109
110 account?: MAccountDefault
111
112 actorUrl?: MActorUrl
113 actorFull?: MActorFull
114
115 user?: MUserDefault
116
117 server?: MServer
118
119 videoRedundancy?: MVideoRedundancyVideo
120
121 accountBlock?: MAccountBlocklist
122 serverBlock?: MServerBlocklist
123
124 oauth?: {
125 token: MOAuthTokenUser
126 }
127
128 signature?: {
129 actor: MActorAccountChannelId
130 }
131
132 authenticated?: boolean
133
134 registeredPlugin?: RegisteredPlugin
135
136 externalAuth?: RegisterServerAuthExternalOptions
137
138 plugin?: MPlugin
139 }