/**
 * Argus QueryBuilder 客户端
 * POST {url}/api/v5/query_range
 * GET  {url}/api/v2/metrics
 * GET  {url}/api/v5/attribute_keys
 */
import type { ArgusField, ArgusQueryItem } from '../types/dashboard';
export interface ArgusClientConfig {
    url: string;
    token: string;
}
export interface ArgusMetricMeta {
    metricName: string;
    description: string;
    type: string;
    unit: string;
    temporality: string;
    isMonotonic: boolean;
}
export interface ArgusMetricsListResponse {
    status: string;
    data: {
        metrics: ArgusMetricMeta[];
    };
}
export interface ArgusMetricItem {
    metricName: string;
    type: string;
    unit: string;
    description: string;
}
export type ArgusSuggestionSignal = 'logs' | 'traces' | 'metrics';
export interface ArgusKeySuggestion {
    name: string;
    type?: string;
    fieldDataType?: string;
}
export interface ArgusValueSuggestions {
    stringValues: string[];
    numberValues: number[];
}
export declare function getMetrics(cfg: ArgusClientConfig): Promise<ArgusMetricMeta[]>;
/**
 * GET /api/v2/metrics — metric dropdown search used by the query builder.
 * Mirrors the SigNoz searchMetrics API and normalizes the response to the UI shape.
 */
export declare function searchMetrics(cfg: ArgusClientConfig, params: {
    searchText?: string;
    source?: 'meter' | '';
    limit?: number;
}): Promise<ArgusMetricItem[]>;
export interface ArgusAttributeKeysResponse {
    data: {
        attributeKeys: ArgusField[];
    };
}
/**
 * Fetch attribute keys for GroupBy autocomplete.
 * GET {url}/api/v5/attribute_keys?signal=&metricName=&search=
 */
export declare function getAttributeKeys(cfg: ArgusClientConfig, params: {
    signal: string;
    metricName?: string;
    search?: string;
}): Promise<ArgusField[]>;
/**
 * GET /api/v1/fields/keys — attribute-key suggestions for smart filter and
 * aggregation editors. Falls back to /api/v3/autocomplete/attribute_keys when
 * the richer fields endpoint is unavailable.
 */
export declare function getKeySuggestions(cfg: ArgusClientConfig, params: {
    signal: ArgusSuggestionSignal;
    searchText?: string;
    metricName?: string;
    signalSource?: 'meter' | '';
    fieldDataType?: string;
    fieldContext?: string;
}): Promise<ArgusKeySuggestion[]>;
/**
 * GET /api/v1/fields/values — value suggestions for a selected key.
 * Falls back to /api/v3/autocomplete/attribute_values when /fields/* is unavailable.
 */
export declare function getValueSuggestions(cfg: ArgusClientConfig, params: {
    key: string;
    signal: ArgusSuggestionSignal;
    tagType?: string;
    searchText?: string;
    metricName?: string;
    signalSource?: 'meter' | '';
}): Promise<ArgusValueSuggestions>;
export interface ArgusTimeSeriesValue {
    timestamp: number;
    value: number;
}
export interface ArgusTimeSeries {
    labels?: Array<{
        key: {
            name: string;
        };
        value: unknown;
    }>;
    values: ArgusTimeSeriesValue[];
}
export interface ArgusAggregationBucket {
    index: number;
    alias: string;
    series: ArgusTimeSeries[];
}
export interface ArgusQueryResult {
    queryName: string;
    aggregations: ArgusAggregationBucket[];
}
export interface ArgusQueryRangeResponse {
    data: {
        results: ArgusQueryResult[];
    };
}
export declare function queryRange(queries: ArgusQueryItem[], timeFrom: number, // epoch seconds
timeTill: number, // epoch seconds
cfg: ArgusClientConfig, metricsMap?: Map<string, ArgusMetricMeta>): Promise<ArgusQueryRangeResponse>;
