import * as express from 'express'; import { NextFunction, Request, Response } from 'express'; import { UserDTO, UserRoles } from '../../../common/entities/UserDTO'; import { ParamsDictionary } from 'express-serve-static-core'; import { ExtensionRoutePaths, IExtensionRESTApi, IExtensionRESTRoute, IMediaRequestBody } from './IExtension'; import { ILogger } from '../../Logger'; import { MediaEntity } from '../database/enitites/MediaEntity'; import { Repository } from 'typeorm'; export declare class ExpressRouterWrapper implements IExtensionRESTApi { private readonly router; private readonly name; private readonly extLogger; constructor(router: express.Router, name: string, extLogger: ILogger); get use(): ExpressRouteWrapper; get get(): ExpressRouteWrapper; get put(): ExpressRouteWrapper; get post(): ExpressRouteWrapper; get delete(): ExpressRouteWrapper; } export declare class ExpressRouteWrapper implements IExtensionRESTRoute { private readonly router; private readonly name; private readonly func; private readonly extLogger; constructor(router: express.Router, name: string, func: 'get' | 'use' | 'put' | 'post' | 'delete', extLogger: ILogger); mediaJsonResponse(paths: ExtensionRoutePaths

, minRole: UserRoles, invalidateDirectory: boolean, cb: (params: ParamsDictionary, body: IMediaRequestBody, user: UserDTO, media: MediaEntity, repository: Repository) => unknown): string; jsonResponse(paths: ExtensionRoutePaths

, minRole: UserRoles, cb: (params?: ParamsDictionary, body?: unknown, user?: UserDTO) => unknown): string; rawMiddleware(paths: ExtensionRoutePaths

, minRole: UserRoles, mw: (req: Request, res: Response, next: NextFunction) => void | Promise): string; /** * Registers the route on the extension's router. * A route that can't be registered (usually an old extension with an Express 4 path) is logged and skipped: * the app keeps running, and nothing of the route is reachable (Express 5 throws before adding it to the router). */ private register; private getAuthMWs; }