@typia/interface 12.0.0-dev.20260225

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 (311) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -0
  3. package/lib/http/IHttpConnection.d.ts +163 -0
  4. package/lib/http/IHttpConnection.js +4 -0
  5. package/lib/http/IHttpConnection.js.map +1 -0
  6. package/lib/http/IHttpLlmApplication.d.ts +73 -0
  7. package/lib/http/IHttpLlmApplication.js +3 -0
  8. package/lib/http/IHttpLlmApplication.js.map +1 -0
  9. package/lib/http/IHttpLlmController.d.ts +86 -0
  10. package/lib/http/IHttpLlmController.js +3 -0
  11. package/lib/http/IHttpLlmController.js.map +1 -0
  12. package/lib/http/IHttpLlmFunction.d.ts +79 -0
  13. package/lib/http/IHttpLlmFunction.js +3 -0
  14. package/lib/http/IHttpLlmFunction.js.map +1 -0
  15. package/lib/http/IHttpMigrateApplication.d.ts +42 -0
  16. package/lib/http/IHttpMigrateApplication.js +3 -0
  17. package/lib/http/IHttpMigrateApplication.js.map +1 -0
  18. package/lib/http/IHttpMigrateRoute.d.ts +121 -0
  19. package/lib/http/IHttpMigrateRoute.js +3 -0
  20. package/lib/http/IHttpMigrateRoute.js.map +1 -0
  21. package/lib/http/IHttpResponse.d.ts +40 -0
  22. package/lib/http/IHttpResponse.js +3 -0
  23. package/lib/http/IHttpResponse.js.map +1 -0
  24. package/lib/http/index.d.ts +7 -0
  25. package/lib/http/index.js +24 -0
  26. package/lib/http/index.js.map +1 -0
  27. package/lib/index.d.ts +8 -0
  28. package/lib/index.js +48 -0
  29. package/lib/index.js.map +1 -0
  30. package/lib/metadata/IJsDocTagInfo.d.ts +23 -0
  31. package/lib/metadata/IJsDocTagInfo.js +3 -0
  32. package/lib/metadata/IJsDocTagInfo.js.map +1 -0
  33. package/lib/metadata/IMetadataComponents.d.ts +20 -0
  34. package/lib/metadata/IMetadataComponents.js +3 -0
  35. package/lib/metadata/IMetadataComponents.js.map +1 -0
  36. package/lib/metadata/IMetadataSchema.d.ts +219 -0
  37. package/lib/metadata/IMetadataSchema.js +3 -0
  38. package/lib/metadata/IMetadataSchema.js.map +1 -0
  39. package/lib/metadata/IMetadataSchemaCollection.d.ts +18 -0
  40. package/lib/metadata/IMetadataSchemaCollection.js +3 -0
  41. package/lib/metadata/IMetadataSchemaCollection.js.map +1 -0
  42. package/lib/metadata/IMetadataSchemaUnit.d.ts +18 -0
  43. package/lib/metadata/IMetadataSchemaUnit.js +3 -0
  44. package/lib/metadata/IMetadataSchemaUnit.js.map +1 -0
  45. package/lib/metadata/IMetadataTypeTag.d.ts +28 -0
  46. package/lib/metadata/IMetadataTypeTag.js +3 -0
  47. package/lib/metadata/IMetadataTypeTag.js.map +1 -0
  48. package/lib/metadata/index.d.ts +6 -0
  49. package/lib/metadata/index.js +23 -0
  50. package/lib/metadata/index.js.map +1 -0
  51. package/lib/openapi/OpenApi.d.ts +454 -0
  52. package/lib/openapi/OpenApi.js +3 -0
  53. package/lib/openapi/OpenApi.js.map +1 -0
  54. package/lib/openapi/OpenApiV3.d.ts +420 -0
  55. package/lib/openapi/OpenApiV3.js +3 -0
  56. package/lib/openapi/OpenApiV3.js.map +1 -0
  57. package/lib/openapi/OpenApiV3_1.d.ts +463 -0
  58. package/lib/openapi/OpenApiV3_1.js +3 -0
  59. package/lib/openapi/OpenApiV3_1.js.map +1 -0
  60. package/lib/openapi/SwaggerV2.d.ts +343 -0
  61. package/lib/openapi/SwaggerV2.js +3 -0
  62. package/lib/openapi/SwaggerV2.js.map +1 -0
  63. package/lib/openapi/index.d.ts +4 -0
  64. package/lib/openapi/index.js +21 -0
  65. package/lib/openapi/index.js.map +1 -0
  66. package/lib/protobuf/ProtobufWire.d.ts +46 -0
  67. package/lib/protobuf/ProtobufWire.js +3 -0
  68. package/lib/protobuf/ProtobufWire.js.map +1 -0
  69. package/lib/protobuf/index.d.ts +1 -0
  70. package/lib/protobuf/index.js +18 -0
  71. package/lib/protobuf/index.js.map +1 -0
  72. package/lib/schema/IJsonSchemaApplication.d.ts +232 -0
  73. package/lib/schema/IJsonSchemaApplication.js +3 -0
  74. package/lib/schema/IJsonSchemaApplication.js.map +1 -0
  75. package/lib/schema/IJsonSchemaAttribute.d.ts +152 -0
  76. package/lib/schema/IJsonSchemaAttribute.js +3 -0
  77. package/lib/schema/IJsonSchemaAttribute.js.map +1 -0
  78. package/lib/schema/IJsonSchemaCollection.d.ts +109 -0
  79. package/lib/schema/IJsonSchemaCollection.js +3 -0
  80. package/lib/schema/IJsonSchemaCollection.js.map +1 -0
  81. package/lib/schema/IJsonSchemaTransformError.d.ts +81 -0
  82. package/lib/schema/IJsonSchemaTransformError.js +3 -0
  83. package/lib/schema/IJsonSchemaTransformError.js.map +1 -0
  84. package/lib/schema/IJsonSchemaUnit.d.ts +106 -0
  85. package/lib/schema/IJsonSchemaUnit.js +3 -0
  86. package/lib/schema/IJsonSchemaUnit.js.map +1 -0
  87. package/lib/schema/ILlmApplication.d.ts +95 -0
  88. package/lib/schema/ILlmApplication.js +3 -0
  89. package/lib/schema/ILlmApplication.js.map +1 -0
  90. package/lib/schema/ILlmController.d.ts +53 -0
  91. package/lib/schema/ILlmController.js +3 -0
  92. package/lib/schema/ILlmController.js.map +1 -0
  93. package/lib/schema/ILlmFunction.d.ts +134 -0
  94. package/lib/schema/ILlmFunction.js +3 -0
  95. package/lib/schema/ILlmFunction.js.map +1 -0
  96. package/lib/schema/ILlmSchema.d.ts +412 -0
  97. package/lib/schema/ILlmSchema.js +3 -0
  98. package/lib/schema/ILlmSchema.js.map +1 -0
  99. package/lib/schema/IResult.d.ts +81 -0
  100. package/lib/schema/IResult.js +3 -0
  101. package/lib/schema/IResult.js.map +1 -0
  102. package/lib/schema/IValidation.d.ts +123 -0
  103. package/lib/schema/IValidation.js +3 -0
  104. package/lib/schema/IValidation.js.map +1 -0
  105. package/lib/schema/index.d.ts +11 -0
  106. package/lib/schema/index.js +28 -0
  107. package/lib/schema/index.js.map +1 -0
  108. package/lib/tags/Constant.d.ts +44 -0
  109. package/lib/tags/Constant.js +3 -0
  110. package/lib/tags/Constant.js.map +1 -0
  111. package/lib/tags/ContentMediaType.d.ts +39 -0
  112. package/lib/tags/ContentMediaType.js +3 -0
  113. package/lib/tags/ContentMediaType.js.map +1 -0
  114. package/lib/tags/Default.d.ts +42 -0
  115. package/lib/tags/Default.js +3 -0
  116. package/lib/tags/Default.js.map +1 -0
  117. package/lib/tags/Example.d.ts +38 -0
  118. package/lib/tags/Example.js +3 -0
  119. package/lib/tags/Example.js.map +1 -0
  120. package/lib/tags/Examples.d.ts +44 -0
  121. package/lib/tags/Examples.js +3 -0
  122. package/lib/tags/Examples.js.map +1 -0
  123. package/lib/tags/ExclusiveMaximum.d.ts +39 -0
  124. package/lib/tags/ExclusiveMaximum.js +3 -0
  125. package/lib/tags/ExclusiveMaximum.js.map +1 -0
  126. package/lib/tags/ExclusiveMinimum.d.ts +39 -0
  127. package/lib/tags/ExclusiveMinimum.js +3 -0
  128. package/lib/tags/ExclusiveMinimum.js.map +1 -0
  129. package/lib/tags/Format.d.ts +43 -0
  130. package/lib/tags/Format.js +3 -0
  131. package/lib/tags/Format.js.map +1 -0
  132. package/lib/tags/JsonSchemaPlugin.d.ts +44 -0
  133. package/lib/tags/JsonSchemaPlugin.js +3 -0
  134. package/lib/tags/JsonSchemaPlugin.js.map +1 -0
  135. package/lib/tags/MaxItems.d.ts +38 -0
  136. package/lib/tags/MaxItems.js +3 -0
  137. package/lib/tags/MaxItems.js.map +1 -0
  138. package/lib/tags/MaxLength.d.ts +36 -0
  139. package/lib/tags/MaxLength.js +3 -0
  140. package/lib/tags/MaxLength.js.map +1 -0
  141. package/lib/tags/Maximum.d.ts +41 -0
  142. package/lib/tags/Maximum.js +3 -0
  143. package/lib/tags/Maximum.js.map +1 -0
  144. package/lib/tags/MinItems.d.ts +38 -0
  145. package/lib/tags/MinItems.js +3 -0
  146. package/lib/tags/MinItems.js.map +1 -0
  147. package/lib/tags/MinLength.d.ts +36 -0
  148. package/lib/tags/MinLength.js +3 -0
  149. package/lib/tags/MinLength.js.map +1 -0
  150. package/lib/tags/Minimum.d.ts +41 -0
  151. package/lib/tags/Minimum.js +3 -0
  152. package/lib/tags/Minimum.js.map +1 -0
  153. package/lib/tags/MultipleOf.d.ts +49 -0
  154. package/lib/tags/MultipleOf.js +3 -0
  155. package/lib/tags/MultipleOf.js.map +1 -0
  156. package/lib/tags/Pattern.d.ts +51 -0
  157. package/lib/tags/Pattern.js +3 -0
  158. package/lib/tags/Pattern.js.map +1 -0
  159. package/lib/tags/Sequence.d.ts +42 -0
  160. package/lib/tags/Sequence.js +3 -0
  161. package/lib/tags/Sequence.js.map +1 -0
  162. package/lib/tags/TagBase.d.ts +109 -0
  163. package/lib/tags/TagBase.js +3 -0
  164. package/lib/tags/TagBase.js.map +1 -0
  165. package/lib/tags/Type.d.ts +53 -0
  166. package/lib/tags/Type.js +3 -0
  167. package/lib/tags/Type.js.map +1 -0
  168. package/lib/tags/UniqueItems.d.ts +41 -0
  169. package/lib/tags/UniqueItems.js +3 -0
  170. package/lib/tags/UniqueItems.js.map +1 -0
  171. package/lib/tags/index.d.ts +21 -0
  172. package/lib/tags/index.js +38 -0
  173. package/lib/tags/index.js.map +1 -0
  174. package/lib/typings/AssertionGuard.d.ts +12 -0
  175. package/lib/typings/AssertionGuard.js +3 -0
  176. package/lib/typings/AssertionGuard.js.map +1 -0
  177. package/lib/typings/Atomic.d.ts +19 -0
  178. package/lib/typings/Atomic.js +3 -0
  179. package/lib/typings/Atomic.js.map +1 -0
  180. package/lib/typings/CamelCase.d.ts +26 -0
  181. package/lib/typings/CamelCase.js +3 -0
  182. package/lib/typings/CamelCase.js.map +1 -0
  183. package/lib/typings/ClassProperties.d.ts +14 -0
  184. package/lib/typings/ClassProperties.js +3 -0
  185. package/lib/typings/ClassProperties.js.map +1 -0
  186. package/lib/typings/OmitNever.d.ts +11 -0
  187. package/lib/typings/OmitNever.js +3 -0
  188. package/lib/typings/OmitNever.js.map +1 -0
  189. package/lib/typings/PascalCase.d.ts +25 -0
  190. package/lib/typings/PascalCase.js +3 -0
  191. package/lib/typings/PascalCase.js.map +1 -0
  192. package/lib/typings/Primitive.d.ts +29 -0
  193. package/lib/typings/Primitive.js +3 -0
  194. package/lib/typings/Primitive.js.map +1 -0
  195. package/lib/typings/ProtobufAtomic.d.ts +15 -0
  196. package/lib/typings/ProtobufAtomic.js +3 -0
  197. package/lib/typings/ProtobufAtomic.js.map +1 -0
  198. package/lib/typings/Resolved.d.ts +23 -0
  199. package/lib/typings/Resolved.js +3 -0
  200. package/lib/typings/Resolved.js.map +1 -0
  201. package/lib/typings/SnakeCase.d.ts +31 -0
  202. package/lib/typings/SnakeCase.js +3 -0
  203. package/lib/typings/SnakeCase.js.map +1 -0
  204. package/lib/typings/SpecialFields.d.ts +13 -0
  205. package/lib/typings/SpecialFields.js +3 -0
  206. package/lib/typings/SpecialFields.js.map +1 -0
  207. package/lib/typings/ValidationPipe.d.ts +18 -0
  208. package/lib/typings/ValidationPipe.js +3 -0
  209. package/lib/typings/ValidationPipe.js.map +1 -0
  210. package/lib/typings/index.d.ts +12 -0
  211. package/lib/typings/index.js +29 -0
  212. package/lib/typings/index.js.map +1 -0
  213. package/lib/typings/internal/Equal.d.ts +11 -0
  214. package/lib/typings/internal/Equal.js +3 -0
  215. package/lib/typings/internal/Equal.js.map +1 -0
  216. package/lib/typings/internal/IsTuple.d.ts +13 -0
  217. package/lib/typings/internal/IsTuple.js +3 -0
  218. package/lib/typings/internal/IsTuple.js.map +1 -0
  219. package/lib/typings/internal/NativeClass.d.ts +9 -0
  220. package/lib/typings/internal/NativeClass.js +3 -0
  221. package/lib/typings/internal/NativeClass.js.map +1 -0
  222. package/lib/typings/internal/ValueOf.d.ts +15 -0
  223. package/lib/typings/internal/ValueOf.js +3 -0
  224. package/lib/typings/internal/ValueOf.js.map +1 -0
  225. package/lib/utils/IRandomGenerator.d.ts +68 -0
  226. package/lib/utils/IRandomGenerator.js +3 -0
  227. package/lib/utils/IRandomGenerator.js.map +1 -0
  228. package/lib/utils/IReadableURLSearchParams.d.ts +22 -0
  229. package/lib/utils/IReadableURLSearchParams.js +3 -0
  230. package/lib/utils/IReadableURLSearchParams.js.map +1 -0
  231. package/lib/utils/index.d.ts +2 -0
  232. package/lib/utils/index.js +19 -0
  233. package/lib/utils/index.js.map +1 -0
  234. package/package.json +79 -0
  235. package/src/http/IHttpConnection.ts +200 -0
  236. package/src/http/IHttpLlmApplication.ts +83 -0
  237. package/src/http/IHttpLlmController.ts +96 -0
  238. package/src/http/IHttpLlmFunction.ts +93 -0
  239. package/src/http/IHttpMigrateApplication.ts +48 -0
  240. package/src/http/IHttpMigrateRoute.ts +165 -0
  241. package/src/http/IHttpResponse.ts +42 -0
  242. package/src/http/index.ts +7 -0
  243. package/src/index.ts +9 -0
  244. package/src/metadata/IJsDocTagInfo.ts +25 -0
  245. package/src/metadata/IMetadataComponents.ts +24 -0
  246. package/src/metadata/IMetadataSchema.ts +293 -0
  247. package/src/metadata/IMetadataSchemaCollection.ts +20 -0
  248. package/src/metadata/IMetadataSchemaUnit.ts +20 -0
  249. package/src/metadata/IMetadataTypeTag.ts +39 -0
  250. package/src/metadata/index.ts +6 -0
  251. package/src/openapi/OpenApi.ts +643 -0
  252. package/src/openapi/OpenApiV3.ts +655 -0
  253. package/src/openapi/OpenApiV3_1.ts +735 -0
  254. package/src/openapi/SwaggerV2.ts +559 -0
  255. package/src/openapi/index.ts +4 -0
  256. package/src/protobuf/ProtobufWire.ts +51 -0
  257. package/src/protobuf/index.ts +1 -0
  258. package/src/schema/IJsonSchemaApplication.ts +274 -0
  259. package/src/schema/IJsonSchemaAttribute.ts +158 -0
  260. package/src/schema/IJsonSchemaCollection.ts +123 -0
  261. package/src/schema/IJsonSchemaTransformError.ts +86 -0
  262. package/src/schema/IJsonSchemaUnit.ts +120 -0
  263. package/src/schema/ILlmApplication.ts +103 -0
  264. package/src/schema/ILlmController.ts +57 -0
  265. package/src/schema/ILlmFunction.ts +144 -0
  266. package/src/schema/ILlmSchema.ts +484 -0
  267. package/src/schema/IResult.ts +84 -0
  268. package/src/schema/IValidation.ts +134 -0
  269. package/src/schema/index.ts +13 -0
  270. package/src/tags/Constant.ts +49 -0
  271. package/src/tags/ContentMediaType.ts +40 -0
  272. package/src/tags/Default.ts +50 -0
  273. package/src/tags/Example.ts +48 -0
  274. package/src/tags/Examples.ts +50 -0
  275. package/src/tags/ExclusiveMaximum.ts +46 -0
  276. package/src/tags/ExclusiveMinimum.ts +46 -0
  277. package/src/tags/Format.ts +76 -0
  278. package/src/tags/JsonSchemaPlugin.ts +45 -0
  279. package/src/tags/MaxItems.ts +39 -0
  280. package/src/tags/MaxLength.ts +37 -0
  281. package/src/tags/Maximum.ts +44 -0
  282. package/src/tags/MinItems.ts +39 -0
  283. package/src/tags/MinLength.ts +37 -0
  284. package/src/tags/Minimum.ts +44 -0
  285. package/src/tags/MultipleOf.ts +54 -0
  286. package/src/tags/Pattern.ts +59 -0
  287. package/src/tags/Sequence.ts +43 -0
  288. package/src/tags/TagBase.ts +131 -0
  289. package/src/tags/Type.ts +70 -0
  290. package/src/tags/UniqueItems.ts +44 -0
  291. package/src/tags/index.ts +21 -0
  292. package/src/typings/AssertionGuard.ts +12 -0
  293. package/src/typings/Atomic.ts +21 -0
  294. package/src/typings/CamelCase.ts +75 -0
  295. package/src/typings/ClassProperties.ts +15 -0
  296. package/src/typings/OmitNever.ts +12 -0
  297. package/src/typings/PascalCase.ts +71 -0
  298. package/src/typings/Primitive.ts +71 -0
  299. package/src/typings/ProtobufAtomic.ts +30 -0
  300. package/src/typings/Resolved.ts +58 -0
  301. package/src/typings/SnakeCase.ts +126 -0
  302. package/src/typings/SpecialFields.ts +13 -0
  303. package/src/typings/ValidationPipe.ts +20 -0
  304. package/src/typings/index.ts +13 -0
  305. package/src/typings/internal/Equal.ts +14 -0
  306. package/src/typings/internal/IsTuple.ts +17 -0
  307. package/src/typings/internal/NativeClass.ts +31 -0
  308. package/src/typings/internal/ValueOf.ts +29 -0
  309. package/src/utils/IRandomGenerator.ts +105 -0
  310. package/src/utils/IReadableURLSearchParams.ts +25 -0
  311. package/src/utils/index.ts +2 -0
@@ -0,0 +1,232 @@
1
+ import { OpenApi } from "../openapi/OpenApi";
2
+ import { OpenApiV3 } from "../openapi/OpenApiV3";
3
+ /**
4
+ * JSON Schema application representing TypeScript functions.
5
+ *
6
+ * `IJsonSchemaApplication` represents a collection of TypeScript class methods
7
+ * or functions converted to JSON Schema format. Generated at compile time by
8
+ * `typia.json.application<App>()`, this is primarily used for OpenAPI document
9
+ * generation and as an intermediate format for LLM function calling schemas.
10
+ *
11
+ * Unlike {@link ILlmApplication} which is optimized for LLM consumption, this
12
+ * interface preserves full JSON Schema expressiveness including features that
13
+ * some LLM providers don't support (tuples, additionalProperties, etc.).
14
+ *
15
+ * The application contains:
16
+ *
17
+ * - {@link functions}: Array of function metadata with parameter/return schemas
18
+ * - {@link components}: Shared schema definitions for `$ref` references
19
+ * - {@link __application}: Phantom property for type inference
20
+ *
21
+ * @author Jeongho Nam - https://github.com/samchon
22
+ * @template Version OpenAPI version ("3.0" or "3.1")
23
+ * @template App Source class/interface type for type preservation
24
+ */
25
+ export interface IJsonSchemaApplication<Version extends "3.0" | "3.1" = "3.1", App extends any = object> {
26
+ /**
27
+ * OpenAPI specification version.
28
+ *
29
+ * Determines the JSON Schema dialect used for type definitions. Use `"3.1"`
30
+ * for modern JSON Schema features, `"3.0"` for broader compatibility with
31
+ * older OpenAPI consumers.
32
+ */
33
+ version: Version;
34
+ /**
35
+ * Shared schema definitions for `$ref` references.
36
+ *
37
+ * Contains named schemas that can be referenced by functions to avoid
38
+ * duplication and enable recursive type definitions.
39
+ */
40
+ components: IJsonSchemaApplication.IComponents<IJsonSchemaApplication.Schema<Version>>;
41
+ /**
42
+ * Array of function schemas.
43
+ *
44
+ * Each function includes parameter schemas, return type schema, and metadata
45
+ * extracted from JSDoc comments. Functions are derived from public methods of
46
+ * the source class/interface.
47
+ */
48
+ functions: IJsonSchemaApplication.IFunction<IJsonSchemaApplication.Schema<Version>>[];
49
+ /**
50
+ * Phantom property for TypeScript generic type preservation.
51
+ *
52
+ * This property exists only in the type system to preserve the `App` generic
53
+ * parameter at compile time. It is always `undefined` at runtime and should
54
+ * not be accessed or used in application code.
55
+ *
56
+ * Enables type inference to recover the original application type from an
57
+ * `IJsonSchemaApplication` instance.
58
+ */
59
+ __application?: App | undefined;
60
+ }
61
+ export declare namespace IJsonSchemaApplication {
62
+ /**
63
+ * Schema type selector based on OpenAPI version.
64
+ *
65
+ * Returns the appropriate JSON schema type for the specified OpenAPI version.
66
+ *
67
+ * - `"3.1"` → {@link OpenApi.IJsonSchema} (emended OpenAPI v3.1)
68
+ * - `"3.0"` → {@link OpenApiV3.IJsonSchema} (OpenAPI v3.0)
69
+ */
70
+ type Schema<Version extends "3.0" | "3.1"> = Version extends "3.1" ? OpenApi.IJsonSchema : OpenApiV3.IJsonSchema;
71
+ /**
72
+ * Shared schema component definitions.
73
+ *
74
+ * Contains named schema definitions that can be referenced via `$ref`
75
+ * throughout the application's function schemas. Reduces duplication and
76
+ * enables recursive type definitions.
77
+ *
78
+ * @template Schema JSON schema type based on OpenAPI version
79
+ */
80
+ interface IComponents<Schema extends OpenApi.IJsonSchema | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema> {
81
+ /**
82
+ * Named schema definitions for reference.
83
+ *
84
+ * Keys are type names, values are their JSON Schema definitions. Reference
85
+ * these using `$ref: "#/components/schemas/TypeName"`.
86
+ */
87
+ schemas?: Record<string, Schema>;
88
+ }
89
+ /**
90
+ * Complete metadata for a single function.
91
+ *
92
+ * Contains all information needed to describe a function in JSON Schema
93
+ * format, including parameters, return type, and documentation extracted from
94
+ * JSDoc comments.
95
+ *
96
+ * @template Schema JSON schema type based on OpenAPI version
97
+ */
98
+ interface IFunction<Schema extends OpenApi.IJsonSchema | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema> {
99
+ /**
100
+ * Whether the function is asynchronous.
101
+ *
102
+ * `true` if the function returns a Promise, `false` for synchronous
103
+ * functions. Useful for runtime execution handling.
104
+ */
105
+ async: boolean;
106
+ /**
107
+ * Function name identifier.
108
+ *
109
+ * The name used to call this function. Derived from the method name in the
110
+ * source class/interface.
111
+ */
112
+ name: string;
113
+ /**
114
+ * Array of function parameters.
115
+ *
116
+ * Ordered list of parameters with their names, types, and documentation.
117
+ * Parameters preserve their declaration order.
118
+ */
119
+ parameters: IParameter<Schema>[];
120
+ /**
121
+ * Return type information.
122
+ *
123
+ * Contains the return type schema and documentation. `undefined` when the
124
+ * function returns `void` or has no return type annotation.
125
+ */
126
+ output: IOutput<Schema> | undefined;
127
+ /**
128
+ * Brief summary of the function.
129
+ *
130
+ * Short one-line description extracted from the first line of JSDoc
131
+ * comment. Intended for quick reference in documentation.
132
+ */
133
+ summary?: string | undefined;
134
+ /**
135
+ * Full function description.
136
+ *
137
+ * Complete documentation extracted from JSDoc comment body. May include
138
+ * markdown formatting, examples, and detailed explanations.
139
+ */
140
+ description?: string | undefined;
141
+ /**
142
+ * Whether the function is deprecated.
143
+ *
144
+ * Set from the `@deprecated` JSDoc tag. Indicates the function should no
145
+ * longer be used and may be removed in future versions.
146
+ */
147
+ deprecated?: boolean;
148
+ /**
149
+ * Category tags for organization.
150
+ *
151
+ * Extracted from `@tag` JSDoc annotations. Useful for grouping related
152
+ * functions in documentation or filtering.
153
+ */
154
+ tags?: string[];
155
+ }
156
+ /**
157
+ * Metadata for a single function parameter.
158
+ *
159
+ * Describes a function parameter including its name, type schema, whether
160
+ * it's required, and any JSDoc documentation.
161
+ *
162
+ * @template Schema JSON schema type based on OpenAPI version
163
+ */
164
+ interface IParameter<Schema extends OpenApi.IJsonSchema | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema> {
165
+ /**
166
+ * Parameter name.
167
+ *
168
+ * The identifier used in the function signature. Must match the actual
169
+ * parameter name in the source code.
170
+ */
171
+ name: string;
172
+ /**
173
+ * Whether the parameter is required.
174
+ *
175
+ * `true` if the parameter must be provided, `false` if it has a default
176
+ * value or is explicitly optional.
177
+ */
178
+ required: boolean;
179
+ /**
180
+ * JSON Schema for the parameter type.
181
+ *
182
+ * Complete schema definition describing the expected parameter type,
183
+ * including constraints and nested structures.
184
+ */
185
+ schema: Schema;
186
+ /**
187
+ * Parameter title for documentation.
188
+ *
189
+ * Brief name for the parameter, typically extracted from `@param` tag title
190
+ * in JSDoc.
191
+ */
192
+ title?: string | undefined;
193
+ /**
194
+ * Parameter description from documentation.
195
+ *
196
+ * Full description of the parameter's purpose and usage, extracted from the
197
+ * `@param` JSDoc tag.
198
+ */
199
+ description?: string | undefined;
200
+ }
201
+ /**
202
+ * Metadata for function return type.
203
+ *
204
+ * Describes the return type of a function including its schema, whether a
205
+ * value is always returned, and documentation.
206
+ *
207
+ * @template Schema JSON schema type based on OpenAPI version
208
+ */
209
+ interface IOutput<Schema extends OpenApi.IJsonSchema | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema> {
210
+ /**
211
+ * JSON Schema for the return type.
212
+ *
213
+ * Complete schema definition describing the return value type, including
214
+ * constraints and nested structures.
215
+ */
216
+ schema: Schema;
217
+ /**
218
+ * Whether a value is always returned.
219
+ *
220
+ * `true` if the function always returns a value, `false` if it may return
221
+ * `undefined` or has a void return type.
222
+ */
223
+ required: boolean;
224
+ /**
225
+ * Return value description from documentation.
226
+ *
227
+ * Explanation of what the function returns, extracted from the `@returns`
228
+ * or `@return` JSDoc tag.
229
+ */
230
+ description?: string | undefined;
231
+ }
232
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IJsonSchemaApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IJsonSchemaApplication.js","sourceRoot":"","sources":["../../src/schema/IJsonSchemaApplication.ts"],"names":[],"mappings":""}
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Common attributes shared by all JSON schema types.
3
+ *
4
+ * `IJsonSchemaAttribute` defines the base set of metadata properties that can
5
+ * be attached to any JSON schema type. These attributes provide documentation,
6
+ * deprecation status, examples, and access control information.
7
+ *
8
+ * This interface serves as the foundation for all schema types in typia's JSON
9
+ * Schema generation. The namespace contains type-specific variants (e.g.,
10
+ * {@link IBoolean}, {@link IString}) that add a `type` discriminator while
11
+ * inheriting all base attributes.
12
+ *
13
+ * These attributes are populated from JSDoc comments during schema generation:
14
+ *
15
+ * - `@title` tag → {@link title}
16
+ * - Main comment body → {@link description}
17
+ * - `@deprecated` tag → {@link deprecated}
18
+ * - `@example` tag → {@link example}
19
+ *
20
+ * @author Jeongho Nam - https://github.com/samchon
21
+ */
22
+ export interface IJsonSchemaAttribute {
23
+ /**
24
+ * Short title for the schema.
25
+ *
26
+ * A brief, human-readable name for the type. Typically extracted from the
27
+ * first line of a JSDoc comment or the `@title` tag.
28
+ */
29
+ title?: string;
30
+ /**
31
+ * Detailed description of the schema.
32
+ *
33
+ * Full documentation for the type, explaining its purpose, constraints, and
34
+ * usage. Extracted from JSDoc comment body. Supports markdown formatting in
35
+ * many JSON Schema consumers.
36
+ */
37
+ description?: string;
38
+ /**
39
+ * Whether this type is deprecated.
40
+ *
41
+ * When `true`, indicates the type should no longer be used and may be removed
42
+ * in future versions. Set via the `@deprecated` JSDoc tag.
43
+ */
44
+ deprecated?: boolean;
45
+ /**
46
+ * Single example value for the schema.
47
+ *
48
+ * A representative value that conforms to the schema, useful for
49
+ * documentation and testing. Set via the `@example` JSDoc tag.
50
+ */
51
+ example?: any;
52
+ /**
53
+ * Named example values for the schema.
54
+ *
55
+ * Multiple examples as key-value pairs, where keys are example names and
56
+ * values are conforming data. Useful for showing different valid states or
57
+ * edge cases.
58
+ */
59
+ examples?: Record<string, any>;
60
+ /**
61
+ * Whether the property is read-only.
62
+ *
63
+ * When `true`, the property should not be modified by clients and is
64
+ * typically set by the server. Useful for generated IDs, timestamps, etc.
65
+ */
66
+ readOnly?: boolean;
67
+ /**
68
+ * Whether the property is write-only.
69
+ *
70
+ * When `true`, the property is accepted on input but never returned in
71
+ * responses. Common for sensitive data like passwords.
72
+ */
73
+ writeOnly?: boolean;
74
+ }
75
+ export declare namespace IJsonSchemaAttribute {
76
+ /**
77
+ * Attribute interface for boolean schema types.
78
+ *
79
+ * Extends base attributes with `type: "boolean"` discriminator.
80
+ */
81
+ export interface IBoolean extends ISignificant<"boolean"> {
82
+ }
83
+ /**
84
+ * Attribute interface for integer schema types.
85
+ *
86
+ * Extends base attributes with `type: "integer"` discriminator. Note: JSON
87
+ * Schema uses "integer" for whole numbers, distinct from "number".
88
+ */
89
+ export interface IInteger extends ISignificant<"integer"> {
90
+ }
91
+ /**
92
+ * Attribute interface for number schema types.
93
+ *
94
+ * Extends base attributes with `type: "number"` discriminator. Represents
95
+ * floating-point numbers in JSON Schema.
96
+ */
97
+ export interface INumber extends ISignificant<"number"> {
98
+ }
99
+ /**
100
+ * Attribute interface for string schema types.
101
+ *
102
+ * Extends base attributes with `type: "string"` discriminator.
103
+ */
104
+ export interface IString extends ISignificant<"string"> {
105
+ }
106
+ /**
107
+ * Attribute interface for object schema types.
108
+ *
109
+ * Extends base attributes with `type: "object"` discriminator. Used for
110
+ * structured data with named properties.
111
+ */
112
+ export interface IObject extends ISignificant<"object"> {
113
+ }
114
+ /**
115
+ * Attribute interface for array schema types.
116
+ *
117
+ * Extends base attributes with `type: "array"` discriminator. Represents
118
+ * ordered collections of items.
119
+ */
120
+ export interface IArray extends ISignificant<"array"> {
121
+ }
122
+ /**
123
+ * Attribute interface for null schema types.
124
+ *
125
+ * Extends base attributes with `type: "null"` discriminator. Represents the
126
+ * JSON null value.
127
+ */
128
+ export interface INull extends ISignificant<"null"> {
129
+ }
130
+ /**
131
+ * Attribute interface for unknown/untyped schemas.
132
+ *
133
+ * Used when the schema type is not specified or cannot be determined. The
134
+ * `type` property is explicitly undefined to indicate no type constraint.
135
+ */
136
+ export interface IUnknown extends IJsonSchemaAttribute {
137
+ type?: undefined;
138
+ }
139
+ /**
140
+ * Base interface for type-discriminated schema attributes.
141
+ *
142
+ * Internal helper that combines base attributes with a type discriminator.
143
+ * Each specific type interface (IBoolean, IString, etc.) extends this with
144
+ * its corresponding type literal.
145
+ *
146
+ * @template Type - The JSON Schema type string literal
147
+ */
148
+ interface ISignificant<Type extends string> extends IJsonSchemaAttribute {
149
+ type: Type;
150
+ }
151
+ export {};
152
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IJsonSchemaAttribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IJsonSchemaAttribute.js","sourceRoot":"","sources":["../../src/schema/IJsonSchemaAttribute.ts"],"names":[],"mappings":""}
@@ -0,0 +1,109 @@
1
+ import { OpenApi } from "../openapi/OpenApi";
2
+ import { OpenApiV3 } from "../openapi/OpenApiV3";
3
+ /**
4
+ * Collection of JSON schemas generated from multiple TypeScript types.
5
+ *
6
+ * `IJsonSchemaCollection` holds JSON schemas for multiple TypeScript types
7
+ * generated at compile time by `typia.json.schemas<[T1, T2, ...]>()`. The
8
+ * schemas share a common components pool to avoid duplication when types
9
+ * reference each other.
10
+ *
11
+ * This is useful when you need schemas for multiple related types and want to
12
+ * share component definitions between them. For single types, use
13
+ * {@link IJsonSchemaUnit} instead. For function schemas, see
14
+ * {@link IJsonSchemaApplication}.
15
+ *
16
+ * The collection contains:
17
+ *
18
+ * - {@link IV3_1.schemas | schemas}: Array of schemas, one per input type
19
+ * - {@link IV3_1.components | components}: Shared `$ref` definitions
20
+ * - {@link IV3_1.__types | __types}: Phantom property for type inference
21
+ *
22
+ * @author Jeongho Nam - https://github.com/samchon
23
+ * @template Version OpenAPI version ("3.0" or "3.1")
24
+ * @template Types Tuple of original TypeScript types
25
+ */
26
+ export type IJsonSchemaCollection<Version extends "3.0" | "3.1" = "3.1", Types = unknown[]> = Version extends "3.0" ? IJsonSchemaCollection.IV3_0<Types> : IJsonSchemaCollection.IV3_1<Types>;
27
+ export declare namespace IJsonSchemaCollection {
28
+ /**
29
+ * JSON Schema collection for OpenAPI v3.0 specification.
30
+ *
31
+ * Uses OpenAPI v3.0 compatible JSON Schema format. In v3.0, nullable types
32
+ * are expressed with `nullable: true` rather than v3.1's `type` arrays.
33
+ *
34
+ * @template Types Tuple of original TypeScript types for phantom type
35
+ * preservation
36
+ */
37
+ interface IV3_0<Types = unknown[]> {
38
+ /**
39
+ * OpenAPI specification version.
40
+ *
41
+ * Always `"3.0"` for this variant. Use this discriminator to determine
42
+ * which schema format is in use.
43
+ */
44
+ version: "3.0";
45
+ /**
46
+ * Generated JSON schemas, one per input type.
47
+ *
48
+ * Array of schemas in the same order as the input type tuple. Each schema
49
+ * may reference definitions in {@link components}.
50
+ */
51
+ schemas: OpenApiV3.IJsonSchema[];
52
+ /**
53
+ * Shared schema definitions for `$ref` references.
54
+ *
55
+ * Contains named schemas used across multiple types in the collection.
56
+ * Reduces duplication when types share common structures.
57
+ */
58
+ components: OpenApiV3.IComponents;
59
+ /**
60
+ * Phantom property for TypeScript generic type preservation.
61
+ *
62
+ * This property exists only in the type system to preserve the `Types`
63
+ * generic parameter. It is always `undefined` at runtime and should not be
64
+ * accessed or used in application code.
65
+ */
66
+ __types?: Types | undefined;
67
+ }
68
+ /**
69
+ * JSON Schema collection for OpenAPI v3.1 specification.
70
+ *
71
+ * Uses OpenAPI v3.1 compatible JSON Schema format. v3.1 aligns more closely
72
+ * with JSON Schema draft 2020-12, supporting features like `type` arrays for
73
+ * nullable types and `const` values.
74
+ *
75
+ * @template Types Tuple of original TypeScript types for phantom type
76
+ * preservation
77
+ */
78
+ interface IV3_1<Types = unknown[]> {
79
+ /**
80
+ * OpenAPI specification version.
81
+ *
82
+ * Always `"3.1"` for this variant. Use this discriminator to determine
83
+ * which schema format is in use.
84
+ */
85
+ version: "3.1";
86
+ /**
87
+ * Shared schema definitions for `$ref` references.
88
+ *
89
+ * Contains named schemas used across multiple types in the collection.
90
+ * Reduces duplication when types share common structures.
91
+ */
92
+ components: OpenApi.IComponents;
93
+ /**
94
+ * Generated JSON schemas, one per input type.
95
+ *
96
+ * Array of schemas in the same order as the input type tuple. Each schema
97
+ * may reference definitions in {@link components}.
98
+ */
99
+ schemas: OpenApi.IJsonSchema[];
100
+ /**
101
+ * Phantom property for TypeScript generic type preservation.
102
+ *
103
+ * This property exists only in the type system to preserve the `Types`
104
+ * generic parameter. It is always `undefined` at runtime and should not be
105
+ * accessed or used in application code.
106
+ */
107
+ __types?: Types | undefined;
108
+ }
109
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IJsonSchemaCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IJsonSchemaCollection.js","sourceRoot":"","sources":["../../src/schema/IJsonSchemaCollection.ts"],"names":[],"mappings":""}
@@ -0,0 +1,81 @@
1
+ import { OpenApi } from "../openapi";
2
+ /**
3
+ * Error information from JSON schema transformation.
4
+ *
5
+ * `IJsonSchemaTransformError` represents an error that occurred during
6
+ * transformation or iteration of {@link OpenApi.IJsonSchema} types. This error
7
+ * type is primarily generated when converting OpenAPI schemas to LLM-compatible
8
+ * formats via {@link ILlmSchema}.
9
+ *
10
+ * Common transformation failures include:
11
+ *
12
+ * - **Missing references**: `$ref` pointing to non-existent schema definitions
13
+ * - **Unsupported tuple types**: All LLM providers reject tuple schemas
14
+ * - **Unsupported union types**: Gemini does not support `oneOf` schemas
15
+ * - **Unsupported dynamic objects**: ChatGPT and Gemini reject
16
+ * `additionalProperties`
17
+ *
18
+ * The {@link reasons} array provides detailed information about each failure,
19
+ * including the problematic schema, its location path, and a human-readable
20
+ * error message. Use this information to diagnose and fix schema compatibility
21
+ * issues.
22
+ *
23
+ * @author Jeongho Nam - https://github.com/samchon
24
+ */
25
+ export interface IJsonSchemaTransformError {
26
+ /**
27
+ * Name of the method that caused the error.
28
+ *
29
+ * Identifies which transformation function failed, such as
30
+ * `"HttpLlm.application"` or `"LlmSchemaConverter.schema"`.
31
+ */
32
+ method: string;
33
+ /**
34
+ * Summary error message.
35
+ *
36
+ * A human-readable description of the overall error. For detailed information
37
+ * about specific failures, examine the {@link reasons} array.
38
+ */
39
+ message: string;
40
+ /**
41
+ * Detailed list of transformation failures.
42
+ *
43
+ * Each entry describes a specific schema that failed transformation,
44
+ * including its location and the reason for failure. Multiple failures can
45
+ * occur in a single transformation when processing complex schemas.
46
+ */
47
+ reasons: IJsonSchemaTransformError.IReason[];
48
+ }
49
+ export declare namespace IJsonSchemaTransformError {
50
+ /**
51
+ * Detailed information about a single transformation failure.
52
+ *
53
+ * Provides the specific schema that failed, its accessor path for locating it
54
+ * within the document, and a message explaining why the transformation
55
+ * failed.
56
+ */
57
+ interface IReason {
58
+ /**
59
+ * The schema that caused the transformation failure.
60
+ *
61
+ * The actual JSON schema object that could not be transformed. Inspect this
62
+ * to understand the problematic schema structure.
63
+ */
64
+ schema: OpenApi.IJsonSchema;
65
+ /**
66
+ * Path to the failing schema within the document.
67
+ *
68
+ * A dot-notation path (e.g., `"components.schemas.User.properties.tags"`)
69
+ * that identifies where the problematic schema is located. Use this to
70
+ * locate and fix the issue in the source OpenAPI document.
71
+ */
72
+ accessor: string;
73
+ /**
74
+ * Human-readable explanation of the failure.
75
+ *
76
+ * Describes why the schema could not be transformed, such as "Tuple type is
77
+ * not supported" or "Cannot resolve $ref reference".
78
+ */
79
+ message: string;
80
+ }
81
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IJsonSchemaTransformError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IJsonSchemaTransformError.js","sourceRoot":"","sources":["../../src/schema/IJsonSchemaTransformError.ts"],"names":[],"mappings":""}