@typia/interface 12.1.0-dev.20260325 → 13.0.0-dev.20260426

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/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,gDAA8B;AAC9B,mDAAiC;AACjC,mDAAiC;AAEjC,qDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,gDAA8B;AAC9B,mDAAiC;AACjC,mDAAiC;AAEjC,QAAY,IAAI,yCAAqB"}
@@ -108,8 +108,8 @@ export declare namespace OpenApiV3 {
108
108
  /**
109
109
  * Non-standard HTTP method operations (extension).
110
110
  *
111
- * Used when downgrading from OpenAPI v3.2 to preserve
112
- * non-standard methods like `query` or custom methods.
111
+ * Used when downgrading from OpenAPI v3.2 to preserve non-standard methods
112
+ * like `query` or custom methods.
113
113
  */
114
114
  "x-additionalOperations"?: Record<string, IOperation>;
115
115
  }
@@ -346,6 +346,11 @@ export declare namespace OpenApiV3 {
346
346
  /** Default value. */
347
347
  default?: any;
348
348
  }
349
+ /** @ignore Base Attribute interface. */
350
+ interface __IAttribute extends Omit<IJsonSchemaAttribute, "examples"> {
351
+ /** Example values. */
352
+ examples?: any[] | Record<string, any>;
353
+ }
349
354
  }
350
355
  /** Security scheme types. */
351
356
  type ISecurityScheme = ISecurityScheme.IApiKey | ISecurityScheme.IHttpBasic | ISecurityScheme.IHttpBearer | ISecurityScheme.IOAuth2 | ISecurityScheme.IOpenId;
@@ -120,8 +120,8 @@ export declare namespace OpenApiV3_1 {
120
120
  /**
121
121
  * Non-standard HTTP method operations (extension).
122
122
  *
123
- * Used when downgrading from OpenAPI v3.2 to preserve
124
- * non-standard methods like `query` or custom methods.
123
+ * Used when downgrading from OpenAPI v3.2 to preserve non-standard methods
124
+ * like `query` or custom methods.
125
125
  */
126
126
  "x-additionalOperations"?: Record<string, IOperation>;
127
127
  }
@@ -389,6 +389,11 @@ export declare namespace OpenApiV3_1 {
389
389
  /** Default value. */
390
390
  default?: any;
391
391
  }
392
+ /** @ignore Base Attribute interface. */
393
+ interface __IAttribute extends Omit<IJsonSchemaAttribute, "examples"> {
394
+ /** Example values. */
395
+ examples?: any[] | Record<string, any>;
396
+ }
392
397
  }
393
398
  /** Security scheme types. */
394
399
  type ISecurityScheme = ISecurityScheme.IApiKey | ISecurityScheme.IHttpBasic | ISecurityScheme.IHttpBearer | ISecurityScheme.IOAuth2 | ISecurityScheme.IOpenId;
@@ -124,7 +124,10 @@ export declare namespace OpenApiV3_2 {
124
124
  summary?: string;
125
125
  /** Path description. */
126
126
  description?: string;
127
- /** Additional non-standard HTTP method operations (e.g., LINK, UNLINK, PURGE). */
127
+ /**
128
+ * Additional non-standard HTTP method operations (e.g., LINK, UNLINK,
129
+ * PURGE).
130
+ */
128
131
  additionalOperations?: Record<string, IOperation>;
129
132
  }
130
133
  /** API operation metadata. */
@@ -393,6 +396,11 @@ export declare namespace OpenApiV3_2 {
393
396
  /** Default value. */
394
397
  default?: any;
395
398
  }
399
+ /** @ignore Base Attribute interface. */
400
+ interface __IAttribute extends Omit<IJsonSchemaAttribute, "examples"> {
401
+ /** Example values. */
402
+ examples?: any[] | Record<string, any>;
403
+ }
396
404
  }
397
405
  /** Security scheme types. */
398
406
  type ISecurityScheme = ISecurityScheme.IApiKey | ISecurityScheme.IHttpBasic | ISecurityScheme.IHttpBearer | ISecurityScheme.IOAuth2 | ISecurityScheme.IOpenId;
@@ -95,8 +95,8 @@ export declare namespace SwaggerV2 {
95
95
  /**
96
96
  * Non-standard HTTP method operations (extension).
97
97
  *
98
- * Used when downgrading from OpenAPI v3.2 to preserve
99
- * non-standard methods like `query` or custom methods.
98
+ * Used when downgrading from OpenAPI v3.2 to preserve non-standard methods
99
+ * like `query` or custom methods.
100
100
  */
101
101
  "x-additionalOperations"?: Record<string, IOperation>;
102
102
  }
@@ -268,6 +268,18 @@ export declare namespace SwaggerV2 {
268
268
  /** Type discriminator (undefined for unknown). */
269
269
  type?: undefined;
270
270
  }
271
+ /** @ignore Base Interface with type discriminator. */
272
+ interface __ISignificant<Type extends string> extends __IAttribute {
273
+ /** Type discriminator. */
274
+ type: Type;
275
+ /** Nullable flag (Swagger extension). */
276
+ "x-nullable"?: boolean;
277
+ }
278
+ /** @ignore Base Attribute interface. */
279
+ interface __IAttribute extends Omit<IJsonSchemaAttribute, "examples" | "writeOnly"> {
280
+ /** Example values. */
281
+ examples?: any[];
282
+ }
271
283
  }
272
284
  /** Security scheme types. */
273
285
  type ISecurityDefinition = ISecurityDefinition.IApiKey | ISecurityDefinition.IBasic | ISecurityDefinition.IOauth2Implicit | ISecurityDefinition.IOauth2AccessCode | ISecurityDefinition.IOauth2Password | ISecurityDefinition.IOauth2Application;
@@ -8,4 +8,4 @@
8
8
  * @template X First type to compare
9
9
  * @template Y Second type to compare
10
10
  */
11
- export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
11
+ export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => (T extends Y ? 1 : 2) ? true : false;
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@typia/interface",
3
- "version": "12.1.0-dev.20260325",
3
+ "version": "13.0.0-dev.20260426",
4
4
  "description": "Superfast runtime validators with only one line",
5
5
  "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
6
7
  "exports": {
7
8
  ".": {
8
9
  "types": "./lib/index.d.ts",
@@ -21,8 +22,9 @@
21
22
  },
22
23
  "homepage": "https://typia.io",
23
24
  "devDependencies": {
25
+ "@typescript/native-preview": "7.0.0-dev.20260421.2",
24
26
  "rimraf": "^6.1.2",
25
- "typescript": "~6.0.2"
27
+ "ttsc": "^0.4.2"
26
28
  },
27
29
  "sideEffects": false,
28
30
  "files": [
@@ -35,7 +37,6 @@
35
37
  "fast",
36
38
  "json",
37
39
  "stringify",
38
- "typescript",
39
40
  "transform",
40
41
  "ajv",
41
42
  "io-ts",
@@ -71,8 +72,7 @@
71
72
  "access": "public"
72
73
  },
73
74
  "scripts": {
74
- "build": "rimraf lib && tsc",
75
- "dev": "rimraf lib && tsc --watch"
76
- },
77
- "types": "lib/index.d.ts"
75
+ "build": "rimraf lib && ttsc",
76
+ "dev": "ttsc --watch"
77
+ }
78
78
  }
@@ -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
+ }