import { $ as ValueProcessorOptions, An as SetRequired, Bt as RuleGroupTypeAny, D as ExportFormat, F as NLTranslations, I as ParameterizedNamedSQL, J as RuleProcessor, L as ParameterizedSQL, N as GroupVariantCondition, O as ExportObjectFormats, P as NLTranslationKey, Q as ValueProcessorLegacy, R as RQBJsonLogic, T as DiagnosticsResult, Y as SQLPreset, Z as ValueProcessorByRule, j as FormatQueryOptions, k as ExportOperatorMap, q as RuleGroupProcessor, rn as RuleType, x as ConstituentWordOrder } from "./index-DOIE2pwx.mjs"; //#region src/utils/formatQuery/defaultRuleProcessorCEL.d.ts /** * Default rule processor used by {@link formatQuery} for "cel" format. * * @group Export */ declare const defaultRuleProcessorCEL: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorMongoDB.d.ts /** * Default rule processor used by {@link formatQuery} for "mongodb" format. * * Note that the "mongodb" format is deprecated in favor of the "mongodb_query" format. * * @group Export */ declare const defaultRuleProcessorMongoDB: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorSpEL.d.ts /** * Default rule processor used by {@link formatQuery} for "spel" format. * * @group Export */ declare const defaultRuleProcessorSpEL: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultValueProcessorByRule.d.ts /** * Default value processor used by {@link formatQuery} for "sql" format. * * @group Export */ declare const defaultValueProcessorByRule: ValueProcessorByRule; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorCEL.d.ts /** * Rule group processor used by {@link formatQuery} for "cel" format. * * @group Export */ declare const defaultRuleGroupProcessorCEL: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorCypher.d.ts /** * Maps a {@link DefaultCombinatorName} to a Cypher combinator keyword. * * @group Export */ declare const cypherCombinatorMap: { and: "AND"; or: "OR"; }; /** * Rule group processor used by {@link formatQuery} for "cypher" and "gql" formats. * * @group Export */ declare const defaultRuleGroupProcessorCypher: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorDrizzle.d.ts /** * Minimal structural shape of Drizzle's `Operators` object. Declared locally so the public type * surface of this package never references `drizzle-orm`, which is an optional peer dependency. * (Referencing it would force consumers to install it to typecheck without `skipLibCheck`.) * * @group Export */ interface DrizzleOperatorsLike { and: (...conditions: any[]) => any; or: (...conditions: any[]) => any; not: (...conditions: any[]) => any; } /** * Return type of {@link defaultRuleGroupProcessorDrizzle}—the function assignable to the `where` * property in the Drizzle relational queries API. The Drizzle `SQL` result type is inferred from * the caller's own operators object, so it stays exact without importing `drizzle-orm` here. * * @group Export */ type DrizzleWhereCallback = (columns: object, drizzleOperators: Ops) => ReturnType; /** * Default rule group processor used by {@link formatQuery} for the "drizzle" format. The returned * function can be assigned to the `where` property in the Drizzle relational queries API. * * @example * const where = formatQuery(query, 'drizzle'); * const results = db.query.users.findMany({ where }); * * @returns Function that takes a Drizzle table config and an object of Drizzle operators. * * @group Export */ declare const defaultRuleGroupProcessorDrizzle: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorElasticSearch.d.ts /** * Rule group processor used by {@link formatQuery} for "elasticsearch" format. * * @group Export */ declare const defaultRuleGroupProcessorElasticSearch: RuleGroupProcessor>; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorGremlin.d.ts /** * Rule group processor used by {@link formatQuery} for "gremlin" format. * * At the top level, filter rules produce chained `.has()` steps (implicit AND). * Nested groups use `.and()` / `.or()` / `.not()` compound traversals with * `__` anonymous traversal prefixes. * * @group Export */ declare const defaultRuleGroupProcessorGremlin: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorJSONata.d.ts /** * Rule group processor used by {@link formatQuery} for "jsonata" format. * * @group Export */ declare const defaultRuleGroupProcessorJSONata: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorJsonLogic.d.ts /** * Rule group processor used by {@link formatQuery} for "jsonlogic" format. * * @group Export */ declare const defaultRuleGroupProcessorJsonLogic: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorLDAP.d.ts /** * Rule group processor used by {@link formatQuery} for "ldap" format. * * @group Export */ declare const defaultRuleGroupProcessorLDAP: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorMongoDB.d.ts /** * Rule group processor used by {@link formatQuery} for "mongodb" format. * * Note that the "mongodb" format is deprecated in favor of the "mongodb_query" format. * * @group Export */ declare const defaultRuleGroupProcessorMongoDB: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorMongoDBQuery.d.ts /** * Default fallback object used by {@link formatQuery} for "mongodb_query" format. * * @group Export */ declare const mongoDbFallback: { readonly $and: readonly [{ readonly $expr: true; }]; }; /** * Rule group processor used by {@link formatQuery} for "mongodb_query" format. * * @group Export */ declare const defaultRuleGroupProcessorMongoDBQuery: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorNL.d.ts /** * Rule group processor used by {@link formatQuery} for "natural_language" format. * * @group Export */ declare const defaultRuleGroupProcessorNL: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorParameterized.d.ts /** * Rule group processor used by {@link formatQuery} for "parameterized" and * "parameterized_named" formats. * * @group Export */ declare const defaultRuleGroupProcessorParameterized: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorPrisma.d.ts /** * Default fallback object used by {@link formatQuery} for "prisma" format. * * @group Export */ declare const prismaFallback: {}; /** * Rule group processor used by {@link formatQuery} for "prisma" format. * * @group Export */ declare const defaultRuleGroupProcessorPrisma: RuleGroupProcessor | undefined>; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorSequelize.d.ts /** * Structural stand-in for Sequelize's `WhereOptions`. Declared locally so the public type surface * of this package never references `sequelize`, which is an optional peer dependency. * (Referencing it would force consumers to install it to typecheck without `skipLibCheck`.) * Assignable to `WhereOptions` at the call site, e.g. `Model.findAll({ where })`. * * @group Export */ interface SequelizeWhereOptionsLike { [key: string | symbol]: unknown; } /** * Rule group processor used by {@link formatQuery} for "sequelize" format. * * @group Export */ declare const defaultRuleGroupProcessorSequelize: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorSPARQL.d.ts /** * Rule group processor used by {@link formatQuery} for "sparql" format. * * SPARQL uses the same combinators as CEL (`&&` / `||`) and `!()` for negation. * * @group Export */ declare const defaultRuleGroupProcessorSPARQL: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorSpEL.d.ts /** * Default rule processor used by {@link formatQuery} for "spel" format. * * @group Export */ declare const defaultRuleGroupProcessorSpEL: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorSQL.d.ts /** * Default rule processor used by {@link formatQuery} for "sql" format. * * @group Export */ declare const defaultRuleGroupProcessorSQL: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/tanStackDbTypes.d.ts /** * Return type of the TanStack DB where-callback. Intentionally `unknown`: TanStack DB's own * `WhereCallback` returns `any`, so a precise type constrains nothing at the call site, and * naming `@tanstack/db` here would drag an optional peer dependency into the published types. */ type TanStackDbWhereCallbackReturnType = unknown; type TanStackDbWhereCallback = (refs: Record) => TanStackDbWhereCallbackReturnType; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorTanStackDB.d.ts /** * Default rule group processor used by {@link formatQuery} for the "tanstack_db" format. * Returns a `WhereCallback` suitable for TanStack DB's `.where()` method. * * @example * const where = formatQuery(query, { format: 'tanstack_db', context: { tanstackDb: tsdb } }); * const results = useLiveQuery(q => q.from({ todo: todosCollection }).where(where)); * * @group Export */ declare const defaultRuleGroupProcessorTanStackDB: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleGroupProcessorDiagnostics.d.ts /** * Rule group processor used by {@link formatQuery} for "diagnostics" format. * * Produces a {@link DiagnosticsResult} containing an annotated copy of the query * tree (`query`) with `valid`, `reasons`, `path`, and `level` properties on every * rule and group; a flat `diagnostics` array; aggregate `stats`; and a per-field * `fieldSummary`. * * @group Export */ declare const defaultRuleGroupProcessorDiagnostics: RuleGroupProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorCypher.d.ts /** * Default rule processor used by {@link formatQuery} for "cypher" and "gql" formats. * * @group Export */ declare const defaultRuleProcessorCypher: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorDrizzle.d.ts /** * Default rule processor used by {@link formatQuery} for the "drizzle" format. * * @group Export */ declare const defaultRuleProcessorDrizzle: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorElasticSearch.d.ts /** * Default rule processor used by {@link formatQuery} for "elasticsearch" format. * * @group Export */ declare const defaultRuleProcessorElasticSearch: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorGremlin.d.ts /** * Default rule processor used by {@link formatQuery} for "gremlin" format. * * Each rule becomes a `.has()` step (or `.hasNot()`/`.has()` for null checks). * * @group Export */ declare const defaultRuleProcessorGremlin: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorJSONata.d.ts /** * Default rule processor used by {@link formatQuery} for "jsonata" format. * * @group Export */ declare const defaultRuleProcessorJSONata: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorJsonLogic.d.ts /** * Default rule processor used by {@link formatQuery} for "jsonlogic" format. * * @group Export */ declare const defaultRuleProcessorJsonLogic: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorLDAP.d.ts /** * Default rule processor used by {@link formatQuery} for "ldap" format. * * @group Export */ declare const defaultRuleProcessorLDAP: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorMongoDBQuery.d.ts /** * Default rule processor used by {@link formatQuery} for "mongodb_query" format. * * @group Export */ declare const defaultRuleProcessorMongoDBQuery: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorNL.d.ts /** * Default operator map used by {@link formatQuery} for "natural_language" format. * * @group Export */ declare const defaultExportOperatorMap: ExportOperatorMap; /** * Default operator processor used by {@link formatQuery} for "natural_language" format. * * @group Export */ declare const defaultOperatorProcessorNL: RuleProcessor; /** * Default rule processor used by {@link formatQuery} for "natural_language" format. * * @group Export */ declare const defaultRuleProcessorNL: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorParameterized.d.ts /** * Default rule processor used by {@link formatQuery} for "parameterized" and * "parameterized_named" formats. * * @group Export */ declare const defaultRuleProcessorParameterized: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorPrisma.d.ts /** * Default rule processor used by {@link formatQuery} for "prisma" format. * * @group Export */ declare const defaultRuleProcessorPrisma: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorSequelize.d.ts /** * Default rule processor used by {@link formatQuery} for the "sequelize" format. * * @group Export */ declare const defaultRuleProcessorSequelize: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorSPARQL.d.ts /** Auto-prefix a SPARQL variable name with `?` unless it's already prefixed, a URI, or a prefixed name. * * @group Export */ declare const sparqlVar: (name: string) => string; /** * Default rule processor used by {@link formatQuery} for "sparql" format. * * @group Export */ declare const defaultRuleProcessorSPARQL: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorSQL.d.ts /** * Default operator processor used by {@link formatQuery} for "sql" and "parameterized*" formats. * * @group Export */ declare const defaultOperatorProcessorSQL: RuleProcessor; /** * Default rule processor used by {@link formatQuery} for "sql" format. * * @group Export */ declare const defaultRuleProcessorSQL: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultRuleProcessorTanStackDB.d.ts /** * Default rule processor used by {@link formatQuery} for the "tanstack_db" format. * * @group Export */ declare const defaultRuleProcessorTanStackDB: RuleProcessor; //#endregion //#region src/utils/formatQuery/defaultValueProcessorNL.d.ts /** * Default value processor used by {@link formatQuery} for "natural_language" format. * * @group Export */ declare const defaultValueProcessorNL: ValueProcessorByRule; //#endregion //#region src/utils/formatQuery/formatQuery.d.ts /** * A collection of option presets for {@link formatQuery}, specifically for SQL-based formats. * * @group Export */ declare const sqlDialectPresets: Record; /** * A collection of option presets for {@link formatQuery}. * * @group Export */ declare const formatQueryOptionPresets: Record; /** * Generates a formatted (indented two spaces) JSON string from a query object. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny): string; /** * Generates a result based on the provided rule group processor. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: FormatQueryOptions & { ruleGroupProcessor: RuleGroupProcessor; }): TResult; /** * Generates a {@link index!ParameterizedSQL ParameterizedSQL} object from a query object. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "parameterized" | (FormatQueryOptions & { format: "parameterized"; })): ParameterizedSQL; /** * Generates a {@link index!ParameterizedNamedSQL ParameterizedNamedSQL} object from a query object. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "parameterized_named" | (FormatQueryOptions & { format: "parameterized_named"; })): ParameterizedNamedSQL; /** * Generates a {@link index!RQBJsonLogic JsonLogic} object from a query object. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "jsonlogic" | (FormatQueryOptions & { format: "jsonlogic"; })): RQBJsonLogic; /** * Generates an ElasticSearch query object from an RQB query object. * * NOTE: Support for the ElasticSearch format is experimental. * You may have better results exporting "sql" format then using * [ElasticSearch SQL](https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html). * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "elasticsearch" | (FormatQueryOptions & { format: "elasticsearch"; })): Record; /** * Generates a MongoDB query object from an RQB query object. * * This is equivalent to the "mongodb" format, but returns a JSON object * instead of a string. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "mongodb_query" | (FormatQueryOptions & { format: "mongodb_query"; })): Record; /** * Generates a JSON.stringify'd MongoDB query object from an RQB query object. * * This is equivalent to the "mongodb_query" format, but returns a string * instead of a JSON object. * * @deprecated Use the "mongodb_query" format for greater flexibility. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "mongodb" | (FormatQueryOptions & { format: "mongodb"; })): string; /** * Generates a Prisma ORM query object from an RQB query object. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "prisma" | (FormatQueryOptions & { format: "prisma"; })): Record; /** * Generates a Drizzle ORM query function from an RQB query object. The function can * be assigned to the `where` property in the Drizzle relational queries API. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "drizzle" | (FormatQueryOptions & { format: "drizzle"; })): ReturnType; /** * Generates a TanStack DB WhereCallback from an RQB query object. The callback can * be passed directly to TanStack DB's `.where()` method. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "tanstack_db" | (FormatQueryOptions & { format: "tanstack_db"; })): ReturnType; /** * be assigned to the `where` property in the Sequelize query functions. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "sequelize" | (FormatQueryOptions & { format: "sequelize"; })): ReturnType; /** * Generates a JSONata query string from an RQB query object. * * NOTE: Either `parseNumbers: "strict-limited"` or `parseNumbers: true` * are recommended for this format. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "jsonata" | (FormatQueryOptions & { format: "jsonata"; })): string; /** * Generates an LDAP query string from an RQB query object. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "ldap" | (FormatQueryOptions & { format: "ldap"; })): string; /** * Generates a {@link DiagnosticsResult} from a query object, containing an annotated * query tree, a flat diagnostics array, aggregate stats, and a per-field summary. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "diagnostics" | (FormatQueryOptions & { format: "diagnostics"; })): DiagnosticsResult; /** * Generates a formatted (indented two spaces) JSON string from a query object. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: FormatQueryOptions): string; /** * Generates a query string in the requested format. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: Exclude): string; /** * Generates a query string in the requested format. * * @group Export */ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: FormatQueryOptions & { format: Exclude; }): string; //#endregion //#region src/utils/formatQuery/utils.d.ts /** * Maps a {@link DefaultOperatorName} to a SQL operator. * * @group Export */ declare const mapSQLOperator: (rqbOperator: string) => string; /** * Returns a preset-aware SQL string-concatenation function. Emits `CONCAT(a, b, ...)` when * `concatOperator` is `"CONCAT"` (case-insensitive), otherwise joins with the infix operator * (e.g. `a || b`, `a + b`). * * @group Export */ declare const getSQLConcat: (concatOperator?: string) => (...values: string[]) => string; /** * Returns the `[prefix, suffix]` `LIKE` wildcards for a string-match operator (e.g. `contains` * → `['%', '%']`, `beginsWith` → `['', '%']`, `endsWith` → `['%', '']`). Unknown operators * yield `['', '']`. * * @group Export */ declare const getLikeWildcards: (operatorLC: string) => [string, string]; /** * Wraps an already-serialized SQL fragment (a quoted field name or an expression) with the * `LIKE` wildcards for the given (lowercase) string-match operator, concatenating the literal * `%` markers via the preset-aware {@link getSQLConcat}. Returns the fragment untouched for * operators without wildcards. * * @group Export */ declare const wrapLikeFragment: (fragment: string, operatorLC: string, { concatOperator, quoteValuesWith, wrapValueWith }?: { concatOperator?: string; quoteValuesWith?: string; wrapValueWith?: [string, string]; }) => string; /** * Maps a (lowercase) {@link DefaultOperatorName} to a MongoDB operator. * * @group Export */ declare const mongoOperators: { "=": string; "!=": string; "<": string; "<=": string; ">": string; ">=": string; in: string; notin: string; notIn: string; }; /** * Maps a (lowercase) {@link DefaultOperatorName} to a Prisma ORM operator. * * @group Export */ declare const prismaOperators: { "=": string; "!=": string; "<": string; "<=": string; ">": string; ">=": string; in: string; notin: string; }; /** * Maps a {@link DefaultCombinatorName} to a CEL combinator. * * @group Export */ declare const celCombinatorMap: { and: "&&"; or: "||"; }; /** * Register these operators with `jsonLogic` before applying the result * of `formatQuery(query, 'jsonlogic')`. * * @example * ``` * for (const [op, func] of Object.entries(jsonLogicAdditionalOperators)) { * jsonLogic.add_operation(op, func); * } * jsonLogic.apply({ "startsWith": [{ "var": "firstName" }, "Stev"] }, data); * ``` * * @group Export */ declare const jsonLogicAdditionalOperators: Record<"startsWith" | "endsWith", (a: string, b: string) => boolean>; /** * Returns a new query object with all `string`-type `value` properties converted * to `number` where appropriate. * * Used by {@link formatQuery} for the `json*` formats when `parseNumbers` is `true`. * * @group Export */ declare const numerifyValues: (rg: RuleGroupTypeAny, options: SetRequired) => RuleGroupTypeAny; /** * Determines whether a value is _anything_ except an empty `string` or `NaN`. * * @group Export */ declare const isValidValue: (value: unknown) => boolean; /** * Determines whether {@link formatQuery} should render the given value as a number. * As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and * `string` values will return `true` if they test positive against {@link numericRegex}. * * @group Export */ declare const shouldRenderAsNumber: (value: unknown, parseNumbers?: boolean) => boolean; /** * Used by {@link formatQuery} to determine whether the given value processor is a * "legacy" value processor by counting the number of arguments. Legacy value * processors take 3 arguments (not counting any arguments with default values), while * rule-based value processors take no more than 2 arguments. * * @group Export */ declare const isValueProcessorLegacy: (valueProcessor: ValueProcessorLegacy | ValueProcessorByRule) => valueProcessor is ValueProcessorLegacy; /** * Converts the `quoteFieldNamesWith` option into an array of two strings. * If the option is a string, the array elements are both that string. * * @default * ['', ''] * * @group Export */ declare const getQuoteFieldNamesWithArray: (quoteFieldNamesWith?: null | string | [string, string]) => [string, string]; /** * Given a field name and relevant {@link ValueProcessorOptions}, returns the field name * wrapped in the configured quote character(s). * * @group Export */ declare const getQuotedFieldName: (fieldName: string, { quoteFieldNamesWith, fieldIdentifierSeparator }: ValueProcessorOptions) => string; /** * Given a [Constituent word order](https://en.wikipedia.org/wiki/Word_order#Constituent_word_orders) * like "svo" or "sov", returns a permutation of `["S", "V", "O"]` based on the first occurrence of * each letter in the input string (case insensitive). This widens the valid input from abbreviations * like "svo" to more expressive strings like "subject-verb-object" or "sub ver obj". Any missing * letters are appended in the default order "SVO" (e.g., "object" would yield `["O", "S", "V"]`). * * @group Export */ declare const normalizeConstituentWordOrder: (input: string) => ConstituentWordOrder; /** * Prefixes a named-parameter value with the given `paramPrefix` unless the value already * begins with it. Used by {@link formatQuery} to render rules whose `valueSource` is * `"parameter"` (e.g. `"p1"` with prefix `":"` → `":p1"`; `":p1"` → `":p1"`). * * @group Export */ declare const withParamPrefix: (value: unknown, paramPrefix?: string) => string; /** * Strips a leading `paramPrefix` from a named-parameter value if present. Inverse of * {@link withParamPrefix}; used to normalize parameter names for validation/lookup. * * @group Export */ declare const stripParamPrefix: (value: unknown, paramPrefix?: string) => string; /** * Default translations used by {@link formatQuery} for "natural_language" format. * * @group Export */ declare const defaultNLTranslations: NLTranslations; /** * Used by {@link formatQuery} to get a translation based on certain conditions * for the "natural_language" format. * * @group Export */ declare const getNLTranslataion: (key: NLTranslationKey, translations: NLTranslations, conditions?: GroupVariantCondition[]) => string; type ProcessedMatchMode = { mode: "all"; threshold?: number | null | undefined; } | { mode: "none"; threshold?: number | null | undefined; } | { mode: "some"; threshold?: number | null | undefined; } | { mode: "atleast"; threshold: number; } | { mode: "atmost"; threshold: number; } | { mode: "exactly"; threshold: number; }; /** * Transforms * - `match: { mode: "atLeast", threshold: 1 }` to `match: { mode: "some" }` * - `match: { mode: "atMost", threshold: 0 }` to `match: { mode: "none" }`. * * Returns: * - Processed `{ mode, threshold }` object for valid subqueries * - `null` if match mode is not applicable for the rule * - `false` if match mode is valid, but either * 1. `threshold` is required and invalid, or * 2. `value` is not a valid rule group. */ declare const processMatchMode: (rule: RuleType) => null | false | ProcessedMatchMode; /** * Base alias assigned to the element binding of a subquery generated for a rule's * {@link MatchMode `match` mode} (e.g. `unnest(field) as elem_alias`). */ declare const subqueryElementAliasBase = "elem_alias"; /** * Returns the element alias for a subquery at the given nesting depth. Depth 0 (the common, * non-nested case) uses {@link subqueryElementAliasBase} unchanged; deeper levels are suffixed * with the depth, so a subquery nested within a subquery cannot shadow its parent's binding. * * Deterministic by depth rather than randomized, so output remains stable and snapshot-friendly. * * @group Export */ declare const getSubqueryElementAlias: (subqueryDepth?: number) => string; /** * "Replacer" method for JSON.stringify's second argument. Converts `bigint` values to * objects with a `$bigint` property having a value of a string representation of * the actual `bigint`-type value. * * Inverse of {@link bigIntJsonParseReviver}. * * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json */ declare const bigIntJsonStringifyReplacer: (_key: string, value: unknown) => unknown; /** * "Reviver" method for JSON.parse's second argument. Converts objects having a single * `$bigint: string` property to an actual `bigint` value. * * Inverse of {@link bigIntJsonStringifyReplacer}. * * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json */ declare const bigIntJsonParseReviver: (_key: string, value: unknown) => unknown; //#endregion //#region src/utils/formatQuery/index.d.ts /** * Default value processor used by {@link formatQuery} for "sql" format. * * @deprecated Prefer {@link defaultValueProcessorByRule}. * * @group Export */ declare const defaultValueProcessor: ValueProcessorLegacy; /** * @deprecated Prefer {@link defaultRuleProcessorMongoDB}. * * @group Export */ declare const defaultMongoDBValueProcessor: ValueProcessorLegacy; /** * @deprecated Prefer {@link defaultRuleProcessorCEL}. * * @group Export */ declare const defaultCELValueProcessor: ValueProcessorLegacy; /** * @deprecated Prefer {@link defaultRuleProcessorSpEL}. * * @group Export */ declare const defaultSpELValueProcessor: ValueProcessorLegacy; /** * @deprecated Renamed to {@link defaultRuleProcessorCEL}. * * @group Export */ declare const defaultValueProcessorCELByRule: RuleProcessor; /** * @deprecated Renamed to {@link defaultRuleProcessorMongoDB}. * * @group Export */ declare const defaultValueProcessorMongoDBByRule: RuleProcessor; /** * @deprecated Renamed to {@link defaultRuleProcessorSpEL}. * * @group Export */ declare const defaultValueProcessorSpELByRule: RuleProcessor; //#endregion export { defaultRuleProcessorDrizzle as $, withParamPrefix as A, sparqlVar as B, normalizeConstituentWordOrder as C, cypherCombinatorMap as Ct, shouldRenderAsNumber as D, defaultRuleProcessorSpEL as Dt, processMatchMode as E, defaultValueProcessorByRule as Et, defaultValueProcessorNL as F, defaultOperatorProcessorNL as G, defaultRuleProcessorPrisma as H, defaultRuleProcessorTanStackDB as I, defaultRuleProcessorLDAP as J, defaultRuleProcessorNL as K, defaultOperatorProcessorSQL as L, formatQuery as M, formatQueryOptionPresets as N, stripParamPrefix as O, defaultRuleProcessorMongoDB as Ot, sqlDialectPresets as P, defaultRuleProcessorElasticSearch as Q, defaultRuleProcessorSQL as R, mongoOperators as S, defaultRuleGroupProcessorDrizzle as St, prismaOperators as T, defaultRuleGroupProcessorCEL as Tt, defaultRuleProcessorParameterized as U, defaultRuleProcessorSequelize as V, defaultExportOperatorMap as W, defaultRuleProcessorJSONata as X, defaultRuleProcessorJsonLogic as Y, defaultRuleProcessorGremlin as Z, getSubqueryElementAlias as _, defaultRuleGroupProcessorJSONata as _t, defaultValueProcessorCELByRule as a, defaultRuleGroupProcessorSPARQL as at, jsonLogicAdditionalOperators as b, DrizzleOperatorsLike as bt, bigIntJsonParseReviver as c, defaultRuleGroupProcessorPrisma as ct, defaultNLTranslations as d, defaultRuleGroupProcessorNL as dt, defaultRuleProcessorCypher as et, getLikeWildcards as f, defaultRuleGroupProcessorMongoDBQuery as ft, getSQLConcat as g, defaultRuleGroupProcessorJsonLogic as gt, getQuotedFieldName as h, defaultRuleGroupProcessorLDAP as ht, defaultValueProcessor as i, defaultRuleGroupProcessorSpEL as it, wrapLikeFragment as j, subqueryElementAliasBase as k, defaultRuleProcessorCEL as kt, bigIntJsonStringifyReplacer as l, prismaFallback as lt, getQuoteFieldNamesWithArray as m, defaultRuleGroupProcessorMongoDB as mt, defaultMongoDBValueProcessor as n, defaultRuleGroupProcessorTanStackDB as nt, defaultValueProcessorMongoDBByRule as o, SequelizeWhereOptionsLike as ot, getNLTranslataion as p, mongoDbFallback as pt, defaultRuleProcessorMongoDBQuery as q, defaultSpELValueProcessor as r, defaultRuleGroupProcessorSQL as rt, defaultValueProcessorSpELByRule as s, defaultRuleGroupProcessorSequelize as st, defaultCELValueProcessor as t, defaultRuleGroupProcessorDiagnostics as tt, celCombinatorMap as u, defaultRuleGroupProcessorParameterized as ut, isValidValue as v, defaultRuleGroupProcessorGremlin as vt, numerifyValues as w, defaultRuleGroupProcessorCypher as wt, mapSQLOperator as x, DrizzleWhereCallback as xt, isValueProcessorLegacy as y, defaultRuleGroupProcessorElasticSearch as yt, defaultRuleProcessorSPARQL as z }; //# sourceMappingURL=index-OF2Q1gTp.d.mts.map