@tsed/platform-params 7.43.1 → 7.44.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.
- package/lib/cjs/decorators/pathParams.js +6 -30
- package/lib/cjs/decorators/pathParams.js.map +1 -1
- package/lib/cjs/pipes/DeserializerPipe.js.map +1 -1
- package/lib/esm/decorators/pathParams.js +6 -30
- package/lib/esm/decorators/pathParams.js.map +1 -1
- package/lib/esm/pipes/DeserializerPipe.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/decorators/pathParams.d.ts +2 -0
- package/package.json +11 -11
|
@@ -15,39 +15,15 @@ function PathParams(...args) {
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
exports.PathParams = PathParams;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
* Any validation and transformation are performed on the value. Use [pipes](/docs/pipes.html) to validate and/or transform the value.
|
|
22
|
-
*
|
|
23
|
-
* #### Example
|
|
24
|
-
*
|
|
25
|
-
* ```typescript
|
|
26
|
-
* @Controller('/')
|
|
27
|
-
* class MyCtrl {
|
|
28
|
-
* @Get('/')
|
|
29
|
-
* get(@RawPathParams() params: string) {
|
|
30
|
-
* console.log('Entire params', params);
|
|
31
|
-
* }
|
|
32
|
-
*
|
|
33
|
-
* @Get('/')
|
|
34
|
-
* get(@RawPathParams('id') id: string) {
|
|
35
|
-
* console.log('ID', id);
|
|
36
|
-
* }
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
40
|
-
*
|
|
41
|
-
* @param expression The path of the property to get.
|
|
42
|
-
* @decorator
|
|
43
|
-
* @operation
|
|
44
|
-
* @input
|
|
45
|
-
*/
|
|
46
|
-
function RawPathParams(expression) {
|
|
18
|
+
function RawPathParams(...args) {
|
|
19
|
+
const { expression, useType, useMapper = false, useValidation = false } = (0, mapParamsOptions_1.mapParamsOptions)(args);
|
|
47
20
|
return (0, useParam_1.UseParam)({
|
|
48
21
|
paramType: ParamTypes_1.ParamTypes.PATH,
|
|
49
22
|
dataPath: "$ctx.request.params",
|
|
50
|
-
expression
|
|
23
|
+
expression,
|
|
24
|
+
useValidation,
|
|
25
|
+
useMapper,
|
|
26
|
+
useType
|
|
51
27
|
});
|
|
52
28
|
}
|
|
53
29
|
exports.RawPathParams = RawPathParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathParams.js","sourceRoot":"","sources":["../../../src/decorators/pathParams.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AAuCpC,SAAgB,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAE7F,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,SAAS;QACT,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,gCAUC;
|
|
1
|
+
{"version":3,"file":"pathParams.js","sourceRoot":"","sources":["../../../src/decorators/pathParams.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AAuCpC,SAAgB,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAE7F,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,SAAS;QACT,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,gCAUC;AAiCD,SAAgB,aAAa,CAAC,GAAG,IAAW;IAC1C,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAC/F,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,QAAQ,EAAE,qBAAqB;QAC/B,UAAU;QACV,aAAa;QACb,SAAS;QACT,OAAO;KACR,CAAC,CAAC;AACL,CAAC;AAVD,sCAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeserializerPipe.js","sourceRoot":"","sources":["../../../src/pipes/DeserializerPipe.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"DeserializerPipe.js","sourceRoot":"","sources":["../../../src/pipes/DeserializerPipe.ts"],"names":[],"mappings":";;;;;AAAA,iCAAoC;AACpC,mDAA8C;AAIvC,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAC3B,SAAS,CAAC,KAAU,EAAE,KAAyB;QAC7C,OAAO,IAAA,yBAAW,EAAC,KAAK,EAAE;YACxB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,KAAK;YACZ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAgB,CAAC,IAAI,EAAE,CAAC;SAC7C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AARY,gBAAgB;IAD5B,IAAA,eAAU,GAAE;GACA,gBAAgB,CAQ5B;AARY,4CAAgB"}
|
|
@@ -11,39 +11,15 @@ export function PathParams(...args) {
|
|
|
11
11
|
useValidation
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
* Any validation and transformation are performed on the value. Use [pipes](/docs/pipes.html) to validate and/or transform the value.
|
|
18
|
-
*
|
|
19
|
-
* #### Example
|
|
20
|
-
*
|
|
21
|
-
* ```typescript
|
|
22
|
-
* @Controller('/')
|
|
23
|
-
* class MyCtrl {
|
|
24
|
-
* @Get('/')
|
|
25
|
-
* get(@RawPathParams() params: string) {
|
|
26
|
-
* console.log('Entire params', params);
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* @Get('/')
|
|
30
|
-
* get(@RawPathParams('id') id: string) {
|
|
31
|
-
* console.log('ID', id);
|
|
32
|
-
* }
|
|
33
|
-
* }
|
|
34
|
-
* ```
|
|
35
|
-
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
36
|
-
*
|
|
37
|
-
* @param expression The path of the property to get.
|
|
38
|
-
* @decorator
|
|
39
|
-
* @operation
|
|
40
|
-
* @input
|
|
41
|
-
*/
|
|
42
|
-
export function RawPathParams(expression) {
|
|
14
|
+
export function RawPathParams(...args) {
|
|
15
|
+
const { expression, useType, useMapper = false, useValidation = false } = mapParamsOptions(args);
|
|
43
16
|
return UseParam({
|
|
44
17
|
paramType: ParamTypes.PATH,
|
|
45
18
|
dataPath: "$ctx.request.params",
|
|
46
|
-
expression
|
|
19
|
+
expression,
|
|
20
|
+
useValidation,
|
|
21
|
+
useMapper,
|
|
22
|
+
useType
|
|
47
23
|
});
|
|
48
24
|
}
|
|
49
25
|
//# sourceMappingURL=pathParams.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathParams.js","sourceRoot":"","sources":["../../../src/decorators/pathParams.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAuCpC,MAAM,UAAU,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAE7F,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,SAAS;QACT,aAAa;KACd,CAAC,CAAC;AACL,CAAC;
|
|
1
|
+
{"version":3,"file":"pathParams.js","sourceRoot":"","sources":["../../../src/decorators/pathParams.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAuCpC,MAAM,UAAU,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAE7F,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,SAAS;QACT,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAiCD,MAAM,UAAU,aAAa,CAAC,GAAG,IAAW;IAC1C,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC/F,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,QAAQ,EAAE,qBAAqB;QAC/B,UAAU;QACV,aAAa;QACb,SAAS;QACT,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeserializerPipe.js","sourceRoot":"","sources":["../../../src/pipes/DeserializerPipe.ts"],"names":[],"mappings":";;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DeserializerPipe.js","sourceRoot":"","sources":["../../../src/pipes/DeserializerPipe.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAIvC,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAC3B,SAAS,CAAC,KAAU,EAAE,KAAyB;QAC7C,OAAO,WAAW,CAAC,KAAK,EAAE;YACxB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,KAAK;YACZ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAgB,CAAC,IAAI,EAAE,CAAC;SAC7C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AARY,gBAAgB;IAD5B,UAAU,EAAE;GACA,gBAAgB,CAQ5B;SARY,gBAAgB"}
|