import { Parser } from "../types/parser-types"; declare module "../groq-builder" { interface GroqBuilderBase { /** * This is an "escape hatch" allowing you to write any groq query you want. * * To ensure the correct result type, * you must either provide a validation function, * or specify the type parameter manually. * * This should only be used for unsupported features, * since it ignores the schema. * * @example * q.star.filterByType("user").project({ * name: q.raw('firstName + " " + lastName', z.string()), * tags: q.raw('array::join(tags, ", ")'), * }) * * @param query - This raw GROQ query gets appended to the current query * @param parser - A function that validates the incoming data. * Use "passthrough" to indicate that it's OK for * the previous parser to be used with this new data * (i.e. the raw query doesn't change the result type). */ raw(query: string, parser?: Parser | null): GroqBuilder; raw(query: string, parser: "passthrough"): GroqBuilder; } }