]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/types/express.d.ts
Add Podcast RSS feeds (#5487)
[github/Chocobozzz/PeerTube.git] / server / types / express.d.ts
index 4537c57c65ab8b6db8766d6c3dc75a9137c75267..510b9f94ea27d3c6ec0f6c0451254a54465378d7 100644 (file)
@@ -1,5 +1,5 @@
-
 import { OutgoingHttpHeaders } from 'http'
+import { Writable } from 'stream'
 import { RegisterServerAuthExternalOptions } from '@server/types'
 import {
   MAbuseMessage,
@@ -8,13 +8,16 @@ import {
   MActorFollowActorsDefault,
   MActorUrl,
   MChannelBannerAccountDefault,
+  MChannelSyncChannel,
+  MRegistration,
   MStreamingPlaylist,
+  MUserAccountUrl,
   MVideoChangeOwnershipFull,
   MVideoFile,
   MVideoFormattableDetails,
   MVideoId,
   MVideoImmutable,
-  MVideoLive,
+  MVideoLiveFormattable,
   MVideoPlaylistFull,
   MVideoPlaylistFullSummary
 } from '@server/types/models'
@@ -41,7 +44,8 @@ import {
   MVideoShareActor,
   MVideoThumbnail
 } from './models'
-import { Writable } from 'stream'
+import { MRunner, MRunnerJobRunner, MRunnerRegistrationToken } from './models/runners'
+import { MVideoSource } from './models/video/video-source'
 
 declare module 'express' {
   export interface Request {
@@ -68,7 +72,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
   }
 
@@ -85,6 +89,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 +99,19 @@ declare module 'express' {
 
       title?: string
       status?: number
-      type?: ServerErrorCode
+      type?: ServerErrorCode | string
       instance?: string
 
       data?: PeerTubeProblemDocumentData
+
+      tags?: string[]
     }) => void
 
     locals: {
+      requestStart: number
+
+      apicacheGroups: string[]
+
       apicache: {
         content: string | Buffer
         write: Writable['write']
@@ -118,10 +129,13 @@ declare module 'express' {
       onlyVideo?: MVideoThumbnail
       videoId?: MVideoId
 
-      videoLive?: MVideoLive
+      videoLive?: MVideoLiveFormattable
+      videoLiveSession?: MVideoLiveSession
 
       videoShare?: MVideoShareActor
 
+      videoSource?: MVideoSource
+
       videoFile?: MVideoFile
 
       videoFileResumable?: EnhancedUploadXFile
@@ -138,6 +152,7 @@ declare module 'express' {
       videoStreamingPlaylist?: MStreamingPlaylist
 
       videoChannel?: MChannelBannerAccountDefault
+      videoChannelSync?: MChannelSyncChannel
 
       videoPlaylistFull?: MVideoPlaylistFull
       videoPlaylistSummary?: MVideoPlaylistFullSummary
@@ -162,6 +177,7 @@ declare module 'express' {
       actorFull?: MActorFull
 
       user?: MUserDefault
+      userRegistration?: MRegistration
 
       server?: MServer
 
@@ -178,6 +194,10 @@ declare module 'express' {
         actor: MActorAccountChannelId
       }
 
+      videoFileToken?: {
+        user: MUserAccountUrl
+      }
+
       authenticated?: boolean
 
       registeredPlugin?: RegisteredPlugin
@@ -187,6 +207,10 @@ declare module 'express' {
       plugin?: MPlugin
 
       localViewerFull?: MLocalVideoViewerWithWatchSections
+
+      runner?: MRunner
+      runnerRegistrationToken?: MRunnerRegistrationToken
+      runnerJob?: MRunnerJobRunner
     }
   }
 }