@nestia/core 2.4.2 → 2.4.3-dev.20231207

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 (112) hide show
  1. package/lib/decorators/DynamicModule.js.map +1 -1
  2. package/lib/decorators/EncryptedBody.js.map +1 -1
  3. package/lib/decorators/EncryptedController.js.map +1 -1
  4. package/lib/decorators/EncryptedModule.js.map +1 -1
  5. package/lib/decorators/EncryptedRoute.js +0 -2
  6. package/lib/decorators/EncryptedRoute.js.map +1 -1
  7. package/lib/decorators/PlainBody.js.map +1 -1
  8. package/lib/decorators/TypedBody.js.map +1 -1
  9. package/lib/decorators/TypedException.js.map +1 -1
  10. package/lib/decorators/TypedHeaders.js.map +1 -1
  11. package/lib/decorators/TypedParam.js.map +1 -1
  12. package/lib/decorators/TypedQuery.js +1 -5
  13. package/lib/decorators/TypedQuery.js.map +1 -1
  14. package/lib/decorators/TypedRoute.js.map +1 -1
  15. package/lib/decorators/internal/NoTransformConfigureError.js.map +1 -1
  16. package/lib/decorators/internal/get_path_and_querify.js.map +1 -1
  17. package/lib/decorators/internal/get_path_and_stringify.js.map +1 -1
  18. package/lib/decorators/internal/get_text_body.js.map +1 -1
  19. package/lib/decorators/internal/headers_to_object.js.map +1 -1
  20. package/lib/decorators/internal/load_controller.js.map +1 -1
  21. package/lib/decorators/internal/route_error.js.map +1 -1
  22. package/lib/decorators/internal/validate_request_body.js.map +1 -1
  23. package/lib/decorators/internal/validate_request_headers.js.map +1 -1
  24. package/lib/decorators/internal/validate_request_query.js.map +1 -1
  25. package/lib/programmers/PlainBodyProgrammer.js.map +1 -1
  26. package/lib/programmers/TypedBodyProgrammer.js.map +1 -1
  27. package/lib/programmers/TypedExceptionProgrammer.js.map +1 -1
  28. package/lib/programmers/TypedHeadersProgrammer.js.map +1 -1
  29. package/lib/programmers/TypedParamProgrammer.js.map +1 -1
  30. package/lib/programmers/TypedQueryBodyProgrammer.js.map +1 -1
  31. package/lib/programmers/TypedQueryProgrammer.js.map +1 -1
  32. package/lib/programmers/TypedQueryRouteProgrammer.js.map +1 -1
  33. package/lib/programmers/TypedRouteProgrammer.js.map +1 -1
  34. package/lib/programmers/http/HttpAssertQuerifyProgrammer.js.map +1 -1
  35. package/lib/programmers/http/HttpIsQuerifyProgrammer.js.map +1 -1
  36. package/lib/programmers/http/HttpQuerifyProgrammer.js.map +1 -1
  37. package/lib/programmers/http/HttpValidateQuerifyProgrammer.js.map +1 -1
  38. package/lib/programmers/internal/CoreMetadataUtil.js.map +1 -1
  39. package/lib/transform.js.map +1 -1
  40. package/lib/transformers/FileTransformer.js.map +1 -1
  41. package/lib/transformers/MethodTransformer.js +1 -2
  42. package/lib/transformers/MethodTransformer.js.map +1 -1
  43. package/lib/transformers/NodeTransformer.js.map +1 -1
  44. package/lib/transformers/ParameterDecoratorTransformer.js +1 -3
  45. package/lib/transformers/ParameterDecoratorTransformer.js.map +1 -1
  46. package/lib/transformers/ParameterTransformer.js.map +1 -1
  47. package/lib/transformers/TypedExceptionTransformer.js.map +1 -1
  48. package/lib/transformers/TypedRouteTransformer.js +1 -2
  49. package/lib/transformers/TypedRouteTransformer.js.map +1 -1
  50. package/lib/utils/ExceptionManager.js.map +1 -1
  51. package/lib/utils/Singleton.js.map +1 -1
  52. package/lib/utils/SourceFinder.js +1 -3
  53. package/lib/utils/SourceFinder.js.map +1 -1
  54. package/package.json +3 -6
  55. package/src/decorators/DynamicModule.ts +39 -39
  56. package/src/decorators/EncryptedBody.ts +49 -57
  57. package/src/decorators/EncryptedController.ts +38 -38
  58. package/src/decorators/EncryptedModule.ts +79 -79
  59. package/src/decorators/EncryptedRoute.ts +126 -135
  60. package/src/decorators/PlainBody.ts +72 -75
  61. package/src/decorators/TypedBody.ts +59 -60
  62. package/src/decorators/TypedException.ts +89 -89
  63. package/src/decorators/TypedHeaders.ts +69 -70
  64. package/src/decorators/TypedParam.ts +65 -66
  65. package/src/decorators/TypedQuery.ts +246 -253
  66. package/src/decorators/TypedRoute.ts +144 -147
  67. package/src/decorators/internal/EncryptedConstant.ts +4 -4
  68. package/src/decorators/internal/NoTransformConfigureError.ts +8 -8
  69. package/src/decorators/internal/get_path_and_querify.ts +103 -104
  70. package/src/decorators/internal/get_path_and_stringify.ts +91 -94
  71. package/src/decorators/internal/get_text_body.ts +20 -20
  72. package/src/decorators/internal/headers_to_object.ts +13 -13
  73. package/src/decorators/internal/load_controller.ts +51 -51
  74. package/src/decorators/internal/route_error.ts +45 -45
  75. package/src/decorators/internal/validate_request_body.ts +57 -61
  76. package/src/decorators/internal/validate_request_headers.ts +68 -73
  77. package/src/decorators/internal/validate_request_query.ts +56 -59
  78. package/src/index.ts +5 -5
  79. package/src/module.ts +14 -14
  80. package/src/options/INestiaTransformOptions.ts +17 -17
  81. package/src/options/INestiaTransformProject.ts +7 -7
  82. package/src/options/IRequestBodyValidator.ts +20 -20
  83. package/src/options/IRequestHeadersValidator.ts +22 -22
  84. package/src/options/IRequestQueryValidator.ts +20 -20
  85. package/src/options/IResponseBodyQuerifier.ts +25 -25
  86. package/src/options/IResponseBodyStringifier.ts +25 -25
  87. package/src/programmers/PlainBodyProgrammer.ts +52 -56
  88. package/src/programmers/TypedBodyProgrammer.ts +108 -112
  89. package/src/programmers/TypedExceptionProgrammer.ts +72 -76
  90. package/src/programmers/TypedHeadersProgrammer.ts +56 -59
  91. package/src/programmers/TypedParamProgrammer.ts +24 -25
  92. package/src/programmers/TypedQueryBodyProgrammer.ts +56 -57
  93. package/src/programmers/TypedQueryProgrammer.ts +56 -57
  94. package/src/programmers/TypedQueryRouteProgrammer.ts +51 -55
  95. package/src/programmers/TypedRouteProgrammer.ts +51 -55
  96. package/src/programmers/http/HttpAssertQuerifyProgrammer.ts +58 -59
  97. package/src/programmers/http/HttpIsQuerifyProgrammer.ts +62 -63
  98. package/src/programmers/http/HttpQuerifyProgrammer.ts +96 -105
  99. package/src/programmers/http/HttpValidateQuerifyProgrammer.ts +63 -64
  100. package/src/programmers/internal/CoreMetadataUtil.ts +21 -21
  101. package/src/transform.ts +35 -36
  102. package/src/transformers/FileTransformer.ts +66 -67
  103. package/src/transformers/MethodTransformer.ts +94 -97
  104. package/src/transformers/NodeTransformer.ts +16 -16
  105. package/src/transformers/ParameterDecoratorTransformer.ts +121 -126
  106. package/src/transformers/ParameterTransformer.ts +48 -53
  107. package/src/transformers/TypedExceptionTransformer.ts +49 -51
  108. package/src/transformers/TypedRouteTransformer.ts +95 -96
  109. package/src/typings/Creator.ts +3 -3
  110. package/src/utils/ExceptionManager.ts +112 -112
  111. package/src/utils/Singleton.ts +20 -20
  112. package/src/utils/SourceFinder.ts +57 -60
@@ -1,73 +1,68 @@
1
- import { BadRequestException } from "@nestjs/common";
2
-
3
- import typia, { IValidation, TypeGuardError } from "typia";
4
-
5
- import { IRequestHeadersValidator } from "../../options/IRequestHeadersValidator";
6
- import { NoTransformConfigureError } from "./NoTransformConfigureError";
7
-
8
- export const validate_request_headers = <T>(
9
- validator?: IRequestHeadersValidator<T>,
10
- ) => {
11
- if (!validator) return () => NoTransformConfigureError("TypedHeaders");
12
- else if (validator.type === "assert") return assert(validator.assert);
13
- else if (validator.type === "is") return is(validator.is);
14
- else if (validator.type === "validate") return validate(validator.validate);
15
- return () =>
16
- new Error(
17
- `Error on nestia.core.TypedHeaders(): invalid typed validator.`,
18
- );
19
- };
20
-
21
- const assert =
22
- <T>(closure: (input: Record<string, string | string[] | undefined>) => T) =>
23
- (
24
- input: Record<string, string | string[] | undefined>,
25
- ): T | BadRequestException => {
26
- try {
27
- return closure(input);
28
- } catch (exp) {
29
- if (typia.is<TypeGuardError>(exp)) {
30
- return new BadRequestException({
31
- path: exp.path,
32
- reason: exp.message,
33
- expected: exp.expected,
34
- value: exp.value,
35
- message: MESSAGE,
36
- });
37
- }
38
- throw exp;
39
- }
40
- };
41
-
42
- const is =
43
- <T>(
44
- closure: (
45
- input: Record<string, string | string[] | undefined>,
46
- ) => T | null,
47
- ) =>
48
- (
49
- input: Record<string, string | string[] | undefined>,
50
- ): T | BadRequestException => {
51
- const result: T | null = closure(input);
52
- return result !== null ? result : new BadRequestException(MESSAGE);
53
- };
54
-
55
- const validate =
56
- <T>(
57
- closure: (
58
- input: Record<string, string | string[] | undefined>,
59
- ) => IValidation<T>,
60
- ) =>
61
- (
62
- input: Record<string, string | string[] | undefined>,
63
- ): T | BadRequestException => {
64
- const result: IValidation<T> = closure(input);
65
- return result.success
66
- ? result.data
67
- : new BadRequestException({
68
- errors: result.errors,
69
- message: MESSAGE,
70
- });
71
- };
72
-
73
- const MESSAGE = "Request headers data is not following the promised type.";
1
+ import { BadRequestException } from "@nestjs/common";
2
+ import typia, { IValidation, TypeGuardError } from "typia";
3
+
4
+ import { IRequestHeadersValidator } from "../../options/IRequestHeadersValidator";
5
+ import { NoTransformConfigureError } from "./NoTransformConfigureError";
6
+
7
+ export const validate_request_headers = <T>(
8
+ validator?: IRequestHeadersValidator<T>,
9
+ ) => {
10
+ if (!validator) return () => NoTransformConfigureError("TypedHeaders");
11
+ else if (validator.type === "assert") return assert(validator.assert);
12
+ else if (validator.type === "is") return is(validator.is);
13
+ else if (validator.type === "validate") return validate(validator.validate);
14
+ return () =>
15
+ new Error(`Error on nestia.core.TypedHeaders(): invalid typed validator.`);
16
+ };
17
+
18
+ const assert =
19
+ <T>(closure: (input: Record<string, string | string[] | undefined>) => T) =>
20
+ (
21
+ input: Record<string, string | string[] | undefined>,
22
+ ): T | BadRequestException => {
23
+ try {
24
+ return closure(input);
25
+ } catch (exp) {
26
+ if (typia.is<TypeGuardError>(exp)) {
27
+ return new BadRequestException({
28
+ path: exp.path,
29
+ reason: exp.message,
30
+ expected: exp.expected,
31
+ value: exp.value,
32
+ message: MESSAGE,
33
+ });
34
+ }
35
+ throw exp;
36
+ }
37
+ };
38
+
39
+ const is =
40
+ <T>(
41
+ closure: (input: Record<string, string | string[] | undefined>) => T | null,
42
+ ) =>
43
+ (
44
+ input: Record<string, string | string[] | undefined>,
45
+ ): T | BadRequestException => {
46
+ const result: T | null = closure(input);
47
+ return result !== null ? result : new BadRequestException(MESSAGE);
48
+ };
49
+
50
+ const validate =
51
+ <T>(
52
+ closure: (
53
+ input: Record<string, string | string[] | undefined>,
54
+ ) => IValidation<T>,
55
+ ) =>
56
+ (
57
+ input: Record<string, string | string[] | undefined>,
58
+ ): T | BadRequestException => {
59
+ const result: IValidation<T> = closure(input);
60
+ return result.success
61
+ ? result.data
62
+ : new BadRequestException({
63
+ errors: result.errors,
64
+ message: MESSAGE,
65
+ });
66
+ };
67
+
68
+ const MESSAGE = "Request headers data is not following the promised type.";
@@ -1,59 +1,56 @@
1
- import { BadRequestException } from "@nestjs/common";
2
-
3
- import typia, { IValidation, TypeGuardError } from "typia";
4
-
5
- import { IRequestQueryValidator } from "../../options/IRequestQueryValidator";
6
- import { NoTransformConfigureError } from "./NoTransformConfigureError";
7
-
8
- export const validate_request_query = <T>(
9
- validator?: IRequestQueryValidator<T>,
10
- ) => {
11
- if (!validator) return () => NoTransformConfigureError("TypedQuery");
12
- else if (validator.type === "assert") return assert(validator.assert);
13
- else if (validator.type === "is") return is(validator.is);
14
- else if (validator.type === "validate") return validate(validator.validate);
15
- return () =>
16
- new Error(
17
- `Error on nestia.core.TypedQuery(): invalid typed validator.`,
18
- );
19
- };
20
-
21
- const assert =
22
- <T>(closure: (input: URLSearchParams) => T) =>
23
- (input: URLSearchParams): T | BadRequestException => {
24
- try {
25
- return closure(input);
26
- } catch (exp) {
27
- if (typia.is<TypeGuardError>(exp)) {
28
- return new BadRequestException({
29
- path: exp.path,
30
- reason: exp.message,
31
- expected: exp.expected,
32
- value: exp.value,
33
- message: MESSAGE,
34
- });
35
- }
36
- throw exp;
37
- }
38
- };
39
-
40
- const is =
41
- <T>(closure: (input: URLSearchParams) => T | null) =>
42
- (input: URLSearchParams): T | BadRequestException => {
43
- const result: T | null = closure(input);
44
- return result !== null ? result : new BadRequestException(MESSAGE);
45
- };
46
-
47
- const validate =
48
- <T>(closure: (input: URLSearchParams) => IValidation<T>) =>
49
- (input: URLSearchParams): T | BadRequestException => {
50
- const result: IValidation<T> = closure(input);
51
- return result.success
52
- ? result.data
53
- : new BadRequestException({
54
- errors: result.errors,
55
- message: MESSAGE,
56
- });
57
- };
58
-
59
- 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 { NoTransformConfigureError } from "./NoTransformConfigureError";
6
+
7
+ export const validate_request_query = <T>(
8
+ validator?: IRequestQueryValidator<T>,
9
+ ) => {
10
+ if (!validator) return () => NoTransformConfigureError("TypedQuery");
11
+ else if (validator.type === "assert") return assert(validator.assert);
12
+ else if (validator.type === "is") return is(validator.is);
13
+ else if (validator.type === "validate") return validate(validator.validate);
14
+ return () =>
15
+ new Error(`Error on nestia.core.TypedQuery(): invalid typed validator.`);
16
+ };
17
+
18
+ const assert =
19
+ <T>(closure: (input: URLSearchParams) => T) =>
20
+ (input: URLSearchParams): T | BadRequestException => {
21
+ try {
22
+ return closure(input);
23
+ } catch (exp) {
24
+ if (typia.is<TypeGuardError>(exp)) {
25
+ return new BadRequestException({
26
+ path: exp.path,
27
+ reason: exp.message,
28
+ expected: exp.expected,
29
+ value: exp.value,
30
+ message: MESSAGE,
31
+ });
32
+ }
33
+ throw exp;
34
+ }
35
+ };
36
+
37
+ const is =
38
+ <T>(closure: (input: URLSearchParams) => T | null) =>
39
+ (input: URLSearchParams): T | BadRequestException => {
40
+ const result: T | null = closure(input);
41
+ return result !== null ? result : new BadRequestException(MESSAGE);
42
+ };
43
+
44
+ const validate =
45
+ <T>(closure: (input: URLSearchParams) => IValidation<T>) =>
46
+ (input: URLSearchParams): T | BadRequestException => {
47
+ const result: IValidation<T> = closure(input);
48
+ return result.success
49
+ ? result.data
50
+ : new BadRequestException({
51
+ errors: result.errors,
52
+ message: MESSAGE,
53
+ });
54
+ };
55
+
56
+ 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,14 +1,14 @@
1
- export * from "./decorators/DynamicModule";
2
- export * from "./decorators/EncryptedBody";
3
- export * from "./decorators/EncryptedController";
4
- export * from "./decorators/EncryptedModule";
5
- export * from "./decorators/EncryptedRoute";
6
- export * from "./utils/ExceptionManager";
7
- export * from "./decorators/PlainBody";
8
- export * from "./decorators/TypedBody";
9
- export * from "./decorators/TypedException";
10
- export * from "./decorators/TypedHeaders";
11
- export * from "./decorators/TypedParam";
12
- export * from "./decorators/TypedRoute";
13
- export * from "./decorators/TypedQuery";
14
- export * from "./options/INestiaTransformOptions";
1
+ export * from "./decorators/DynamicModule";
2
+ export * from "./decorators/EncryptedBody";
3
+ export * from "./decorators/EncryptedController";
4
+ export * from "./decorators/EncryptedModule";
5
+ export * from "./decorators/EncryptedRoute";
6
+ export * from "./utils/ExceptionManager";
7
+ export * from "./decorators/PlainBody";
8
+ export * from "./decorators/TypedBody";
9
+ export * from "./decorators/TypedException";
10
+ export * from "./decorators/TypedHeaders";
11
+ export * from "./decorators/TypedParam";
12
+ export * from "./decorators/TypedRoute";
13
+ export * from "./decorators/TypedQuery";
14
+ export * from "./options/INestiaTransformOptions";
@@ -1,17 +1,17 @@
1
- export interface INestiaTransformOptions {
2
- validate?: // NORMAL
3
- | "assert"
4
- | "is"
5
- | "validate"
6
- // STRICT
7
- | "assertEquals"
8
- | "equals"
9
- | "validateEquals"
10
- // CLONE
11
- | "assertClone"
12
- | "validateClone"
13
- // PRUNE
14
- | "assertPrune"
15
- | "validatePrune";
16
- stringify?: "stringify" | "assert" | "is" | "validate" | null;
17
- }
1
+ export interface INestiaTransformOptions {
2
+ validate?: // NORMAL
3
+ | "assert"
4
+ | "is"
5
+ | "validate"
6
+ // STRICT
7
+ | "assertEquals"
8
+ | "equals"
9
+ | "validateEquals"
10
+ // CLONE
11
+ | "assertClone"
12
+ | "validateClone"
13
+ // PRUNE
14
+ | "assertPrune"
15
+ | "validatePrune";
16
+ stringify?: "stringify" | "assert" | "is" | "validate" | null;
17
+ }
@@ -1,7 +1,7 @@
1
- import { IProject } from "typia/lib/transformers/IProject";
2
-
3
- import { INestiaTransformOptions } from "./INestiaTransformOptions";
4
-
5
- export interface INestiaTransformProject extends Omit<IProject, "options"> {
6
- options: INestiaTransformOptions;
7
- }
1
+ import { IProject } from "typia/lib/transformers/IProject";
2
+
3
+ import { INestiaTransformOptions } from "./INestiaTransformOptions";
4
+
5
+ export interface INestiaTransformProject extends Omit<IProject, "options"> {
6
+ options: INestiaTransformOptions;
7
+ }
@@ -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,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,25 +1,25 @@
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
- export namespace IResponseBodyStringifier {
9
- export interface IStringify<T> {
10
- type: "stringify";
11
- stringify: (input: T) => string;
12
- }
13
- export interface IIs<T> {
14
- type: "is";
15
- is: (input: T) => string | null;
16
- }
17
- export interface IAssert<T> {
18
- type: "assert";
19
- assert: (input: T) => string;
20
- }
21
- export interface IValidate<T> {
22
- type: "validate";
23
- validate: (input: T) => IValidation<string>;
24
- }
25
- }
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
+ export namespace IResponseBodyStringifier {
9
+ export interface IStringify<T> {
10
+ type: "stringify";
11
+ stringify: (input: T) => string;
12
+ }
13
+ export interface IIs<T> {
14
+ type: "is";
15
+ is: (input: T) => string | null;
16
+ }
17
+ export interface IAssert<T> {
18
+ type: "assert";
19
+ assert: (input: T) => string;
20
+ }
21
+ export interface IValidate<T> {
22
+ type: "validate";
23
+ validate: (input: T) => IValidation<string>;
24
+ }
25
+ }