@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.
Files changed (34) hide show
  1. package/jest.config.js +4 -4
  2. package/lib/cjs/decorators/bodyParams.js +5 -23
  3. package/lib/cjs/decorators/bodyParams.js.map +1 -1
  4. package/lib/cjs/decorators/pathParams.js +7 -33
  5. package/lib/cjs/decorators/pathParams.js.map +1 -1
  6. package/lib/cjs/decorators/queryParams.js +5 -31
  7. package/lib/cjs/decorators/queryParams.js.map +1 -1
  8. package/lib/cjs/decorators/useParam.js +2 -2
  9. package/lib/cjs/pipes/DeserializerPipe.js.map +1 -1
  10. package/lib/cjs/pipes/ValidationPipe.js +3 -3
  11. package/lib/cjs/pipes/ValidationPipe.js.map +1 -1
  12. package/lib/cjs/utils/mapParamsOptions.js +1 -1
  13. package/lib/cjs/utils/mapParamsOptions.js.map +1 -1
  14. package/lib/esm/decorators/bodyParams.js +5 -23
  15. package/lib/esm/decorators/bodyParams.js.map +1 -1
  16. package/lib/esm/decorators/pathParams.js +7 -33
  17. package/lib/esm/decorators/pathParams.js.map +1 -1
  18. package/lib/esm/decorators/queryParams.js +5 -31
  19. package/lib/esm/decorators/queryParams.js.map +1 -1
  20. package/lib/esm/decorators/useParam.js +2 -2
  21. package/lib/esm/pipes/DeserializerPipe.js.map +1 -1
  22. package/lib/esm/pipes/ValidationPipe.js +3 -3
  23. package/lib/esm/pipes/ValidationPipe.js.map +1 -1
  24. package/lib/esm/utils/mapParamsOptions.js +1 -1
  25. package/lib/esm/utils/mapParamsOptions.js.map +1 -1
  26. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  27. package/lib/tsconfig.tsbuildinfo +1 -1
  28. package/lib/types/decorators/bodyParams.d.ts +1 -0
  29. package/lib/types/decorators/pathParams.d.ts +2 -0
  30. package/lib/types/decorators/queryParams.d.ts +2 -0
  31. package/lib/types/decorators/session.d.ts +1 -1
  32. package/lib/types/decorators/useParam.d.ts +2 -2
  33. package/lib/types/domain/ParamOptions.d.ts +0 -4
  34. 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', useConverter: true}) user: 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 use the paramType to extract value and give it to the next pipe.
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
- * - useConverter: Apply json mapper from the returned value by the previous pipe.
10
+ * - useMapper: Apply json mapper from the returned value by the previous pipe.
11
11
  *
12
12
  * @param options
13
13
  * @decorator
@@ -5,10 +5,6 @@ export interface ParamOptions<T = any> {
5
5
  expression?: string;
6
6
  useType?: Type<T>;
7
7
  useMapper?: boolean;
8
- /**
9
- * @deprecated Since 10-2022. Use ParamOptions.useMapper.
10
- */
11
- useConverter?: boolean;
12
8
  useValidation?: boolean;
13
9
  [key: string]: any;
14
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/platform-params",
3
- "version": "7.43.2",
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.43.2",
29
- "@tsed/di": "7.43.2",
28
+ "@tsed/core": "7.44.1",
29
+ "@tsed/di": "7.44.1",
30
30
  "@tsed/eslint": "7.39.1",
31
- "@tsed/exceptions": "7.43.2",
32
- "@tsed/json-mapper": "7.43.2",
33
- "@tsed/schema": "7.43.2",
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.43.2",
39
- "@tsed/di": "^7.43.2",
40
- "@tsed/exceptions": "^7.43.2",
41
- "@tsed/json-mapper": "^7.43.2",
42
- "@tsed/schema": "^7.43.2"
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": {