c2-mongoose 2.1.48 → 2.1.50

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.
@@ -16,7 +16,10 @@ declare abstract class SearchFlow {
16
16
  buildPath(target: string, nested?: string): any;
17
17
  buildOrdenation(): any;
18
18
  diacriticSensitiveRegex(string?: string): string;
19
- searchPageable(model: mongoose.Model<any>, pipeline: any): Promise<any>;
19
+ searchPageable(model: mongoose.Model<any>, pipeline: any): Promise<{
20
+ items: any;
21
+ paging: any;
22
+ }>;
20
23
  search(model: mongoose.Model<any>, pipeline?: any): Promise<SearchResponse<any>>;
21
24
  /**
22
25
  *
@@ -176,7 +176,10 @@ var SearchFlow = /** @class */ (function () {
176
176
  ])];
177
177
  case 1:
178
178
  result = _a.sent();
179
- return [2 /*return*/, result[0]];
179
+ return [2 /*return*/, {
180
+ items: result[0].items,
181
+ paging: result[0].paging[0]
182
+ }];
180
183
  }
181
184
  });
182
185
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.48",
3
+ "version": "2.1.50",
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",
@@ -103,7 +103,10 @@ abstract class SearchFlow {
103
103
  }
104
104
  ]
105
105
  )
106
- return result[0]
106
+ return {
107
+ items: result[0].items,
108
+ paging: result[0].paging[0]
109
+ }
107
110
  }
108
111
 
109
112
  public async search(model: mongoose.Model<any>, pipeline?: any): Promise<SearchResponse<any>> {