/**
 * QueryBuilder — fluent query accumulator for a query read model.
 *
 * Pure accumulator: builder methods accumulate query state into a
 * QueryPlan, then run() delegates execution to QueryRunner.
 */
import type { SnapshotPropValue } from '../snapshot/SnapshotPropValue.ts';
import type { AggregateResult } from './QueryAggregation.ts';
import BoundedSupportRule from './BoundedSupportRule.ts';
import SupportFragmentPlan from './SupportFragmentPlan.ts';
import QueryPlan, { type AggregateSpec, type QueryNodeSnapshot } from './QueryPlan.ts';
import { type QueryResult } from './QueryRunner.ts';
import type { QueryReadModelProvider } from './QueryReadModelProvider.ts';
type QueryWhereCandidate = ((node: QueryNodeSnapshot) => boolean) | SnapshotPropValue;
/**
 * Fluent query builder for materialized WARP state.
 *
 * Accumulates query state via chaining methods, then delegates
 * execution to QueryRunner via run().
 */
export default class QueryBuilder {
    private readonly _provider;
    private _pattern;
    private readonly _operations;
    private _select;
    private _aggregate;
    constructor(provider: QueryReadModelProvider);
    toPlan(): QueryPlan;
    supportRule(): BoundedSupportRule;
    supportFragmentPlan(): SupportFragmentPlan;
    match(pattern: string | string[]): QueryBuilder;
    where(fn: QueryWhereCandidate): QueryBuilder;
    outgoing(label?: string, options?: {
        depth?: number | [number, number];
    }): QueryBuilder;
    incoming(label?: string, options?: {
        depth?: number | [number, number];
    }): QueryBuilder;
    select(fields?: string[]): QueryBuilder;
    aggregate(spec: AggregateSpec): QueryBuilder;
    run(): Promise<QueryResult | AggregateResult>;
}
export {};
