@typia/interface 12.0.0-dev.20260309 → 12.0.0-dev.20260311

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 (85) hide show
  1. package/lib/http/IHttpLlmController.d.ts +5 -5
  2. package/lib/schema/IJsonParseResult.d.ts +1 -3
  3. package/lib/schema/ILlmApplication.d.ts +1 -2
  4. package/lib/schema/ILlmController.d.ts +2 -5
  5. package/lib/schema/ILlmSchema.d.ts +1 -11
  6. package/package.json +1 -1
  7. package/src/http/IHttpConnection.ts +200 -200
  8. package/src/http/IHttpLlmApplication.ts +72 -72
  9. package/src/http/IHttpLlmController.ts +96 -96
  10. package/src/http/IHttpLlmFunction.ts +34 -34
  11. package/src/http/IHttpMigrateApplication.ts +48 -48
  12. package/src/http/IHttpMigrateRoute.ts +165 -165
  13. package/src/http/IHttpResponse.ts +42 -42
  14. package/src/http/index.ts +7 -7
  15. package/src/index.ts +9 -9
  16. package/src/metadata/IJsDocTagInfo.ts +25 -25
  17. package/src/metadata/IMetadataComponents.ts +24 -24
  18. package/src/metadata/IMetadataSchema.ts +293 -293
  19. package/src/metadata/IMetadataSchemaCollection.ts +20 -20
  20. package/src/metadata/IMetadataSchemaUnit.ts +20 -20
  21. package/src/metadata/IMetadataTypeTag.ts +39 -39
  22. package/src/metadata/index.ts +6 -6
  23. package/src/openapi/OpenApi.ts +643 -643
  24. package/src/openapi/OpenApiV3.ts +655 -655
  25. package/src/openapi/OpenApiV3_1.ts +735 -735
  26. package/src/openapi/SwaggerV2.ts +559 -559
  27. package/src/openapi/index.ts +4 -4
  28. package/src/protobuf/ProtobufWire.ts +51 -51
  29. package/src/protobuf/index.ts +1 -1
  30. package/src/schema/IJsonParseResult.ts +134 -136
  31. package/src/schema/IJsonSchemaApplication.ts +274 -274
  32. package/src/schema/IJsonSchemaAttribute.ts +158 -158
  33. package/src/schema/IJsonSchemaCollection.ts +123 -123
  34. package/src/schema/IJsonSchemaTransformError.ts +86 -86
  35. package/src/schema/IJsonSchemaUnit.ts +120 -120
  36. package/src/schema/ILlmApplication.ts +98 -99
  37. package/src/schema/ILlmController.ts +54 -57
  38. package/src/schema/ILlmFunction.ts +145 -145
  39. package/src/schema/ILlmSchema.ts +473 -484
  40. package/src/schema/IResult.ts +84 -84
  41. package/src/schema/IValidation.ts +134 -134
  42. package/src/schema/index.ts +14 -14
  43. package/src/tags/Constant.ts +49 -49
  44. package/src/tags/ContentMediaType.ts +40 -40
  45. package/src/tags/Default.ts +50 -50
  46. package/src/tags/Example.ts +48 -48
  47. package/src/tags/Examples.ts +50 -50
  48. package/src/tags/ExclusiveMaximum.ts +46 -46
  49. package/src/tags/ExclusiveMinimum.ts +46 -46
  50. package/src/tags/Format.ts +76 -76
  51. package/src/tags/JsonSchemaPlugin.ts +45 -45
  52. package/src/tags/MaxItems.ts +39 -39
  53. package/src/tags/MaxLength.ts +37 -37
  54. package/src/tags/Maximum.ts +44 -44
  55. package/src/tags/MinItems.ts +39 -39
  56. package/src/tags/MinLength.ts +37 -37
  57. package/src/tags/Minimum.ts +44 -44
  58. package/src/tags/MultipleOf.ts +54 -54
  59. package/src/tags/Pattern.ts +59 -59
  60. package/src/tags/Sequence.ts +43 -43
  61. package/src/tags/TagBase.ts +131 -131
  62. package/src/tags/Type.ts +70 -70
  63. package/src/tags/UniqueItems.ts +44 -44
  64. package/src/tags/index.ts +21 -21
  65. package/src/typings/AssertionGuard.ts +12 -12
  66. package/src/typings/Atomic.ts +21 -21
  67. package/src/typings/CamelCase.ts +75 -75
  68. package/src/typings/ClassProperties.ts +15 -15
  69. package/src/typings/DeepPartial.ts +39 -39
  70. package/src/typings/OmitNever.ts +12 -12
  71. package/src/typings/PascalCase.ts +71 -71
  72. package/src/typings/Primitive.ts +71 -71
  73. package/src/typings/ProtobufAtomic.ts +30 -30
  74. package/src/typings/Resolved.ts +58 -58
  75. package/src/typings/SnakeCase.ts +126 -126
  76. package/src/typings/SpecialFields.ts +13 -13
  77. package/src/typings/ValidationPipe.ts +20 -20
  78. package/src/typings/index.ts +14 -14
  79. package/src/typings/internal/Equal.ts +14 -14
  80. package/src/typings/internal/IsTuple.ts +17 -17
  81. package/src/typings/internal/NativeClass.ts +31 -31
  82. package/src/typings/internal/ValueOf.ts +29 -29
  83. package/src/utils/IRandomGenerator.ts +105 -105
  84. package/src/utils/IReadableURLSearchParams.ts +25 -25
  85. package/src/utils/index.ts +2 -2
@@ -1,96 +1,96 @@
1
- import { IHttpConnection } from "./IHttpConnection";
2
- import { IHttpLlmApplication } from "./IHttpLlmApplication";
3
- import { IHttpLlmFunction } from "./IHttpLlmFunction";
4
- import { IHttpResponse } from "./IHttpResponse";
5
-
6
- /**
7
- * Controller of HTTP LLM function calling.
8
- *
9
- * `IHttpLlmController` is a controller for registering OpenAPI operations as
10
- * LLM function calling tools. It contains {@link IHttpLlmApplication} with
11
- * {@link IHttpLlmFunction function calling schemas}, {@link name identifier},
12
- * and {@link connection} to the API server.
13
- *
14
- * You can create this controller with {@link HttpLlm.controller} function,
15
- * and register it to MCP server with {@link registerMcpControllers}:
16
- *
17
- * ```typescript
18
- * import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
19
- * import { HttpLlm } from "@typia/utils";
20
- * import { registerMcpControllers } from "@typia/mcp";
21
- *
22
- * const server = new McpServer({ name: "my-server", version: "1.0.0" });
23
- * registerMcpControllers({
24
- * server,
25
- * controllers: [
26
- * HttpLlm.controller({
27
- * name: "shopping",
28
- * document: await fetch(
29
- * "https://shopping-be.wrtn.io/editor/swagger.json",
30
- * ).then((r) => r.json()),
31
- * connection: {
32
- * host: "https://shopping-be.wrtn.io",
33
- * headers: {
34
- * Authorization: "Bearer ********",
35
- * },
36
- * },
37
- * }),
38
- * ],
39
- * });
40
- * ```
41
- *
42
- * For TypeScript class-based controller, use {@link ILlmController} instead.
43
- *
44
- * @author Jeongho Nam - https://github.com/samchon
45
- */
46
- export interface IHttpLlmController {
47
- /** Protocol discriminator. */
48
- protocol: "http";
49
-
50
- /** Identifier name of the controller. */
51
- name: string;
52
-
53
- /** Application schema of function calling. */
54
- application: IHttpLlmApplication;
55
-
56
- /**
57
- * Connection to the server.
58
- *
59
- * Connection to the API server including the URL and headers.
60
- */
61
- connection: IHttpConnection;
62
-
63
- /**
64
- * Executor of the API function.
65
- *
66
- * Default executor is {@link HttpLlm.execute} function, and you can override
67
- * it with your own function.
68
- *
69
- * @param props Properties of the API function call
70
- * @returns HTTP response of the API function call
71
- */
72
- execute?:
73
- | undefined
74
- | ((props: {
75
- /** Connection to the server. */
76
- connection: IHttpConnection;
77
-
78
- /** Application schema. */
79
- application: IHttpLlmApplication;
80
-
81
- /** Function schema. */
82
- function: IHttpLlmFunction;
83
-
84
- /**
85
- * Arguments of the function calling.
86
- *
87
- * It is an object of key-value pairs of the API function's parameters.
88
- * The property keys are composed by below rules:
89
- *
90
- * - Parameter names
91
- * - Query parameter as an object type if exists
92
- * - Body parameter if exists
93
- */
94
- arguments: object;
95
- }) => Promise<IHttpResponse>);
96
- }
1
+ import { IHttpConnection } from "./IHttpConnection";
2
+ import { IHttpLlmApplication } from "./IHttpLlmApplication";
3
+ import { IHttpLlmFunction } from "./IHttpLlmFunction";
4
+ import { IHttpResponse } from "./IHttpResponse";
5
+
6
+ /**
7
+ * Controller of HTTP LLM function calling.
8
+ *
9
+ * `IHttpLlmController` is a controller for registering OpenAPI operations as
10
+ * LLM function calling tools. It contains {@link IHttpLlmApplication} with
11
+ * {@link IHttpLlmFunction function calling schemas}, {@link name identifier}, and
12
+ * {@link connection} to the API server.
13
+ *
14
+ * You can create this controller with {@link HttpLlm.controller} function, and
15
+ * register it to MCP server with {@link registerMcpControllers}:
16
+ *
17
+ * ```typescript
18
+ * import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
19
+ * import { registerMcpControllers } from "@typia/mcp";
20
+ * import { HttpLlm } from "@typia/utils";
21
+ *
22
+ * const server = new McpServer({ name: "my-server", version: "1.0.0" });
23
+ * registerMcpControllers({
24
+ * server,
25
+ * controllers: [
26
+ * HttpLlm.controller({
27
+ * name: "shopping",
28
+ * document: await fetch(
29
+ * "https://shopping-be.wrtn.io/editor/swagger.json",
30
+ * ).then((r) => r.json()),
31
+ * connection: {
32
+ * host: "https://shopping-be.wrtn.io",
33
+ * headers: {
34
+ * Authorization: "Bearer ********",
35
+ * },
36
+ * },
37
+ * }),
38
+ * ],
39
+ * });
40
+ * ```
41
+ *
42
+ * For TypeScript class-based controller, use {@link ILlmController} instead.
43
+ *
44
+ * @author Jeongho Nam - https://github.com/samchon
45
+ */
46
+ export interface IHttpLlmController {
47
+ /** Protocol discriminator. */
48
+ protocol: "http";
49
+
50
+ /** Identifier name of the controller. */
51
+ name: string;
52
+
53
+ /** Application schema of function calling. */
54
+ application: IHttpLlmApplication;
55
+
56
+ /**
57
+ * Connection to the server.
58
+ *
59
+ * Connection to the API server including the URL and headers.
60
+ */
61
+ connection: IHttpConnection;
62
+
63
+ /**
64
+ * Executor of the API function.
65
+ *
66
+ * Default executor is {@link HttpLlm.execute} function, and you can override
67
+ * it with your own function.
68
+ *
69
+ * @param props Properties of the API function call
70
+ * @returns HTTP response of the API function call
71
+ */
72
+ execute?:
73
+ | undefined
74
+ | ((props: {
75
+ /** Connection to the server. */
76
+ connection: IHttpConnection;
77
+
78
+ /** Application schema. */
79
+ application: IHttpLlmApplication;
80
+
81
+ /** Function schema. */
82
+ function: IHttpLlmFunction;
83
+
84
+ /**
85
+ * Arguments of the function calling.
86
+ *
87
+ * It is an object of key-value pairs of the API function's parameters.
88
+ * The property keys are composed by below rules:
89
+ *
90
+ * - Parameter names
91
+ * - Query parameter as an object type if exists
92
+ * - Body parameter if exists
93
+ */
94
+ arguments: object;
95
+ }) => Promise<IHttpResponse>);
96
+ }
@@ -1,34 +1,34 @@
1
- import { OpenApi } from "../openapi/OpenApi";
2
- import { ILlmFunction } from "../schema/ILlmFunction";
3
- import { IHttpMigrateRoute } from "./IHttpMigrateRoute";
4
-
5
- /**
6
- * LLM function calling schema from OpenAPI operation.
7
- *
8
- * Extends {@link ILlmFunction} with HTTP-specific properties. Generated from
9
- * {@link OpenApi.IOperation} as part of {@link IHttpLlmApplication}.
10
- *
11
- * - {@link method}, {@link path}: HTTP endpoint info
12
- * - {@link operation}: Source OpenAPI operation
13
- * - {@link route}: Source migration route
14
- *
15
- * Inherits {@link parse} and {@link validate} from {@link ILlmFunction}.
16
- *
17
- * @author Jeongho Nam - https://github.com/samchon
18
- */
19
- export interface IHttpLlmFunction extends ILlmFunction {
20
- /** HTTP method of the endpoint. */
21
- method: "get" | "post" | "patch" | "put" | "delete";
22
-
23
- /** Path of the endpoint. */
24
- path: string;
25
-
26
- /** Category tags from {@link OpenApi.IOperation.tags}. */
27
- tags?: string[];
28
-
29
- /** Returns the source {@link OpenApi.IOperation}. */
30
- operation: () => OpenApi.IOperation;
31
-
32
- /** Returns the source {@link IHttpMigrateRoute}. */
33
- route: () => IHttpMigrateRoute;
34
- }
1
+ import { OpenApi } from "../openapi/OpenApi";
2
+ import { ILlmFunction } from "../schema/ILlmFunction";
3
+ import { IHttpMigrateRoute } from "./IHttpMigrateRoute";
4
+
5
+ /**
6
+ * LLM function calling schema from OpenAPI operation.
7
+ *
8
+ * Extends {@link ILlmFunction} with HTTP-specific properties. Generated from
9
+ * {@link OpenApi.IOperation} as part of {@link IHttpLlmApplication}.
10
+ *
11
+ * - {@link method}, {@link path}: HTTP endpoint info
12
+ * - {@link operation}: Source OpenAPI operation
13
+ * - {@link route}: Source migration route
14
+ *
15
+ * Inherits {@link parse} and {@link validate} from {@link ILlmFunction}.
16
+ *
17
+ * @author Jeongho Nam - https://github.com/samchon
18
+ */
19
+ export interface IHttpLlmFunction extends ILlmFunction {
20
+ /** HTTP method of the endpoint. */
21
+ method: "get" | "post" | "patch" | "put" | "delete";
22
+
23
+ /** Path of the endpoint. */
24
+ path: string;
25
+
26
+ /** Category tags from {@link OpenApi.IOperation.tags}. */
27
+ tags?: string[];
28
+
29
+ /** Returns the source {@link OpenApi.IOperation}. */
30
+ operation: () => OpenApi.IOperation;
31
+
32
+ /** Returns the source {@link IHttpMigrateRoute}. */
33
+ route: () => IHttpMigrateRoute;
34
+ }
@@ -1,48 +1,48 @@
1
- import { OpenApi } from "../openapi/OpenApi";
2
- import { IHttpMigrateRoute } from "./IHttpMigrateRoute";
3
-
4
- /**
5
- * Migrated application from OpenAPI document.
6
- *
7
- * `IHttpMigrateApplication` converts OpenAPI operations into callable HTTP
8
- * routes via `HttpMigration.application()`. Unlike {@link IHttpLlmApplication}
9
- * which targets LLM function calling, this focuses on SDK/client code
10
- * generation with full HTTP semantics.
11
- *
12
- * Each {@link IHttpMigrateRoute} represents a single API endpoint with:
13
- *
14
- * - Resolved path parameters (`:id` format)
15
- * - Combined query/header schemas as objects
16
- * - Request/response body with content type
17
- * - Accessor path for RPC-style function naming
18
- *
19
- * Failed operations go to {@link errors} with detailed messages.
20
- *
21
- * @author Jeongho Nam - https://github.com/samchon
22
- */
23
- export interface IHttpMigrateApplication {
24
- /** Successfully migrated routes. */
25
- routes: IHttpMigrateRoute[];
26
-
27
- /** Operations that failed migration. */
28
- errors: IHttpMigrateApplication.IError[];
29
-
30
- /** Returns source OpenAPI document. */
31
- document: () => OpenApi.IDocument;
32
- }
33
- export namespace IHttpMigrateApplication {
34
- /** Migration error for an operation. */
35
- export interface IError {
36
- /** Returns source operation. */
37
- operation: () => OpenApi.IOperation;
38
-
39
- /** HTTP method. */
40
- method: "head" | "get" | "post" | "put" | "patch" | "delete";
41
-
42
- /** Operation path. */
43
- path: string;
44
-
45
- /** Error messages. */
46
- messages: string[];
47
- }
48
- }
1
+ import { OpenApi } from "../openapi/OpenApi";
2
+ import { IHttpMigrateRoute } from "./IHttpMigrateRoute";
3
+
4
+ /**
5
+ * Migrated application from OpenAPI document.
6
+ *
7
+ * `IHttpMigrateApplication` converts OpenAPI operations into callable HTTP
8
+ * routes via `HttpMigration.application()`. Unlike {@link IHttpLlmApplication}
9
+ * which targets LLM function calling, this focuses on SDK/client code
10
+ * generation with full HTTP semantics.
11
+ *
12
+ * Each {@link IHttpMigrateRoute} represents a single API endpoint with:
13
+ *
14
+ * - Resolved path parameters (`:id` format)
15
+ * - Combined query/header schemas as objects
16
+ * - Request/response body with content type
17
+ * - Accessor path for RPC-style function naming
18
+ *
19
+ * Failed operations go to {@link errors} with detailed messages.
20
+ *
21
+ * @author Jeongho Nam - https://github.com/samchon
22
+ */
23
+ export interface IHttpMigrateApplication {
24
+ /** Successfully migrated routes. */
25
+ routes: IHttpMigrateRoute[];
26
+
27
+ /** Operations that failed migration. */
28
+ errors: IHttpMigrateApplication.IError[];
29
+
30
+ /** Returns source OpenAPI document. */
31
+ document: () => OpenApi.IDocument;
32
+ }
33
+ export namespace IHttpMigrateApplication {
34
+ /** Migration error for an operation. */
35
+ export interface IError {
36
+ /** Returns source operation. */
37
+ operation: () => OpenApi.IOperation;
38
+
39
+ /** HTTP method. */
40
+ method: "head" | "get" | "post" | "put" | "patch" | "delete";
41
+
42
+ /** Operation path. */
43
+ path: string;
44
+
45
+ /** Error messages. */
46
+ messages: string[];
47
+ }
48
+ }