@zenstackhq/server 3.3.0-beta.1 → 3.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.cjs CHANGED
@@ -244,6 +244,7 @@ var FilterOperations = [
244
244
  "lte",
245
245
  "gt",
246
246
  "gte",
247
+ "between",
247
248
  "contains",
248
249
  "icontains",
249
250
  "search",
@@ -1923,6 +1924,18 @@ ${err.stack}` : "Unknown error");
1923
1924
  }
1924
1925
  }
1925
1926
  } else {
1927
+ if (op === "between") {
1928
+ const parts = value.split(",").map((v) => this.coerce(fieldDef, v));
1929
+ if (parts.length !== 2) {
1930
+ throw new InvalidValueError(`"between" expects exactly 2 comma-separated values`);
1931
+ }
1932
+ return {
1933
+ between: [
1934
+ parts[0],
1935
+ parts[1]
1936
+ ]
1937
+ };
1938
+ }
1926
1939
  const coerced = this.coerce(fieldDef, value);
1927
1940
  switch (op) {
1928
1941
  case "icontains":