import { OnModuleDestroy } from '@nestjs/common';
import { Client } from '@temporalio/client';
import { NativeConnection } from '@temporalio/worker';
import { TemporalOptions } from '../interfaces';
export declare class TemporalConnectionFactory implements OnModuleDestroy {
    private readonly logger;
    private clientConnectionCache;
    private workerConnectionCache;
    private connectionAttempts;
    private readonly MAX_RETRY_ATTEMPTS;
    private readonly RETRY_DELAY_MS;
    constructor();
    createClient(options: TemporalOptions): Promise<Client | null>;
    createWorkerConnection(options: TemporalOptions): Promise<NativeConnection | null>;
    onModuleDestroy(): Promise<void>;
    cleanup(): Promise<void>;
    getConnectionHealth(): {
        clientConnections: number;
        workerConnections: number;
        totalAttempts: number;
    };
    private createNewClient;
    private createNewWorkerConnection;
    private getConnectionKey;
    private isClientHealthy;
    private isWorkerConnectionHealthy;
    private delay;
}
