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