import { ConfigService } from '@nestjs/config';
import { ICloudProvider, CreateServerConfig, ServerCreationResult, ServerDeletionResult, SSHKeyCreationResult, SSHKeyDetails, SshKeyInfo, ChangeServerTypeConfig, ProviderVolumeSummary } from '../interfaces/cloud-provider.interface';
import { InstanceEntity } from '../../instances/entities/instance.entity';
import { ICredentialProvider } from '../interfaces/credential-provider.interface';
import { ListServers200ResponseServersInner, ListServerTypes200ResponseServerTypesInner } from '../../../modules/providers/implementations/hetzner/generated';
import { NodeSizeDto } from '../dto/node-size.dto';
import { PricingDto, PricingQueryDto } from '../dto/pricing.dto';
import { NodeSizeMapper } from '../mappers/node-size.mapper';
import { PricingMapper } from '../mappers/pricing.mapper';
import { ServerResponseDto } from '../../../modules/infrastructure/servers/dto/server-response.dto';
import { DeleteServerDto } from '../../../modules/infrastructure/servers/dto/delete-server.dto';
import { SSHKeyDto } from '../../../modules/access/dto/ssh-key.dto';
import { LabelService } from '../../common/services/label.service';
import { CreateVNetConfig, VNetCreationResult, VNetDetails, VNetDeletionResult, AddSubnetConfig, DeleteSubnetConfig, AddRouteConfig, DeleteRouteConfig, AttachServerToVNetConfig, DetachServerFromVNetConfig, ServerVNetAttachmentResult, ChangeIpRangeConfig } from '../interfaces/network-provider.interface';
export declare class HetznerProviderService implements ICloudProvider {
    private readonly configService;
    private readonly credentialProvider;
    private readonly nodeSizeMapper;
    private readonly pricingMapper;
    private readonly labelService;
    private readonly logger;
    private readonly basePath;
    private readonly defaultUser;
    private readonly timeout;
    constructor(configService: ConfigService, credentialProvider: ICredentialProvider, nodeSizeMapper: NodeSizeMapper, pricingMapper: PricingMapper, labelService: LabelService);
    /**
     * Create a custom Axios instance with optimized configuration
     */
    private createAxiosInstance;
    /**
     * Create a configured API client with proper headers and custom Axios instance
     */
    private createConfiguration;
    /**
     * Create ServersApi instance with custom Axios configuration
     */
    private createServersApi;
    /**
     * Create SSHKeysApi instance with custom Axios configuration
     */
    private createSSHKeysApi;
    /**
     * Create ServerTypesApi instance with custom Axios configuration
     */
    private createServerTypesApi;
    /**
     * Create PricingApi instance with custom Axios configuration
     */
    private createPricingApi;
    /**
     * Create VolumesApi instance with custom Axios configuration.
     * Used by §14 of the scaling architecture to provision Flui-managed
     * block storage Volumes attached to master nodes (NFS export backing).
     */
    private createVolumesApi;
    private createServerActionsApi;
    private createVolumeActionsApi;
    private createActionsApi;
    /**
     * Create DataCentersApi instance with custom Axios configuration
     */
    private createDataCentersApi;
    listInstances(filters?: any): Promise<InstanceEntity[]>;
    testApiKey(apiKey: string): Promise<boolean>;
    private mapHetznerInstanceToEntity;
    private mapHetznerStatus;
    createServer(config: CreateServerConfig): Promise<ServerCreationResult>;
    getServerStatus(serverId: string): Promise<string>;
    getServerDetails(serverId: string): Promise<ListServers200ResponseServersInner | null>;
    /**
     * Wait for an action to complete by monitoring its status
     * This is more efficient than polling server status as it uses Hetzner's action tracking system
     * @param actionId Action ID to wait for
     * @param timeoutMs Timeout in milliseconds (default: 5 minutes)
     * @param pollIntervalMs Polling interval in milliseconds (default: 3 seconds)
     * @returns Promise that resolves when action is complete
     * @throws Error if action fails or timeout is reached
     */
    waitForActionCompletion(actionId: number, timeoutMs?: number, pollIntervalMs?: number): Promise<void>;
    /**
     * Sleep helper
     */
    private sleep;
    deleteServer(config: DeleteServerDto): Promise<ServerDeletionResult>;
    /**
     * Power off a server
     */
    powerOffServer(serverId: string): Promise<void>;
    /**
     * Power on a server
     */
    powerOnServer(serverId: string): Promise<void>;
    changeServerType(serverId: string, config: ChangeServerTypeConfig): Promise<{
        actionId?: number;
    }>;
    expandVolume(volumeId: string, newSizeGb: number): Promise<{
        actionId?: number;
    }>;
    detachVolume(volumeId: string): Promise<{
        actionId?: number;
    }>;
    deleteVolume(volumeId: string): Promise<void>;
    listFluiManagedVolumes(): Promise<ProviderVolumeSummary[]>;
    listServersAsDto(): Promise<ServerResponseDto[]>;
    getServerDetailsAsDto(serverId: string): Promise<ServerResponseDto | null>;
    testConnection(): Promise<{
        success: boolean;
        error?: string;
    }>;
    private mapHetznerServerToDto;
    listSSHKeys(): Promise<SSHKeyDto[]>;
    private mapHetznerSSHKeyToDto;
    private isFluiManagedKey;
    private extractKeyType;
    /**
     * Get available node sizes (server types) from Hetzner
     * Filters out ARM architecture servers
     * @param includeAvailability If true, includes real-time availability data from /datacenters endpoint (NOT cached)
     */
    getNodeSizes(includeAvailability?: boolean): Promise<NodeSizeDto[]>;
    /**
     * Get pricing information from Hetzner
     */
    getPricing(query: PricingQueryDto): Promise<PricingDto>;
    /**
     * List raw server types with full pricing data including traffic pricing.
     * Used by billing service for cost calculations.
     */
    listServerTypesRaw(): Promise<ListServerTypes200ResponseServerTypesInner[]>;
    /**
     * Get datacenter availability from Hetzner
     * Returns a map of location name to Set of available server type IDs
     */
    private getDatacenterAvailability;
    /**
     * Create an SSH key on Hetzner
     */
    createSSHKey(name: string, publicKey: string, labels?: Record<string, string>): Promise<SSHKeyCreationResult>;
    /**
     * Delete an SSH key from Hetzner
     */
    deleteSSHKey(providerKeyId: string): Promise<void>;
    /**
     * Get SSH key details from Hetzner
     */
    getSSHKey(providerKeyId: string): Promise<SSHKeyDetails>;
    resolveSSHKeys(keys: SshKeyInfo[]): Promise<string[]>;
    /**
     * Update server labels on Hetzner
     * IMPORTANT: This overwrites ALL labels, so we must merge with existing labels
     */
    updateServerLabels(serverId: string, labels: Record<string, string>): Promise<void>;
    /**
     * Get network service instance
     */
    private getNetworkService;
    /**
     * Create a new VNet (private network)
     */
    createVNet(config: CreateVNetConfig): Promise<VNetCreationResult>;
    /**
     * Delete a VNet
     */
    deleteVNet(vnetId: string): Promise<VNetDeletionResult>;
    /**
     * Get VNet details
     */
    getVNet(vnetId: string): Promise<VNetDetails | null>;
    /**
     * List all VNets
     */
    listVNets(): Promise<VNetDetails[]>;
    /**
     * Add subnet to VNet
     */
    addSubnet(config: AddSubnetConfig): Promise<{
        actionId?: number;
    }>;
    /**
     * Delete subnet from VNet
     */
    deleteSubnet(config: DeleteSubnetConfig): Promise<{
        actionId?: number;
    }>;
    /**
     * Add route to VNet
     */
    addRoute(config: AddRouteConfig): Promise<{
        actionId?: number;
    }>;
    /**
     * Delete route from VNet
     */
    deleteRoute(config: DeleteRouteConfig): Promise<{
        actionId?: number;
    }>;
    /**
     * Change IP range of VNet (can only extend, not shrink)
     */
    changeIpRange(config: ChangeIpRangeConfig): Promise<{
        actionId?: number;
    }>;
    /**
     * Attach server to VNet
     */
    attachServerToVNet(config: AttachServerToVNetConfig): Promise<ServerVNetAttachmentResult>;
    /**
     * Detach server from VNet
     */
    detachServerFromVNet(config: DetachServerFromVNetConfig): Promise<{
        actionId?: number;
    }>;
}
