@typia/interface 12.0.0-dev.20260311 → 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/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/ILlmStructuredOutput.ts +112 -0
- package/src/schema/index.ts +15 -14
|
@@ -50,7 +50,7 @@ export declare namespace IHttpLlmApplication {
|
|
|
50
50
|
/** Composition error for an operation. */
|
|
51
51
|
interface IError {
|
|
52
52
|
/** HTTP method of the failed operation. */
|
|
53
|
-
method: "get" | "post" | "put" | "patch" | "delete" | "
|
|
53
|
+
method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
|
|
54
54
|
/** Path of the failed operation. */
|
|
55
55
|
path: string;
|
|
56
56
|
/** Error messages describing the failure. */
|
|
@@ -17,7 +17,7 @@ import { IHttpMigrateRoute } from "./IHttpMigrateRoute";
|
|
|
17
17
|
*/
|
|
18
18
|
export interface IHttpLlmFunction extends ILlmFunction {
|
|
19
19
|
/** HTTP method of the endpoint. */
|
|
20
|
-
method: "get" | "post" | "
|
|
20
|
+
method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
|
|
21
21
|
/** Path of the endpoint. */
|
|
22
22
|
path: string;
|
|
23
23
|
/** Category tags from {@link OpenApi.IOperation.tags}. */
|
|
@@ -33,7 +33,7 @@ export declare namespace IHttpMigrateApplication {
|
|
|
33
33
|
/** Returns source operation. */
|
|
34
34
|
operation: () => OpenApi.IOperation;
|
|
35
35
|
/** HTTP method. */
|
|
36
|
-
method: "head" | "get" | "post" | "put" | "patch" | "delete";
|
|
36
|
+
method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
|
|
37
37
|
/** Operation path. */
|
|
38
38
|
path: string;
|
|
39
39
|
/** Error messages. */
|
|
@@ -11,8 +11,8 @@ import { OpenApi } from "../openapi/OpenApi";
|
|
|
11
11
|
* @author Jeongho Nam - https://github.com/samchon
|
|
12
12
|
*/
|
|
13
13
|
export interface IHttpMigrateRoute {
|
|
14
|
-
/** HTTP method.
|
|
15
|
-
method: "head" | "get" | "post" | "put" | "patch" | "delete";
|
|
14
|
+
/** HTTP method. */
|
|
15
|
+
method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
|
|
16
16
|
/** Original path from OpenAPI document. */
|
|
17
17
|
path: string;
|
|
18
18
|
/** Emended path with `:param` format, always starts with `/`. */
|
package/lib/openapi/OpenApi.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { IJsonSchemaAttribute } from "../schema/IJsonSchemaAttribute";
|
|
2
2
|
import * as tags from "../tags";
|
|
3
3
|
/**
|
|
4
|
-
* Emended OpenAPI v3.
|
|
4
|
+
* Emended OpenAPI v3.2 specification.
|
|
5
5
|
*
|
|
6
|
-
* `OpenApi` is a refined OpenAPI v3.
|
|
6
|
+
* `OpenApi` is a refined OpenAPI v3.2 specification that normalizes ambiguous
|
|
7
7
|
* and redundant expressions from various OpenAPI versions (Swagger 2.0, OpenAPI
|
|
8
|
-
* 3.0, 3.1). This unified format simplifies schema processing for `typia`
|
|
9
|
-
* `@nestia/sdk`.
|
|
8
|
+
* 3.0, 3.1, 3.2). This unified format simplifies schema processing for `typia`
|
|
9
|
+
* and `@nestia/sdk`.
|
|
10
10
|
*
|
|
11
11
|
* Key simplifications:
|
|
12
12
|
*
|
|
@@ -29,9 +29,9 @@ export declare namespace OpenApi {
|
|
|
29
29
|
* Standard HTTP methods used in REST APIs. Each path can have multiple
|
|
30
30
|
* operations, one per HTTP method.
|
|
31
31
|
*/
|
|
32
|
-
type Method = "get" | "post" | "put" | "delete" | "options" | "head" | "patch" | "trace";
|
|
32
|
+
type Method = "get" | "post" | "put" | "delete" | "options" | "head" | "patch" | "trace" | "query";
|
|
33
33
|
/**
|
|
34
|
-
* Root document structure for emended OpenAPI v3.
|
|
34
|
+
* Root document structure for emended OpenAPI v3.2.
|
|
35
35
|
*
|
|
36
36
|
* Contains all API metadata, paths, operations, and reusable components. The
|
|
37
37
|
* `x-samchon-emended-v4` marker indicates this document has been processed by
|
|
@@ -39,7 +39,7 @@ export declare namespace OpenApi {
|
|
|
39
39
|
*/
|
|
40
40
|
interface IDocument {
|
|
41
41
|
/** OpenAPI version. */
|
|
42
|
-
openapi: `3.
|
|
42
|
+
openapi: `3.2.${number}`;
|
|
43
43
|
/** List of servers providing the API. */
|
|
44
44
|
servers?: IServer[];
|
|
45
45
|
/** API metadata. */
|
|
@@ -54,8 +54,8 @@ export declare namespace OpenApi {
|
|
|
54
54
|
security?: Record<string, string[]>[];
|
|
55
55
|
/** Tag definitions for grouping operations. */
|
|
56
56
|
tags?: IDocument.ITag[];
|
|
57
|
-
/** Marker for emended document by
|
|
58
|
-
"x-
|
|
57
|
+
/** Marker for emended document by `typia` */
|
|
58
|
+
"x-typia-emended-v12": true;
|
|
59
59
|
}
|
|
60
60
|
namespace IDocument {
|
|
61
61
|
/**
|
|
@@ -84,8 +84,14 @@ export declare namespace OpenApi {
|
|
|
84
84
|
interface ITag {
|
|
85
85
|
/** Tag name. */
|
|
86
86
|
name: string;
|
|
87
|
+
/** Short summary for display in tag lists. */
|
|
88
|
+
summary?: string;
|
|
87
89
|
/** Tag description. */
|
|
88
90
|
description?: string;
|
|
91
|
+
/** Parent tag name for hierarchical organization. */
|
|
92
|
+
parent?: string;
|
|
93
|
+
/** Tag classification (e.g., "nav", "badge"). */
|
|
94
|
+
kind?: string;
|
|
89
95
|
}
|
|
90
96
|
/** Contact information. */
|
|
91
97
|
interface IContact {
|
|
@@ -134,6 +140,8 @@ export declare namespace OpenApi {
|
|
|
134
140
|
summary?: string;
|
|
135
141
|
/** Path description. */
|
|
136
142
|
description?: string;
|
|
143
|
+
/** Additional non-standard HTTP method operations (e.g., LINK, UNLINK, PURGE). */
|
|
144
|
+
additionalOperations?: Record<string, IOperation>;
|
|
137
145
|
}
|
|
138
146
|
/** API operation metadata. */
|
|
139
147
|
interface IOperation {
|
|
@@ -170,7 +178,7 @@ export declare namespace OpenApi {
|
|
|
170
178
|
/** Parameter name. */
|
|
171
179
|
name?: string;
|
|
172
180
|
/** Parameter location. */
|
|
173
|
-
in: "path" | "query" | "header" | "cookie";
|
|
181
|
+
in: "path" | "query" | "querystring" | "header" | "cookie";
|
|
174
182
|
/** Parameter schema. */
|
|
175
183
|
schema: IJsonSchema;
|
|
176
184
|
/** Whether required. */
|
|
@@ -211,6 +219,8 @@ export declare namespace OpenApi {
|
|
|
211
219
|
interface IMediaType {
|
|
212
220
|
/** Content schema. */
|
|
213
221
|
schema?: IJsonSchema;
|
|
222
|
+
/** Schema for streaming items (SSE, JSON Lines, etc.). */
|
|
223
|
+
itemSchema?: IJsonSchema;
|
|
214
224
|
/** Example value. */
|
|
215
225
|
example?: any;
|
|
216
226
|
/** Named examples. */
|
|
@@ -414,6 +424,8 @@ export declare namespace OpenApi {
|
|
|
414
424
|
type: "oauth2";
|
|
415
425
|
/** OAuth2 flows. */
|
|
416
426
|
flows: IOAuth2.IFlowSet;
|
|
427
|
+
/** OAuth2 metadata discovery URL. */
|
|
428
|
+
oauth2MetadataUrl?: string;
|
|
417
429
|
/** Scheme description. */
|
|
418
430
|
description?: string;
|
|
419
431
|
}
|
|
@@ -437,6 +449,8 @@ export declare namespace OpenApi {
|
|
|
437
449
|
password?: Omit<IFlow, "authorizationUrl">;
|
|
438
450
|
/** Client credentials flow. */
|
|
439
451
|
clientCredentials?: Omit<IFlow, "authorizationUrl">;
|
|
452
|
+
/** Device authorization flow. */
|
|
453
|
+
deviceAuthorization?: IDeviceFlow;
|
|
440
454
|
}
|
|
441
455
|
/** OAuth2 flow configuration. */
|
|
442
456
|
interface IFlow {
|
|
@@ -449,6 +463,17 @@ export declare namespace OpenApi {
|
|
|
449
463
|
/** Available scopes. */
|
|
450
464
|
scopes?: Record<string, string>;
|
|
451
465
|
}
|
|
466
|
+
/** OAuth2 device authorization flow. */
|
|
467
|
+
interface IDeviceFlow {
|
|
468
|
+
/** Device authorization URL. */
|
|
469
|
+
deviceAuthorizationUrl: string;
|
|
470
|
+
/** Token URL. */
|
|
471
|
+
tokenUrl: string;
|
|
472
|
+
/** Refresh URL. */
|
|
473
|
+
refreshUrl?: string;
|
|
474
|
+
/** Available scopes. */
|
|
475
|
+
scopes?: Record<string, string>;
|
|
476
|
+
}
|
|
452
477
|
}
|
|
453
478
|
}
|
|
454
479
|
}
|
|
@@ -105,6 +105,13 @@ export declare namespace OpenApiV3 {
|
|
|
105
105
|
summary?: string;
|
|
106
106
|
/** Path description. */
|
|
107
107
|
description?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Non-standard HTTP method operations (extension).
|
|
110
|
+
*
|
|
111
|
+
* Used when downgrading from OpenAPI v3.2 to preserve
|
|
112
|
+
* non-standard methods like `query` or custom methods.
|
|
113
|
+
*/
|
|
114
|
+
"x-additionalOperations"?: Record<string, IOperation>;
|
|
108
115
|
}
|
|
109
116
|
/** API operation metadata. */
|
|
110
117
|
interface IOperation {
|
|
@@ -117,6 +117,13 @@ export declare namespace OpenApiV3_1 {
|
|
|
117
117
|
summary?: string;
|
|
118
118
|
/** Path description. */
|
|
119
119
|
description?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Non-standard HTTP method operations (extension).
|
|
122
|
+
*
|
|
123
|
+
* Used when downgrading from OpenAPI v3.2 to preserve
|
|
124
|
+
* non-standard methods like `query` or custom methods.
|
|
125
|
+
*/
|
|
126
|
+
"x-additionalOperations"?: Record<string, IOperation>;
|
|
120
127
|
}
|
|
121
128
|
/** API operation metadata. */
|
|
122
129
|
interface IOperation {
|