@fantastic.dev/better-stripe 0.88.1 → 0.90.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 (335) 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/raw-acquisition.test.d.ts +2 -0
  16. package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.d.ts.map +1 -0
  17. package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js +372 -0
  18. package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js.map +1 -0
  19. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts +24 -0
  20. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -0
  21. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +113 -0
  22. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js.map +1 -0
  23. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.d.ts +55 -0
  24. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.d.ts.map +1 -0
  25. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.js +87 -0
  26. package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.js.map +1 -0
  27. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts +7 -0
  28. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -0
  29. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +130 -0
  30. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js.map +1 -0
  31. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.d.ts +14 -0
  32. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.d.ts.map +1 -0
  33. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.js +60 -0
  34. package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.js.map +1 -0
  35. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.d.ts +2 -0
  36. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.d.ts.map +1 -0
  37. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js +126 -0
  38. package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js.map +1 -0
  39. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.d.mts +627 -0
  40. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.d.mts.map +1 -0
  41. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs +488 -0
  42. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs.map +1 -0
  43. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.d.mts +214 -0
  44. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.d.mts.map +1 -0
  45. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs +63 -0
  46. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs.map +1 -0
  47. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.d.mts +75 -0
  48. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.d.mts.map +1 -0
  49. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs +145 -0
  50. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs.map +1 -0
  51. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts +7 -0
  52. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts.map +1 -0
  53. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs +26 -0
  54. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs.map +1 -0
  55. package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts +14 -0
  56. package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts.map +1 -0
  57. package/dist/client/billing/renewalAttach/internal/c10/appendAck.js +202 -0
  58. package/dist/client/billing/renewalAttach/internal/c10/appendAck.js.map +1 -0
  59. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts +23 -0
  60. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts.map +1 -0
  61. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js +117 -0
  62. package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js.map +1 -0
  63. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts +23 -0
  64. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts.map +1 -0
  65. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js +111 -0
  66. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js.map +1 -0
  67. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.d.ts +11 -0
  68. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.d.ts.map +1 -0
  69. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.js +376 -0
  70. package/dist/client/billing/renewalAttach/internal/c10/eventCapture.js.map +1 -0
  71. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.d.ts +16 -0
  72. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.d.ts.map +1 -0
  73. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.js +119 -0
  74. package/dist/client/billing/renewalAttach/internal/c10/eventCodec.js.map +1 -0
  75. package/dist/client/billing/renewalAttach/internal/c10/ownData.d.ts +30 -0
  76. package/dist/client/billing/renewalAttach/internal/c10/ownData.d.ts.map +1 -0
  77. package/dist/client/billing/renewalAttach/internal/c10/ownData.js +74 -0
  78. package/dist/client/billing/renewalAttach/internal/c10/ownData.js.map +1 -0
  79. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.d.ts +3 -0
  80. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.d.ts.map +1 -0
  81. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.js +3 -0
  82. package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.js.map +1 -0
  83. package/dist/client/billing/renewalAttach/internal/c10/privacy.d.ts +2 -0
  84. package/dist/client/billing/renewalAttach/internal/c10/privacy.d.ts.map +1 -0
  85. package/dist/client/billing/renewalAttach/internal/c10/privacy.js +175 -0
  86. package/dist/client/billing/renewalAttach/internal/c10/privacy.js.map +1 -0
  87. package/dist/client/billing/renewalAttach/internal/c10/publicApi.d.ts +3 -0
  88. package/dist/client/billing/renewalAttach/internal/c10/publicApi.d.ts.map +1 -0
  89. package/dist/client/billing/renewalAttach/internal/c10/publicApi.js +3 -0
  90. package/dist/client/billing/renewalAttach/internal/c10/publicApi.js.map +1 -0
  91. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.d.mts +3 -0
  92. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.d.mts.map +1 -0
  93. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs +4 -0
  94. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs.map +1 -0
  95. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.d.mts +26 -0
  96. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.d.mts.map +1 -0
  97. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs +42 -0
  98. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs.map +1 -0
  99. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.d.mts +7 -0
  100. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.d.mts.map +1 -0
  101. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs +60 -0
  102. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs.map +1 -0
  103. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.d.mts +335 -0
  104. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.d.mts.map +1 -0
  105. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs +122 -0
  106. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs.map +1 -0
  107. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.d.mts +46 -0
  108. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.d.mts.map +1 -0
  109. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs +87 -0
  110. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs.map +1 -0
  111. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.d.mts +35 -0
  112. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.d.mts.map +1 -0
  113. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs +90 -0
  114. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs.map +1 -0
  115. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.d.mts +132 -0
  116. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.d.mts.map +1 -0
  117. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs +82 -0
  118. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs.map +1 -0
  119. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.d.mts +4 -0
  120. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.d.mts.map +1 -0
  121. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs +23 -0
  122. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs.map +1 -0
  123. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.d.mts +16 -0
  124. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.d.mts.map +1 -0
  125. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs +41 -0
  126. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs.map +1 -0
  127. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.d.mts +43 -0
  128. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.d.mts.map +1 -0
  129. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs +132 -0
  130. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs.map +1 -0
  131. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.d.mts +200 -0
  132. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.d.mts.map +1 -0
  133. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs +150 -0
  134. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs.map +1 -0
  135. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.d.mts +124 -0
  136. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.d.mts.map +1 -0
  137. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs +127 -0
  138. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs.map +1 -0
  139. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.d.mts +3 -0
  140. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.d.mts.map +1 -0
  141. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs +69 -0
  142. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs.map +1 -0
  143. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.d.mts +2 -0
  144. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.d.mts.map +1 -0
  145. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs +152 -0
  146. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs.map +1 -0
  147. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.d.mts +2 -0
  148. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.d.mts.map +1 -0
  149. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs +2 -0
  150. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs.map +1 -0
  151. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.d.mts +5 -0
  152. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.d.mts.map +1 -0
  153. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs +243 -0
  154. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs.map +1 -0
  155. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.d.mts +17 -0
  156. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.d.mts.map +1 -0
  157. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs +75 -0
  158. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs.map +1 -0
  159. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.d.mts +2 -0
  160. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.d.mts.map +1 -0
  161. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs +173 -0
  162. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs.map +1 -0
  163. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.d.mts +4 -0
  164. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.d.mts.map +1 -0
  165. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs +4 -0
  166. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs.map +1 -0
  167. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.d.mts +7 -0
  168. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.d.mts.map +1 -0
  169. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs +30 -0
  170. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs.map +1 -0
  171. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.d.mts +29 -0
  172. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.d.mts.map +1 -0
  173. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs +33 -0
  174. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs.map +1 -0
  175. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f19.json +452 -0
  176. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.d.mts +2 -0
  177. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.d.mts.map +1 -0
  178. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs +173 -0
  179. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs.map +1 -0
  180. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.d.mts +2 -0
  181. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.d.mts.map +1 -0
  182. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs +449 -0
  183. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs.map +1 -0
  184. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.d.mts +9 -0
  185. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.d.mts.map +1 -0
  186. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs +27 -0
  187. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs.map +1 -0
  188. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.d.mts +7 -0
  189. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.d.mts.map +1 -0
  190. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs +150 -0
  191. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs.map +1 -0
  192. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.d.mts +3 -0
  193. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.d.mts.map +1 -0
  194. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs +503 -0
  195. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs.map +1 -0
  196. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.d.mts +2 -0
  197. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.d.mts.map +1 -0
  198. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs +91 -0
  199. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs.map +1 -0
  200. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.d.mts +14 -0
  201. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.d.mts.map +1 -0
  202. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs +41 -0
  203. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs.map +1 -0
  204. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.d.mts +103 -0
  205. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.d.mts.map +1 -0
  206. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs +46 -0
  207. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs.map +1 -0
  208. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.d.mts +73 -0
  209. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.d.mts.map +1 -0
  210. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs +294 -0
  211. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs.map +1 -0
  212. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.d.mts +2 -0
  213. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.d.mts.map +1 -0
  214. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs +60 -0
  215. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs.map +1 -0
  216. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.d.mts +58 -0
  217. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.d.mts.map +1 -0
  218. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs +96 -0
  219. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs.map +1 -0
  220. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.d.ts +2 -0
  221. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.d.ts.map +1 -0
  222. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.js +40 -0
  223. package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.js.map +1 -0
  224. package/dist/client/billing/renewalAttach/internal/material/capture.d.ts +88 -0
  225. package/dist/client/billing/renewalAttach/internal/material/capture.d.ts.map +1 -0
  226. package/dist/client/billing/renewalAttach/internal/material/capture.js +181 -0
  227. package/dist/client/billing/renewalAttach/internal/material/capture.js.map +1 -0
  228. package/dist/client/billing/renewalAttach/internal/material/classifiers.d.ts +522 -0
  229. package/dist/client/billing/renewalAttach/internal/material/classifiers.d.ts.map +1 -0
  230. package/dist/client/billing/renewalAttach/internal/material/classifiers.js +226 -0
  231. package/dist/client/billing/renewalAttach/internal/material/classifiers.js.map +1 -0
  232. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.d.ts +17 -0
  233. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.d.ts.map +1 -0
  234. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.js +95 -0
  235. package/dist/client/billing/renewalAttach/internal/material/nodeKernel.js.map +1 -0
  236. package/dist/client/billing/renewalAttach/internal/material/readMaterial.d.ts +338 -0
  237. package/dist/client/billing/renewalAttach/internal/material/readMaterial.d.ts.map +1 -0
  238. package/dist/client/billing/renewalAttach/internal/material/readMaterial.js +122 -0
  239. package/dist/client/billing/renewalAttach/internal/material/readMaterial.js.map +1 -0
  240. package/dist/client/billing/renewalAttach/internal/material/requiredJson.d.ts +2 -0
  241. package/dist/client/billing/renewalAttach/internal/material/requiredJson.d.ts.map +1 -0
  242. package/dist/client/billing/renewalAttach/internal/material/requiredJson.js +174 -0
  243. package/dist/client/billing/renewalAttach/internal/material/requiredJson.js.map +1 -0
  244. package/dist/client/billing/renewalAttach/internal/originalOwner.d.ts +27 -0
  245. package/dist/client/billing/renewalAttach/internal/originalOwner.d.ts.map +1 -0
  246. package/dist/client/billing/renewalAttach/internal/originalOwner.js +236 -0
  247. package/dist/client/billing/renewalAttach/internal/originalOwner.js.map +1 -0
  248. package/dist/client/billing/renewalAttach/internal/sourceBindings.d.ts +5 -0
  249. package/dist/client/billing/renewalAttach/internal/sourceBindings.d.ts.map +1 -0
  250. package/dist/client/billing/renewalAttach/internal/sourceBindings.js +9 -0
  251. package/dist/client/billing/renewalAttach/internal/sourceBindings.js.map +1 -0
  252. package/dist/client/billing/renewalAttach/internal/stockRawDelegate.d.ts +6 -0
  253. package/dist/client/billing/renewalAttach/internal/stockRawDelegate.d.ts.map +1 -0
  254. package/dist/client/billing/renewalAttach/internal/stockRawDelegate.js +35 -0
  255. package/dist/client/billing/renewalAttach/internal/stockRawDelegate.js.map +1 -0
  256. package/docs/renewal-context-reads.md +43 -0
  257. package/docs/renewal-phase-assembly.md +23 -0
  258. package/docs/renewal-raw-acquisition.md +64 -0
  259. package/package.json +1 -1
  260. package/src/client/billing/renewalAttach/internal/acquisition/array-order.test.js +70 -0
  261. package/src/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.js +23 -0
  262. package/src/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.js +77 -0
  263. package/src/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js +418 -0
  264. package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +160 -0
  265. package/src/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.ts +110 -0
  266. package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +156 -0
  267. package/src/client/billing/renewalAttach/internal/acquisition/readLifetime.ts +64 -0
  268. package/src/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js +138 -0
  269. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs +510 -0
  270. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs +64 -0
  271. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs +159 -0
  272. package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs +25 -0
  273. package/src/client/billing/renewalAttach/internal/c10/appendAck.first.test.ts +86 -0
  274. package/src/client/billing/renewalAttach/internal/c10/appendAck.ts +226 -0
  275. package/src/client/billing/renewalAttach/internal/c10/appendCodec.test.ts +186 -0
  276. package/src/client/billing/renewalAttach/internal/c10/arrayOrder.test.ts +47 -0
  277. package/src/client/billing/renewalAttach/internal/c10/attachEvents.ts +144 -0
  278. package/src/client/billing/renewalAttach/internal/c10/compiler.test.ts +443 -0
  279. package/src/client/billing/renewalAttach/internal/c10/configureEvents.ts +145 -0
  280. package/src/client/billing/renewalAttach/internal/c10/eventCapture.ts +464 -0
  281. package/src/client/billing/renewalAttach/internal/c10/eventCodec.ts +131 -0
  282. package/src/client/billing/renewalAttach/internal/c10/hardening.test.ts +175 -0
  283. package/src/client/billing/renewalAttach/internal/c10/historicalClassifier.test.ts +114 -0
  284. package/src/client/billing/renewalAttach/internal/c10/ownData.ts +103 -0
  285. package/src/client/billing/renewalAttach/internal/c10/ownerBinding.ts +2 -0
  286. package/src/client/billing/renewalAttach/internal/c10/ownerContinuations.test.ts +283 -0
  287. package/src/client/billing/renewalAttach/internal/c10/privacy.ts +181 -0
  288. package/src/client/billing/renewalAttach/internal/c10/publicApi.ts +8 -0
  289. package/src/client/billing/renewalAttach/internal/c10/reflectionPrivacy.test.ts +87 -0
  290. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs +3 -0
  291. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs +49 -0
  292. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs +63 -0
  293. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs +160 -0
  294. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs +88 -0
  295. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs +102 -0
  296. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs +82 -0
  297. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs +20 -0
  298. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs +41 -0
  299. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs +137 -0
  300. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs +153 -0
  301. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs +127 -0
  302. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs +85 -0
  303. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs +170 -0
  304. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs +6 -0
  305. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs +295 -0
  306. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs +78 -0
  307. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs +177 -0
  308. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs +8 -0
  309. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs +34 -0
  310. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs +32 -0
  311. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f19.json +452 -0
  312. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs +177 -0
  313. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs +466 -0
  314. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs +29 -0
  315. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs +165 -0
  316. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs +507 -0
  317. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs +89 -0
  318. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs +38 -0
  319. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs +45 -0
  320. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs +309 -0
  321. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs +58 -0
  322. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs +104 -0
  323. package/src/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.ts +43 -0
  324. package/src/client/billing/renewalAttach/internal/material/capture.ts +243 -0
  325. package/src/client/billing/renewalAttach/internal/material/classifiers.test.ts +510 -0
  326. package/src/client/billing/renewalAttach/internal/material/classifiers.ts +313 -0
  327. package/src/client/billing/renewalAttach/internal/material/nodeKernel.ts +118 -0
  328. package/src/client/billing/renewalAttach/internal/material/readMaterial.ts +176 -0
  329. package/src/client/billing/renewalAttach/internal/material/requiredJson.ts +183 -0
  330. package/src/client/billing/renewalAttach/internal/originalOwner.test.ts +258 -0
  331. package/src/client/billing/renewalAttach/internal/originalOwner.ts +280 -0
  332. package/src/client/billing/renewalAttach/internal/sourceBindings.test.ts +13 -0
  333. package/src/client/billing/renewalAttach/internal/sourceBindings.ts +8 -0
  334. package/src/client/billing/renewalAttach/internal/stockRawDelegate.test.ts +156 -0
  335. package/src/client/billing/renewalAttach/internal/stockRawDelegate.ts +43 -0
@@ -0,0 +1,338 @@
1
+ import { z } from "zod";
2
+ import type { PreparedRenewalPriceReplacement } from "../../../renewalPriceReplacement.js";
3
+ import { readInput } from "../../../renewalAggregate/shared.js";
4
+ export type RenewalPreparationMaterial = Pick<PreparedRenewalPriceReplacement, "expected" | "quantity" | "providerSnapshot">;
5
+ export declare function validateOwnedReadMaterial(args: Omit<z.infer<typeof readInput>, "prepared">, prepared: RenewalPreparationMaterial, scheduleId: string | undefined, ownedDiscounts: {
6
+ subscription: unknown;
7
+ item: unknown;
8
+ }): {
9
+ prepared: RenewalPreparationMaterial;
10
+ subscription: {
11
+ [x: string]: unknown;
12
+ id: string;
13
+ object: "subscription";
14
+ customer_account: string;
15
+ status: "active";
16
+ currency: string;
17
+ livemode: boolean;
18
+ cancel_at: null;
19
+ cancel_at_period_end: false;
20
+ pause_collection: null;
21
+ pending_update: null;
22
+ default_source: null;
23
+ application_fee_percent: null;
24
+ payment_settings: {
25
+ payment_method_options: null;
26
+ payment_method_types: null;
27
+ save_default_payment_method: "off" | null;
28
+ } | null;
29
+ billing_schedules?: unknown[] | undefined;
30
+ items: {
31
+ [x: string]: unknown;
32
+ has_more: false;
33
+ data: [{
34
+ [x: string]: unknown;
35
+ id: string;
36
+ object: "subscription_item";
37
+ subscription: string;
38
+ current_period_start: number;
39
+ current_period_end: number;
40
+ quantity: number;
41
+ price: {
42
+ [x: string]: unknown;
43
+ id: string;
44
+ object: "price";
45
+ product: string | {
46
+ [x: string]: unknown;
47
+ id: string;
48
+ object: "product";
49
+ deleted?: false | undefined;
50
+ };
51
+ active: boolean;
52
+ livemode: boolean;
53
+ type: "recurring";
54
+ currency: string;
55
+ billing_scheme: "per_unit";
56
+ recurring: {
57
+ [x: string]: unknown;
58
+ interval: "day" | "month" | "week" | "year";
59
+ interval_count: number;
60
+ usage_type: "licensed";
61
+ };
62
+ };
63
+ }];
64
+ };
65
+ schedule: string | {
66
+ [x: string]: unknown;
67
+ id: string;
68
+ object: "subscription_schedule";
69
+ deleted?: false | undefined;
70
+ customer_account?: string | undefined;
71
+ livemode?: boolean | undefined;
72
+ } | null;
73
+ };
74
+ item: {
75
+ [x: string]: unknown;
76
+ id: string;
77
+ object: "subscription_item";
78
+ subscription: string;
79
+ current_period_start: number;
80
+ current_period_end: number;
81
+ quantity: number;
82
+ price: {
83
+ [x: string]: unknown;
84
+ id: string;
85
+ object: "price";
86
+ product: string | {
87
+ [x: string]: unknown;
88
+ id: string;
89
+ object: "product";
90
+ deleted?: false | undefined;
91
+ };
92
+ active: boolean;
93
+ livemode: boolean;
94
+ type: "recurring";
95
+ currency: string;
96
+ billing_scheme: "per_unit";
97
+ recurring: {
98
+ [x: string]: unknown;
99
+ interval: "day" | "month" | "week" | "year";
100
+ interval_count: number;
101
+ usage_type: "licensed";
102
+ };
103
+ };
104
+ };
105
+ customer: {
106
+ [x: string]: unknown;
107
+ id: string;
108
+ object: "customer";
109
+ customer_account: string;
110
+ livemode: boolean;
111
+ deleted?: false | undefined;
112
+ discount: {
113
+ [x: string]: unknown;
114
+ id: string;
115
+ object: "discount";
116
+ deleted?: false | undefined;
117
+ } | null;
118
+ };
119
+ targetPrice: {
120
+ [x: string]: unknown;
121
+ id: string;
122
+ object: "price";
123
+ product: string | {
124
+ [x: string]: unknown;
125
+ id: string;
126
+ object: "product";
127
+ deleted?: false | undefined;
128
+ };
129
+ active: boolean;
130
+ livemode: boolean;
131
+ type: "recurring";
132
+ currency: string;
133
+ billing_scheme: "per_unit";
134
+ recurring: {
135
+ [x: string]: unknown;
136
+ interval: "day" | "month" | "week" | "year";
137
+ interval_count: number;
138
+ usage_type: "licensed";
139
+ };
140
+ };
141
+ profile: import("../../../renewalAggregate/profile.js").RenewalProfile;
142
+ discounts: {
143
+ [x: string]: unknown;
144
+ id: string;
145
+ object: "discount";
146
+ deleted?: false | undefined;
147
+ customer_account: string;
148
+ customer?: string | {
149
+ [x: string]: unknown;
150
+ id: string;
151
+ object: "customer";
152
+ deleted?: false | undefined;
153
+ livemode?: boolean | undefined;
154
+ customer_account?: string | null | undefined;
155
+ } | null | undefined;
156
+ subscription: string | null;
157
+ subscription_item: string | null;
158
+ start: number;
159
+ end: null;
160
+ source: {
161
+ [x: string]: unknown;
162
+ type: "coupon";
163
+ coupon: {
164
+ [x: string]: unknown;
165
+ id: string;
166
+ object: "coupon";
167
+ deleted?: false | undefined;
168
+ livemode?: boolean | undefined;
169
+ duration: "forever";
170
+ applies_to?: {
171
+ products: string[];
172
+ } | undefined;
173
+ };
174
+ };
175
+ }[];
176
+ itemDiscounts: {
177
+ [x: string]: unknown;
178
+ id: string;
179
+ object: "discount";
180
+ deleted?: false | undefined;
181
+ customer_account: string;
182
+ customer?: string | {
183
+ [x: string]: unknown;
184
+ id: string;
185
+ object: "customer";
186
+ deleted?: false | undefined;
187
+ livemode?: boolean | undefined;
188
+ customer_account?: string | null | undefined;
189
+ } | null | undefined;
190
+ subscription: string | null;
191
+ subscription_item: string | null;
192
+ start: number;
193
+ end: null;
194
+ source: {
195
+ [x: string]: unknown;
196
+ type: "coupon";
197
+ coupon: {
198
+ [x: string]: unknown;
199
+ id: string;
200
+ object: "coupon";
201
+ deleted?: false | undefined;
202
+ livemode?: boolean | undefined;
203
+ duration: "forever";
204
+ applies_to?: {
205
+ products: string[];
206
+ } | undefined;
207
+ };
208
+ };
209
+ }[];
210
+ originalSettings: {
211
+ context: {
212
+ customerAccountId: string;
213
+ customerId: string;
214
+ livemode: boolean;
215
+ effectiveCollectionMethod: "charge_automatically" | "send_invoice";
216
+ effectiveAutomaticTax: boolean;
217
+ effectiveInvoiceIssuer: {
218
+ type: "self";
219
+ account?: null | undefined;
220
+ } | {
221
+ type: "account";
222
+ account: string | {
223
+ [x: string]: unknown;
224
+ id: string;
225
+ object: string;
226
+ deleted?: false | undefined;
227
+ livemode?: boolean | undefined;
228
+ customer?: string | {
229
+ [x: string]: unknown;
230
+ id: string;
231
+ object: "customer";
232
+ deleted?: false | undefined;
233
+ livemode?: boolean | undefined;
234
+ customer_account?: string | null | undefined;
235
+ } | null | undefined;
236
+ customer_account?: string | null | undefined;
237
+ };
238
+ };
239
+ };
240
+ invoice: {
241
+ account_tax_ids: (string | {
242
+ [x: string]: unknown;
243
+ id: string;
244
+ object: "tax_id";
245
+ deleted?: false | undefined;
246
+ livemode: boolean;
247
+ customer?: null | undefined;
248
+ customer_account?: null | undefined;
249
+ owner: {
250
+ type: "self";
251
+ customer_account: null;
252
+ account?: null | undefined;
253
+ customer?: null | undefined;
254
+ } | {
255
+ type: "account";
256
+ account: string | {
257
+ [x: string]: unknown;
258
+ id: string;
259
+ object: string;
260
+ deleted?: false | undefined;
261
+ livemode?: boolean | undefined;
262
+ customer?: string | {
263
+ [x: string]: unknown;
264
+ id: string;
265
+ object: "customer";
266
+ deleted?: false | undefined;
267
+ livemode?: boolean | undefined;
268
+ customer_account?: string | null | undefined;
269
+ } | null | undefined;
270
+ customer_account?: string | null | undefined;
271
+ };
272
+ customer_account: null;
273
+ customer?: null | undefined;
274
+ };
275
+ })[] | null;
276
+ custom_fields: {
277
+ name: string;
278
+ value: string;
279
+ }[] | null;
280
+ description: string | null;
281
+ footer: string | null;
282
+ issuer: {
283
+ type: "self";
284
+ account?: null | undefined;
285
+ } | {
286
+ type: "account";
287
+ account: string | {
288
+ [x: string]: unknown;
289
+ id: string;
290
+ object: string;
291
+ deleted?: false | undefined;
292
+ livemode?: boolean | undefined;
293
+ customer?: string | {
294
+ [x: string]: unknown;
295
+ id: string;
296
+ object: "customer";
297
+ deleted?: false | undefined;
298
+ livemode?: boolean | undefined;
299
+ customer_account?: string | null | undefined;
300
+ } | null | undefined;
301
+ customer_account?: string | null | undefined;
302
+ };
303
+ };
304
+ };
305
+ automaticTax: {
306
+ enabled: boolean;
307
+ liability?: {
308
+ type: "self";
309
+ account?: null | undefined;
310
+ } | {
311
+ type: "account";
312
+ account: string | {
313
+ [x: string]: unknown;
314
+ id: string;
315
+ object: string;
316
+ deleted?: false | undefined;
317
+ livemode?: boolean | undefined;
318
+ customer?: string | {
319
+ [x: string]: unknown;
320
+ id: string;
321
+ object: "customer";
322
+ deleted?: false | undefined;
323
+ livemode?: boolean | undefined;
324
+ customer_account?: string | null | undefined;
325
+ } | null | undefined;
326
+ customer_account?: string | null | undefined;
327
+ };
328
+ } | null | undefined;
329
+ disabled_reason?: null | undefined;
330
+ };
331
+ taxLevels: {
332
+ subscription: string[];
333
+ item: string[];
334
+ };
335
+ };
336
+ };
337
+ export type RenewalReadMaterial = ReturnType<typeof validateOwnedReadMaterial>;
338
+ //# sourceMappingURL=readMaterial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readMaterial.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/material/readMaterial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAM3F,OAAO,EACL,SAAS,EASV,MAAM,qCAAqC,CAAC;AAK7C,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,+BAA+B,EAC/B,UAAU,GAAG,UAAU,GAAG,kBAAkB,CAC7C,CAAC;AAcF,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,EAAE,UAAU,CAAC,EACjD,QAAQ,EAAE,0BAA0B,EACpC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,cAAc,EAAE;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkIzD;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,122 @@
1
+ import { z } from "zod";
2
+ import { renewalSubscription, renewalPrice, renewalBillingCustomer, } from "../../../renewalReplacementSchema.js";
3
+ import { referenceId, equal, conflict, unsupported, supportedVersion, timestamp, resourceId, productId, } from "../../../renewalAggregate/shared.js";
4
+ import { profileOf } from "../../../renewalAggregate/profile.js";
5
+ import { qualifySourceDiscounts } from "../../../renewalAggregate/sourceDiscounts.js";
6
+ import { qualifyOriginalSettings } from "../../../renewalAggregate/sourceSettings.js";
7
+ const attachedReference = z.union([
8
+ resourceId("sub_sched"),
9
+ z
10
+ .object({
11
+ id: resourceId("sub_sched"),
12
+ object: z.literal("subscription_schedule"),
13
+ deleted: z.literal(false).optional(),
14
+ customer_account: resourceId("acct").optional(),
15
+ livemode: z.boolean().optional(),
16
+ })
17
+ .passthrough(),
18
+ ]);
19
+ export function validateOwnedReadMaterial(args, prepared, scheduleId, ownedDiscounts) {
20
+ supportedVersion(args.apiVersion);
21
+ const subscription = renewalSubscription
22
+ .extend({ schedule: scheduleId ? attachedReference : z.null() })
23
+ .safeParse(args.freshSubscription);
24
+ if (!subscription.success)
25
+ unsupported("unsupported_original_subscription_state");
26
+ const source = subscription.data;
27
+ if (scheduleId) {
28
+ if (referenceId(source.schedule, "sub_sched", "subscription_schedule") !==
29
+ scheduleId)
30
+ conflict("schedule_association_mismatch");
31
+ if (typeof source.schedule === "object" &&
32
+ source.schedule !== null &&
33
+ ((source.schedule.customer_account !== undefined &&
34
+ source.schedule.customer_account !==
35
+ prepared.expected.customerAccountId) ||
36
+ (source.schedule.livemode !== undefined &&
37
+ source.schedule.livemode !== prepared.expected.livemode)))
38
+ conflict("schedule_association_mismatch");
39
+ }
40
+ const { schedule: originalSchedule, ...original } = prepared.providerSnapshot.subscription;
41
+ // Compare complete captured bodies, not parser outputs that may omit own keys.
42
+ const { schedule: freshSchedule, ...fresh } = args.freshSubscription;
43
+ if (scheduleId ? originalSchedule !== null : freshSchedule !== null)
44
+ conflict("schedule_association_mismatch");
45
+ if (!equal(original, fresh))
46
+ conflict("original_source_drift");
47
+ const target = renewalPrice.safeParse(args.targetPrice);
48
+ if (!target.success || !target.data.active)
49
+ unsupported("unsupported_target_price");
50
+ if (!equal(args.targetPrice, prepared.providerSnapshot.targetPrice))
51
+ conflict("target_price_drift");
52
+ if (prepared.providerSnapshot.billingCustomer === undefined ||
53
+ args.billingCustomer === undefined)
54
+ unsupported("missing_retained_billing_customer");
55
+ const customer = renewalBillingCustomer.safeParse(args.billingCustomer);
56
+ if (!customer.success)
57
+ unsupported("unsupported_billing_customer");
58
+ if (!equal(args.billingCustomer, prepared.providerSnapshot.billingCustomer))
59
+ conflict("billing_customer_drift");
60
+ const referenceContext = {
61
+ customerAccountId: prepared.expected.customerAccountId,
62
+ livemode: prepared.expected.livemode,
63
+ };
64
+ if (referenceId(source.customer, "cus", "customer", referenceContext) !==
65
+ customer.data.id ||
66
+ customer.data.customer_account !== prepared.expected.customerAccountId ||
67
+ customer.data.livemode !== prepared.expected.livemode)
68
+ conflict("billing_customer_identity_mismatch");
69
+ const item = source.items.data[0];
70
+ if (productId(item.price.product, referenceContext) !==
71
+ prepared.expected.currentProductId ||
72
+ productId(target.data.product, referenceContext) !==
73
+ prepared.expected.targetProductId)
74
+ unsupported("product_identity_mismatch");
75
+ if (args.observedAt < prepared.expected.periodStart ||
76
+ args.observedAt >= prepared.expected.periodEnd)
77
+ unsupported("outside_original_paid_period");
78
+ for (const field of [
79
+ "billing_thresholds",
80
+ "managed_payments",
81
+ "next_pending_invoice_item_invoice",
82
+ "pending_invoice_item_interval",
83
+ "pending_setup_intent",
84
+ "canceled_at",
85
+ "ended_at",
86
+ "trial_settings",
87
+ ])
88
+ if (source[field] !== null)
89
+ unsupported(`unsupported_original_${field}`);
90
+ if (item.billing_thresholds !== null)
91
+ unsupported("unsupported_item_billing_thresholds");
92
+ if (item.current_trial !== null)
93
+ unsupported("unsupported_or_missing_item_current_trial");
94
+ if (!Array.isArray(source.billing_schedules) ||
95
+ source.billing_schedules.length)
96
+ unsupported("unsupported_original_billing_schedules");
97
+ if (source.trial_end !== null &&
98
+ (!timestamp.safeParse(source.trial_end).success ||
99
+ Number(source.trial_end) > prepared.expected.periodStart))
100
+ unsupported("unsupported_original_trial");
101
+ if (source.status_details != null || source.presentment_details != null)
102
+ unsupported("unsupported_special_billing_state");
103
+ const originalSettings = qualifyOriginalSettings(source, item, customer.data);
104
+ const profile = profileOf(source, item.price, target.data, args.apiVersion);
105
+ const anchor = timestamp.parse(source.billing_cycle_anchor);
106
+ if (anchor > prepared.expected.periodStart)
107
+ unsupported("unqualified_anchor_after_paid_period_start");
108
+ const discounts = qualifySourceDiscounts(ownedDiscounts.subscription, "subscription", prepared.expected, customer.data.id, args.observedAt);
109
+ const itemDiscounts = qualifySourceDiscounts(ownedDiscounts.item, "item", prepared.expected, customer.data.id, args.observedAt);
110
+ return {
111
+ prepared,
112
+ subscription: source,
113
+ item,
114
+ customer: customer.data,
115
+ targetPrice: target.data,
116
+ profile,
117
+ discounts,
118
+ itemDiscounts,
119
+ originalSettings,
120
+ };
121
+ }
122
+ //# sourceMappingURL=readMaterial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readMaterial.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/material/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ot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/material/requiredJson.ts"],"names":[],"mappings":"AA2DA,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA2H5D"}
@@ -0,0 +1,174 @@
1
+ // Private required-material prerequisite. No operator, PII or typed-field admission.
2
+ const STOP = "REQUIRED_JSON_PRIVACY_STOP";
3
+ const credentialNames = new Set([
4
+ "clientsecret",
5
+ "confirmationsecret",
6
+ "accesstoken",
7
+ "refreshtoken",
8
+ "authorization",
9
+ "apikey",
10
+ "secretkey",
11
+ "adminkey",
12
+ "privatekey",
13
+ "stripesecretkey",
14
+ "cardnumber",
15
+ "creditcardnumber",
16
+ "cvc",
17
+ "cvv",
18
+ "bankaccountnumber",
19
+ "routingnumber",
20
+ "iban",
21
+ "accountnumber",
22
+ ]);
23
+ const credentialText = /(?:sk|rk)_(?:test|live)_|whsec_|_secret_|\bBearer\s+|\bAuthorization\s*:|-----BEGIN (?:[A-Z]+ )?PRIVATE KEY-----|(?:^|\D)(?:\d[ -]?){12,18}\d(?:$|\D)/i;
24
+ const fail = () => {
25
+ throw new Error(STOP);
26
+ };
27
+ // Counts JSON escaping without serializing or reading object properties.
28
+ function stringSize(text) {
29
+ let bytes = 2, characters = 2;
30
+ for (let i = 0; i < text.length; i++) {
31
+ const n = text.charCodeAt(i);
32
+ if (n === 34 || n === 92 || [8, 9, 10, 12, 13].includes(n)) {
33
+ bytes += 2;
34
+ characters += 2;
35
+ }
36
+ else if (n < 32) {
37
+ bytes += 6;
38
+ characters += 6;
39
+ }
40
+ else if (n >= 0xd800 &&
41
+ n <= 0xdbff &&
42
+ i + 1 < text.length &&
43
+ text.charCodeAt(i + 1) >= 0xdc00 &&
44
+ text.charCodeAt(i + 1) <= 0xdfff) {
45
+ bytes += 4;
46
+ characters += 2;
47
+ i++;
48
+ }
49
+ else if (n >= 0xd800 && n <= 0xdfff) {
50
+ bytes += 6;
51
+ characters += 6;
52
+ }
53
+ else {
54
+ bytes += n < 128 ? 1 : n < 2048 ? 2 : 3;
55
+ characters++;
56
+ }
57
+ }
58
+ return { bytes, characters };
59
+ }
60
+ export function requiredJSONSnapshot(value) {
61
+ try {
62
+ let nodes = 0, rawCharacters = 0, jsonCharacters = 0, utf8Bytes = 0;
63
+ const active = new Set(), captures = new Map();
64
+ function charge(characters, bytes) {
65
+ jsonCharacters += characters;
66
+ utf8Bytes += bytes;
67
+ if (jsonCharacters > 500000 || utf8Bytes > 500000)
68
+ fail();
69
+ }
70
+ function string(text) {
71
+ if (credentialText.test(text))
72
+ fail();
73
+ rawCharacters += text.length;
74
+ if (rawCharacters > 500000)
75
+ fail();
76
+ const size = stringSize(text);
77
+ charge(size.characters, size.bytes);
78
+ }
79
+ function scan(item, depth) {
80
+ if (++nodes > 10000 || depth > 40)
81
+ fail();
82
+ if (typeof item === "string") {
83
+ string(item);
84
+ return;
85
+ }
86
+ if (item === null) {
87
+ charge(4, 4);
88
+ return;
89
+ }
90
+ if (typeof item === "boolean") {
91
+ charge(item ? 4 : 5, item ? 4 : 5);
92
+ return;
93
+ }
94
+ if (typeof item === "number") {
95
+ if (!Number.isFinite(item) ||
96
+ (Number.isInteger(item) && !Number.isSafeInteger(item)))
97
+ fail();
98
+ const size = String(item).length;
99
+ charge(size, size);
100
+ return;
101
+ }
102
+ if (!item || typeof item !== "object" || active.has(item))
103
+ fail();
104
+ const array = Array.isArray(item), proto = Object.getPrototypeOf(item);
105
+ if (array
106
+ ? proto !== Array.prototype
107
+ : proto !== Object.prototype && proto !== null)
108
+ fail();
109
+ const keys = Reflect.ownKeys(item);
110
+ if (keys.some((key) => typeof key !== "string"))
111
+ fail();
112
+ const length = array
113
+ ? Object.getOwnPropertyDescriptor(item, "length")
114
+ : null;
115
+ if (array &&
116
+ (!length ||
117
+ !("value" in length) ||
118
+ !Number.isSafeInteger(length.value) ||
119
+ length.value > 10000))
120
+ fail();
121
+ const entries = [];
122
+ for (const key of keys) {
123
+ if (array && key === "length")
124
+ continue;
125
+ if (entries.length >= 10000)
126
+ fail();
127
+ if (array &&
128
+ (!/^(0|[1-9][0-9]*)$/.test(key) ||
129
+ Number(key) >= length.value))
130
+ fail();
131
+ // Secret names themselves are not secret values. Non-null values stop.
132
+ const descriptor = Object.getOwnPropertyDescriptor(item, key);
133
+ if (!descriptor || !descriptor.enumerable || !("value" in descriptor))
134
+ fail();
135
+ if (credentialNames.has(key.replace(/[^A-Za-z0-9]/g, "").toLowerCase()) &&
136
+ descriptor.value !== null)
137
+ fail();
138
+ if (!array)
139
+ string(key);
140
+ else {
141
+ rawCharacters += key.length;
142
+ if (rawCharacters > 500000)
143
+ fail();
144
+ }
145
+ entries.push([key, descriptor.value]);
146
+ }
147
+ if (array && entries.length !== length.value)
148
+ fail();
149
+ charge(2 + Math.max(0, entries.length - 1) + (array ? 0 : entries.length), 2 + Math.max(0, entries.length - 1) + (array ? 0 : entries.length));
150
+ active.add(item);
151
+ for (const [, child] of entries)
152
+ scan(child, depth + 1);
153
+ active.delete(item);
154
+ // Internal descriptor capture only. No detached JSON clone exists until all scans pass.
155
+ captures.set(item, { array, entries });
156
+ }
157
+ scan(value, 0);
158
+ function copy(item) {
159
+ if (!item || typeof item !== "object")
160
+ return item;
161
+ const { array, entries } = captures.get(item);
162
+ if (array)
163
+ return entries.map(([, child]) => copy(child));
164
+ return Object.fromEntries(entries
165
+ .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
166
+ .map(([key, child]) => [key, copy(child)]));
167
+ }
168
+ return copy(value);
169
+ }
170
+ catch {
171
+ fail();
172
+ }
173
+ }
174
+ //# sourceMappingURL=requiredJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requiredJson.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/material/requiredJson.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,IAAI,GAAG,4BAA4B,CAAC;AAC1C,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,cAAc;IACd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