]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/typings/express.ts
Support logout and add id and pass tests
[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
33 declare module 'express' {
34 interface Response {
35
36 locals: {
37 bypassLogin?: {
38 bypass: boolean
39 pluginName: string
40 authName?: string
41 user: {
42 username: string
43 email: string
44 displayName: string
45 role: UserRole
46 }
47 }
48
49 explicitLogout: boolean
50
51 videoAll?: MVideoFullLight
52 onlyImmutableVideo?: MVideoImmutable
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
68
69 videoStreamingPlaylist?: MStreamingPlaylist
70
71 videoChannel?: MChannelAccountDefault
72
73 videoPlaylistFull?: MVideoPlaylistFull
74 videoPlaylistSummary?: MVideoPlaylistFullSummary
75
76 videoPlaylistElement?: MVideoPlaylistElement
77 videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy
78
79 accountVideoRate?: MAccountVideoRateAccountVideo
80
81 videoCommentFull?: MCommentOwnerVideoReply
82 videoCommentThread?: MComment
83
84 follow?: MActorFollowActorsDefault
85 subscription?: MActorFollowActorsDefaultSubscription
86
87 nextOwner?: MAccountDefault
88 videoChangeOwnership?: MVideoChangeOwnershipFull
89
90 account?: MAccountDefault
91
92 actorUrl?: MActorUrl
93 actorFull?: MActorFull
94
95 user?: MUserDefault
96
97 server?: MServer
98
99 videoRedundancy?: MVideoRedundancyVideo
100
101 accountBlock?: MAccountBlocklist
102 serverBlock?: MServerBlocklist
103
104 oauth?: {
105 token: MOAuthTokenUser
106 }
107
108 signature?: {
109 actor: MActorAccountChannelId
110 }
111
112 authenticated?: boolean
113
114 registeredPlugin?: RegisteredPlugin
115
116 plugin?: MPlugin
117 }
118 }
119 }