import type { TemplateEngine } from '../../../util/templates/TemplateEngine';
import type { JsonRepresentation } from '../InteractionUtil';
import type { JsonInteractionHandlerInput } from '../JsonInteractionHandler';
import { JsonInteractionHandler } from '../JsonInteractionHandler';
import type { JsonView } from '../JsonView';
import type { InteractionRoute } from '../routing/InteractionRoute';
import type { EmailSender } from './util/EmailSender';
import type { ForgotPasswordStore } from './util/ForgotPasswordStore';
import type { PasswordStore } from './util/PasswordStore';
export interface ForgotPasswordHandlerArgs {
    /**
     * Store containing the password login information.
     */
    passwordStore: PasswordStore;
    /**
     * Store containing the forgot password records.
     */
    forgotPasswordStore: ForgotPasswordStore;
    /**
     * Template engine that will be used to generate the email body.
     */
    templateEngine: TemplateEngine<{
        resetLink: string;
    }>;
    /**
     * Sender to send the actual email.
     */
    emailSender: EmailSender;
    /**
     * Route used to generate the reset link for the user.
     */
    resetRoute: InteractionRoute;
}
type OutType = {
    email: string;
};
/**
 * Responsible for the case where a user forgot their password and asks for a reset.
 * Will send out the necessary mail if the email address is known.
 * The JSON response will always be the same to prevent leaking which email addresses are stored.
 */
export declare class ForgotPasswordHandler extends JsonInteractionHandler<OutType> implements JsonView {
    protected readonly logger: import("global-logger-factory").Logger<unknown>;
    private readonly passwordStore;
    private readonly forgotPasswordStore;
    private readonly templateEngine;
    private readonly emailSender;
    private readonly resetRoute;
    constructor(args: ForgotPasswordHandlerArgs);
    getView(): Promise<JsonRepresentation>;
    /**
     * Generates a record to reset the password for the given email address and then mails it.
     * In case there is no account, no error wil be thrown for privacy reasons.
     * Nothing will happen instead.
     */
    handle({ json }: JsonInteractionHandlerInput): Promise<JsonRepresentation<OutType>>;
    /**
     * Generates the link necessary for resetting the password and mails it to the given email address.
     */
    private sendResetMail;
}
export {};
