@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.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.js +61 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/array-order.test.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.js +18 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.js +67 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +41 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +187 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js +372 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +2 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.d.ts +55 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.js +87 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +131 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.d.ts +14 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.js +60 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/readLifetime.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js +126 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.d.mts +627 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs +488 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.d.mts +214 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs +63 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.d.mts +75 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs +145 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts +7 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs +26 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts +14 -0
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.js +202 -0
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts +23 -0
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js +117 -0
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts +23 -0
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js +111 -0
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCapture.d.ts +11 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCapture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCapture.js +376 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCapture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCodec.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCodec.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCodec.js +119 -0
- package/dist/client/billing/renewalAttach/internal/c10/eventCodec.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownData.d.ts +30 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownData.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownData.js +74 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownData.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.js +3 -0
- package/dist/client/billing/renewalAttach/internal/c10/ownerBinding.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/privacy.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/privacy.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/privacy.js +175 -0
- package/dist/client/billing/renewalAttach/internal/c10/privacy.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/publicApi.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/c10/publicApi.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/publicApi.js +3 -0
- package/dist/client/billing/renewalAttach/internal/c10/publicApi.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.d.mts +3 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs +4 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.d.mts +26 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs +42 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.d.mts +7 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs +60 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.d.mts +335 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs +122 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.d.mts +46 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs +87 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.d.mts +35 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs +90 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.d.mts +132 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs +82 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.d.mts +4 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs +23 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.d.mts +16 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs +41 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.d.mts +43 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs +132 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.d.mts +200 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs +150 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.d.mts +124 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs +127 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.d.mts +3 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs +69 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.d.mts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs +152 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.d.mts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.d.mts +5 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs +243 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.d.mts +17 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs +75 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.d.mts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs +173 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.d.mts +4 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs +4 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.d.mts +7 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs +30 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.d.mts +29 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs +33 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f19.json +452 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.d.mts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs +173 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.d.mts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs +449 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.d.mts +9 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs +27 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.d.mts +7 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs +150 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.d.mts +3 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs +503 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.d.mts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs +91 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.d.mts +14 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs +41 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.d.mts +103 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs +46 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.d.mts +73 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs +294 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.d.mts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs +60 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.d.mts +58 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.d.mts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs +96 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.js +40 -0
- package/dist/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.js +454 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.js +99 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.js +274 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.js +9 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.d.ts +39 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.js +245 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts +88 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.js +289 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/capture.d.ts +88 -0
- package/dist/client/billing/renewalAttach/internal/material/capture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/capture.js +181 -0
- package/dist/client/billing/renewalAttach/internal/material/capture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/classifiers.d.ts +522 -0
- package/dist/client/billing/renewalAttach/internal/material/classifiers.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/classifiers.js +226 -0
- package/dist/client/billing/renewalAttach/internal/material/classifiers.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/nodeKernel.d.ts +17 -0
- package/dist/client/billing/renewalAttach/internal/material/nodeKernel.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/nodeKernel.js +95 -0
- package/dist/client/billing/renewalAttach/internal/material/nodeKernel.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/readMaterial.d.ts +338 -0
- package/dist/client/billing/renewalAttach/internal/material/readMaterial.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/readMaterial.js +122 -0
- package/dist/client/billing/renewalAttach/internal/material/readMaterial.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/requiredJson.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/material/requiredJson.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/material/requiredJson.js +174 -0
- package/dist/client/billing/renewalAttach/internal/material/requiredJson.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.js +362 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts +9 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.js +215 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.js +190 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.js +317 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.d.ts +79 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.js +27 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts +18 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js +229 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +163 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +443 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +467 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts +6 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js +59 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts +10 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js +48 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts +20 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js +44 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.d.ts +42 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.js +158 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js +214 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts +33 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.js +208 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.js +25 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.js +93 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.js +153 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts +22 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.js +221 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.js +101 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.js +186 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +498 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +21 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js +119 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +32 -32
- package/dist/component/balanceFunding/mutations.d.ts +16 -16
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/financialObservations/settlementHelpers.d.ts +3 -3
- package/dist/component/payoutRelease/queries.d.ts +2 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
- package/dist/component/usageCredits/accounting.fixtures.d.ts +16 -16
- package/docs/renewal-context-reads.md +54 -8
- package/docs/renewal-material-observation.md +37 -0
- package/docs/renewal-phase-assembly.md +91 -0
- package/docs/renewal-raw-acquisition.md +78 -0
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/acquisition/array-order.test.js +70 -0
- package/src/client/billing/renewalAttach/internal/acquisition/coupon-stop-order.test.js +23 -0
- package/src/client/billing/renewalAttach/internal/acquisition/fetch-metadata.test.js +77 -0
- package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +304 -0
- package/src/client/billing/renewalAttach/internal/acquisition/raw-acquisition.test.js +418 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +2 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.ts +110 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +168 -0
- package/src/client/billing/renewalAttach/internal/acquisition/readLifetime.ts +64 -0
- package/src/client/billing/renewalAttach/internal/acquisition/sourceBinding.test.js +138 -0
- package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/fixture.mjs +510 -0
- package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/raw-retention-fixture.mjs +64 -0
- package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/scenario.mjs +159 -0
- package/src/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.mjs +25 -0
- package/src/client/billing/renewalAttach/internal/c10/appendAck.first.test.ts +86 -0
- package/src/client/billing/renewalAttach/internal/c10/appendAck.ts +226 -0
- package/src/client/billing/renewalAttach/internal/c10/appendCodec.test.ts +186 -0
- package/src/client/billing/renewalAttach/internal/c10/arrayOrder.test.ts +47 -0
- package/src/client/billing/renewalAttach/internal/c10/attachEvents.ts +144 -0
- package/src/client/billing/renewalAttach/internal/c10/compiler.test.ts +443 -0
- package/src/client/billing/renewalAttach/internal/c10/configureEvents.ts +145 -0
- package/src/client/billing/renewalAttach/internal/c10/eventCapture.ts +464 -0
- package/src/client/billing/renewalAttach/internal/c10/eventCodec.ts +131 -0
- package/src/client/billing/renewalAttach/internal/c10/hardening.test.ts +175 -0
- package/src/client/billing/renewalAttach/internal/c10/historicalClassifier.test.ts +114 -0
- package/src/client/billing/renewalAttach/internal/c10/ownData.ts +103 -0
- package/src/client/billing/renewalAttach/internal/c10/ownerBinding.ts +2 -0
- package/src/client/billing/renewalAttach/internal/c10/ownerContinuations.test.ts +283 -0
- package/src/client/billing/renewalAttach/internal/c10/privacy.ts +181 -0
- package/src/client/billing/renewalAttach/internal/c10/publicApi.ts +8 -0
- package/src/client/billing/renewalAttach/internal/c10/reflectionPrivacy.test.ts +87 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/compilerIndex.mjs +3 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/fixture.mjs +49 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f00.mjs +63 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs +160 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs +88 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs +102 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f04.mjs +82 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f05.mjs +20 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f06.mjs +41 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f07.mjs +137 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f08.mjs +153 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f09.mjs +127 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f10.mjs +85 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f11.mjs +170 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f12.mjs +6 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f13.mjs +295 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f14.mjs +78 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f15.mjs +177 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f16.mjs +8 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f17.mjs +34 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f18.mjs +32 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f19.json +452 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f20.mjs +177 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f21.mjs +466 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f22.mjs +29 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f23.mjs +165 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f24.mjs +507 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f25.mjs +89 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f26.mjs +38 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f27.mjs +45 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f28.mjs +309 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f29.mjs +58 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/publishedRawkeyHelper.mjs +104 -0
- package/src/client/billing/renewalAttach/internal/c10/test-fixtures/semanticSetup.ts +43 -0
- package/src/client/billing/renewalAttach/internal/configure/actor.ts +575 -0
- package/src/client/billing/renewalAttach/internal/configure/capture.ts +117 -0
- package/src/client/billing/renewalAttach/internal/configure/dispatch.integration.test.ts +32 -0
- package/src/client/billing/renewalAttach/internal/configure/limits.test.ts +510 -0
- package/src/client/billing/renewalAttach/internal/configure/order.integration.test.ts +207 -0
- package/src/client/billing/renewalAttach/internal/configure/output.ts +372 -0
- package/src/client/billing/renewalAttach/internal/configure/ownership.integration.test.ts +148 -0
- package/src/client/billing/renewalAttach/internal/configure/replay.integration.test.ts +173 -0
- package/src/client/billing/renewalAttach/internal/configure/replay.ts +13 -0
- package/src/client/billing/renewalAttach/internal/configure/request.ts +312 -0
- package/src/client/billing/renewalAttach/internal/configure/transport.integration.test.ts +507 -0
- package/src/client/billing/renewalAttach/internal/configure/transport.ts +348 -0
- package/src/client/billing/renewalAttach/internal/material/capture.ts +243 -0
- package/src/client/billing/renewalAttach/internal/material/classifiers.test.ts +510 -0
- package/src/client/billing/renewalAttach/internal/material/classifiers.ts +313 -0
- package/src/client/billing/renewalAttach/internal/material/nodeKernel.ts +118 -0
- package/src/client/billing/renewalAttach/internal/material/readMaterial.ts +176 -0
- package/src/client/billing/renewalAttach/internal/material/requiredJson.ts +183 -0
- package/src/client/billing/renewalAttach/internal/observation/actor.ts +444 -0
- package/src/client/billing/renewalAttach/internal/observation/capture.ts +250 -0
- package/src/client/billing/renewalAttach/internal/observation/observation.integration.test.ts +220 -0
- package/src/client/billing/renewalAttach/internal/observation/observationRetirement.integration.test.ts +60 -0
- package/src/client/billing/renewalAttach/internal/observation/profile.ts +264 -0
- package/src/client/billing/renewalAttach/internal/observation/record.ts +408 -0
- package/src/client/billing/renewalAttach/internal/observation/types.ts +102 -0
- package/src/client/billing/renewalAttach/internal/operations/configureReadTransport.ts +285 -0
- package/src/client/billing/renewalAttach/internal/operations/defaultBindings.test.ts +69 -0
- package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +574 -0
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.integration.test.ts +34 -0
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +535 -0
- package/src/client/billing/renewalAttach/internal/operations/ownedAwait.ts +63 -0
- package/src/client/billing/renewalAttach/internal/operations/providerFailure.integration.test.ts +61 -0
- package/src/client/billing/renewalAttach/internal/operations/providerFailure.ts +66 -0
- package/src/client/billing/renewalAttach/internal/operations/sourceOperations.ts +50 -0
- package/src/client/billing/renewalAttach/internal/operations/transport.integration.test.ts +116 -0
- package/src/client/billing/renewalAttach/internal/operations/types.ts +223 -0
- package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.integration.test.ts +285 -0
- package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.ts +258 -0
- package/src/client/billing/renewalAttach/internal/preflight/configureReads.integration.test.ts +139 -0
- package/src/client/billing/renewalAttach/internal/preflight/grammar.ts +257 -0
- package/src/client/billing/renewalAttach/internal/preflight/output.ts +42 -0
- package/src/client/billing/renewalAttach/internal/preflight/owner.integration.test.ts +82 -0
- package/src/client/billing/renewalAttach/internal/preflight/preflight.integration.test.ts +354 -0
- package/src/client/billing/renewalAttach/internal/preflight/record.ts +127 -0
- package/src/client/billing/renewalAttach/internal/preflight/relations.ts +209 -0
- package/src/client/billing/renewalAttach/internal/recovery/material.ts +311 -0
- package/src/client/billing/renewalAttach/internal/recovery/output.ts +136 -0
- package/src/client/billing/renewalAttach/internal/recovery/record.ts +230 -0
- package/src/client/billing/renewalAttach/internal/recovery/recovery.integration.test.ts +463 -0
- package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +599 -0
- package/src/client/billing/renewalAttach/internal/recovery/relation.ts +175 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachEntries.ts +217 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachObservations.ts +226 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenario.ts +556 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioAssertions.ts +180 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioBarriers.ts +144 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightAssertions.ts +122 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightBarriers.ts +330 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightControls.ts +139 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightOperation.ts +513 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadNativeBaseline.ts +344 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadOperation.ts +278 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadPort.ts +17 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteAssertions.ts +533 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteBarriers.ts +125 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDeclarations.ts +314 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteHistory.ts +463 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteObservations.ts +515 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteOperation.ts +600 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationAssertions.ts +211 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationDeclarations.ts +192 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationHTTP.ts +197 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationObservations.ts +269 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationOperation.ts +262 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationProbe.ts +319 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/ownedOperations.ts +94 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/sourceOperationPort.ts +16 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/stockHttp.ts +21 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
// TEST SOURCE FIRST. Future test-only binding/production modules DO NOT exist/adopt yet.
|
|
2
|
+
import { test } from "vitest";
|
|
3
|
+
import assert from "node:assert/strict";
|
|
4
|
+
import { createTestOnlyRawAcquisition } from "./test-fixtures/sourcePort.mjs";
|
|
5
|
+
import {
|
|
6
|
+
scenario,
|
|
7
|
+
clone,
|
|
8
|
+
own,
|
|
9
|
+
wire,
|
|
10
|
+
tick,
|
|
11
|
+
fakeOwner,
|
|
12
|
+
fakeTransport,
|
|
13
|
+
} from "./test-fixtures/scenario.mjs";
|
|
14
|
+
import { parsedPaths, at } from "./test-fixtures/raw-retention-fixture.mjs";
|
|
15
|
+
function setup(s = scenario(), ownerOptions = {}) {
|
|
16
|
+
const owner = fakeOwner(s, ownerOptions),
|
|
17
|
+
http = fakeTransport(s, owner),
|
|
18
|
+
reader = createTestOnlyRawAcquisition({ owner, transport: http.transport });
|
|
19
|
+
return { s, owner, http, reader };
|
|
20
|
+
}
|
|
21
|
+
async function stop(p) {
|
|
22
|
+
const r = await p;
|
|
23
|
+
assert.equal(r.ok, false);
|
|
24
|
+
assert.equal(r.complete, false);
|
|
25
|
+
assert.equal(r.code, "RAW_ACQUISITION_STOP");
|
|
26
|
+
return r;
|
|
27
|
+
}
|
|
28
|
+
function good(r) {
|
|
29
|
+
assert.equal(r.ok, true);
|
|
30
|
+
assert.equal(r.dataOnly, true);
|
|
31
|
+
assert.equal(r.sourceFulfillmentEstablished, false);
|
|
32
|
+
assert.equal(r.clockProvenanceEstablished, false);
|
|
33
|
+
assert.equal(r.operatorReady, false);
|
|
34
|
+
return r.bundle;
|
|
35
|
+
}
|
|
36
|
+
const COUPON_PATH = "/v1/coupons/";
|
|
37
|
+
test("three complete raw bodies remain detached and immutable, derived joins distinct", async () => {
|
|
38
|
+
const h = setup(),
|
|
39
|
+
r = await h.reader.acquire(h.s.expected),
|
|
40
|
+
b = good(r);
|
|
41
|
+
assert.deepEqual(b.wireSubscription, h.s.subscription);
|
|
42
|
+
assert.deepEqual(b.wireTargetPrice, h.s.targetPrice);
|
|
43
|
+
assert.deepEqual(b.wireBillingCustomer, h.s.billingCustomer);
|
|
44
|
+
assert.deepEqual(
|
|
45
|
+
Object.keys(b).sort(),
|
|
46
|
+
[
|
|
47
|
+
"wireSubscription",
|
|
48
|
+
"wireTargetPrice",
|
|
49
|
+
"wireBillingCustomer",
|
|
50
|
+
"couponReads",
|
|
51
|
+
"derivedCouponJoins",
|
|
52
|
+
].sort(),
|
|
53
|
+
);
|
|
54
|
+
assert(
|
|
55
|
+
Object.isFrozen(r) &&
|
|
56
|
+
Object.isFrozen(b) &&
|
|
57
|
+
Object.isFrozen(b.wireSubscription),
|
|
58
|
+
);
|
|
59
|
+
h.s.subscription.metadata.after = "MUTATED_SOURCE";
|
|
60
|
+
assert(!Object.hasOwn(b.wireSubscription.metadata, "after"));
|
|
61
|
+
assert.notEqual(
|
|
62
|
+
b.derivedCouponJoins.subscription[0].joinedDiscount,
|
|
63
|
+
b.wireSubscription.discounts[0],
|
|
64
|
+
);
|
|
65
|
+
assert.deepEqual(
|
|
66
|
+
b.wireSubscription.discounts[0].source.coupon,
|
|
67
|
+
h.s.coupons.get("subscription-offer-0"),
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
test("eleven own special-key paths retain full raw values, constructor/prototype safe", async () => {
|
|
71
|
+
for (const path of parsedPaths) {
|
|
72
|
+
const s = scenario(),
|
|
73
|
+
input = {
|
|
74
|
+
subscription: s.subscription,
|
|
75
|
+
targetPrice: s.targetPrice,
|
|
76
|
+
billingCustomer: s.billingCustomer,
|
|
77
|
+
};
|
|
78
|
+
own(at(input, path), "__proto__", { declared: "same-raw" });
|
|
79
|
+
own(at(input, path), "constructor", { keep: true });
|
|
80
|
+
own(at(input, path), "prototype", "raw");
|
|
81
|
+
const h = setup(s),
|
|
82
|
+
b = good(await h.reader.acquire(s.expected)),
|
|
83
|
+
out = {
|
|
84
|
+
subscription: b.wireSubscription,
|
|
85
|
+
targetPrice: b.wireTargetPrice,
|
|
86
|
+
billingCustomer: b.wireBillingCustomer,
|
|
87
|
+
};
|
|
88
|
+
assert.deepEqual(at(out, path), at(input, path));
|
|
89
|
+
assert(Object.hasOwn(at(out, path), "__proto__"));
|
|
90
|
+
assert.equal({}.declared, undefined);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
test("full Coupon counters and expanded equality include unknown own keys", async () => {
|
|
94
|
+
const s = scenario();
|
|
95
|
+
for (const c of s.coupons.values())
|
|
96
|
+
own(c, "__proto__", { counterpart: "keep" });
|
|
97
|
+
s.subscription.discounts[0].source.coupon = clone(
|
|
98
|
+
s.coupons.get("subscription-offer-0"),
|
|
99
|
+
);
|
|
100
|
+
s.subscription.items.data[0].discounts[0].source.coupon = clone(
|
|
101
|
+
s.coupons.get("item-offer-0"),
|
|
102
|
+
);
|
|
103
|
+
const h = setup(s),
|
|
104
|
+
b = good(await h.reader.acquire(s.expected));
|
|
105
|
+
assert.equal(b.couponReads[0].wireCoupon.times_redeemed, 7);
|
|
106
|
+
assert(Object.hasOwn(b.couponReads[0].wireCoupon, "__proto__"));
|
|
107
|
+
const drift = scenario();
|
|
108
|
+
drift.coupons.get("subscription-offer-0").times_redeemed = 8;
|
|
109
|
+
await stop(setup(drift).reader.acquire(drift.expected));
|
|
110
|
+
const unknown = scenario();
|
|
111
|
+
own(unknown.coupons.get("subscription-offer-0"), "__proto__", {
|
|
112
|
+
drift: true,
|
|
113
|
+
});
|
|
114
|
+
await stop(setup(unknown).reader.acquire(unknown.expected));
|
|
115
|
+
});
|
|
116
|
+
test("string references join only derived arrays with source indices and retain raw originals", async () => {
|
|
117
|
+
const h = setup(scenario({ strings: true })),
|
|
118
|
+
b = good(await h.reader.acquire(h.s.expected));
|
|
119
|
+
assert.equal(typeof b.wireSubscription.discounts[0].source.coupon, "string");
|
|
120
|
+
for (const [level, raw] of [
|
|
121
|
+
["subscription", b.wireSubscription.discounts],
|
|
122
|
+
["item", b.wireSubscription.items.data[0].discounts],
|
|
123
|
+
])
|
|
124
|
+
for (const [index, j] of b.derivedCouponJoins[level].entries()) {
|
|
125
|
+
assert.equal(j.index, index);
|
|
126
|
+
assert.equal(j.discountId, raw[index].id);
|
|
127
|
+
assert.equal(j.originalCouponReference, raw[index].source.coupon);
|
|
128
|
+
assert.deepEqual(
|
|
129
|
+
j.joinedDiscount.source.coupon,
|
|
130
|
+
b.couponReads[j.couponReadIndex].wireCoupon,
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
test("dedup first appearance order and maximum43 direct GETs with exact selectors", async () => {
|
|
135
|
+
const h = setup(scenario({ perLevel: 20, strings: true })),
|
|
136
|
+
b = good(await h.reader.acquire(h.s.expected));
|
|
137
|
+
assert.equal(h.http.calls.length, 43);
|
|
138
|
+
assert.equal(b.couponReads.length, 40);
|
|
139
|
+
const calls = h.http.calls;
|
|
140
|
+
assert.equal(
|
|
141
|
+
calls[0].path,
|
|
142
|
+
`/v1/subscriptions/${h.s.expected.subscriptionId}?expand%5B0%5D=discounts&expand%5B1%5D=items.data.discounts&expand%5B2%5D=items.data.price`,
|
|
143
|
+
);
|
|
144
|
+
assert.equal(calls[1].path, `/v1/prices/${h.s.expected.targetPriceId}`);
|
|
145
|
+
assert.equal(calls[2].path, `/v1/customers/${h.s.billingCustomer.id}`);
|
|
146
|
+
assert.deepEqual(
|
|
147
|
+
calls
|
|
148
|
+
.slice(3)
|
|
149
|
+
.map((x) => decodeURIComponent(x.path.slice(COUPON_PATH.length))),
|
|
150
|
+
[...h.s.coupons.keys()],
|
|
151
|
+
);
|
|
152
|
+
for (const c of calls) {
|
|
153
|
+
assert.equal(c.method, "GET");
|
|
154
|
+
assert.equal(c.body, undefined);
|
|
155
|
+
assert.deepEqual(c.options, {
|
|
156
|
+
apiVersion: "2026-09-30.endive",
|
|
157
|
+
maxNetworkRetries: 0,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
const shared = setup(scenario({ perLevel: 20, shared: true, strings: true }));
|
|
161
|
+
const sb = good(await shared.reader.acquire(shared.s.expected));
|
|
162
|
+
assert.equal(shared.http.calls.length, 4);
|
|
163
|
+
assert.equal(sb.couponReads.length, 1);
|
|
164
|
+
});
|
|
165
|
+
test("empty arrays return3reads;21redemptions or dot segments never extra reads", async () => {
|
|
166
|
+
const h = setup(scenario({ perLevel: 0 }));
|
|
167
|
+
good(await h.reader.acquire(h.s.expected));
|
|
168
|
+
assert.equal(h.http.calls.length, 3);
|
|
169
|
+
const too = setup(scenario({ perLevel: 21 }));
|
|
170
|
+
await stop(too.reader.acquire(too.s.expected));
|
|
171
|
+
assert(too.http.calls.length <= 3);
|
|
172
|
+
for (const id of [".", ".."]) {
|
|
173
|
+
const s = scenario({ strings: true });
|
|
174
|
+
s.subscription.discounts[0].source.coupon = id;
|
|
175
|
+
const q = setup(s);
|
|
176
|
+
await stop(q.reader.acquire(s.expected));
|
|
177
|
+
assert(!q.http.calls.some((c) => c.path === COUPON_PATH + id));
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
test("all raw identity/account/mode/deleted/coupon contradictions stop without normalization", async () => {
|
|
181
|
+
for (const change of [
|
|
182
|
+
(s) => (s.subscription.id = "sub_foreign"),
|
|
183
|
+
(s) => (s.targetPrice.id = "price_foreign"),
|
|
184
|
+
(s) => (s.billingCustomer.customer_account = "acct_foreign"),
|
|
185
|
+
(s) => (s.subscription.items.data[0].price.livemode = true),
|
|
186
|
+
(s) => (s.billingCustomer.deleted = true),
|
|
187
|
+
(s) => (s.coupons.get("subscription-offer-0").deleted = true),
|
|
188
|
+
(s) => (s.coupons.get("subscription-offer-0").livemode = true),
|
|
189
|
+
]) {
|
|
190
|
+
const s = scenario();
|
|
191
|
+
change(s);
|
|
192
|
+
const h = setup(s);
|
|
193
|
+
await stop(h.reader.acquire(s.expected));
|
|
194
|
+
assert(h.http.calls.length <= 5);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
test("own schedule reference remains observation, never invented null or attach receipt", async () => {
|
|
198
|
+
const s = scenario();
|
|
199
|
+
s.subscription.schedule = "sub_sched_observed";
|
|
200
|
+
const h = setup(s),
|
|
201
|
+
b = good(await h.reader.acquire(s.expected));
|
|
202
|
+
assert.equal(b.wireSubscription.schedule, "sub_sched_observed");
|
|
203
|
+
assert(!Object.hasOwn(b, "attachReceipt"));
|
|
204
|
+
assert(!h.http.calls.some((x) => x.path.includes("subscription_schedules")));
|
|
205
|
+
});
|
|
206
|
+
test("whole duplicate-inclusive bundle budgets rather than each small body alone", async () => {
|
|
207
|
+
const s = scenario();
|
|
208
|
+
for (const c of s.coupons.values()) c.metadata.opaque = "x".repeat(90000);
|
|
209
|
+
for (const [list, key] of [
|
|
210
|
+
[s.subscription.discounts, "subscription-offer-0"],
|
|
211
|
+
[s.subscription.items.data[0].discounts, "item-offer-0"],
|
|
212
|
+
])
|
|
213
|
+
list[0].source.coupon = clone(s.coupons.get(key));
|
|
214
|
+
const h = setup(s);
|
|
215
|
+
await stop(h.reader.acquire(s.expected));
|
|
216
|
+
assert(h.http.calls.length <= 5);
|
|
217
|
+
const utf = scenario();
|
|
218
|
+
for (const c of utf.coupons.values()) c.metadata.opaque = "😀".repeat(30000);
|
|
219
|
+
utf.subscription.discounts[0].source.coupon = clone(
|
|
220
|
+
utf.coupons.get("subscription-offer-0"),
|
|
221
|
+
);
|
|
222
|
+
utf.subscription.items.data[0].discounts[0].source.coupon = clone(
|
|
223
|
+
utf.coupons.get("item-offer-0"),
|
|
224
|
+
);
|
|
225
|
+
await stop(setup(utf).reader.acquire(utf.expected));
|
|
226
|
+
});
|
|
227
|
+
test("node/depth and unsafe raw metadata fail before successful bundle release", async () => {
|
|
228
|
+
for (const make of [
|
|
229
|
+
() => Array.from({ length: 10001 }, () => 0),
|
|
230
|
+
() => {
|
|
231
|
+
let x = {};
|
|
232
|
+
for (let n = 0; n < 41; n++) x = { x };
|
|
233
|
+
return x;
|
|
234
|
+
},
|
|
235
|
+
() => ({ client_secret: {} }),
|
|
236
|
+
]) {
|
|
237
|
+
const s = scenario();
|
|
238
|
+
s.subscription.extra = make();
|
|
239
|
+
const h = setup(s);
|
|
240
|
+
await stop(h.reader.acquire(s.expected));
|
|
241
|
+
assert(h.http.calls.length <= 1);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
test("2xx own nonenumerable metadata required, ambiguities never become body facts", async () => {
|
|
245
|
+
for (const make of [
|
|
246
|
+
(v) => clone(v),
|
|
247
|
+
(v) => wire(v, { status: 200, statusCode: 201 }),
|
|
248
|
+
(v) => wire(v, { status: 500 }),
|
|
249
|
+
(v) => wire(v, { status: 200 }, { enumerable: true }),
|
|
250
|
+
(v) => {
|
|
251
|
+
const r = clone(v);
|
|
252
|
+
Object.defineProperty(r, "lastResponse", {
|
|
253
|
+
get() {
|
|
254
|
+
throw Error("UNSAFE_META_GETTER");
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
return r;
|
|
258
|
+
},
|
|
259
|
+
]) {
|
|
260
|
+
const h = setup();
|
|
261
|
+
h.http.override((n, v) => (n === 1 ? make(v) : null));
|
|
262
|
+
await stop(h.reader.acquire(h.s.expected));
|
|
263
|
+
assert.equal(h.http.calls.length, 1);
|
|
264
|
+
}
|
|
265
|
+
const h = setup();
|
|
266
|
+
h.http.override((n, v) =>
|
|
267
|
+
n === 1 ? wire(v, { status: 200, statusCode: 200 }) : null,
|
|
268
|
+
);
|
|
269
|
+
const b = good(await h.reader.acquire(h.s.expected));
|
|
270
|
+
assert(!Object.hasOwn(b.wireSubscription, "lastResponse"));
|
|
271
|
+
});
|
|
272
|
+
test("raw getters symbols nonJSON and rejected partials give content-free failure", async () => {
|
|
273
|
+
for (const make of [
|
|
274
|
+
(v) => {
|
|
275
|
+
const r = wire(v);
|
|
276
|
+
Object.defineProperty(r, "unknown", {
|
|
277
|
+
get() {
|
|
278
|
+
throw Error("BODY_GETTER");
|
|
279
|
+
},
|
|
280
|
+
enumerable: true,
|
|
281
|
+
});
|
|
282
|
+
return r;
|
|
283
|
+
},
|
|
284
|
+
(v) => {
|
|
285
|
+
const r = wire(v);
|
|
286
|
+
r[Symbol("unknown")] = 1;
|
|
287
|
+
return r;
|
|
288
|
+
},
|
|
289
|
+
(v) => {
|
|
290
|
+
const r = wire(v);
|
|
291
|
+
r.bad = NaN;
|
|
292
|
+
return r;
|
|
293
|
+
},
|
|
294
|
+
]) {
|
|
295
|
+
const h = setup();
|
|
296
|
+
h.http.override((n, v) => (n === 1 ? make(v) : null));
|
|
297
|
+
await stop(h.reader.acquire(h.s.expected));
|
|
298
|
+
}
|
|
299
|
+
const h = setup();
|
|
300
|
+
h.http.reject(2);
|
|
301
|
+
const r = await stop(h.reader.acquire(h.s.expected));
|
|
302
|
+
assert.equal(h.http.calls.length, 2);
|
|
303
|
+
assert(!JSON.stringify(r).includes("SYNTHETIC_PRIVATE_REJECT"));
|
|
304
|
+
});
|
|
305
|
+
test("reservation is synchronous: overlapping and second invocation never repeat reads", async () => {
|
|
306
|
+
const h = setup();
|
|
307
|
+
h.http.hold(1);
|
|
308
|
+
const first = h.reader.acquire(h.s.expected);
|
|
309
|
+
await tick();
|
|
310
|
+
assert.equal(h.http.calls.length, 1);
|
|
311
|
+
await stop(h.reader.acquire(h.s.expected));
|
|
312
|
+
assert.equal(h.http.calls.length, 1);
|
|
313
|
+
h.http.release(1);
|
|
314
|
+
good(await first);
|
|
315
|
+
const reads = h.http.calls.length;
|
|
316
|
+
await stop(h.reader.acquire(h.s.expected));
|
|
317
|
+
assert.equal(h.http.calls.length, reads);
|
|
318
|
+
});
|
|
319
|
+
test("invalid or regressed original basis refuses before first GET, no reset", async () => {
|
|
320
|
+
const h = setup(scenario(), { invalid: true });
|
|
321
|
+
await stop(h.reader.acquire(h.s.expected));
|
|
322
|
+
assert.equal(h.http.calls.length, 0);
|
|
323
|
+
const q = setup();
|
|
324
|
+
q.owner.regress();
|
|
325
|
+
await stop(q.reader.acquire(q.s.expected));
|
|
326
|
+
assert.equal(q.http.calls.length, 0);
|
|
327
|
+
});
|
|
328
|
+
test("late retired fulfillment at EACH of43GET awaits cannot start nextIO or release", async () => {
|
|
329
|
+
for (let at = 1; at <= 43; at++) {
|
|
330
|
+
const h = setup(scenario({ perLevel: 20, strings: true }));
|
|
331
|
+
h.http.hold(at);
|
|
332
|
+
const p = h.reader.acquire(h.s.expected);
|
|
333
|
+
await tick();
|
|
334
|
+
assert.equal(h.http.calls.length, at);
|
|
335
|
+
h.owner.retire();
|
|
336
|
+
h.http.release(at);
|
|
337
|
+
await stop(p);
|
|
338
|
+
assert.equal(h.http.calls.length, at);
|
|
339
|
+
await stop(h.reader.acquire(h.s.expected));
|
|
340
|
+
assert.equal(h.http.calls.length, at);
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
test("late work expiry at each base/Coupon await cannot acquire new basis", async () => {
|
|
344
|
+
for (let at = 1; at <= 5; at++) {
|
|
345
|
+
const h = setup();
|
|
346
|
+
h.http.hold(at);
|
|
347
|
+
const p = h.reader.acquire(h.s.expected);
|
|
348
|
+
await tick();
|
|
349
|
+
assert.equal(h.http.calls.length, at);
|
|
350
|
+
h.owner.expire();
|
|
351
|
+
h.http.release(at);
|
|
352
|
+
await stop(p);
|
|
353
|
+
assert.equal(h.http.calls.length, at);
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
test("retired late rawbody never reflected, parsed, cloned, classified or returned", async () => {
|
|
357
|
+
const h = setup();
|
|
358
|
+
h.http.hold(1);
|
|
359
|
+
const p = h.reader.acquire(h.s.expected);
|
|
360
|
+
await tick();
|
|
361
|
+
let reflections = 0,
|
|
362
|
+
armed = false,
|
|
363
|
+
assimilationReads = 0;
|
|
364
|
+
const raw = new Proxy(wire(h.s.subscription), {
|
|
365
|
+
ownKeys(t) {
|
|
366
|
+
reflections++;
|
|
367
|
+
return Reflect.ownKeys(t);
|
|
368
|
+
},
|
|
369
|
+
getOwnPropertyDescriptor(t, k) {
|
|
370
|
+
reflections++;
|
|
371
|
+
return Reflect.getOwnPropertyDescriptor(t, k);
|
|
372
|
+
},
|
|
373
|
+
getPrototypeOf(t) {
|
|
374
|
+
reflections++;
|
|
375
|
+
return Reflect.getPrototypeOf(t);
|
|
376
|
+
},
|
|
377
|
+
get(t, k, r) {
|
|
378
|
+
if (armed) reflections++;
|
|
379
|
+
else {
|
|
380
|
+
assert.equal(k, "then");
|
|
381
|
+
assimilationReads++;
|
|
382
|
+
}
|
|
383
|
+
return Reflect.get(t, k, r);
|
|
384
|
+
},
|
|
385
|
+
has(t, k) {
|
|
386
|
+
reflections++;
|
|
387
|
+
return Reflect.has(t, k);
|
|
388
|
+
},
|
|
389
|
+
});
|
|
390
|
+
h.owner.retire();
|
|
391
|
+
// Promise resolution synchronously reads missing `then` inside release().
|
|
392
|
+
// Arm before any queued SUT continuation: no after-await body access exempted.
|
|
393
|
+
h.http.release(1, raw);
|
|
394
|
+
armed = true;
|
|
395
|
+
assert.equal(assimilationReads, 1);
|
|
396
|
+
await stop(p);
|
|
397
|
+
assert.equal(reflections, 0);
|
|
398
|
+
assert.equal(h.http.calls.length, 1);
|
|
399
|
+
});
|
|
400
|
+
test("clock check remains between every completed GET and successor GET; complete reader not actor authority", async () => {
|
|
401
|
+
const h = setup();
|
|
402
|
+
const r = await h.reader.acquire(h.s.expected);
|
|
403
|
+
good(r);
|
|
404
|
+
const events = h.owner.events;
|
|
405
|
+
for (let i = 1; i < events.length; i++)
|
|
406
|
+
if (events[i][0] === "GET") {
|
|
407
|
+
assert(events.slice(0, i).some((x) => x[0] === "sample"));
|
|
408
|
+
const prev = events
|
|
409
|
+
.slice(0, i)
|
|
410
|
+
.map((x) => x[0])
|
|
411
|
+
.lastIndexOf("GET");
|
|
412
|
+
if (prev >= 0)
|
|
413
|
+
assert(events.slice(prev + 1, i).some((x) => x[0] === "sample"));
|
|
414
|
+
}
|
|
415
|
+
assert.equal(r.clockProvenanceEstablished, false);
|
|
416
|
+
assert.equal(h.owner.retired, false);
|
|
417
|
+
assert.equal(r.observedAt, Math.floor(h.s.expected.periodStart + 1));
|
|
418
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Read } from "./rawWireSource.js";
|
|
2
|
+
import type { createReadLifetime } from "./readLifetime.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { equal } from "../../../renewalAggregate/shared.js";
|
|
5
|
+
const need: (x: unknown) => asserts x = (x) => {
|
|
6
|
+
if (!x) throw Error("RAW_ACQUISITION_STOP");
|
|
7
|
+
};
|
|
8
|
+
const id = z.string().min(1).max(255).regex(/\S/);
|
|
9
|
+
const discount = z
|
|
10
|
+
.object({
|
|
11
|
+
id: z.string().regex(/^di_[A-Za-z0-9_]+$/),
|
|
12
|
+
object: z.literal("discount"),
|
|
13
|
+
deleted: z.literal(false).optional(),
|
|
14
|
+
source: z
|
|
15
|
+
.object({
|
|
16
|
+
type: z.literal("coupon"),
|
|
17
|
+
coupon: z.union([
|
|
18
|
+
id,
|
|
19
|
+
z
|
|
20
|
+
.object({
|
|
21
|
+
id,
|
|
22
|
+
object: z.literal("coupon"),
|
|
23
|
+
deleted: z.literal(false).optional(),
|
|
24
|
+
})
|
|
25
|
+
.passthrough(),
|
|
26
|
+
]),
|
|
27
|
+
})
|
|
28
|
+
.passthrough(),
|
|
29
|
+
})
|
|
30
|
+
.passthrough();
|
|
31
|
+
type Discount = z.infer<typeof discount>;
|
|
32
|
+
export async function acquireCouponJoins(
|
|
33
|
+
subscription: Record<string, unknown>,
|
|
34
|
+
item: Record<string, unknown>,
|
|
35
|
+
livemode: boolean,
|
|
36
|
+
read: Read,
|
|
37
|
+
lifetime: ReturnType<typeof createReadLifetime>,
|
|
38
|
+
) {
|
|
39
|
+
const rawLists = [subscription.discounts, item.discounts];
|
|
40
|
+
const lists = rawLists as Discount[][];
|
|
41
|
+
for (const list of lists) {
|
|
42
|
+
need(z.array(discount).max(20).safeParse(list).success);
|
|
43
|
+
for (const d of list) {
|
|
44
|
+
const ref = d.source.coupon;
|
|
45
|
+
need(
|
|
46
|
+
typeof ref === "string" ||
|
|
47
|
+
ref.livemode === undefined ||
|
|
48
|
+
ref.livemode === livemode,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const ids = new Map<string, number | null>();
|
|
53
|
+
for (const list of lists)
|
|
54
|
+
for (const d of list) {
|
|
55
|
+
const ref = d.source.coupon,
|
|
56
|
+
key = typeof ref === "string" ? ref : ref.id;
|
|
57
|
+
if (!ids.has(key)) ids.set(key, null);
|
|
58
|
+
}
|
|
59
|
+
need(ids.size <= 40);
|
|
60
|
+
const couponReads: {
|
|
61
|
+
couponId: string;
|
|
62
|
+
wireCoupon: Record<string, unknown>;
|
|
63
|
+
association: { resource: string; ordinal: number };
|
|
64
|
+
}[] = [];
|
|
65
|
+
for (const list of lists)
|
|
66
|
+
for (const d of list) {
|
|
67
|
+
const ref = d.source.coupon,
|
|
68
|
+
key = typeof ref === "string" ? ref : ref.id;
|
|
69
|
+
if (ids.get(key) === null) {
|
|
70
|
+
const coupon = await read("coupon", key);
|
|
71
|
+
lifetime.check();
|
|
72
|
+
need(
|
|
73
|
+
coupon.id === key &&
|
|
74
|
+
coupon.object === "coupon" &&
|
|
75
|
+
coupon.deleted !== true &&
|
|
76
|
+
(coupon.livemode === undefined || coupon.livemode === livemode),
|
|
77
|
+
);
|
|
78
|
+
ids.set(key, couponReads.length);
|
|
79
|
+
couponReads.push({
|
|
80
|
+
couponId: key,
|
|
81
|
+
wireCoupon: coupon,
|
|
82
|
+
association: { resource: "coupon", ordinal: 4 + couponReads.length },
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
// Preserve maintained failure frontier: compare this full expanded read before any next GET.
|
|
86
|
+
need(
|
|
87
|
+
typeof ref === "string" ||
|
|
88
|
+
equal(ref, couponReads[ids.get(key)!].wireCoupon),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const derived = lists.map((list) =>
|
|
92
|
+
list.map((d, index) => {
|
|
93
|
+
const ref = d.source.coupon,
|
|
94
|
+
key = typeof ref === "string" ? ref : ref.id,
|
|
95
|
+
couponReadIndex = ids.get(key)!,
|
|
96
|
+
coupon = couponReads[couponReadIndex].wireCoupon;
|
|
97
|
+
return {
|
|
98
|
+
index,
|
|
99
|
+
discountId: d.id,
|
|
100
|
+
originalCouponReference: ref,
|
|
101
|
+
couponReadIndex,
|
|
102
|
+
joinedDiscount: { ...d, source: { ...d.source, coupon } },
|
|
103
|
+
};
|
|
104
|
+
}),
|
|
105
|
+
);
|
|
106
|
+
return {
|
|
107
|
+
couponReads,
|
|
108
|
+
derivedCouponJoins: { subscription: derived[0], item: derived[1] },
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { createReadLifetime } from "./readLifetime.js";
|
|
2
|
+
export type RawReadTransport = Readonly<{
|
|
3
|
+
rawRequest(
|
|
4
|
+
method: "GET",
|
|
5
|
+
path: string,
|
|
6
|
+
body: undefined,
|
|
7
|
+
options: Readonly<{
|
|
8
|
+
apiVersion: "2026-09-30.endive";
|
|
9
|
+
maxNetworkRetries: 0;
|
|
10
|
+
}>,
|
|
11
|
+
): Promise<unknown>;
|
|
12
|
+
}>;
|
|
13
|
+
export type Resource =
|
|
14
|
+
"subscription" | "price" | "customer" | "coupon" | "schedule";
|
|
15
|
+
export type Read = ReturnType<typeof bindWireSource>;
|
|
16
|
+
import { types } from "node:util";
|
|
17
|
+
import { requiredJSONSnapshot } from "../material/requiredJson.js";
|
|
18
|
+
import { resourceId } from "../../../renewalAggregate/shared.js";
|
|
19
|
+
const stop = () => {
|
|
20
|
+
throw Error("RAW_ACQUISITION_STOP");
|
|
21
|
+
};
|
|
22
|
+
const need: (x: unknown) => asserts x = (x) => {
|
|
23
|
+
if (!x) stop();
|
|
24
|
+
};
|
|
25
|
+
const specs = Object.freeze({
|
|
26
|
+
subscription: ["subscriptions", resourceId("sub")],
|
|
27
|
+
price: ["prices", resourceId("price")],
|
|
28
|
+
customer: ["customers", resourceId("cus")],
|
|
29
|
+
coupon: ["coupons", null],
|
|
30
|
+
schedule: ["subscription_schedules", resourceId("sub_sched")],
|
|
31
|
+
} as const);
|
|
32
|
+
const expansions = ["discounts", "items.data.discounts", "items.data.price"];
|
|
33
|
+
// Fixed pinned Node intrinsics, captured before any reply; not a provenance assertion.
|
|
34
|
+
const nativeResponsePrototype = Response.prototype,
|
|
35
|
+
nativeStatusGetter = Object.getOwnPropertyDescriptor(
|
|
36
|
+
nativeResponsePrototype,
|
|
37
|
+
"status",
|
|
38
|
+
)!.get!,
|
|
39
|
+
apply = Reflect.apply,
|
|
40
|
+
isProxy = types.isProxy;
|
|
41
|
+
function selectedID(resource: Resource, id: string) {
|
|
42
|
+
const spec = specs[resource];
|
|
43
|
+
need(spec);
|
|
44
|
+
if (spec[1]) return spec[1].parse(id);
|
|
45
|
+
need(
|
|
46
|
+
typeof id === "string" &&
|
|
47
|
+
id.length >= 1 &&
|
|
48
|
+
id.length <= 255 &&
|
|
49
|
+
/\S/.test(id) &&
|
|
50
|
+
id !== "." &&
|
|
51
|
+
id !== "..",
|
|
52
|
+
);
|
|
53
|
+
return id;
|
|
54
|
+
}
|
|
55
|
+
// Unsupported Proxies are rejected BEFORE any trap-capable JSON reflection.
|
|
56
|
+
// Count every occurrence, while removing active-path entries so repeated values may pass.
|
|
57
|
+
export function rejectProxyJSON(value: unknown, transportRoot = false) {
|
|
58
|
+
const active = new Set<object>();
|
|
59
|
+
let nodes = 0;
|
|
60
|
+
function walk(x: unknown, depth: number, isRoot: boolean): void {
|
|
61
|
+
need(++nodes <= 10000 && depth <= 40);
|
|
62
|
+
need(!isProxy(x));
|
|
63
|
+
if (x === null || typeof x !== "object") return;
|
|
64
|
+
need(!active.has(x));
|
|
65
|
+
active.add(x);
|
|
66
|
+
const array = Array.isArray(x),
|
|
67
|
+
keys = Reflect.ownKeys(x);
|
|
68
|
+
need(keys.length <= 10001);
|
|
69
|
+
for (const key of keys) {
|
|
70
|
+
need(typeof key === "string");
|
|
71
|
+
const d = Object.getOwnPropertyDescriptor(x, key);
|
|
72
|
+
need(d && "value" in d);
|
|
73
|
+
if (isRoot && transportRoot && key === "lastResponse" && !d.enumerable)
|
|
74
|
+
continue;
|
|
75
|
+
if (array && key === "length") continue;
|
|
76
|
+
need(d.enumerable);
|
|
77
|
+
walk(d.value, depth + 1, false);
|
|
78
|
+
}
|
|
79
|
+
active.delete(x);
|
|
80
|
+
}
|
|
81
|
+
walk(value, 0, true);
|
|
82
|
+
}
|
|
83
|
+
function captureReply(reply: unknown): Record<string, unknown> {
|
|
84
|
+
rejectProxyJSON(reply, true);
|
|
85
|
+
need(reply !== null && typeof reply === "object" && !Array.isArray(reply));
|
|
86
|
+
const proto = Object.getPrototypeOf(reply);
|
|
87
|
+
need(proto === Object.prototype || proto === null);
|
|
88
|
+
const meta = Object.getOwnPropertyDescriptor(reply, "lastResponse");
|
|
89
|
+
need(
|
|
90
|
+
meta &&
|
|
91
|
+
!meta.enumerable &&
|
|
92
|
+
"value" in meta &&
|
|
93
|
+
meta.value !== null &&
|
|
94
|
+
typeof meta.value === "object",
|
|
95
|
+
);
|
|
96
|
+
const metadata = meta.value;
|
|
97
|
+
need(!isProxy(metadata));
|
|
98
|
+
const codes: unknown[] = [];
|
|
99
|
+
for (const key of ["status", "statusCode"]) {
|
|
100
|
+
const d = Object.getOwnPropertyDescriptor(metadata, key);
|
|
101
|
+
if (!d) continue;
|
|
102
|
+
need("value" in d);
|
|
103
|
+
if (d.value !== undefined) codes.push(d.value);
|
|
104
|
+
}
|
|
105
|
+
if (Object.getPrototypeOf(metadata) === nativeResponsePrototype)
|
|
106
|
+
codes.push(apply(nativeStatusGetter, metadata, []));
|
|
107
|
+
need(
|
|
108
|
+
codes.length > 0 &&
|
|
109
|
+
codes.every(
|
|
110
|
+
(x) =>
|
|
111
|
+
typeof x === "number" &&
|
|
112
|
+
Number.isInteger(x) &&
|
|
113
|
+
x >= 200 &&
|
|
114
|
+
x < 300 &&
|
|
115
|
+
x === codes[0],
|
|
116
|
+
),
|
|
117
|
+
);
|
|
118
|
+
const entries: [string, unknown][] = [];
|
|
119
|
+
for (const key of Reflect.ownKeys(reply)) {
|
|
120
|
+
need(typeof key === "string");
|
|
121
|
+
if (key === "lastResponse") continue;
|
|
122
|
+
const d = Object.getOwnPropertyDescriptor(reply, key);
|
|
123
|
+
need(d && d.enumerable && "value" in d);
|
|
124
|
+
entries.push([key, d.value]);
|
|
125
|
+
}
|
|
126
|
+
return requiredJSONSnapshot(Object.fromEntries(entries)) as Record<
|
|
127
|
+
string,
|
|
128
|
+
unknown
|
|
129
|
+
>;
|
|
130
|
+
}
|
|
131
|
+
// Fixed Source transport only. Never await the old helper, which reflects before caller resumes.
|
|
132
|
+
export function bindWireSource(
|
|
133
|
+
sourceTransport: RawReadTransport,
|
|
134
|
+
lifetime: ReturnType<typeof createReadLifetime>,
|
|
135
|
+
) {
|
|
136
|
+
return async function read(resource: Resource, id: string) {
|
|
137
|
+
const selected = selectedID(resource, id),
|
|
138
|
+
query =
|
|
139
|
+
resource === "subscription"
|
|
140
|
+
? "?" +
|
|
141
|
+
new URLSearchParams(
|
|
142
|
+
expansions.map((v, i) => ["expand[" + i + "]", v]),
|
|
143
|
+
)
|
|
144
|
+
: "";
|
|
145
|
+
lifetime.check();
|
|
146
|
+
let reply;
|
|
147
|
+
try {
|
|
148
|
+
reply = await sourceTransport.rawRequest(
|
|
149
|
+
"GET",
|
|
150
|
+
"/v1/" +
|
|
151
|
+
specs[resource][0] +
|
|
152
|
+
"/" +
|
|
153
|
+
encodeURIComponent(selected) +
|
|
154
|
+
query,
|
|
155
|
+
undefined,
|
|
156
|
+
{ apiVersion: "2026-09-30.endive", maxNetworkRetries: 0 },
|
|
157
|
+
);
|
|
158
|
+
} catch {
|
|
159
|
+
lifetime.check();
|
|
160
|
+
stop();
|
|
161
|
+
}
|
|
162
|
+
// FIRST action after fulfillment: no body or metadata access may precede this guard.
|
|
163
|
+
lifetime.check();
|
|
164
|
+
const body = captureReply(reply);
|
|
165
|
+
lifetime.check();
|
|
166
|
+
return body;
|
|
167
|
+
};
|
|
168
|
+
}
|