import type { QueryConfig } from "../types/query-config"; import type { ResultItem } from "../types/result-types"; import { ParserFunction } from "../types/parser-types"; export declare const GroqBuilderResultType: unique symbol; export declare const GroqBuilderConfigType: unique symbol; /** * IGroqBuilder contains the minimum results of a GroqBuilder chain, * used to prevent circular references */ export type IGroqBuilder = { /** * Used to infer the TResult types of a GroqBuilder. * This symbol is not used at runtime. * @internal */ readonly [GroqBuilderResultType]: TResult; /** * Used to infer the TQueryConfig types of a GroqBuilder. * This symbol is not used at runtime * @internal */ readonly [GroqBuilderConfigType]: TQueryConfig; /** * The GROQ query as a string */ readonly query: string; /** * The parser function that should be used to parse result data */ readonly parser: ParserFunction | null; /** * Parses and validates the query results, passing all data through the parsers. */ readonly parse: ParserFunction; }; export declare function isGroqBuilder(fieldConfig: unknown): fieldConfig is IGroqBuilder; /** * Represents a GroqBuilder chain that is "terminal", * and should not be further chained. */ export type IGroqBuilderNotChainable = IGroqBuilder; /** * Extracts the Result type from a GroqBuilder query */ export type InferResultType> = TGroqBuilder extends IGroqBuilder ? TResultType : never; /** * Extracts the Result type for a single item from a GroqBuilder query */ export type InferResultItem> = ResultItem.Infer>; export type InferQueryConfig> = TGroqBuilder extends IGroqBuilder ? TQueryConfig : never;