import * as plugins from '../../plugins.js';
import { Email } from '../core/classes.email.js';
export interface IKeyPaths {
    privateKeyPath: string;
    publicKeyPath: string;
}
export interface IDkimKeyMetadata {
    domain: string;
    selector: string;
    createdAt: number;
    rotatedAt?: number;
    previousSelector?: string;
    keySize: number;
}
export declare class DKIMCreator {
    private keysDir;
    private storageManager?;
    constructor(keysDir?: string, storageManager?: any);
    getKeyPathsForDomain(domainArg: string): Promise<IKeyPaths>;
    handleDKIMKeysForDomain(domainArg: string): Promise<void>;
    handleDKIMKeysForEmail(email: Email): Promise<void>;
    readDKIMKeys(domainArg: string): Promise<{
        privateKey: string;
        publicKey: string;
    }>;
    createDKIMKeys(): Promise<{
        privateKey: string;
        publicKey: string;
    }>;
    storeDKIMKeys(privateKey: string, publicKey: string, privateKeyPath: string, publicKeyPath: string): Promise<void>;
    createAndStoreDKIMKeys(domain: string): Promise<void>;
    getDNSRecordForDomain(domainArg: string): Promise<plugins.tsclass.network.IDnsRecord>;
    /**
     * Get DKIM key metadata for a domain
     */
    private getKeyMetadata;
    /**
     * Save DKIM key metadata
     */
    private saveKeyMetadata;
    /**
     * Check if DKIM keys need rotation
     */
    needsRotation(domain: string, selector?: string, rotationIntervalDays?: number): Promise<boolean>;
    /**
     * Rotate DKIM keys for a domain
     */
    rotateDkimKeys(domain: string, currentSelector?: string, keySize?: number): Promise<string>;
    /**
     * Get key paths for a specific selector
     */
    getKeyPathsForSelector(domain: string, selector: string): Promise<IKeyPaths>;
    /**
     * Read DKIM keys for a specific selector
     */
    readDKIMKeysForSelector(domain: string, selector: string): Promise<{
        privateKey: string;
        publicKey: string;
    }>;
    /**
     * Get DNS record for a specific selector
     */
    getDNSRecordForSelector(domain: string, selector: string): Promise<plugins.tsclass.network.IDnsRecord>;
    /**
     * Clean up old DKIM keys after grace period
     */
    cleanupOldKeys(domain: string, gracePeriodDays?: number): Promise<void>;
}
