@nestia/core 4.4.0 → 4.4.1-dev.20241216

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 (89) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +87 -87
  3. package/lib/options/INestiaTransformOptions.d.ts +7 -0
  4. package/lib/programmers/TypedBodyProgrammer.js +11 -0
  5. package/lib/programmers/TypedBodyProgrammer.js.map +1 -1
  6. package/lib/programmers/TypedQueryBodyProgrammer.js +36 -0
  7. package/lib/programmers/TypedQueryBodyProgrammer.js.map +1 -1
  8. package/lib/programmers/TypedQueryProgrammer.js +36 -0
  9. package/lib/programmers/TypedQueryProgrammer.js.map +1 -1
  10. package/lib/programmers/TypedQueryRouteProgrammer.js +36 -0
  11. package/lib/programmers/TypedQueryRouteProgrammer.js.map +1 -1
  12. package/lib/programmers/TypedRouteProgrammer.js +18 -0
  13. package/lib/programmers/TypedRouteProgrammer.js.map +1 -1
  14. package/lib/programmers/internal/LlmValidatePredicator.d.ts +5 -0
  15. package/lib/programmers/internal/LlmValidatePredicator.js +18 -0
  16. package/lib/programmers/internal/LlmValidatePredicator.js.map +1 -0
  17. package/package.json +6 -6
  18. package/src/adaptors/WebSocketAdaptor.ts +426 -426
  19. package/src/decorators/DynamicModule.ts +43 -43
  20. package/src/decorators/EncryptedBody.ts +101 -101
  21. package/src/decorators/EncryptedController.ts +38 -38
  22. package/src/decorators/EncryptedModule.ts +100 -100
  23. package/src/decorators/EncryptedRoute.ts +219 -219
  24. package/src/decorators/NoTransformConfigurationError.ts +32 -32
  25. package/src/decorators/PlainBody.ts +79 -79
  26. package/src/decorators/SwaggerCustomizer.ts +115 -115
  27. package/src/decorators/SwaggerExample.ts +100 -100
  28. package/src/decorators/TypedBody.ts +59 -59
  29. package/src/decorators/TypedException.ts +128 -128
  30. package/src/decorators/TypedFormData.ts +195 -195
  31. package/src/decorators/TypedHeaders.ts +64 -64
  32. package/src/decorators/TypedParam.ts +77 -77
  33. package/src/decorators/TypedQuery.ts +245 -245
  34. package/src/decorators/TypedRoute.ts +214 -214
  35. package/src/decorators/WebSocketRoute.ts +242 -242
  36. package/src/decorators/internal/EncryptedConstant.ts +4 -4
  37. package/src/decorators/internal/IWebSocketRouteReflect.ts +23 -23
  38. package/src/decorators/internal/NoTransformConfigureError.ts +2 -2
  39. package/src/decorators/internal/get_path_and_querify.ts +108 -108
  40. package/src/decorators/internal/get_path_and_stringify.ts +122 -122
  41. package/src/decorators/internal/get_text_body.ts +20 -20
  42. package/src/decorators/internal/headers_to_object.ts +13 -13
  43. package/src/decorators/internal/is_request_body_undefined.ts +14 -14
  44. package/src/decorators/internal/load_controller.ts +49 -49
  45. package/src/decorators/internal/route_error.ts +45 -45
  46. package/src/decorators/internal/validate_request_body.ts +74 -74
  47. package/src/decorators/internal/validate_request_form_data.ts +77 -77
  48. package/src/decorators/internal/validate_request_headers.ts +86 -86
  49. package/src/decorators/internal/validate_request_query.ts +74 -74
  50. package/src/index.ts +5 -5
  51. package/src/module.ts +21 -21
  52. package/src/options/INestiaTransformOptions.ts +38 -29
  53. package/src/options/INestiaTransformProject.ts +8 -8
  54. package/src/options/IRequestBodyValidator.ts +20 -20
  55. package/src/options/IRequestFormDataProps.ts +27 -27
  56. package/src/options/IRequestHeadersValidator.ts +22 -22
  57. package/src/options/IRequestQueryValidator.ts +20 -20
  58. package/src/options/IResponseBodyQuerifier.ts +25 -25
  59. package/src/options/IResponseBodyStringifier.ts +30 -30
  60. package/src/programmers/PlainBodyProgrammer.ts +70 -70
  61. package/src/programmers/TypedBodyProgrammer.ts +143 -132
  62. package/src/programmers/TypedFormDataBodyProgrammer.ts +118 -118
  63. package/src/programmers/TypedHeadersProgrammer.ts +63 -63
  64. package/src/programmers/TypedParamProgrammer.ts +33 -33
  65. package/src/programmers/TypedQueryBodyProgrammer.ts +106 -63
  66. package/src/programmers/TypedQueryProgrammer.ts +108 -65
  67. package/src/programmers/TypedQueryRouteProgrammer.ts +99 -56
  68. package/src/programmers/TypedRouteProgrammer.ts +95 -76
  69. package/src/programmers/http/HttpAssertQuerifyProgrammer.ts +72 -72
  70. package/src/programmers/http/HttpIsQuerifyProgrammer.ts +75 -75
  71. package/src/programmers/http/HttpQuerifyProgrammer.ts +108 -108
  72. package/src/programmers/http/HttpValidateQuerifyProgrammer.ts +76 -76
  73. package/src/programmers/internal/CoreMetadataUtil.ts +21 -21
  74. package/src/programmers/internal/LlmValidatePredicator.ts +16 -0
  75. package/src/transform.ts +35 -35
  76. package/src/transformers/FileTransformer.ts +110 -110
  77. package/src/transformers/MethodTransformer.ts +103 -103
  78. package/src/transformers/NodeTransformer.ts +23 -23
  79. package/src/transformers/ParameterDecoratorTransformer.ts +143 -143
  80. package/src/transformers/ParameterTransformer.ts +57 -57
  81. package/src/transformers/TypedRouteTransformer.ts +85 -85
  82. package/src/transformers/WebSocketRouteTransformer.ts +120 -120
  83. package/src/typings/Creator.ts +3 -3
  84. package/src/typings/get-function-location.d.ts +7 -7
  85. package/src/utils/ArrayUtil.ts +7 -7
  86. package/src/utils/ExceptionManager.ts +112 -112
  87. package/src/utils/Singleton.ts +20 -20
  88. package/src/utils/SourceFinder.ts +57 -57
  89. package/src/utils/VersioningStrategy.ts +27 -27
@@ -1,74 +1,74 @@
1
- import { BadRequestException } from "@nestjs/common";
2
- import typia, { IValidation, TypeGuardError } from "typia";
3
-
4
- import { IRequestQueryValidator } from "../../options/IRequestQueryValidator";
5
- import { NoTransformConfigurationError } from "../NoTransformConfigurationError";
6
-
7
- /**
8
- * @internal
9
- */
10
- export const validate_request_query =
11
- (method: string) =>
12
- <T>(validator?: IRequestQueryValidator<T>) => {
13
- if (!validator) {
14
- NoTransformConfigurationError(method);
15
- return (input: URLSearchParams) =>
16
- Object.fromEntries(input.entries()) as T;
17
- } else if (validator.type === "assert") return assert(validator.assert);
18
- else if (validator.type === "is") return is(validator.is);
19
- else if (validator.type === "validate") return validate(validator.validate);
20
- return () =>
21
- new Error(`Error on nestia.core.${method}(): invalid typed validator.`);
22
- };
23
-
24
- /**
25
- * @internal
26
- */
27
- const assert =
28
- <T>(closure: (input: URLSearchParams) => T) =>
29
- (input: URLSearchParams): T | BadRequestException => {
30
- try {
31
- return closure(input);
32
- } catch (exp) {
33
- if (typia.is<TypeGuardError>(exp)) {
34
- return new BadRequestException({
35
- path: exp.path,
36
- reason: exp.message,
37
- expected: exp.expected,
38
- value: exp.value,
39
- message: MESSAGE,
40
- });
41
- }
42
- throw exp;
43
- }
44
- };
45
-
46
- /**
47
- * @internal
48
- */
49
- const is =
50
- <T>(closure: (input: URLSearchParams) => T | null) =>
51
- (input: URLSearchParams): T | BadRequestException => {
52
- const result: T | null = closure(input);
53
- return result !== null ? result : new BadRequestException(MESSAGE);
54
- };
55
-
56
- /**
57
- * @internal
58
- */
59
- const validate =
60
- <T>(closure: (input: URLSearchParams) => IValidation<T>) =>
61
- (input: URLSearchParams): T | BadRequestException => {
62
- const result: IValidation<T> = closure(input);
63
- return result.success
64
- ? result.data
65
- : new BadRequestException({
66
- errors: result.errors,
67
- message: MESSAGE,
68
- });
69
- };
70
-
71
- /**
72
- * @internal
73
- */
74
- const MESSAGE = "Request query data is not following the promised type.";
1
+ import { BadRequestException } from "@nestjs/common";
2
+ import typia, { IValidation, TypeGuardError } from "typia";
3
+
4
+ import { IRequestQueryValidator } from "../../options/IRequestQueryValidator";
5
+ import { NoTransformConfigurationError } from "../NoTransformConfigurationError";
6
+
7
+ /**
8
+ * @internal
9
+ */
10
+ export const validate_request_query =
11
+ (method: string) =>
12
+ <T>(validator?: IRequestQueryValidator<T>) => {
13
+ if (!validator) {
14
+ NoTransformConfigurationError(method);
15
+ return (input: URLSearchParams) =>
16
+ Object.fromEntries(input.entries()) as T;
17
+ } else if (validator.type === "assert") return assert(validator.assert);
18
+ else if (validator.type === "is") return is(validator.is);
19
+ else if (validator.type === "validate") return validate(validator.validate);
20
+ return () =>
21
+ new Error(`Error on nestia.core.${method}(): invalid typed validator.`);
22
+ };
23
+
24
+ /**
25
+ * @internal
26
+ */
27
+ const assert =
28
+ <T>(closure: (input: URLSearchParams) => T) =>
29
+ (input: URLSearchParams): T | BadRequestException => {
30
+ try {
31
+ return closure(input);
32
+ } catch (exp) {
33
+ if (typia.is<TypeGuardError>(exp)) {
34
+ return new BadRequestException({
35
+ path: exp.path,
36
+ reason: exp.message,
37
+ expected: exp.expected,
38
+ value: exp.value,
39
+ message: MESSAGE,
40
+ });
41
+ }
42
+ throw exp;
43
+ }
44
+ };
45
+
46
+ /**
47
+ * @internal
48
+ */
49
+ const is =
50
+ <T>(closure: (input: URLSearchParams) => T | null) =>
51
+ (input: URLSearchParams): T | BadRequestException => {
52
+ const result: T | null = closure(input);
53
+ return result !== null ? result : new BadRequestException(MESSAGE);
54
+ };
55
+
56
+ /**
57
+ * @internal
58
+ */
59
+ const validate =
60
+ <T>(closure: (input: URLSearchParams) => IValidation<T>) =>
61
+ (input: URLSearchParams): T | BadRequestException => {
62
+ const result: IValidation<T> = closure(input);
63
+ return result.success
64
+ ? result.data
65
+ : new BadRequestException({
66
+ errors: result.errors,
67
+ message: MESSAGE,
68
+ });
69
+ };
70
+
71
+ /**
72
+ * @internal
73
+ */
74
+ const MESSAGE = "Request query data is not following the promised type.";
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as core from "./module";
2
-
3
- export * from "./module";
4
-
5
- export default core;
1
+ import * as core from "./module";
2
+
3
+ export * from "./module";
4
+
5
+ export default core;
package/src/module.ts CHANGED
@@ -1,21 +1,21 @@
1
- export * from "./decorators/DynamicModule";
2
- export * from "./utils/ExceptionManager";
3
-
4
- export * from "./decorators/TypedRoute";
5
- export * from "./decorators/TypedBody";
6
- export * from "./decorators/TypedQuery";
7
- export * from "./decorators/TypedException";
8
- export * from "./decorators/TypedHeaders";
9
- export * from "./decorators/TypedFormData";
10
- export * from "./decorators/TypedParam";
11
-
12
- export * from "./decorators/EncryptedController";
13
- export * from "./decorators/EncryptedRoute";
14
- export * from "./decorators/EncryptedBody";
15
- export * from "./decorators/EncryptedModule";
16
- export * from "./decorators/PlainBody";
17
- export * from "./decorators/SwaggerCustomizer";
18
- export * from "./decorators/SwaggerExample";
19
-
20
- export * from "./adaptors/WebSocketAdaptor";
21
- export * from "./decorators/WebSocketRoute";
1
+ export * from "./decorators/DynamicModule";
2
+ export * from "./utils/ExceptionManager";
3
+
4
+ export * from "./decorators/TypedRoute";
5
+ export * from "./decorators/TypedBody";
6
+ export * from "./decorators/TypedQuery";
7
+ export * from "./decorators/TypedException";
8
+ export * from "./decorators/TypedHeaders";
9
+ export * from "./decorators/TypedFormData";
10
+ export * from "./decorators/TypedParam";
11
+
12
+ export * from "./decorators/EncryptedController";
13
+ export * from "./decorators/EncryptedRoute";
14
+ export * from "./decorators/EncryptedBody";
15
+ export * from "./decorators/EncryptedModule";
16
+ export * from "./decorators/PlainBody";
17
+ export * from "./decorators/SwaggerCustomizer";
18
+ export * from "./decorators/SwaggerExample";
19
+
20
+ export * from "./adaptors/WebSocketAdaptor";
21
+ export * from "./decorators/WebSocketRoute";
@@ -1,29 +1,38 @@
1
- export interface INestiaTransformOptions {
2
- validate?: INestiaTransformOptions.Validate;
3
- stringify?: INestiaTransformOptions.Stringify | null;
4
- throws?: boolean;
5
- }
6
- export namespace INestiaTransformOptions {
7
- export type Validate =
8
- // NORMAL
9
- | "assert"
10
- | "is"
11
- | "validate"
12
- // STRICT
13
- | "assertEquals"
14
- | "equals"
15
- | "validateEquals"
16
- // CLONE
17
- | "assertClone"
18
- | "validateClone"
19
- // PRUNE
20
- | "assertPrune"
21
- | "validatePrune";
22
-
23
- export type Stringify =
24
- | "stringify"
25
- | "assert"
26
- | "is"
27
- | "validate"
28
- | "validate.log";
29
- }
1
+ import { ILlmSchema } from "@samchon/openapi";
2
+
3
+ export interface INestiaTransformOptions {
4
+ validate?: INestiaTransformOptions.Validate;
5
+ stringify?: INestiaTransformOptions.Stringify | null;
6
+ llm?: INestiaTransformOptions.ILlm<"chatgpt" | "gemini" | "3.0">;
7
+ throws?: boolean;
8
+ }
9
+ export namespace INestiaTransformOptions {
10
+ export type Validate =
11
+ // NORMAL
12
+ | "assert"
13
+ | "is"
14
+ | "validate"
15
+ // STRICT
16
+ | "assertEquals"
17
+ | "equals"
18
+ | "validateEquals"
19
+ // CLONE
20
+ | "assertClone"
21
+ | "validateClone"
22
+ // PRUNE
23
+ | "assertPrune"
24
+ | "validatePrune";
25
+
26
+ export type Stringify =
27
+ | "stringify"
28
+ | "assert"
29
+ | "is"
30
+ | "validate"
31
+ | "validate.log";
32
+
33
+ export interface ILlm<Model extends ILlmSchema.Model> {
34
+ model: Model;
35
+ strict?: Model extends "chatgpt" ? boolean : never;
36
+ recursive?: Model extends "gemini" | "3.0" ? false | number : never;
37
+ }
38
+ }
@@ -1,8 +1,8 @@
1
- import { ITypiaContext } from "typia/lib/transformers/ITypiaContext";
2
-
3
- import { INestiaTransformOptions } from "./INestiaTransformOptions";
4
-
5
- export interface INestiaTransformContext
6
- extends Omit<ITypiaContext, "options"> {
7
- options: INestiaTransformOptions;
8
- }
1
+ import { ITypiaContext } from "typia/lib/transformers/ITypiaContext";
2
+
3
+ import { INestiaTransformOptions } from "./INestiaTransformOptions";
4
+
5
+ export interface INestiaTransformContext
6
+ extends Omit<ITypiaContext, "options"> {
7
+ options: INestiaTransformOptions;
8
+ }
@@ -1,20 +1,20 @@
1
- import { IValidation } from "typia";
2
-
3
- export type IRequestBodyValidator<T> =
4
- | IRequestBodyValidator.IAssert<T>
5
- | IRequestBodyValidator.IIs<T>
6
- | IRequestBodyValidator.IValidate<T>;
7
- export namespace IRequestBodyValidator {
8
- export interface IAssert<T> {
9
- type: "assert";
10
- assert: (input: T) => T;
11
- }
12
- export interface IIs<T> {
13
- type: "is";
14
- is: (input: T) => boolean;
15
- }
16
- export interface IValidate<T> {
17
- type: "validate";
18
- validate: (input: T) => IValidation<T>;
19
- }
20
- }
1
+ import { IValidation } from "typia";
2
+
3
+ export type IRequestBodyValidator<T> =
4
+ | IRequestBodyValidator.IAssert<T>
5
+ | IRequestBodyValidator.IIs<T>
6
+ | IRequestBodyValidator.IValidate<T>;
7
+ export namespace IRequestBodyValidator {
8
+ export interface IAssert<T> {
9
+ type: "assert";
10
+ assert: (input: T) => T;
11
+ }
12
+ export interface IIs<T> {
13
+ type: "is";
14
+ is: (input: T) => boolean;
15
+ }
16
+ export interface IValidate<T> {
17
+ type: "validate";
18
+ validate: (input: T) => IValidation<T>;
19
+ }
20
+ }
@@ -1,27 +1,27 @@
1
- import { IValidation } from "typia";
2
-
3
- export interface IRequestFormDataProps<T> {
4
- files: Array<IRequestFormDataProps.IFile>;
5
- validator:
6
- | IRequestFormDataProps.IAssert<T>
7
- | IRequestFormDataProps.IIs<T>
8
- | IRequestFormDataProps.IValidate<T>;
9
- }
10
- export namespace IRequestFormDataProps {
11
- export interface IAssert<T> {
12
- type: "assert";
13
- assert: (input: FormData) => T;
14
- }
15
- export interface IIs<T> {
16
- type: "is";
17
- is: (input: FormData) => T | null;
18
- }
19
- export interface IValidate<T> {
20
- type: "validate";
21
- validate: (input: FormData) => IValidation<T>;
22
- }
23
- export interface IFile {
24
- name: string;
25
- limit: number | null;
26
- }
27
- }
1
+ import { IValidation } from "typia";
2
+
3
+ export interface IRequestFormDataProps<T> {
4
+ files: Array<IRequestFormDataProps.IFile>;
5
+ validator:
6
+ | IRequestFormDataProps.IAssert<T>
7
+ | IRequestFormDataProps.IIs<T>
8
+ | IRequestFormDataProps.IValidate<T>;
9
+ }
10
+ export namespace IRequestFormDataProps {
11
+ export interface IAssert<T> {
12
+ type: "assert";
13
+ assert: (input: FormData) => T;
14
+ }
15
+ export interface IIs<T> {
16
+ type: "is";
17
+ is: (input: FormData) => T | null;
18
+ }
19
+ export interface IValidate<T> {
20
+ type: "validate";
21
+ validate: (input: FormData) => IValidation<T>;
22
+ }
23
+ export interface IFile {
24
+ name: string;
25
+ limit: number | null;
26
+ }
27
+ }
@@ -1,22 +1,22 @@
1
- import { IValidation } from "typia";
2
-
3
- export type IRequestHeadersValidator<T> =
4
- | IRequestHeadersValidator.IAssert<T>
5
- | IRequestHeadersValidator.IIs<T>
6
- | IRequestHeadersValidator.IValidate<T>;
7
- export namespace IRequestHeadersValidator {
8
- export interface IAssert<T> {
9
- type: "assert";
10
- assert: (input: Record<string, string | string[] | undefined>) => T;
11
- }
12
- export interface IIs<T> {
13
- type: "is";
14
- is: (input: Record<string, string | string[] | undefined>) => T | null;
15
- }
16
- export interface IValidate<T> {
17
- type: "validate";
18
- validate: (
19
- input: Record<string, string | string[] | undefined>,
20
- ) => IValidation<T>;
21
- }
22
- }
1
+ import { IValidation } from "typia";
2
+
3
+ export type IRequestHeadersValidator<T> =
4
+ | IRequestHeadersValidator.IAssert<T>
5
+ | IRequestHeadersValidator.IIs<T>
6
+ | IRequestHeadersValidator.IValidate<T>;
7
+ export namespace IRequestHeadersValidator {
8
+ export interface IAssert<T> {
9
+ type: "assert";
10
+ assert: (input: Record<string, string | string[] | undefined>) => T;
11
+ }
12
+ export interface IIs<T> {
13
+ type: "is";
14
+ is: (input: Record<string, string | string[] | undefined>) => T | null;
15
+ }
16
+ export interface IValidate<T> {
17
+ type: "validate";
18
+ validate: (
19
+ input: Record<string, string | string[] | undefined>,
20
+ ) => IValidation<T>;
21
+ }
22
+ }
@@ -1,20 +1,20 @@
1
- import { IValidation } from "typia";
2
-
3
- export type IRequestQueryValidator<T> =
4
- | IRequestQueryValidator.IAssert<T>
5
- | IRequestQueryValidator.IIs<T>
6
- | IRequestQueryValidator.IValidate<T>;
7
- export namespace IRequestQueryValidator {
8
- export interface IAssert<T> {
9
- type: "assert";
10
- assert: (input: URLSearchParams) => T;
11
- }
12
- export interface IIs<T> {
13
- type: "is";
14
- is: (input: URLSearchParams) => T | null;
15
- }
16
- export interface IValidate<T> {
17
- type: "validate";
18
- validate: (input: URLSearchParams) => IValidation<T>;
19
- }
20
- }
1
+ import { IValidation } from "typia";
2
+
3
+ export type IRequestQueryValidator<T> =
4
+ | IRequestQueryValidator.IAssert<T>
5
+ | IRequestQueryValidator.IIs<T>
6
+ | IRequestQueryValidator.IValidate<T>;
7
+ export namespace IRequestQueryValidator {
8
+ export interface IAssert<T> {
9
+ type: "assert";
10
+ assert: (input: URLSearchParams) => T;
11
+ }
12
+ export interface IIs<T> {
13
+ type: "is";
14
+ is: (input: URLSearchParams) => T | null;
15
+ }
16
+ export interface IValidate<T> {
17
+ type: "validate";
18
+ validate: (input: URLSearchParams) => IValidation<T>;
19
+ }
20
+ }
@@ -1,25 +1,25 @@
1
- import { IValidation } from "typia";
2
-
3
- export type IResponseBodyQuerifier<T> =
4
- | IResponseBodyquerifier.IStringify<T>
5
- | IResponseBodyquerifier.IIs<T>
6
- | IResponseBodyquerifier.IAssert<T>
7
- | IResponseBodyquerifier.IValidate<T>;
8
- export namespace IResponseBodyquerifier {
9
- export interface IStringify<T> {
10
- type: "stringify";
11
- stringify: (input: T) => URLSearchParams;
12
- }
13
- export interface IIs<T> {
14
- type: "is";
15
- is: (input: T) => URLSearchParams | null;
16
- }
17
- export interface IAssert<T> {
18
- type: "assert";
19
- assert: (input: T) => URLSearchParams;
20
- }
21
- export interface IValidate<T> {
22
- type: "validate";
23
- validate: (input: T) => IValidation<URLSearchParams>;
24
- }
25
- }
1
+ import { IValidation } from "typia";
2
+
3
+ export type IResponseBodyQuerifier<T> =
4
+ | IResponseBodyquerifier.IStringify<T>
5
+ | IResponseBodyquerifier.IIs<T>
6
+ | IResponseBodyquerifier.IAssert<T>
7
+ | IResponseBodyquerifier.IValidate<T>;
8
+ export namespace IResponseBodyquerifier {
9
+ export interface IStringify<T> {
10
+ type: "stringify";
11
+ stringify: (input: T) => URLSearchParams;
12
+ }
13
+ export interface IIs<T> {
14
+ type: "is";
15
+ is: (input: T) => URLSearchParams | null;
16
+ }
17
+ export interface IAssert<T> {
18
+ type: "assert";
19
+ assert: (input: T) => URLSearchParams;
20
+ }
21
+ export interface IValidate<T> {
22
+ type: "validate";
23
+ validate: (input: T) => IValidation<URLSearchParams>;
24
+ }
25
+ }
@@ -1,30 +1,30 @@
1
- import { IValidation } from "typia";
2
-
3
- export type IResponseBodyStringifier<T> =
4
- | IResponseBodyStringifier.IStringify<T>
5
- | IResponseBodyStringifier.IIs<T>
6
- | IResponseBodyStringifier.IAssert<T>
7
- | IResponseBodyStringifier.IValidate<T>
8
- | IResponseBodyStringifier.IValidateLog<T>;
9
- export namespace IResponseBodyStringifier {
10
- export interface IStringify<T> {
11
- type: "stringify";
12
- stringify: (input: T) => string;
13
- }
14
- export interface IIs<T> {
15
- type: "is";
16
- is: (input: T) => string | null;
17
- }
18
- export interface IAssert<T> {
19
- type: "assert";
20
- assert: (input: T) => string;
21
- }
22
- export interface IValidate<T> {
23
- type: "validate";
24
- validate: (input: T) => IValidation<string>;
25
- }
26
- export interface IValidateLog<T> {
27
- type: "validate.log";
28
- validate: (input: T) => IValidation<string>;
29
- }
30
- }
1
+ import { IValidation } from "typia";
2
+
3
+ export type IResponseBodyStringifier<T> =
4
+ | IResponseBodyStringifier.IStringify<T>
5
+ | IResponseBodyStringifier.IIs<T>
6
+ | IResponseBodyStringifier.IAssert<T>
7
+ | IResponseBodyStringifier.IValidate<T>
8
+ | IResponseBodyStringifier.IValidateLog<T>;
9
+ export namespace IResponseBodyStringifier {
10
+ export interface IStringify<T> {
11
+ type: "stringify";
12
+ stringify: (input: T) => string;
13
+ }
14
+ export interface IIs<T> {
15
+ type: "is";
16
+ is: (input: T) => string | null;
17
+ }
18
+ export interface IAssert<T> {
19
+ type: "assert";
20
+ assert: (input: T) => string;
21
+ }
22
+ export interface IValidate<T> {
23
+ type: "validate";
24
+ validate: (input: T) => IValidation<string>;
25
+ }
26
+ export interface IValidateLog<T> {
27
+ type: "validate.log";
28
+ validate: (input: T) => IValidation<string>;
29
+ }
30
+ }