X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypes%2Fexpress.d.ts;h=c1c379b9824a74199801a7ba180e72eff62382d1;hb=ebd61437c1ec92bea9772924c7051cb00d71f778;hp=91a8cf3d88e99ad9e8835c4fde6691620c80b00d;hpb=c729caf6cc34630877a0e5a1bda1719384cd0c8a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/types/express.d.ts b/server/types/express.d.ts index 91a8cf3d8..c1c379b98 100644 --- a/server/types/express.d.ts +++ b/server/types/express.d.ts @@ -1,4 +1,3 @@ - import { OutgoingHttpHeaders } from 'http' import { RegisterServerAuthExternalOptions } from '@server/types' import { @@ -8,7 +7,10 @@ import { MActorFollowActorsDefault, MActorUrl, MChannelBannerAccountDefault, + MChannelSyncChannel, + MRegistration, 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'] @@ -119,9 +125,12 @@ declare module 'express' { videoId?: MVideoId videoLive?: MVideoLive + videoLiveSession?: MVideoLiveSession videoShare?: MVideoShareActor + videoSource?: MVideoSource + videoFile?: MVideoFile videoFileResumable?: EnhancedUploadXFile @@ -138,6 +147,7 @@ declare module 'express' { videoStreamingPlaylist?: MStreamingPlaylist videoChannel?: MChannelBannerAccountDefault + videoChannelSync?: MChannelSyncChannel videoPlaylistFull?: MVideoPlaylistFull videoPlaylistSummary?: MVideoPlaylistFullSummary @@ -162,6 +172,7 @@ declare module 'express' { actorFull?: MActorFull user?: MUserDefault + userRegistration?: MRegistration server?: MServer @@ -178,6 +189,10 @@ declare module 'express' { actor: MActorAccountChannelId } + videoFileToken?: { + user: MUserAccountUrl + } + authenticated?: boolean registeredPlugin?: RegisteredPlugin @@ -185,6 +200,9 @@ declare module 'express' { externalAuth?: RegisterServerAuthExternalOptions plugin?: MPlugin + + localViewerFull?: MLocalVideoViewerWithWatchSections + } } }