diff options
Diffstat (limited to 'server/typings/express')
-rw-r--r-- | server/typings/express/index.d.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/typings/express/index.d.ts b/server/typings/express/index.d.ts index 55b6e0039..f58436ce1 100644 --- a/server/typings/express/index.d.ts +++ b/server/typings/express/index.d.ts | |||
@@ -22,6 +22,7 @@ import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video- | |||
22 | import { HttpMethod } from '@shared/core-utils/miscs/http-methods' | 22 | import { HttpMethod } from '@shared/core-utils/miscs/http-methods' |
23 | import { VideoCreate } from '@shared/models' | 23 | import { VideoCreate } from '@shared/models' |
24 | import { File as UploadXFile, Metadata } from '@uploadx/core' | 24 | import { File as UploadXFile, Metadata } from '@uploadx/core' |
25 | import { ProblemDocumentOptions } from 'http-problem-details/dist/ProblemDocument' | ||
25 | import { RegisteredPlugin } from '../../lib/plugins/plugin-manager' | 26 | import { RegisteredPlugin } from '../../lib/plugins/plugin-manager' |
26 | import { | 27 | import { |
27 | MAccountDefault, | 28 | MAccountDefault, |
@@ -83,8 +84,15 @@ declare module 'express' { | |||
83 | filename: string | 84 | filename: string |
84 | } | 85 | } |
85 | 86 | ||
86 | // Extends locals property from Response | 87 | // Extends Response with added functions and potential variables passed by middlewares |
87 | interface Response { | 88 | interface Response { |
89 | docs?: string | ||
90 | fail: (options: { | ||
91 | data?: Record<string, Object> | ||
92 | docs?: string | ||
93 | message: string | ||
94 | } & ProblemDocumentOptions) => void | ||
95 | |||
88 | locals: { | 96 | locals: { |
89 | videoAll?: MVideoFullLight | 97 | videoAll?: MVideoFullLight |
90 | onlyImmutableVideo?: MVideoImmutable | 98 | onlyImmutableVideo?: MVideoImmutable |