@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
@@ -1,11 +1,22 @@
1
- import { IMetadataComponents, IMetadataSchema } from "@typia/interface";
1
+ import { IMetadataComponents, IMetadataSchema, OpenApi } from "@typia/interface";
2
2
  import { MetadataFactory } from "../internal/legacy";
3
3
  import { IReflectType } from "./IReflectType";
4
+ /**
5
+ * A reflected exception of an operation: its status, description, examples,
6
+ * type, metadata, components, and validator.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The declaration fields come from `@TypedException` and the reflected fields from the transform.
9
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
12
+ * @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.
13
+ */
4
14
  export interface IReflectHttpOperationException {
5
15
  status: number | "2XX" | "3XX" | "4XX" | "5XX";
6
16
  description: string | null;
7
17
  example?: any;
8
- examples?: Record<string, any>;
18
+ /** Named examples, as OpenAPI Example Objects. */
19
+ examples?: Record<string, OpenApi.IExample>;
9
20
  type: IReflectType;
10
21
  metadata: IMetadataSchema;
11
22
  components: IMetadataComponents;
@@ -1,18 +1,65 @@
1
- import { IJsDocTagInfo, IMetadataComponents, IMetadataSchema } from "@typia/interface";
1
+ import { IJsDocTagInfo, IMetadataComponents, IMetadataSchema, OpenApi } from "@typia/interface";
2
2
  import { MetadataFactory } from "../internal/legacy";
3
3
  import { IReflectType } from "./IReflectType";
4
+ /**
5
+ * A reflected parameter of an HTTP operation: a body, headers, a path
6
+ * parameter, or a query.
7
+ *
8
+ * @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.
9
+ * @evidence contracts/common.md#clear-and-simple-design A union of four records plus the preconfigured union.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
12
+ * @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.
13
+ */
4
14
  export type IReflectHttpOperationParameter = IReflectHttpOperationParameter.IBody | IReflectHttpOperationParameter.IHeaders | IReflectHttpOperationParameter.IParam | IReflectHttpOperationParameter.IQuery;
5
15
  export declare namespace IReflectHttpOperationParameter {
16
+ /**
17
+ * The reflected parameter of a body, with its content type and whether it is
18
+ * encrypted.
19
+ *
20
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
21
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
22
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
23
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
24
+ * @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.
25
+ */
6
26
  export interface IBody extends IBase<"body"> {
7
27
  contentType: "application/json" | "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
8
28
  encrypted: boolean;
9
29
  }
30
+ /**
31
+ * The reflected parameter of the headers, as an object or as one field.
32
+ *
33
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
34
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
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 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.
38
+ */
10
39
  export interface IHeaders extends IBase<"headers"> {
11
40
  field: string | null;
12
41
  }
42
+ /**
43
+ * The reflected parameter of a path parameter with its field name.
44
+ *
45
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
46
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
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 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.
50
+ */
13
51
  export interface IParam extends IBase<"param"> {
14
52
  field: string;
15
53
  }
54
+ /**
55
+ * The reflected parameter of the query, as an object or as one field.
56
+ *
57
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
58
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
59
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
60
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
61
+ * @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.
62
+ */
16
63
  export interface IQuery extends IBase<"query"> {
17
64
  field: string | null;
18
65
  }
@@ -23,9 +70,14 @@ export declare namespace IReflectHttpOperationParameter {
23
70
  type: IReflectType;
24
71
  metadata: IMetadataSchema;
25
72
  components: IMetadataComponents;
26
- validate: MetadataFactory.Validator;
73
+ /**
74
+ * SDK policy checked over the metadata, for a JSON or text body. An HTTP
75
+ * input's wire rules are typia's instead, baked beside its metadata.
76
+ */
77
+ validate?: MetadataFactory.Validator;
27
78
  example?: any;
28
- examples?: Record<string, any>;
79
+ /** Named examples, as OpenAPI Example Objects. */
80
+ examples?: Record<string, OpenApi.IExample>;
29
81
  description: string | null;
30
82
  jsDocTags: IJsDocTagInfo[];
31
83
  }
@@ -1,7 +1,18 @@
1
- import { IMetadataComponents, IMetadataSchema } from "@typia/interface";
1
+ import { IMetadataComponents, IMetadataSchema, OpenApi } from "@typia/interface";
2
2
  import { MetadataFactory } from "../internal/legacy";
3
3
  import { HttpResponseContentTypeUtil } from "../utils/HttpResponseContentTypeUtil";
4
4
  import { IReflectType } from "./IReflectType";
5
+ /**
6
+ * The reflected success response of an operation: its type, status, content
7
+ * type, whether it is binary or encrypted, its schema, validator, and
8
+ * examples.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The record holds what the SDK and the Swagger generators need to describe the response.
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 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.
15
+ */
5
16
  export interface IReflectHttpOperationSuccess {
6
17
  type: IReflectType;
7
18
  status: number;
@@ -10,7 +21,8 @@ export interface IReflectHttpOperationSuccess {
10
21
  encrypted: boolean;
11
22
  components: IMetadataComponents;
12
23
  metadata: IMetadataSchema;
13
- validate: MetadataFactory.Validator;
24
+ validate?: MetadataFactory.Validator;
14
25
  example?: any;
15
- examples?: Record<string, any>;
26
+ /** Named examples, as OpenAPI Example Objects. */
27
+ examples?: Record<string, OpenApi.IExample>;
16
28
  }
@@ -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,4 +1,5 @@
1
1
  import { IJsDocTagInfo } from "typia";
2
+ import { IOperationMetadata } from "./IOperationMetadata";
2
3
  import { IReflectImport } from "./IReflectImport";
3
4
  import { IReflectMcpOperationParameter } from "./IReflectMcpOperationParameter";
4
5
  import { IReflectType } from "./IReflectType";
@@ -8,6 +9,12 @@ import { IReflectType } from "./IReflectType";
8
9
  * Produced by {@link ReflectMcpOperationAnalyzer.analyze}; consumed by
9
10
  * {@link TypedMcpRouteAnalyzer.analyze} to produce the final
10
11
  * {@link ITypedMcpRoute}.
12
+ *
13
+ * @evidence contracts/common.md#principled-implementation The record joins the route metadata of the decorator with the compile-time metadata.
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 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.
11
18
  */
12
19
  export interface IReflectMcpOperation {
13
20
  protocol: "mcp";
@@ -21,11 +28,23 @@ export interface IReflectMcpOperation {
21
28
  function: Function;
22
29
  parameters: IReflectMcpOperationParameter[];
23
30
  returnType: IReflectType | null;
31
+ /** Native JSON return analysis; optional for source-only reflected inputs. */
32
+ returnMetadata?: IOperationMetadata.IResponse["primitive"];
24
33
  imports: IReflectImport[];
25
34
  description: string | null;
26
35
  jsDocTags: IJsDocTagInfo[];
27
36
  }
28
37
  export declare namespace IReflectMcpOperation {
38
+ /**
39
+ * The behavior hints of a tool: read-only, destructive, idempotent, and
40
+ * open-world.
41
+ *
42
+ * @evidence contracts/common.md#principled-implementation The four optional flags are the hints the MCP protocol defines.
43
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
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 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.
47
+ */
29
48
  interface IAnnotations {
30
49
  readOnlyHint?: boolean;
31
50
  destructiveHint?: boolean;
@@ -1,16 +1,25 @@
1
1
  import { IJsDocTagInfo } from "typia";
2
+ import { IOperationMetadata } from "./IOperationMetadata";
2
3
  import { IReflectImport } from "./IReflectImport";
3
4
  import { IReflectType } from "./IReflectType";
4
5
  /**
5
6
  * Parameter descriptor for an MCP tool method. Reflected from
6
7
  * `"nestia/McpRoute/Parameters"` metadata plus compile-time type information
7
8
  * collected by the nestia transformer.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation A tool has at most one parameter, and the record is what the SDK needs to type it.
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 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.
8
15
  */
9
16
  export interface IReflectMcpOperationParameter {
10
17
  category: "params";
11
18
  name: string;
12
19
  index: number;
13
20
  type: IReflectType;
21
+ /** Native JSON wire analysis, retained independently of the source import. */
22
+ metadata?: IOperationMetadata.IResponse["primitive"];
14
23
  imports: IReflectImport[];
15
24
  description: string | null;
16
25
  jsDocTags: IJsDocTagInfo[];
@@ -1,5 +1,15 @@
1
1
  import { IComparable } from "tstl";
2
2
  import { IOperationMetadata } from "../structures/IOperationMetadata";
3
+ /**
4
+ * An error or warning of the reflection: the file, the class, the function, the
5
+ * origin, and the contents.
6
+ *
7
+ * @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.
8
+ * @evidence contracts/common.md#clear-and-simple-design A record and one key class in its namespace.
9
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior. The key class only compares fields.
10
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the record locates.
11
+ * @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.
12
+ */
3
13
  export interface IReflectOperationError {
4
14
  file: string;
5
15
  class: string;
@@ -8,9 +18,27 @@ export interface IReflectOperationError {
8
18
  contents: Array<string | IOperationMetadata.IError>;
9
19
  }
10
20
  export declare namespace IReflectOperationError {
21
+ /**
22
+ * An ordering key of an error: file, then class, then function, then origin.
23
+ *
24
+ * @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.
25
+ * @evidence contracts/common.md#clear-and-simple-design One class with one method.
26
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It compares fields and holds no state beyond the error.
27
+ * @evidence contracts/common.md#meaningful-documentation The comment states the order.
28
+ * @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.
29
+ */
11
30
  class Key implements Pick<IComparable<Key>, "less"> {
12
31
  readonly error: IReflectOperationError;
13
32
  constructor(error: IReflectOperationError);
33
+ /**
34
+ * Returns whether this key orders before the other.
35
+ *
36
+ * @evidence contracts/common.md#principled-implementation The fields are compared in order and the first that differs decides, which is a lexicographic order.
37
+ * @evidence contracts/common.md#clear-and-simple-design One method of chained comparisons.
38
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It compares only the four location fields.
39
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result.
40
+ * @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.
41
+ */
14
42
  less(obj: Key): boolean;
15
43
  }
16
44
  }
@@ -3,18 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IReflectOperationError = void 0;
4
4
  var IReflectOperationError;
5
5
  (function (IReflectOperationError) {
6
+ /**
7
+ * An ordering key of an error: file, then class, then function, then origin.
8
+ *
9
+ * @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.
10
+ * @evidence contracts/common.md#clear-and-simple-design One class with one method.
11
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It compares fields and holds no state beyond the error.
12
+ * @evidence contracts/common.md#meaningful-documentation The comment states the order.
13
+ * @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.
14
+ */
6
15
  class Key {
7
16
  constructor(error) {
8
17
  this.error = error;
9
18
  }
19
+ /**
20
+ * Returns whether this key orders before the other.
21
+ *
22
+ * @evidence contracts/common.md#principled-implementation The fields are compared in order and the first that differs decides, which is a lexicographic order.
23
+ * @evidence contracts/common.md#clear-and-simple-design One method of chained comparisons.
24
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It compares only the four location fields.
25
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result.
26
+ * @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.
27
+ */
10
28
  less(obj) {
11
29
  var _a, _b, _c, _d;
12
30
  if (this.error.file !== obj.error.file)
13
31
  return this.error.file < obj.error.file;
14
32
  else if (this.error.class !== obj.error.class)
15
33
  return this.error.class < obj.error.class;
16
- else if (this.error.function !== obj.error.function)
17
- return ((_a = this.error.function) !== null && _a !== void 0 ? _a : "") < ((_b = obj.error.function) !== null && _b !== void 0 ? _b : "");
34
+ const leftFunction = (_a = this.error.function) !== null && _a !== void 0 ? _a : "";
35
+ const rightFunction = (_b = obj.error.function) !== null && _b !== void 0 ? _b : "";
36
+ if (leftFunction !== rightFunction)
37
+ return leftFunction < rightFunction;
18
38
  return ((_c = this.error.from) !== null && _c !== void 0 ? _c : "") < ((_d = obj.error.from) !== null && _d !== void 0 ? _d : "");
19
39
  }
20
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IReflectOperationError.js","sourceRoot":"","sources":["../../src/structures/IReflectOperationError.ts"],"names":[],"mappings":";;;AAWA,IAAiB,sBAAsB,CActC;AAdD,WAAiB,sBAAsB;IACrC,MAAa,GAAG;QACd,YAAmC,KAA6B;yBAA7B,KAAK;QAA2B,CAAC;QAE7D,IAAI,CAAC,GAAQ;;YAClB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,IAAI;gBACpC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;iBACrC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK;gBAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;iBACvC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,QAAQ;gBACjD,OAAO,OAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC,GAAG,OAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC,CAAC;YAClE,OAAO,OAAC,IAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC,GAAG,OAAC,GAAG,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;KACF;IAZY,uBAAA,GAAG,MAYf,CAAA;AACH,CAAC,EAdgB,sBAAsB,aAAtB,sBAAsB,GAAtB,sBAAsB,QActC"}
1
+ {"version":3,"file":"IReflectOperationError.js","sourceRoot":"","sources":["../../src/structures/IReflectOperationError.ts"],"names":[],"mappings":";;;AAqBA,IAAiB,sBAAsB,CAiCtC;AAjCD,WAAiB,sBAAsB;IACrC;;;;;;;;OAQG;IACH,MAAa,GAAG;QACd,YAAmC,KAA6B;yBAA7B,KAAK;QAA2B,CAAC;QAEpE;;;;;;;;WAQG;QACI,IAAI,CAAC,GAAQ;;YAClB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,IAAI;gBACpC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;iBACrC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK;gBAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;YAC5C,MAAM,YAAY,SAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC;YAC/C,MAAM,aAAa,SAAG,GAAG,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC;YAC/C,IAAI,YAAY,KAAK,aAAa;gBAAE,OAAO,YAAY,GAAG,aAAa,CAAC;YACxE,OAAO,OAAC,IAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC,GAAG,OAAC,GAAG,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;KACF;IAtBY,uBAAA,GAAG,MAsBf,CAAA;AACH,CAAC,EAjCgB,sBAAsB,aAAtB,sBAAsB,GAAtB,sBAAsB,QAiCtC"}
@@ -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[];
@@ -2,6 +2,16 @@ import { VERSION_NEUTRAL } from "@nestjs/common";
2
2
  import { IJsDocTagInfo } from "typia";
3
3
  import { IReflectImport } from "./IReflectImport";
4
4
  import { IReflectWebSocketOperationParameter } from "./IReflectWebSocketOperationParameter";
5
+ /**
6
+ * A reflected WebSocket operation: its name, paths, function, versions,
7
+ * parameters, and imports.
8
+ *
9
+ * @evidence contracts/common.md#principled-implementation The record joins the route metadata of the decorator with the compile-time metadata.
10
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
11
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
12
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
13
+ * @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.
14
+ */
5
15
  export interface IReflectWebSocketOperation {
6
16
  protocol: "websocket";
7
17
  name: string;
@@ -1,12 +1,67 @@
1
1
  import { IJsDocTagInfo } from "typia";
2
2
  import { IReflectImport } from "./IReflectImport";
3
3
  import { IReflectType } from "./IReflectType";
4
+ /**
5
+ * A parameter of a WebSocket operation: an acceptor, a driver, a header, a path
6
+ * parameter, or a query.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The union is discriminated by `category`, and a preconfigured form carries what the decorators alone record.
9
+ * @evidence contracts/common.md#clear-and-simple-design A union of five records plus the preconfigured form.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
12
+ * @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.
13
+ */
4
14
  export type IReflectWebSocketOperationParameter = IReflectWebSocketOperationParameter.IAcceptor | IReflectWebSocketOperationParameter.IDriver | IReflectWebSocketOperationParameter.IHeader | IReflectWebSocketOperationParameter.IParam | IReflectWebSocketOperationParameter.IQuery;
5
15
  export declare namespace IReflectWebSocketOperationParameter {
16
+ /**
17
+ * The parameter category `acceptor` of a WebSocket operation.
18
+ *
19
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
20
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
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 names the category.
23
+ * @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.
24
+ */
6
25
  export type IAcceptor = IBase<"acceptor">;
26
+ /**
27
+ * The parameter category `driver` of a WebSocket operation.
28
+ *
29
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
30
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
31
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
32
+ * @evidence contracts/common.md#meaningful-documentation The comment names the category.
33
+ * @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.
34
+ */
7
35
  export type IDriver = IBase<"driver">;
36
+ /**
37
+ * The parameter category `header` of a WebSocket operation.
38
+ *
39
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
40
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
41
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
42
+ * @evidence contracts/common.md#meaningful-documentation The comment names the category.
43
+ * @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.
44
+ */
8
45
  export type IHeader = IBase<"header">;
46
+ /**
47
+ * The parameter category `query` of a WebSocket operation.
48
+ *
49
+ * @evidence contracts/common.md#principled-implementation The alias fixes the category of the shared base.
50
+ * @evidence contracts/common.md#clear-and-simple-design One alias.
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 names the category.
53
+ * @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.
54
+ */
9
55
  export type IQuery = IBase<"query">;
56
+ /**
57
+ * A path parameter of a WebSocket operation with its field name.
58
+ *
59
+ * @evidence contracts/common.md#principled-implementation The record adds the field that names the path placeholder to the shared base.
60
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
61
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
62
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
63
+ * @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.
64
+ */
10
65
  export interface IParam extends IBase<"param"> {
11
66
  field: string;
12
67
  }
@@ -3,6 +3,16 @@ import { INestiaProject } from "./INestiaProject";
3
3
  import { ITypedHttpRoute } from "./ITypedHttpRoute";
4
4
  import { ITypedMcpRoute } from "./ITypedMcpRoute";
5
5
  import { ITypedWebSocketRoute } from "./ITypedWebSocketRoute";
6
+ /**
7
+ * The typed application: the project, the metadata dictionary, and the typed
8
+ * routes.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The record is the input of every generator.
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 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.
15
+ */
6
16
  export interface ITypedApplication {
7
17
  project: INestiaProject;
8
18
  collection: IMetadataDictionary;
@@ -4,10 +4,28 @@ import { IReflectImport } from "./IReflectImport";
4
4
  import { ITypedHttpRouteException } from "./ITypedHttpRouteException";
5
5
  import { ITypedHttpRouteParameter } from "./ITypedHttpRouteParameter";
6
6
  import { ITypedHttpRouteSuccess } from "./ITypedHttpRouteSuccess";
7
+ /**
8
+ * A typed HTTP route: one path of an operation with its parameters split by
9
+ * kind, its success, its exceptions, and its documentation.
10
+ *
11
+ * @evidence contracts/common.md#principled-implementation The reflected operation is expanded per path and its parameters are classified for the generators.
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 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.
16
+ */
7
17
  export interface ITypedHttpRoute {
8
18
  protocol: "http";
9
19
  function: Function;
10
20
  controller: IReflectController;
21
+ /**
22
+ * Property key of the controller method.
23
+ *
24
+ * {@link name} is the SDK function's name, which the accessor analysis
25
+ * renames: a reserved word such as `delete` becomes `_delete`. Metadata the
26
+ * method's decorators define, and what names the method, read this key.
27
+ */
28
+ key: string;
11
29
  name: string;
12
30
  method: string;
13
31
  path: string;
@@ -1,10 +1,22 @@
1
+ import { OpenApi } from "@typia/interface";
1
2
  import { MetadataSchema } from "../internal/legacy";
2
3
  import { IReflectType } from "./IReflectType";
4
+ /**
5
+ * A typed exception: its status, description, examples, type, and resolved
6
+ * metadata.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The resolved metadata is what the SDK and the Swagger generators print.
9
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
12
+ * @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.
13
+ */
3
14
  export interface ITypedHttpRouteException {
4
15
  status: number | "2XX" | "3XX" | "4XX" | "5XX";
5
16
  description: string | null;
6
17
  example: any;
7
- examples: Record<string, any>;
18
+ /** Named examples, as OpenAPI Example Objects. */
19
+ examples: Record<string, OpenApi.IExample>;
8
20
  type: IReflectType;
9
21
  metadata: MetadataSchema;
10
22
  }
@@ -1,18 +1,64 @@
1
+ import { OpenApi } from "@typia/interface";
1
2
  import { IJsDocTagInfo } from "typia";
2
3
  import { MetadataSchema } from "../internal/legacy";
3
4
  import { IReflectType } from "./IReflectType";
5
+ /**
6
+ * A typed parameter of a route: a body, headers, a path parameter, or a query.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The union is discriminated by `category`, and each member carries the resolved metadata.
9
+ * @evidence contracts/common.md#clear-and-simple-design A union of four records.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
12
+ * @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.
13
+ */
4
14
  export type ITypedHttpRouteParameter = ITypedHttpRouteParameter.IBody | ITypedHttpRouteParameter.IHeaders | ITypedHttpRouteParameter.IPath | ITypedHttpRouteParameter.IQuery;
5
15
  export declare namespace ITypedHttpRouteParameter {
16
+ /**
17
+ * The typed form of a body parameter.
18
+ *
19
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
20
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
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; its members are named for their meaning.
23
+ * @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.
24
+ */
6
25
  export interface IBody extends IBase<"body"> {
7
26
  contentType: "application/json" | "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
8
27
  encrypted: boolean;
9
28
  }
29
+ /**
30
+ * The typed form of a headers parameter.
31
+ *
32
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
33
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
34
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
35
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
36
+ * @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.
37
+ */
10
38
  export interface IHeaders extends IBase<"headers"> {
11
39
  field: string | null;
12
40
  }
41
+ /**
42
+ * The typed form of a path parameter parameter.
43
+ *
44
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
45
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
46
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
47
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
48
+ * @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.
49
+ */
13
50
  export interface IPath extends IBase<"param"> {
14
51
  field: string;
15
52
  }
53
+ /**
54
+ * The typed form of a query parameter.
55
+ *
56
+ * @evidence contracts/common.md#principled-implementation The record extends the shared base with the members its category adds.
57
+ * @evidence contracts/common.md#clear-and-simple-design A record extending the shared base.
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 states what the type describes; its members are named for their meaning.
60
+ * @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.
61
+ */
16
62
  export interface IQuery extends IBase<"query"> {
17
63
  field: string | null;
18
64
  }
@@ -23,7 +69,8 @@ export declare namespace ITypedHttpRouteParameter {
23
69
  type: IReflectType;
24
70
  metadata: MetadataSchema;
25
71
  example?: any;
26
- examples?: Record<string, any>;
72
+ /** Named examples, as OpenAPI Example Objects. */
73
+ examples?: Record<string, OpenApi.IExample>;
27
74
  description: string | null;
28
75
  jsDocTags: IJsDocTagInfo[];
29
76
  }
@@ -1,6 +1,17 @@
1
+ import { OpenApi } from "@typia/interface";
1
2
  import { MetadataSchema } from "../internal/legacy";
2
3
  import { HttpResponseContentTypeUtil } from "../utils/HttpResponseContentTypeUtil";
3
4
  import { IReflectType } from "./IReflectType";
5
+ /**
6
+ * A typed success response: its type, status, content type, binary and
7
+ * encrypted flags, metadata, examples, and header directives.
8
+ *
9
+ * @evidence contracts/common.md#principled-implementation The header directives are the `@setHeader` and `@assignHeaders` tags, which the SDK function applies to the connection.
10
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
11
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
12
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes; its members are named for their meaning.
13
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ITypedHttpRouteSuccess 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.
14
+ */
4
15
  export interface ITypedHttpRouteSuccess {
5
16
  type: IReflectType;
6
17
  status: number | null;
@@ -9,7 +20,8 @@ export interface ITypedHttpRouteSuccess {
9
20
  encrypted: boolean;
10
21
  metadata: MetadataSchema;
11
22
  example?: any;
12
- examples?: Record<string, any>;
23
+ /** Named examples, as OpenAPI Example Objects. */
24
+ examples?: Record<string, OpenApi.IExample>;
13
25
  setHeaders: Array<{
14
26
  type: "setter";
15
27
  source: string;