Filter operators
Date, geo, and other operators without helpers
The DSL has no helper functions for the date operators (after, before, inLast), the geo operators (geoRadius, geoBoundingBox, geoPolygon), or doesNotBeginWith and doesNotEndWith. The Layers API still supports them. To use one, pass a plain filter group object as filterGroup. The SDK sends it to the API unchanged:
Filter types
The DSL producesFilterGroup and FilterExpression objects. You typically do not construct these manually, but the types are exported if you need to build filters programmatically:
filter() function wraps a single expression in a FilterGroup automatically, so you can pass either an expression or a group:
Runtime facet discovery
In v3, available facets and their counts are fetched at runtime usingsdk.facets(). sdk.facets() replaces the facets array that was passed to createClient() in v2.
filterGroup the shopper has selected:
Filter shorthand
If a single expression is all you need, pass it directly tofilter(). It is equivalent to and(...) for one expression.