c2-mongoose 2.1.402 → 2.1.403

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.
@@ -4,7 +4,7 @@ export interface IParams {
4
4
  [key: string]: any;
5
5
  mainFilter: any;
6
6
  preSteps?: any[];
7
- postSteps?: any[];
7
+ posSteps?: any[];
8
8
  }
9
9
  declare class SearcherV3Flow {
10
10
  exec(params: IParams, model: mongoose.Model<any>, oneToMany?: IForeingData[]): Promise<any>;
@@ -80,8 +80,8 @@ var SearcherV3Flow = /** @class */ (function () {
80
80
  pipelineFacetItems = __spreadArray(__spreadArray([], pipelineFacetItems, true), MatchFlowItem_1.default.execute(params, model), true);
81
81
  pipelineFacetItems = __spreadArray(__spreadArray([], pipelineFacetItems, true), SortFlowItem_1.default.execute(params.orderBy, params.orderSense), true);
82
82
  pipelineFacetItems = __spreadArray(__spreadArray([], pipelineFacetItems, true), ProjectFlowItem_1.default.execute(params.select), true);
83
- if ((_d = params.postSteps) === null || _d === void 0 ? void 0 : _d.length) {
84
- pipelineFacetItems = __spreadArray(__spreadArray([], pipelineFacetItems, true), params.postSteps, true);
83
+ if ((_d = params.posSteps) === null || _d === void 0 ? void 0 : _d.length) {
84
+ pipelineFacetItems = __spreadArray(__spreadArray([], pipelineFacetItems, true), params.posSteps, true);
85
85
  }
86
86
  if (params.pageable !== false) {
87
87
  pipelineFacetItems = __spreadArray(__spreadArray([], pipelineFacetItems, true), [
@@ -50,7 +50,9 @@ var BuildAndQueriesFlowItem = /** @class */ (function () {
50
50
  'searchTextFields',
51
51
  'sort',
52
52
  'isPageable',
53
- 'searchPageable'
53
+ 'searchPageable',
54
+ 'preSteps',
55
+ 'posSteps',
54
56
  ].includes(key)) {
55
57
  return;
56
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.402",
3
+ "version": "2.1.403",
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",
@@ -11,7 +11,7 @@ export interface IParams {
11
11
  [key: string]: any
12
12
  mainFilter: any
13
13
  preSteps?: any[]
14
- postSteps?: any[]
14
+ posSteps?: any[]
15
15
  }
16
16
 
17
17
  class SearcherV3Flow {
@@ -36,8 +36,8 @@ class SearcherV3Flow {
36
36
  pipelineFacetItems = [...pipelineFacetItems, ...SortFlowItem.execute(params.orderBy, params.orderSense)]
37
37
  pipelineFacetItems = [...pipelineFacetItems, ...ProjectFlowItem.execute(params.select)]
38
38
 
39
- if (params.postSteps?.length) {
40
- pipelineFacetItems = [...pipelineFacetItems, ...params.postSteps]
39
+ if (params.posSteps?.length) {
40
+ pipelineFacetItems = [...pipelineFacetItems, ...params.posSteps]
41
41
  }
42
42
 
43
43
  if (params.pageable !== false) {
@@ -32,7 +32,10 @@ class BuildAndQueriesFlowItem {
32
32
  'searchTextFields',
33
33
  'sort',
34
34
  'isPageable',
35
- 'searchPageable'].includes(key)) {
35
+ 'searchPageable',
36
+ 'preSteps',
37
+ 'posSteps',
38
+ ].includes(key)) {
36
39
  return
37
40
  }
38
41