import { Repository } from 'typeorm';
import { KubernetesService } from '../shared/services/kubernetes.service';
import { ResourceAvailabilityResponseDto } from './dto/resource-availability.dto';
import { BuildResourcesResponseDto } from './dto/build-resources.dto';
import { ClusterEntity } from './entities/cluster.entity';
import { ClusterNodeEntity } from './entities/cluster-node.entity';
import { InfrastructureOperationEntity } from '../servers/entities/infrastructure-operations.entity';
import { CreateClusterDto } from './dto/create-cluster.dto';
import { ClusterResponseDto } from './dto/cluster-response.dto';
import { RegisterClusterDto, RegisterClusterResponseDto } from './dto/register-cluster.dto';
import { ClusterValidationService } from './services/cluster-validation.service';
import { ClusterCreationService } from './services/cluster-creation.service';
import { ClusterDeletionService } from './services/cluster-deletion.service';
import { ClusterMapperService } from './services/cluster-mapper.service';
import { ClusterOperationsService } from './services/cluster-operations.service';
import { ClusterPowerManagementService } from './services/cluster-power-management.service';
import { EncryptionService } from '../../shared/encryption/services/encryption.service';
import { ReconcileStatusResponseDto, ClusterPowerOperationResponseDto } from './dto/cluster-power-management.dto';
export interface CreateClusterJobData {
    operationId: string;
    clusterId: string;
}
export interface DeleteClusterJobData {
    operationId: string;
    clusterId: string;
    force: boolean;
}
export interface StopClusterJobData {
    operationId: string;
    clusterId: string;
}
export interface StartClusterJobData {
    operationId: string;
    clusterId: string;
}
/**
 * Main orchestrator service for cluster operations
 * Delegates to specialized services for better separation of concerns
 */
export declare class ClustersService {
    private readonly clusterRepository;
    private readonly clusterValidationService;
    private readonly clusterCreationService;
    private readonly clusterDeletionService;
    private readonly clusterMapperService;
    private readonly clusterOperationsService;
    private readonly clusterPowerManagementService;
    private readonly encryptionService;
    private readonly kubernetesService;
    private readonly logger;
    constructor(clusterRepository: Repository<ClusterEntity>, clusterValidationService: ClusterValidationService, clusterCreationService: ClusterCreationService, clusterDeletionService: ClusterDeletionService, clusterMapperService: ClusterMapperService, clusterOperationsService: ClusterOperationsService, clusterPowerManagementService: ClusterPowerManagementService, encryptionService: EncryptionService, kubernetesService: KubernetesService);
    /**
     * Create a new K3s cluster
     */
    createCluster(dto: CreateClusterDto): Promise<InfrastructureOperationEntity>;
    /**
     * Delete a cluster
     */
    deleteCluster(clusterId: string, force?: boolean): Promise<InfrastructureOperationEntity>;
    /**
     * Get cluster by ID
     */
    getCluster(clusterId: string, includeRealStatus?: boolean): Promise<ClusterResponseDto>;
    /**
     * List all clusters (excluding deleted)
     */
    listClusters(): Promise<ClusterResponseDto[]>;
    /**
     * Register an existing externally-managed cluster
     */
    registerCluster(dto: RegisterClusterDto): Promise<RegisterClusterResponseDto>;
    /**
     * Get cluster entity by ID (for internal use)
     */
    getClusterEntity(clusterId: string): Promise<ClusterEntity>;
    /**
     * Get kubeconfig for cluster
     */
    getKubeconfig(clusterId: string): Promise<string>;
    /**
     * Get cluster nodes
     */
    getClusterNodes(clusterId: string): Promise<ClusterNodeEntity[]>;
    /**
     * Update cluster metadata
     */
    updateClusterMetadata(clusterId: string, metadata: Record<string, any>): Promise<ClusterResponseDto>;
    /**
     * Update node metadata
     */
    updateNodeMetadata(clusterId: string, nodeId: string, metadata: Record<string, any>): Promise<ClusterNodeEntity>;
    /**
     * Reconcile cluster tags (deprecated - stub implementation)
     */
    reconcileClusterTags(clusterId: string, force: boolean, includeFirewalls: boolean): Promise<any>;
    /**
     * Reconcile cluster firewalls (deprecated - use new desired-state API)
     */
    reconcileClusterFirewalls(clusterId: string, options: {
        force: boolean;
        autoMatchTemplates: boolean;
    }): Promise<any>;
    /**
     * Stop all servers in a cluster (async operation)
     */
    stopCluster(clusterId: string): Promise<ClusterPowerOperationResponseDto>;
    /**
     * Start all servers in a cluster (async operation)
     */
    startCluster(clusterId: string): Promise<ClusterPowerOperationResponseDto>;
    /**
     * Reconcile cluster status with real provider state
     */
    reconcileClusterStatus(clusterId: string, autoFix?: boolean): Promise<ReconcileStatusResponseDto>;
    /**
     * Check whether a cluster has sufficient resources for a new deployment.
     *
     * @param clusterId      - Target cluster UUID
     * @param cpuRequest     - CPU request in millicores (e.g. 250 for "250m")
     * @param memoryRequest  - Memory request in mebibytes (e.g. 256 for "256Mi")
     * @param replicas       - Number of replicas (default 1)
     * @param profileName    - Human-readable profile name for the response (optional)
     */
    checkResourceAvailability(clusterId: string, cpuRequest: number, memoryRequest: number, replicas?: number, profileName?: string | null): Promise<ResourceAvailabilityResponseDto>;
    getBuildResources(clusterId: string): Promise<BuildResourcesResponseDto>;
}
