@zenstackhq/server 3.2.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 +13 -0
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +13 -0
- package/dist/api.js.map +1 -1
- package/package.json +7 -7
package/dist/api.js
CHANGED
|
@@ -209,6 +209,7 @@ var FilterOperations = [
|
|
|
209
209
|
"lte",
|
|
210
210
|
"gt",
|
|
211
211
|
"gte",
|
|
212
|
+
"between",
|
|
212
213
|
"contains",
|
|
213
214
|
"icontains",
|
|
214
215
|
"search",
|
|
@@ -1888,6 +1889,18 @@ ${err.stack}` : "Unknown error");
|
|
|
1888
1889
|
}
|
|
1889
1890
|
}
|
|
1890
1891
|
} else {
|
|
1892
|
+
if (op === "between") {
|
|
1893
|
+
const parts = value.split(",").map((v) => this.coerce(fieldDef, v));
|
|
1894
|
+
if (parts.length !== 2) {
|
|
1895
|
+
throw new InvalidValueError(`"between" expects exactly 2 comma-separated values`);
|
|
1896
|
+
}
|
|
1897
|
+
return {
|
|
1898
|
+
between: [
|
|
1899
|
+
parts[0],
|
|
1900
|
+
parts[1]
|
|
1901
|
+
]
|
|
1902
|
+
};
|
|
1903
|
+
}
|
|
1891
1904
|
const coerced = this.coerce(fieldDef, value);
|
|
1892
1905
|
switch (op) {
|
|
1893
1906
|
case "icontains":
|