@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 +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +1 -1
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
|
|
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
|
|
2923
|
+
filters,
|
|
2918
2924
|
sort: options?.sort ?? [],
|
|
2919
2925
|
page: options?.page ?? 1,
|
|
2920
2926
|
per_page: options?.perPage ?? 20
|