]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/types/express.d.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / types / express.d.ts
index 1a99b598aabacb6be95983d07e610c81ff5a726c..3738ffc47dd8d716078831e17cbff1405a072347 100644 (file)
@@ -8,6 +8,7 @@ import {
   MActorFollowActorsDefault,
   MActorUrl,
   MChannelBannerAccountDefault,
+  MChannelSyncChannel,
   MStreamingPlaylist,
   MVideoChangeOwnershipFull,
   MVideoFile,
@@ -40,8 +41,9 @@ import {
   MVideoRedundancyVideo,
   MVideoShareActor,
   MVideoThumbnail
-} from '../../types/models'
+} from './models'
 import { Writable } from 'stream'
+import { MVideoSource } from './models/video/video-source'
 
 declare module 'express' {
   export interface Request {
@@ -60,6 +62,7 @@ declare module 'express' {
   export type UploadFileForCheck = {
     originalname: string
     mimetype: string
+    size: number
   }
 
   export type UploadFilesForCheck = {
@@ -67,7 +70,7 @@ declare module 'express' {
   } | UploadFileForCheck[]
 
   // Upload file with a duration added by our middleware
-  export type VideoUploadFile = Pick<Express.Multer.File, 'path' | 'filename' | 'size'> & {
+  export type VideoUploadFile = Pick<Express.Multer.File, 'path' | 'filename' | 'size', 'originalname'> & {
     duration: number
   }
 
@@ -84,6 +87,7 @@ declare module 'express' {
     duration: number
     path: string
     filename: string
+    originalname: string
   }
 
   // Extends Response with added functions and potential variables passed by middlewares
@@ -93,13 +97,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']
@@ -118,9 +124,12 @@ declare module 'express' {
       videoId?: MVideoId
 
       videoLive?: MVideoLive
+      videoLiveSession?: MVideoLiveSession
 
       videoShare?: MVideoShareActor
 
+      videoSource?: MVideoSource
+
       videoFile?: MVideoFile
 
       videoFileResumable?: EnhancedUploadXFile
@@ -137,6 +146,7 @@ declare module 'express' {
       videoStreamingPlaylist?: MStreamingPlaylist
 
       videoChannel?: MChannelBannerAccountDefault
+      videoChannelSync?: MChannelSyncChannel
 
       videoPlaylistFull?: MVideoPlaylistFull
       videoPlaylistSummary?: MVideoPlaylistFullSummary
@@ -184,6 +194,9 @@ declare module 'express' {
       externalAuth?: RegisterServerAuthExternalOptions
 
       plugin?: MPlugin
+
+      localViewerFull?: MLocalVideoViewerWithWatchSections
+
     }
   }
 }