shred-api-client 2.4.9 → 2.4.11
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/index.d.ts +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -800,7 +800,7 @@ type QueryOrderBy<T> = {
|
|
|
800
800
|
};
|
|
801
801
|
type QueryWhere<T> = {
|
|
802
802
|
field: keyof T | "modified";
|
|
803
|
-
operation:
|
|
803
|
+
operation: string;
|
|
804
804
|
value: T[keyof T] | T[keyof T][] | {
|
|
805
805
|
from: number;
|
|
806
806
|
to: number;
|
package/dist/index.js
CHANGED
|
@@ -4714,9 +4714,12 @@ var buildQueryString = (query) => {
|
|
|
4714
4714
|
];
|
|
4715
4715
|
}
|
|
4716
4716
|
if (query.wheres && query.wheres.length > 0) {
|
|
4717
|
-
params["wheres"] = query.wheres.
|
|
4718
|
-
|
|
4719
|
-
|
|
4717
|
+
params["wheres"] = query.wheres.flatMap((w) => {
|
|
4718
|
+
if (w.operation === "between") {
|
|
4719
|
+
const { from, to } = w.value;
|
|
4720
|
+
return [`${String(w.field)}:>=:${from}`, `${String(w.field)}:<=:${to}`];
|
|
4721
|
+
}
|
|
4722
|
+
return [`${String(w.field)}:${String(w.operation)}:${String(w.value)}`];
|
|
4720
4723
|
});
|
|
4721
4724
|
}
|
|
4722
4725
|
const queryString = Object.entries(params).flatMap(
|