diff options
Diffstat (limited to 'server/typings/express')
-rw-r--r-- | server/typings/express/index.d.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/server/typings/express/index.d.ts b/server/typings/express/index.d.ts index 1a8dc3430..1a99b598a 100644 --- a/server/typings/express/index.d.ts +++ b/server/typings/express/index.d.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | import { OutgoingHttpHeaders } from 'http' | ||
2 | import { RegisterServerAuthExternalOptions } from '@server/types' | 3 | import { RegisterServerAuthExternalOptions } from '@server/types' |
3 | import { | 4 | import { |
4 | MAbuseMessage, | 5 | MAbuseMessage, |
@@ -22,8 +23,7 @@ import { MPlugin, MServer, MServerBlocklist } from '@server/types/models/server' | |||
22 | import { MVideoImportDefault } from '@server/types/models/video/video-import' | 23 | import { MVideoImportDefault } from '@server/types/models/video/video-import' |
23 | import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element' | 24 | import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element' |
24 | import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate' | 25 | import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate' |
25 | import { HttpMethod } from '@shared/core-utils/miscs/http-methods' | 26 | import { HttpMethod, PeerTubeProblemDocumentData, ServerErrorCode, VideoCreate } from '@shared/models' |
26 | import { PeerTubeProblemDocumentData, ServerErrorCode, VideoCreate } from '@shared/models' | ||
27 | import { File as UploadXFile, Metadata } from '@uploadx/core' | 27 | import { File as UploadXFile, Metadata } from '@uploadx/core' |
28 | import { RegisteredPlugin } from '../../lib/plugins/plugin-manager' | 28 | import { RegisteredPlugin } from '../../lib/plugins/plugin-manager' |
29 | import { | 29 | import { |
@@ -41,6 +41,7 @@ import { | |||
41 | MVideoShareActor, | 41 | MVideoShareActor, |
42 | MVideoThumbnail | 42 | MVideoThumbnail |
43 | } from '../../types/models' | 43 | } from '../../types/models' |
44 | import { Writable } from 'stream' | ||
44 | 45 | ||
45 | declare module 'express' { | 46 | declare module 'express' { |
46 | export interface Request { | 47 | export interface Request { |
@@ -99,6 +100,15 @@ declare module 'express' { | |||
99 | }) => void | 100 | }) => void |
100 | 101 | ||
101 | locals: { | 102 | locals: { |
103 | apicache: { | ||
104 | content: string | Buffer | ||
105 | write: Writable['write'] | ||
106 | writeHead: Response['writeHead'] | ||
107 | end: Response['end'] | ||
108 | cacheable: boolean | ||
109 | headers: OutgoingHttpHeaders | ||
110 | } | ||
111 | |||
102 | docUrl?: string | 112 | docUrl?: string |
103 | 113 | ||
104 | videoAPI?: MVideoFormattableDetails | 114 | videoAPI?: MVideoFormattableDetails |