import type { IDcRouterOptions } from '../classes.dcrouter.js';
import type { IAcmeConfig } from '../../dist_ts_interfaces/data/acme-config.js';
/**
 * AcmeConfigManager — owns the singleton ACME configuration in the DB.
 *
 * Lifecycle:
 *  - `start()` — loads from the DB; if empty, seeds from legacy constructor
 *    fields (`tls.contactEmail`, `smartProxyConfig.acme.*`) on first boot.
 *  - `getConfig()` — returns the in-memory cached `IAcmeConfig` (or null)
 *  - `updateConfig(args, updatedBy)` — upserts and refreshes the cache
 *
 * Reload semantics: updates take effect on the next dcrouter restart because
 * `SmartAcme` is instantiated once in `setupSmartProxy()`. `renewThresholdDays`
 * applies immediately to the next renewal check. See
 * `ts_web/elements/domains/ops-view-certificates.ts` for the UI warning.
 */
export declare class AcmeConfigManager {
    private options;
    private cached;
    constructor(options: IDcRouterOptions);
    start(): Promise<void>;
    stop(): Promise<void>;
    /**
     * Returns the current ACME config, or null if not configured.
     * In-memory — does not hit the DB.
     */
    getConfig(): IAcmeConfig | null;
    /**
     * True if there is an enabled ACME config. Used by `setupSmartProxy()` to
     * decide whether to instantiate SmartAcme.
     */
    hasEnabledConfig(): boolean;
    /**
     * Upsert the ACME config. All fields are optional; missing fields are
     * preserved from the existing row (or defaulted if there is no row yet).
     */
    updateConfig(args: Partial<Omit<IAcmeConfig, 'updatedAt' | 'updatedBy'>>, updatedBy: string): Promise<IAcmeConfig>;
    /**
     * Build a seed object from the legacy constructor fields. Returns null
     * if the user has not provided any of them.
     *
     * Supports BOTH `tls.contactEmail` (short form) and `smartProxyConfig.acme`
     * (full form). `smartProxyConfig.acme` wins when both are present.
     */
    private deriveSeedFromOptions;
    private createSeedDoc;
    private toPlain;
}
