/**
 * Admin REST API routes for config management.
 *
 * Provides endpoints under /admin/config/* for:
 * - seed: bulk import shared config from JSON body
 * - get: current effective config (merged local + shared + env)
 * - set: update single field in shared config
 * - delete: remove field from shared config
 * - export: dump shared config (redacted)
 * - validate: validate config against schema (no DB mutation)
 * - diff: compare local YAML vs shared DB config
 * - history: version history
 * - rollback: rollback to specific version
 * - reload: trigger config reload
 *
 * All routes protected by Bearer token auth (reuses admin middleware pattern).
 */
import { Hono } from 'hono';
import type { SharedConfigStore } from '../config/shared-store.js';
import type { ConfigReloader, ReloadResult } from '../config/reload.js';
import type { LocalConfig } from '../config/types.js';
/**
 * Result of forwarding a reload request to a peer orchestrator.
 *
 * - `result` carries the ReloadResult from the target peer when delivery succeeded.
 * - `result === null` means the target peer is not connected (or unknown).
 */
export interface PeerReloadForwardResult {
    result: ReloadResult | null;
}
/**
 * Dependencies for config admin routes.
 */
export interface ConfigRouteDeps {
    sharedStore: SharedConfigStore;
    configReloader: ConfigReloader;
    localConfigPath?: string;
    loadLocalConfig: () => Promise<LocalConfig>;
    /** Admin token for Bearer auth. If undefined, routes return 503. */
    adminToken?: string;
    /**
     * Forward a config reload request to a specific peer instance via the
     * cluster peer connection. Returns the peer's ReloadResult, or `null` if
     * the target peer is unknown / not connected. When omitted, per-instance
     * targeting is unavailable and `target` requests return 501.
     */
    forwardReloadToPeer?: (targetInstanceId: string, opts: {
        drain?: boolean;
        timeoutMs?: number;
    }) => Promise<ReloadResult | null>;
}
/**
 * Create admin config routes.
 * Returns a Hono app to be mounted at /admin/config.
 */
export declare function createConfigAdminRoutes(deps: ConfigRouteDeps): Hono;
//# sourceMappingURL=admin-config.d.ts.map