@typia/interface 12.0.0-dev.20260316 → 12.0.0

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Jeongho Nam
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Jeongho Nam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,29 +1,29 @@
1
- # `@typia/interface`
2
-
3
- ![Typia Logo](https://typia.io/logo.png)
4
-
5
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/typia/blob/master/LICENSE)
6
- [![NPM Version](https://img.shields.io/npm/v/typia.svg)](https://www.npmjs.com/package/typia)
7
- [![NPM Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia)
8
- [![Build Status](https://github.com/samchon/typia/workflows/test/badge.svg)](https://github.com/samchon/typia/actions?query=workflow%3Atest)
9
- [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://typia.io/docs/)
10
- [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/typia)
11
- [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
12
-
13
- Shared type definitions and interfaces for the [`typia`](https://github.com/samchon/typia) ecosystem.
14
-
15
- This is an **internal package** of `typia`. You don't need to install it directly — it is automatically included as a dependency of `typia`.
16
-
17
- ## Key Interfaces
18
-
19
- | Module | Description |
20
- |--------|-------------|
21
- | `ILlmApplication` | LLM function calling application schema |
22
- | `ILlmController` | Class-based LLM controller |
23
- | `ILlmSchema` | LLM schema definition |
24
- | `IJsonSchemaCollection` | JSON Schema collection |
25
- | `IValidation` | Validation result (success/failure with errors) |
26
- | `IHttpLlmApplication` | HTTP-based LLM application schema |
27
- | `IHttpLlmController` | HTTP-based LLM controller |
28
- | `IHttpConnection` | API connection configuration |
29
- | `tags` | Decorator tags (`Format`, `Minimum`, `Maximum`, `Pattern`, etc.) |
1
+ # `@typia/interface`
2
+
3
+ ![Typia Logo](https://typia.io/logo.png)
4
+
5
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/typia/blob/master/LICENSE)
6
+ [![NPM Version](https://img.shields.io/npm/v/typia.svg)](https://www.npmjs.com/package/typia)
7
+ [![NPM Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia)
8
+ [![Build Status](https://github.com/samchon/typia/workflows/test/badge.svg)](https://github.com/samchon/typia/actions?query=workflow%3Atest)
9
+ [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://typia.io/docs/)
10
+ [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/typia)
11
+ [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
12
+
13
+ Shared type definitions and interfaces for the [`typia`](https://github.com/samchon/typia) ecosystem.
14
+
15
+ This is an **internal package** of `typia`. You don't need to install it directly — it is automatically included as a dependency of `typia`.
16
+
17
+ ## Key Interfaces
18
+
19
+ | Module | Description |
20
+ |--------|-------------|
21
+ | `ILlmApplication` | LLM function calling application schema |
22
+ | `ILlmController` | Class-based LLM controller |
23
+ | `ILlmSchema` | LLM schema definition |
24
+ | `IJsonSchemaCollection` | JSON Schema collection |
25
+ | `IValidation` | Validation result (success/failure with errors) |
26
+ | `IHttpLlmApplication` | HTTP-based LLM application schema |
27
+ | `IHttpLlmController` | HTTP-based LLM controller |
28
+ | `IHttpConnection` | API connection configuration |
29
+ | `tags` | Decorator tags (`Format`, `Minimum`, `Maximum`, `Pattern`, etc.) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typia/interface",
3
- "version": "12.0.0-dev.20260316",
3
+ "version": "12.0.0",
4
4
  "description": "Superfast runtime validators with only one line",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -1,72 +1,72 @@
1
- import { OpenApi } from "../openapi/OpenApi";
2
- import { ILlmSchema } from "../schema/ILlmSchema";
3
- import { IHttpLlmFunction } from "./IHttpLlmFunction";
4
- import { IHttpMigrateRoute } from "./IHttpMigrateRoute";
5
-
6
- /**
7
- * LLM function calling application from OpenAPI document.
8
- *
9
- * `IHttpLlmApplication` is a collection of {@link IHttpLlmFunction} schemas
10
- * converted from {@link OpenApi.IDocument} by `HttpLlm.application()`. Each
11
- * OpenAPI operation becomes an LLM-callable function.
12
- *
13
- * Successful conversions go to {@link functions}, failed ones to {@link errors}
14
- * with detailed error messages. Common failure causes:
15
- *
16
- * - Unsupported schema features (tuples, `oneOf` with incompatible types)
17
- * - Missing required fields in OpenAPI document
18
- * - Operations marked with `x-samchon-human: true`
19
- *
20
- * Configure behavior via {@link IHttpLlmApplication.IConfig}:
21
- *
22
- * - {@link IHttpLlmApplication.IConfig.maxLength}: Function name length limit
23
- * - {@link ILlmSchema.IConfig.strict}: OpenAI structured output mode
24
- *
25
- * @author Jeongho Nam - https://github.com/samchon
26
- */
27
- export interface IHttpLlmApplication {
28
- /** Successfully converted LLM function schemas. */
29
- functions: IHttpLlmFunction[];
30
-
31
- /** Operations that failed conversion. */
32
- errors: IHttpLlmApplication.IError[];
33
-
34
- /** Configuration used for composition. */
35
- config: IHttpLlmApplication.IConfig;
36
- }
37
- export namespace IHttpLlmApplication {
38
- /** Configuration for HTTP LLM application composition. */
39
- export interface IConfig extends ILlmSchema.IConfig {
40
- /**
41
- * Maximum function name length. Truncated or UUID if exceeded.
42
- *
43
- * @default 64
44
- */
45
- maxLength: number;
46
-
47
- /**
48
- * Whether to disallow superfluous properties.
49
- *
50
- * @default false
51
- */
52
- equals: boolean;
53
- }
54
-
55
- /** Composition error for an operation. */
56
- export interface IError {
57
- /** HTTP method of the failed operation. */
58
- method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
59
-
60
- /** Path of the failed operation. */
61
- path: string;
62
-
63
- /** Error messages describing the failure. */
64
- messages: string[];
65
-
66
- /** Returns source {@link OpenApi.IOperation}. */
67
- operation: () => OpenApi.IOperation;
68
-
69
- /** Returns source route. Undefined if error occurred at migration level. */
70
- route: () => IHttpMigrateRoute | undefined;
71
- }
72
- }
1
+ import { OpenApi } from "../openapi/OpenApi";
2
+ import { ILlmSchema } from "../schema/ILlmSchema";
3
+ import { IHttpLlmFunction } from "./IHttpLlmFunction";
4
+ import { IHttpMigrateRoute } from "./IHttpMigrateRoute";
5
+
6
+ /**
7
+ * LLM function calling application from OpenAPI document.
8
+ *
9
+ * `IHttpLlmApplication` is a collection of {@link IHttpLlmFunction} schemas
10
+ * converted from {@link OpenApi.IDocument} by `HttpLlm.application()`. Each
11
+ * OpenAPI operation becomes an LLM-callable function.
12
+ *
13
+ * Successful conversions go to {@link functions}, failed ones to {@link errors}
14
+ * with detailed error messages. Common failure causes:
15
+ *
16
+ * - Unsupported schema features (tuples, `oneOf` with incompatible types)
17
+ * - Missing required fields in OpenAPI document
18
+ * - Operations marked with `x-samchon-human: true`
19
+ *
20
+ * Configure behavior via {@link IHttpLlmApplication.IConfig}:
21
+ *
22
+ * - {@link IHttpLlmApplication.IConfig.maxLength}: Function name length limit
23
+ * - {@link ILlmSchema.IConfig.strict}: OpenAI structured output mode
24
+ *
25
+ * @author Jeongho Nam - https://github.com/samchon
26
+ */
27
+ export interface IHttpLlmApplication {
28
+ /** Successfully converted LLM function schemas. */
29
+ functions: IHttpLlmFunction[];
30
+
31
+ /** Operations that failed conversion. */
32
+ errors: IHttpLlmApplication.IError[];
33
+
34
+ /** Configuration used for composition. */
35
+ config: IHttpLlmApplication.IConfig;
36
+ }
37
+ export namespace IHttpLlmApplication {
38
+ /** Configuration for HTTP LLM application composition. */
39
+ export interface IConfig extends ILlmSchema.IConfig {
40
+ /**
41
+ * Maximum function name length. Truncated or UUID if exceeded.
42
+ *
43
+ * @default 64
44
+ */
45
+ maxLength: number;
46
+
47
+ /**
48
+ * Whether to disallow superfluous properties.
49
+ *
50
+ * @default false
51
+ */
52
+ equals: boolean;
53
+ }
54
+
55
+ /** Composition error for an operation. */
56
+ export interface IError {
57
+ /** HTTP method of the failed operation. */
58
+ method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
59
+
60
+ /** Path of the failed operation. */
61
+ path: string;
62
+
63
+ /** Error messages describing the failure. */
64
+ messages: string[];
65
+
66
+ /** Returns source {@link OpenApi.IOperation}. */
67
+ operation: () => OpenApi.IOperation;
68
+
69
+ /** Returns source route. Undefined if error occurred at migration level. */
70
+ route: () => IHttpMigrateRoute | undefined;
71
+ }
72
+ }
@@ -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: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
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: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
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" | "query";
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" | "query";
41
+
42
+ /** Operation path. */
43
+ path: string;
44
+
45
+ /** Error messages. */
46
+ messages: string[];
47
+ }
48
+ }