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