+
import { RegisterServerAuthExternalOptions } from '@server/types'
import {
MAbuseMessage,
MStreamingPlaylist,
MVideoChangeOwnershipFull,
MVideoFile,
+ MVideoFormattableDetails,
MVideoImmutable,
MVideoLive,
MVideoPlaylistFull,
import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element'
import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate'
import { HttpMethod } from '@shared/core-utils/miscs/http-methods'
-import { VideoCreate } from '@shared/models'
+import { PeerTubeProblemDocumentData, ServerErrorCode, VideoCreate } from '@shared/models'
import { File as UploadXFile, Metadata } from '@uploadx/core'
import { RegisteredPlugin } from '../../lib/plugins/plugin-manager'
import {
MVideoThumbnail,
MVideoWithRights
} from '../../types/models'
+
declare module 'express' {
export interface Request {
query: any
filename: string
}
- // Extends locals property from Response
+ // Extends Response with added functions and potential variables passed by middlewares
interface Response {
+ fail: (options: {
+ message: string
+
+ title?: string
+ status?: number
+ type?: ServerErrorCode
+ instance?: string
+
+ data?: PeerTubeProblemDocumentData
+ }) => void
+
locals: {
+ docUrl?: string
+
+ videoAPI?: MVideoFormattableDetails
videoAll?: MVideoFullLight
onlyImmutableVideo?: MVideoImmutable
onlyVideo?: MVideoThumbnail