import { NestMiddleware } from "@nestjs/common"; import { NextFunction, Request, Response } from "express"; import { UserService } from "../entities/user/user.service"; /** * Inject user object into request if user is authenticated. * * No verification or validation is done. If `userId` is not found in the * session object or a user is not found with that ID, nothing is inserted and * the request execution resumed (necessary because this middleware is called on * every request). * * @internal */ export declare class CurrentUserMiddleware implements NestMiddleware { private userService; constructor(userService: UserService); use(request: Request, _: Response, next: NextFunction): Promise; }