import { type Query } from '../types'; import { type FirestoreQueryConstraintHandlerMap } from '../query/constraint'; import { type FirestoreQueryConstraintFunctionsDriver } from './query'; /** * Configuration for building a {@link FirestoreQueryConstraintFunctionsDriver} from a * handler map pattern. Each platform (Web SDK, Admin SDK) provides its own handler map * that maps constraint type strings to builder functions. * * @template B - The platform-specific query builder type (e.g., the Firestore Query itself) */ export interface MakeFirestoreQueryConstraintFunctionsDriver extends Omit { /** * Maps constraint type names to handler functions that apply them to the builder. */ mapping: FirestoreQueryConstraintHandlerMap; /** * Initializes a builder from a base query. */ init: (query: Query) => B; /** * Converts the finalized builder back to a query. */ build: (builder: B) => Query; } /** * Creates a {@link FirestoreQueryConstraintFunctionsDriver} from a handler map configuration. * * This factory enables platform-specific query implementations to register their constraint * handlers declaratively. The returned driver applies constraints sequentially using the * registered handlers and throws if an unsupported constraint type is encountered. * * @template B - The platform-specific query builder type * @param config - The handler map configuration * @returns A fully configured constraint functions driver * * @throws {Error} When a query uses a constraint type not present in the handler map */ export declare function makeFirestoreQueryConstraintFunctionsDriver(config: MakeFirestoreQueryConstraintFunctionsDriver): FirestoreQueryConstraintFunctionsDriver;