c2-mongoose 2.1.180 → 2.1.181

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.
@@ -33,6 +33,5 @@ declare abstract class SearchFlow {
33
33
  sumByPaging(model: mongoose.Model<any>, fieldToSum: any, fieldToGroup: any, items?: any): Promise<SearchResponse<any>>;
34
34
  isValidObjectId(value: string): boolean;
35
35
  buildDefaultFilters(objectSearch: any): any;
36
- addFilterModel(model: any, filters: any): void;
37
36
  }
38
37
  export default SearchFlow;
@@ -523,25 +523,6 @@ var SearchFlow = /** @class */ (function () {
523
523
  delete filters['$and'];
524
524
  return filters;
525
525
  };
526
- SearchFlow.prototype.addFilterModel = function (model, filters) {
527
- Object.entries(model).forEach(function (_a) {
528
- var key = _a[0], value = _a[1];
529
- if (key.endsWith('DateRange')) {
530
- return;
531
- }
532
- if (key.endsWith('Like')) {
533
- return;
534
- }
535
- if (['onlyMetadata', 'projection', 'pageable', 'orderSense', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
536
- return;
537
- }
538
- if ((0, Utils_1.isNotEmpty)(value)) {
539
- var condition = {};
540
- condition[key] = value;
541
- filters.$and.push(condition);
542
- }
543
- });
544
- };
545
526
  return SearchFlow;
546
527
  }());
547
528
  exports.default = SearchFlow;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.180",
3
+ "version": "2.1.181",
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",
@@ -473,24 +473,24 @@ abstract class SearchFlow {
473
473
  return filters
474
474
  }
475
475
 
476
- public addFilterModel(model: any, filters: any) {
477
- Object.entries(model).forEach(([key, value]) => {
478
- if (key.endsWith('DateRange')) {
479
- return
480
- }
481
- if (key.endsWith('Like')) {
482
- return
483
- }
484
- if (['onlyMetadata', 'projection', 'pageable', 'orderSense', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
485
- return
486
- }
487
- if (isNotEmpty(value)) {
488
- let condition = {} as any
489
- condition[key] = value
490
- filters.$and.push(condition)
491
- }
492
- })
493
- }
476
+ // public addFilterModel(model: any, filters: any) {
477
+ // Object.entries(model).forEach(([key, value]) => {
478
+ // if (key.endsWith('DateRange')) {
479
+ // return
480
+ // }
481
+ // if (key.endsWith('Like')) {
482
+ // return
483
+ // }
484
+ // if (['onlyMetadata', 'projection', 'pageable', 'orderSense', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
485
+ // return
486
+ // }
487
+ // if (isNotEmpty(value)) {
488
+ // let condition = {} as any
489
+ // condition[key] = value
490
+ // filters.$and.push(condition)
491
+ // }
492
+ // })
493
+ // }
494
494
  }
495
495
 
496
496
  export default SearchFlow