import { Application, NextFunction, Request, Response } from 'express'; interface OptionsObject { register: boolean; restrictedRegister: ((validation: object) => boolean) | null; allowMultipleSessions: boolean; authTokenStoreDatabase: boolean; } declare class AuthenticationHelper { app: Application; apiAuthPath: string; database: any; options: OptionsObject; additionalAccountColumns: object; additionalAccountRegisterSchema: object; tokens: Map; onLogin?: (token: string, dbentry: U) => void; onRegister?: (userobj: U) => void; onAuthenticated?: (req: AuthenticatedRequest, userobj: U) => void; constructor(app: Application, apiAuthPath: string, database: any, accountFile?: boolean, additionalAccountColumns?: {}, additionalAccountRegisterSchema?: {}); install(onLogin?: (token: string, userobj: U) => void, onRegister?: (userobj: U) => void, onAuthenticated?: (req: AuthenticatedRequest, userobj: U) => void): void; setupDatabase(): void; addToken(token: string, user: U): Promise; removeToken(token: string): Promise; getUser(token: string): Promise; authentication(): (req: AuthenticatedRequest, res: Response>, next: NextFunction) => Promise; authenticationFull(cb: (user: U) => boolean): (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise; } export interface AuthenticatedRequest extends Request { credentials?: { token: string; user: U; }; } declare class AuthenticationError extends Error { constructor(message: string); } export { AuthenticationHelper, AuthenticationError };