@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
@@ -6,18 +6,138 @@ import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
6
6
  import { ITypedHttpRouteParameter } from "../../structures/ITypedHttpRouteParameter";
7
7
  import { ITypedWebSocketRoute } from "../../structures/ITypedWebSocketRoute";
8
8
  import { ImportDictionary } from "./ImportDictionary";
9
+ import type { SdkWebSocketParameterProgrammer } from "./SdkWebSocketParameterProgrammer";
10
+ /**
11
+ * Type nodes of the SDK: the named types of routes, and the request and
12
+ * response aliases.
13
+ *
14
+ * @evidence contracts/common.md#principled-implementation The namespace builds each type as the syntax tree that the printer writes, from the reflected names or from the metadata when `clone` is on.
15
+ * @evidence contracts/common.md#clear-and-simple-design Several small builders.
16
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The builders depend on the project configuration for the choice of source.
17
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
18
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
19
+ */
9
20
  export declare namespace SdkAliasCollection {
21
+ /**
22
+ * Returns the type reference of a reflected type, with its type arguments.
23
+ *
24
+ * @evidence contracts/common.md#principled-implementation The arguments are built recursively.
25
+ * @evidence contracts/common.md#clear-and-simple-design One recursion.
26
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It writes the name as reflected.
27
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
28
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.name composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
29
+ */
10
30
  const name: ({ type }: {
11
31
  type: IReflectType;
12
32
  }) => TypeNode;
33
+ /**
34
+ * Returns the type of one chunk of a binary response:
35
+ * `Uint8Array<ArrayBufferLike>`.
36
+ *
37
+ * @evidence contracts/common.md#principled-implementation The chunk type of the platform stream is a byte array.
38
+ * @evidence contracts/common.md#clear-and-simple-design One node.
39
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The type is fixed.
40
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
41
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.binaryChunk composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
42
+ */
13
43
  const binaryChunk: () => TypeNode;
44
+ /**
45
+ * Returns the type of a binary response: `ReadableStream` of its chunks.
46
+ *
47
+ * @evidence contracts/common.md#principled-implementation A binary response is streamed, not read into memory.
48
+ * @evidence contracts/common.md#clear-and-simple-design One node.
49
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The chunk type is shared.
50
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
51
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.binaryResponse composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
52
+ */
14
53
  const binaryResponse: () => TypeNode;
54
+ /**
55
+ * Returns the type node of a metadata.
56
+ *
57
+ * @evidence contracts/common.md#principled-implementation The metadata is written by the type programmer, so the result is the DTO the clone declares.
58
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
59
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It shares the type writer.
60
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
61
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.from composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
62
+ */
15
63
  const from: (project: INestiaProject) => (importer: ImportDictionary) => (metadata: MetadataSchema) => TypeNode;
64
+ /**
65
+ * Returns the object type of a route's keyword parameters, each with the
66
+ * description of its parameter or its `@param` tag.
67
+ *
68
+ * @evidence contracts/common.md#principled-implementation The entries are the route's path, query, and body parameters, optional where the metadata is, without prefix.
69
+ * @evidence contracts/common.md#clear-and-simple-design One map over the entries.
70
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A parameter with a description carries it as a comment.
71
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
72
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.httpProps composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
73
+ */
16
74
  const httpProps: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedHttpRoute) => TypeNode;
17
- const websocketProps: (route: ITypedWebSocketRoute) => TypeNode;
75
+ /**
76
+ * Returns the object type of a WebSocket route's keyword parameters: its path
77
+ * parameters, its query, and its provider.
78
+ *
79
+ * @evidence contracts/common.md#principled-implementation The keys are the names decided by the parameter programmer, so the type and the function agree.
80
+ * @evidence contracts/common.md#clear-and-simple-design One literal.
81
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The names are shared.
82
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
83
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.websocketProps composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
84
+ */
85
+ const websocketProps: (route: ITypedWebSocketRoute, names: SdkWebSocketParameterProgrammer.INames) => TypeNode;
86
+ /**
87
+ * Returns the type of a route's headers: its reflected name, or the
88
+ * metadata's type under `clone`.
89
+ *
90
+ * @evidence contracts/common.md#principled-implementation The source follows the `clone` setting.
91
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
92
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The choice is made on one flag.
93
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
94
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.headers composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
95
+ */
18
96
  const headers: (project: INestiaProject) => (importer: ImportDictionary) => (param: ITypedHttpRouteParameter.IHeaders) => TypeNode;
97
+ /**
98
+ * Returns the type of a route's query: its metadata under `clone`, otherwise
99
+ * its reflected type wrapped in Resolved unless primitive conversion is off.
100
+ *
101
+ * @evidence contracts/common.md#principled-implementation Clone mode uses the resolved metadata graph; source mode uses the declared type with the configured Resolved conversion.
102
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
103
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The choice is made on one flag.
104
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
105
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.query composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
106
+ */
19
107
  const query: (project: INestiaProject) => (importer: ImportDictionary) => (param: ITypedHttpRouteParameter.IQuery) => TypeNode;
108
+ /**
109
+ * Returns the type of a route's body: a form data input for a multipart body,
110
+ * and otherwise the reflected name or the metadata's type under `clone`.
111
+ *
112
+ * @evidence contracts/common.md#principled-implementation The multipart body is an input of files and fields, not the declared class.
113
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
114
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The cases are the content types.
115
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
116
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.body composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
117
+ */
20
118
  const body: (project: INestiaProject) => (importer: ImportDictionary) => (param: ITypedHttpRouteParameter.IBody) => TypeNode;
119
+ /**
120
+ * Returns the type of a route's output: the success and every exception as a
121
+ * union of `IPropagation` members, or the success body alone when propagation
122
+ * is off.
123
+ *
124
+ * @evidence contracts/common.md#principled-implementation Status keys retain their declared numeric or range spelling for IPropagation to expand. Source success types follow their content type, while declared exceptions use JSON Primitive conversion independently of the success media type; primitive:false preserves declared source types.
125
+ * @evidence contracts/common.md#clear-and-simple-design One function of two branches.
126
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The exceptions are the declared ones.
127
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
128
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.response composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
129
+ */
21
130
  const response: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedHttpRoute) => TypeNode;
131
+ /**
132
+ * Returns the type of the success body: a stream for a binary response, the
133
+ * reflected type for a plain one, and its primitive form for a JSON
134
+ * response.
135
+ *
136
+ * @evidence contracts/common.md#principled-implementation The route's metadata decides between the branches.
137
+ * @evidence contracts/common.md#clear-and-simple-design One function.
138
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The branches are the response kinds.
139
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
140
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.responseBody composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
141
+ */
22
142
  const responseBody: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedHttpRoute) => TypeNode;
23
143
  }
@@ -7,16 +7,73 @@ const legacy_1 = require("../../internal/legacy");
7
7
  const FilePrinter_1 = require("./FilePrinter");
8
8
  const SdkHttpParameterProgrammer_1 = require("./SdkHttpParameterProgrammer");
9
9
  const SdkTypeProgrammer_1 = require("./SdkTypeProgrammer");
10
+ /**
11
+ * Type nodes of the SDK: the named types of routes, and the request and
12
+ * response aliases.
13
+ *
14
+ * @evidence contracts/common.md#principled-implementation The namespace builds each type as the syntax tree that the printer writes, from the reflected names or from the metadata when `clone` is on.
15
+ * @evidence contracts/common.md#clear-and-simple-design Several small builders.
16
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The builders depend on the project configuration for the choice of source.
17
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
18
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
19
+ */
10
20
  var SdkAliasCollection;
11
21
  (function (SdkAliasCollection) {
22
+ /**
23
+ * Returns the type reference of a reflected type, with its type arguments.
24
+ *
25
+ * @evidence contracts/common.md#principled-implementation The arguments are built recursively.
26
+ * @evidence contracts/common.md#clear-and-simple-design One recursion.
27
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It writes the name as reflected.
28
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
29
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.name composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
30
+ */
12
31
  SdkAliasCollection.name = ({ type }) => factory_1.factory.createTypeReferenceNode(type.name, type.typeArguments
13
32
  ? type.typeArguments.map((a) => SdkAliasCollection.name({ type: a }))
14
33
  : undefined);
34
+ /**
35
+ * Returns the type of one chunk of a binary response:
36
+ * `Uint8Array<ArrayBufferLike>`.
37
+ *
38
+ * @evidence contracts/common.md#principled-implementation The chunk type of the platform stream is a byte array.
39
+ * @evidence contracts/common.md#clear-and-simple-design One node.
40
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The type is fixed.
41
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
42
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.binaryChunk composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
43
+ */
15
44
  SdkAliasCollection.binaryChunk = () => factory_1.factory.createTypeReferenceNode("Uint8Array", [
16
45
  factory_1.factory.createTypeReferenceNode("ArrayBufferLike"),
17
46
  ]);
47
+ /**
48
+ * Returns the type of a binary response: `ReadableStream` of its chunks.
49
+ *
50
+ * @evidence contracts/common.md#principled-implementation A binary response is streamed, not read into memory.
51
+ * @evidence contracts/common.md#clear-and-simple-design One node.
52
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The chunk type is shared.
53
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
54
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.binaryResponse composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
55
+ */
18
56
  SdkAliasCollection.binaryResponse = () => factory_1.factory.createTypeReferenceNode("ReadableStream", [SdkAliasCollection.binaryChunk()]);
57
+ /**
58
+ * Returns the type node of a metadata.
59
+ *
60
+ * @evidence contracts/common.md#principled-implementation The metadata is written by the type programmer, so the result is the DTO the clone declares.
61
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
62
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It shares the type writer.
63
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
64
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.from composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
65
+ */
19
66
  SdkAliasCollection.from = (project) => (importer) => (metadata) => SdkTypeProgrammer_1.SdkTypeProgrammer.write(project)(importer)(metadata);
67
+ /**
68
+ * Returns the object type of a route's keyword parameters, each with the
69
+ * description of its parameter or its `@param` tag.
70
+ *
71
+ * @evidence contracts/common.md#principled-implementation The entries are the route's path, query, and body parameters, optional where the metadata is, without prefix.
72
+ * @evidence contracts/common.md#clear-and-simple-design One map over the entries.
73
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A parameter with a description carries it as a comment.
74
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
75
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.httpProps composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
76
+ */
20
77
  SdkAliasCollection.httpProps = (project) => (importer) => (route) => factory_1.factory.createTypeLiteralNode(SdkHttpParameterProgrammer_1.SdkHttpParameterProgrammer.getEntries({
21
78
  project,
22
79
  importer,
@@ -41,15 +98,35 @@ var SdkAliasCollection;
41
98
  : [signature];
42
99
  })
43
100
  .flat());
44
- SdkAliasCollection.websocketProps = (route) => factory_1.factory.createTypeLiteralNode([
101
+ /**
102
+ * Returns the object type of a WebSocket route's keyword parameters: its path
103
+ * parameters, its query, and its provider.
104
+ *
105
+ * @evidence contracts/common.md#principled-implementation The keys are the names decided by the parameter programmer, so the type and the function agree.
106
+ * @evidence contracts/common.md#clear-and-simple-design One literal.
107
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The names are shared.
108
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
109
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.websocketProps composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
110
+ */
111
+ SdkAliasCollection.websocketProps = (route, names) => factory_1.factory.createTypeLiteralNode([
45
112
  ...route.pathParameters.map((p) => factory_1.factory.createPropertySignature(undefined, p.name, undefined, SdkAliasCollection.name(p))),
46
113
  ...(route.query
47
114
  ? [
48
- factory_1.factory.createPropertySignature(undefined, "query", undefined, factory_1.factory.createTypeReferenceNode("Query")),
115
+ factory_1.factory.createPropertySignature(undefined, names.query, undefined, factory_1.factory.createTypeReferenceNode("Query")),
49
116
  ]
50
117
  : []),
51
- factory_1.factory.createPropertySignature(undefined, "provider", undefined, factory_1.factory.createTypeReferenceNode("Provider")),
118
+ factory_1.factory.createPropertySignature(undefined, names.provider, undefined, factory_1.factory.createTypeReferenceNode("Provider")),
52
119
  ]);
120
+ /**
121
+ * Returns the type of a route's headers: its reflected name, or the
122
+ * metadata's type under `clone`.
123
+ *
124
+ * @evidence contracts/common.md#principled-implementation The source follows the `clone` setting.
125
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
126
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The choice is made on one flag.
127
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
128
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.headers composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
129
+ */
53
130
  SdkAliasCollection.headers = (project) => (importer) => (param) => {
54
131
  if (project.config.clone === true)
55
132
  return SdkAliasCollection.from(project)(importer)(param.metadata);
@@ -63,6 +140,16 @@ var SdkAliasCollection;
63
140
  name: "Resolved",
64
141
  }), [type]);
65
142
  };
143
+ /**
144
+ * Returns the type of a route's query: its metadata under `clone`, otherwise
145
+ * its reflected type wrapped in Resolved unless primitive conversion is off.
146
+ *
147
+ * @evidence contracts/common.md#principled-implementation Clone mode uses the resolved metadata graph; source mode uses the declared type with the configured Resolved conversion.
148
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
149
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The choice is made on one flag.
150
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
151
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.query composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
152
+ */
66
153
  SdkAliasCollection.query = (project) => (importer) => (param) => {
67
154
  if (project.config.clone === true)
68
155
  return SdkAliasCollection.from(project)(importer)(param.metadata);
@@ -76,6 +163,16 @@ var SdkAliasCollection;
76
163
  name: "Resolved",
77
164
  }), [type]);
78
165
  };
166
+ /**
167
+ * Returns the type of a route's body: a form data input for a multipart body,
168
+ * and otherwise the reflected name or the metadata's type under `clone`.
169
+ *
170
+ * @evidence contracts/common.md#principled-implementation The multipart body is an input of files and fields, not the declared class.
171
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
172
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The cases are the content types.
173
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
174
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.body composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
175
+ */
79
176
  SdkAliasCollection.body = (project) => (importer) => (param) => {
80
177
  if (project.config.clone === true) {
81
178
  const type = SdkAliasCollection.from(project)(importer)(param.metadata);
@@ -97,9 +194,20 @@ var SdkAliasCollection;
97
194
  : "Resolved",
98
195
  }), [type]);
99
196
  };
197
+ /**
198
+ * Returns the type of a route's output: the success and every exception as a
199
+ * union of `IPropagation` members, or the success body alone when propagation
200
+ * is off.
201
+ *
202
+ * @evidence contracts/common.md#principled-implementation Status keys retain their declared numeric or range spelling for IPropagation to expand. Source success types follow their content type, while declared exceptions use JSON Primitive conversion independently of the success media type; primitive:false preserves declared source types.
203
+ * @evidence contracts/common.md#clear-and-simple-design One function of two branches.
204
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The exceptions are the declared ones.
205
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
206
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.response composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
207
+ */
100
208
  SdkAliasCollection.response = (project) => (importer) => (route) => {
101
209
  var _a;
102
- const schema = (p) => (0, legacy_1.sizeOf)(p.metadata) === 0
210
+ const schema = (p, json) => (0, legacy_1.sizeOf)(p.metadata) === 0
103
211
  ? TypeFactory_1.TypeFactory.keyword("void")
104
212
  : project.config.clone === true
105
213
  ? SdkAliasCollection.from(project)(importer)(p.metadata)
@@ -108,15 +216,13 @@ var SdkAliasCollection;
108
216
  file: "typia",
109
217
  declaration: true,
110
218
  type: "element",
111
- name: route.success.contentType === "application/json" ||
112
- route.success.encrypted === true
113
- ? "Primitive"
114
- : "Resolved",
219
+ name: json ? "Primitive" : "Resolved",
115
220
  }), [SdkAliasCollection.name(p)])
116
221
  : SdkAliasCollection.name(p);
117
222
  const success = route.success.binary === true
118
223
  ? SdkAliasCollection.binaryResponse()
119
- : schema(route.success);
224
+ : schema(route.success, route.success.contentType === "application/json" ||
225
+ route.success.encrypted === true);
120
226
  if (project.config.propagate !== true)
121
227
  return success;
122
228
  const branches = [
@@ -126,7 +232,7 @@ var SdkAliasCollection;
126
232
  },
127
233
  ...Object.entries(route.exceptions).map(([status, value]) => ({
128
234
  status,
129
- type: schema(value),
235
+ type: schema(value, true),
130
236
  })),
131
237
  ];
132
238
  return factory_1.factory.createTypeReferenceNode(importer.external({
@@ -135,7 +241,11 @@ var SdkAliasCollection;
135
241
  type: "element",
136
242
  name: "IPropagation",
137
243
  }), [
138
- factory_1.factory.createTypeLiteralNode(branches.map((b) => factory_1.factory.createPropertySignature(undefined, factory_1.factory.createNumericLiteral(b.status), undefined, b.type))),
244
+ factory_1.factory.createTypeLiteralNode(branches.map((b) => factory_1.factory.createPropertySignature(undefined,
245
+ // a status range like "4XX" is no numeric literal
246
+ /^\d+$/.test(b.status)
247
+ ? factory_1.factory.createNumericLiteral(b.status)
248
+ : factory_1.factory.createStringLiteral(b.status), undefined, b.type))),
139
249
  ...(route.success.status
140
250
  ? [
141
251
  factory_1.factory.createLiteralTypeNode(factory_1.factory.createNumericLiteral(route.success.status)),
@@ -143,6 +253,17 @@ var SdkAliasCollection;
143
253
  : []),
144
254
  ]);
145
255
  };
256
+ /**
257
+ * Returns the type of the success body: a stream for a binary response, the
258
+ * reflected type for a plain one, and its primitive form for a JSON
259
+ * response.
260
+ *
261
+ * @evidence contracts/common.md#principled-implementation The route's metadata decides between the branches.
262
+ * @evidence contracts/common.md#clear-and-simple-design One function.
263
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The branches are the response kinds.
264
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
265
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.responseBody composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
266
+ */
146
267
  SdkAliasCollection.responseBody = (project) => (importer) => (route) => SdkAliasCollection.response(Object.assign(Object.assign({}, project), { config: Object.assign(Object.assign({}, project.config), { propagate: false }) }))(importer)(route);
147
268
  const formDataInput = (importer) => (type) => factory_1.factory.createTypeReferenceNode(importer.external({
148
269
  file: "@nestia/fetcher",
@@ -1 +1 @@
1
- {"version":3,"file":"SdkAliasCollection.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkAliasCollection.ts"],"names":[],"mappings":";;;AAAA,2CAKuB;AAEvB,6DAA0D;AAC1D,kDAA+D;AAM/D,+CAA4C;AAE5C,6EAA0E;AAC1E,2DAAwD;AAExD,IAAiB,kBAAkB,CA+PlC;AA/PD,WAAiB,kBAAkB;IACpB,uBAAI,GAAG,CAAC,EAAE,IAAI,EAA0B,EAAY,EAAE,CACjE,iBAAO,CAAC,uBAAuB,CAC7B,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,aAAa;QAChB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QAClD,CAAC,CAAC,SAAS,CACd,CAAC;IAES,8BAAW,GAAG,GAAa,EAAE,CACxC,i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AAuB,CAC7B,SAAS;YACT,kDAAkD;YAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;gBACpB,CAAC,CAAC,iBAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC;gBACxC,CAAC,CAAC,iBAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,EACzC,SAAS,EACT,CAAC,CAAC,IAAI,CACP,CACF,CACF;YACD,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;gBACtB,CAAC,CAAC;oBACE,iBAAO,CAAC,qBAAqB,CAC3B,iBAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CACnD;iBACF;gBACH,CAAC,CAAC,EAAE,CAAC;SACR,CACF,CAAC;IACJ,CAAC,CAAC;IAEJ;;;;;;;;;;OAUG;IACU,+BAAY,GACvB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,KAAsB,EAAY,EAAE,CACnC,2BAAQ,iCACH,OAAO,KACV,MAAM,kCACD,OAAO,CAAC,MAAM,KACjB,SAAS,EAAE,KAAK,OAElB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;IAExB,MAAM,aAAa,GAAG,CAAC,QAA0B,EAAE,EAAE,CAAC,CAAC,IAAc,EAAE,EAAE,CACvE,iBAAO,CAAC,uBAAuB,CAC7B,QAAQ,CAAC,QAAQ,CAAC;QAChB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,eAAe;KACtB,CAAC,EACF,CAAC,IAAI,CAAC,CACP,CAAC;AACN,CAAC,EArXgB,kBAAkB,aAAlB,kBAAkB,GAAlB,kBAAkB,QAqXlC"}
@@ -1,5 +1,24 @@
1
1
  import { INestiaConfig } from "../../INestiaConfig";
2
+ /**
3
+ * Composes the npm package of the SDK in the distribution directory.
4
+ *
5
+ * @evidence contracts/common.md#principled-implementation The namespace copies the bundle, fills its paths in, and installs the dependencies at the versions the project uses.
6
+ * @evidence contracts/common.md#clear-and-simple-design One public function and the private steps.
7
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Each filesystem step resolves against the distribution directory; no process-global directory or foreign method is changed.
8
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
9
+ * @evidence contracts/portability.md#os-neutral-implementation Native paths use path.relative/path.join and generated paths use slash separators. npm receives an argument vector and an explicit cwd. POSIX launches npm directly; Windows launches the npm-cli.js shipped beside the first npm.cmd on PATH through Node because a cmd shim itself requires shell interpretation. A nonstandard Windows npm shim lacking that adjacent npm installation is rejected explicitly.
10
+ */
2
11
  export declare namespace SdkDistributionComposer {
12
+ /**
13
+ * Prepares the distribution package once: files, paths, and dependencies, and
14
+ * does nothing when the package is already configured.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation The package counts as configured when it holds `@nestia/fetcher`, which is installed last with its peers, so an interrupted setup runs again. The caller directory is captured once, and every output path and package-manager cwd is explicit.
17
+ * @evidence contracts/common.md#clear-and-simple-design One function of sequential steps.
18
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No process-global directory is changed, so independent compositions retain their own destinations.
19
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
20
+ * @evidence contracts/portability.md#os-neutral-implementation Existence of the two package files is the filesystem's own answer, and the bundle files are copied over any file of the same name in a distribution directory that is not yet configured, so an interrupted setup repeats the copy.
21
+ */
3
22
  const compose: (props: {
4
23
  config: INestiaConfig;
5
24
  mcp: boolean;