@nestia/core 0.1.1 → 0.1.3

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.
@@ -19,4 +19,4 @@ import { IRequestBodyValidator } from "../options/IRequestBodyValidator";
19
19
  * @return Parameter decorator
20
20
  * @author Jeongho Nam - https://github.com/samchon
21
21
  */
22
- export declare function EncryptedBody<T>(validator: IRequestBodyValidator<T>): ParameterDecorator;
22
+ export declare function EncryptedBody<T>(validator?: IRequestBodyValidator<T>): ParameterDecorator;
@@ -1 +1 @@
1
- {"version":3,"file":"EncryptedBody.js","sourceRoot":"","sources":["../../src/decorators/EncryptedBody.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,yCAIwB;AAExB,sDAA2B;AAC3B,+BAA6C;AAG7C,gDAA+C;AAC/C,kEAAuE;AACvE,kEAAiE;AACjE,0EAAyE;AAEzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,aAAa,CAAI,SAAmC;IAChE,IAAM,OAAO,GAAG,IAAA,6CAAqB,EAAC,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC;IAClE,OAAO,IAAA,6BAAoB,EAAC,SAAe,aAAa,CACpD,QAAa,EACb,GAAqB;;;;;;wBAEf,OAAO,GAAoB,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;wBACjE,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK;4BAC1B,MAAM,IAAI,4BAAmB,CACzB,qCAAqC,CACxC,CAAC;wBAEA,KAAK,GAGO,OAAO,CAAC,WAAW,CACjC,2CAAuB,EACvB,GAAG,CAAC,QAAQ,EAAE,CACjB,CAAC;wBACF,IAAI,CAAC,KAAK;4BACN,MAAM,IAAI,KAAK,CACX,4DAA4D,CAC/D,CAAC;wBAGA,OAAO,GAAsC,IAAI,qBAAS,CAAC;4BAC7D,OAAA,IAAA,qCAAiB,EAAC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AE;QACV,IAAI,GAAG,YAAY,KAAK;YACpB,MAAM,IAAI,4BAAmB,CACzB,qFAAqF,CACxF,CAAC;;YACD,MAAM,GAAG,CAAC;KAClB;AACL,CAAC"}
@@ -30,7 +30,7 @@ export declare namespace EncryptedRoute {
30
30
  const Get: {
31
31
  (path?: string | string[]): MethodDecorator;
32
32
  <T>(stringify?: IResponseBodyStringifier<T> | undefined): MethodDecorator;
33
- <T_1>(path: string | string[], stringify: IResponseBodyStringifier<T_1>): MethodDecorator;
33
+ <T_1>(path: string | string[], stringify?: IResponseBodyStringifier<T_1> | undefined): MethodDecorator;
34
34
  };
35
35
  /**
36
36
  * Encrypted router decorator function for the GET method.
@@ -41,7 +41,7 @@ export declare namespace EncryptedRoute {
41
41
  const Post: {
42
42
  (path?: string | string[]): MethodDecorator;
43
43
  <T>(stringify?: IResponseBodyStringifier<T> | undefined): MethodDecorator;
44
- <T_1>(path: string | string[], stringify: IResponseBodyStringifier<T_1>): MethodDecorator;
44
+ <T_1>(path: string | string[], stringify?: IResponseBodyStringifier<T_1> | undefined): MethodDecorator;
45
45
  };
46
46
  /**
47
47
  * Encrypted router decorator function for the PATCH method.
@@ -52,7 +52,7 @@ export declare namespace EncryptedRoute {
52
52
  const Patch: {
53
53
  (path?: string | string[]): MethodDecorator;
54
54
  <T>(stringify?: IResponseBodyStringifier<T> | undefined): MethodDecorator;
55
- <T_1>(path: string | string[], stringify: IResponseBodyStringifier<T_1>): MethodDecorator;
55
+ <T_1>(path: string | string[], stringify?: IResponseBodyStringifier<T_1> | undefined): MethodDecorator;
56
56
  };
57
57
  /**
58
58
  * Encrypted router decorator function for the PUT method.
@@ -63,7 +63,7 @@ export declare namespace EncryptedRoute {
63
63
  const Put: {
64
64
  (path?: string | string[]): MethodDecorator;
65
65
  <T>(stringify?: IResponseBodyStringifier<T> | undefined): MethodDecorator;
66
- <T_1>(path: string | string[], stringify: IResponseBodyStringifier<T_1>): MethodDecorator;
66
+ <T_1>(path: string | string[], stringify?: IResponseBodyStringifier<T_1> | undefined): MethodDecorator;
67
67
  };
68
68
  /**
69
69
  * Encrypted router decorator function for the DELETE method.
@@ -74,6 +74,6 @@ export declare namespace EncryptedRoute {
74
74
  const Delete: {
75
75
  (path?: string | string[]): MethodDecorator;
76
76
  <T>(stringify?: IResponseBodyStringifier<T> | undefined): MethodDecorator;
77
- <T_1>(path: string | string[], stringify: IResponseBodyStringifier<T_1>): MethodDecorator;
77
+ <T_1>(path: string | string[], stringify?: IResponseBodyStringifier<T_1> | undefined): MethodDecorator;
78
78
  };
79
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Super-fast validation decorators of NestJS",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -34,7 +34,7 @@ import { validate_request_body } from "./internal/validate_request_body";
34
34
  * @return Parameter decorator
35
35
  * @author Jeongho Nam - https://github.com/samchon
36
36
  */
37
- export function EncryptedBody<T>(validator: IRequestBodyValidator<T>) {
37
+ export function EncryptedBody<T>(validator?: IRequestBodyValidator<T>) {
38
38
  const checker = validate_request_body("EncryptedBody")(validator);
39
39
  return createParamDecorator(async function EncryptedBody(
40
40
  _unknown: any,
@@ -97,7 +97,7 @@ export namespace EncryptedRoute {
97
97
  ): MethodDecorator;
98
98
  function route<T>(
99
99
  path: string | string[],
100
- stringify: IResponseBodyStringifier<T>,
100
+ stringify?: IResponseBodyStringifier<T>,
101
101
  ): MethodDecorator;
102
102
 
103
103
  function route(...args: any[]): MethodDecorator {