/** * Per-entity filter+sort allowlist generated by codegen-ts from @filterable/@sortable * metadata. Validates incoming HTTP filter params at the route boundary so the * Drizzle query layer never sees an unwhitelisted (field, op) combination. */ import { FILTER_OPS, OPS_BY_SUBTYPE, opsForSubType, type FilterOp } from "@metaobjectsdev/metadata"; export { FILTER_OPS, OPS_BY_SUBTYPE, opsForSubType, type FilterOp }; export type FilterSubType = "string" | "number" | "boolean" | "datetime"; export interface FilterFieldRule { readonly ops: readonly FilterOp[]; readonly subType: FilterSubType; readonly leadingWildcard: boolean; /** * `subType: "datetime"` only. Set by codegen when the column was emitted under * `timestampMode: "date"`, i.e. the Drizzle column binds a JS `Date` rather than an * ISO string. The filter parser then coerces the query-string value with `new Date(...)` * instead of passing the raw string through — binding a string to a Date-typed column * throws `value.toISOString is not a function` at request time. * * Optional and defaulting to false, so an allowlist generated before this existed keeps * its exact previous behavior. `field.date` / `field.time` never set it: Drizzle types * both as strings under every dialect, so they are not governed by `timestampMode`. */ readonly dateValues?: boolean; } export type FilterAllowlist = Readonly>; export interface SortFieldRule { readonly defaultOrder?: "asc" | "desc"; } export type SortAllowlist = Readonly>; //# sourceMappingURL=filter-allowlist.d.ts.map