import { ClusterEntity } from '../../../src/modules/infrastructure/clusters/entities/cluster.entity';
import { CliClusterRepository } from '../lib/repositories/cli-cluster.repository';
import { CliNodeRepository } from '../lib/repositories/cli-node.repository';
import { CliClustersService } from './cli-clusters.service';
import { CliOperationRepository } from '../lib/repositories/cli-operation.repository';
import { CliSshService } from './cli-ssh.service';
import { InfrastructureOperationEntity } from '../../../src/modules/infrastructure/servers/entities/infrastructure-operations.entity';
/**
 * CLI Observability Cluster Service
 *
 * Simplified version of ObservabilityClusterService for CLI usage.
 * Uses file-based repositories instead of TypeORM.
 */
export declare class CliObservabilityClusterService {
    private readonly clusterRepository;
    private readonly nodeRepository;
    private readonly clustersService;
    private readonly operationRepository;
    private readonly sshService;
    private readonly logger;
    constructor(clusterRepository: CliClusterRepository, nodeRepository: CliNodeRepository, clustersService: CliClustersService, operationRepository: CliOperationRepository, sshService: CliSshService);
    /**
     * Get the observability cluster
     */
    getObservabilityCluster(): Promise<ClusterEntity | null>;
    /**
     * Check if observability cluster exists
     */
    hasObservabilityCluster(): Promise<boolean>;
    /**
     * Get observability service endpoints
     */
    getObservabilityEndpoints(clusterId: string): Promise<{
        prometheus?: string;
        grafana?: string;
        loki?: string;
        postgres?: string;
        redis?: string;
        fluiApi?: string;
        fluiWeb?: string;
    }>;
    /**
     * Create observability cluster
     */
    createObservabilityCluster(provider: string, region: string, nodeSize: string, workerCount?: number, firewallId?: string, sourceCidrs?: string[], authMode?: string, envVnet?: {
        vnetProviderResourceId: string;
        vnetIpRange: string;
        subnetProviderResourceId: string;
        subnetIpRange: string;
        subnetType: string;
        networkZone: string;
    }, adminEmail?: string, acmeStaging?: boolean, diskSizeGb?: number, options?: {
        sharedStorageEnabled?: boolean;
        sharedStorageVolumeSizeGb?: number;
    }): Promise<string>;
    /**
     * Deploy observability stack (Prometheus, Grafana, Loki)
     */
    deployObservabilityStack(clusterId: string): Promise<void>;
    /**
     * Delete observability cluster
     */
    deleteObservabilityCluster(): Promise<void>;
    /**
     * Get cluster operation by cluster ID
     */
    getClusterOperation(clusterId: string): Promise<InfrastructureOperationEntity | null>;
    /**
     * Wait for cluster to be ready by polling operation status
     * @param clusterId Cluster ID to wait for
     * @param timeoutMs Timeout in milliseconds (default: 10 minutes)
     * @param pollIntervalMs Polling interval in milliseconds (default: 10 seconds)
     * @returns Promise that resolves when cluster is ready
     * @throws Error if timeout is reached or operation fails
     */
    waitForClusterReady(clusterId: string, timeoutMs?: number, pollIntervalMs?: number): Promise<void>;
    /**
     * Wait for master node IP address to become available
     * Polls the cluster repository until masterIpAddress is populated
     */
    waitForMasterIp(clusterId: string, timeoutMs?: number, pollIntervalMs?: number): Promise<string>;
    /**
     * Wait for TCP port to become reachable on a host
     */
    waitForPortReady(host: string, port?: number, timeoutMs?: number, pollIntervalMs?: number): Promise<void>;
    /**
     * Wait for SSH to be fully ready (CA enrolled + cert auth working)
     * Attempts an actual SSH command with retry until it succeeds.
     * This is needed because TCP port 22 can be open before cloud-init
     * has finished configuring the CA for certificate authentication.
     *
     * @param sshTestFn Function that attempts an SSH command and throws on failure
     */
    waitForSshAuth(sshTestFn: () => Promise<void>, timeoutMs?: number, pollIntervalMs?: number): Promise<void>;
    /**
     * Poll operation status in background and call onReady when COMPLETED.
     * Returns a stop function and a done promise that resolves when the
     * poller finishes (after onReady/onFailed callback completes or stop() is called).
     */
    pollOperationUntilReady(clusterId: string, onReady: () => Promise<void>, onFailed?: (error: string) => void, pollIntervalMs?: number): {
        stop: () => void;
        done: Promise<void>;
    };
    /**
     * Check observability services health via HTTP endpoints
     * @param masterIp Master node IP address
     * @returns Object with service health status
     */
    checkObservabilityServices(masterIp: string, _nipHostnameToken?: string | null): Promise<{
        prometheus: 'healthy' | 'unreachable';
        grafana: 'healthy' | 'unreachable';
        loki: 'healthy' | 'unreachable';
        postgres: 'healthy' | 'unreachable';
        redis: 'healthy' | 'unreachable';
        fluiApi: 'healthy' | 'unreachable';
        fluiWeb: 'healthy' | 'unreachable';
    }>;
    /**
     * Check if a TCP port is reachable on a host
     */
    private checkTcpPort;
    /**
     * Sleep helper
     */
    private sleep;
    waitForValidTls(url: string, timeoutMs?: number, intervalMs?: number, acmeStaging?: boolean): Promise<boolean>;
    waitForOidcReady(apiBaseUrl: string, timeoutMs?: number, intervalMs?: number, acmeStaging?: boolean): Promise<boolean>;
}
