@nestia/sdk 14.0.0 → 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 (391) hide show
  1. package/README.md +1 -1
  2. package/assets/bundle/distribute/build-sdk.cjs +28 -0
  3. package/assets/bundle/distribute/package.json +7 -3
  4. package/assets/bundle/distribute/tsconfig.json +15 -105
  5. package/lib/INestiaConfig.d.ts +74 -34
  6. package/lib/NestiaSdkApplication.d.ts +60 -0
  7. package/lib/NestiaSdkApplication.js +121 -32
  8. package/lib/NestiaSdkApplication.js.map +1 -1
  9. package/lib/NestiaSwaggerComposer.d.ts +21 -0
  10. package/lib/NestiaSwaggerComposer.js +32 -13
  11. package/lib/NestiaSwaggerComposer.js.map +1 -1
  12. package/lib/analyses/AccessorAnalyzer.d.ts +26 -0
  13. package/lib/analyses/AccessorAnalyzer.js +26 -0
  14. package/lib/analyses/AccessorAnalyzer.js.map +1 -1
  15. package/lib/analyses/ConfigAnalyzer.d.ts +41 -0
  16. package/lib/analyses/ConfigAnalyzer.js +52 -77
  17. package/lib/analyses/ConfigAnalyzer.js.map +1 -1
  18. package/lib/analyses/ImportAnalyzer.d.ts +25 -0
  19. package/lib/analyses/ImportAnalyzer.js +25 -0
  20. package/lib/analyses/ImportAnalyzer.js.map +1 -1
  21. package/lib/analyses/ParameterNameAnalyzer.d.ts +44 -0
  22. package/lib/analyses/ParameterNameAnalyzer.js +63 -0
  23. package/lib/analyses/ParameterNameAnalyzer.js.map +1 -0
  24. package/lib/analyses/PathAnalyzer.d.ts +93 -1
  25. package/lib/analyses/PathAnalyzer.js +160 -23
  26. package/lib/analyses/PathAnalyzer.js.map +1 -1
  27. package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
  28. package/lib/analyses/ReflectControllerAnalyzer.js +24 -1
  29. package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
  30. package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
  31. package/lib/analyses/ReflectHttpOperationAnalyzer.js +35 -24
  32. package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
  33. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +31 -0
  34. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +21 -0
  35. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
  36. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +31 -0
  37. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +143 -23
  38. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
  39. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
  40. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +27 -2
  41. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
  42. package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
  43. package/lib/analyses/ReflectMcpOperationAnalyzer.js +35 -11
  44. package/lib/analyses/ReflectMcpOperationAnalyzer.js.map +1 -1
  45. package/lib/analyses/ReflectMetadataAnalyzer.d.ts +47 -0
  46. package/lib/analyses/ReflectMetadataAnalyzer.js +47 -0
  47. package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
  48. package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +29 -0
  49. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +27 -5
  50. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
  51. package/lib/analyses/SecurityAnalyzer.d.ts +25 -0
  52. package/lib/analyses/SecurityAnalyzer.js +39 -19
  53. package/lib/analyses/SecurityAnalyzer.js.map +1 -1
  54. package/lib/analyses/SwaggerExampleAnalyzer.d.ts +31 -0
  55. package/lib/analyses/SwaggerExampleAnalyzer.js +36 -0
  56. package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -0
  57. package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
  58. package/lib/analyses/TypedHttpRouteAnalyzer.js +196 -172
  59. package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
  60. package/lib/analyses/TypedMcpRouteAnalyzer.d.ts +29 -0
  61. package/lib/analyses/TypedMcpRouteAnalyzer.js +152 -20
  62. package/lib/analyses/TypedMcpRouteAnalyzer.js.map +1 -1
  63. package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +19 -0
  64. package/lib/analyses/TypedWebSocketRouteAnalyzer.js +20 -1
  65. package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
  66. package/lib/decorators/OperationMetadata.d.ts +6 -0
  67. package/lib/decorators/OperationMetadata.js +6 -0
  68. package/lib/decorators/OperationMetadata.js.map +1 -1
  69. package/lib/executable/internal/CommandParser.d.ts +19 -0
  70. package/lib/executable/internal/CommandParser.js +19 -0
  71. package/lib/executable/internal/CommandParser.js.map +1 -1
  72. package/lib/executable/internal/NestiaConfigLoader.d.ts +56 -0
  73. package/lib/executable/internal/NestiaConfigLoader.js +48 -42
  74. package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
  75. package/lib/executable/internal/NestiaSdkCommand.d.ts +60 -0
  76. package/lib/executable/internal/NestiaSdkCommand.js +95 -3
  77. package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
  78. package/lib/executable/internal/NestiaSdkWatcher.d.ts +81 -0
  79. package/lib/executable/internal/NestiaSdkWatcher.js +125 -41
  80. package/lib/executable/internal/NestiaSdkWatcher.js.map +1 -1
  81. package/lib/executable/internal/NestiaSwaggerWatch.d.ts +80 -0
  82. package/lib/executable/internal/NestiaSwaggerWatch.js +308 -0
  83. package/lib/executable/internal/NestiaSwaggerWatch.js.map +1 -0
  84. package/lib/executable/sdk.js +16 -1
  85. package/lib/executable/sdk.js.map +1 -1
  86. package/lib/factories/ExpressionFactory.d.ts +18 -0
  87. package/lib/factories/ExpressionFactory.js +21 -2
  88. package/lib/factories/ExpressionFactory.js.map +1 -1
  89. package/lib/factories/IdentifierFactory.d.ts +24 -0
  90. package/lib/factories/IdentifierFactory.js +24 -0
  91. package/lib/factories/IdentifierFactory.js.map +1 -1
  92. package/lib/factories/LiteralFactory.d.ts +22 -4
  93. package/lib/factories/LiteralFactory.js +33 -11
  94. package/lib/factories/LiteralFactory.js.map +1 -1
  95. package/lib/factories/StatementFactory.d.ts +28 -1
  96. package/lib/factories/StatementFactory.js +28 -1
  97. package/lib/factories/StatementFactory.js.map +1 -1
  98. package/lib/factories/TypeFactory.d.ts +24 -0
  99. package/lib/factories/TypeFactory.js +15 -0
  100. package/lib/factories/TypeFactory.js.map +1 -1
  101. package/lib/generates/CloneGenerator.d.ts +22 -0
  102. package/lib/generates/CloneGenerator.js +26 -5
  103. package/lib/generates/CloneGenerator.js.map +1 -1
  104. package/lib/generates/E2eGenerator.d.ts +19 -0
  105. package/lib/generates/E2eGenerator.js +19 -0
  106. package/lib/generates/E2eGenerator.js.map +1 -1
  107. package/lib/generates/SdkGenerator.d.ts +38 -0
  108. package/lib/generates/SdkGenerator.js +43 -5
  109. package/lib/generates/SdkGenerator.js.map +1 -1
  110. package/lib/generates/SwaggerGenerator.d.ts +36 -6
  111. package/lib/generates/SwaggerGenerator.js +190 -40
  112. package/lib/generates/SwaggerGenerator.js.map +1 -1
  113. package/lib/generates/internal/E2eFileProgrammer.d.ts +19 -0
  114. package/lib/generates/internal/E2eFileProgrammer.js +20 -1
  115. package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
  116. package/lib/generates/internal/FilePrinter.d.ts +57 -0
  117. package/lib/generates/internal/FilePrinter.js +74 -0
  118. package/lib/generates/internal/FilePrinter.js.map +1 -1
  119. package/lib/generates/internal/ImportDictionary.d.ts +93 -1
  120. package/lib/generates/internal/ImportDictionary.js +103 -2
  121. package/lib/generates/internal/ImportDictionary.js.map +1 -1
  122. package/lib/generates/internal/SdkAliasCollection.d.ts +121 -1
  123. package/lib/generates/internal/SdkAliasCollection.js +132 -11
  124. package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
  125. package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
  126. package/lib/generates/internal/SdkDistributionComposer.js +149 -52
  127. package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
  128. package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
  129. package/lib/generates/internal/SdkFileProgrammer.js +101 -12
  130. package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
  131. package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +29 -0
  132. package/lib/generates/internal/SdkHttpCloneProgrammer.js +33 -0
  133. package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
  134. package/lib/generates/internal/SdkHttpCloneReferencer.d.ts +19 -0
  135. package/lib/generates/internal/SdkHttpCloneReferencer.js +78 -25
  136. package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
  137. package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +19 -0
  138. package/lib/generates/internal/SdkHttpFunctionProgrammer.js +40 -23
  139. package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
  140. package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
  141. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +46 -34
  142. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
  143. package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +142 -1
  144. package/lib/generates/internal/SdkHttpParameterProgrammer.js +175 -6
  145. package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
  146. package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
  147. package/lib/generates/internal/SdkHttpRouteProgrammer.js +36 -32
  148. package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
  149. package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
  150. package/lib/generates/internal/SdkHttpSimulationProgrammer.js +66 -18
  151. package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
  152. package/lib/generates/internal/SdkImportWizard.d.ts +63 -0
  153. package/lib/generates/internal/SdkImportWizard.js +63 -0
  154. package/lib/generates/internal/SdkImportWizard.js.map +1 -1
  155. package/lib/generates/internal/SdkMcpRouteProgrammer.d.ts +17 -2
  156. package/lib/generates/internal/SdkMcpRouteProgrammer.js +72 -24
  157. package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
  158. package/lib/generates/internal/SdkPathTemplate.d.ts +36 -0
  159. package/lib/generates/internal/SdkPathTemplate.js +65 -0
  160. package/lib/generates/internal/SdkPathTemplate.js.map +1 -0
  161. package/lib/generates/internal/SdkRouteDirectory.d.ts +10 -0
  162. package/lib/generates/internal/SdkRouteDirectory.js +10 -0
  163. package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
  164. package/lib/generates/internal/SdkTypeProgrammer.d.ts +54 -1
  165. package/lib/generates/internal/SdkTypeProgrammer.js +111 -27
  166. package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
  167. package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +53 -1
  168. package/lib/generates/internal/SdkTypeTagProgrammer.js +407 -67
  169. package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
  170. package/lib/generates/internal/SdkWebSocketCloneProgrammer.d.ts +40 -0
  171. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js +149 -142
  172. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js.map +1 -1
  173. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +19 -0
  174. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +46 -36
  175. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
  176. package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +114 -1
  177. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +120 -5
  178. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
  179. package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
  180. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +75 -33
  181. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
  182. package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +42 -0
  183. package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -1
  184. package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
  185. package/lib/generates/internal/SwaggerOperationComposer.d.ts +18 -0
  186. package/lib/generates/internal/SwaggerOperationComposer.js +37 -8
  187. package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
  188. package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +40 -1
  189. package/lib/generates/internal/SwaggerOperationParameterComposer.js +230 -25
  190. package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
  191. package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +21 -0
  192. package/lib/generates/internal/SwaggerOperationResponseComposer.js +58 -7
  193. package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
  194. package/lib/internal/legacy.d.ts +342 -31
  195. package/lib/internal/legacy.js +207 -31
  196. package/lib/internal/legacy.js.map +1 -1
  197. package/lib/structures/INestiaProject.d.ts +10 -0
  198. package/lib/structures/INestiaSdkInput.d.ts +30 -0
  199. package/lib/structures/IOperationMetadata.d.ts +77 -0
  200. package/lib/structures/IReflectController.d.ts +10 -0
  201. package/lib/structures/IReflectHttpOperation.d.ts +10 -0
  202. package/lib/structures/IReflectHttpOperationException.d.ts +13 -2
  203. package/lib/structures/IReflectHttpOperationParameter.d.ts +55 -3
  204. package/lib/structures/IReflectHttpOperationSuccess.d.ts +15 -3
  205. package/lib/structures/IReflectImport.d.ts +10 -0
  206. package/lib/structures/IReflectMcpOperation.d.ts +19 -0
  207. package/lib/structures/IReflectMcpOperationParameter.d.ts +9 -0
  208. package/lib/structures/IReflectOperationError.d.ts +28 -0
  209. package/lib/structures/IReflectOperationError.js +22 -2
  210. package/lib/structures/IReflectOperationError.js.map +1 -1
  211. package/lib/structures/IReflectType.d.ts +9 -0
  212. package/lib/structures/IReflectWebSocketOperation.d.ts +10 -0
  213. package/lib/structures/IReflectWebSocketOperationParameter.d.ts +55 -0
  214. package/lib/structures/ITypedApplication.d.ts +10 -0
  215. package/lib/structures/ITypedHttpRoute.d.ts +18 -0
  216. package/lib/structures/ITypedHttpRouteException.d.ts +13 -1
  217. package/lib/structures/ITypedHttpRouteParameter.d.ts +48 -1
  218. package/lib/structures/ITypedHttpRouteSuccess.d.ts +13 -1
  219. package/lib/structures/ITypedMcpRoute.d.ts +11 -0
  220. package/lib/structures/ITypedWebSocketRoute.d.ts +18 -0
  221. package/lib/transform.d.ts +6 -0
  222. package/lib/transform.js +6 -0
  223. package/lib/transform.js.map +1 -1
  224. package/lib/utils/ArrayUtil.d.ts +31 -1
  225. package/lib/utils/ArrayUtil.js +32 -11
  226. package/lib/utils/ArrayUtil.js.map +1 -1
  227. package/lib/utils/EmittedJavaScriptPatcher.d.ts +20 -0
  228. package/lib/utils/EmittedJavaScriptPatcher.js +65 -46
  229. package/lib/utils/EmittedJavaScriptPatcher.js.map +1 -1
  230. package/lib/utils/FileRetriever.d.ts +29 -0
  231. package/lib/utils/FileRetriever.js +29 -0
  232. package/lib/utils/FileRetriever.js.map +1 -1
  233. package/lib/utils/HttpResponseContentTypeUtil.d.ts +41 -0
  234. package/lib/utils/HttpResponseContentTypeUtil.js +31 -0
  235. package/lib/utils/HttpResponseContentTypeUtil.js.map +1 -1
  236. package/lib/utils/MapUtil.d.ts +64 -1
  237. package/lib/utils/MapUtil.js +24 -3
  238. package/lib/utils/MapUtil.js.map +1 -1
  239. package/lib/utils/PathUtil.d.ts +31 -0
  240. package/lib/utils/PathUtil.js +38 -0
  241. package/lib/utils/PathUtil.js.map +1 -1
  242. package/lib/utils/SdkBundlePath.d.ts +2 -0
  243. package/lib/utils/SdkBundlePath.js +10 -0
  244. package/lib/utils/SdkBundlePath.js.map +1 -0
  245. package/lib/utils/SdkInputFilter.d.ts +31 -0
  246. package/lib/utils/SdkInputFilter.js +115 -0
  247. package/lib/utils/SdkInputFilter.js.map +1 -0
  248. package/lib/utils/SourceFinder.d.ts +45 -0
  249. package/lib/utils/SourceFinder.js +74 -16
  250. package/lib/utils/SourceFinder.js.map +1 -1
  251. package/lib/utils/StringUtil.d.ts +77 -2
  252. package/lib/utils/StringUtil.js +166 -4
  253. package/lib/utils/StringUtil.js.map +1 -1
  254. package/lib/utils/TemporaryDirectory.d.ts +60 -0
  255. package/lib/utils/TemporaryDirectory.js +112 -0
  256. package/lib/utils/TemporaryDirectory.js.map +1 -0
  257. package/lib/utils/TsConfigReader.d.ts +42 -0
  258. package/lib/utils/TsConfigReader.js +98 -14
  259. package/lib/utils/TsConfigReader.js.map +1 -1
  260. package/lib/utils/TtscExecutor.d.ts +23 -1
  261. package/lib/utils/TtscExecutor.js +22 -0
  262. package/lib/utils/TtscExecutor.js.map +1 -1
  263. package/lib/utils/VersioningStrategy.d.ts +39 -2
  264. package/lib/utils/VersioningStrategy.js +46 -13
  265. package/lib/utils/VersioningStrategy.js.map +1 -1
  266. package/lib/validators/TextPlainValidator.d.ts +19 -0
  267. package/lib/validators/TextPlainValidator.js +19 -0
  268. package/lib/validators/TextPlainValidator.js.map +1 -1
  269. package/native/go.mod +1 -1
  270. package/native/go.sum +2 -2
  271. package/native/sdk/register.go +12 -2
  272. package/native/sdk/sdk_http_rules.go +210 -0
  273. package/native/sdk/sdk_metadata_json.go +79 -4
  274. package/native/sdk/sdk_transform.go +1157 -414
  275. package/package.json +8 -6
  276. package/src/INestiaConfig.ts +74 -34
  277. package/src/NestiaSdkApplication.ts +129 -41
  278. package/src/NestiaSwaggerComposer.ts +32 -14
  279. package/src/analyses/AccessorAnalyzer.ts +26 -0
  280. package/src/analyses/ConfigAnalyzer.ts +52 -90
  281. package/src/analyses/ImportAnalyzer.ts +25 -0
  282. package/src/analyses/ParameterNameAnalyzer.ts +75 -0
  283. package/src/analyses/PathAnalyzer.ts +167 -23
  284. package/src/analyses/ReflectControllerAnalyzer.ts +34 -1
  285. package/src/analyses/ReflectHttpOperationAnalyzer.ts +36 -14
  286. package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
  287. package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +153 -39
  288. package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +38 -7
  289. package/src/analyses/ReflectMcpOperationAnalyzer.ts +38 -3
  290. package/src/analyses/ReflectMetadataAnalyzer.ts +47 -0
  291. package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +40 -7
  292. package/src/analyses/SecurityAnalyzer.ts +45 -20
  293. package/src/analyses/SwaggerExampleAnalyzer.ts +39 -0
  294. package/src/analyses/TypedHttpRouteAnalyzer.ts +263 -198
  295. package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
  296. package/src/analyses/TypedWebSocketRouteAnalyzer.ts +20 -0
  297. package/src/decorators/OperationMetadata.ts +6 -0
  298. package/src/executable/internal/CommandParser.ts +19 -0
  299. package/src/executable/internal/NestiaConfigLoader.ts +66 -50
  300. package/src/executable/internal/NestiaSdkCommand.ts +96 -3
  301. package/src/executable/internal/NestiaSdkWatcher.ts +172 -44
  302. package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
  303. package/src/executable/sdk.ts +24 -1
  304. package/src/factories/ExpressionFactory.ts +23 -2
  305. package/src/factories/IdentifierFactory.ts +24 -0
  306. package/src/factories/LiteralFactory.ts +51 -13
  307. package/src/factories/StatementFactory.ts +28 -1
  308. package/src/factories/TypeFactory.ts +24 -0
  309. package/src/generates/CloneGenerator.ts +26 -5
  310. package/src/generates/E2eGenerator.ts +19 -0
  311. package/src/generates/SdkGenerator.ts +43 -12
  312. package/src/generates/SwaggerGenerator.ts +229 -46
  313. package/src/generates/internal/E2eFileProgrammer.ts +20 -0
  314. package/src/generates/internal/FilePrinter.ts +71 -0
  315. package/src/generates/internal/ImportDictionary.ts +120 -2
  316. package/src/generates/internal/SdkAliasCollection.ts +144 -15
  317. package/src/generates/internal/SdkDistributionComposer.ts +181 -56
  318. package/src/generates/internal/SdkFileProgrammer.ts +126 -16
  319. package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
  320. package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
  321. package/src/generates/internal/SdkHttpFunctionProgrammer.ts +47 -30
  322. package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +53 -64
  323. package/src/generates/internal/SdkHttpParameterProgrammer.ts +295 -13
  324. package/src/generates/internal/SdkHttpRouteProgrammer.ts +37 -31
  325. package/src/generates/internal/SdkHttpSimulationProgrammer.ts +122 -18
  326. package/src/generates/internal/SdkImportWizard.ts +63 -0
  327. package/src/generates/internal/SdkMcpRouteProgrammer.ts +150 -33
  328. package/src/generates/internal/SdkPathTemplate.ts +88 -0
  329. package/src/generates/internal/SdkRouteDirectory.ts +10 -0
  330. package/src/generates/internal/SdkTypeProgrammer.ts +137 -36
  331. package/src/generates/internal/SdkTypeTagProgrammer.ts +536 -78
  332. package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
  333. package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +62 -68
  334. package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +205 -5
  335. package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +89 -48
  336. package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
  337. package/src/generates/internal/SwaggerOperationComposer.ts +38 -6
  338. package/src/generates/internal/SwaggerOperationParameterComposer.ts +318 -36
  339. package/src/generates/internal/SwaggerOperationResponseComposer.ts +74 -11
  340. package/src/internal/legacy-augmentation.d.ts +16 -0
  341. package/src/internal/legacy.ts +407 -49
  342. package/src/structures/INestiaProject.ts +10 -0
  343. package/src/structures/INestiaSdkInput.ts +30 -0
  344. package/src/structures/IOperationMetadata.ts +83 -0
  345. package/src/structures/IReflectController.ts +10 -0
  346. package/src/structures/IReflectHttpOperation.ts +10 -0
  347. package/src/structures/IReflectHttpOperationException.ts +17 -2
  348. package/src/structures/IReflectHttpOperationParameter.ts +56 -2
  349. package/src/structures/IReflectHttpOperationSuccess.ts +19 -3
  350. package/src/structures/IReflectImport.ts +10 -0
  351. package/src/structures/IReflectMcpOperation.ts +19 -0
  352. package/src/structures/IReflectMcpOperationParameter.ts +9 -0
  353. package/src/structures/IReflectOperationError.ts +31 -2
  354. package/src/structures/IReflectType.ts +9 -0
  355. package/src/structures/IReflectWebSocketOperation.ts +10 -0
  356. package/src/structures/IReflectWebSocketOperationParameter.ts +55 -0
  357. package/src/structures/ITypedApplication.ts +10 -0
  358. package/src/structures/ITypedHttpRoute.ts +18 -0
  359. package/src/structures/ITypedHttpRouteException.ts +14 -1
  360. package/src/structures/ITypedHttpRouteParameter.ts +48 -1
  361. package/src/structures/ITypedHttpRouteSuccess.ts +14 -1
  362. package/src/structures/ITypedMcpRoute.ts +12 -0
  363. package/src/structures/ITypedWebSocketRoute.ts +18 -0
  364. package/src/transform.ts +6 -0
  365. package/src/utils/ArrayUtil.ts +32 -13
  366. package/src/utils/EmittedJavaScriptPatcher.ts +70 -47
  367. package/src/utils/FileRetriever.ts +29 -0
  368. package/src/utils/HttpResponseContentTypeUtil.ts +41 -0
  369. package/src/utils/MapUtil.ts +68 -3
  370. package/src/utils/PathUtil.ts +38 -0
  371. package/src/utils/SdkBundlePath.ts +11 -0
  372. package/src/utils/SdkInputFilter.ts +108 -0
  373. package/src/utils/SourceFinder.ts +76 -18
  374. package/src/utils/StringUtil.ts +182 -5
  375. package/src/utils/TemporaryDirectory.ts +108 -0
  376. package/src/utils/TsConfigReader.ts +124 -26
  377. package/src/utils/TtscExecutor.ts +23 -1
  378. package/src/utils/VersioningStrategy.ts +51 -16
  379. package/src/validators/TextPlainValidator.ts +19 -0
  380. package/lib/generates/internal/SwaggerReadonlyArrayEmender.d.ts +0 -9
  381. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js +0 -178
  382. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js.map +0 -1
  383. package/lib/validators/HttpHeadersValidator.d.ts +0 -11
  384. package/lib/validators/HttpHeadersValidator.js +0 -15
  385. package/lib/validators/HttpHeadersValidator.js.map +0 -1
  386. package/lib/validators/HttpQueryValidator.d.ts +0 -10
  387. package/lib/validators/HttpQueryValidator.js +0 -14
  388. package/lib/validators/HttpQueryValidator.js.map +0 -1
  389. package/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
  390. package/src/validators/HttpHeadersValidator.ts +0 -12
  391. package/src/validators/HttpQueryValidator.ts +0 -11
@@ -2,7 +2,26 @@ import { IOperationMetadata } from "../structures/IOperationMetadata";
2
2
  import { IReflectController } from "../structures/IReflectController";
3
3
  import { IReflectHttpOperationParameter } from "../structures/IReflectHttpOperationParameter";
4
4
  import { IReflectOperationError } from "../structures/IReflectOperationError";
5
+ /**
6
+ * Reflects the parameters of a route method.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation Nest's route argument metadata gives each parameter's category and position, the nestia decorators are recognized by the name of their factory function, the metadata of the transform gives the type, and the wire rules of the HTTP input are checked against it.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function with private classification and duplicate checks.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The recognition by factory name couples this package to the function names of `@nestia/core`, a contract between the two packages.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
5
14
  export declare namespace ReflectHttpOperationParameterAnalyzer {
15
+ /**
16
+ * The input of the parameter analysis: the controller, the method, its name,
17
+ * the HTTP method, the metadata, and the error list.
18
+ *
19
+ * @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
20
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
21
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
22
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
23
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer.IContext analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
24
+ */
6
25
  interface IContext {
7
26
  controller: IReflectController;
8
27
  function: Function;
@@ -11,5 +30,17 @@ export declare namespace ReflectHttpOperationParameterAnalyzer {
11
30
  metadata: IOperationMetadata;
12
31
  errors: IReflectOperationError[];
13
32
  }
33
+ /**
34
+ * Returns the parameters of a route method in position order.
35
+ *
36
+ * Contradictions, such as a body on GET, duplicated bodies or fields,
37
+ * unreadable types, and types the HTTP input cannot carry, are errors.
38
+ *
39
+ * @evidence contracts/common.md#principled-implementation Contradictions are collected first, each parameter is composed with the schema that matches its content type, its wire rules are checked, unnamed parameters are named, and duplicate keys between field parameters and objects are reported.
40
+ * @evidence contracts/common.md#clear-and-simple-design One function that gathers every error before returning.
41
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Every rule follows the HTTP or NestJS contract, and a parameter that cannot be sent is an error, not silently dropped.
42
+ * @evidence contracts/common.md#meaningful-documentation The comment states the errors.
43
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
44
+ */
14
45
  const analyze: (ctx: IContext) => IReflectHttpOperationParameter[];
15
46
  }
@@ -1,14 +1,46 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.ReflectHttpOperationParameterAnalyzer = void 0;
4
15
  const constants_1 = require("@nestjs/common/constants");
5
16
  const route_paramtypes_enum_1 = require("@nestjs/common/enums/route-paramtypes.enum");
6
17
  const legacy_1 = require("../internal/legacy");
7
- const HttpHeadersValidator_1 = require("../validators/HttpHeadersValidator");
8
- const HttpQueryValidator_1 = require("../validators/HttpQueryValidator");
9
18
  const TextPlainValidator_1 = require("../validators/TextPlainValidator");
19
+ const ParameterNameAnalyzer_1 = require("./ParameterNameAnalyzer");
20
+ const SwaggerExampleAnalyzer_1 = require("./SwaggerExampleAnalyzer");
21
+ /**
22
+ * Reflects the parameters of a route method.
23
+ *
24
+ * @evidence contracts/common.md#principled-implementation Nest's route argument metadata gives each parameter's category and position, the nestia decorators are recognized by the name of their factory function, the metadata of the transform gives the type, and the wire rules of the HTTP input are checked against it.
25
+ * @evidence contracts/common.md#clear-and-simple-design One public function with private classification and duplicate checks.
26
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The recognition by factory name couples this package to the function names of `@nestia/core`, a contract between the two packages.
27
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
28
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
29
+ */
10
30
  var ReflectHttpOperationParameterAnalyzer;
11
31
  (function (ReflectHttpOperationParameterAnalyzer) {
32
+ /**
33
+ * Returns the parameters of a route method in position order.
34
+ *
35
+ * Contradictions, such as a body on GET, duplicated bodies or fields,
36
+ * unreadable types, and types the HTTP input cannot carry, are errors.
37
+ *
38
+ * @evidence contracts/common.md#principled-implementation Contradictions are collected first, each parameter is composed with the schema that matches its content type, its wire rules are checked, unnamed parameters are named, and duplicate keys between field parameters and objects are reported.
39
+ * @evidence contracts/common.md#clear-and-simple-design One function that gathers every error before returning.
40
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Every rule follows the HTTP or NestJS contract, and a parameter that cannot be sent is an error, not silently dropped.
41
+ * @evidence contracts/common.md#meaningful-documentation The comment states the errors.
42
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
43
+ */
12
44
  ReflectHttpOperationParameterAnalyzer.analyze = (ctx) => {
13
45
  const preconfigured = analyzePreconfigured(ctx);
14
46
  const errors = [];
@@ -44,7 +76,9 @@ var ReflectHttpOperationParameterAnalyzer;
44
76
  if (isUnique(preconfigured
45
77
  .filter((x) => x.category === "headers")
46
78
  .map((x) => x.field)
47
- .filter((field) => field !== undefined)) === false)
79
+ .filter((field) => field !== undefined)
80
+ // NestJS reads `req.headers[name.toLowerCase()]`
81
+ .map((field) => field.toLowerCase())) === false)
48
82
  contradict(`Duplicated field names of headers are not allowed.`);
49
83
  if (contradictErrors.length)
50
84
  errors.push({
@@ -57,9 +91,10 @@ var ReflectHttpOperationParameterAnalyzer;
57
91
  //----
58
92
  // COMPOSE PARAMETERS
59
93
  //----
60
- const parameters = preconfigured
94
+ const declared = preconfigured
61
95
  .map((p) => {
62
- var _a, _b, _c;
96
+ var _a;
97
+ var _b, _c, _d, _e;
63
98
  // METADATA INFO
64
99
  const pErrorContents = [];
65
100
  const matched = ctx.metadata.parameters.find((x) => x.index === p.index);
@@ -68,7 +103,8 @@ var ReflectHttpOperationParameterAnalyzer;
68
103
  file: ctx.controller.file,
69
104
  class: ctx.controller.class.name,
70
105
  function: ctx.functionName,
71
- from: `parameter ${matched ? JSON.stringify(matched.name) : `of ${p.index} th`}`,
106
+ // a destructured parameter has no name to report
107
+ from: `parameter ${(matched === null || matched === void 0 ? void 0 : matched.name) ? JSON.stringify(matched.name) : `of ${p.index} th`}`,
72
108
  contents: pErrorContents,
73
109
  });
74
110
  return null;
@@ -79,55 +115,138 @@ var ReflectHttpOperationParameterAnalyzer;
79
115
  else if (matched.type === null)
80
116
  pErrorContents.push(`Failed to get the type info.`);
81
117
  // CONSIDER KIND
82
- const schema = (() => {
118
+ const pipe = (() => {
83
119
  if (matched === undefined)
84
120
  return null;
85
- const result = p.category === "body" &&
121
+ return p.category === "body" &&
86
122
  (p.contentType === "application/json" || p.encrypted === true)
87
123
  ? matched.primitive
88
124
  : matched.resolved;
89
- return result.success ? result.data : null;
90
125
  })();
126
+ const schema = (pipe === null || pipe === void 0 ? void 0 : pipe.success) === true ? pipe.data : null;
127
+ // A type the metadata analysis could not read has no SDK or Swagger
128
+ // form; dropping the parameter would leave a function that cannot
129
+ // send what the route requires.
130
+ if ((pipe === null || pipe === void 0 ? void 0 : pipe.success) === false)
131
+ pErrorContents.push(...pipe.errors);
91
132
  if (p.category === "body" && p.field !== undefined)
92
133
  pErrorContents.push(`@Body() must not have a field name.`);
93
134
  else if (p.category === "param" && p.field === undefined)
94
135
  pErrorContents.push(`@Param() must have a field name.`);
136
+ // The wire rules of the parameter's HTTP input: a type they reject
137
+ // cannot be carried as a query string, headers, a path segment, or a
138
+ // form, so the SDK would send garbage and the document would lie.
139
+ const rule = httpRuleOf(p);
140
+ if (rule !== null && schema !== null)
141
+ pErrorContents.push(...((_b = (_a = schema.http) === null || _a === void 0 ? void 0 : _a[rule]) !== null && _b !== void 0 ? _b : []));
95
142
  if (pErrorContents.length)
96
143
  return report();
97
144
  else if (matched === undefined ||
98
145
  matched.type === null ||
99
146
  schema === null)
100
147
  return null; // unreachable
101
- const example = ((_a = Reflect.getMetadata("nestia/SwaggerExample/Parameters", ctx.controller.class.prototype, ctx.functionName)) !== null && _a !== void 0 ? _a : []).find((x) => x.index === matched.index);
148
+ const { http: _http } = schema, shape = __rest(schema, ["http"]);
149
+ const example = ((_c = Reflect.getMetadata("nestia/SwaggerExample/Parameters", ctx.controller.class.prototype, ctx.functionName)) !== null && _c !== void 0 ? _c : []).find((x) => x.index === matched.index);
102
150
  // COMPOSITION
103
151
  if (p.category === "param")
104
- return Object.assign({ category: p.category, index: p.index, field: p.field, name: matched.name, type: matched.type, validate: legacy_1.HttpParameterProgrammer.validate, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: example === null || example === void 0 ? void 0 : example.examples }, schema);
152
+ return Object.assign({ category: p.category, index: p.index, field: p.field, name: matched.name, type: matched.type, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: SwaggerExampleAnalyzer_1.SwaggerExampleAnalyzer.examples(example) }, shape);
105
153
  else if (p.category === "query")
106
- return Object.assign({ category: p.category, index: p.index, field: (_b = p.field) !== null && _b !== void 0 ? _b : null, name: matched.name, type: matched.type, validate: p.field
107
- ? HttpQueryValidator_1.HttpQueryValidator.validate
108
- : legacy_1.HttpQueryProgrammer.validate, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: example === null || example === void 0 ? void 0 : example.examples }, schema);
154
+ return Object.assign({ category: p.category, index: p.index, field: (_d = p.field) !== null && _d !== void 0 ? _d : null, name: matched.name, type: matched.type, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: SwaggerExampleAnalyzer_1.SwaggerExampleAnalyzer.examples(example) }, shape);
109
155
  else if (p.category === "headers")
110
- return Object.assign({ category: p.category, index: p.index, field: (_c = p.field) !== null && _c !== void 0 ? _c : null, name: matched.name, type: matched.type, validate: p.field
111
- ? HttpHeadersValidator_1.HttpHeadersValidator.validate
112
- : legacy_1.HttpHeadersProgrammer.validate, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: example === null || example === void 0 ? void 0 : example.examples }, schema);
156
+ return Object.assign({ category: p.category, index: p.index, field: (_e = p.field) !== null && _e !== void 0 ? _e : null, name: matched.name, type: matched.type, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: SwaggerExampleAnalyzer_1.SwaggerExampleAnalyzer.examples(example) }, shape);
113
157
  else if (p.category === "body")
114
158
  return Object.assign({ category: p.category, index: p.index, encrypted: !!p.encrypted, contentType: p.contentType, name: matched.name, type: matched.type, validate: p.contentType === "application/json" || p.encrypted === true
115
159
  ? legacy_1.JsonMetadataFactory.validate
116
- : p.contentType === "application/x-www-form-urlencoded"
117
- ? legacy_1.HttpQueryProgrammer.validate
118
- : p.contentType === "multipart/form-data"
119
- ? legacy_1.HttpFormDataProgrammer.validate
120
- : TextPlainValidator_1.TextPlainValidator.validate, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: example === null || example === void 0 ? void 0 : example.examples }, schema);
160
+ : p.contentType === "text/plain"
161
+ ? TextPlainValidator_1.TextPlainValidator.validate
162
+ : undefined, description: matched.description, jsDocTags: matched.jsDocTags, example: example === null || example === void 0 ? void 0 : example.example, examples: SwaggerExampleAnalyzer_1.SwaggerExampleAnalyzer.examples(example) }, shape);
121
163
  else {
122
164
  pErrorContents.push(`Unknown kind of the parameter.`);
123
165
  return report();
124
166
  }
125
167
  })
126
168
  .filter((x) => x !== null);
169
+ // a destructured parameter declares no name, so it is given one
170
+ const parameters = ParameterNameAnalyzer_1.ParameterNameAnalyzer.name(declared);
171
+ const duplicated = findDuplicatedKeys(parameters);
172
+ if (duplicated.length)
173
+ errors.push({
174
+ file: ctx.controller.file,
175
+ class: ctx.controller.class.name,
176
+ function: ctx.functionName,
177
+ from: "",
178
+ contents: duplicated,
179
+ });
127
180
  if (errors.length)
128
181
  ctx.errors.push(...errors);
129
182
  return parameters;
130
183
  };
184
+ /**
185
+ * The HTTP input rules a parameter's type must satisfy, or `null` for a JSON
186
+ * or text body, whose policies are checked on the TypeScript side.
187
+ *
188
+ * The rules are typia's, baked per parameter by the SDK transform (see
189
+ * `nestiaSDKHttpRules`), because only this analyzer knows the decorator. A
190
+ * typed decorator was already held to them by the core transform, so the
191
+ * verdict is only news for a vanilla `@Query()`, `@Headers()`, or `@Param()`,
192
+ * which no transform touches.
193
+ */
194
+ const httpRuleOf = (p) => {
195
+ if (p.category === "param")
196
+ return "param";
197
+ else if (p.category === "query")
198
+ return p.field !== undefined ? "field" : "query";
199
+ else if (p.category === "headers")
200
+ return p.field !== undefined ? "field" : "headers";
201
+ else if (p.contentType === "application/x-www-form-urlencoded")
202
+ return "query";
203
+ else if (p.contentType === "multipart/form-data")
204
+ return "formData";
205
+ return null;
206
+ };
207
+ /**
208
+ * Reports a query key or header both a field parameter and the object
209
+ * parameter of its category declare.
210
+ *
211
+ * On the wire they are one key: NestJS hands both parameters the same
212
+ * `req.query.keyword`, and header names match case-insensitively, as NestJS
213
+ * lowercases the name a `@Headers("X-Tenant")` reads. Documenting both lists
214
+ * one `name` + `in` pair twice, which OpenAPI forbids, and the SDK would ask
215
+ * its caller for the same key twice and send one of the two values. Like two
216
+ * field parameters of the same name, the declaration is contradictory.
217
+ */
218
+ const findDuplicatedKeys = (parameters) => {
219
+ const messages = [];
220
+ for (const [category, normalize, noun] of [
221
+ ["query", (key) => key, "Query key"],
222
+ ["headers", (key) => key.toLowerCase(), "Header"],
223
+ ]) {
224
+ const fields = new Map();
225
+ for (const p of parameters)
226
+ if (p.category === category && p.field !== null)
227
+ fields.set(normalize(p.field), p.field);
228
+ for (const p of parameters) {
229
+ if (p.category !== category || p.field !== null)
230
+ continue;
231
+ for (const key of objectKeys(p)) {
232
+ const field = fields.get(normalize(key));
233
+ if (field !== undefined)
234
+ messages.push(`${noun} ${JSON.stringify(field)} is declared both by a field parameter and by the ${category} object.`);
235
+ }
236
+ }
237
+ }
238
+ return messages;
239
+ };
240
+ /** Literal property keys of an object parameter's object type. */
241
+ const objectKeys = (p) => {
242
+ var _a;
243
+ var _b;
244
+ const name = (_a = p.metadata.objects[0]) === null || _a === void 0 ? void 0 : _a.name;
245
+ const object = p.components.objects.find((o) => o.name === name);
246
+ return ((_b = object === null || object === void 0 ? void 0 : object.properties) !== null && _b !== void 0 ? _b : [])
247
+ .map((property) => { var _a, _b; return (_b = (_a = property.key.constants[0]) === null || _a === void 0 ? void 0 : _a.values[0]) === null || _b === void 0 ? void 0 : _b.value; })
248
+ .filter((key) => typeof key === "string");
249
+ };
131
250
  const analyzePreconfigured = (props) => {
132
251
  const dict = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, props.controller.class, props.functionName);
133
252
  if (dict === undefined)
@@ -141,7 +260,8 @@ var ReflectHttpOperationParameterAnalyzer;
141
260
  const symbol = key.split(":")[0];
142
261
  if (symbol.indexOf("__custom") !== -1)
143
262
  return analyzeCustomParameter(param);
144
- const category = getNestParamType(Number(symbol[0]));
263
+ // the whole number: `RAW_BODY` is 12, which the first digit misread as 1
264
+ const category = getNestParamType(Number(symbol));
145
265
  if (category === null)
146
266
  return null;
147
267
  if (category === "body")
@@ -1 +1 @@
1
- {"version":3,"file":"ReflectHttpOperationParameterAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationParameterAnalyzer.ts"],"names":[],"mappings":";;;AACA,wDAA+D;AAC/D,sFAA6E;AAE7E,+CAM4B;AAK5B,6EAA0E;AAC1E,yEAAsE;AACtE,yEAAsE;AAEtE,IAAiB,qCAAqC,CAwTrD;AAxTD,WAAiB,qCAAqC;IASvC,6CAAO,GAAG,CAAC,GAAa,EAAoC,EAAE;QACzE,MAAM,aAAa,GACjB,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,MAAM,GAA6B,EAAE,CAAC;QAE5C,MAAM;QACN,sBAAsB;QACtB,MAAM;QACN,sBAAsB;QACtB,MAAM,gBAAgB,GAAa,EAAE,CAAC;QACtC,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,EAAE;YACrC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC;QACF,IACE,CAAC,GAAG,CAAC,UAAU,KAAK,KAAK,IAAI,GAAG,CAAC,UAAU,KAAK,MAAM,CAAC;YACvD,aAAa,CAAC,IAAI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MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC;AAChF,CAAC,EAxTgB,qCAAqC,aAArC,qCAAqC,GAArC,qCAAqC,QAwTrD;AAYD,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAE,EAAE;IAClD,IAAI,KAAK,KAAK,uCAAe,CAAC,IAAI;QAAE,OAAO,MAAM,CAAC;SAC7C,IAAI,KAAK,KAAK,uCAAe,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;SACxD,IAAI,KAAK,KAAK,uCAAe,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;SACpD,IAAI,KAAK,KAAK,uCAAe,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
1
+ {"version":3,"file":"ReflectHttpOperationParameterAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationParameterAnalyzer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,wDAA+D;AAC/D,sFAA6E;AAE7E,+CAAyD;AAKzD,yEAAsE;AACtE,mEAAgE;AAChE,qEAAkE;AAElE;;;;;;;;GAQG;AACH,IAAiB,qCAAqC,CAuarD;AAvaD,WAAiB,qCAAqC;IAmBpD;;;;;;;;;;;OAWG;IACU,6CAAO,GAAG,CAAC,GAAa,EAAoC,EAAE;QACzE,MAAM,aAAa,GACjB,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,MAAM,GAA6B,EAAE,CAAC;QAE5C,MAAM;QACN,sBAAsB;QACtB,MAAM;QACN,sBAAsB;QACtB,MAAM,gBAAgB,GAAa,EAAE,CAAC;QACtC,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,EAAE;YACrC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC;QACF,IACE,CAAC,GAAG,CAAC,UAAU,KAAK,KAAK,IAAI,GAAG,CAAC,UAAU,KAAK,MAAM,CAAC;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C;AACd,CAAC,CAAC"}
@@ -2,7 +2,26 @@ import { IOperationMetadata } from "../structures/IOperationMetadata";
2
2
  import { IReflectController } from "../structures/IReflectController";
3
3
  import { IReflectHttpOperationSuccess } from "../structures/IReflectHttpOperationSuccess";
4
4
  import { IReflectOperationError } from "../structures/IReflectOperationError";
5
+ /**
6
+ * Reflects the success response of a route method.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The content type comes from the encryption and query interceptors, then the headers metadata, then the produces metadata, then the method default; the status comes from the HTTP code metadata or the method default; binary types skip the schema.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function with small private helpers.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The order follows how NestJS and nestia decorate a route.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
5
14
  export declare namespace ReflectHttpOperationResponseAnalyzer {
15
+ /**
16
+ * The input of the response analysis: the controller, the method, its name,
17
+ * the HTTP method, the metadata, and the error list.
18
+ *
19
+ * @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
20
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
21
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
22
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
23
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer.IContext analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
24
+ */
6
25
  interface IContext {
7
26
  controller: IReflectController;
8
27
  function: Function;
@@ -11,5 +30,18 @@ export declare namespace ReflectHttpOperationResponseAnalyzer {
11
30
  metadata: IOperationMetadata;
12
31
  errors: IReflectOperationError[];
13
32
  }
33
+ /**
34
+ * Returns the success response of a method, or `null` when it cannot be
35
+ * described; the reasons are pushed to the errors.
36
+ *
37
+ * A HEAD method must have no content type, and an unsupported content type is
38
+ * an error.
39
+ *
40
+ * @evidence contracts/common.md#principled-implementation The schema is the primitive form for JSON and the resolved form for other types, the validator depends on the content type, and the status defaults to 201 for POST and 200 otherwise.
41
+ * @evidence contracts/common.md#clear-and-simple-design One function.
42
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The defaults are NestJS's.
43
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result and the two errors.
44
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
45
+ */
14
46
  const analyze: (ctx: IContext) => IReflectHttpOperationSuccess | null;
15
47
  }
@@ -5,8 +5,31 @@ const constants_1 = require("@nestjs/common/constants");
5
5
  const legacy_1 = require("../internal/legacy");
6
6
  const HttpResponseContentTypeUtil_1 = require("../utils/HttpResponseContentTypeUtil");
7
7
  const TextPlainValidator_1 = require("../validators/TextPlainValidator");
8
+ const SwaggerExampleAnalyzer_1 = require("./SwaggerExampleAnalyzer");
9
+ /**
10
+ * Reflects the success response of a route method.
11
+ *
12
+ * @evidence contracts/common.md#principled-implementation The content type comes from the encryption and query interceptors, then the headers metadata, then the produces metadata, then the method default; the status comes from the HTTP code metadata or the method default; binary types skip the schema.
13
+ * @evidence contracts/common.md#clear-and-simple-design One public function with small private helpers.
14
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The order follows how NestJS and nestia decorate a route.
15
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
16
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
17
+ */
8
18
  var ReflectHttpOperationResponseAnalyzer;
9
19
  (function (ReflectHttpOperationResponseAnalyzer) {
20
+ /**
21
+ * Returns the success response of a method, or `null` when it cannot be
22
+ * described; the reasons are pushed to the errors.
23
+ *
24
+ * A HEAD method must have no content type, and an unsupported content type is
25
+ * an error.
26
+ *
27
+ * @evidence contracts/common.md#principled-implementation The schema is the primitive form for JSON and the resolved form for other types, the validator depends on the content type, and the status defaults to 201 for POST and 200 otherwise.
28
+ * @evidence contracts/common.md#clear-and-simple-design One function.
29
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The defaults are NestJS's.
30
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result and the two errors.
31
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
32
+ */
10
33
  ReflectHttpOperationResponseAnalyzer.analyze = (ctx) => {
11
34
  var _a, _b, _c;
12
35
  var _d, _e, _f, _g;
@@ -61,12 +84,14 @@ var ReflectHttpOperationResponseAnalyzer;
61
84
  : contentType === "application/json" || encrypted === true
62
85
  ? legacy_1.JsonMetadataFactory.validate
63
86
  : contentType === "application/x-www-form-urlencoded"
64
- ? legacy_1.HttpQueryProgrammer.validate
87
+ ? // a typed query response, held to typia's query rules by the
88
+ // core transform
89
+ undefined
65
90
  : contentType === "text/plain"
66
91
  ? TextPlainValidator_1.TextPlainValidator.validate
67
92
  : (next) => (0, legacy_1.sizeOf)(next.metadata) !== 0
68
93
  ? ["HEAD method must not have any return value."]
69
- : [], example: example === null || example === void 0 ? void 0 : example.example, examples: example === null || example === void 0 ? void 0 : example.examples });
94
+ : [], example: example === null || example === void 0 ? void 0 : example.example, examples: SwaggerExampleAnalyzer_1.SwaggerExampleAnalyzer.examples(example) });
70
95
  };
71
96
  const getStatus = (func) => {
72
97
  const text = Reflect.getMetadata(constants_1.HTTP_CODE_METADATA, func);
@@ -1 +1 @@
1
- {"version":3,"file":"ReflectHttpOperationResponseAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperation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AAI;SAC8B;KAC5C,CAAC;AACJ,CAAC,EA/IgB,oCAAoC,aAApC,oCAAoC,GAApC,oCAAoC,QA+IpD"}
1
+ {"version":3,"file":"ReflectHttpOperationResponseAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationResponseAnalyzer.ts"],"names":[],"mappings":";;;AACA,wDAIkC;AAElC,+CAAiE;AAKjE,sFAAmF;AACnF,yEAAsE;AACtE,qEAAkE;AAElE;;;;;;;;GAQG;AACH,IAAiB,oCAAoC,CAwKpD;AAxKD,WAAiB,oCAAoC;IAoBnD;;;;;;;;;;;;OAYG;IACU,4CAAO,GAAG,CACrB,GAAa,EACwB,EAAE;;;QACvC,MAAM,MAAM,GAA8C,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;gBACd,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC,IAAI;gBACzB,KAAK,EAAE,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI;gBAChC,QAAQ,EAAE,GAAG,CAAC,YAAY;gBAC1B,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,MAAM;aACjB,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QAEF,MAAM,SAAS,GAAY,cAAc,CAAC;YACxC,IAAI,EAAE,2BAA2B;YACjC,QAAQ,EAAE,GAAG,CAAC,QAAQ;SACvB,CAAC,CAAC;QACH,MAAM,WAAW,GAAkB,SAAS;YAC1C,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,cAAc,CAAC;gBACX,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,GAAG,CAAC,QAAQ;aACvB,CAAC;gBACJ,CAAC,CAAC,mCAAmC;gBACrC,CAAC,CAAC,aAAC,MAAA,MAAA,OAAO,CAAC,WAAW,CAAC,4BAAgB,EAAE,GAAG,CAAC,QAAQ,CAAC,0CAAE,IAAI,CACxD,CAA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,EAAE,KAAK;YACf,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,IAAI;SAC8B;KAC5C,CAAC;AACJ,CAAC,EAxKgB,oCAAoC,aAApC,oCAAoC,GAApC,oCAAoC,QAwKpD"}
@@ -2,7 +2,26 @@ import { INestiaProject } from "../structures/INestiaProject";
2
2
  import { IOperationMetadata } from "../structures/IOperationMetadata";
3
3
  import { IReflectController } from "../structures/IReflectController";
4
4
  import { IReflectMcpOperation } from "../structures/IReflectMcpOperation";
5
+ /**
6
+ * Reflects an `@McpRoute` method into a tool operation.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The tool definition comes from the route metadata, the single params parameter is matched with its compile-time type, and combinations with HTTP or WebSocket decorators and extra parameters are errors.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
5
14
  export declare namespace ReflectMcpOperationAnalyzer {
15
+ /**
16
+ * The input of the MCP operation analysis: the project, the controller, the
17
+ * method, and its metadata.
18
+ *
19
+ * @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
20
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
21
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
22
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
23
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer.IProps analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
24
+ */
6
25
  interface IProps {
7
26
  project: Omit<INestiaProject, "config">;
8
27
  controller: IReflectController;
@@ -10,5 +29,15 @@ export declare namespace ReflectMcpOperationAnalyzer {
10
29
  name: string;
11
30
  metadata: IOperationMetadata;
12
31
  }
32
+ /**
33
+ * Returns the tool operation of a method, or `null` when the method is not an
34
+ * MCP route or has errors.
35
+ *
36
+ * @evidence contracts/common.md#principled-implementation The method is an MCP route when it carries the route metadata; at most one params parameter is allowed and the function may have at most one argument; the return type and imports come from the metadata.
37
+ * @evidence contracts/common.md#clear-and-simple-design One function that collects errors once and reports them together.
38
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
39
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result.
40
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
41
+ */
13
42
  const analyze: (ctx: IProps) => IReflectMcpOperation | null;
14
43
  }
@@ -3,11 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReflectMcpOperationAnalyzer = void 0;
4
4
  const constants_1 = require("@nestjs/common/constants");
5
5
  const ImportAnalyzer_1 = require("./ImportAnalyzer");
6
+ const ParameterNameAnalyzer_1 = require("./ParameterNameAnalyzer");
7
+ /**
8
+ * Reflects an `@McpRoute` method into a tool operation.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The tool definition comes from the route metadata, the single params parameter is matched with its compile-time type, and combinations with HTTP or WebSocket decorators and extra parameters are errors.
11
+ * @evidence contracts/common.md#clear-and-simple-design One public function.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
13
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
14
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
15
+ */
6
16
  var ReflectMcpOperationAnalyzer;
7
17
  (function (ReflectMcpOperationAnalyzer) {
18
+ /**
19
+ * Returns the tool operation of a method, or `null` when the method is not an
20
+ * MCP route or has errors.
21
+ *
22
+ * @evidence contracts/common.md#principled-implementation The method is an MCP route when it carries the route metadata; at most one params parameter is allowed and the function may have at most one argument; the return type and imports come from the metadata.
23
+ * @evidence contracts/common.md#clear-and-simple-design One function that collects errors once and reports them together.
24
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
25
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result.
26
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
27
+ */
8
28
  ReflectMcpOperationAnalyzer.analyze = (ctx) => {
9
- var _a, _b, _c;
10
- var _d, _e, _f, _g, _h, _j, _k;
29
+ var _a, _b, _c, _d;
30
+ var _e, _f, _g, _h, _j, _k, _l;
11
31
  const route = Reflect.getMetadata("nestia/McpRoute", ctx.function);
12
32
  if (route === undefined)
13
33
  return null;
@@ -17,13 +37,13 @@ var ReflectMcpOperationAnalyzer;
17
37
  const hasWebSocketRoute = Reflect.getMetadata("nestia/WebSocketRoute", ctx.function) !== undefined;
18
38
  if (hasHttpRoute || hasWebSocketRoute)
19
39
  errors.push("@McpRoute must not be combined with HTTP or WebSocket route decorators on the same method.");
20
- const preconfigured = ((_d = Reflect.getMetadata("nestia/McpRoute/Parameters", ctx.controller.class.prototype, ctx.name)) !== null && _d !== void 0 ? _d : []).sort((a, b) => a.index - b.index);
40
+ const preconfigured = ((_e = Reflect.getMetadata("nestia/McpRoute/Parameters", ctx.controller.class.prototype, ctx.name)) !== null && _e !== void 0 ? _e : []).sort((a, b) => a.index - b.index);
21
41
  if (preconfigured.length > 1)
22
42
  errors.push("@McpRoute tools may declare at most one @McpRoute.Params() parameter.");
23
43
  if (ctx.function.length > 1)
24
44
  errors.push("@McpRoute tools must have 0 or 1 parameters (the MCP arguments object).");
25
45
  const imports = [];
26
- const parameters = preconfigured
46
+ const declared = preconfigured
27
47
  .map((p) => {
28
48
  const matched = ctx.metadata.parameters.find((m) => p.index === m.index);
29
49
  if (matched === undefined) {
@@ -31,7 +51,7 @@ var ReflectMcpOperationAnalyzer;
31
51
  return null;
32
52
  }
33
53
  if (matched.type === null) {
34
- errors.push(`Failed to analyze the parameter type of ${JSON.stringify(matched.name)}.`);
54
+ errors.push(`Failed to analyze the parameter type of ${matched.name ? JSON.stringify(matched.name) : `the ${p.index} (th) argument`}.`);
35
55
  return null;
36
56
  }
37
57
  imports.push(...matched.imports);
@@ -40,12 +60,15 @@ var ReflectMcpOperationAnalyzer;
40
60
  name: matched.name,
41
61
  index: p.index,
42
62
  type: matched.type,
63
+ metadata: matched.primitive,
43
64
  imports: matched.imports,
44
65
  description: matched.description,
45
66
  jsDocTags: matched.jsDocTags,
46
67
  };
47
68
  })
48
69
  .filter((p) => !!p);
70
+ // a destructured parameter declares no name, so it is given one
71
+ const parameters = ParameterNameAnalyzer_1.ParameterNameAnalyzer.name(declared);
49
72
  if ((_b = (_a = ctx.metadata.success) === null || _a === void 0 ? void 0 : _a.imports) === null || _b === void 0 ? void 0 : _b.length)
50
73
  imports.push(...ctx.metadata.success.imports);
51
74
  if (errors.length) {
@@ -62,16 +85,17 @@ var ReflectMcpOperationAnalyzer;
62
85
  protocol: "mcp",
63
86
  name: ctx.name,
64
87
  toolName: route.name,
65
- title: (_e = route.title) !== null && _e !== void 0 ? _e : null,
66
- toolDescription: (_f = route.description) !== null && _f !== void 0 ? _f : null,
88
+ title: (_f = route.title) !== null && _f !== void 0 ? _f : null,
89
+ toolDescription: (_g = route.description) !== null && _g !== void 0 ? _g : null,
67
90
  inputSchema: route.inputSchema,
68
- outputSchema: (_g = route.outputSchema) !== null && _g !== void 0 ? _g : null,
69
- annotations: (_h = route.annotations) !== null && _h !== void 0 ? _h : null,
91
+ outputSchema: (_h = route.outputSchema) !== null && _h !== void 0 ? _h : null,
92
+ annotations: (_j = route.annotations) !== null && _j !== void 0 ? _j : null,
70
93
  function: ctx.function,
71
94
  parameters,
72
- returnType: (_j = (_c = ctx.metadata.success) === null || _c === void 0 ? void 0 : _c.type) !== null && _j !== void 0 ? _j : null,
95
+ returnType: (_k = (_c = ctx.metadata.success) === null || _c === void 0 ? void 0 : _c.type) !== null && _k !== void 0 ? _k : null,
96
+ returnMetadata: (_d = ctx.metadata.success) === null || _d === void 0 ? void 0 : _d.primitive,
73
97
  imports: ImportAnalyzer_1.ImportAnalyzer.merge(imports),
74
- description: (_k = ctx.metadata.description) !== null && _k !== void 0 ? _k : null,
98
+ description: (_l = ctx.metadata.description) !== null && _l !== void 0 ? _l : null,
75
99
  jsDocTags: ctx.metadata.jsDocTags,
76
100
  };
77
101
  };