export type TokenConfig = {
    Secret: string;
    Duration: number;
};
export declare class TokenConfigValue implements TokenConfig {
    Secret: string;
    Duration: number;
    constructor(secret?: string, duration?: number);
    Validate(): Error | null;
    DurationTime(): number;
}
export type EmailTemplateData = {
    Subject: string;
    Body: string;
};
export declare class EmailTemplate implements EmailTemplateData {
    Subject: string;
    Body: string;
    constructor(subject?: string, body?: string);
    Validate(): Error | null;
    Resolve(placeholders: Record<string, unknown> | null | undefined): {
        subject: string;
        body: string;
    };
}
export declare class AuthAlertConfig {
    Enabled: boolean;
    EmailTemplate: EmailTemplate;
    Validate(): Error | null;
}
export declare class OTPConfig {
    Enabled: boolean;
    Duration: number;
    Length: number;
    EmailTemplate: EmailTemplate;
    Validate(): Error | null;
    DurationTime(): number;
}
export declare class MFAConfig {
    Enabled: boolean;
    Duration: number;
    Rule: string;
    Validate(): Error | null;
    DurationTime(): number;
}
export declare class PasswordAuthConfig {
    Enabled: boolean;
    IdentityFields: string[] | null;
    Validate(): Error | null;
}
export type OAuth2KnownFields = {
    Id: string;
    Name: string;
    Username: string;
    AvatarURL: string;
};
export declare class OAuth2Config {
    Providers: OAuth2ProviderConfig[] | null;
    MappedFields: OAuth2KnownFields;
    Enabled: boolean;
    GetProviderConfig(name: string): {
        config: OAuth2ProviderConfig;
        exists: boolean;
    };
    Validate(): Error | null;
}
export declare class OAuth2ProviderConfig {
    PKCE: boolean | null;
    Name: string;
    ClientId: string;
    ClientSecret: string;
    AuthURL: string;
    TokenURL: string;
    UserInfoURL: string;
    DisplayName: string;
    Extra: Record<string, unknown> | null;
    Validate(): Error | null;
    InitProvider(): {
        provider: import("../tools/auth/auth.js").Provider | null;
        error: Error | null;
    };
}
export type CollectionAuthOptions = {
    AuthRule: string | null;
    ManageRule: string | null;
    AuthAlert: AuthAlertConfig;
    OAuth2: OAuth2Config;
    PasswordAuth: PasswordAuthConfig;
    MFA: MFAConfig;
    OTP: OTPConfig;
    AuthToken: TokenConfigValue;
    PasswordResetToken: TokenConfigValue;
    EmailChangeToken: TokenConfigValue;
    VerificationToken: TokenConfigValue;
    FileToken: TokenConfigValue;
    VerificationTemplate: EmailTemplate;
    ResetPasswordTemplate: EmailTemplate;
    ConfirmEmailChangeTemplate: EmailTemplate;
};
export declare function createDefaultAuthOptions(): CollectionAuthOptions;
export declare function normalizeEmailTemplate(raw: unknown): EmailTemplate;
export declare function normalizeAuthAlertConfig(raw: unknown): AuthAlertConfig;
export declare function normalizeTokenConfig(raw: unknown): TokenConfigValue;
export declare function normalizeOTPConfig(raw: unknown): OTPConfig;
export declare function normalizeMFAConfig(raw: unknown): MFAConfig;
export declare function normalizePasswordAuthConfig(raw: unknown): PasswordAuthConfig;
export declare function normalizeOAuth2Config(raw: unknown): OAuth2Config;
export declare function normalizeOAuth2ProviderConfig(raw: unknown): OAuth2ProviderConfig;
export declare function checkForDuplicatedProviders(configs: OAuth2ProviderConfig[]): Error | null;
