@tsed/platform-params 7.0.0-rc.2 → 7.0.0-rc.5
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/bodyParams.js.map +1 -1
- package/lib/cjs/decorators/cookies.js.map +1 -1
- package/lib/cjs/decorators/pathParams.js +1 -1
- package/lib/cjs/decorators/pathParams.js.map +1 -1
- package/lib/cjs/decorators/queryParams.js +1 -1
- package/lib/cjs/decorators/queryParams.js.map +1 -1
- package/lib/cjs/decorators/session.js.map +1 -1
- package/lib/cjs/pipes/DeserializerPipe.js +0 -6
- package/lib/cjs/pipes/DeserializerPipe.js.map +1 -1
- package/lib/esm/decorators/bodyParams.js.map +1 -1
- package/lib/esm/decorators/cookies.js.map +1 -1
- package/lib/esm/decorators/pathParams.js +1 -1
- package/lib/esm/decorators/pathParams.js.map +1 -1
- package/lib/esm/decorators/queryParams.js +1 -1
- package/lib/esm/decorators/queryParams.js.map +1 -1
- package/lib/esm/decorators/session.js.map +1 -1
- package/lib/esm/pipes/DeserializerPipe.js +2 -8
- package/lib/esm/pipes/DeserializerPipe.js.map +1 -1
- package/lib/types/decorators/bodyParams.d.ts +1 -1
- package/lib/types/decorators/cookies.d.ts +2 -2
- package/lib/types/decorators/pathParams.d.ts +2 -2
- package/lib/types/decorators/queryParams.d.ts +2 -2
- package/lib/types/decorators/session.d.ts +1 -1
- package/lib/types/pipes/DeserializerPipe.d.ts +0 -1
- package/package.json +11 -11
- package/readme.md +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bodyParams.js","sourceRoot":"","sources":["../../../src/decorators/bodyParams.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,yCAAoC;AACpC,gEAA2D;AA4C3D,SAAgB,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,gCAUC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,aAAa;IAC3B,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,QAAQ;QAC9B,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC;AAND,sCAMC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {UseParam} from \"./useParam\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\n\n/**\n * BodyParams return the value from [request.body](http://expressjs.com/en/4x/api.html#req.body) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@BodyParams() body: any) {\n * console.log('Entire body', body);\n * }\n *\n * @Post('/')\n * create(@BodyParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@BodyParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Post('/')\n * create(@BodyParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"bodyParams.js","sourceRoot":"","sources":["../../../src/decorators/bodyParams.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,yCAAoC;AACpC,gEAA2D;AA4C3D,SAAgB,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,gCAUC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,aAAa;IAC3B,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,QAAQ;QAC9B,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC;AAND,sCAMC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {UseParam} from \"./useParam\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\n\n/**\n * BodyParams return the value from [request.body](http://expressjs.com/en/4x/api.html#req.body) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@BodyParams() body: any) {\n * console.log('Entire body', body);\n * }\n *\n * @Post('/')\n * create(@BodyParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@BodyParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Post('/')\n * create(@BodyParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function BodyParams(expression: string, useType: Type<any>): ParameterDecorator;\nexport function BodyParams(expression: string): ParameterDecorator;\nexport function BodyParams(useType: Type<any>): ParameterDecorator;\nexport function BodyParams(options: Partial<ParamOptions>): ParameterDecorator;\nexport function BodyParams(): ParameterDecorator;\nexport function BodyParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = true, useValidation = true} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.BODY,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * RawBodyParams return the value from [request.body](http://expressjs.com/en/4x/api.html#req.body) as a Buffer.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@RawBodyParams() body: Buffer) {\n * console.log('Entire body', body.toString(\"utf8\"));\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @input\n * @alias BodyParams Example: @BodyParams() payload: Buffer\n */\nexport function RawBodyParams(): ParameterDecorator {\n return UseParam({\n paramType: ParamTypes.RAW_BODY,\n useConverter: false,\n useValidation: false\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../../src/decorators/cookies.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AAsCpC,SAAgB,aAAa,CAAC,GAAG,IAAW;IAC1C,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAElG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,sCAUC;AA6CD,SAAgB,OAAO,CAAC,GAAG,IAAW;IACpC,aAAa;IACb,OAAO,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;AAChC,CAAC;AAHD,0BAGC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Cookies or CookiesParams return the value from [request.cookies](http://expressjs.com/en/4x/api.html#req.cookies) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Cookies() cookies: any) {\n * console.log('Entire cookies', cookies);\n * }\n *\n * @Post('/')\n * create(@Cookies('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@Cookies('user') user: IUser) {\n * console.log('user', user);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../../src/decorators/cookies.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AAsCpC,SAAgB,aAAa,CAAC,GAAG,IAAW;IAC1C,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAElG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,sCAUC;AA6CD,SAAgB,OAAO,CAAC,GAAG,IAAW;IACpC,aAAa;IACb,OAAO,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;AAChC,CAAC;AAHD,0BAGC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Cookies or CookiesParams return the value from [request.cookies](http://expressjs.com/en/4x/api.html#req.cookies) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Cookies() cookies: any) {\n * console.log('Entire cookies', cookies);\n * }\n *\n * @Post('/')\n * create(@Cookies('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@Cookies('user') user: IUser) {\n * console.log('user', user);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function CookiesParams(expression: string | any, useType: any): ParameterDecorator;\nexport function CookiesParams(): ParameterDecorator;\nexport function CookiesParams(expression: string | any): ParameterDecorator;\nexport function CookiesParams(options: ParamOptions<any>): ParameterDecorator;\nexport function CookiesParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = false, useValidation = false} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.COOKIES,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * Cookies or CookiesParams return the value from [request.cookies](http://expressjs.com/en/4x/api.html#req.cookies) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Cookies() body: any) {\n * console.log('Entire body', body);\n * }\n *\n * @Post('/')\n * create(@Cookies('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@Cookies('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Post('/')\n * create(@Cookies('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @aliasof CookiesParams\n * @operation\n * @input\n */\nexport function Cookies(expression: string, useType: Type<any>): ParameterDecorator;\nexport function Cookies(expression: string): ParameterDecorator;\nexport function Cookies(useType: Type<any>): ParameterDecorator;\nexport function Cookies(options: Partial<ParamOptions>): ParameterDecorator;\nexport function Cookies(): ParameterDecorator;\nexport function Cookies(...args: any[]): ParameterDecorator {\n // @ts-ignore\n return CookiesParams(...args);\n}\n"]}
|
|
@@ -36,7 +36,7 @@ exports.PathParams = PathParams;
|
|
|
36
36
|
* }
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
|
-
* > For more information on deserialization see [converters](/docs/
|
|
39
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
40
40
|
*
|
|
41
41
|
* @param expression The path of the property to get.
|
|
42
42
|
* @decorator
|
|
@@ -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,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,gCAUC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,aAAa,CAAC,UAAkB;IAC9C,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,QAAQ,EAAE,qBAAqB;QAC/B,UAAU;KACX,CAAC,CAAC;AACL,CAAC;AAND,sCAMC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * PathParams return the value from [request.params](http://expressjs.com/en/4x/api.html#req.params) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@PathParams() params: any) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@PathParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@PathParams({expression: 'id', useType: () => new MyCustomModel() }) id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
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,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,gCAUC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,aAAa,CAAC,UAAkB;IAC9C,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,IAAI;QAC1B,QAAQ,EAAE,qBAAqB;QAC/B,UAAU;KACX,CAAC,CAAC;AACL,CAAC;AAND,sCAMC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * PathParams return the value from [request.params](http://expressjs.com/en/4x/api.html#req.params) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@PathParams() params: any) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@PathParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@PathParams({expression: 'id', useType: () => new MyCustomModel() }) id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function PathParams(expression: string, useType: Type<any>): ParameterDecorator;\nexport function PathParams(expression: string): ParameterDecorator;\nexport function PathParams(useType: Type<any>): ParameterDecorator;\nexport function PathParams(options: Partial<ParamOptions>): ParameterDecorator;\nexport function PathParams(): ParameterDecorator;\nexport function PathParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = true, useValidation = true} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.PATH,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * RawPathParams return the raw value from [request.params](http://expressjs.com/en/4x/api.html#req.params) object.\n *\n * Any validation and transformation are performed on the value. Use [pipes](/docs/pipes.html) to validate and/or transform the value.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@RawPathParams() params: string) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@RawPathParams('id') id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @decorator\n * @operation\n * @input\n */\nexport function RawPathParams(expression: string) {\n return UseParam({\n paramType: ParamTypes.PATH,\n dataPath: \"$ctx.request.params\",\n expression\n });\n}\n"]}
|
|
@@ -36,7 +36,7 @@ exports.QueryParams = QueryParams;
|
|
|
36
36
|
* }
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
|
-
* > For more information on deserialization see [converters](/docs/
|
|
39
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
40
40
|
*
|
|
41
41
|
* @param expression The path of the property to get.
|
|
42
42
|
* @decorator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryParams.js","sourceRoot":"","sources":["../../../src/decorators/queryParams.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AA4CpC,SAAgB,WAAW,CAAC,GAAG,IAAW;IACxC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,KAAK;QAC3B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,kCAUC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,cAAc,CAAC,UAAkB;IAC/C,OAAO,WAAW,CAAC;QACjB,UAAU;QACV,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC;AAND,wCAMC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * QueryParams return the value from [request.query](http://expressjs.com/en/4x/api.html#req.query) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@QueryParams() query: any) {\n * console.log('Entire query', query);\n * }\n *\n * @Get('/')\n * get(@QueryParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@QueryParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Get('/')\n * get(@QueryParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"queryParams.js","sourceRoot":"","sources":["../../../src/decorators/queryParams.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AA4CpC,SAAgB,WAAW,CAAC,GAAG,IAAW;IACxC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,KAAK;QAC3B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,kCAUC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,cAAc,CAAC,UAAkB;IAC/C,OAAO,WAAW,CAAC;QACjB,UAAU;QACV,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC;AAND,wCAMC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * QueryParams return the value from [request.query](http://expressjs.com/en/4x/api.html#req.query) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@QueryParams() query: any) {\n * console.log('Entire query', query);\n * }\n *\n * @Get('/')\n * get(@QueryParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@QueryParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Get('/')\n * get(@QueryParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function QueryParams(expression: string, useType: Type<any>): ParameterDecorator;\nexport function QueryParams(expression: string): ParameterDecorator;\nexport function QueryParams(useType: Type<any>): ParameterDecorator;\nexport function QueryParams(options: Partial<ParamOptions>): ParameterDecorator;\nexport function QueryParams(): ParameterDecorator;\nexport function QueryParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = true, useValidation = true} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.QUERY,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * RawQueryParams return the value from [request.query](http://expressjs.com/en/4x/api.html#req.query) object.\n *\n * Any validation and transformation are performed on the value. Use [pipes](/docs/pipes.html) to validate and/or transform the value.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@RawPathParams() params: any) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@RawPathParams('id') id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @decorator\n * @operation\n * @input\n */\nexport function RawQueryParams(expression: string) {\n return QueryParams({\n expression,\n useConverters: false,\n useValidation: false\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/decorators/session.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AAqCpC,SAAgB,OAAO,CAAC,GAAG,IAAW;IACpC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAElG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,0BAUC","sourcesContent":["import {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Session return the value from [request.session](http://expressjs.com/en/4x/api.html#req.session) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Session() session: Express.Session) {\n * console.log('Entire session', session);\n * }\n *\n * @Post('/')\n * create(@Session('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/') // Example to deserialize use from session\n * create(@Session({expression: 'user', useConverter: true}) user: User) {\n * console.log('user', user);\n * console.log('instanceOf user', user instanceof User);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/decorators/session.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAChD,gEAA2D;AAC3D,yCAAoC;AAqCpC,SAAgB,OAAO,CAAC,GAAG,IAAW;IACpC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,IAAA,mCAAgB,EAAC,IAAI,CAAC,CAAC;IAElG,OAAO,IAAA,mBAAQ,EAAC;QACd,SAAS,EAAE,uBAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAVD,0BAUC","sourcesContent":["import {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Session return the value from [request.session](http://expressjs.com/en/4x/api.html#req.session) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Session() session: Express.Session) {\n * console.log('Entire session', session);\n * }\n *\n * @Post('/')\n * create(@Session('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/') // Example to deserialize use from session\n * create(@Session({expression: 'user', useConverter: true}) user: User) {\n * console.log('user', user);\n * console.log('instanceOf user', user instanceof User);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @decorator\n * @operation\n * @input\n */\nexport function Session(expression: string): ParameterDecorator;\nexport function Session(options: Partial<ParamOptions>): ParameterDecorator;\nexport function Session(): ParameterDecorator;\nexport function Session(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = false, useValidation = false} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.SESSION,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n"]}
|
|
@@ -6,11 +6,9 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
const di_1 = require("@tsed/di");
|
|
7
7
|
const json_mapper_1 = require("@tsed/json-mapper");
|
|
8
8
|
let DeserializerPipe = DeserializerPipe_1 = class DeserializerPipe {
|
|
9
|
-
settings;
|
|
10
9
|
transform(value, param) {
|
|
11
10
|
return (0, json_mapper_1.deserialize)(value, {
|
|
12
11
|
useAlias: true,
|
|
13
|
-
additionalProperties: this.settings.additionalProperties === "accept",
|
|
14
12
|
type: param.type,
|
|
15
13
|
collectionType: param.collectionType,
|
|
16
14
|
groups: param.parameter.groups,
|
|
@@ -20,10 +18,6 @@ let DeserializerPipe = DeserializerPipe_1 = class DeserializerPipe {
|
|
|
20
18
|
});
|
|
21
19
|
}
|
|
22
20
|
};
|
|
23
|
-
tslib_1.__decorate([
|
|
24
|
-
(0, di_1.Constant)("converter", {}),
|
|
25
|
-
tslib_1.__metadata("design:type", Object)
|
|
26
|
-
], DeserializerPipe.prototype, "settings", void 0);
|
|
27
21
|
DeserializerPipe = DeserializerPipe_1 = tslib_1.__decorate([
|
|
28
22
|
(0, di_1.Injectable)()
|
|
29
23
|
], DeserializerPipe);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeserializerPipe.js","sourceRoot":"","sources":["../../../src/pipes/DeserializerPipe.ts"],"names":[],"mappings":";;;;;AAAA,iCAA8C;AAC9C,mDAA8C;AAI9C,IAAa,gBAAgB,wBAA7B,MAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"DeserializerPipe.js","sourceRoot":"","sources":["../../../src/pipes/DeserializerPipe.ts"],"names":[],"mappings":";;;;;AAAA,iCAA8C;AAC9C,mDAA8C;AAI9C,IAAa,gBAAgB,wBAA7B,MAAa,gBAAgB;IAC3B,SAAS,CAAC,KAAU,EAAE,KAAyB;QAC7C,OAAO,IAAA,yBAAW,EAAC,KAAK,EAAE;YACxB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;YAC9B,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;YACrC,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAgB,CAAC,IAAI,EAAE,CAAC;SAC7C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAZY,gBAAgB;IAD5B,IAAA,eAAU,GAAE;GACA,gBAAgB,CAY5B;AAZY,4CAAgB","sourcesContent":["import {Constant, Injectable} from \"@tsed/di\";\nimport {deserialize} from \"@tsed/json-mapper\";\nimport {JsonParameterStore, PipeMethods} from \"@tsed/schema\";\n\n@Injectable()\nexport class DeserializerPipe implements PipeMethods {\n transform(value: any, param: JsonParameterStore) {\n return deserialize(value, {\n useAlias: true,\n type: param.type,\n collectionType: param.collectionType,\n groups: param.parameter.groups,\n genericTypes: param.nestedGenerics[0],\n nestedGenerics: param.nestedGenerics,\n ...(param.store.get(DeserializerPipe) || {})\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bodyParams.js","sourceRoot":"","sources":["../../../src/decorators/bodyParams.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AA4C3D,MAAM,UAAU,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,QAAQ;QAC9B,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {UseParam} from \"./useParam\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\n\n/**\n * BodyParams return the value from [request.body](http://expressjs.com/en/4x/api.html#req.body) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@BodyParams() body: any) {\n * console.log('Entire body', body);\n * }\n *\n * @Post('/')\n * create(@BodyParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@BodyParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Post('/')\n * create(@BodyParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"bodyParams.js","sourceRoot":"","sources":["../../../src/decorators/bodyParams.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AA4C3D,MAAM,UAAU,UAAU,CAAC,GAAG,IAAW;IACvC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,QAAQ;QAC9B,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {UseParam} from \"./useParam\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\n\n/**\n * BodyParams return the value from [request.body](http://expressjs.com/en/4x/api.html#req.body) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@BodyParams() body: any) {\n * console.log('Entire body', body);\n * }\n *\n * @Post('/')\n * create(@BodyParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@BodyParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Post('/')\n * create(@BodyParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function BodyParams(expression: string, useType: Type<any>): ParameterDecorator;\nexport function BodyParams(expression: string): ParameterDecorator;\nexport function BodyParams(useType: Type<any>): ParameterDecorator;\nexport function BodyParams(options: Partial<ParamOptions>): ParameterDecorator;\nexport function BodyParams(): ParameterDecorator;\nexport function BodyParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = true, useValidation = true} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.BODY,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * RawBodyParams return the value from [request.body](http://expressjs.com/en/4x/api.html#req.body) as a Buffer.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@RawBodyParams() body: Buffer) {\n * console.log('Entire body', body.toString(\"utf8\"));\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @input\n * @alias BodyParams Example: @BodyParams() payload: Buffer\n */\nexport function RawBodyParams(): ParameterDecorator {\n return UseParam({\n paramType: ParamTypes.RAW_BODY,\n useConverter: false,\n useValidation: false\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../../src/decorators/cookies.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;AAsCpC,MAAM,UAAU,aAAa,CAAC,GAAG,IAAW;IAC1C,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAElG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AA6CD,MAAM,UAAU,OAAO,CAAC,GAAG,IAAW;IACpC,aAAa;IACb,OAAO,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Cookies or CookiesParams return the value from [request.cookies](http://expressjs.com/en/4x/api.html#req.cookies) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Cookies() cookies: any) {\n * console.log('Entire cookies', cookies);\n * }\n *\n * @Post('/')\n * create(@Cookies('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@Cookies('user') user: IUser) {\n * console.log('user', user);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../../src/decorators/cookies.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;AAsCpC,MAAM,UAAU,aAAa,CAAC,GAAG,IAAW;IAC1C,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAElG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AA6CD,MAAM,UAAU,OAAO,CAAC,GAAG,IAAW;IACpC,aAAa;IACb,OAAO,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Cookies or CookiesParams return the value from [request.cookies](http://expressjs.com/en/4x/api.html#req.cookies) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Cookies() cookies: any) {\n * console.log('Entire cookies', cookies);\n * }\n *\n * @Post('/')\n * create(@Cookies('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@Cookies('user') user: IUser) {\n * console.log('user', user);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function CookiesParams(expression: string | any, useType: any): ParameterDecorator;\nexport function CookiesParams(): ParameterDecorator;\nexport function CookiesParams(expression: string | any): ParameterDecorator;\nexport function CookiesParams(options: ParamOptions<any>): ParameterDecorator;\nexport function CookiesParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = false, useValidation = false} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.COOKIES,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * Cookies or CookiesParams return the value from [request.cookies](http://expressjs.com/en/4x/api.html#req.cookies) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Cookies() body: any) {\n * console.log('Entire body', body);\n * }\n *\n * @Post('/')\n * create(@Cookies('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/')\n * create(@Cookies('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Post('/')\n * create(@Cookies('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @aliasof CookiesParams\n * @operation\n * @input\n */\nexport function Cookies(expression: string, useType: Type<any>): ParameterDecorator;\nexport function Cookies(expression: string): ParameterDecorator;\nexport function Cookies(useType: Type<any>): ParameterDecorator;\nexport function Cookies(options: Partial<ParamOptions>): ParameterDecorator;\nexport function Cookies(): ParameterDecorator;\nexport function Cookies(...args: any[]): ParameterDecorator {\n // @ts-ignore\n return CookiesParams(...args);\n}\n"]}
|
|
@@ -32,7 +32,7 @@ export function PathParams(...args) {
|
|
|
32
32
|
* }
|
|
33
33
|
* }
|
|
34
34
|
* ```
|
|
35
|
-
* > For more information on deserialization see [converters](/docs/
|
|
35
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
36
36
|
*
|
|
37
37
|
* @param expression The path of the property to get.
|
|
38
38
|
* @decorator
|
|
@@ -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,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB;IAC9C,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,QAAQ,EAAE,qBAAqB;QAC/B,UAAU;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * PathParams return the value from [request.params](http://expressjs.com/en/4x/api.html#req.params) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@PathParams() params: any) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@PathParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@PathParams({expression: 'id', useType: () => new MyCustomModel() }) id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
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,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB;IAC9C,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,QAAQ,EAAE,qBAAqB;QAC/B,UAAU;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * PathParams return the value from [request.params](http://expressjs.com/en/4x/api.html#req.params) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@PathParams() params: any) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@PathParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@PathParams({expression: 'id', useType: () => new MyCustomModel() }) id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function PathParams(expression: string, useType: Type<any>): ParameterDecorator;\nexport function PathParams(expression: string): ParameterDecorator;\nexport function PathParams(useType: Type<any>): ParameterDecorator;\nexport function PathParams(options: Partial<ParamOptions>): ParameterDecorator;\nexport function PathParams(): ParameterDecorator;\nexport function PathParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = true, useValidation = true} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.PATH,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * RawPathParams return the raw value from [request.params](http://expressjs.com/en/4x/api.html#req.params) object.\n *\n * Any validation and transformation are performed on the value. Use [pipes](/docs/pipes.html) to validate and/or transform the value.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@RawPathParams() params: string) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@RawPathParams('id') id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @decorator\n * @operation\n * @input\n */\nexport function RawPathParams(expression: string) {\n return UseParam({\n paramType: ParamTypes.PATH,\n dataPath: \"$ctx.request.params\",\n expression\n });\n}\n"]}
|
|
@@ -32,7 +32,7 @@ export function QueryParams(...args) {
|
|
|
32
32
|
* }
|
|
33
33
|
* }
|
|
34
34
|
* ```
|
|
35
|
-
* > For more information on deserialization see [converters](/docs/
|
|
35
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
36
36
|
*
|
|
37
37
|
* @param expression The path of the property to get.
|
|
38
38
|
* @decorator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryParams.js","sourceRoot":"","sources":["../../../src/decorators/queryParams.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;AA4CpC,MAAM,UAAU,WAAW,CAAC,GAAG,IAAW;IACxC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,KAAK;QAC3B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,OAAO,WAAW,CAAC;QACjB,UAAU;QACV,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * QueryParams return the value from [request.query](http://expressjs.com/en/4x/api.html#req.query) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@QueryParams() query: any) {\n * console.log('Entire query', query);\n * }\n *\n * @Get('/')\n * get(@QueryParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@QueryParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Get('/')\n * get(@QueryParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"queryParams.js","sourceRoot":"","sources":["../../../src/decorators/queryParams.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;AA4CpC,MAAM,UAAU,WAAW,CAAC,GAAG,IAAW;IACxC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAG,IAAI,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEhG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,KAAK;QAC3B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,OAAO,WAAW,CAAC;QACjB,UAAU;QACV,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * QueryParams return the value from [request.query](http://expressjs.com/en/4x/api.html#req.query) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@QueryParams() query: any) {\n * console.log('Entire query', query);\n * }\n *\n * @Get('/')\n * get(@QueryParams('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Get('/')\n * get(@QueryParams('user') user: User) { // with deserialization\n * console.log('user', user);\n * }\n *\n * @Get('/')\n * get(@QueryParams('users', User) users: User[]) { // with deserialization\n * console.log('users', users);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @param useType The type of the class that to be used to deserialize the data.\n * @decorator\n * @operation\n * @input\n */\nexport function QueryParams(expression: string, useType: Type<any>): ParameterDecorator;\nexport function QueryParams(expression: string): ParameterDecorator;\nexport function QueryParams(useType: Type<any>): ParameterDecorator;\nexport function QueryParams(options: Partial<ParamOptions>): ParameterDecorator;\nexport function QueryParams(): ParameterDecorator;\nexport function QueryParams(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = true, useValidation = true} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.QUERY,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n\n/**\n * RawQueryParams return the value from [request.query](http://expressjs.com/en/4x/api.html#req.query) object.\n *\n * Any validation and transformation are performed on the value. Use [pipes](/docs/pipes.html) to validate and/or transform the value.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Get('/')\n * get(@RawPathParams() params: any) {\n * console.log('Entire params', params);\n * }\n *\n * @Get('/')\n * get(@RawPathParams('id') id: string) {\n * console.log('ID', id);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @decorator\n * @operation\n * @input\n */\nexport function RawQueryParams(expression: string) {\n return QueryParams({\n expression,\n useConverters: false,\n useValidation: false\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/decorators/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAqCpC,MAAM,UAAU,OAAO,CAAC,GAAG,IAAW;IACpC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAElG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Session return the value from [request.session](http://expressjs.com/en/4x/api.html#req.session) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Session() session: Express.Session) {\n * console.log('Entire session', session);\n * }\n *\n * @Post('/')\n * create(@Session('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/') // Example to deserialize use from session\n * create(@Session({expression: 'user', useConverter: true}) user: User) {\n * console.log('user', user);\n * console.log('instanceOf user', user instanceof User);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/decorators/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAqCpC,MAAM,UAAU,OAAO,CAAC,GAAG,IAAW;IACpC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,EAAE,aAAa,GAAG,KAAK,EAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAElG,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,OAAO;QAC7B,UAAU;QACV,OAAO;QACP,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {ParamOptions} from \"../domain/ParamOptions\";\nimport {ParamTypes} from \"../domain/ParamTypes\";\nimport {mapParamsOptions} from \"../utils/mapParamsOptions\";\nimport {UseParam} from \"./useParam\";\n\n/**\n * Session return the value from [request.session](http://expressjs.com/en/4x/api.html#req.session) object.\n *\n * #### Example\n *\n * ```typescript\n * @Controller('/')\n * class MyCtrl {\n * @Post('/')\n * create(@Session() session: Express.Session) {\n * console.log('Entire session', session);\n * }\n *\n * @Post('/')\n * create(@Session('id') id: string) {\n * console.log('ID', id);\n * }\n *\n * @Post('/') // Example to deserialize use from session\n * create(@Session({expression: 'user', useConverter: true}) user: User) {\n * console.log('user', user);\n * console.log('instanceOf user', user instanceof User);\n * }\n * }\n * ```\n * > For more information on deserialization see [converters](/docs/json-mapper.md) page.\n *\n * @param expression The path of the property to get.\n * @decorator\n * @operation\n * @input\n */\nexport function Session(expression: string): ParameterDecorator;\nexport function Session(options: Partial<ParamOptions>): ParameterDecorator;\nexport function Session(): ParameterDecorator;\nexport function Session(...args: any[]): ParameterDecorator {\n const {expression, useType, useConverter = false, useValidation = false} = mapParamsOptions(args);\n\n return UseParam({\n paramType: ParamTypes.SESSION,\n expression,\n useType,\n useConverter,\n useValidation\n });\n}\n"]}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
var DeserializerPipe_1;
|
|
2
|
-
import { __decorate
|
|
3
|
-
import {
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import { Injectable } from "@tsed/di";
|
|
4
4
|
import { deserialize } from "@tsed/json-mapper";
|
|
5
5
|
let DeserializerPipe = DeserializerPipe_1 = class DeserializerPipe {
|
|
6
|
-
settings;
|
|
7
6
|
transform(value, param) {
|
|
8
7
|
return deserialize(value, {
|
|
9
8
|
useAlias: true,
|
|
10
|
-
additionalProperties: this.settings.additionalProperties === "accept",
|
|
11
9
|
type: param.type,
|
|
12
10
|
collectionType: param.collectionType,
|
|
13
11
|
groups: param.parameter.groups,
|
|
@@ -17,10 +15,6 @@ let DeserializerPipe = DeserializerPipe_1 = class DeserializerPipe {
|
|
|
17
15
|
});
|
|
18
16
|
}
|
|
19
17
|
};
|
|
20
|
-
__decorate([
|
|
21
|
-
Constant("converter", {}),
|
|
22
|
-
__metadata("design:type", Object)
|
|
23
|
-
], DeserializerPipe.prototype, "settings", void 0);
|
|
24
18
|
DeserializerPipe = DeserializerPipe_1 = __decorate([
|
|
25
19
|
Injectable()
|
|
26
20
|
], DeserializerPipe);
|
|
@@ -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,EAAW,UAAU,EAAC,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAI9C,IAAa,gBAAgB,wBAA7B,MAAa,gBAAgB;IAC3B,SAAS,CAAC,KAAU,EAAE,KAAyB;QAC7C,OAAO,WAAW,CAAC,KAAK,EAAE;YACxB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;YAC9B,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;YACrC,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAgB,CAAC,IAAI,EAAE,CAAC;SAC7C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAZY,gBAAgB;IAD5B,UAAU,EAAE;GACA,gBAAgB,CAY5B;SAZY,gBAAgB","sourcesContent":["import {Constant, Injectable} from \"@tsed/di\";\nimport {deserialize} from \"@tsed/json-mapper\";\nimport {JsonParameterStore, PipeMethods} from \"@tsed/schema\";\n\n@Injectable()\nexport class DeserializerPipe implements PipeMethods {\n transform(value: any, param: JsonParameterStore) {\n return deserialize(value, {\n useAlias: true,\n type: param.type,\n collectionType: param.collectionType,\n groups: param.parameter.groups,\n genericTypes: param.nestedGenerics[0],\n nestedGenerics: param.nestedGenerics,\n ...(param.store.get(DeserializerPipe) || {})\n });\n }\n}\n"]}
|
|
@@ -29,7 +29,7 @@ import { ParamOptions } from "../domain/ParamOptions";
|
|
|
29
29
|
* }
|
|
30
30
|
* }
|
|
31
31
|
* ```
|
|
32
|
-
* > For more information on deserialization see [converters](/docs/
|
|
32
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
33
33
|
*
|
|
34
34
|
* @param expression The path of the property to get.
|
|
35
35
|
* @param useType The type of the class that to be used to deserialize the data.
|
|
@@ -24,7 +24,7 @@ import { ParamOptions } from "../domain/ParamOptions";
|
|
|
24
24
|
* }
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
|
-
* > For more information on deserialization see [converters](/docs/
|
|
27
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
28
28
|
*
|
|
29
29
|
* @param expression The path of the property to get.
|
|
30
30
|
* @param useType The type of the class that to be used to deserialize the data.
|
|
@@ -65,7 +65,7 @@ export declare function CookiesParams(options: ParamOptions<any>): ParameterDeco
|
|
|
65
65
|
* }
|
|
66
66
|
* }
|
|
67
67
|
* ```
|
|
68
|
-
* > For more information on deserialization see [converters](/docs/
|
|
68
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
69
69
|
*
|
|
70
70
|
* @param expression The path of the property to get.
|
|
71
71
|
* @param useType The type of the class that to be used to deserialize the data.
|
|
@@ -24,7 +24,7 @@ import { ParamOptions } from "../domain/ParamOptions";
|
|
|
24
24
|
* }
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
|
-
* > For more information on deserialization see [converters](/docs/
|
|
27
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
28
28
|
*
|
|
29
29
|
* @param expression The path of the property to get.
|
|
30
30
|
* @param useType The type of the class that to be used to deserialize the data.
|
|
@@ -58,7 +58,7 @@ export declare function PathParams(): ParameterDecorator;
|
|
|
58
58
|
* }
|
|
59
59
|
* }
|
|
60
60
|
* ```
|
|
61
|
-
* > For more information on deserialization see [converters](/docs/
|
|
61
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
62
62
|
*
|
|
63
63
|
* @param expression The path of the property to get.
|
|
64
64
|
* @decorator
|
|
@@ -29,7 +29,7 @@ import { ParamOptions } from "../domain/ParamOptions";
|
|
|
29
29
|
* }
|
|
30
30
|
* }
|
|
31
31
|
* ```
|
|
32
|
-
* > For more information on deserialization see [converters](/docs/
|
|
32
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
33
33
|
*
|
|
34
34
|
* @param expression The path of the property to get.
|
|
35
35
|
* @param useType The type of the class that to be used to deserialize the data.
|
|
@@ -63,7 +63,7 @@ export declare function QueryParams(): ParameterDecorator;
|
|
|
63
63
|
* }
|
|
64
64
|
* }
|
|
65
65
|
* ```
|
|
66
|
-
* > For more information on deserialization see [converters](/docs/
|
|
66
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
67
67
|
*
|
|
68
68
|
* @param expression The path of the property to get.
|
|
69
69
|
* @decorator
|
|
@@ -24,7 +24,7 @@ import { ParamOptions } from "../domain/ParamOptions";
|
|
|
24
24
|
* }
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
|
-
* > For more information on deserialization see [converters](/docs/
|
|
27
|
+
* > For more information on deserialization see [converters](/docs/json-mapper.md) page.
|
|
28
28
|
*
|
|
29
29
|
* @param expression The path of the property to get.
|
|
30
30
|
* @decorator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-params",
|
|
3
|
-
"version": "7.0.0-rc.
|
|
3
|
+
"version": "7.0.0-rc.5",
|
|
4
4
|
"description": "Params module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"tslib": "2.4.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@tsed/core": "7.0.0-rc.
|
|
28
|
-
"@tsed/di": "7.0.0-rc.
|
|
29
|
-
"@tsed/exceptions": "7.0.0-rc.
|
|
30
|
-
"@tsed/json-mapper": "7.0.0-rc.
|
|
31
|
-
"@tsed/schema": "7.0.0-rc.
|
|
27
|
+
"@tsed/core": "7.0.0-rc.5",
|
|
28
|
+
"@tsed/di": "7.0.0-rc.5",
|
|
29
|
+
"@tsed/exceptions": "7.0.0-rc.5",
|
|
30
|
+
"@tsed/json-mapper": "7.0.0-rc.5",
|
|
31
|
+
"@tsed/schema": "7.0.0-rc.5"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@tsed/core": "^7.0.0-rc.
|
|
35
|
-
"@tsed/di": "^7.0.0-rc.
|
|
36
|
-
"@tsed/exceptions": "^7.0.0-rc.
|
|
37
|
-
"@tsed/json-mapper": "^7.0.0-rc.
|
|
38
|
-
"@tsed/schema": "^7.0.0-rc.
|
|
34
|
+
"@tsed/core": "^7.0.0-rc.5",
|
|
35
|
+
"@tsed/di": "^7.0.0-rc.5",
|
|
36
|
+
"@tsed/exceptions": "^7.0.0-rc.5",
|
|
37
|
+
"@tsed/json-mapper": "^7.0.0-rc.5",
|
|
38
|
+
"@tsed/schema": "^7.0.0-rc.5"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@tsed/core": {
|
package/readme.md
CHANGED
|
@@ -38,9 +38,9 @@ npm install --save @tsed/platform-params
|
|
|
38
38
|
|
|
39
39
|
## Contributors
|
|
40
40
|
|
|
41
|
-
Please read [contributing guidelines here](https://tsed.io/
|
|
41
|
+
Please read [contributing guidelines here](https://tsed.io/contributing.html).
|
|
42
42
|
|
|
43
|
-
<a href="https://github.com/tsedio/
|
|
43
|
+
<a href="https://github.com/tsedio/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
44
44
|
|
|
45
45
|
## Backers
|
|
46
46
|
|