import type { Response } from 'express'; import AbstractController from '../modules/AbstractController.ts'; import GetUserByToken from '../services/http/middleware/GetUserByToken.ts'; import RateLimiter from '../services/http/middleware/RateLimiter.ts'; import { HttpResponse } from '../services/http/responses.ts'; import type { PostLoginRequest, PostLogoutRequest, PostRegisterRequest, RecoverPasswordRequest, SendPasswordRecoveryEmailRequest, SendVerificationRequest, VerifyUserRequest } from './Auth.routes.gen.ts'; /** * What the auth handlers answer. They return an `HttpResponse`; `Response` * stays in the type (and `res` an optional parameter) so overrides written * against `res` still fit. An override that calls a handler must return its * result (`return super.postLogin(req, res)`). */ type AuthAnswer = HttpResponse | Response; declare class Auth extends AbstractController { get routes(): { post: { '/login': { handler: (req: PostLoginRequest, res?: Response) => Promise; request: import("../services/validate/defineSchema.ts").DefinedSchema<{ email: string; password: string; }>; }; '/register': { handler: (req: PostRegisterRequest, res?: Response) => Promise; request: import("../services/validate/defineSchema.ts").DefinedSchema<{ email: string; password: string; nickName?: string; firstName?: string; lastName?: string; }>; }; '/logout': (req: PostLogoutRequest, res?: Response) => Promise; '/verify': (req: VerifyUserRequest, res?: Response) => Promise; '/send-recovery-email': { handler: (req: SendPasswordRecoveryEmailRequest, res?: Response) => Promise; request: import("../services/validate/defineSchema.ts").DefinedSchema<{ email: string; }>; }; '/recover-password': { handler: (req: RecoverPasswordRequest, res?: Response) => Promise; request: import("../services/validate/defineSchema.ts").DefinedSchema<{ password: string; passwordRecoveryToken: string; }>; }; '/send-verification': { handler: (req: SendVerificationRequest, res?: Response) => Promise; request: import("../services/validate/defineSchema.ts").DefinedSchema<{ email: string; }>; }; }; }; postLogin(req: PostLoginRequest, res?: Response): Promise; postRegister(req: PostRegisterRequest, res?: Response): Promise; postLogout(req: PostLogoutRequest, res?: Response): Promise; verifyUser(req: VerifyUserRequest, res?: Response): Promise; sendPasswordRecoveryEmail(req: SendPasswordRecoveryEmailRequest, res?: Response): Promise; recoverPassword(req: RecoverPasswordRequest, res?: Response): Promise; sendVerification(req: SendVerificationRequest, res?: Response): Promise; static get middleware(): Map; } export default Auth;