X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypings%2Fexpress%2Findex.d.ts;h=cbbf40a7868d47f3cc173503273f3f6773229b4e;hb=e030bfb59dd5ee65f20a64686ec9b22ca39f70ae;hp=f58436ce1e406d6db9d3ec152c9383a58bf0a781;hpb=463206948d6a9d46e7e68d55c7b763e601ecc870;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/typings/express/index.d.ts b/server/typings/express/index.d.ts index f58436ce1..cbbf40a78 100644 --- a/server/typings/express/index.d.ts +++ b/server/typings/express/index.d.ts @@ -1,3 +1,4 @@ + import { RegisterServerAuthExternalOptions } from '@server/types' import { MAbuseMessage, @@ -20,9 +21,8 @@ import { MVideoImportDefault } from '@server/types/models/video/video-import' 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 { ProblemDocumentOptions } from 'http-problem-details/dist/ProblemDocument' import { RegisteredPlugin } from '../../lib/plugins/plugin-manager' import { MAccountDefault, @@ -41,6 +41,7 @@ import { MVideoThumbnail, MVideoWithRights } from '../../types/models' + declare module 'express' { export interface Request { query: any @@ -86,14 +87,20 @@ declare module 'express' { // Extends Response with added functions and potential variables passed by middlewares interface Response { - docs?: string fail: (options: { - data?: Record - docs?: string message: string - } & ProblemDocumentOptions) => void + + title?: string + status?: number + type?: ServerErrorCode + instance?: string + + data?: PeerTubeProblemDocumentData + }) => void locals: { + docUrl?: string + videoAll?: MVideoFullLight onlyImmutableVideo?: MVideoImmutable onlyVideo?: MVideoThumbnail