@scalemule/sdk 0.0.12 → 0.0.13

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.js CHANGED
@@ -3267,8 +3267,14 @@ var DataService = class extends ServiceModule {
3267
3267
  // Documents — Query & Aggregate
3268
3268
  // --------------------------------------------------------------------------
3269
3269
  async query(collection, options, requestOptions) {
3270
+ const filters = (options?.filters ?? []).map((f) => {
3271
+ if (f.operator === "in" && !f.values && f.value != null) {
3272
+ return { operator: f.operator, field: f.field, values: Array.isArray(f.value) ? f.value : [f.value] };
3273
+ }
3274
+ return f;
3275
+ });
3270
3276
  const body = {
3271
- filters: options?.filters ?? [],
3277
+ filters,
3272
3278
  sort: options?.sort ?? [],
3273
3279
  page: options?.page ?? 1,
3274
3280
  per_page: options?.perPage ?? 20
package/dist/index.mjs CHANGED
@@ -2913,8 +2913,14 @@ var DataService = class extends ServiceModule {
2913
2913
  // Documents — Query & Aggregate
2914
2914
  // --------------------------------------------------------------------------
2915
2915
  async query(collection, options, requestOptions) {
2916
+ const filters = (options?.filters ?? []).map((f) => {
2917
+ if (f.operator === "in" && !f.values && f.value != null) {
2918
+ return { operator: f.operator, field: f.field, values: Array.isArray(f.value) ? f.value : [f.value] };
2919
+ }
2920
+ return f;
2921
+ });
2916
2922
  const body = {
2917
- filters: options?.filters ?? [],
2923
+ filters,
2918
2924
  sort: options?.sort ?? [],
2919
2925
  page: options?.page ?? 1,
2920
2926
  per_page: options?.perPage ?? 20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/sdk",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Official TypeScript/JavaScript SDK for ScaleMule Backend-as-a-Service",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",