shred-api-client 2.4.7 → 2.4.9

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,8 +800,11 @@ type QueryOrderBy<T> = {
800
800
  };
801
801
  type QueryWhere<T> = {
802
802
  field: keyof T | "modified";
803
- operation: "==" | "!=" | ">" | "<" | ">=" | "<=" | "in" | "array-contains";
804
- value: T[keyof T] | T[keyof T][];
803
+ operation: "==" | "!=" | ">" | "<" | ">=" | "<=" | "in" | "array-contains" | "between";
804
+ value: T[keyof T] | T[keyof T][] | {
805
+ from: number;
806
+ to: number;
807
+ };
805
808
  };
806
809
  type QueryOptions<T> = {
807
810
  perPage?: number;
@@ -2984,4 +2987,4 @@ declare namespace index {
2984
2987
  export { index_AssetSchema as AssetSchema, type Asset as Entity };
2985
2988
  }
2986
2989
 
2987
- export { index as Asset, index$a as Core, index$6 as Email, index$1 as Exceptions, index$4 as Goal, index$2 as Note, index$3 as Notification, index$5 as Project, index$c as Prompt, index$b as Subscription, index$8 as Tenant, index$7 as Track, index$9 as User, ShredAPI as default };
2990
+ export { index as Asset, index$a as Core, index$6 as Email, index$1 as Exceptions, index$4 as Goal, index$2 as Note, index$3 as Notification, index$5 as Project, index$c as Prompt, ShredAPI, index$b as Subscription, index$8 as Tenant, index$7 as Track, index$9 as User, ShredAPI as default };
package/dist/index.js CHANGED
@@ -39,6 +39,7 @@ __export(index_exports, {
39
39
  Notification: () => notification_exports,
40
40
  Project: () => project_exports,
41
41
  Prompt: () => prompt_exports,
42
+ ShredAPI: () => ShredAPI,
42
43
  Subscription: () => subscription_exports,
43
44
  Tenant: () => tenant_exports,
44
45
  Track: () => track_exports,
@@ -4713,9 +4714,10 @@ var buildQueryString = (query) => {
4713
4714
  ];
4714
4715
  }
4715
4716
  if (query.wheres && query.wheres.length > 0) {
4716
- params["wheres"] = query.wheres.map(
4717
- (w) => `${String(w.field)}:${String(w.operation)}:${String(w.value)}`
4718
- );
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}`;
4720
+ });
4719
4721
  }
4720
4722
  const queryString = Object.entries(params).flatMap(
4721
4723
  ([key, values]) => values.map((value) => `${key}=${encodeURIComponent(value)}`)