@tsed/platform-params 7.43.2 → 7.44.1
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.
- package/jest.config.js +4 -4
- package/lib/cjs/decorators/bodyParams.js +5 -23
- package/lib/cjs/decorators/bodyParams.js.map +1 -1
- package/lib/cjs/decorators/pathParams.js +7 -33
- package/lib/cjs/decorators/pathParams.js.map +1 -1
- package/lib/cjs/decorators/queryParams.js +5 -31
- package/lib/cjs/decorators/queryParams.js.map +1 -1
- package/lib/cjs/decorators/useParam.js +2 -2
- package/lib/cjs/pipes/DeserializerPipe.js.map +1 -1
- package/lib/cjs/pipes/ValidationPipe.js +3 -3
- package/lib/cjs/pipes/ValidationPipe.js.map +1 -1
- package/lib/cjs/utils/mapParamsOptions.js +1 -1
- package/lib/cjs/utils/mapParamsOptions.js.map +1 -1
- package/lib/esm/decorators/bodyParams.js +5 -23
- package/lib/esm/decorators/bodyParams.js.map +1 -1
- package/lib/esm/decorators/pathParams.js +7 -33
- package/lib/esm/decorators/pathParams.js.map +1 -1
- package/lib/esm/decorators/queryParams.js +5 -31
- package/lib/esm/decorators/queryParams.js.map +1 -1
- package/lib/esm/decorators/useParam.js +2 -2
- package/lib/esm/pipes/DeserializerPipe.js.map +1 -1
- package/lib/esm/pipes/ValidationPipe.js +3 -3
- package/lib/esm/pipes/ValidationPipe.js.map +1 -1
- package/lib/esm/utils/mapParamsOptions.js +1 -1
- package/lib/esm/utils/mapParamsOptions.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/decorators/bodyParams.d.ts +1 -0
- package/lib/types/decorators/pathParams.d.ts +2 -0
- package/lib/types/decorators/queryParams.d.ts +2 -0
- package/lib/types/decorators/session.d.ts +1 -1
- package/lib/types/decorators/useParam.d.ts +2 -2
- package/lib/types/domain/ParamOptions.d.ts +0 -4
- package/package.json +11 -11
|
@@ -62,4 +62,5 @@ export declare function BodyParams(): ParameterDecorator;
|
|
|
62
62
|
* @input
|
|
63
63
|
* @alias BodyParams Example: @BodyParams() payload: Buffer
|
|
64
64
|
*/
|
|
65
|
+
export declare function RawBodyParams(options: Partial<Omit<ParamOptions, "expression">>): ParameterDecorator;
|
|
65
66
|
export declare function RawBodyParams(): ParameterDecorator;
|
|
@@ -66,3 +66,5 @@ export declare function PathParams(): ParameterDecorator;
|
|
|
66
66
|
* @input
|
|
67
67
|
*/
|
|
68
68
|
export declare function RawPathParams(expression: string): ParameterDecorator;
|
|
69
|
+
export declare function RawPathParams(options: Partial<ParamOptions>): ParameterDecorator;
|
|
70
|
+
export declare function RawPathParams(): ParameterDecorator;
|
|
@@ -71,3 +71,5 @@ export declare function QueryParams(): ParameterDecorator;
|
|
|
71
71
|
* @input
|
|
72
72
|
*/
|
|
73
73
|
export declare function RawQueryParams(expression: string): ParameterDecorator;
|
|
74
|
+
export declare function RawQueryParams(options: Partial<ParamOptions>): ParameterDecorator;
|
|
75
|
+
export declare function RawQueryParams(): ParameterDecorator;
|
|
@@ -18,7 +18,7 @@ import { ParamOptions } from "../domain/ParamOptions";
|
|
|
18
18
|
* }
|
|
19
19
|
*
|
|
20
20
|
* @Post('/') // Example to deserialize use from session
|
|
21
|
-
* create(@Session({expression: 'user',
|
|
21
|
+
* create(@Session({expression: 'user', useMapper: true}) user: User) {
|
|
22
22
|
* console.log('user', user);
|
|
23
23
|
* console.log('instanceOf user', user instanceof User);
|
|
24
24
|
* }
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ParamOptions } from "../domain/ParamOptions";
|
|
2
2
|
/**
|
|
3
|
-
* Register a new param. It
|
|
3
|
+
* Register a new param. It uses the paramType to extract value and give it to the next pipe.
|
|
4
4
|
*
|
|
5
5
|
* Given options allow to enable or disable following pipes:
|
|
6
6
|
*
|
|
7
7
|
* - useType: Add extra type for the json mapper,
|
|
8
8
|
* - expression: Get property from the returned value by the previous pipe.
|
|
9
9
|
* - useValidation: Apply validation from the returned value by the previous pipe.
|
|
10
|
-
* -
|
|
10
|
+
* - useMapper: Apply json mapper from the returned value by the previous pipe.
|
|
11
11
|
*
|
|
12
12
|
* @param options
|
|
13
13
|
* @decorator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-params",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.44.1",
|
|
4
4
|
"description": "Params module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"tslib": "2.5.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tsed/core": "7.
|
|
29
|
-
"@tsed/di": "7.
|
|
28
|
+
"@tsed/core": "7.44.1",
|
|
29
|
+
"@tsed/di": "7.44.1",
|
|
30
30
|
"@tsed/eslint": "7.39.1",
|
|
31
|
-
"@tsed/exceptions": "7.
|
|
32
|
-
"@tsed/json-mapper": "7.
|
|
33
|
-
"@tsed/schema": "7.
|
|
31
|
+
"@tsed/exceptions": "7.44.1",
|
|
32
|
+
"@tsed/json-mapper": "7.44.1",
|
|
33
|
+
"@tsed/schema": "7.44.1",
|
|
34
34
|
"@tsed/typescript": "7.39.1",
|
|
35
35
|
"eslint": "^8.12.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@tsed/core": "^7.
|
|
39
|
-
"@tsed/di": "^7.
|
|
40
|
-
"@tsed/exceptions": "^7.
|
|
41
|
-
"@tsed/json-mapper": "^7.
|
|
42
|
-
"@tsed/schema": "^7.
|
|
38
|
+
"@tsed/core": "^7.44.1",
|
|
39
|
+
"@tsed/di": "^7.44.1",
|
|
40
|
+
"@tsed/exceptions": "^7.44.1",
|
|
41
|
+
"@tsed/json-mapper": "^7.44.1",
|
|
42
|
+
"@tsed/schema": "^7.44.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@tsed/core": {
|