@techspokes/typescript-wsdl-client 1.1.3 → 1.1.5

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 (360) hide show
  1. package/README.md +50 -1
  2. package/dist/app/generateApp.d.ts.map +1 -1
  3. package/dist/app/generateApp.js +8 -6
  4. package/dist/cli.js +49 -5
  5. package/dist/client/checkedDirectRuntime.d.ts +59 -0
  6. package/dist/client/checkedDirectRuntime.d.ts.map +1 -0
  7. package/dist/client/checkedDirectRuntime.js +23 -0
  8. package/dist/client/directClientRuntime.d.ts +49 -0
  9. package/dist/client/directClientRuntime.d.ts.map +1 -0
  10. package/dist/client/directClientRuntime.js +112 -0
  11. package/dist/client/directClientVersion.d.ts +4 -0
  12. package/dist/client/directClientVersion.d.ts.map +1 -0
  13. package/dist/client/directClientVersion.js +3 -0
  14. package/dist/client/generateClient.d.ts.map +1 -1
  15. package/dist/client/generateClient.js +22 -9
  16. package/dist/client/generateDirectClient.d.ts +14 -0
  17. package/dist/client/generateDirectClient.d.ts.map +1 -0
  18. package/dist/client/generateDirectClient.js +136 -0
  19. package/dist/compiler/buildCanonicalGraph.d.ts +7 -0
  20. package/dist/compiler/buildCanonicalGraph.d.ts.map +1 -0
  21. package/dist/compiler/buildCanonicalGraph.js +381 -0
  22. package/dist/compiler/canonicalGraph.d.ts +198 -0
  23. package/dist/compiler/canonicalGraph.d.ts.map +1 -0
  24. package/dist/compiler/canonicalGraph.js +37 -0
  25. package/dist/compiler/catalogErrors.d.ts +18 -0
  26. package/dist/compiler/catalogErrors.d.ts.map +1 -0
  27. package/dist/compiler/catalogErrors.js +86 -0
  28. package/dist/compiler/catalogProvenance.d.ts +15 -0
  29. package/dist/compiler/catalogProvenance.d.ts.map +1 -0
  30. package/dist/compiler/catalogProvenance.js +229 -0
  31. package/dist/compiler/checkedAssessment.d.ts +91 -0
  32. package/dist/compiler/checkedAssessment.d.ts.map +1 -0
  33. package/dist/compiler/checkedAssessment.js +300 -0
  34. package/dist/compiler/checkedSourcePreparation.d.ts +35 -0
  35. package/dist/compiler/checkedSourcePreparation.d.ts.map +1 -0
  36. package/dist/compiler/checkedSourcePreparation.js +131 -0
  37. package/dist/compiler/complexTypeContent.d.ts +59 -0
  38. package/dist/compiler/complexTypeContent.d.ts.map +1 -0
  39. package/dist/compiler/complexTypeContent.js +558 -0
  40. package/dist/compiler/composeCanonicalGraph.d.ts +69 -0
  41. package/dist/compiler/composeCanonicalGraph.d.ts.map +1 -0
  42. package/dist/compiler/composeCanonicalGraph.js +252 -0
  43. package/dist/compiler/dataOwnership.d.ts +22 -0
  44. package/dist/compiler/dataOwnership.d.ts.map +1 -0
  45. package/dist/compiler/dataOwnership.js +157 -0
  46. package/dist/compiler/datatypeValues.d.ts +47 -0
  47. package/dist/compiler/datatypeValues.d.ts.map +1 -0
  48. package/dist/compiler/datatypeValues.js +275 -0
  49. package/dist/compiler/directCodec.d.ts +59 -0
  50. package/dist/compiler/directCodec.d.ts.map +1 -0
  51. package/dist/compiler/directCodec.js +192 -0
  52. package/dist/compiler/directExecutionPolicy.d.ts +10 -0
  53. package/dist/compiler/directExecutionPolicy.d.ts.map +1 -0
  54. package/dist/compiler/directExecutionPolicy.js +17 -0
  55. package/dist/compiler/directOperation.d.ts +72 -0
  56. package/dist/compiler/directOperation.d.ts.map +1 -0
  57. package/dist/compiler/directOperation.js +282 -0
  58. package/dist/compiler/directSoap.d.ts +42 -0
  59. package/dist/compiler/directSoap.d.ts.map +1 -0
  60. package/dist/compiler/directSoap.js +298 -0
  61. package/dist/compiler/directSoapSource.d.ts +15 -0
  62. package/dist/compiler/directSoapSource.d.ts.map +1 -0
  63. package/dist/compiler/directSoapSource.js +86 -0
  64. package/dist/compiler/directSourceCapsule.d.ts +97 -0
  65. package/dist/compiler/directSourceCapsule.d.ts.map +1 -0
  66. package/dist/compiler/directSourceCapsule.js +305 -0
  67. package/dist/compiler/directStructure.d.ts +51 -0
  68. package/dist/compiler/directStructure.d.ts.map +1 -0
  69. package/dist/compiler/directStructure.js +252 -0
  70. package/dist/compiler/directStructurePlan.d.ts +16 -0
  71. package/dist/compiler/directStructurePlan.d.ts.map +1 -0
  72. package/dist/compiler/directStructurePlan.js +58 -0
  73. package/dist/compiler/directValues.d.ts +69 -0
  74. package/dist/compiler/directValues.d.ts.map +1 -0
  75. package/dist/compiler/directValues.js +282 -0
  76. package/dist/compiler/finiteRe01Verification.d.ts +140 -0
  77. package/dist/compiler/finiteRe01Verification.d.ts.map +1 -0
  78. package/dist/compiler/finiteRe01Verification.js +830 -0
  79. package/dist/compiler/graphTraversal.d.ts +11 -0
  80. package/dist/compiler/graphTraversal.d.ts.map +1 -0
  81. package/dist/compiler/graphTraversal.js +37 -0
  82. package/dist/compiler/hypotheticalScopedIdentity.d.ts +23 -0
  83. package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +1 -0
  84. package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
  85. package/dist/compiler/occurrenceAnalysis.d.ts +65 -0
  86. package/dist/compiler/occurrenceAnalysis.d.ts.map +1 -0
  87. package/dist/compiler/occurrenceAnalysis.js +300 -0
  88. package/dist/compiler/originalSourceMembership.d.ts +6 -0
  89. package/dist/compiler/originalSourceMembership.d.ts.map +1 -0
  90. package/dist/compiler/originalSourceMembership.js +31 -0
  91. package/dist/compiler/particleAttribution.d.ts +17 -0
  92. package/dist/compiler/particleAttribution.d.ts.map +1 -0
  93. package/dist/compiler/particleAttribution.js +474 -0
  94. package/dist/compiler/particleDeclarationConsistency.d.ts +24 -0
  95. package/dist/compiler/particleDeclarationConsistency.d.ts.map +1 -0
  96. package/dist/compiler/particleDeclarationConsistency.js +197 -0
  97. package/dist/compiler/particleExtension.d.ts +22 -0
  98. package/dist/compiler/particleExtension.d.ts.map +1 -0
  99. package/dist/compiler/particleExtension.js +119 -0
  100. package/dist/compiler/particleLocalAssessment.d.ts +20 -0
  101. package/dist/compiler/particleLocalAssessment.d.ts.map +1 -0
  102. package/dist/compiler/particleLocalAssessment.js +92 -0
  103. package/dist/compiler/particleRestriction.d.ts +24 -0
  104. package/dist/compiler/particleRestriction.d.ts.map +1 -0
  105. package/dist/compiler/particleRestriction.js +489 -0
  106. package/dist/compiler/particleSemanticView.d.ts +50 -0
  107. package/dist/compiler/particleSemanticView.d.ts.map +1 -0
  108. package/dist/compiler/particleSemanticView.js +297 -0
  109. package/dist/compiler/particleWildcardRelation.d.ts +88 -0
  110. package/dist/compiler/particleWildcardRelation.d.ts.map +1 -0
  111. package/dist/compiler/particleWildcardRelation.js +143 -0
  112. package/dist/compiler/re01CandidateCorrespondence.d.ts +64 -0
  113. package/dist/compiler/re01CandidateCorrespondence.d.ts.map +1 -0
  114. package/dist/compiler/re01CandidateCorrespondence.js +572 -0
  115. package/dist/compiler/re01TypeProperties.d.ts +71 -0
  116. package/dist/compiler/re01TypeProperties.d.ts.map +1 -0
  117. package/dist/compiler/re01TypeProperties.js +120 -0
  118. package/dist/compiler/re01TypePropertyValidation.d.ts +23 -0
  119. package/dist/compiler/re01TypePropertyValidation.d.ts.map +1 -0
  120. package/dist/compiler/re01TypePropertyValidation.js +161 -0
  121. package/dist/compiler/resolveCanonicalGraph.d.ts +38 -0
  122. package/dist/compiler/resolveCanonicalGraph.d.ts.map +1 -0
  123. package/dist/compiler/resolveCanonicalGraph.js +170 -0
  124. package/dist/compiler/scalarSchemaAssessment.d.ts +425 -0
  125. package/dist/compiler/scalarSchemaAssessment.d.ts.map +1 -0
  126. package/dist/compiler/scalarSchemaAssessment.js +5198 -0
  127. package/dist/compiler/schemaAttributeGroupProperties.d.ts +17 -0
  128. package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +1 -0
  129. package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
  130. package/dist/compiler/schemaAttributeProperties.d.ts +10 -0
  131. package/dist/compiler/schemaAttributeProperties.d.ts.map +1 -0
  132. package/dist/compiler/schemaAttributeProperties.js +11 -0
  133. package/dist/compiler/schemaAttributeUses.d.ts +90 -0
  134. package/dist/compiler/schemaAttributeUses.d.ts.map +1 -0
  135. package/dist/compiler/schemaAttributeUses.js +725 -0
  136. package/dist/compiler/schemaBinaryWordReconstruction.d.ts +10 -0
  137. package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +1 -0
  138. package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
  139. package/dist/compiler/schemaBuiltinFacets.d.ts +14 -0
  140. package/dist/compiler/schemaBuiltinFacets.d.ts.map +1 -0
  141. package/dist/compiler/schemaBuiltinFacets.js +51 -0
  142. package/dist/compiler/schemaCalendarImages.d.ts +8 -0
  143. package/dist/compiler/schemaCalendarImages.d.ts.map +1 -0
  144. package/dist/compiler/schemaCalendarImages.js +204 -0
  145. package/dist/compiler/schemaCalendarLanguage.d.ts +11 -0
  146. package/dist/compiler/schemaCalendarLanguage.d.ts.map +1 -0
  147. package/dist/compiler/schemaCalendarLanguage.js +227 -0
  148. package/dist/compiler/schemaComponentEquality.d.ts +28 -0
  149. package/dist/compiler/schemaComponentEquality.d.ts.map +1 -0
  150. package/dist/compiler/schemaComponentEquality.js +446 -0
  151. package/dist/compiler/schemaConstructionAssessment.d.ts +46 -0
  152. package/dist/compiler/schemaConstructionAssessment.d.ts.map +1 -0
  153. package/dist/compiler/schemaConstructionAssessment.js +663 -0
  154. package/dist/compiler/schemaDatatypeValues.d.ts +4 -0
  155. package/dist/compiler/schemaDatatypeValues.d.ts.map +1 -0
  156. package/dist/compiler/schemaDatatypeValues.js +2 -0
  157. package/dist/compiler/schemaDecimalLanguage.d.ts +7 -0
  158. package/dist/compiler/schemaDecimalLanguage.d.ts.map +1 -0
  159. package/dist/compiler/schemaDecimalLanguage.js +102 -0
  160. package/dist/compiler/schemaDeclarationPrimitives.d.ts +34 -0
  161. package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +1 -0
  162. package/dist/compiler/schemaDeclarationPrimitives.js +194 -0
  163. package/dist/compiler/schemaDocumentSyntax.d.ts +55 -0
  164. package/dist/compiler/schemaDocumentSyntax.d.ts.map +1 -0
  165. package/dist/compiler/schemaDocumentSyntax.js +294 -0
  166. package/dist/compiler/schemaDurationLanguage.d.ts +11 -0
  167. package/dist/compiler/schemaDurationLanguage.d.ts.map +1 -0
  168. package/dist/compiler/schemaDurationLanguage.js +170 -0
  169. package/dist/compiler/schemaElementProperties.d.ts +16 -0
  170. package/dist/compiler/schemaElementProperties.d.ts.map +1 -0
  171. package/dist/compiler/schemaElementProperties.js +23 -0
  172. package/dist/compiler/schemaEndpointWordCapacity.d.ts +36 -0
  173. package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +1 -0
  174. package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
  175. package/dist/compiler/schemaExactCalendar.d.ts +73 -0
  176. package/dist/compiler/schemaExactCalendar.d.ts.map +1 -0
  177. package/dist/compiler/schemaExactCalendar.js +264 -0
  178. package/dist/compiler/schemaFacetAnnotation.d.ts +32 -0
  179. package/dist/compiler/schemaFacetAnnotation.d.ts.map +1 -0
  180. package/dist/compiler/schemaFacetAnnotation.js +199 -0
  181. package/dist/compiler/schemaGeneratedScalarShape.d.ts +35 -0
  182. package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +1 -0
  183. package/dist/compiler/schemaGeneratedScalarShape.js +176 -0
  184. package/dist/compiler/schemaIdentityConstraints.d.ts +73 -0
  185. package/dist/compiler/schemaIdentityConstraints.d.ts.map +1 -0
  186. package/dist/compiler/schemaIdentityConstraints.js +362 -0
  187. package/dist/compiler/schemaIeeeLanguage.d.ts +43 -0
  188. package/dist/compiler/schemaIeeeLanguage.d.ts.map +1 -0
  189. package/dist/compiler/schemaIeeeLanguage.js +759 -0
  190. package/dist/compiler/schemaIntegerImages.d.ts +11 -0
  191. package/dist/compiler/schemaIntegerImages.d.ts.map +1 -0
  192. package/dist/compiler/schemaIntegerImages.js +113 -0
  193. package/dist/compiler/schemaLexicalPredicates.d.ts +29 -0
  194. package/dist/compiler/schemaLexicalPredicates.d.ts.map +1 -0
  195. package/dist/compiler/schemaLexicalPredicates.js +63 -0
  196. package/dist/compiler/schemaNotationProperties.d.ts +32 -0
  197. package/dist/compiler/schemaNotationProperties.d.ts.map +1 -0
  198. package/dist/compiler/schemaNotationProperties.js +84 -0
  199. package/dist/compiler/schemaNumericImageConditions.d.ts +24 -0
  200. package/dist/compiler/schemaNumericImageConditions.d.ts.map +1 -0
  201. package/dist/compiler/schemaNumericImageConditions.js +66 -0
  202. package/dist/compiler/schemaParticleWildcardProperties.d.ts +20 -0
  203. package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +1 -0
  204. package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
  205. package/dist/compiler/schemaPattern.d.ts +1062 -0
  206. package/dist/compiler/schemaPattern.d.ts.map +1 -0
  207. package/dist/compiler/schemaPattern.js +581 -0
  208. package/dist/compiler/schemaRegularLanguage.d.ts +67 -0
  209. package/dist/compiler/schemaRegularLanguage.d.ts.map +1 -0
  210. package/dist/compiler/schemaRegularLanguage.js +1166 -0
  211. package/dist/compiler/schemaScalarContext.d.ts +81 -0
  212. package/dist/compiler/schemaScalarContext.d.ts.map +1 -0
  213. package/dist/compiler/schemaScalarContext.js +78 -0
  214. package/dist/compiler/schemaScalarKernel.d.ts +182 -0
  215. package/dist/compiler/schemaScalarKernel.d.ts.map +1 -0
  216. package/dist/compiler/schemaScalarKernel.js +391 -0
  217. package/dist/compiler/schemaScalarWitnesses.d.ts +6 -0
  218. package/dist/compiler/schemaScalarWitnesses.d.ts.map +1 -0
  219. package/dist/compiler/schemaScalarWitnesses.js +118 -0
  220. package/dist/compiler/schemaSimpleTypeProperties.d.ts +95 -0
  221. package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +1 -0
  222. package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
  223. package/dist/compiler/schemaSourceGrammar.d.ts +27 -0
  224. package/dist/compiler/schemaSourceGrammar.d.ts.map +1 -0
  225. package/dist/compiler/schemaSourceGrammar.js +290 -0
  226. package/dist/compiler/schemaSourceLexical.d.ts +4 -0
  227. package/dist/compiler/schemaSourceLexical.d.ts.map +1 -0
  228. package/dist/compiler/schemaSourceLexical.js +12 -0
  229. package/dist/compiler/schemaSourceValues.d.ts +51 -0
  230. package/dist/compiler/schemaSourceValues.d.ts.map +1 -0
  231. package/dist/compiler/schemaSourceValues.js +225 -0
  232. package/dist/compiler/schemaSourceWildcards.d.ts +28 -0
  233. package/dist/compiler/schemaSourceWildcards.d.ts.map +1 -0
  234. package/dist/compiler/schemaSourceWildcards.js +247 -0
  235. package/dist/compiler/schemaSymbolicSequences.d.ts +16 -0
  236. package/dist/compiler/schemaSymbolicSequences.d.ts.map +1 -0
  237. package/dist/compiler/schemaSymbolicSequences.js +99 -0
  238. package/dist/compiler/schemaSymbolicValueSets.d.ts +32 -0
  239. package/dist/compiler/schemaSymbolicValueSets.d.ts.map +1 -0
  240. package/dist/compiler/schemaSymbolicValueSets.js +149 -0
  241. package/dist/compiler/schemaSyntaxAssessment.d.ts +25 -0
  242. package/dist/compiler/schemaSyntaxAssessment.d.ts.map +1 -0
  243. package/dist/compiler/schemaSyntaxAssessment.js +361 -0
  244. package/dist/compiler/schemaTemporalAliases.d.ts +6 -0
  245. package/dist/compiler/schemaTemporalAliases.d.ts.map +1 -0
  246. package/dist/compiler/schemaTemporalAliases.js +195 -0
  247. package/dist/compiler/schemaTokenImages.d.ts +9 -0
  248. package/dist/compiler/schemaTokenImages.d.ts.map +1 -0
  249. package/dist/compiler/schemaTokenImages.js +142 -0
  250. package/dist/compiler/schemaTypeIdentity.d.ts +39 -0
  251. package/dist/compiler/schemaTypeIdentity.d.ts.map +1 -0
  252. package/dist/compiler/schemaTypeIdentity.js +78 -0
  253. package/dist/compiler/schemaTypeRelations.d.ts +38 -0
  254. package/dist/compiler/schemaTypeRelations.d.ts.map +1 -0
  255. package/dist/compiler/schemaTypeRelations.js +576 -0
  256. package/dist/compiler/schemaUri.d.ts +13 -0
  257. package/dist/compiler/schemaUri.d.ts.map +1 -0
  258. package/dist/compiler/schemaUri.js +103 -0
  259. package/dist/compiler/schemaValueContext.d.ts +26 -0
  260. package/dist/compiler/schemaValueContext.d.ts.map +1 -0
  261. package/dist/compiler/schemaValueContext.js +1 -0
  262. package/dist/compiler/schemaValueImages.d.ts +10 -0
  263. package/dist/compiler/schemaValueImages.d.ts.map +1 -0
  264. package/dist/compiler/schemaValueImages.js +142 -0
  265. package/dist/compiler/schemaValueSequences.d.ts +15 -0
  266. package/dist/compiler/schemaValueSequences.d.ts.map +1 -0
  267. package/dist/compiler/schemaValueSequences.js +19 -0
  268. package/dist/compiler/semanticBudget.d.ts +50 -0
  269. package/dist/compiler/semanticBudget.d.ts.map +1 -0
  270. package/dist/compiler/semanticBudget.js +178 -0
  271. package/dist/compiler/semanticCatalog.d.ts +122 -0
  272. package/dist/compiler/semanticCatalog.d.ts.map +1 -0
  273. package/dist/compiler/semanticCatalog.js +160 -0
  274. package/dist/compiler/semanticContext.d.ts +172 -0
  275. package/dist/compiler/semanticContext.d.ts.map +1 -0
  276. package/dist/compiler/semanticContext.js +1168 -0
  277. package/dist/compiler/semanticTypeDependencies.d.ts +8 -0
  278. package/dist/compiler/semanticTypeDependencies.d.ts.map +1 -0
  279. package/dist/compiler/semanticTypeDependencies.js +64 -0
  280. package/dist/compiler/semanticTypeReference.d.ts +24 -0
  281. package/dist/compiler/semanticTypeReference.d.ts.map +1 -0
  282. package/dist/compiler/semanticTypeReference.js +36 -0
  283. package/dist/compiler/shapeResolver.d.ts +1 -0
  284. package/dist/compiler/shapeResolver.d.ts.map +1 -1
  285. package/dist/compiler/shapeResolver.js +7 -9
  286. package/dist/compiler/sourceSchemaBinding.d.ts +26 -0
  287. package/dist/compiler/sourceSchemaBinding.d.ts.map +1 -0
  288. package/dist/compiler/sourceSchemaBinding.js +39 -0
  289. package/dist/compiler/structuralCompanions.d.ts +16 -0
  290. package/dist/compiler/structuralCompanions.d.ts.map +1 -0
  291. package/dist/compiler/structuralCompanions.js +232 -0
  292. package/dist/compiler/validateSemanticGraph.d.ts +5 -0
  293. package/dist/compiler/validateSemanticGraph.d.ts.map +1 -0
  294. package/dist/compiler/validateSemanticGraph.js +376 -0
  295. package/dist/compiler/wildcardAlgebra.d.ts +26 -0
  296. package/dist/compiler/wildcardAlgebra.d.ts.map +1 -0
  297. package/dist/compiler/wildcardAlgebra.js +155 -0
  298. package/dist/gateway/generateGateway.d.ts.map +1 -1
  299. package/dist/gateway/generateGateway.js +2 -2
  300. package/dist/index.d.ts +3 -0
  301. package/dist/index.d.ts.map +1 -1
  302. package/dist/index.js +2 -0
  303. package/dist/loader/orderedSyntax.d.ts +77 -0
  304. package/dist/loader/orderedSyntax.d.ts.map +1 -0
  305. package/dist/loader/orderedSyntax.js +202 -0
  306. package/dist/loader/resolutionDepth.d.ts +7 -0
  307. package/dist/loader/resolutionDepth.d.ts.map +1 -0
  308. package/dist/loader/resolutionDepth.js +65 -0
  309. package/dist/loader/schemaInput.d.ts +53 -0
  310. package/dist/loader/schemaInput.d.ts.map +1 -0
  311. package/dist/loader/schemaInput.js +212 -0
  312. package/dist/loader/schemaResources.d.ts +59 -0
  313. package/dist/loader/schemaResources.d.ts.map +1 -0
  314. package/dist/loader/schemaResources.js +292 -0
  315. package/dist/openapi/generateOpenAPI.d.ts.map +1 -1
  316. package/dist/openapi/generateOpenAPI.js +2 -2
  317. package/dist/test/generateTests.d.ts.map +1 -1
  318. package/dist/test/generateTests.js +2 -2
  319. package/dist/util/xmlWhitespace.d.ts +3 -0
  320. package/dist/util/xmlWhitespace.d.ts.map +1 -0
  321. package/dist/util/xmlWhitespace.js +4 -0
  322. package/docs/README.md +14 -1
  323. package/docs/architecture.md +9 -0
  324. package/docs/cli-reference.md +21 -1
  325. package/docs/content-model-analysis.md +92 -0
  326. package/docs/content-model-baseline.md +121 -0
  327. package/docs/content-model-catalog.md +116 -0
  328. package/docs/content-model-companions.md +90 -0
  329. package/docs/content-model-composition.md +103 -0
  330. package/docs/content-model-decisions.md +79 -0
  331. package/docs/content-model-gateway-feasibility.md +169 -0
  332. package/docs/content-model-graph.md +121 -0
  333. package/docs/content-model-loading.md +163 -0
  334. package/docs/content-model-matching.md +85 -0
  335. package/docs/content-model-readiness.md +144 -0
  336. package/docs/content-model-resolution.md +81 -0
  337. package/docs/content-model-s02-handoff.md +98 -0
  338. package/docs/content-model-s06-au-01.md +425 -0
  339. package/docs/content-model-s06-dt-01.md +386 -0
  340. package/docs/content-model-s06-pw-01.md +350 -0
  341. package/docs/content-model-s06-re-01-resolver-implementation.md +869 -0
  342. package/docs/content-model-s06-re-01-resolver.md +513 -0
  343. package/docs/content-model-s06-re-01-scalar-witnesses.md +1423 -0
  344. package/docs/content-model-s06-re-01-support-reconstruction.md +6337 -0
  345. package/docs/content-model-s06-re-01.md +7477 -0
  346. package/docs/content-model-s06-research-handoff.md +909 -0
  347. package/docs/content-model-shipped-fix.md +83 -0
  348. package/docs/content-model-soap-feasibility.md +165 -0
  349. package/docs/decisions/002-streamable-responses.md +2 -0
  350. package/docs/decisions/003-content-model-contracts.md +280 -0
  351. package/docs/direct-values.md +311 -0
  352. package/docs/generated-code.md +4 -0
  353. package/docs/reference-validation.md +243 -0
  354. package/docs/releases/v1.1.4.md +36 -0
  355. package/docs/releases/v1.1.5.md +38 -0
  356. package/docs/roadmap/README.md +2 -2
  357. package/docs/supported-patterns.md +13 -5
  358. package/package.json +27 -13
  359. package/src/generation/preambles/direct-client/typescript.preamble +3 -0
  360. package/src/runtime/clientStreamMethods.tpl.txt +1 -1
@@ -0,0 +1,282 @@
1
+ import { directLimit, directLoadingLimits } from './directExecutionPolicy.js';
2
+ /** Transient source-owned schema selection. This module grants no runtime admission. */
3
+ import { loadSemanticSchemaInput } from '../loader/schemaInput.js';
4
+ import { SchemaLoadingError, WSDL_NAMESPACE, syntaxAttribute, syntaxElements, isXmlNCName } from '../loader/orderedSyntax.js';
5
+ import { globalId } from './canonicalGraph.js';
6
+ import { createApplicationBudget, DEFAULT_MAX_NODES } from './semanticBudget.js';
7
+ import { qualifyDirectSource } from './checkedSourcePreparation.js';
8
+ const SOAP = 'http://schemas.xmlsoap.org/wsdl/soap/';
9
+ const HTTP = 'http://schemas.xmlsoap.org/soap/http';
10
+ const issued = new WeakMap();
11
+ /** Object identity authenticates the exact issued roots; context IDs and digests do not. */
12
+ export function inspectDirectOperation(contract, expectedContext) {
13
+ const owned = issued.get(contract);
14
+ if (!owned || expectedContext !== undefined && owned.context !== expectedContext)
15
+ throw new TypeError('Unauthenticated or foreign direct operation');
16
+ return owned;
17
+ }
18
+ class Refusal extends Error {
19
+ kind;
20
+ rule;
21
+ constructor(kind, rule) {
22
+ super(rule);
23
+ this.kind = kind;
24
+ this.rule = rule;
25
+ }
26
+ }
27
+ class Cancelled extends Error {
28
+ }
29
+ /** One load, whole-source qualification, explicit selection and publication on one sticky budget. */
30
+ export async function selectDirectOperation(source, selector, options) {
31
+ return selectDirectOperationInRequest(source, selector, options, createApplicationBudget(options.limits));
32
+ }
33
+ /** Private-module composition seam: portable reading and selection share one request. */
34
+ export async function selectDirectOperationInRequest(source, selector, options, budget) {
35
+ const check = () => { if (options.signal?.aborted)
36
+ throw new Cancelled(); budget.chargeWork(); };
37
+ const refuse = (kind, rule) => { throw new Refusal(kind, rule); };
38
+ const failure = (kind, rule) => Object.freeze({ kind, rule, usage: Object.freeze({ ...budget.usage() }) });
39
+ try {
40
+ // Fixed terminal envelope and issuance bookkeeping, before any source work.
41
+ budget.chargeWork(4096);
42
+ check();
43
+ const ownedSelector = budget.freeze(budget.snapshot(selector));
44
+ const name = (value) => value && typeof value.namespace === 'string' && typeof value.local === 'string' && isXmlNCName(value.local);
45
+ if (!name(ownedSelector.portType) || !name(ownedSelector.binding) || typeof ownedSelector.operation !== 'string' || !isXmlNCName(ownedSelector.operation))
46
+ return failure('selection-refused', 'explicit-selector');
47
+ const input = await loadSemanticSchemaInput(source, { ...options.loading, limits: directLoadingLimits(budget, options.loading.limits), signal: options.signal, chargeWork: amount => { check(); budget.chargeWork(amount); } });
48
+ check();
49
+ const result = budget.guard(() => {
50
+ const qualified = qualifyDirectSource(input, { budget, maxNodes: options.limits?.maxNodes ?? directLimit(budget, DEFAULT_MAX_NODES), check });
51
+ if (qualified.kind === 'resource-limit')
52
+ return failure('resource-limit', 'source-qualification');
53
+ if (qualified.kind === 'source-preparation-failed' && qualified.category === 'resource-limit')
54
+ return failure('resource-limit', 'source-preparation');
55
+ if (qualified.kind !== 'qualified-source')
56
+ return failure(qualified.kind === 'source-preparation-failed' && qualified.category === 'invalid-schema' ? 'invalid-schema' : 'inconclusive', 'source-preparation');
57
+ if (!qualified.eligible)
58
+ return failure(qualified.localDisproved || qualified.closure.kind === 'invalid-schema' ? 'invalid-schema' : 'inconclusive', 'whole-source-qualification');
59
+ const { request } = qualified;
60
+ const context = request.actual;
61
+ const children = (node) => {
62
+ check();
63
+ budget.chargeWork(128 + node.children.length * 16 + node.attributes.length * 32);
64
+ for (const a of node.attributes)
65
+ budget.chargeWork(a.value.length * 8 + a.name.local.length * 8 + a.name.namespace.length * 8);
66
+ for (const child of node.children) {
67
+ if (child.kind === 'element')
68
+ budget.chargeWork(16 + child.name.namespace.length * 8 + child.name.local.length * 8);
69
+ }
70
+ return syntaxElements(node);
71
+ };
72
+ const attr = syntaxAttribute;
73
+ const exactly = (node, namespace, local) => {
74
+ const found = children(node).filter(c => c.name.namespace === namespace && c.name.local === local);
75
+ if (found.length !== 1)
76
+ return refuse('selection-refused', `expected-one-${local}`);
77
+ return found[0];
78
+ };
79
+ const shape = (node, allowed) => {
80
+ for (const child of children(node))
81
+ if (!allowed.includes(`${child.name.namespace}#${child.name.local}`))
82
+ refuse('unsupported', 'binding-child-shape');
83
+ for (const child of node.children) {
84
+ if (child.kind !== 'text')
85
+ continue;
86
+ budget.chargeWork(8 + child.value.length * 4);
87
+ if (/[^\t\r\n ]/.test(child.value))
88
+ refuse('unsupported', 'wsdl-text');
89
+ }
90
+ };
91
+ const ws = (local) => `${WSDL_NAMESPACE}#${local}`;
92
+ const soap = (local) => `${SOAP}#${local}`;
93
+ const attrs = (node, allowed) => {
94
+ children(node);
95
+ for (const a of node.attributes)
96
+ if (a.name.namespace !== '' || !allowed.includes(a.name.local))
97
+ refuse('unsupported', 'binding-attribute-shape');
98
+ };
99
+ // Conservative extension policy: only known WSDL 1.1/SOAP 1.1 syntax, even when optional.
100
+ // Documentation payload and XSD syntax are inert here and owned separately.
101
+ budget.chargeWork(64 + input.schemas.length * 32);
102
+ const qualifiedSchemas = new Set(input.schemas.map(schema => schema.syntax));
103
+ const attributes = {
104
+ definitions: ['name', 'targetNamespace'], import: ['namespace', 'location'], types: [], message: ['name'], part: ['name', 'element', 'type'],
105
+ portType: ['name'], operation: ['name', 'parameterOrder'], input: ['name', 'message'], output: ['name', 'message'], fault: ['name', 'message'],
106
+ binding: ['name', 'type'], service: ['name'], port: ['name', 'binding'],
107
+ };
108
+ const soapAttributes = { binding: ['style', 'transport'], operation: ['soapAction', 'style'], body: ['use', 'parts'], fault: ['name', 'use'], address: ['location'] };
109
+ for (const document of input.documents) {
110
+ const stack = [document.root];
111
+ while (stack.length) {
112
+ const node = stack.pop();
113
+ const nested = children(node);
114
+ if (qualifiedSchemas.has(node))
115
+ continue;
116
+ if (node.name.namespace === WSDL_NAMESPACE && node.name.local === 'documentation')
117
+ continue;
118
+ const allowed = node.name.namespace === WSDL_NAMESPACE ? attributes[node.name.local] : node.name.namespace === SOAP ? soapAttributes[node.name.local] : undefined;
119
+ if (!allowed)
120
+ return refuse('unsupported', 'wsdl-extension');
121
+ for (const a of node.attributes) {
122
+ if (a.name.namespace === WSDL_NAMESPACE && a.name.local === 'required' && node.name.namespace === SOAP && ['true', '1', 'false', '0'].includes(a.value))
123
+ continue;
124
+ if (a.name.namespace !== '' || !allowed.includes(a.name.local))
125
+ refuse('unsupported', 'wsdl-attribute');
126
+ if (a.name.local === 'name' && !isXmlNCName(a.value))
127
+ refuse('selection-refused', 'wsdl-name');
128
+ }
129
+ stack.push(...nested);
130
+ }
131
+ }
132
+ const lookup = (id) => {
133
+ check();
134
+ budget.chargeWork(32 + id.length * 4);
135
+ const found = context.lookup(id);
136
+ if (found.kind !== 'found')
137
+ return refuse('selection-refused', 'missing-reference');
138
+ return found.node;
139
+ };
140
+ const wsdl = (role, qname) => {
141
+ budget.chargeWork(128 + qname.local.length * 8 + qname.namespace.length * 8);
142
+ const node = lookup(globalId(role, qname));
143
+ if (node.kind !== 'wsdl' || node.role !== role)
144
+ return refuse('selection-refused', 'wrong-wsdl-role');
145
+ return node;
146
+ };
147
+ const reference = (owner, syntax, attribute) => {
148
+ budget.chargeWork(64 + owner.references.length * (32 + syntax.source.path.length * 4));
149
+ const path = syntax.source.path.slice(owner.syntax.source.path.length) || '/';
150
+ const refs = owner.references.filter(r => r.path === path && r.attribute === attribute);
151
+ if (refs.length !== 1 || refs[0].reference.kind !== 'symbol' || !refs[0].reference.target)
152
+ return refuse('selection-refused', 'missing-reference');
153
+ return lookup(refs[0].reference.target);
154
+ };
155
+ const portType = wsdl('portType', ownedSelector.portType);
156
+ const binding = wsdl('binding', ownedSelector.binding);
157
+ shape(portType.syntax, [ws('operation'), ws('documentation')]);
158
+ if (reference(binding, binding.syntax, 'type') !== portType)
159
+ return refuse('selection-refused', 'binding-portType-mismatch');
160
+ const operation = (owner) => {
161
+ const matches = children(owner.syntax).filter(c => c.name.namespace === WSDL_NAMESPACE && c.name.local === 'operation' && attr(c, 'name') === ownedSelector.operation);
162
+ if (matches.length !== 1)
163
+ return refuse('selection-refused', 'operation-missing-or-overloaded');
164
+ return matches[0];
165
+ };
166
+ const abstract = operation(portType), bound = operation(binding);
167
+ attrs(bound, ['name']);
168
+ shape(binding.syntax, [soap('binding'), ws('operation'), ws('documentation')]);
169
+ const soapBinding = exactly(binding.syntax, SOAP, 'binding');
170
+ const soapOperation = exactly(bound, SOAP, 'operation');
171
+ shape(soapBinding, []);
172
+ shape(soapOperation, []);
173
+ if (!['document', 'rpc'].includes(attr(soapBinding, 'style') ?? 'document'))
174
+ return refuse('unsupported', 'soap-binding-style');
175
+ if (attr(soapBinding, 'transport') !== HTTP)
176
+ return refuse('unsupported', 'soap-transport');
177
+ if ((attr(soapOperation, 'style') ?? attr(soapBinding, 'style') ?? 'document') !== 'document')
178
+ return refuse('unsupported', 'soap-style');
179
+ const action = attr(soapOperation, 'soapAction');
180
+ if (action === undefined)
181
+ return refuse('unsupported', 'soap-action-required');
182
+ shape(abstract, [ws('input'), ws('output'), ws('fault'), ws('documentation')]);
183
+ shape(bound, [soap('operation'), ws('input'), ws('output'), ws('fault'), ws('documentation')]);
184
+ const abstractInput = exactly(abstract, WSDL_NAMESPACE, 'input'), abstractOutput = exactly(abstract, WSDL_NAMESPACE, 'output');
185
+ const sequence = children(abstract).filter(c => c.name.namespace === WSDL_NAMESPACE && ['input', 'output'].includes(c.name.local));
186
+ if (sequence[0] !== abstractInput || sequence[1] !== abstractOutput)
187
+ return refuse('unsupported', 'request-response-required');
188
+ const messageOrder = (node) => {
189
+ const messages = children(node).filter(c => c.name.namespace === WSDL_NAMESPACE && ['input', 'output', 'fault'].includes(c.name.local));
190
+ if (messages[0]?.name.local !== 'input' || messages[1]?.name.local !== 'output' || messages.slice(2).some(c => c.name.local !== 'fault'))
191
+ refuse('unsupported', 'request-response-order');
192
+ };
193
+ messageOrder(abstract);
194
+ messageOrder(bound);
195
+ if (attr(abstract, 'parameterOrder') !== undefined || attr(bound, 'parameterOrder') !== undefined)
196
+ return refuse('unsupported', 'parameter-order');
197
+ const root = (messageSyntax, boundSyntax, faultName) => {
198
+ attrs(messageSyntax, ['name', 'message']);
199
+ attrs(boundSyntax, ['name']);
200
+ shape(messageSyntax, [ws('documentation')]);
201
+ shape(boundSyntax, [soap(faultName === undefined ? 'body' : 'fault'), ws('documentation')]);
202
+ const body = exactly(boundSyntax, SOAP, faultName === undefined ? 'body' : 'fault');
203
+ shape(body, []);
204
+ if (attr(body, 'use') !== 'literal')
205
+ return refuse('unsupported', 'literal-required');
206
+ if (faultName !== undefined && attr(body, 'name') !== faultName)
207
+ return refuse('selection-refused', 'soap-fault-name');
208
+ const message = reference(portType, messageSyntax, 'message');
209
+ if (message.kind !== 'wsdl' || message.role !== 'message')
210
+ return refuse('selection-refused', 'message-reference');
211
+ shape(message.syntax, [ws('part'), ws('documentation')]);
212
+ const parts = children(message.syntax).filter(c => c.name.namespace === WSDL_NAMESPACE && c.name.local === 'part');
213
+ if (parts.length !== 1)
214
+ return refuse('unsupported', 'single-part-required');
215
+ const part = parts[0], partName = attr(part, 'name');
216
+ if (!partName || !isXmlNCName(partName))
217
+ return refuse('selection-refused', 'part-name');
218
+ if (attr(body, 'parts') !== undefined && attr(body, 'parts').replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, '') !== partName)
219
+ return refuse('selection-refused', 'body-parts');
220
+ if (attr(part, 'type') !== undefined || attr(part, 'element') === undefined)
221
+ return refuse('unsupported', 'global-element-part-required');
222
+ shape(part, [ws('documentation')]);
223
+ const element = reference(message, part, 'element');
224
+ if (element.kind !== 'element' || element.identity.kind !== 'global')
225
+ return refuse('selection-refused', 'global-element-root');
226
+ if (element.type.kind === 'symbol' && !element.type.target)
227
+ return refuse('selection-refused', 'element-type');
228
+ return Object.freeze({ message: message.name, part: partName, element, type: element.type, source: part.source });
229
+ };
230
+ const io = (direction, declaration) => {
231
+ const boundIo = exactly(bound, WSDL_NAMESPACE, direction);
232
+ const boundName = attr(boundIo, 'name');
233
+ const expectedName = attr(declaration, 'name') ?? `${ownedSelector.operation}${direction === 'input' ? 'Request' : 'Response'}`;
234
+ if (boundName !== undefined && boundName !== expectedName)
235
+ return refuse('selection-refused', 'binding-message-name');
236
+ return root(declaration, boundIo);
237
+ };
238
+ const requestRoot = io('input', abstractInput), responseRoot = io('output', abstractOutput);
239
+ const declaredFaults = children(abstract).filter(c => c.name.namespace === WSDL_NAMESPACE && c.name.local === 'fault');
240
+ const boundFaults = children(bound).filter(c => c.name.namespace === WSDL_NAMESPACE && c.name.local === 'fault');
241
+ if (declaredFaults.length !== boundFaults.length)
242
+ return refuse('selection-refused', 'fault-mapping');
243
+ const faultNames = new Set();
244
+ const faults = declaredFaults.map(f => {
245
+ check();
246
+ const faultName = attr(f, 'name');
247
+ if (!faultName || !isXmlNCName(faultName) || faultNames.has(faultName))
248
+ return refuse('selection-refused', 'fault-name');
249
+ faultNames.add(faultName);
250
+ budget.chargeWork(64 + boundFaults.length * (64 + faultName.length * 4));
251
+ const matches = boundFaults.filter(b => attr(b, 'name') === faultName);
252
+ if (matches.length !== 1)
253
+ return refuse('selection-refused', 'fault-mapping');
254
+ return Object.freeze({ name: faultName, root: root(f, matches[0], faultName) });
255
+ });
256
+ check();
257
+ // Charge publication traversal before retaining authority. Roots stay exact context objects.
258
+ const contract = { selector: ownedSelector, contextId: context.contextId, basis: 'native-direct-premises-v1', correspondence: 'dated-XSD-2004-direct-v1',
259
+ binding: { version: '1.1', style: 'document', use: 'literal', transport: HTTP, action, source: binding.context.source },
260
+ input: requestRoot, output: responseRoot, faults,
261
+ missingCapabilities: ['matcher', 'projection', 'scalar-payload', 'bundle', 'codec', 'buffered-transport', 'structured-generation'], admitted: false };
262
+ budget.freeze(contract);
263
+ check();
264
+ budget.chargeWork(256);
265
+ const selected = Object.freeze({ kind: 'selected', contract, usage: Object.freeze({ ...budget.usage() }) });
266
+ issued.set(contract, Object.freeze({ contract, context, source: input, evidence: qualified }));
267
+ return selected;
268
+ });
269
+ return result.kind === 'resource-limit' ? failure('resource-limit', 'request-budget') : result;
270
+ }
271
+ catch (error) {
272
+ if (budget.exhausted())
273
+ return failure('resource-limit', 'request-budget');
274
+ if (options.signal?.aborted || error instanceof Cancelled)
275
+ return failure('cancelled', 'cooperative-cancellation');
276
+ if (error instanceof Refusal)
277
+ return failure(error.kind, error.rule);
278
+ if (error instanceof SchemaLoadingError)
279
+ return failure(error.category === 'resource-limit' ? 'resource-limit' : 'loading-refused', error.category);
280
+ throw error;
281
+ }
282
+ }
@@ -0,0 +1,42 @@
1
+ import type { DirectOperationContract } from './directOperation.js';
2
+ import type { DirectCodecFailure, DirectDecodedXml, DirectXmlLimits } from './directCodec.js';
3
+ import type { ExpandedName, SyntaxElement } from '../loader/orderedSyntax.js';
4
+ import type { ResolverUsage } from './semanticBudget.js';
5
+ export interface DirectSoapOptions {
6
+ readonly service: ExpandedName;
7
+ readonly port: string;
8
+ readonly endpoint: string;
9
+ /** Explicit authorization; WSDL addresses never grant permission. */
10
+ readonly allowEndpoint: (endpoint: URL) => boolean;
11
+ readonly signal?: AbortSignal;
12
+ readonly timeoutMs?: number;
13
+ readonly limits?: DirectXmlLimits;
14
+ /** Every requested extension is refused by this first adapter. */
15
+ readonly capabilities?: readonly string[];
16
+ }
17
+ export interface DirectSoapFailure {
18
+ readonly kind: DirectCodecFailure['kind'] | 'transport' | 'protocol';
19
+ readonly rule: string;
20
+ readonly usage: ResolverUsage;
21
+ }
22
+ export type DirectSoapResult = DirectSoapFailure | Readonly<{
23
+ kind: 'soap-response' | 'soap-fault';
24
+ admitted: false;
25
+ decoded: DirectDecodedXml;
26
+ /** Actual bounded HTTP entity bytes, before any decoding; caller-owned data. */
27
+ responseBytes: Uint8Array;
28
+ status: number;
29
+ fault?: Readonly<{
30
+ name: string;
31
+ code: ExpandedName;
32
+ codeNode: SyntaxElement;
33
+ string: string;
34
+ actor?: string;
35
+ }>;
36
+ usage: ResolverUsage;
37
+ }>;
38
+ /** Shared entry guard: consumers must call before reading any SOAP option. */
39
+ export declare function directSoapOptionsShape(options: unknown, check: () => void): string | undefined;
40
+ /** Authentication and fresh-value validation precede dependency bootstrap and all HTTP I/O. */
41
+ export declare function exchangeDirectSoap(contract: DirectOperationContract, inputMapping: unknown, application: unknown, options: DirectSoapOptions): Promise<DirectSoapResult>;
42
+ //# sourceMappingURL=directSoap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directSoap.d.ts","sourceRoot":"","sources":["../../src/compiler/directSoap.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAIlE,OAAO,KAAK,EAAC,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAG5F,OAAO,KAAK,EAAC,YAAY,EAAE,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,OAAO,CAAC;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC,kEAAkE;IAClE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AACD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,GAAG,WAAW,GAAG,UAAU,CAAC;IACrE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;CAC/B;AACD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,QAAQ,CAAC;IAC1D,IAAI,EAAE,eAAe,GAAG,YAAY,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;IACtD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,gFAAgF;IAChF,aAAa,EAAE,UAAU,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,YAAY,CAAC;QAAC,QAAQ,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAC9G,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC,CAAC;AAMH,8EAA8E;AAC9E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,MAAM,GAAG,SAAS,CAW9F;AAED,+FAA+F;AAC/F,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EACrH,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAqMvD"}
@@ -0,0 +1,298 @@
1
+ import { isApplicationUnmetered } from './semanticBudget.js';
2
+ import { directDataOwnership, directLimit } from './directExecutionPolicy.js';
3
+ /** Internal, one-retained-operation, unauthenticated loopback SOAP 1.1 adapter. */
4
+ import { checkSemanticBudget } from './semanticBudget.js';
5
+ import { DataOwnershipLimitError } from './dataOwnership.js';
6
+ import { Agent } from 'node:http';
7
+ import { types } from 'node:util';
8
+ import { WSDL } from 'soap/lib/wsdl/index.js';
9
+ import { Client } from 'soap/lib/client.js';
10
+ import { HttpClient } from 'soap/lib/http.js';
11
+ import { inspectDirectOperation } from './directOperation.js';
12
+ import { createDirectValueMapping, inspectDirectValueMapping } from './directValues.js';
13
+ import { decodeDirectXml, encodeDirectXml, DIRECT_XML_LIMITS } from './directCodec.js';
14
+ import { prepareDirectSoapSource, DirectSoapSourceError } from './directSoapSource.js';
15
+ import { isXmlNCName, resolveLexicalQName, SchemaLoadingError } from '../loader/orderedSyntax.js';
16
+ const SOAP = 'http://schemas.xmlsoap.org/soap/envelope/';
17
+ class Stop extends Error {
18
+ kind;
19
+ rule;
20
+ constructor(kind, rule) {
21
+ super(rule);
22
+ this.kind = kind;
23
+ this.rule = rule;
24
+ }
25
+ }
26
+ const same = (a, b) => a.namespace === b.namespace && a.local === b.local;
27
+ /** Shared entry guard: consumers must call before reading any SOAP option. */
28
+ export function directSoapOptionsShape(options, check) {
29
+ if (!options || typeof options !== 'object' || types.isProxy(options)
30
+ || ![null, Object.prototype].includes(Object.getPrototypeOf(options)))
31
+ return 'data-only SOAP options required';
32
+ const allowed = new Set(['service', 'port', 'endpoint', 'allowEndpoint', 'signal', 'timeoutMs', 'limits', 'capabilities']);
33
+ for (const key of Reflect.ownKeys(options)) {
34
+ check();
35
+ const descriptor = Object.getOwnPropertyDescriptor(options, key);
36
+ if (typeof key !== 'string' || !allowed.has(key) || !descriptor || !('value' in descriptor))
37
+ return 'SOAP option or capability';
38
+ }
39
+ return undefined;
40
+ }
41
+ /** Authentication and fresh-value validation precede dependency bootstrap and all HTTP I/O. */
42
+ export async function exchangeDirectSoap(contract, inputMapping, application, options) {
43
+ const { context, source } = inspectDirectOperation(contract);
44
+ const input = inspectDirectValueMapping(inputMapping, contract);
45
+ if (input.direction.kind !== 'input')
46
+ throw new TypeError('SOAP request requires the exact input mapping');
47
+ const { budget } = context;
48
+ const fail = (kind, rule) => Object.freeze({ kind, rule, usage: Object.freeze({ ...budget.usage() }) });
49
+ let signal;
50
+ const check = () => { checkSemanticBudget(budget); if (signal?.aborted)
51
+ throw new Stop('cancelled', 'cooperative-cancellation'); };
52
+ const stop = (kind, rule) => { throw new Stop(kind, rule); };
53
+ let agent;
54
+ let controller;
55
+ let deadline;
56
+ const abort = () => controller?.abort();
57
+ try {
58
+ check();
59
+ // Options are a closed capability surface. Never silently discard security,
60
+ // headers, endpoint agents, redirects, streaming or other caller extensions.
61
+ const optionRule = directSoapOptionsShape(options, check);
62
+ if (optionRule)
63
+ return fail('unsupported', optionRule);
64
+ signal = options.signal;
65
+ if (signal !== undefined && !(signal instanceof AbortSignal))
66
+ return fail('unsupported', 'native AbortSignal required');
67
+ const allowEndpoint = options.allowEndpoint;
68
+ check();
69
+ const config = directDataOwnership(budget).freeze(directDataOwnership(budget).snapshot({ service: options.service, port: options.port, endpoint: options.endpoint,
70
+ timeoutMs: options.timeoutMs ?? (isApplicationUnmetered(budget) ? 0 : 15_000), limits: options.limits ?? {}, capabilities: options.capabilities ?? [] }));
71
+ if (!Array.isArray(config.capabilities) || config.capabilities.length)
72
+ return fail('unsupported', 'SOAP capability');
73
+ if (!Number.isSafeInteger(config.timeoutMs) || config.timeoutMs < 0 || config.timeoutMs > 2_147_483_647)
74
+ throw new RangeError('SOAP timeout must be a positive timer integer');
75
+ const limits = { maxBytes: directLimit(budget, DIRECT_XML_LIMITS.maxBytes), maxDepth: directLimit(budget, DIRECT_XML_LIMITS.maxDepth),
76
+ maxNodes: directLimit(budget, DIRECT_XML_LIMITS.maxNodes), maxText: directLimit(budget, DIRECT_XML_LIMITS.maxText), ...config.limits };
77
+ for (const [key, value] of Object.entries(limits)) {
78
+ if (!['maxBytes', 'maxDepth', 'maxNodes', 'maxText'].includes(key) || !Number.isSafeInteger(value) || value < 1)
79
+ throw new RangeError('Invalid SOAP XML limit');
80
+ }
81
+ if (typeof config.endpoint !== 'string' || typeof config.port !== 'string' || !isXmlNCName(config.port)
82
+ || !config.service || typeof config.service.namespace !== 'string' || !isXmlNCName(config.service.local))
83
+ return fail('unsupported', 'explicit SOAP selection');
84
+ const endpoint = new URL(config.endpoint);
85
+ if (endpoint.protocol !== 'http:' || endpoint.hostname !== '127.0.0.1' || !endpoint.port || endpoint.port === '1'
86
+ || endpoint.username || endpoint.password || endpoint.hash || endpoint.search)
87
+ return fail('unsupported', 'owned loopback HTTP endpoint required');
88
+ if (typeof allowEndpoint !== 'function' || allowEndpoint(new URL(endpoint.href)) !== true)
89
+ return fail('unsupported', 'endpoint authorization');
90
+ const action = contract.binding.action;
91
+ if (/[^\x20-\x21\x23-\x7e]|\\/.test(action))
92
+ return fail('unsupported', 'unsafe SOAPAction');
93
+ const { wsdlText } = prepareDirectSoapSource(contract, config, check);
94
+ const elements = (node) => {
95
+ check();
96
+ return node.children.filter((child) => child.kind === 'element');
97
+ };
98
+ const encoded = encodeDirectXml(contract, input, application, { signal, limits });
99
+ if (encoded.kind !== 'direct-encoded')
100
+ return fail(encoded.kind, encoded.rule);
101
+ const output = createDirectValueMapping(contract, { kind: 'output' }, { signal });
102
+ if (output.kind !== 'direct-mapping')
103
+ return fail(output.kind, output.rule);
104
+ const faults = new Map();
105
+ for (const fault of contract.faults) {
106
+ check();
107
+ const mapping = createDirectValueMapping(contract, { kind: 'fault', name: fault.name }, { signal });
108
+ if (mapping.kind !== 'direct-mapping')
109
+ return fail(mapping.kind, mapping.rule);
110
+ faults.set(fault.name, mapping);
111
+ }
112
+ const shape = (node) => {
113
+ const children = elements(node);
114
+ if (node.attributes.length || node.children.some(n => n.kind === 'text' && /[^\t\r\n ]/.test(n.value)))
115
+ stop('protocol', 'SOAP protocol attributes or text');
116
+ return children;
117
+ };
118
+ const bodyRoot = (root) => {
119
+ if (!same(root.name, { namespace: SOAP, local: 'Envelope' }))
120
+ stop('protocol', 'SOAP 1.1 Envelope required');
121
+ const children = shape(root);
122
+ if (children[0]?.name.namespace === SOAP && children[0].name.local === 'Header') {
123
+ if (shape(children[0]).length)
124
+ stop('unsupported', 'incoming SOAP headers');
125
+ children.shift();
126
+ }
127
+ if (children.length !== 1 || !same(children[0].name, { namespace: SOAP, local: 'Body' }))
128
+ stop('protocol', 'one SOAP Body required');
129
+ const body = shape(children[0]);
130
+ if (body.length !== 1)
131
+ stop('protocol', 'one SOAP Body payload required');
132
+ return body[0];
133
+ };
134
+ // The native dependency receives only the explicitly byte-bounded source.
135
+ const wsdl = new WSDL(wsdlText, source.root.uri, { wsdl_options: { overrideImportLocation: () => { throw new Stop('unsupported', 'dependency import forbidden'); } } });
136
+ await new Promise((resolve, reject) => wsdl.onReady(error => error ? reject(error) : resolve()));
137
+ check();
138
+ // HTTP and codec byte limits bound buffering and output copies directly.
139
+ agent = new Agent({ keepAlive: false, maxSockets: 1 });
140
+ controller = new AbortController();
141
+ signal?.addEventListener('abort', abort, { once: true });
142
+ let timedOut = false;
143
+ if (config.timeoutMs > 0)
144
+ deadline = setTimeout(() => { timedOut = true; controller.abort(); }, config.timeoutMs);
145
+ const complete = new Error('direct raw response captured');
146
+ let response;
147
+ let hookFailure;
148
+ class BufferedHttp extends HttpClient {
149
+ request(url, data, callback, headers, _options) {
150
+ try {
151
+ check();
152
+ if (url !== endpoint.href || headers.SOAPAction !== `"${action}"` || headers['Content-Type'] !== 'text/xml; charset=utf-8')
153
+ stop('protocol', 'dependency dispatch mismatch');
154
+ if (Buffer.byteLength(data) > limits.maxBytes)
155
+ stop('resource-limit', 'SOAP request byte limit');
156
+ const outgoing = decodeDirectXml(contract, input, Buffer.from(data), { signal, limits,
157
+ uri: 'urn:typescript-wsdl-client:outgoing-soap', selectPayload: root => ({ payload: bodyRoot(root), mapping: input }) });
158
+ if (outgoing.kind !== 'direct-decoded')
159
+ stop(outgoing.kind, outgoing.rule);
160
+ check();
161
+ }
162
+ catch (error) {
163
+ hookFailure = error;
164
+ callback(complete);
165
+ // The dependency ignores this return value; no HTTP request is made.
166
+ const rejected = Promise.reject(complete);
167
+ void rejected.catch(() => { });
168
+ return rejected;
169
+ }
170
+ return super.request(url, data, (error, res, bytes) => {
171
+ // Never throw through HttpClient's detached then-handler.
172
+ try {
173
+ check();
174
+ if (error)
175
+ hookFailure = error;
176
+ else if (!res || !Buffer.isBuffer(bytes))
177
+ stop('transport', 'raw response bytes unavailable');
178
+ else
179
+ response = { bytes, status: res.status, contentType: String(res.headers['content-type'] ?? ''), encoding: String(res.headers['content-encoding'] ?? '') };
180
+ }
181
+ catch (failure) {
182
+ hookFailure = failure;
183
+ }
184
+ // No response object/data on this sentinel: node-soap cannot enter
185
+ // xmlToObject, including its special err.response parsing path.
186
+ callback(complete);
187
+ }, headers, { responseType: 'arraybuffer', decompress: false, maxRedirects: 0, maxContentLength: limits.maxBytes,
188
+ maxBodyLength: limits.maxBytes, proxy: false, httpAgent: agent, signal: controller.signal, timeout: config.timeoutMs });
189
+ }
190
+ }
191
+ const client = new Client(wsdl, endpoint.href, { httpClient: new BufferedHttp() });
192
+ // Every lookup is own and explicit; the dependency's first-port shortcut is
193
+ // never consulted. Source checks above bind these names to the native handle.
194
+ const own = (object, key) => Object.getOwnPropertyDescriptor(object, key)?.value;
195
+ const service = own(client, config.service.local);
196
+ const port = service && typeof service === 'object' ? own(service, config.port) : undefined;
197
+ const method = port && typeof port === 'object' ? own(port, contract.selector.operation) : undefined;
198
+ if (typeof method !== 'function')
199
+ return fail('unsupported', 'dependency selected method unavailable');
200
+ check();
201
+ await new Promise((resolve, reject) => method({ _xml: Buffer.from(encoded.bytes).toString('utf8') }, (error) => error === complete ? resolve() : reject(error), {}, { SOAPAction: `"${action}"` }));
202
+ check();
203
+ if (timedOut)
204
+ return fail('transport', 'SOAP deadline exceeded');
205
+ if (hookFailure)
206
+ throw hookFailure;
207
+ if (!response)
208
+ return fail('transport', 'incomplete HTTP response');
209
+ const observed = response;
210
+ if (observed.encoding && observed.encoding.toLowerCase() !== 'identity')
211
+ return fail('unsupported', 'HTTP compression');
212
+ const media = /^text\/xml(?:\s*;\s*charset\s*=\s*(?:"(utf-8|utf-16|utf-16le|utf-16be)"|(utf-8|utf-16|utf-16le|utf-16be)))?\s*$/i.exec(observed.contentType);
213
+ if (!media)
214
+ return fail('protocol', 'SOAP response Content-Type');
215
+ if (observed.status !== 200 && observed.status !== 500)
216
+ return fail('transport', 'SOAP HTTP status');
217
+ // Header charset is a protocol assertion, checked against actual BOM bytes.
218
+ const charset = (media[1] ?? media[2])?.toLowerCase();
219
+ const bom = observed.bytes[0] === 0xff && observed.bytes[1] === 0xfe ? 'utf-16le'
220
+ : observed.bytes[0] === 0xfe && observed.bytes[1] === 0xff ? 'utf-16be' : 'utf-8';
221
+ if (charset && charset !== bom && !(charset === 'utf-16' && bom.startsWith('utf-16')))
222
+ return fail('protocol', 'SOAP charset disagrees with bytes');
223
+ let faultInfo;
224
+ const decoded = decodeDirectXml(contract, output, observed.bytes, { signal, limits, uri: endpoint.href,
225
+ selectPayload: root => {
226
+ const payload = bodyRoot(root);
227
+ if (!same(payload.name, { namespace: SOAP, local: 'Fault' })) {
228
+ if (observed.status !== 200)
229
+ stop('protocol', 'HTTP 500 requires SOAP Fault');
230
+ return { payload, mapping: output };
231
+ }
232
+ const children = shape(payload);
233
+ const names = children.map(n => n.name.namespace === '' ? n.name.local : '');
234
+ if (names.join(',') !== 'faultcode,faultstring,detail' && names.join(',') !== 'faultcode,faultstring,faultactor,detail')
235
+ stop('protocol', 'SOAP Fault children');
236
+ const text = (node) => {
237
+ if (node.attributes.some(a => !(node.name.local === 'faultstring' && a.name.namespace === 'http://www.w3.org/XML/1998/namespace' && a.name.local === 'lang')) || elements(node).length)
238
+ stop('protocol', 'SOAP Fault scalar child');
239
+ return node.children.map(n => n.kind === 'text' ? n.value : '').join('');
240
+ };
241
+ let code;
242
+ try {
243
+ code = resolveLexicalQName(text(children[0]), children[0]);
244
+ }
245
+ catch (error) {
246
+ if (error instanceof SchemaLoadingError)
247
+ return stop('protocol', 'SOAP Fault code QName');
248
+ throw error;
249
+ }
250
+ if (!code.namespace)
251
+ stop('protocol', 'SOAP Fault code namespace required');
252
+ const string = text(children[1]);
253
+ const actor = names[2] === 'faultactor' ? text(children[2]) : undefined;
254
+ const detail = shape(children.at(-1));
255
+ if (detail.length !== 1)
256
+ stop('protocol', 'one declared SOAP Fault detail required');
257
+ const matches = contract.faults.filter(f => same(f.root.element.name, detail[0].name));
258
+ if (matches.length !== 1)
259
+ stop('protocol', 'unknown or ambiguous SOAP Fault detail');
260
+ faultInfo = { name: matches[0].name, code, codeNode: children[0], string, ...(actor === undefined ? {} : { actor }) };
261
+ directDataOwnership(budget).freeze(faultInfo);
262
+ return { payload: detail[0], mapping: faults.get(faultInfo.name) };
263
+ } });
264
+ if (decoded.kind !== 'direct-decoded')
265
+ return fail(decoded.kind, decoded.rule);
266
+ check();
267
+ check();
268
+ return Object.freeze({ kind: faultInfo ? 'soap-fault' : 'soap-response', admitted: false, decoded,
269
+ responseBytes: new Uint8Array(observed.bytes), status: observed.status, ...(faultInfo ? { fault: faultInfo } : {}), usage: Object.freeze({ ...budget.usage() }) });
270
+ }
271
+ catch (error) {
272
+ if (budget.exhausted())
273
+ return fail('resource-limit', 'request-budget');
274
+ if (error instanceof DataOwnershipLimitError)
275
+ return fail('resource-limit', error.message);
276
+ if (signal?.aborted)
277
+ return fail('cancelled', 'cooperative-cancellation');
278
+ if (error instanceof DirectSoapSourceError)
279
+ return fail(error.kind, error.message);
280
+ if (error instanceof Stop)
281
+ return fail(error.kind, error.rule);
282
+ if (error instanceof SchemaLoadingError)
283
+ return fail(error.category === 'resource-limit' ? 'resource-limit' : error.category === 'invalid-schema' ? 'protocol' : 'unsupported', 'SOAP protocol XML');
284
+ if (error instanceof Error && 'code' in error) {
285
+ if (error.code === 'ERR_BAD_RESPONSE' && error.message.startsWith('maxContentLength size of '))
286
+ return fail('resource-limit', 'HTTP response byte limit');
287
+ return fail('transport', error.code === 'ERR_CANCELED' ? 'SOAP deadline exceeded' : 'HTTP exchange failed');
288
+ }
289
+ throw error;
290
+ }
291
+ finally {
292
+ if (deadline)
293
+ clearTimeout(deadline);
294
+ signal?.removeEventListener('abort', abort);
295
+ controller?.abort();
296
+ agent?.destroy();
297
+ }
298
+ }
@@ -0,0 +1,15 @@
1
+ import type { DirectOperationContract } from './directOperation.js';
2
+ import type { ExpandedName } from '../loader/orderedSyntax.js';
3
+ export declare const DIRECT_SOAP_SOURCE_MAX_BYTES: number;
4
+ export declare class DirectSoapSourceError extends Error {
5
+ readonly kind: 'unsupported' | 'resource-limit';
6
+ constructor(message: string, kind?: 'unsupported' | 'resource-limit');
7
+ }
8
+ export declare function prepareDirectSoapSource(contract: DirectOperationContract, config: {
9
+ service: ExpandedName;
10
+ port: string;
11
+ }, check: () => void): {
12
+ original: Uint8Array<ArrayBufferLike>;
13
+ wsdlText: string;
14
+ };
15
+ //# sourceMappingURL=directSoapSource.d.ts.map