@fantastic.dev/better-stripe 0.89.0 → 0.91.0

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 (516) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.d.ts +2 -0
  4. package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.d.ts.map +1 -0
  5. package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.js +61 -0
  6. package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.js.map +1 -0
  7. package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.d.ts +2 -0
  8. package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.d.ts.map +1 -0
  9. package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.js +18 -0
  10. package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.js.map +1 -0
  11. package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.d.ts +2 -0
  12. package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.d.ts.map +1 -0
  13. package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.js +67 -0
  14. package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.js.map +1 -0
  15. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +41 -0
  16. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -0
  17. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +187 -0
  18. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -0
  19. package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.d.ts +2 -0
  20. package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.d.ts.map +1 -0
  21. package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js +372 -0
  22. package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js.map +1 -0
  23. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts +3 -0
  24. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -0
  25. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +2 -0
  26. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js.map +1 -0
  27. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.d.ts +55 -0
  28. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.d.ts.map +1 -0
  29. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.js +87 -0
  30. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.js.map +1 -0
  31. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts +12 -0
  32. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -0
  33. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +131 -0
  34. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js.map +1 -0
  35. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.d.ts +14 -0
  36. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.d.ts.map +1 -0
  37. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.js +60 -0
  38. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.js.map +1 -0
  39. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.d.ts +2 -0
  40. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.d.ts.map +1 -0
  41. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js +126 -0
  42. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js.map +1 -0
  43. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.d.mts +627 -0
  44. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.d.mts.map +1 -0
  45. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs +488 -0
  46. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs.map +1 -0
  47. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.d.mts +214 -0
  48. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.d.mts.map +1 -0
  49. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs +63 -0
  50. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs.map +1 -0
  51. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.d.mts +75 -0
  52. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.d.mts.map +1 -0
  53. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs +145 -0
  54. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs.map +1 -0
  55. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts +7 -0
  56. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts.map +1 -0
  57. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs +26 -0
  58. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs.map +1 -0
  59. package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts +14 -0
  60. package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts.map +1 -0
  61. package/dist/client/billing/renewalAttach/internal/c10/appendAck.js +202 -0
  62. package/dist/client/billing/renewalAttach/internal/c10/appendAck.js.map +1 -0
  63. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts +23 -0
  64. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts.map +1 -0
  65. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js +117 -0
  66. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js.map +1 -0
  67. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts +23 -0
  68. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts.map +1 -0
  69. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js +111 -0
  70. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js.map +1 -0
  71. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.d.ts +11 -0
  72. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.d.ts.map +1 -0
  73. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.js +376 -0
  74. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.js.map +1 -0
  75. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.d.ts +16 -0
  76. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.d.ts.map +1 -0
  77. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.js +119 -0
  78. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.js.map +1 -0
  79. package/dist/client/billing/renewalAttach/internal/c10/ownData.d.ts +30 -0
  80. package/dist/client/billing/renewalAttach/internal/c10/ownData.d.ts.map +1 -0
  81. package/dist/client/billing/renewalAttach/internal/c10/ownData.js +74 -0
  82. package/dist/client/billing/renewalAttach/internal/c10/ownData.js.map +1 -0
  83. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.d.ts +3 -0
  84. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.d.ts.map +1 -0
  85. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.js +3 -0
  86. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.js.map +1 -0
  87. package/dist/client/billing/renewalAttach/internal/c10/privacy.d.ts +2 -0
  88. package/dist/client/billing/renewalAttach/internal/c10/privacy.d.ts.map +1 -0
  89. package/dist/client/billing/renewalAttach/internal/c10/privacy.js +175 -0
  90. package/dist/client/billing/renewalAttach/internal/c10/privacy.js.map +1 -0
  91. package/dist/client/billing/renewalAttach/internal/c10/publicApi.d.ts +3 -0
  92. package/dist/client/billing/renewalAttach/internal/c10/publicApi.d.ts.map +1 -0
  93. package/dist/client/billing/renewalAttach/internal/c10/publicApi.js +3 -0
  94. package/dist/client/billing/renewalAttach/internal/c10/publicApi.js.map +1 -0
  95. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.d.mts +3 -0
  96. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.d.mts.map +1 -0
  97. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs +4 -0
  98. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs.map +1 -0
  99. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.d.mts +26 -0
  100. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.d.mts.map +1 -0
  101. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs +42 -0
  102. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs.map +1 -0
  103. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.d.mts +7 -0
  104. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.d.mts.map +1 -0
  105. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs +60 -0
  106. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs.map +1 -0
  107. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.d.mts +335 -0
  108. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.d.mts.map +1 -0
  109. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs +122 -0
  110. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs.map +1 -0
  111. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.d.mts +46 -0
  112. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.d.mts.map +1 -0
  113. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs +87 -0
  114. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs.map +1 -0
  115. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.d.mts +35 -0
  116. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.d.mts.map +1 -0
  117. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs +90 -0
  118. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs.map +1 -0
  119. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.d.mts +132 -0
  120. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.d.mts.map +1 -0
  121. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs +82 -0
  122. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs.map +1 -0
  123. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.d.mts +4 -0
  124. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.d.mts.map +1 -0
  125. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs +23 -0
  126. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs.map +1 -0
  127. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.d.mts +16 -0
  128. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.d.mts.map +1 -0
  129. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs +41 -0
  130. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs.map +1 -0
  131. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.d.mts +43 -0
  132. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.d.mts.map +1 -0
  133. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs +132 -0
  134. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs.map +1 -0
  135. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.d.mts +200 -0
  136. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.d.mts.map +1 -0
  137. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs +150 -0
  138. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs.map +1 -0
  139. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.d.mts +124 -0
  140. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.d.mts.map +1 -0
  141. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs +127 -0
  142. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs.map +1 -0
  143. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.d.mts +3 -0
  144. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.d.mts.map +1 -0
  145. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs +69 -0
  146. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs.map +1 -0
  147. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.d.mts +2 -0
  148. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.d.mts.map +1 -0
  149. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs +152 -0
  150. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs.map +1 -0
  151. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.d.mts +2 -0
  152. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.d.mts.map +1 -0
  153. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs +2 -0
  154. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs.map +1 -0
  155. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.d.mts +5 -0
  156. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.d.mts.map +1 -0
  157. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs +243 -0
  158. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs.map +1 -0
  159. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.d.mts +17 -0
  160. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.d.mts.map +1 -0
  161. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs +75 -0
  162. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs.map +1 -0
  163. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.d.mts +2 -0
  164. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.d.mts.map +1 -0
  165. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs +173 -0
  166. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs.map +1 -0
  167. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.d.mts +4 -0
  168. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.d.mts.map +1 -0
  169. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs +4 -0
  170. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs.map +1 -0
  171. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.d.mts +7 -0
  172. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.d.mts.map +1 -0
  173. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs +30 -0
  174. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs.map +1 -0
  175. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.d.mts +29 -0
  176. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.d.mts.map +1 -0
  177. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs +33 -0
  178. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs.map +1 -0
  179. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f19.json +452 -0
  180. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.d.mts +2 -0
  181. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.d.mts.map +1 -0
  182. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs +173 -0
  183. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs.map +1 -0
  184. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.d.mts +2 -0
  185. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.d.mts.map +1 -0
  186. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs +449 -0
  187. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs.map +1 -0
  188. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.d.mts +9 -0
  189. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.d.mts.map +1 -0
  190. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs +27 -0
  191. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs.map +1 -0
  192. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.d.mts +7 -0
  193. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.d.mts.map +1 -0
  194. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs +150 -0
  195. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs.map +1 -0
  196. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.d.mts +3 -0
  197. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.d.mts.map +1 -0
  198. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs +503 -0
  199. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs.map +1 -0
  200. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.d.mts +2 -0
  201. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.d.mts.map +1 -0
  202. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs +91 -0
  203. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs.map +1 -0
  204. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.d.mts +14 -0
  205. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.d.mts.map +1 -0
  206. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs +41 -0
  207. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs.map +1 -0
  208. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.d.mts +103 -0
  209. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.d.mts.map +1 -0
  210. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs +46 -0
  211. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs.map +1 -0
  212. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.d.mts +73 -0
  213. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.d.mts.map +1 -0
  214. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs +294 -0
  215. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs.map +1 -0
  216. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.d.mts +2 -0
  217. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.d.mts.map +1 -0
  218. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs +60 -0
  219. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs.map +1 -0
  220. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.d.mts +58 -0
  221. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.d.mts.map +1 -0
  222. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs +96 -0
  223. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs.map +1 -0
  224. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.d.ts +2 -0
  225. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.d.ts.map +1 -0
  226. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.js +40 -0
  227. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.js.map +1 -0
  228. package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts +8 -0
  229. package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts.map +1 -0
  230. package/dist/client/billing/renewalAttach/internal/configure/actor.js +454 -0
  231. package/dist/client/billing/renewalAttach/internal/configure/actor.js.map +1 -0
  232. package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts +12 -0
  233. package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts.map +1 -0
  234. package/dist/client/billing/renewalAttach/internal/configure/capture.js +99 -0
  235. package/dist/client/billing/renewalAttach/internal/configure/capture.js.map +1 -0
  236. package/dist/client/billing/renewalAttach/internal/configure/output.d.ts +16 -0
  237. package/dist/client/billing/renewalAttach/internal/configure/output.d.ts.map +1 -0
  238. package/dist/client/billing/renewalAttach/internal/configure/output.js +274 -0
  239. package/dist/client/billing/renewalAttach/internal/configure/output.js.map +1 -0
  240. package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts +3 -0
  241. package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts.map +1 -0
  242. package/dist/client/billing/renewalAttach/internal/configure/replay.js +9 -0
  243. package/dist/client/billing/renewalAttach/internal/configure/replay.js.map +1 -0
  244. package/dist/client/billing/renewalAttach/internal/configure/request.d.ts +39 -0
  245. package/dist/client/billing/renewalAttach/internal/configure/request.d.ts.map +1 -0
  246. package/dist/client/billing/renewalAttach/internal/configure/request.js +245 -0
  247. package/dist/client/billing/renewalAttach/internal/configure/request.js.map +1 -0
  248. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts +88 -0
  249. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -0
  250. package/dist/client/billing/renewalAttach/internal/configure/transport.js +289 -0
  251. package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -0
  252. package/dist/client/billing/renewalAttach/internal/material/capture.d.ts +88 -0
  253. package/dist/client/billing/renewalAttach/internal/material/capture.d.ts.map +1 -0
  254. package/dist/client/billing/renewalAttach/internal/material/capture.js +181 -0
  255. package/dist/client/billing/renewalAttach/internal/material/capture.js.map +1 -0
  256. package/dist/client/billing/renewalAttach/internal/material/classifiers.d.ts +522 -0
  257. package/dist/client/billing/renewalAttach/internal/material/classifiers.d.ts.map +1 -0
  258. package/dist/client/billing/renewalAttach/internal/material/classifiers.js +226 -0
  259. package/dist/client/billing/renewalAttach/internal/material/classifiers.js.map +1 -0
  260. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.d.ts +17 -0
  261. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.d.ts.map +1 -0
  262. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.js +95 -0
  263. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.js.map +1 -0
  264. package/dist/client/billing/renewalAttach/internal/material/readMaterial.d.ts +338 -0
  265. package/dist/client/billing/renewalAttach/internal/material/readMaterial.d.ts.map +1 -0
  266. package/dist/client/billing/renewalAttach/internal/material/readMaterial.js +122 -0
  267. package/dist/client/billing/renewalAttach/internal/material/readMaterial.js.map +1 -0
  268. package/dist/client/billing/renewalAttach/internal/material/requiredJson.d.ts +2 -0
  269. package/dist/client/billing/renewalAttach/internal/material/requiredJson.d.ts.map +1 -0
  270. package/dist/client/billing/renewalAttach/internal/material/requiredJson.js +174 -0
  271. package/dist/client/billing/renewalAttach/internal/material/requiredJson.js.map +1 -0
  272. package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts +16 -0
  273. package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts.map +1 -0
  274. package/dist/client/billing/renewalAttach/internal/observation/actor.js +362 -0
  275. package/dist/client/billing/renewalAttach/internal/observation/actor.js.map +1 -0
  276. package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts +9 -0
  277. package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts.map +1 -0
  278. package/dist/client/billing/renewalAttach/internal/observation/capture.js +215 -0
  279. package/dist/client/billing/renewalAttach/internal/observation/capture.js.map +1 -0
  280. package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts +7 -0
  281. package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts.map +1 -0
  282. package/dist/client/billing/renewalAttach/internal/observation/profile.js +190 -0
  283. package/dist/client/billing/renewalAttach/internal/observation/profile.js.map +1 -0
  284. package/dist/client/billing/renewalAttach/internal/observation/record.d.ts +5 -0
  285. package/dist/client/billing/renewalAttach/internal/observation/record.d.ts.map +1 -0
  286. package/dist/client/billing/renewalAttach/internal/observation/record.js +317 -0
  287. package/dist/client/billing/renewalAttach/internal/observation/record.js.map +1 -0
  288. package/dist/client/billing/renewalAttach/internal/observation/types.d.ts +79 -0
  289. package/dist/client/billing/renewalAttach/internal/observation/types.d.ts.map +1 -0
  290. package/dist/client/billing/renewalAttach/internal/observation/types.js +27 -0
  291. package/dist/client/billing/renewalAttach/internal/observation/types.js.map +1 -0
  292. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts +18 -0
  293. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts.map +1 -0
  294. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js +229 -0
  295. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js.map +1 -0
  296. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +163 -0
  297. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -0
  298. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +443 -0
  299. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -0
  300. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +8 -0
  301. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -0
  302. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +467 -0
  303. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -0
  304. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts +6 -0
  305. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts.map +1 -0
  306. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js +59 -0
  307. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js.map +1 -0
  308. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts +10 -0
  309. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts.map +1 -0
  310. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js +48 -0
  311. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js.map +1 -0
  312. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts +20 -0
  313. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts.map +1 -0
  314. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js +44 -0
  315. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js.map +1 -0
  316. package/dist/client/billing/renewalAttach/internal/operations/types.d.ts +42 -0
  317. package/dist/client/billing/renewalAttach/internal/operations/types.d.ts.map +1 -0
  318. package/dist/client/billing/renewalAttach/internal/operations/types.js +158 -0
  319. package/dist/client/billing/renewalAttach/internal/operations/types.js.map +1 -0
  320. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts +5 -0
  321. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts.map +1 -0
  322. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js +214 -0
  323. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js.map +1 -0
  324. package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts +33 -0
  325. package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts.map +1 -0
  326. package/dist/client/billing/renewalAttach/internal/preflight/grammar.js +208 -0
  327. package/dist/client/billing/renewalAttach/internal/preflight/grammar.js.map +1 -0
  328. package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts +4 -0
  329. package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts.map +1 -0
  330. package/dist/client/billing/renewalAttach/internal/preflight/output.js +25 -0
  331. package/dist/client/billing/renewalAttach/internal/preflight/output.js.map +1 -0
  332. package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts +16 -0
  333. package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts.map +1 -0
  334. package/dist/client/billing/renewalAttach/internal/preflight/record.js +93 -0
  335. package/dist/client/billing/renewalAttach/internal/preflight/record.js.map +1 -0
  336. package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts +7 -0
  337. package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts.map +1 -0
  338. package/dist/client/billing/renewalAttach/internal/preflight/relations.js +153 -0
  339. package/dist/client/billing/renewalAttach/internal/preflight/relations.js.map +1 -0
  340. package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts +22 -0
  341. package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts.map +1 -0
  342. package/dist/client/billing/renewalAttach/internal/recovery/material.js +221 -0
  343. package/dist/client/billing/renewalAttach/internal/recovery/material.js.map +1 -0
  344. package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +8 -0
  345. package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -0
  346. package/dist/client/billing/renewalAttach/internal/recovery/output.js +101 -0
  347. package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -0
  348. package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +12 -0
  349. package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -0
  350. package/dist/client/billing/renewalAttach/internal/recovery/record.js +186 -0
  351. package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -0
  352. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +5 -0
  353. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -0
  354. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +498 -0
  355. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -0
  356. package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +21 -0
  357. package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -0
  358. package/dist/client/billing/renewalAttach/internal/recovery/relation.js +119 -0
  359. package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -0
  360. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
  361. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +32 -32
  362. package/dist/component/balanceFunding/mutations.d.ts +16 -16
  363. package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
  364. package/dist/component/financialObservations/settlementHelpers.d.ts +3 -3
  365. package/dist/component/payoutRelease/queries.d.ts +2 -2
  366. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  367. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  368. package/dist/component/usageCredits/accounting.fixtures.d.ts +16 -16
  369. package/docs/renewal-context-reads.md +54 -8
  370. package/docs/renewal-material-observation.md +37 -0
  371. package/docs/renewal-phase-assembly.md +91 -0
  372. package/docs/renewal-raw-acquisition.md +78 -0
  373. package/package.json +1 -1
  374. package/src/client/billing/renewalAttach/internal/acquisition/array-order.test.js +70 -0
  375. package/src/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.js +23 -0
  376. package/src/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.js +77 -0
  377. package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +304 -0
  378. package/src/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js +418 -0
  379. package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +2 -0
  380. package/src/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.ts +110 -0
  381. package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +168 -0
  382. package/src/client/billing/renewalAttach/internal/acquisition/readLifetime.ts +64 -0
  383. package/src/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js +138 -0
  384. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs +510 -0
  385. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs +64 -0
  386. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs +159 -0
  387. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs +25 -0
  388. package/src/client/billing/renewalAttach/internal/c10/appendAck.first.test.ts +86 -0
  389. package/src/client/billing/renewalAttach/internal/c10/appendAck.ts +226 -0
  390. package/src/client/billing/renewalAttach/internal/c10/appendCodec.test.ts +186 -0
  391. package/src/client/billing/renewalAttach/internal/c10/arrayOrder.test.ts +47 -0
  392. package/src/client/billing/renewalAttach/internal/c10/attachEvents.ts +144 -0
  393. package/src/client/billing/renewalAttach/internal/c10/compiler.test.ts +443 -0
  394. package/src/client/billing/renewalAttach/internal/c10/configureEvents.ts +145 -0
  395. package/src/client/billing/renewalAttach/internal/c10/eventCapture.ts +464 -0
  396. package/src/client/billing/renewalAttach/internal/c10/eventCodec.ts +131 -0
  397. package/src/client/billing/renewalAttach/internal/c10/hardening.test.ts +175 -0
  398. package/src/client/billing/renewalAttach/internal/c10/historicalClassifier.test.ts +114 -0
  399. package/src/client/billing/renewalAttach/internal/c10/ownData.ts +103 -0
  400. package/src/client/billing/renewalAttach/internal/c10/ownerBinding.ts +2 -0
  401. package/src/client/billing/renewalAttach/internal/c10/ownerContinuations.test.ts +283 -0
  402. package/src/client/billing/renewalAttach/internal/c10/privacy.ts +181 -0
  403. package/src/client/billing/renewalAttach/internal/c10/publicApi.ts +8 -0
  404. package/src/client/billing/renewalAttach/internal/c10/reflectionPrivacy.test.ts +87 -0
  405. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs +3 -0
  406. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs +49 -0
  407. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs +63 -0
  408. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs +160 -0
  409. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs +88 -0
  410. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs +102 -0
  411. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs +82 -0
  412. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs +20 -0
  413. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs +41 -0
  414. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs +137 -0
  415. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs +153 -0
  416. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs +127 -0
  417. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs +85 -0
  418. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs +170 -0
  419. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs +6 -0
  420. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs +295 -0
  421. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs +78 -0
  422. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs +177 -0
  423. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs +8 -0
  424. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs +34 -0
  425. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs +32 -0
  426. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f19.json +452 -0
  427. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs +177 -0
  428. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs +466 -0
  429. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs +29 -0
  430. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs +165 -0
  431. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs +507 -0
  432. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs +89 -0
  433. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs +38 -0
  434. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs +45 -0
  435. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs +309 -0
  436. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs +58 -0
  437. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs +104 -0
  438. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.ts +43 -0
  439. package/src/client/billing/renewalAttach/internal/configure/actor.ts +575 -0
  440. package/src/client/billing/renewalAttach/internal/configure/capture.ts +117 -0
  441. package/src/client/billing/renewalAttach/internal/configure/dispatch.integration.test.ts +32 -0
  442. package/src/client/billing/renewalAttach/internal/configure/limits.test.ts +510 -0
  443. package/src/client/billing/renewalAttach/internal/configure/order.integration.test.ts +207 -0
  444. package/src/client/billing/renewalAttach/internal/configure/output.ts +372 -0
  445. package/src/client/billing/renewalAttach/internal/configure/ownership.integration.test.ts +148 -0
  446. package/src/client/billing/renewalAttach/internal/configure/replay.integration.test.ts +173 -0
  447. package/src/client/billing/renewalAttach/internal/configure/replay.ts +13 -0
  448. package/src/client/billing/renewalAttach/internal/configure/request.ts +312 -0
  449. package/src/client/billing/renewalAttach/internal/configure/transport.integration.test.ts +507 -0
  450. package/src/client/billing/renewalAttach/internal/configure/transport.ts +348 -0
  451. package/src/client/billing/renewalAttach/internal/material/capture.ts +243 -0
  452. package/src/client/billing/renewalAttach/internal/material/classifiers.test.ts +510 -0
  453. package/src/client/billing/renewalAttach/internal/material/classifiers.ts +313 -0
  454. package/src/client/billing/renewalAttach/internal/material/nodeKernel.ts +118 -0
  455. package/src/client/billing/renewalAttach/internal/material/readMaterial.ts +176 -0
  456. package/src/client/billing/renewalAttach/internal/material/requiredJson.ts +183 -0
  457. package/src/client/billing/renewalAttach/internal/observation/actor.ts +444 -0
  458. package/src/client/billing/renewalAttach/internal/observation/capture.ts +250 -0
  459. package/src/client/billing/renewalAttach/internal/observation/observation.integration.test.ts +220 -0
  460. package/src/client/billing/renewalAttach/internal/observation/observationRetirement.integration.test.ts +60 -0
  461. package/src/client/billing/renewalAttach/internal/observation/profile.ts +264 -0
  462. package/src/client/billing/renewalAttach/internal/observation/record.ts +408 -0
  463. package/src/client/billing/renewalAttach/internal/observation/types.ts +102 -0
  464. package/src/client/billing/renewalAttach/internal/operations/configureReadTransport.ts +285 -0
  465. package/src/client/billing/renewalAttach/internal/operations/defaultBindings.test.ts +69 -0
  466. package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +574 -0
  467. package/src/client/billing/renewalAttach/internal/operations/initialAttach.integration.test.ts +34 -0
  468. package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +535 -0
  469. package/src/client/billing/renewalAttach/internal/operations/ownedAwait.ts +63 -0
  470. package/src/client/billing/renewalAttach/internal/operations/providerFailure.integration.test.ts +61 -0
  471. package/src/client/billing/renewalAttach/internal/operations/providerFailure.ts +66 -0
  472. package/src/client/billing/renewalAttach/internal/operations/sourceOperations.ts +50 -0
  473. package/src/client/billing/renewalAttach/internal/operations/transport.integration.test.ts +116 -0
  474. package/src/client/billing/renewalAttach/internal/operations/types.ts +223 -0
  475. package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.integration.test.ts +285 -0
  476. package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.ts +258 -0
  477. package/src/client/billing/renewalAttach/internal/preflight/configureReads.integration.test.ts +139 -0
  478. package/src/client/billing/renewalAttach/internal/preflight/grammar.ts +257 -0
  479. package/src/client/billing/renewalAttach/internal/preflight/output.ts +42 -0
  480. package/src/client/billing/renewalAttach/internal/preflight/owner.integration.test.ts +82 -0
  481. package/src/client/billing/renewalAttach/internal/preflight/preflight.integration.test.ts +354 -0
  482. package/src/client/billing/renewalAttach/internal/preflight/record.ts +127 -0
  483. package/src/client/billing/renewalAttach/internal/preflight/relations.ts +209 -0
  484. package/src/client/billing/renewalAttach/internal/recovery/material.ts +311 -0
  485. package/src/client/billing/renewalAttach/internal/recovery/output.ts +136 -0
  486. package/src/client/billing/renewalAttach/internal/recovery/record.ts +230 -0
  487. package/src/client/billing/renewalAttach/internal/recovery/recovery.integration.test.ts +463 -0
  488. package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +599 -0
  489. package/src/client/billing/renewalAttach/internal/recovery/relation.ts +175 -0
  490. package/src/client/billing/renewalAttach/internal/test-fixtures/attachEntries.ts +217 -0
  491. package/src/client/billing/renewalAttach/internal/test-fixtures/attachObservations.ts +226 -0
  492. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenario.ts +556 -0
  493. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioAssertions.ts +180 -0
  494. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioBarriers.ts +144 -0
  495. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightAssertions.ts +122 -0
  496. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightBarriers.ts +330 -0
  497. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightControls.ts +139 -0
  498. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightOperation.ts +513 -0
  499. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadNativeBaseline.ts +344 -0
  500. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadOperation.ts +278 -0
  501. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadPort.ts +17 -0
  502. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteAssertions.ts +533 -0
  503. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteBarriers.ts +125 -0
  504. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDeclarations.ts +314 -0
  505. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteHistory.ts +463 -0
  506. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteObservations.ts +515 -0
  507. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteOperation.ts +600 -0
  508. package/src/client/billing/renewalAttach/internal/test-fixtures/observationAssertions.ts +211 -0
  509. package/src/client/billing/renewalAttach/internal/test-fixtures/observationDeclarations.ts +192 -0
  510. package/src/client/billing/renewalAttach/internal/test-fixtures/observationHTTP.ts +197 -0
  511. package/src/client/billing/renewalAttach/internal/test-fixtures/observationObservations.ts +269 -0
  512. package/src/client/billing/renewalAttach/internal/test-fixtures/observationOperation.ts +262 -0
  513. package/src/client/billing/renewalAttach/internal/test-fixtures/observationProbe.ts +319 -0
  514. package/src/client/billing/renewalAttach/internal/test-fixtures/ownedOperations.ts +94 -0
  515. package/src/client/billing/renewalAttach/internal/test-fixtures/sourceOperationPort.ts +16 -0
  516. package/src/client/billing/renewalAttach/internal/test-fixtures/stockHttp.ts +21 -0
@@ -0,0 +1,175 @@
1
+ import type { EventRecord } from "./ownData.js";
2
+ import "./test-fixtures/semanticSetup.js";
3
+ import { it as test } from "vitest";
4
+ import assert from "node:assert/strict";
5
+ const { fixture, copy, wire, sdk } =
6
+ await import("./test-fixtures/fixture.mjs");
7
+ const { createAttachEventCompiler, createConfigureEventCompiler } =
8
+ await import("./test-fixtures/compilerIndex.mjs");
9
+ const {
10
+ objectNode: O,
11
+ scalarNode: S,
12
+ eventDigest,
13
+ } = await import("./eventCodec.js");
14
+ const delivery = () => {
15
+ const records: EventRecord[] = [];
16
+ return {
17
+ records,
18
+ options: {
19
+ timeoutMs: 5000,
20
+ send: async (r: EventRecord, ack: (value: unknown) => void) => {
21
+ records.push(r);
22
+ ack({ sequence: r.sequence, binding: r.binding });
23
+ },
24
+ },
25
+ };
26
+ };
27
+ test("fully coherent C9 for another body cannot substitute retained same response", async () => {
28
+ const f = await fixture(),
29
+ d = delivery(),
30
+ c = createConfigureEventCompiler(f.sourceConfigure, d.options);
31
+ await c.dispatch({
32
+ event: "dispatch",
33
+ stage: "configure",
34
+ request: f.configure,
35
+ });
36
+ await c.response({
37
+ event: "response",
38
+ stage: "configure",
39
+ request: f.configure,
40
+ body: f.s.configuredBody,
41
+ transport: f.transport,
42
+ });
43
+ const other = copy(f.s.configuredBody);
44
+ other.metadata.c10_full_forgery = "ordinary";
45
+ const forged = await sdk.constructRenewalConfigurationReceiptV2({
46
+ configuration: f.sourceConfigure,
47
+ actualDispatch: wire(f.configure),
48
+ providerSnapshot: other,
49
+ transport: f.transport,
50
+ });
51
+ await assert.rejects(
52
+ c.receipt({
53
+ event: "receipt",
54
+ stage: "configure",
55
+ request: f.configure,
56
+ receipt: forged,
57
+ }),
58
+ /C10_SOURCE_STOP/,
59
+ );
60
+ assert.equal(d.records.length, 2);
61
+ });
62
+ test("complete C6 status profile and providerQualification compared beyond C6 preimage", async () => {
63
+ const f = await fixture();
64
+ for (const kind of ["status", "profile", "qualification"]) {
65
+ const d = delivery(),
66
+ c = createConfigureEventCompiler(f.sourceConfigure, d.options),
67
+ request = copy(f.configure);
68
+ if (kind === "status") request.status = "forged";
69
+ if (kind === "profile") request.profile.billingMode = "classic";
70
+ if (kind === "qualification") request.providerQualification = "qualified";
71
+ await assert.rejects(
72
+ c.dispatch({ event: "dispatch", stage: "configure", request }),
73
+ /C10_SOURCE_STOP/,
74
+ );
75
+ assert.equal(d.records.length, 0, kind);
76
+ }
77
+ });
78
+ test("live source Proxy get trap is never used for selected own-data values", async () => {
79
+ const f = await fixture(),
80
+ d = delivery();
81
+ let gets = 0;
82
+ const raw = new Proxy(copy(f.sourceAttach), {
83
+ get() {
84
+ gets++;
85
+ throw Error("GET_TRAP");
86
+ },
87
+ });
88
+ const c = createAttachEventCompiler(raw, d.options);
89
+ await c.dispatch({ event: "dispatch", stage: "attach", request: f.request });
90
+ assert.equal(gets, 0);
91
+ assert.equal(d.records.length, 1);
92
+ });
93
+ test("response credential text stops before C10 hash or send", async () => {
94
+ const f = await fixture(),
95
+ d = delivery(),
96
+ c = createAttachEventCompiler(f.sourceAttach, d.options);
97
+ await c.dispatch({ event: "dispatch", stage: "attach", request: f.request });
98
+ const body = copy(f.s.attach.providerSnapshot);
99
+ body.extra = "sk_test_SYNTHETIC";
100
+ let hashes = 0;
101
+ const original = globalThis.crypto.subtle.digest;
102
+ globalThis.crypto.subtle.digest = function (...a) {
103
+ hashes++;
104
+ return original.apply(this, a);
105
+ };
106
+ try {
107
+ await assert.rejects(
108
+ c.response({
109
+ event: "response",
110
+ stage: "attach",
111
+ request: f.request,
112
+ body,
113
+ status: 200,
114
+ }),
115
+ /C10_SOURCE_STOP/,
116
+ );
117
+ assert.equal(hashes, 0);
118
+ assert.equal(d.records.length, 1);
119
+ } finally {
120
+ globalThis.crypto.subtle.digest = original;
121
+ }
122
+ });
123
+ test("stage channels explicitly each start1 and do not establish combined lineage", async () => {
124
+ const f = await fixture(),
125
+ a = delivery(),
126
+ b = delivery(),
127
+ ca = createAttachEventCompiler(f.sourceAttach, a.options),
128
+ cb = createConfigureEventCompiler(f.sourceConfigure, b.options);
129
+ await ca.dispatch({ event: "dispatch", stage: "attach", request: f.request });
130
+ await cb.dispatch({
131
+ event: "dispatch",
132
+ stage: "configure",
133
+ request: f.configure,
134
+ });
135
+ assert.equal(ca.stageChannel, "attach");
136
+ assert.equal(cb.stageChannel, "configure");
137
+ assert.equal(ca.combinedProducerLineageEstablished, false);
138
+ assert.equal(cb.combinedProducerLineageEstablished, false);
139
+ assert.equal(a.records[0].sequence, 1);
140
+ assert.equal(b.records[0].sequence, 1);
141
+ assert.throws(
142
+ () =>
143
+ createAttachEventCompiler(f.sourceAttach, {
144
+ ...a.options,
145
+ startSequence: 9,
146
+ }),
147
+ /C10_SOURCE_STOP/,
148
+ );
149
+ });
150
+ test("codec raw array-index character budget independently enforced before hash", async () => {
151
+ const array = Object.freeze({
152
+ kind: "array" as const,
153
+ entries: Object.freeze(
154
+ Array.from({ length: 7500 }, (_, i) =>
155
+ Object.freeze([String(i), S(0)] as const),
156
+ ),
157
+ ),
158
+ });
159
+ const node = O([
160
+ ["text", S("x".repeat(480000))],
161
+ ["items", array],
162
+ ]);
163
+ let hashes = 0;
164
+ const original = globalThis.crypto.subtle.digest;
165
+ globalThis.crypto.subtle.digest = function (...a) {
166
+ hashes++;
167
+ return original.apply(this, a);
168
+ };
169
+ try {
170
+ await assert.rejects(eventDigest(node), /C10_SOURCE_STOP/);
171
+ assert.equal(hashes, 0);
172
+ } finally {
173
+ globalThis.crypto.subtle.digest = original;
174
+ }
175
+ });
@@ -0,0 +1,114 @@
1
+ import type { EventRecord } from "./ownData.js";
2
+ import "./test-fixtures/semanticSetup.js";
3
+ import { it as test } from "vitest";
4
+ import assert from "node:assert/strict";
5
+ import {
6
+ createAttachEventCompiler,
7
+ createConfigureEventCompiler,
8
+ } from "./test-fixtures/compilerIndex.mjs";
9
+ import * as sdk from "./publicApi.js";
10
+ import * as material from "./test-fixtures/frozen/f12.mjs";
11
+ import {
12
+ copy,
13
+ wire,
14
+ configureCase,
15
+ expectedPrepared,
16
+ binding,
17
+ } from "./test-fixtures/publishedRawkeyHelper.mjs";
18
+ // NEW raw facts are declared by configureCase before constructing any child. No provider observed.
19
+ test("0881 six C10 events and both classifier stages rebuild the same complete raw children", async () => {
20
+ const x = configureCase(),
21
+ sourceConfigure = copy(x.configuration),
22
+ sourceAttach = copy(sourceConfigure.attachReceipt.attachRequest);
23
+ const prepared = await sdk.prepareRenewalPriceReplacementV2(
24
+ copy(sourceAttach.preparation),
25
+ );
26
+ assert.deepEqual(prepared, expectedPrepared(sourceAttach.preparation));
27
+ const request = await sdk.prepareRenewalScheduleAttachmentV2({
28
+ prepared,
29
+ apiVersion: sourceAttach.apiVersion,
30
+ attachKey: sourceAttach.attachKey,
31
+ firstDispatchedAt: sourceAttach.firstDispatchedAt,
32
+ });
33
+ const attach = await sdk.constructRenewalScheduleAttachmentReceiptV2(
34
+ copy(sourceConfigure.attachReceipt),
35
+ );
36
+ const configure = await sdk.projectRenewalConfigurationV2(
37
+ copy(sourceConfigure),
38
+ );
39
+ assert.equal(configure.status, "projected_configure_request");
40
+ // Identity-valid unchanged baseline response deliberately makes no configuration-application claim.
41
+ const responseBody = copy(sourceConfigure.schedule),
42
+ transport = { status: 200, requestId: "req_SYNTHETIC_ADOPTION" };
43
+ const stored = await sdk.constructRenewalConfigurationReceiptV2({
44
+ configuration: copy(sourceConfigure),
45
+ actualDispatch: wire(configure),
46
+ providerSnapshot: responseBody,
47
+ transport,
48
+ });
49
+ const a = await material.classifyRetainedAttachmentV2({
50
+ attachRequest: copy(sourceAttach),
51
+ intent: "initial",
52
+ }),
53
+ c = await material.classifyFreshConfigurationV2(copy(x));
54
+ assert.equal(a.status, "classified");
55
+ assert.equal(c.status, "classified");
56
+ assert.deepEqual(a.material.originalPrepared, prepared);
57
+ assert.deepEqual(c.material.originalPrepared, prepared);
58
+ assert.deepEqual(a.material.completeRequest, request);
59
+ assert.deepEqual(c.material.completeRequest, configure);
60
+ assert.deepEqual(c.material.stageEvidence.acknowledgedAttachReceipt, attach);
61
+ for (const stage of ["attach", "configure"] as const) {
62
+ const records: EventRecord[] = [],
63
+ opts = {
64
+ timeoutMs: 5000,
65
+ send: async (r: EventRecord, ack: (value: unknown) => void) => {
66
+ records.push(r);
67
+ ack({ sequence: r.sequence, binding: r.binding });
68
+ },
69
+ };
70
+ const compiler =
71
+ stage === "attach"
72
+ ? createAttachEventCompiler(sourceAttach, opts)
73
+ : createConfigureEventCompiler(sourceConfigure, opts);
74
+ const events =
75
+ stage === "attach"
76
+ ? [
77
+ { event: "dispatch", stage, request },
78
+ {
79
+ event: "response",
80
+ stage,
81
+ request,
82
+ body: copy(sourceConfigure.attachReceipt.providerSnapshot),
83
+ status: 200,
84
+ },
85
+ { event: "receipt", stage, request, receipt: attach },
86
+ ]
87
+ : [
88
+ { event: "dispatch", stage, request: configure },
89
+ {
90
+ event: "response",
91
+ stage,
92
+ request: configure,
93
+ body: responseBody,
94
+ transport,
95
+ },
96
+ { event: "receipt", stage, request: configure, receipt: stored },
97
+ ];
98
+ const expected = copy(events);
99
+ for (const event of events)
100
+ await compiler[event.event as "dispatch" | "response" | "receipt"](event);
101
+ assert.equal(records.length, 3);
102
+ for (const [i, r] of records.entries()) {
103
+ assert.equal(r.sequence, i + 1);
104
+ assert.deepEqual(r.data, expected[i]);
105
+ assert.equal(
106
+ r.binding,
107
+ binding("unbound-qualification-event", {
108
+ sequence: i + 1,
109
+ data: expected[i],
110
+ }),
111
+ );
112
+ }
113
+ }
114
+ });
@@ -0,0 +1,103 @@
1
+ import type { CapturedNode } from "./eventCodec.js";
2
+ export function stop(): never {
3
+ throw Error("C10_SOURCE_STOP");
4
+ }
5
+ export function need(x: unknown): asserts x {
6
+ if (!x) stop();
7
+ }
8
+ export function freeze<T>(x: T): T {
9
+ if (x && typeof x === "object") {
10
+ for (const v of Object.values(x)) freeze(v);
11
+ Object.freeze(x);
12
+ }
13
+ return x;
14
+ }
15
+ export function closed(
16
+ raw: unknown,
17
+ required: readonly string[],
18
+ optional: readonly string[] = [],
19
+ ): Record<string, unknown> {
20
+ need(raw && typeof raw === "object" && !Array.isArray(raw));
21
+ const p = Object.getPrototypeOf(raw);
22
+ need(p === Object.prototype || p === null);
23
+ const keys = Reflect.ownKeys(raw);
24
+ need(
25
+ keys.every(
26
+ (k) =>
27
+ typeof k === "string" && (required.includes(k) || optional.includes(k)),
28
+ ) && required.every((k) => keys.includes(k)),
29
+ );
30
+ const out = Object.create(null) as Record<string, unknown>;
31
+ for (const k of keys) {
32
+ need(typeof k === "string");
33
+ const d = Object.getOwnPropertyDescriptor(raw, k);
34
+ need(d && d.enumerable && Object.prototype.hasOwnProperty.call(d, "value"));
35
+ out[k] = d.value;
36
+ }
37
+ return out;
38
+ }
39
+ export function equalNodes(a: CapturedNode, b: CapturedNode): boolean {
40
+ if (a.kind !== b.kind) return false;
41
+ if (a.kind === "scalar") return b.kind === "scalar" && a.value === b.value;
42
+ if (b.kind === "scalar" || a.entries.length !== b.entries.length)
43
+ return false;
44
+ const other = new Map(b.entries);
45
+ return a.entries.every(
46
+ ([k, v]) => other.has(k) && equalNodes(v, other.get(k)!),
47
+ );
48
+ }
49
+ export function field(node: CapturedNode, key: string): CapturedNode {
50
+ need(node.kind === "object");
51
+ const pair = node.entries.find(([k]) => k === key);
52
+ need(pair);
53
+ return pair[1];
54
+ }
55
+ export function scalar(node: CapturedNode): unknown {
56
+ need(node.kind === "scalar");
57
+ return node.value;
58
+ }
59
+ export interface EventRecord {
60
+ readonly sequence: number;
61
+ readonly binding: string;
62
+ readonly data: unknown;
63
+ }
64
+ export interface AppendOptions {
65
+ readonly timeoutMs: number;
66
+ readonly send: (
67
+ record: Readonly<EventRecord>,
68
+ ack: (value: unknown) => void,
69
+ ) => unknown;
70
+ }
71
+ export function options(raw: unknown): AppendOptions {
72
+ try {
73
+ const x = closed(raw, ["send", "timeoutMs"]);
74
+ need(
75
+ typeof x.send === "function" &&
76
+ typeof x.timeoutMs === "number" &&
77
+ Number.isSafeInteger(x.timeoutMs) &&
78
+ x.timeoutMs >= 1 &&
79
+ x.timeoutMs <= 5000,
80
+ );
81
+ return x as unknown as AppendOptions;
82
+ } catch {
83
+ stop();
84
+ }
85
+ }
86
+ type Wire = {
87
+ scope: string;
88
+ apiVersion: string;
89
+ method: string;
90
+ path: string;
91
+ payload: unknown;
92
+ key: string;
93
+ firstDispatchedAt: number;
94
+ };
95
+ export const sevenWire = <T extends Wire>(r: T): Pick<T, keyof Wire> => ({
96
+ scope: r.scope,
97
+ apiVersion: r.apiVersion,
98
+ method: r.method,
99
+ path: r.path,
100
+ payload: r.payload,
101
+ key: r.key,
102
+ firstDispatchedAt: r.firstDispatchedAt,
103
+ });
@@ -0,0 +1,2 @@
1
+ /** The same internal original owner. No caller clock or replacement origin. */
2
+ export { OWNER as SOURCE_OWNER } from "../originalOwner.js";
@@ -0,0 +1,283 @@
1
+ import { afterEach, expect, it, vi } from "vitest";
2
+ import type { EventRecord } from "./ownData.js";
3
+
4
+ function deferred<T>() {
5
+ let resolve!: (value: T) => void;
6
+ const promise = new Promise<T>((r) => {
7
+ resolve = r;
8
+ });
9
+ return { promise, resolve };
10
+ }
11
+ afterEach(() => {
12
+ vi.doUnmock("../sourceBindings.js");
13
+ vi.doUnmock("./publicApi.js");
14
+ vi.resetModules();
15
+ vi.useRealTimers();
16
+ });
17
+
18
+ async function rig() {
19
+ vi.resetModules();
20
+ const { fixture } = await import("./test-fixtures/fixture.mjs");
21
+ const f = await fixture();
22
+ const start = f.sourceAttach.firstDispatchedAt * 1000;
23
+ const time = { wallMs: start, ns: BigInt(start) * 1_000_000n };
24
+ const basis = {
25
+ startWallMs: start,
26
+ startNs: time.ns,
27
+ workEndWallMs: start + 180_000,
28
+ workEndNs: time.ns + 180_000_000_000n,
29
+ endWallMs: start + 210_000,
30
+ endNs: time.ns + 210_000_000_000n,
31
+ };
32
+ const source = {
33
+ clock: {
34
+ basis,
35
+ sample: () => ({ ...time }),
36
+ subscribeRetirement: () => () => {},
37
+ },
38
+ originalPolicy: {
39
+ firstDispatchedAt: f.sourceAttach.firstDispatchedAt,
40
+ periodStart: f.sourceAttach.firstDispatchedAt - 1,
41
+ periodEnd: f.sourceAttach.firstDispatchedAt + 1000,
42
+ },
43
+ originAssociation: Object.freeze({}),
44
+ };
45
+ vi.doMock("../sourceBindings.js", () => ({
46
+ loadOwnedOriginalSource: () => source,
47
+ }));
48
+ const { OWNER } = await import("../originalOwner.js");
49
+ return { f, time, basis, OWNER };
50
+ }
51
+
52
+ const boundaries = [
53
+ ["C1", "prepareRenewalPriceReplacementV2", "attach", "dispatch"],
54
+ ["C2", "prepareRenewalScheduleAttachmentV2", "attach", "dispatch"],
55
+ ["C3", "constructRenewalScheduleAttachmentReceiptV2", "attach", "receipt"],
56
+ ["C6", "projectRenewalConfigurationV2", "configure", "dispatch"],
57
+ ["C9", "constructRenewalConfigurationReceiptV2", "configure", "receipt"],
58
+ ] as const;
59
+
60
+ for (const [family, method, stage, branch] of boundaries) {
61
+ it(`actual original owner retirement rejects held real ${family} before the next continuation`, async () => {
62
+ const { f, OWNER } = await rig();
63
+ const api = await import("./publicApi.js");
64
+ const entered = deferred<void>(),
65
+ release = deferred<void>();
66
+ const calls: string[] = [];
67
+ const held: Promise<unknown>[] = [];
68
+ const facade = Object.fromEntries(
69
+ Object.entries(api).map(([name, fn]) => [
70
+ name,
71
+ async (...args: unknown[]) => {
72
+ calls.push(name);
73
+ const value = await Reflect.apply(fn, undefined, args);
74
+ if (name === method) {
75
+ entered.resolve();
76
+ await release.promise;
77
+ }
78
+ return value;
79
+ },
80
+ ]),
81
+ );
82
+ vi.doMock("./publicApi.js", () => facade);
83
+ const { createAttachEventCompiler } = await import("./attachEvents.js");
84
+ const { createConfigureEventCompiler } =
85
+ await import("./configureEvents.js");
86
+ const records: EventRecord[] = [];
87
+ const options = {
88
+ timeoutMs: 5000,
89
+ send(record: EventRecord, ack: (v: unknown) => void) {
90
+ records.push(record);
91
+ ack({ sequence: record.sequence, binding: record.binding });
92
+ },
93
+ };
94
+ const request = stage === "attach" ? f.request : f.configure;
95
+ const compiler =
96
+ stage === "attach"
97
+ ? createAttachEventCompiler(f.sourceAttach, options)
98
+ : createConfigureEventCompiler(f.sourceConfigure, options);
99
+ if (branch === "receipt") {
100
+ await compiler.dispatch({ event: "dispatch", stage, request });
101
+ await compiler.response(
102
+ stage === "attach"
103
+ ? {
104
+ event: "response",
105
+ stage,
106
+ request,
107
+ body: f.s.attach.providerSnapshot,
108
+ status: 200,
109
+ }
110
+ : {
111
+ event: "response",
112
+ stage,
113
+ request,
114
+ body: f.s.configuredBody,
115
+ transport: f.transport,
116
+ },
117
+ );
118
+ }
119
+ const before = records.length;
120
+ const operation =
121
+ branch === "dispatch"
122
+ ? compiler.dispatch({ event: "dispatch", stage, request })
123
+ : compiler.receipt({
124
+ event: "receipt",
125
+ stage,
126
+ request,
127
+ receipt: stage === "attach" ? f.attach : f.stored,
128
+ });
129
+ // A setup refusal must fail this prerequisite rather than hang at the barrier.
130
+ const settled = operation.then(
131
+ () => {
132
+ throw Error("SETTLED_BEFORE_REAL_CONSTRUCTOR_BARRIER");
133
+ },
134
+ () => {
135
+ throw Error("REFUSED_BEFORE_REAL_CONSTRUCTOR_BARRIER");
136
+ },
137
+ );
138
+ held.push(settled.catch(() => {}));
139
+ try {
140
+ await Promise.race([entered.promise, settled]);
141
+ const entries = calls.length;
142
+ OWNER.retire();
143
+ await expect(operation).rejects.toThrow("C10_SOURCE_STOP");
144
+ expect(records).toHaveLength(before);
145
+ release.resolve();
146
+ await Promise.all(held);
147
+ expect(calls).toHaveLength(entries);
148
+ expect(() => OWNER.check()).toThrow("ORIGINAL_OWNER_STOP");
149
+ } finally {
150
+ release.resolve();
151
+ await operation.catch(() => {});
152
+ }
153
+ });
154
+ }
155
+
156
+ it("ACK alone cannot succeed after actual owner retirement while send remains held", async () => {
157
+ const { OWNER } = await rig();
158
+ const { createAppendAckAdapter } = await import("./appendAck.js");
159
+ const { scalarNode } = await import("./eventCodec.js");
160
+ const entered = deferred<void>(),
161
+ release = deferred<void>();
162
+ let sends = 0;
163
+ const append = createAppendAckAdapter({
164
+ timeoutMs: 5000,
165
+ send(record: EventRecord, ack: (v: unknown) => void) {
166
+ sends++;
167
+ ack({ sequence: record.sequence, binding: record.binding });
168
+ entered.resolve();
169
+ return release.promise;
170
+ },
171
+ });
172
+ const operation = append(scalarNode("ordinary"));
173
+ try {
174
+ await entered.promise;
175
+ OWNER.retire();
176
+ await expect(operation).rejects.toThrow("C10_SOURCE_STOP");
177
+ release.resolve();
178
+ await expect(append(scalarNode("late"))).rejects.toThrow("C10_SOURCE_STOP");
179
+ expect(sends).toBe(1);
180
+ } finally {
181
+ release.resolve();
182
+ await operation.catch(() => {});
183
+ }
184
+ });
185
+
186
+ it.each(["append", "original"] as const)(
187
+ "%s deadline closes held send without resetting the original basis",
188
+ async (limit) => {
189
+ const { OWNER, time, basis } = await rig();
190
+ vi.useFakeTimers();
191
+ if (limit === "original") {
192
+ time.wallMs = basis.workEndWallMs - 20;
193
+ time.ns = basis.workEndNs - 20_000_000n;
194
+ }
195
+ const { createAppendAckAdapter } = await import("./appendAck.js");
196
+ const { scalarNode } = await import("./eventCodec.js");
197
+ const entered = deferred<void>(),
198
+ release = deferred<void>();
199
+ const append = createAppendAckAdapter({
200
+ timeoutMs: limit === "append" ? 25 : 5000,
201
+ send(record: EventRecord, ack: (v: unknown) => void) {
202
+ ack({ sequence: record.sequence, binding: record.binding });
203
+ entered.resolve();
204
+ return release.promise;
205
+ },
206
+ });
207
+ const operation = append(scalarNode("ordinary"));
208
+ const rejection = expect(operation).rejects.toThrow("C10_SOURCE_STOP");
209
+ try {
210
+ await entered.promise;
211
+ const originalBasis = OWNER.basis;
212
+ const delta = limit === "append" ? 25 : 20;
213
+ time.wallMs += delta;
214
+ time.ns += BigInt(delta) * 1_000_000n;
215
+ await vi.advanceTimersByTimeAsync(delta);
216
+ await rejection;
217
+ expect(originalBasis.startWallMs).toBe(basis.startWallMs);
218
+ if (limit === "append") expect(OWNER.check().retired).toBe(false);
219
+ else expect(() => OWNER.check()).toThrow("ORIGINAL_OWNER_STOP");
220
+ } finally {
221
+ release.resolve();
222
+ await operation.catch(() => {});
223
+ }
224
+ },
225
+ );
226
+
227
+ it("retirement at the real C10 digest return prevents actual send", async () => {
228
+ const { OWNER } = await rig();
229
+ const { createAppendAckAdapter } = await import("./appendAck.js");
230
+ const { scalarNode } = await import("./eventCodec.js");
231
+ const original = globalThis.crypto.subtle.digest;
232
+ const entered = deferred<void>(),
233
+ release = deferred<void>();
234
+ let sends = 0,
235
+ realDigests = 0;
236
+ const operations: Promise<ArrayBuffer>[] = [];
237
+ const spy = vi
238
+ .spyOn(globalThis.crypto.subtle, "digest")
239
+ .mockImplementation(function (algorithm, input) {
240
+ // This facade forwards the actual receiver and original bytes without replacement.
241
+ const operation = Reflect.apply(original, globalThis.crypto.subtle, [
242
+ algorithm,
243
+ input,
244
+ ]).then(async (value: ArrayBuffer) => {
245
+ realDigests++;
246
+ entered.resolve();
247
+ await release.promise;
248
+ return value;
249
+ });
250
+ operations.push(operation);
251
+ return operation;
252
+ });
253
+ const append = createAppendAckAdapter({
254
+ timeoutMs: 5000,
255
+ send() {
256
+ sends++;
257
+ },
258
+ });
259
+ const operation = append(scalarNode("ordinary"));
260
+ const settled = operation.then(
261
+ () => {
262
+ throw Error("SETTLED_BEFORE_DIGEST");
263
+ },
264
+ () => {
265
+ throw Error("REFUSED_BEFORE_DIGEST");
266
+ },
267
+ );
268
+ void settled.catch(() => {});
269
+ try {
270
+ await Promise.race([entered.promise, settled]);
271
+ OWNER.retire();
272
+ await expect(operation).rejects.toThrow("C10_SOURCE_STOP");
273
+ release.resolve();
274
+ await Promise.all(operations);
275
+ expect(realDigests).toBe(1);
276
+ expect(sends).toBe(0);
277
+ } finally {
278
+ release.resolve();
279
+ await operation.catch(() => {});
280
+ await Promise.allSettled(operations);
281
+ spy.mockRestore();
282
+ }
283
+ });