import { EntityType } from '@mastra/core/observability';
import { PropertyFilterField, PropertyFilterToken } from '../../ds/components/PropertyFilter/types';
/** Primitive type options — matches the traces filter vocabulary. */
export declare const METRICS_ROOT_ENTITY_TYPE_OPTIONS: readonly [{
    readonly label: "Agent";
    readonly entityType: EntityType.AGENT;
}, {
    readonly label: "Workflow";
    readonly entityType: EntityType.WORKFLOW_RUN;
}, {
    readonly label: "Scorer";
    readonly entityType: EntityType.SCORER;
}, {
    readonly label: "Ingest";
    readonly entityType: EntityType.RAG_INGESTION;
}];
/** Field IDs that live in dedicated URL params (not the generic `filterX` set). */
export declare const METRICS_SYNTHETIC_FILTER_FIELD_IDS: readonly ["rootEntityType"];
export declare const METRICS_ROOT_ENTITY_TYPE_PARAM = "rootEntityType";
/** URL param name for each generic property filter field. Mirrors traces for
 *  cross-page URL consistency (user can copy a trace's filter URL and paste
 *  equivalent dimensions into metrics). */
export declare const METRICS_PROPERTY_FILTER_PARAM_BY_FIELD: {
    readonly tags: "filterTags";
    readonly entityId: "filterEntityId";
    readonly entityName: "filterEntityName";
    readonly runId: "filterRunId";
    readonly threadId: "filterThreadId";
    readonly sessionId: "filterSessionId";
    readonly requestId: "filterRequestId";
    readonly resourceId: "filterResourceId";
    readonly userId: "filterUserId";
    readonly organizationId: "filterOrganizationId";
    readonly serviceName: "filterServiceName";
    readonly environment: "filterEnvironment";
    readonly experimentId: "filterExperimentId";
    readonly provider: "filterProvider";
    readonly model: "filterModel";
};
export type MetricsPropertyFilterFieldId = keyof typeof METRICS_PROPERTY_FILTER_PARAM_BY_FIELD;
export declare const METRICS_PROPERTY_FILTER_FIELD_IDS: Array<MetricsPropertyFilterFieldId>;
/** Save the current metrics filter URL params so the metrics page can restore
 *  them on next visit (same pattern as traces/logs). */
export declare function saveMetricsFiltersToStorage(params: URLSearchParams): void;
export declare function clearSavedMetricsFilters(): void;
export declare function loadMetricsFiltersFromStorage(): URLSearchParams | null;
export declare function hasAnyMetricsFilterParams(params: URLSearchParams): boolean;
/** Build the PropertyFilterField list shown in the metrics filter popover.
 *
 *  The field order is curated for OLAP efficiency: columnar/LowCardinality
 *  dimensions first, then bloom_filter-indexed high-cardinality IDs as
 *  free-text. Fields that are expensive to filter without an index are
 *  intentionally omitted from this dashboard surface. */
export declare function createMetricsPropertyFilterFields({ availableTags, availableEntityNames, availableServiceNames, availableEnvironments, loading, }: {
    availableTags: string[];
    availableEntityNames: string[];
    availableServiceNames: string[];
    availableEnvironments: string[];
    loading?: {
        tags?: boolean;
        entityNames?: boolean;
        serviceNames?: boolean;
        environments?: boolean;
    };
}): PropertyFilterField[];
/** Parse filter tokens from URL params, preserving insertion order. */
export declare function getMetricsPropertyFilterTokens(searchParams: URLSearchParams): PropertyFilterToken[];
/** Return a fresh URLSearchParams containing only metrics filter params. */
export declare function getPreservedMetricsFilterParams(searchParams: URLSearchParams): URLSearchParams;
/** Mutate `params` in place: strip every metrics filter param, then re-write
 *  them from `tokens` in order. Token insertion order drives URL order so
 *  filter pill order is stable across reloads. */
export declare function applyMetricsPropertyFilterTokens(params: URLSearchParams, tokens: PropertyFilterToken[]): void;
/** Shape of the dimensional filter object fed into `MetricsFilter` on client
 *  calls. Kept compatible with `metricsFilterSchema` in @internal/core — every
 *  scalar field maps to a single-string column filter, and `tags` is the only
 *  array field (matched via `has()` / equivalent on backends). */
export type MetricsDimensionalFilter = {
    rootEntityType?: EntityType;
    entityName?: string;
    entityId?: string;
    tags?: string[];
    serviceName?: string;
    environment?: string;
    provider?: string;
    model?: string;
    threadId?: string;
    resourceId?: string;
    userId?: string;
    organizationId?: string;
    runId?: string;
    sessionId?: string;
    requestId?: string;
    experimentId?: string;
};
export declare function buildMetricsDimensionalFilter(tokens: PropertyFilterToken[]): MetricsDimensionalFilter;
