@nestia/sdk 14.0.1 → 14.0.2

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 (377) hide show
  1. package/assets/bundle/distribute/build-sdk.cjs +28 -0
  2. package/assets/bundle/distribute/package.json +6 -2
  3. package/lib/INestiaConfig.d.ts +55 -24
  4. package/lib/NestiaSdkApplication.d.ts +60 -0
  5. package/lib/NestiaSdkApplication.js +63 -5
  6. package/lib/NestiaSdkApplication.js.map +1 -1
  7. package/lib/NestiaSwaggerComposer.d.ts +21 -0
  8. package/lib/NestiaSwaggerComposer.js +21 -3
  9. package/lib/NestiaSwaggerComposer.js.map +1 -1
  10. package/lib/analyses/AccessorAnalyzer.d.ts +26 -0
  11. package/lib/analyses/AccessorAnalyzer.js +26 -0
  12. package/lib/analyses/AccessorAnalyzer.js.map +1 -1
  13. package/lib/analyses/ConfigAnalyzer.d.ts +41 -0
  14. package/lib/analyses/ConfigAnalyzer.js +48 -73
  15. package/lib/analyses/ConfigAnalyzer.js.map +1 -1
  16. package/lib/analyses/ImportAnalyzer.d.ts +25 -0
  17. package/lib/analyses/ImportAnalyzer.js +25 -0
  18. package/lib/analyses/ImportAnalyzer.js.map +1 -1
  19. package/lib/analyses/ParameterNameAnalyzer.d.ts +24 -0
  20. package/lib/analyses/ParameterNameAnalyzer.js +15 -0
  21. package/lib/analyses/ParameterNameAnalyzer.js.map +1 -1
  22. package/lib/analyses/PathAnalyzer.d.ts +63 -1
  23. package/lib/analyses/PathAnalyzer.js +54 -9
  24. package/lib/analyses/PathAnalyzer.js.map +1 -1
  25. package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
  26. package/lib/analyses/ReflectControllerAnalyzer.js +22 -0
  27. package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
  28. package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
  29. package/lib/analyses/ReflectHttpOperationAnalyzer.js +28 -17
  30. package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
  31. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +31 -0
  32. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +21 -0
  33. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
  34. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +31 -0
  35. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +21 -0
  36. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
  37. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
  38. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +22 -0
  39. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
  40. package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
  41. package/lib/analyses/ReflectMcpOperationAnalyzer.js +30 -9
  42. package/lib/analyses/ReflectMcpOperationAnalyzer.js.map +1 -1
  43. package/lib/analyses/ReflectMetadataAnalyzer.d.ts +47 -0
  44. package/lib/analyses/ReflectMetadataAnalyzer.js +47 -0
  45. package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
  46. package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +29 -0
  47. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +21 -2
  48. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
  49. package/lib/analyses/SecurityAnalyzer.d.ts +15 -0
  50. package/lib/analyses/SecurityAnalyzer.js +15 -0
  51. package/lib/analyses/SecurityAnalyzer.js.map +1 -1
  52. package/lib/analyses/SwaggerExampleAnalyzer.d.ts +16 -0
  53. package/lib/analyses/SwaggerExampleAnalyzer.js +16 -0
  54. package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -1
  55. package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
  56. package/lib/analyses/TypedHttpRouteAnalyzer.js +172 -157
  57. package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
  58. package/lib/analyses/TypedMcpRouteAnalyzer.d.ts +29 -0
  59. package/lib/analyses/TypedMcpRouteAnalyzer.js +152 -20
  60. package/lib/analyses/TypedMcpRouteAnalyzer.js.map +1 -1
  61. package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +19 -0
  62. package/lib/analyses/TypedWebSocketRouteAnalyzer.js +19 -0
  63. package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
  64. package/lib/decorators/OperationMetadata.d.ts +6 -0
  65. package/lib/decorators/OperationMetadata.js +6 -0
  66. package/lib/decorators/OperationMetadata.js.map +1 -1
  67. package/lib/executable/internal/CommandParser.d.ts +19 -0
  68. package/lib/executable/internal/CommandParser.js +19 -0
  69. package/lib/executable/internal/CommandParser.js.map +1 -1
  70. package/lib/executable/internal/NestiaConfigLoader.d.ts +56 -0
  71. package/lib/executable/internal/NestiaConfigLoader.js +48 -42
  72. package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
  73. package/lib/executable/internal/NestiaSdkCommand.d.ts +60 -0
  74. package/lib/executable/internal/NestiaSdkCommand.js +95 -3
  75. package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
  76. package/lib/executable/internal/NestiaSdkWatcher.d.ts +81 -0
  77. package/lib/executable/internal/NestiaSdkWatcher.js +122 -38
  78. package/lib/executable/internal/NestiaSdkWatcher.js.map +1 -1
  79. package/lib/executable/internal/NestiaSwaggerWatch.d.ts +80 -0
  80. package/lib/executable/internal/NestiaSwaggerWatch.js +308 -0
  81. package/lib/executable/internal/NestiaSwaggerWatch.js.map +1 -0
  82. package/lib/factories/ExpressionFactory.d.ts +17 -2
  83. package/lib/factories/ExpressionFactory.js +17 -2
  84. package/lib/factories/ExpressionFactory.js.map +1 -1
  85. package/lib/factories/IdentifierFactory.d.ts +24 -0
  86. package/lib/factories/IdentifierFactory.js +24 -0
  87. package/lib/factories/IdentifierFactory.js.map +1 -1
  88. package/lib/factories/LiteralFactory.d.ts +22 -4
  89. package/lib/factories/LiteralFactory.js +30 -10
  90. package/lib/factories/LiteralFactory.js.map +1 -1
  91. package/lib/factories/StatementFactory.d.ts +28 -1
  92. package/lib/factories/StatementFactory.js +28 -1
  93. package/lib/factories/StatementFactory.js.map +1 -1
  94. package/lib/factories/TypeFactory.d.ts +24 -0
  95. package/lib/factories/TypeFactory.js +15 -0
  96. package/lib/factories/TypeFactory.js.map +1 -1
  97. package/lib/generates/CloneGenerator.d.ts +22 -0
  98. package/lib/generates/CloneGenerator.js +26 -5
  99. package/lib/generates/CloneGenerator.js.map +1 -1
  100. package/lib/generates/E2eGenerator.d.ts +19 -0
  101. package/lib/generates/E2eGenerator.js +19 -0
  102. package/lib/generates/E2eGenerator.js.map +1 -1
  103. package/lib/generates/SdkGenerator.d.ts +38 -0
  104. package/lib/generates/SdkGenerator.js +40 -2
  105. package/lib/generates/SdkGenerator.js.map +1 -1
  106. package/lib/generates/SwaggerGenerator.d.ts +36 -6
  107. package/lib/generates/SwaggerGenerator.js +55 -13
  108. package/lib/generates/SwaggerGenerator.js.map +1 -1
  109. package/lib/generates/internal/E2eFileProgrammer.d.ts +19 -0
  110. package/lib/generates/internal/E2eFileProgrammer.js +20 -1
  111. package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
  112. package/lib/generates/internal/FilePrinter.d.ts +43 -0
  113. package/lib/generates/internal/FilePrinter.js +43 -0
  114. package/lib/generates/internal/FilePrinter.js.map +1 -1
  115. package/lib/generates/internal/ImportDictionary.d.ts +92 -2
  116. package/lib/generates/internal/ImportDictionary.js +91 -3
  117. package/lib/generates/internal/ImportDictionary.js.map +1 -1
  118. package/lib/generates/internal/SdkAliasCollection.d.ts +119 -0
  119. package/lib/generates/internal/SdkAliasCollection.js +124 -7
  120. package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
  121. package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
  122. package/lib/generates/internal/SdkDistributionComposer.js +98 -59
  123. package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
  124. package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
  125. package/lib/generates/internal/SdkFileProgrammer.js +18 -0
  126. package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
  127. package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +29 -0
  128. package/lib/generates/internal/SdkHttpCloneProgrammer.js +33 -0
  129. package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
  130. package/lib/generates/internal/SdkHttpCloneReferencer.d.ts +19 -0
  131. package/lib/generates/internal/SdkHttpCloneReferencer.js +78 -25
  132. package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
  133. package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +19 -0
  134. package/lib/generates/internal/SdkHttpFunctionProgrammer.js +19 -0
  135. package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
  136. package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
  137. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +19 -0
  138. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
  139. package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +104 -2
  140. package/lib/generates/internal/SdkHttpParameterProgrammer.js +70 -0
  141. package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
  142. package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
  143. package/lib/generates/internal/SdkHttpRouteProgrammer.js +20 -0
  144. package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
  145. package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
  146. package/lib/generates/internal/SdkHttpSimulationProgrammer.js +49 -5
  147. package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
  148. package/lib/generates/internal/SdkImportWizard.d.ts +63 -0
  149. package/lib/generates/internal/SdkImportWizard.js +63 -0
  150. package/lib/generates/internal/SdkImportWizard.js.map +1 -1
  151. package/lib/generates/internal/SdkMcpRouteProgrammer.d.ts +17 -2
  152. package/lib/generates/internal/SdkMcpRouteProgrammer.js +33 -13
  153. package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
  154. package/lib/generates/internal/SdkPathTemplate.d.ts +15 -0
  155. package/lib/generates/internal/SdkPathTemplate.js +15 -0
  156. package/lib/generates/internal/SdkPathTemplate.js.map +1 -1
  157. package/lib/generates/internal/SdkRouteDirectory.d.ts +10 -0
  158. package/lib/generates/internal/SdkRouteDirectory.js +10 -0
  159. package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
  160. package/lib/generates/internal/SdkTypeProgrammer.d.ts +54 -1
  161. package/lib/generates/internal/SdkTypeProgrammer.js +96 -12
  162. package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
  163. package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +36 -3
  164. package/lib/generates/internal/SdkTypeTagProgrammer.js +28 -7
  165. package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
  166. package/lib/generates/internal/SdkWebSocketCloneProgrammer.d.ts +40 -0
  167. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js +149 -142
  168. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js.map +1 -1
  169. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +19 -0
  170. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +19 -0
  171. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
  172. package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +81 -2
  173. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +48 -0
  174. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
  175. package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
  176. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +18 -0
  177. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
  178. package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +42 -0
  179. package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -1
  180. package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
  181. package/lib/generates/internal/SwaggerOperationComposer.d.ts +18 -0
  182. package/lib/generates/internal/SwaggerOperationComposer.js +18 -0
  183. package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
  184. package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +39 -0
  185. package/lib/generates/internal/SwaggerOperationParameterComposer.js +31 -8
  186. package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
  187. package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +19 -0
  188. package/lib/generates/internal/SwaggerOperationResponseComposer.js +19 -0
  189. package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
  190. package/lib/internal/legacy.d.ts +296 -16
  191. package/lib/internal/legacy.js +127 -10
  192. package/lib/internal/legacy.js.map +1 -1
  193. package/lib/structures/INestiaProject.d.ts +10 -0
  194. package/lib/structures/INestiaSdkInput.d.ts +30 -0
  195. package/lib/structures/IOperationMetadata.d.ts +55 -0
  196. package/lib/structures/IReflectController.d.ts +10 -0
  197. package/lib/structures/IReflectHttpOperation.d.ts +10 -0
  198. package/lib/structures/IReflectHttpOperationException.d.ts +10 -0
  199. package/lib/structures/IReflectHttpOperationParameter.d.ts +47 -0
  200. package/lib/structures/IReflectHttpOperationSuccess.d.ts +11 -0
  201. package/lib/structures/IReflectImport.d.ts +10 -0
  202. package/lib/structures/IReflectMcpOperation.d.ts +19 -0
  203. package/lib/structures/IReflectMcpOperationParameter.d.ts +9 -0
  204. package/lib/structures/IReflectOperationError.d.ts +28 -0
  205. package/lib/structures/IReflectOperationError.js +22 -2
  206. package/lib/structures/IReflectOperationError.js.map +1 -1
  207. package/lib/structures/IReflectType.d.ts +9 -0
  208. package/lib/structures/IReflectWebSocketOperation.d.ts +10 -0
  209. package/lib/structures/IReflectWebSocketOperationParameter.d.ts +55 -0
  210. package/lib/structures/ITypedApplication.d.ts +10 -0
  211. package/lib/structures/ITypedHttpRoute.d.ts +10 -0
  212. package/lib/structures/ITypedHttpRouteException.d.ts +10 -0
  213. package/lib/structures/ITypedHttpRouteParameter.d.ts +45 -0
  214. package/lib/structures/ITypedHttpRouteSuccess.d.ts +10 -0
  215. package/lib/structures/ITypedMcpRoute.d.ts +11 -0
  216. package/lib/structures/ITypedWebSocketRoute.d.ts +10 -0
  217. package/lib/transform.d.ts +6 -0
  218. package/lib/transform.js +6 -0
  219. package/lib/transform.js.map +1 -1
  220. package/lib/utils/ArrayUtil.d.ts +31 -1
  221. package/lib/utils/ArrayUtil.js +32 -11
  222. package/lib/utils/ArrayUtil.js.map +1 -1
  223. package/lib/utils/EmittedJavaScriptPatcher.d.ts +20 -0
  224. package/lib/utils/EmittedJavaScriptPatcher.js +65 -46
  225. package/lib/utils/EmittedJavaScriptPatcher.js.map +1 -1
  226. package/lib/utils/FileRetriever.d.ts +29 -0
  227. package/lib/utils/FileRetriever.js +29 -0
  228. package/lib/utils/FileRetriever.js.map +1 -1
  229. package/lib/utils/HttpResponseContentTypeUtil.d.ts +41 -0
  230. package/lib/utils/HttpResponseContentTypeUtil.js +31 -0
  231. package/lib/utils/HttpResponseContentTypeUtil.js.map +1 -1
  232. package/lib/utils/MapUtil.d.ts +64 -1
  233. package/lib/utils/MapUtil.js +24 -3
  234. package/lib/utils/MapUtil.js.map +1 -1
  235. package/lib/utils/PathUtil.d.ts +31 -0
  236. package/lib/utils/PathUtil.js +38 -0
  237. package/lib/utils/PathUtil.js.map +1 -1
  238. package/lib/utils/SdkBundlePath.d.ts +2 -0
  239. package/lib/utils/SdkBundlePath.js +10 -0
  240. package/lib/utils/SdkBundlePath.js.map +1 -0
  241. package/lib/utils/SdkInputFilter.d.ts +31 -0
  242. package/lib/utils/SdkInputFilter.js +115 -0
  243. package/lib/utils/SdkInputFilter.js.map +1 -0
  244. package/lib/utils/SourceFinder.d.ts +35 -0
  245. package/lib/utils/SourceFinder.js +47 -12
  246. package/lib/utils/SourceFinder.js.map +1 -1
  247. package/lib/utils/StringUtil.d.ts +77 -2
  248. package/lib/utils/StringUtil.js +166 -4
  249. package/lib/utils/StringUtil.js.map +1 -1
  250. package/lib/utils/TemporaryDirectory.d.ts +60 -0
  251. package/lib/utils/TemporaryDirectory.js +112 -0
  252. package/lib/utils/TemporaryDirectory.js.map +1 -0
  253. package/lib/utils/TsConfigReader.d.ts +42 -0
  254. package/lib/utils/TsConfigReader.js +98 -14
  255. package/lib/utils/TsConfigReader.js.map +1 -1
  256. package/lib/utils/TtscExecutor.d.ts +23 -1
  257. package/lib/utils/TtscExecutor.js +22 -0
  258. package/lib/utils/TtscExecutor.js.map +1 -1
  259. package/lib/utils/VersioningStrategy.d.ts +26 -1
  260. package/lib/utils/VersioningStrategy.js +30 -9
  261. package/lib/utils/VersioningStrategy.js.map +1 -1
  262. package/lib/validators/TextPlainValidator.d.ts +19 -0
  263. package/lib/validators/TextPlainValidator.js +19 -0
  264. package/lib/validators/TextPlainValidator.js.map +1 -1
  265. package/native/go.mod +1 -1
  266. package/native/go.sum +2 -2
  267. package/native/sdk/register.go +12 -2
  268. package/native/sdk/sdk_metadata_json.go +6 -1
  269. package/native/sdk/sdk_transform.go +388 -397
  270. package/package.json +7 -5
  271. package/src/INestiaConfig.ts +55 -24
  272. package/src/NestiaSdkApplication.ts +66 -7
  273. package/src/NestiaSwaggerComposer.ts +21 -6
  274. package/src/analyses/AccessorAnalyzer.ts +26 -0
  275. package/src/analyses/ConfigAnalyzer.ts +49 -87
  276. package/src/analyses/ImportAnalyzer.ts +25 -0
  277. package/src/analyses/ParameterNameAnalyzer.ts +24 -0
  278. package/src/analyses/PathAnalyzer.ts +63 -11
  279. package/src/analyses/ReflectControllerAnalyzer.ts +32 -0
  280. package/src/analyses/ReflectHttpOperationAnalyzer.ts +32 -10
  281. package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
  282. package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +31 -0
  283. package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +32 -0
  284. package/src/analyses/ReflectMcpOperationAnalyzer.ts +32 -1
  285. package/src/analyses/ReflectMetadataAnalyzer.ts +47 -0
  286. package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +33 -4
  287. package/src/analyses/SecurityAnalyzer.ts +15 -0
  288. package/src/analyses/SwaggerExampleAnalyzer.ts +16 -0
  289. package/src/analyses/TypedHttpRouteAnalyzer.ts +240 -184
  290. package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
  291. package/src/analyses/TypedWebSocketRouteAnalyzer.ts +19 -0
  292. package/src/decorators/OperationMetadata.ts +6 -0
  293. package/src/executable/internal/CommandParser.ts +19 -0
  294. package/src/executable/internal/NestiaConfigLoader.ts +66 -50
  295. package/src/executable/internal/NestiaSdkCommand.ts +96 -3
  296. package/src/executable/internal/NestiaSdkWatcher.ts +169 -41
  297. package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
  298. package/src/factories/ExpressionFactory.ts +17 -2
  299. package/src/factories/IdentifierFactory.ts +24 -0
  300. package/src/factories/LiteralFactory.ts +44 -11
  301. package/src/factories/StatementFactory.ts +28 -1
  302. package/src/factories/TypeFactory.ts +24 -0
  303. package/src/generates/CloneGenerator.ts +26 -5
  304. package/src/generates/E2eGenerator.ts +19 -0
  305. package/src/generates/SdkGenerator.ts +40 -9
  306. package/src/generates/SwaggerGenerator.ts +56 -14
  307. package/src/generates/internal/E2eFileProgrammer.ts +20 -0
  308. package/src/generates/internal/FilePrinter.ts +43 -0
  309. package/src/generates/internal/ImportDictionary.ts +110 -3
  310. package/src/generates/internal/SdkAliasCollection.ts +133 -11
  311. package/src/generates/internal/SdkDistributionComposer.ts +117 -66
  312. package/src/generates/internal/SdkFileProgrammer.ts +18 -0
  313. package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
  314. package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
  315. package/src/generates/internal/SdkHttpFunctionProgrammer.ts +19 -0
  316. package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +19 -0
  317. package/src/generates/internal/SdkHttpParameterProgrammer.ts +104 -2
  318. package/src/generates/internal/SdkHttpRouteProgrammer.ts +20 -0
  319. package/src/generates/internal/SdkHttpSimulationProgrammer.ts +72 -5
  320. package/src/generates/internal/SdkImportWizard.ts +63 -0
  321. package/src/generates/internal/SdkMcpRouteProgrammer.ts +38 -18
  322. package/src/generates/internal/SdkPathTemplate.ts +15 -0
  323. package/src/generates/internal/SdkRouteDirectory.ts +10 -0
  324. package/src/generates/internal/SdkTypeProgrammer.ts +118 -14
  325. package/src/generates/internal/SdkTypeTagProgrammer.ts +37 -7
  326. package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
  327. package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +19 -0
  328. package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +81 -2
  329. package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +18 -0
  330. package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
  331. package/src/generates/internal/SwaggerOperationComposer.ts +18 -0
  332. package/src/generates/internal/SwaggerOperationParameterComposer.ts +41 -8
  333. package/src/generates/internal/SwaggerOperationResponseComposer.ts +19 -0
  334. package/src/internal/legacy-augmentation.d.ts +16 -0
  335. package/src/internal/legacy.ts +296 -26
  336. package/src/structures/INestiaProject.ts +10 -0
  337. package/src/structures/INestiaSdkInput.ts +30 -0
  338. package/src/structures/IOperationMetadata.ts +55 -0
  339. package/src/structures/IReflectController.ts +10 -0
  340. package/src/structures/IReflectHttpOperation.ts +10 -0
  341. package/src/structures/IReflectHttpOperationException.ts +10 -0
  342. package/src/structures/IReflectHttpOperationParameter.ts +47 -0
  343. package/src/structures/IReflectHttpOperationSuccess.ts +11 -0
  344. package/src/structures/IReflectImport.ts +10 -0
  345. package/src/structures/IReflectMcpOperation.ts +19 -0
  346. package/src/structures/IReflectMcpOperationParameter.ts +9 -0
  347. package/src/structures/IReflectOperationError.ts +31 -2
  348. package/src/structures/IReflectType.ts +9 -0
  349. package/src/structures/IReflectWebSocketOperation.ts +10 -0
  350. package/src/structures/IReflectWebSocketOperationParameter.ts +55 -0
  351. package/src/structures/ITypedApplication.ts +10 -0
  352. package/src/structures/ITypedHttpRoute.ts +10 -0
  353. package/src/structures/ITypedHttpRouteException.ts +10 -0
  354. package/src/structures/ITypedHttpRouteParameter.ts +45 -0
  355. package/src/structures/ITypedHttpRouteSuccess.ts +10 -0
  356. package/src/structures/ITypedMcpRoute.ts +12 -0
  357. package/src/structures/ITypedWebSocketRoute.ts +10 -0
  358. package/src/transform.ts +6 -0
  359. package/src/utils/ArrayUtil.ts +32 -13
  360. package/src/utils/EmittedJavaScriptPatcher.ts +70 -47
  361. package/src/utils/FileRetriever.ts +29 -0
  362. package/src/utils/HttpResponseContentTypeUtil.ts +41 -0
  363. package/src/utils/MapUtil.ts +68 -3
  364. package/src/utils/PathUtil.ts +38 -0
  365. package/src/utils/SdkBundlePath.ts +11 -0
  366. package/src/utils/SdkInputFilter.ts +108 -0
  367. package/src/utils/SourceFinder.ts +51 -14
  368. package/src/utils/StringUtil.ts +182 -5
  369. package/src/utils/TemporaryDirectory.ts +108 -0
  370. package/src/utils/TsConfigReader.ts +124 -26
  371. package/src/utils/TtscExecutor.ts +23 -1
  372. package/src/utils/VersioningStrategy.ts +33 -13
  373. package/src/validators/TextPlainValidator.ts +19 -0
  374. package/lib/generates/internal/SwaggerReadonlyArrayEmender.d.ts +0 -9
  375. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js +0 -178
  376. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js.map +0 -1
  377. package/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
@@ -8,6 +8,16 @@ import { IJsDocTagInfo } from "typia";
8
8
  import { IReflectImport } from "./IReflectImport";
9
9
  import { IReflectType } from "./IReflectType";
10
10
 
11
+ /**
12
+ * The compile-time metadata of an operation: its parameters, its success, its
13
+ * exceptions, its description, and its JSDoc tags.
14
+ *
15
+ * @evidence contracts/common.md#principled-implementation The record is what the nestia transform serializes into the `OperationMetadata` decorator and the analyzers read back.
16
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
17
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
18
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
19
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IOperationMetadata describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
20
+ */
11
21
  export interface IOperationMetadata {
12
22
  parameters: IOperationMetadata.IParameter[];
13
23
  success: IOperationMetadata.IResponse;
@@ -16,12 +26,32 @@ export interface IOperationMetadata {
16
26
  jsDocTags: IJsDocTagInfo[];
17
27
  }
18
28
  export namespace IOperationMetadata {
29
+ /**
30
+ * The metadata of a parameter: the response fields plus its name, position,
31
+ * description, and tags.
32
+ *
33
+ * @evidence contracts/common.md#principled-implementation A parameter has the type facts of a response and the identity facts of a declaration.
34
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
35
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
36
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
37
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IOperationMetadata.IParameter describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
38
+ */
19
39
  export interface IParameter extends IResponse {
20
40
  name: string;
21
41
  index: number;
22
42
  description: string | null;
23
43
  jsDocTags: IJsDocTagInfo[];
24
44
  }
45
+ /**
46
+ * The metadata of a value: its reflected type, its imports, and its schemas
47
+ * in the primitive and the resolved forms.
48
+ *
49
+ * @evidence contracts/common.md#principled-implementation Each form is either a schema or the list of errors that made it unavailable, so an unreadable type is reported instead of dropped.
50
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
51
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
52
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
53
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IOperationMetadata.IResponse describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
54
+ */
25
55
  export interface IResponse {
26
56
  type: IReflectType | null;
27
57
  imports: IReflectImport[];
@@ -29,6 +59,16 @@ export namespace IOperationMetadata {
29
59
  resolved: ValidationPipe<ISchema, IError>;
30
60
  }
31
61
 
62
+ /**
63
+ * A schema: the components, the metadata, and the wire rule violations of the
64
+ * type.
65
+ *
66
+ * @evidence contracts/common.md#principled-implementation The components and the metadata describe the type and the HTTP rules record why it cannot travel as a query, a header, a path segment, or a form.
67
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
68
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
69
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
70
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IOperationMetadata.ISchema describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
71
+ */
32
72
  export interface ISchema {
33
73
  components: IMetadataComponents;
34
74
  metadata: IMetadataSchema;
@@ -44,6 +84,12 @@ export namespace IOperationMetadata {
44
84
  * The violations of each HTTP input category's rules, which are typia's own
45
85
  * validators except the path parameter rule typia keeps unexported and the
46
86
  * one of a field-named `@Query("key")` or `@Headers("key")`.
87
+ *
88
+ * @evidence contracts/common.md#principled-implementation One list per input kind lets the parameter analysis pick the list that applies.
89
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
90
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
91
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
92
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IOperationMetadata.IHttpRules describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
47
93
  */
48
94
  export interface IHttpRules {
49
95
  /** A query object: `@TypedQuery()`, `@Query()`, `@TypedQuery.Body()`. */
@@ -61,6 +107,15 @@ export namespace IOperationMetadata {
61
107
  /** A multipart body: `@TypedFormData.Body()`. */
62
108
  formData: IError[];
63
109
  }
110
+ /**
111
+ * One analysis error: the name, the accessor of the member, and the messages.
112
+ *
113
+ * @evidence contracts/common.md#principled-implementation The three members identify where in a type the error is.
114
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
115
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
116
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
117
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IOperationMetadata.IError describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
118
+ */
64
119
  export interface IError {
65
120
  name: string;
66
121
  accessor: string | null;
@@ -4,6 +4,16 @@ import { IReflectHttpOperation } from "./IReflectHttpOperation";
4
4
  import { IReflectMcpOperation } from "./IReflectMcpOperation";
5
5
  import { IReflectWebSocketOperation } from "./IReflectWebSocketOperation";
6
6
 
7
+ /**
8
+ * A reflected controller: its class, its file, its paths, prefixes, versions,
9
+ * security, tags, and operations.
10
+ *
11
+ * @evidence contracts/common.md#principled-implementation The record is the reflection result that the typed analysis consumes.
12
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
13
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
14
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
15
+ * @evidence contracts/portability.md#os-neutral-implementation file carries the controller source pathname supplied by ConfigAnalyzer; paths and prefixes retain Nest router spelling independently of native separators.
16
+ */
7
17
  export interface IReflectController {
8
18
  class: Function;
9
19
  prefixes: string[];
@@ -6,6 +6,16 @@ import { IReflectHttpOperationParameter } from "./IReflectHttpOperationParameter
6
6
  import { IReflectHttpOperationSuccess } from "./IReflectHttpOperationSuccess";
7
7
  import { IReflectImport } from "./IReflectImport";
8
8
 
9
+ /**
10
+ * A reflected HTTP operation: its function, name, method, paths, versions,
11
+ * parameters, success, exceptions, security, tags, imports, and description.
12
+ *
13
+ * @evidence contracts/common.md#principled-implementation The record joins Nest's runtime metadata with the compile-time metadata of the transform.
14
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
15
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
16
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
17
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperation describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
18
+ */
9
19
  export interface IReflectHttpOperation {
10
20
  protocol: "http";
11
21
  function: Function;
@@ -7,6 +7,16 @@ import {
7
7
  import { MetadataFactory } from "../internal/legacy";
8
8
  import { IReflectType } from "./IReflectType";
9
9
 
10
+ /**
11
+ * A reflected exception of an operation: its status, description, examples,
12
+ * type, metadata, components, and validator.
13
+ *
14
+ * @evidence contracts/common.md#principled-implementation The declaration fields come from `@TypedException` and the reflected fields from the transform.
15
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
16
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
17
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
18
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperationException describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
19
+ */
10
20
  export interface IReflectHttpOperationException {
11
21
  // BASIC PROPERTIES
12
22
  status: number | "2XX" | "3XX" | "4XX" | "5XX";
@@ -8,12 +8,32 @@ import {
8
8
  import { MetadataFactory } from "../internal/legacy";
9
9
  import { IReflectType } from "./IReflectType";
10
10
 
11
+ /**
12
+ * A reflected parameter of an HTTP operation: a body, headers, a path
13
+ * parameter, or a query.
14
+ *
15
+ * @evidence contracts/common.md#principled-implementation The union is discriminated by `category`, with the fields each category needs, and a preconfigured form for what Nest's metadata alone gives.
16
+ * @evidence contracts/common.md#clear-and-simple-design A union of four records plus the preconfigured union.
17
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
18
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
19
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperationParameter describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
20
+ */
11
21
  export type IReflectHttpOperationParameter =
12
22
  | IReflectHttpOperationParameter.IBody
13
23
  | IReflectHttpOperationParameter.IHeaders
14
24
  | IReflectHttpOperationParameter.IParam
15
25
  | IReflectHttpOperationParameter.IQuery;
16
26
  export namespace IReflectHttpOperationParameter {
27
+ /**
28
+ * The reflected parameter of a body, with its content type and whether it is
29
+ * encrypted.
30
+ *
31
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
32
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
33
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
34
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
35
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperationParameter.IBody describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
36
+ */
17
37
  export interface IBody extends IBase<"body"> {
18
38
  contentType:
19
39
  | "application/json"
@@ -22,12 +42,39 @@ export namespace IReflectHttpOperationParameter {
22
42
  | "text/plain";
23
43
  encrypted: boolean;
24
44
  }
45
+ /**
46
+ * The reflected parameter of the headers, as an object or as one field.
47
+ *
48
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
49
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
50
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
51
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
52
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperationParameter.IHeaders describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
53
+ */
25
54
  export interface IHeaders extends IBase<"headers"> {
26
55
  field: string | null;
27
56
  }
57
+ /**
58
+ * The reflected parameter of a path parameter with its field name.
59
+ *
60
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
61
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
62
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
63
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
64
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperationParameter.IParam describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
65
+ */
28
66
  export interface IParam extends IBase<"param"> {
29
67
  field: string;
30
68
  }
69
+ /**
70
+ * The reflected parameter of the query, as an object or as one field.
71
+ *
72
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
73
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
74
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
75
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
76
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperationParameter.IQuery describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
77
+ */
31
78
  export interface IQuery extends IBase<"query"> {
32
79
  field: string | null;
33
80
  }
@@ -8,6 +8,17 @@ import { MetadataFactory } from "../internal/legacy";
8
8
  import { HttpResponseContentTypeUtil } from "../utils/HttpResponseContentTypeUtil";
9
9
  import { IReflectType } from "./IReflectType";
10
10
 
11
+ /**
12
+ * The reflected success response of an operation: its type, status, content
13
+ * type, whether it is binary or encrypted, its schema, validator, and
14
+ * examples.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation The record holds what the SDK and the Swagger generators need to describe the response.
17
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
18
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
19
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
20
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectHttpOperationSuccess describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
21
+ */
11
22
  export interface IReflectHttpOperationSuccess {
12
23
  type: IReflectType;
13
24
  status: number;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * An import of a source file: its file, its namespace import, its default
3
+ * import, its named elements, and their aliases.
4
+ *
5
+ * @evidence contracts/common.md#principled-implementation The record is one import declaration in a form that can be merged by file.
6
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
7
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
8
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
9
+ * @evidence contracts/portability.md#os-neutral-implementation file carries the source identity emitted by the native import analyzer; ImportDictionary owns converting it to a relative slash-separated module specifier. Binding names and aliases are language identifiers.
10
+ */
1
11
  export interface IReflectImport {
2
12
  file: string;
3
13
  asterisk: string | null;
@@ -1,5 +1,6 @@
1
1
  import { IJsDocTagInfo } from "typia";
2
2
 
3
+ import { IOperationMetadata } from "./IOperationMetadata";
3
4
  import { IReflectImport } from "./IReflectImport";
4
5
  import { IReflectMcpOperationParameter } from "./IReflectMcpOperationParameter";
5
6
  import { IReflectType } from "./IReflectType";
@@ -10,6 +11,12 @@ import { IReflectType } from "./IReflectType";
10
11
  * Produced by {@link ReflectMcpOperationAnalyzer.analyze}; consumed by
11
12
  * {@link TypedMcpRouteAnalyzer.analyze} to produce the final
12
13
  * {@link ITypedMcpRoute}.
14
+ *
15
+ * @evidence contracts/common.md#principled-implementation The record joins the route metadata of the decorator with the compile-time metadata.
16
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
17
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
18
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
19
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectMcpOperation describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
13
20
  */
14
21
  export interface IReflectMcpOperation {
15
22
  protocol: "mcp";
@@ -23,12 +30,24 @@ export interface IReflectMcpOperation {
23
30
  function: Function;
24
31
  parameters: IReflectMcpOperationParameter[];
25
32
  returnType: IReflectType | null;
33
+ /** Native JSON return analysis; optional for source-only reflected inputs. */
34
+ returnMetadata?: IOperationMetadata.IResponse["primitive"];
26
35
  imports: IReflectImport[];
27
36
  description: string | null;
28
37
  jsDocTags: IJsDocTagInfo[];
29
38
  }
30
39
 
31
40
  export namespace IReflectMcpOperation {
41
+ /**
42
+ * The behavior hints of a tool: read-only, destructive, idempotent, and
43
+ * open-world.
44
+ *
45
+ * @evidence contracts/common.md#principled-implementation The four optional flags are the hints the MCP protocol defines.
46
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
47
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
48
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
49
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectMcpOperation.IAnnotations describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
50
+ */
32
51
  export interface IAnnotations {
33
52
  readOnlyHint?: boolean;
34
53
  destructiveHint?: boolean;
@@ -1,5 +1,6 @@
1
1
  import { IJsDocTagInfo } from "typia";
2
2
 
3
+ import { IOperationMetadata } from "./IOperationMetadata";
3
4
  import { IReflectImport } from "./IReflectImport";
4
5
  import { IReflectType } from "./IReflectType";
5
6
 
@@ -7,12 +8,20 @@ import { IReflectType } from "./IReflectType";
7
8
  * Parameter descriptor for an MCP tool method. Reflected from
8
9
  * `"nestia/McpRoute/Parameters"` metadata plus compile-time type information
9
10
  * collected by the nestia transformer.
11
+ *
12
+ * @evidence contracts/common.md#principled-implementation A tool has at most one parameter, and the record is what the SDK needs to type it.
13
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
14
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
15
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
16
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectMcpOperationParameter describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
10
17
  */
11
18
  export interface IReflectMcpOperationParameter {
12
19
  category: "params";
13
20
  name: string;
14
21
  index: number;
15
22
  type: IReflectType;
23
+ /** Native JSON wire analysis, retained independently of the source import. */
24
+ metadata?: IOperationMetadata.IResponse["primitive"];
16
25
  imports: IReflectImport[];
17
26
  description: string | null;
18
27
  jsDocTags: IJsDocTagInfo[];
@@ -2,6 +2,16 @@ import { IComparable } from "tstl";
2
2
 
3
3
  import { IOperationMetadata } from "../structures/IOperationMetadata";
4
4
 
5
+ /**
6
+ * An error or warning of the reflection: the file, the class, the function, the
7
+ * origin, and the contents.
8
+ *
9
+ * @evidence contracts/common.md#principled-implementation The members locate a problem down to the part of a function, and the namespace's key orders errors by that location so a report groups them.
10
+ * @evidence contracts/common.md#clear-and-simple-design A record and one key class in its namespace.
11
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior. The key class only compares fields.
12
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the record locates.
13
+ * @evidence contracts/portability.md#os-neutral-implementation file carries the original native source identity for diagnostics; class, function and from identify declarations rather than filesystem components.
14
+ */
5
15
  export interface IReflectOperationError {
6
16
  file: string;
7
17
  class: string;
@@ -10,16 +20,35 @@ export interface IReflectOperationError {
10
20
  contents: Array<string | IOperationMetadata.IError>;
11
21
  }
12
22
  export namespace IReflectOperationError {
23
+ /**
24
+ * An ordering key of an error: file, then class, then function, then origin.
25
+ *
26
+ * @evidence contracts/common.md#principled-implementation The key implements the strict weak order over the four fields that tstl's tree map requires, with an absent value ordered as the empty string.
27
+ * @evidence contracts/common.md#clear-and-simple-design One class with one method.
28
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It compares fields and holds no state beyond the error.
29
+ * @evidence contracts/common.md#meaningful-documentation The comment states the order.
30
+ * @evidence contracts/portability.md#os-neutral-implementation The key retains supplied source file spelling and declaration identifiers. Ordering is lexical for diagnostic grouping without asserting filesystem case or symlink equivalence.
31
+ */
13
32
  export class Key implements Pick<IComparable<Key>, "less"> {
14
33
  public constructor(public readonly error: IReflectOperationError) {}
15
34
 
35
+ /**
36
+ * Returns whether this key orders before the other.
37
+ *
38
+ * @evidence contracts/common.md#principled-implementation The fields are compared in order and the first that differs decides, which is a lexicographic order.
39
+ * @evidence contracts/common.md#clear-and-simple-design One method of chained comparisons.
40
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It compares only the four location fields.
41
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result.
42
+ * @evidence contracts/portability.md#os-neutral-implementation Comparison orders source identity strings and declaration fields lexically; it neither canonicalizes native paths nor treats ordering as filesystem equivalence.
43
+ */
16
44
  public less(obj: Key): boolean {
17
45
  if (this.error.file !== obj.error.file)
18
46
  return this.error.file < obj.error.file;
19
47
  else if (this.error.class !== obj.error.class)
20
48
  return this.error.class < obj.error.class;
21
- else if (this.error.function !== obj.error.function)
22
- return (this.error.function ?? "") < (obj.error.function ?? "");
49
+ const leftFunction = this.error.function ?? "";
50
+ const rightFunction = obj.error.function ?? "";
51
+ if (leftFunction !== rightFunction) return leftFunction < rightFunction;
23
52
  return (this.error.from ?? "") < (obj.error.from ?? "");
24
53
  }
25
54
  }
@@ -1,3 +1,12 @@
1
+ /**
2
+ * A reflected type: its name and, for a generic, its type arguments.
3
+ *
4
+ * @evidence contracts/common.md#principled-implementation The name is the text the transform recorded and the arguments make the type recursive.
5
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
6
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
7
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
8
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectType describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
9
+ */
1
10
  export interface IReflectType {
2
11
  name: string;
3
12
  typeArguments?: IReflectType[];
@@ -4,6 +4,16 @@ import { IJsDocTagInfo } from "typia";
4
4
  import { IReflectImport } from "./IReflectImport";
5
5
  import { IReflectWebSocketOperationParameter } from "./IReflectWebSocketOperationParameter";
6
6
 
7
+ /**
8
+ * A reflected WebSocket operation: its name, paths, function, versions,
9
+ * parameters, and imports.
10
+ *
11
+ * @evidence contracts/common.md#principled-implementation The record joins the route metadata of the decorator with the compile-time metadata.
12
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
13
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
14
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
15
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectWebSocketOperation describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
16
+ */
7
17
  export interface IReflectWebSocketOperation {
8
18
  protocol: "websocket";
9
19
  name: string;
@@ -3,6 +3,16 @@ import { IJsDocTagInfo } from "typia";
3
3
  import { IReflectImport } from "./IReflectImport";
4
4
  import { IReflectType } from "./IReflectType";
5
5
 
6
+ /**
7
+ * A parameter of a WebSocket operation: an acceptor, a driver, a header, a path
8
+ * parameter, or a query.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The union is discriminated by `category`, and a preconfigured form carries what the decorators alone record.
11
+ * @evidence contracts/common.md#clear-and-simple-design A union of five records plus the preconfigured form.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
13
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
14
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectWebSocketOperationParameter describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
15
+ */
6
16
  export type IReflectWebSocketOperationParameter =
7
17
  | IReflectWebSocketOperationParameter.IAcceptor
8
18
  | IReflectWebSocketOperationParameter.IDriver
@@ -10,10 +20,55 @@ export type IReflectWebSocketOperationParameter =
10
20
  | IReflectWebSocketOperationParameter.IParam
11
21
  | IReflectWebSocketOperationParameter.IQuery;
12
22
  export namespace IReflectWebSocketOperationParameter {
23
+ /**
24
+ * The parameter category `acceptor` of a WebSocket operation.
25
+ *
26
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
27
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
28
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
29
+ * @evidence contracts/common.md#meaningful-documentation The comment names the category.
30
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectWebSocketOperationParameter.IAcceptor describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
31
+ */
13
32
  export type IAcceptor = IBase<"acceptor">;
33
+ /**
34
+ * The parameter category `driver` of a WebSocket operation.
35
+ *
36
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
37
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
38
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
39
+ * @evidence contracts/common.md#meaningful-documentation The comment names the category.
40
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectWebSocketOperationParameter.IDriver describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
41
+ */
14
42
  export type IDriver = IBase<"driver">;
43
+ /**
44
+ * The parameter category `header` of a WebSocket operation.
45
+ *
46
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
47
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
48
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
49
+ * @evidence contracts/common.md#meaningful-documentation The comment names the category.
50
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectWebSocketOperationParameter.IHeader describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
51
+ */
15
52
  export type IHeader = IBase<"header">;
53
+ /**
54
+ * The parameter category `query` of a WebSocket operation.
55
+ *
56
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
57
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
58
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
59
+ * @evidence contracts/common.md#meaningful-documentation The comment names the category.
60
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectWebSocketOperationParameter.IQuery describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
61
+ */
16
62
  export type IQuery = IBase<"query">;
63
+ /**
64
+ * A path parameter of a WebSocket operation with its field name.
65
+ *
66
+ * @evidence contracts/common.md#principled-implementation The record adds the field that names the path placeholder to the shared base.
67
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
68
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
69
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
70
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation IReflectWebSocketOperationParameter.IParam describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
71
+ */
17
72
  export interface IParam extends IBase<"param"> {
18
73
  field: string;
19
74
  }
@@ -4,6 +4,16 @@ import { ITypedHttpRoute } from "./ITypedHttpRoute";
4
4
  import { ITypedMcpRoute } from "./ITypedMcpRoute";
5
5
  import { ITypedWebSocketRoute } from "./ITypedWebSocketRoute";
6
6
 
7
+ /**
8
+ * The typed application: the project, the metadata dictionary, and the typed
9
+ * routes.
10
+ *
11
+ * @evidence contracts/common.md#principled-implementation The record is the input of every generator.
12
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
13
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
14
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
15
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedApplication describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
16
+ */
7
17
  export interface ITypedApplication {
8
18
  project: INestiaProject;
9
19
  collection: IMetadataDictionary;
@@ -6,6 +6,16 @@ import { ITypedHttpRouteException } from "./ITypedHttpRouteException";
6
6
  import { ITypedHttpRouteParameter } from "./ITypedHttpRouteParameter";
7
7
  import { ITypedHttpRouteSuccess } from "./ITypedHttpRouteSuccess";
8
8
 
9
+ /**
10
+ * A typed HTTP route: one path of an operation with its parameters split by
11
+ * kind, its success, its exceptions, and its documentation.
12
+ *
13
+ * @evidence contracts/common.md#principled-implementation The reflected operation is expanded per path and its parameters are classified for the generators.
14
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
15
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
16
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
17
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRoute describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
18
+ */
9
19
  export interface ITypedHttpRoute {
10
20
  protocol: "http";
11
21
  function: Function;
@@ -3,6 +3,16 @@ import { OpenApi } from "@typia/interface";
3
3
  import { MetadataSchema } from "../internal/legacy";
4
4
  import { IReflectType } from "./IReflectType";
5
5
 
6
+ /**
7
+ * A typed exception: its status, description, examples, type, and resolved
8
+ * metadata.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The resolved metadata is what the SDK and the Swagger generators print.
11
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
13
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
14
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRouteException describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
15
+ */
6
16
  export interface ITypedHttpRouteException {
7
17
  // BASIC PROPERTIES
8
18
  status: number | "2XX" | "3XX" | "4XX" | "5XX";
@@ -4,12 +4,30 @@ import { IJsDocTagInfo } from "typia";
4
4
  import { MetadataSchema } from "../internal/legacy";
5
5
  import { IReflectType } from "./IReflectType";
6
6
 
7
+ /**
8
+ * A typed parameter of a route: a body, headers, a path parameter, or a query.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The union is discriminated by `category`, and each member carries the resolved metadata.
11
+ * @evidence contracts/common.md#clear-and-simple-design A union of four records.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
13
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
14
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRouteParameter describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
15
+ */
7
16
  export type ITypedHttpRouteParameter =
8
17
  | ITypedHttpRouteParameter.IBody
9
18
  | ITypedHttpRouteParameter.IHeaders
10
19
  | ITypedHttpRouteParameter.IPath
11
20
  | ITypedHttpRouteParameter.IQuery;
12
21
  export namespace ITypedHttpRouteParameter {
22
+ /**
23
+ * The typed form of a body parameter.
24
+ *
25
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
26
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
27
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
28
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
29
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRouteParameter.IBody describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
30
+ */
13
31
  export interface IBody extends IBase<"body"> {
14
32
  contentType:
15
33
  | "application/json"
@@ -18,12 +36,39 @@ export namespace ITypedHttpRouteParameter {
18
36
  | "text/plain";
19
37
  encrypted: boolean;
20
38
  }
39
+ /**
40
+ * The typed form of a headers parameter.
41
+ *
42
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
43
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
44
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
45
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
46
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRouteParameter.IHeaders describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
47
+ */
21
48
  export interface IHeaders extends IBase<"headers"> {
22
49
  field: string | null;
23
50
  }
51
+ /**
52
+ * The typed form of a path parameter parameter.
53
+ *
54
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
55
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
56
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
57
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
58
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRouteParameter.IPath describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
59
+ */
24
60
  export interface IPath extends IBase<"param"> {
25
61
  field: string;
26
62
  }
63
+ /**
64
+ * The typed form of a query parameter.
65
+ *
66
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
67
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
68
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
69
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
70
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRouteParameter.IQuery describes protocol or type metadata; any embedded import/source record preserves the identity supplied by its owner. This declaration defines no native path conversion or process boundary.
71
+ */
27
72
  export interface IQuery extends IBase<"query"> {
28
73
  field: string | null;
29
74
  }