/** * URL search-parameter parsers for `AttributeFilter` shapes. * * Both the `weft.workflows.list` REST binding (`extractInput` in * `operations/list-workflows.ts`) and any future endpoint that * accepts `attr.{name}=...` query parameters share these helpers. * * Single source of truth: a fix here lands in every caller without * the drift hazard of duplicated parsing logic across operations. * * @module server/attribute-filters */ import type { AttributeFilterScalarValue } from '../core/types.ts'; type ParsedAttributeFilter = { key: string; value?: AttributeFilterScalarValue | AttributeFilterScalarValue[] | undefined; gt?: AttributeFilterScalarValue | undefined; lt?: AttributeFilterScalarValue | undefined; gte?: AttributeFilterScalarValue | undefined; lte?: AttributeFilterScalarValue | undefined; }; /** * Parse `attr.{name}={value}`, `attr.{name}.gt={value}`, * `attr.{name}.lt={value}`, `attr.{name}.gte={value}`, and * `attr.{name}.lte={value}` query parameters into a list of * `AttributeFilter` records. Each filter aggregates exact-match * and range constraints for one attribute key. * * Unknown operators after the second dot (e.g. * `attr.foo.bogus={value}`) are silently skipped — the alternative * (a 400) would let any client typo escalate into an unconstrained * range scan, which is worse than the typo being ignored. */ export declare function parseAttributeFilters(params: URLSearchParams): ParsedAttributeFilter[]; /** * Infer a typed `SearchAttributeValue` from its URL-decoded string. * Booleans and numbers parse first, otherwise the raw string is * preserved. The empty string stays a string (it would otherwise * coerce to `0` via `Number('')`). */ export declare function inferAttributeValue(raw: string): AttributeFilterScalarValue; export {};