@typia/interface 12.0.0-dev.20260310 → 12.0.0-dev.20260312
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/lib/http/IHttpLlmApplication.d.ts +1 -1
- package/lib/http/IHttpLlmFunction.d.ts +1 -1
- package/lib/http/IHttpMigrateApplication.d.ts +1 -1
- package/lib/http/IHttpMigrateRoute.d.ts +2 -2
- package/lib/openapi/OpenApi.d.ts +35 -10
- package/lib/openapi/OpenApiV3.d.ts +7 -0
- package/lib/openapi/OpenApiV3_1.d.ts +7 -0
- package/lib/openapi/OpenApiV3_2.d.ts +489 -0
- package/lib/openapi/OpenApiV3_2.js +3 -0
- package/lib/openapi/OpenApiV3_2.js.map +1 -0
- package/lib/openapi/SwaggerV2.d.ts +7 -0
- package/lib/openapi/index.d.ts +1 -0
- package/lib/openapi/index.js +1 -0
- package/lib/openapi/index.js.map +1 -1
- package/lib/schema/ILlmApplication.d.ts +1 -2
- package/lib/schema/ILlmSchema.d.ts +1 -11
- package/lib/schema/ILlmStructuredOutput.d.ts +108 -0
- package/lib/schema/ILlmStructuredOutput.js +3 -0
- package/lib/schema/ILlmStructuredOutput.js.map +1 -0
- package/lib/schema/index.d.ts +1 -0
- package/lib/schema/index.js +1 -0
- package/lib/schema/index.js.map +1 -1
- package/package.json +1 -1
- package/src/http/IHttpLlmApplication.ts +72 -72
- package/src/http/IHttpLlmFunction.ts +34 -34
- package/src/http/IHttpMigrateApplication.ts +48 -48
- package/src/http/IHttpMigrateRoute.ts +165 -165
- package/src/openapi/OpenApi.ts +680 -643
- package/src/openapi/OpenApiV3.ts +663 -655
- package/src/openapi/OpenApiV3_1.ts +743 -735
- package/src/openapi/OpenApiV3_2.ts +773 -0
- package/src/openapi/SwaggerV2.ts +567 -559
- package/src/openapi/index.ts +5 -4
- package/src/schema/ILlmApplication.ts +1 -2
- package/src/schema/ILlmSchema.ts +1 -12
- package/src/schema/ILlmStructuredOutput.ts +112 -0
- package/src/schema/index.ts +15 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ILlmStructuredOutput.js","sourceRoot":"","sources":["../../src/schema/ILlmStructuredOutput.ts"],"names":[],"mappings":""}
|
package/lib/schema/index.d.ts
CHANGED
package/lib/schema/index.js
CHANGED
|
@@ -25,5 +25,6 @@ __exportStar(require("./ILlmController"), exports);
|
|
|
25
25
|
__exportStar(require("./ILlmApplication"), exports);
|
|
26
26
|
__exportStar(require("./ILlmFunction"), exports);
|
|
27
27
|
__exportStar(require("./ILlmSchema"), exports);
|
|
28
|
+
__exportStar(require("./ILlmStructuredOutput"), exports);
|
|
28
29
|
__exportStar(require("./IJsonParseResult"), exports);
|
|
29
30
|
//# sourceMappingURL=index.js.map
|
package/lib/schema/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAE9B,8DAA4C;AAC5C,2DAAyC;AACzC,0DAAwC;AACxC,oDAAkC;AAClC,yDAAuC;AAEvC,mDAAiC;AACjC,oDAAkC;AAClC,iDAA+B;AAC/B,+CAA6B;AAC7B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAE9B,8DAA4C;AAC5C,2DAAyC;AACzC,0DAAwC;AACxC,oDAAkC;AAClC,yDAAuC;AAEvC,mDAAiC;AACjC,oDAAkC;AAClC,iDAA+B;AAC/B,+CAA6B;AAC7B,yDAAuC;AACvC,qDAAmC"}
|
package/package.json
CHANGED
|
@@ -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: "get" | "post" | "put" | "patch" | "delete" | "
|
|
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: "get" | "post" | "
|
|
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";
|
|
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
|
+
}
|