import { ResultItem } from "../../types/result-types"; import { ConditionalConfig, ConditionalProjectionMap, ExtractConditionalProjectionResults } from "./conditional-types"; declare module "../../groq-builder" { interface GroqBuilderSubquery { /** * Creates an inline conditional projection. * * The Condition strings are NOT strongly-typed. You can put any valid GROQ statement into these keys. See `conditionalByType` for a strongly-typed option. * * @example * q.star.filterByType("product").project(sub => ({ * name: z.string(), * ...sub.conditional({ * "price == msrp": { * onSale: q.value(false), * }, * "price < msrp": { * onSale: q.value(true), * price: z.number(), * msrp: z.number(), * }, * }), * })) */ conditional, TQueryConfig>, TKey extends string = typeof DEFAULT_KEY, TIsExhaustive extends boolean = false>(conditionalProjections: TConditionalProjections, config?: Partial>): ExtractConditionalProjectionResults, TQueryConfig, TConditionalProjections, ConditionalConfig>; } } declare const DEFAULT_KEY: "[KEY]"; export {};