import type { StorageClusterConfig, ObservabilityClusterConfig, ClusterAuthType } from '../types/index.js';
export declare const DEFAULT_OTEL_INDEXES: {
    readonly traces: "otel-v1-apm-span-*";
    readonly logs: "ml-commons-logs-*";
    readonly metrics: "otel-v1-apm-service-map*";
};
/**
 * Configuration status returned by the backend
 * Credentials are never returned in full — username is safe to show;
 * password existence is indicated via hasPassword so the UI can show placeholder dots.
 */
export interface ConfigStatus {
    storage: {
        configured: boolean;
        source: 'file' | 'environment' | 'none';
        endpoint?: string;
        authType?: ClusterAuthType;
        username?: string;
        hasPassword?: boolean;
        awsProfile?: string;
        awsRegion?: string;
        awsService?: 'es' | 'aoss';
    };
    observability: {
        configured: boolean;
        source: 'file' | 'environment' | 'none';
        endpoint?: string;
        authType?: ClusterAuthType;
        username?: string;
        hasPassword?: boolean;
        awsProfile?: string;
        awsRegion?: string;
        awsService?: 'es' | 'aoss';
        indexes?: {
            traces?: string;
            logs?: string;
            metrics?: string;
        };
    };
    runtime?: {
        storage: {
            backend: 'file' | 'opensearch' | 'error';
            error: string | null;
            configuredEndpoint: string | null;
            drifted: boolean;
        };
    };
}
/**
 * Get configuration status from the server
 * Returns source (file/environment/none) and endpoints, never credentials
 */
export declare function getConfigStatus(): Promise<ConfigStatus>;
/**
 * Save storage configuration to server (agent-health.config.json)
 */
export interface SaveStorageConfigResult {
    success: boolean;
    message: string;
    connected: boolean;
    needsReindex: boolean;
    fixResults?: Array<{
        indexName: string;
        status: 'pending' | 'reindexing' | 'completed' | 'failed';
        documentCount?: number;
        error?: string;
    }>;
}
export declare function saveStorageConfig(config: StorageClusterConfig): Promise<SaveStorageConfigResult>;
/**
 * Clear storage configuration from server
 */
export declare function clearStorageConfig(): Promise<void>;
/**
 * Save observability configuration to server (agent-health.config.json)
 */
export declare function saveObservabilityConfig(config: ObservabilityClusterConfig): Promise<void>;
/**
 * Clear observability configuration from server
 */
export declare function clearObservabilityConfig(): Promise<void>;
/**
 * Retry storage connection using current config (file or env).
 * Used when config was edited externally or after fixing connectivity.
 */
export declare function retryStorageConnection(): Promise<{
    success: boolean;
    state: ConfigStatus['runtime'] extends infer T ? T extends {
        storage: infer S;
    } ? S : never : never;
}>;
/**
 * Force file storage regardless of config file contents.
 */
export declare function useFileStorage(): Promise<void>;
/** @deprecated No longer used - configuration is server-side only */
export declare function loadDataSourceConfig(): null;
/** @deprecated No longer used - configuration is server-side only */
export declare function clearDataSourceConfig(): void;
/** @deprecated No longer used - credentials are not sent via headers */
export declare function getStorageConfigHeaders(): Record<string, string>;
/** @deprecated No longer used - credentials are not sent via headers */
export declare function getObservabilityConfigHeaders(): Record<string, string>;
/** @deprecated No longer used - credentials not stored in browser */
export declare function hasStorageCredentials(): boolean;
/** @deprecated No longer used - credentials not stored in browser */
export declare function hasObservabilityCredentials(): boolean;
//# sourceMappingURL=dataSourceConfig.d.ts.map