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 CHANGED
@@ -800,7 +800,7 @@ type QueryOrderBy<T> = {
800
800
  };
801
801
  type QueryWhere<T> = {
802
802
  field: keyof T | "modified";
803
- operation: "==" | "!=" | ">" | "<" | ">=" | "<=" | "in" | "array-contains" | "between";
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.map((w) => {
4718
- const value = w.operation === "between" ? `${w.value.from}|${w.value.to}` : String(w.value);
4719
- return `${String(w.field)}:${String(w.operation)}:${value}`;
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(