@geekbears/gb-mongoose-query-parser 1.2.3 → 1.3.0

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.
Files changed (2) hide show
  1. package/README.md +1 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # gb-mongoose-query-parser
2
2
 
3
- ## Moved to: [@geekbears/gb-mongoose-quey-parser](https://www.npmjs.com/package/@geekbears/gb-mongoose-query-parser)
4
3
 
5
4
  #### This is a fork from: [mongoose-quey-parser](https://github.com/leodinas-hao/mongoose-query-parser)
6
5
 
@@ -103,25 +102,6 @@ const parsed = parser.parse('${vip}&status=${sentStatus}&timestamp>2017-10-01&au
103
102
 
104
103
  ```
105
104
 
106
- ## NestJS Swagger Decorator
107
-
108
- This package includes a `@nestjs/swagger` decorator to simplify the documentation of query parameters. The `@ApiStandardQuery()` decorator acts as an alias to `@ApiQuery()` and wraps all the standard query parameters used by Geekbears on `find` and `count` operations.
109
-
110
- ### Usage
111
-
112
- Import the decorator and use it on the corresponding method on the controller class.
113
-
114
- ```typescript
115
- import { ApiStandardQuery } from '@geekbears/gb-mongoose-query-parser';
116
-
117
- @Get()
118
- @ApiStandardQuery()
119
- async find(@Query() query: any): Promise<any> {
120
- // Do something
121
- }
122
-
123
- ```
124
-
125
105
 
126
106
  ## Supported features
127
107
 
@@ -404,7 +384,7 @@ const parser = new MongooseQueryParser({
404
384
  int: val => parseInt(val, 10),
405
385
  },
406
386
  castParams: {
407
- key3: 'lowercase'
387
+ key3: 'lowercase'
408
388
  }});
409
389
  parser.parse('key1=lowercase(VALUE)&key2=int(10.5)&key3=ABC');
410
390
  // {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekbears/gb-mongoose-query-parser",
3
- "version": "1.2.3",
3
+ "version": "1.3.0",
4
4
  "description": "Convert url query string to MongooseJs friendly query object including advanced filtering, sorting, population, deep population, string template, type casting and many more...",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",