Merge branch 'master' into develop
[oweals/peertube.git] / server / typings / express.ts
1 import { VideoChannelModel } from '../models/video/video-channel'
2 import { VideoPlaylistModel } from '../models/video/video-playlist'
3 import { VideoPlaylistElementModel } from '../models/video/video-playlist-element'
4 import { UserModel } from '../models/account/user'
5 import { VideoModel } from '../models/video/video'
6 import { AccountModel } from '../models/account/account'
7 import { VideoChangeOwnershipModel } from '../models/video/video-change-ownership'
8 import { ActorModel } from '../models/activitypub/actor'
9 import { VideoCommentModel } from '../models/video/video-comment'
10 import { VideoShareModel } from '../models/video/video-share'
11 import { AccountVideoRateModel } from '../models/account/account-video-rate'
12 import { ActorFollowModel } from '../models/activitypub/actor-follow'
13 import { ServerModel } from '../models/server/server'
14 import { VideoFileModel } from '../models/video/video-file'
15 import { VideoRedundancyModel } from '../models/redundancy/video-redundancy'
16 import { ServerBlocklistModel } from '../models/server/server-blocklist'
17 import { AccountBlocklistModel } from '../models/account/account-blocklist'
18 import { VideoImportModel } from '../models/video/video-import'
19 import { VideoAbuseModel } from '../models/video/video-abuse'
20 import { VideoBlacklistModel } from '../models/video/video-blacklist'
21 import { VideoCaptionModel } from '../models/video/video-caption'
22 import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist'
23
24 declare module 'express' {
25
26   interface Response {
27     locals: {
28       video?: VideoModel
29       videoShare?: VideoShareModel
30       videoFile?: VideoFileModel
31
32       videoImport?: VideoImportModel
33
34       videoBlacklist?: VideoBlacklistModel
35
36       videoCaption?: VideoCaptionModel
37
38       videoAbuse?: VideoAbuseModel
39
40       videoStreamingPlaylist?: VideoStreamingPlaylistModel
41
42       videoChannel?: VideoChannelModel
43
44       videoPlaylist?: VideoPlaylistModel
45       videoPlaylistElement?: VideoPlaylistElementModel
46
47       accountVideoRate?: AccountVideoRateModel
48
49       videoComment?: VideoCommentModel
50       videoCommentThread?: VideoCommentModel
51
52       follow?: ActorFollowModel
53       subscription?: ActorFollowModel
54
55       nextOwner?: AccountModel
56       videoChangeOwnership?: VideoChangeOwnershipModel
57       account?: AccountModel
58       actor?: ActorModel
59       user?: UserModel
60
61       server?: ServerModel
62
63       videoRedundancy?: VideoRedundancyModel
64
65       accountBlock?: AccountBlocklistModel
66       serverBlock?: ServerBlocklistModel
67
68       oauth?: {
69         token: {
70           User: UserModel
71           user: UserModel
72         }
73       }
74
75       signature?: {
76         actor: ActorModel
77       }
78
79       authenticated?: boolean
80     }
81   }
82 }