import { EntityType } from '@mastra/core/observability';
import { DatePreset, DateRange } from './hooks/use-metrics';
import { MetricsDimensionalFilter } from './metrics-filters';
/** Narrow time window for a single chart node. Callers pass concrete start/end
 *  Dates (typically bucket boundaries); these bypass the preset. */
export type DrilldownWindow = {
    from: Date;
    to: Date;
};
/** Narrow a raw timestamp into the time-series bucket window that surrounds
 *  it. For a chart with `interval = 1h`, clicking a node at 14:37Z drills into
 *  14:00Z → 15:00Z. For `1d`, the corresponding UTC day. */
export declare function narrowWindowToBucket(tsMs: number, interval: '1h' | '1d'): DrilldownWindow;
/** Fields a card may use to scope the drilldown. Only the pieces the caller
 *  knows are attached; everything else falls through to the current dashboard
 *  filters. `status` is only valid for traces. */
export type DrilldownScope = {
    rootEntityType?: EntityType;
    entityName?: string;
    threadId?: string;
    resourceId?: string;
    model?: string;
    provider?: string;
    /** Trace-only. Valid for drill-downs from "errors" segments. */
    status?: 'running' | 'success' | 'error';
    /** Overrides date preset with explicit window bounds. */
    window?: DrilldownWindow;
};
type BuildArgs = {
    /** Current metrics dashboard preset. */
    preset: DatePreset;
    /** Current metrics dashboard custom range (only honoured when preset === 'custom'). */
    customRange?: DateRange;
    /** Dashboard-level dimensional filters (environment, serviceName, tags, etc.). */
    dashboardFilter: MetricsDimensionalFilter;
    /** Per-card scoping applied on top of dashboard filters. */
    scope: DrilldownScope;
    /** Override the Traces page base path. Defaults to `/observability` (mastra Studio). */
    tracesBasePath?: string;
    /** Override the Logs page base path. Defaults to `/logs` (mastra Studio). */
    logsBasePath?: string;
};
/** Build a relative URL to the Traces page pre-filtered by the dashboard
 *  filters + per-card scope. */
export declare function buildTracesDrilldownUrl({ preset, customRange, dashboardFilter, scope, tracesBasePath, }: BuildArgs): string;
/** Build a relative URL to the Logs page pre-filtered by the dashboard filters
 *  + per-card scope. Useful for "View errors in logs" affordances. */
export declare function buildLogsDrilldownUrl({ preset, customRange, dashboardFilter, scope, logsBasePath, }: BuildArgs): string;
export {};
