c2-mongoose 2.1.44 → 2.1.45

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.
@@ -17,7 +17,7 @@ declare abstract class SearchFlow {
17
17
  buildOrdenation(): any;
18
18
  diacriticSensitiveRegex(string?: string): string;
19
19
  searchPageable(model: mongoose.Model<any>, pipeline: any): Promise<any>;
20
- search(model: mongoose.Model<any>, pipeline: any): Promise<SearchResponse<any>>;
20
+ search(model: mongoose.Model<any>, pipeline?: any): Promise<SearchResponse<any>>;
21
21
  /**
22
22
  *
23
23
  * @param model
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.44",
3
+ "version": "2.1.45",
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",
@@ -104,7 +104,7 @@ abstract class SearchFlow {
104
104
  return result[0]
105
105
  }
106
106
 
107
- public async search(model: mongoose.Model<any>, pipeline: any): Promise<SearchResponse<any>> {
107
+ public async search(model: mongoose.Model<any>, pipeline?: any): Promise<SearchResponse<any>> {
108
108
  if (this.pageable == true) {
109
109
  if (pipeline) {
110
110
  return await this.searchPageable(model, pipeline)