X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypes%2Fexpress.d.ts;h=99244d2a04c5c63326a087e4f70f224216419ecf;hb=f50bff17f5b69c576960360857e25224cea13c0a;hp=7cc13f21d40506b1c7217de3ea64aabd2bdc234c;hpb=26e3e98ff0e222a9fb9226938ac6902af77921bd;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/types/express.d.ts b/server/types/express.d.ts index 7cc13f21d..99244d2a0 100644 --- a/server/types/express.d.ts +++ b/server/types/express.d.ts @@ -8,7 +8,9 @@ import { MActorFollowActorsDefault, MActorUrl, MChannelBannerAccountDefault, + MChannelSyncChannel, MStreamingPlaylist, + MUserAccountUrl, MVideoChangeOwnershipFull, MVideoFile, MVideoFormattableDetails, @@ -42,6 +44,7 @@ import { MVideoThumbnail } from './models' import { Writable } from 'stream' +import { MVideoSource } from './models/video/video-source' declare module 'express' { export interface Request { @@ -68,7 +71,7 @@ declare module 'express' { } | UploadFileForCheck[] // Upload file with a duration added by our middleware - export type VideoUploadFile = Pick & { + export type VideoUploadFile = Pick & { duration: number } @@ -85,6 +88,7 @@ declare module 'express' { duration: number path: string filename: string + originalname: string } // Extends Response with added functions and potential variables passed by middlewares @@ -94,13 +98,15 @@ declare module 'express' { title?: string status?: number - type?: ServerErrorCode + type?: ServerErrorCode | string instance?: string data?: PeerTubeProblemDocumentData }) => void locals: { + requestStart: number + apicache: { content: string | Buffer write: Writable['write'] @@ -123,6 +129,8 @@ declare module 'express' { videoShare?: MVideoShareActor + videoSource?: MVideoSource + videoFile?: MVideoFile videoFileResumable?: EnhancedUploadXFile @@ -139,6 +147,7 @@ declare module 'express' { videoStreamingPlaylist?: MStreamingPlaylist videoChannel?: MChannelBannerAccountDefault + videoChannelSync?: MChannelSyncChannel videoPlaylistFull?: MVideoPlaylistFull videoPlaylistSummary?: MVideoPlaylistFullSummary @@ -179,6 +188,10 @@ declare module 'express' { actor: MActorAccountChannelId } + videoFileToken?: { + user: MUserAccountUrl + } + authenticated?: boolean registeredPlugin?: RegisteredPlugin @@ -188,6 +201,7 @@ declare module 'express' { plugin?: MPlugin localViewerFull?: MLocalVideoViewerWithWatchSections + } } }