import type { ControlPlaneStore } from '../control-plane';
import type { AppendTelemetryInput, SavedTelemetryQuery, TelemetryCollectionStatus, TelemetryQuery, TelemetryQueryResult, TelemetryRecord, TelemetryRetentionPolicy, TelemetrySeries, TelemetrySeriesQuery, TelemetryTailResult } from './model';
import type { TelemetryRedactionOptions } from './redaction';
export declare function telemetryCursor(record?: Pick<TelemetryRecord, 'timestamp' | 'id'>): string | undefined;
export declare function telemetryPercentile(values: number[], percentile: number): number | undefined;
export declare function telemetryBucketLabel(timestamp: Date, timezone?: string): string;
export declare class TelemetryStore {
    private readonly controlPlane;
    private readonly options;
    constructor(controlPlane: ControlPlaneStore, options?: {
        now?: () => Date;
        redaction?: TelemetryRedactionOptions;
    });
    private now;
    append(input: AppendTelemetryInput): TelemetryRecord;
    appendMany(inputs: AppendTelemetryInput[]): TelemetryRecord[];
    get(id: string): TelemetryRecord | undefined;
    query(input: TelemetryQuery): TelemetryQueryResult;
    tail(input: TelemetryQuery, after?: string): TelemetryTailResult;
    series(input: TelemetrySeriesQuery): TelemetrySeries[];
    status(projectId: string, environmentId?: string, retentionDays?: number, samplingRate?: number, resourceIds?: string[]): TelemetryCollectionStatus[];
    saveQuery(projectId: string, actorId: string | undefined, name: string, query: TelemetryQuery): SavedTelemetryQuery;
    listSavedQueries(projectId: string, actorId?: string): SavedTelemetryQuery[];
    deleteSavedQuery(projectId: string, actorId: string | undefined, id: string): boolean;
    downsample(policy: TelemetryRetentionPolicy, projectId?: string): {
        compacted: number;
        rollups: number;
    };
    enforceRetention(policy: TelemetryRetentionPolicy, projectId?: string): {
        deleted: number;
        compacted: number;
        rollups: number;
    };
}
