c2-mongoose 2.1.29 → 2.1.31

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.
@@ -240,7 +240,7 @@ var SearchFlow = /** @class */ (function () {
240
240
  var key = _a[0], value = _a[1];
241
241
  if ((0, Utils_1.isNotEmpty)(value)) {
242
242
  var condition = {};
243
- if (['order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
243
+ if (['pageable', 'order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
244
244
  return;
245
245
  }
246
246
  if (key.endsWith('DateRange') || key.endsWith('DateTimeRange')) {
@@ -278,9 +278,6 @@ var SearchFlow = /** @class */ (function () {
278
278
  }
279
279
  }
280
280
  });
281
- // if (isNotEmpty(objectSearch.model)) {
282
- // this.addFilterModel(objectSearch.model, filters)
283
- // }
284
281
  if (filters.$and.length === 0)
285
282
  delete filters['$and'];
286
283
  return filters;
@@ -294,7 +291,7 @@ var SearchFlow = /** @class */ (function () {
294
291
  if (key.endsWith('Like')) {
295
292
  return;
296
293
  }
297
- if (['order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
294
+ if (['pageable', 'order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
298
295
  return;
299
296
  }
300
297
  if ((0, Utils_1.isNotEmpty)(value)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.29",
3
+ "version": "2.1.31",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -157,7 +157,7 @@ abstract class SearchFlow {
157
157
  Object.entries(objectSearch.model).forEach(([key, value]) => {
158
158
  if (isNotEmpty(value)) {
159
159
  let condition = {} as any
160
- if (['order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
160
+ if (['pageable', 'order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
161
161
  return
162
162
  }
163
163
 
@@ -201,11 +201,6 @@ abstract class SearchFlow {
201
201
  }
202
202
  })
203
203
 
204
-
205
- // if (isNotEmpty(objectSearch.model)) {
206
- // this.addFilterModel(objectSearch.model, filters)
207
- // }
208
-
209
204
  if (filters.$and.length === 0)
210
205
  delete filters['$and']
211
206
 
@@ -220,7 +215,7 @@ abstract class SearchFlow {
220
215
  if (key.endsWith('Like')) {
221
216
  return
222
217
  }
223
- if (['order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
218
+ if (['pageable', 'order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
224
219
  return
225
220
  }
226
221
  if (isNotEmpty(value)) {