@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,175 @@
|
|
|
1
|
+
import type { EventRecord } from "./ownData.js";
|
|
2
|
+
import "./test-fixtures/semanticSetup.js";
|
|
3
|
+
import { it as test } from "vitest";
|
|
4
|
+
import assert from "node:assert/strict";
|
|
5
|
+
const { fixture, copy, wire, sdk } =
|
|
6
|
+
await import("./test-fixtures/fixture.mjs");
|
|
7
|
+
const { createAttachEventCompiler, createConfigureEventCompiler } =
|
|
8
|
+
await import("./test-fixtures/compilerIndex.mjs");
|
|
9
|
+
const {
|
|
10
|
+
objectNode: O,
|
|
11
|
+
scalarNode: S,
|
|
12
|
+
eventDigest,
|
|
13
|
+
} = await import("./eventCodec.js");
|
|
14
|
+
const delivery = () => {
|
|
15
|
+
const records: EventRecord[] = [];
|
|
16
|
+
return {
|
|
17
|
+
records,
|
|
18
|
+
options: {
|
|
19
|
+
timeoutMs: 5000,
|
|
20
|
+
send: async (r: EventRecord, ack: (value: unknown) => void) => {
|
|
21
|
+
records.push(r);
|
|
22
|
+
ack({ sequence: r.sequence, binding: r.binding });
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
test("fully coherent C9 for another body cannot substitute retained same response", async () => {
|
|
28
|
+
const f = await fixture(),
|
|
29
|
+
d = delivery(),
|
|
30
|
+
c = createConfigureEventCompiler(f.sourceConfigure, d.options);
|
|
31
|
+
await c.dispatch({
|
|
32
|
+
event: "dispatch",
|
|
33
|
+
stage: "configure",
|
|
34
|
+
request: f.configure,
|
|
35
|
+
});
|
|
36
|
+
await c.response({
|
|
37
|
+
event: "response",
|
|
38
|
+
stage: "configure",
|
|
39
|
+
request: f.configure,
|
|
40
|
+
body: f.s.configuredBody,
|
|
41
|
+
transport: f.transport,
|
|
42
|
+
});
|
|
43
|
+
const other = copy(f.s.configuredBody);
|
|
44
|
+
other.metadata.c10_full_forgery = "ordinary";
|
|
45
|
+
const forged = await sdk.constructRenewalConfigurationReceiptV2({
|
|
46
|
+
configuration: f.sourceConfigure,
|
|
47
|
+
actualDispatch: wire(f.configure),
|
|
48
|
+
providerSnapshot: other,
|
|
49
|
+
transport: f.transport,
|
|
50
|
+
});
|
|
51
|
+
await assert.rejects(
|
|
52
|
+
c.receipt({
|
|
53
|
+
event: "receipt",
|
|
54
|
+
stage: "configure",
|
|
55
|
+
request: f.configure,
|
|
56
|
+
receipt: forged,
|
|
57
|
+
}),
|
|
58
|
+
/C10_SOURCE_STOP/,
|
|
59
|
+
);
|
|
60
|
+
assert.equal(d.records.length, 2);
|
|
61
|
+
});
|
|
62
|
+
test("complete C6 status profile and providerQualification compared beyond C6 preimage", async () => {
|
|
63
|
+
const f = await fixture();
|
|
64
|
+
for (const kind of ["status", "profile", "qualification"]) {
|
|
65
|
+
const d = delivery(),
|
|
66
|
+
c = createConfigureEventCompiler(f.sourceConfigure, d.options),
|
|
67
|
+
request = copy(f.configure);
|
|
68
|
+
if (kind === "status") request.status = "forged";
|
|
69
|
+
if (kind === "profile") request.profile.billingMode = "classic";
|
|
70
|
+
if (kind === "qualification") request.providerQualification = "qualified";
|
|
71
|
+
await assert.rejects(
|
|
72
|
+
c.dispatch({ event: "dispatch", stage: "configure", request }),
|
|
73
|
+
/C10_SOURCE_STOP/,
|
|
74
|
+
);
|
|
75
|
+
assert.equal(d.records.length, 0, kind);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
test("live source Proxy get trap is never used for selected own-data values", async () => {
|
|
79
|
+
const f = await fixture(),
|
|
80
|
+
d = delivery();
|
|
81
|
+
let gets = 0;
|
|
82
|
+
const raw = new Proxy(copy(f.sourceAttach), {
|
|
83
|
+
get() {
|
|
84
|
+
gets++;
|
|
85
|
+
throw Error("GET_TRAP");
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
const c = createAttachEventCompiler(raw, d.options);
|
|
89
|
+
await c.dispatch({ event: "dispatch", stage: "attach", request: f.request });
|
|
90
|
+
assert.equal(gets, 0);
|
|
91
|
+
assert.equal(d.records.length, 1);
|
|
92
|
+
});
|
|
93
|
+
test("response credential text stops before C10 hash or send", async () => {
|
|
94
|
+
const f = await fixture(),
|
|
95
|
+
d = delivery(),
|
|
96
|
+
c = createAttachEventCompiler(f.sourceAttach, d.options);
|
|
97
|
+
await c.dispatch({ event: "dispatch", stage: "attach", request: f.request });
|
|
98
|
+
const body = copy(f.s.attach.providerSnapshot);
|
|
99
|
+
body.extra = "sk_test_SYNTHETIC";
|
|
100
|
+
let hashes = 0;
|
|
101
|
+
const original = globalThis.crypto.subtle.digest;
|
|
102
|
+
globalThis.crypto.subtle.digest = function (...a) {
|
|
103
|
+
hashes++;
|
|
104
|
+
return original.apply(this, a);
|
|
105
|
+
};
|
|
106
|
+
try {
|
|
107
|
+
await assert.rejects(
|
|
108
|
+
c.response({
|
|
109
|
+
event: "response",
|
|
110
|
+
stage: "attach",
|
|
111
|
+
request: f.request,
|
|
112
|
+
body,
|
|
113
|
+
status: 200,
|
|
114
|
+
}),
|
|
115
|
+
/C10_SOURCE_STOP/,
|
|
116
|
+
);
|
|
117
|
+
assert.equal(hashes, 0);
|
|
118
|
+
assert.equal(d.records.length, 1);
|
|
119
|
+
} finally {
|
|
120
|
+
globalThis.crypto.subtle.digest = original;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
test("stage channels explicitly each start1 and do not establish combined lineage", async () => {
|
|
124
|
+
const f = await fixture(),
|
|
125
|
+
a = delivery(),
|
|
126
|
+
b = delivery(),
|
|
127
|
+
ca = createAttachEventCompiler(f.sourceAttach, a.options),
|
|
128
|
+
cb = createConfigureEventCompiler(f.sourceConfigure, b.options);
|
|
129
|
+
await ca.dispatch({ event: "dispatch", stage: "attach", request: f.request });
|
|
130
|
+
await cb.dispatch({
|
|
131
|
+
event: "dispatch",
|
|
132
|
+
stage: "configure",
|
|
133
|
+
request: f.configure,
|
|
134
|
+
});
|
|
135
|
+
assert.equal(ca.stageChannel, "attach");
|
|
136
|
+
assert.equal(cb.stageChannel, "configure");
|
|
137
|
+
assert.equal(ca.combinedProducerLineageEstablished, false);
|
|
138
|
+
assert.equal(cb.combinedProducerLineageEstablished, false);
|
|
139
|
+
assert.equal(a.records[0].sequence, 1);
|
|
140
|
+
assert.equal(b.records[0].sequence, 1);
|
|
141
|
+
assert.throws(
|
|
142
|
+
() =>
|
|
143
|
+
createAttachEventCompiler(f.sourceAttach, {
|
|
144
|
+
...a.options,
|
|
145
|
+
startSequence: 9,
|
|
146
|
+
}),
|
|
147
|
+
/C10_SOURCE_STOP/,
|
|
148
|
+
);
|
|
149
|
+
});
|
|
150
|
+
test("codec raw array-index character budget independently enforced before hash", async () => {
|
|
151
|
+
const array = Object.freeze({
|
|
152
|
+
kind: "array" as const,
|
|
153
|
+
entries: Object.freeze(
|
|
154
|
+
Array.from({ length: 7500 }, (_, i) =>
|
|
155
|
+
Object.freeze([String(i), S(0)] as const),
|
|
156
|
+
),
|
|
157
|
+
),
|
|
158
|
+
});
|
|
159
|
+
const node = O([
|
|
160
|
+
["text", S("x".repeat(480000))],
|
|
161
|
+
["items", array],
|
|
162
|
+
]);
|
|
163
|
+
let hashes = 0;
|
|
164
|
+
const original = globalThis.crypto.subtle.digest;
|
|
165
|
+
globalThis.crypto.subtle.digest = function (...a) {
|
|
166
|
+
hashes++;
|
|
167
|
+
return original.apply(this, a);
|
|
168
|
+
};
|
|
169
|
+
try {
|
|
170
|
+
await assert.rejects(eventDigest(node), /C10_SOURCE_STOP/);
|
|
171
|
+
assert.equal(hashes, 0);
|
|
172
|
+
} finally {
|
|
173
|
+
globalThis.crypto.subtle.digest = original;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { EventRecord } from "./ownData.js";
|
|
2
|
+
import "./test-fixtures/semanticSetup.js";
|
|
3
|
+
import { it as test } from "vitest";
|
|
4
|
+
import assert from "node:assert/strict";
|
|
5
|
+
import {
|
|
6
|
+
createAttachEventCompiler,
|
|
7
|
+
createConfigureEventCompiler,
|
|
8
|
+
} from "./test-fixtures/compilerIndex.mjs";
|
|
9
|
+
import * as sdk from "./publicApi.js";
|
|
10
|
+
import * as material from "./test-fixtures/frozen/f12.mjs";
|
|
11
|
+
import {
|
|
12
|
+
copy,
|
|
13
|
+
wire,
|
|
14
|
+
configureCase,
|
|
15
|
+
expectedPrepared,
|
|
16
|
+
binding,
|
|
17
|
+
} from "./test-fixtures/publishedRawkeyHelper.mjs";
|
|
18
|
+
// NEW raw facts are declared by configureCase before constructing any child. No provider observed.
|
|
19
|
+
test("0881 six C10 events and both classifier stages rebuild the same complete raw children", async () => {
|
|
20
|
+
const x = configureCase(),
|
|
21
|
+
sourceConfigure = copy(x.configuration),
|
|
22
|
+
sourceAttach = copy(sourceConfigure.attachReceipt.attachRequest);
|
|
23
|
+
const prepared = await sdk.prepareRenewalPriceReplacementV2(
|
|
24
|
+
copy(sourceAttach.preparation),
|
|
25
|
+
);
|
|
26
|
+
assert.deepEqual(prepared, expectedPrepared(sourceAttach.preparation));
|
|
27
|
+
const request = await sdk.prepareRenewalScheduleAttachmentV2({
|
|
28
|
+
prepared,
|
|
29
|
+
apiVersion: sourceAttach.apiVersion,
|
|
30
|
+
attachKey: sourceAttach.attachKey,
|
|
31
|
+
firstDispatchedAt: sourceAttach.firstDispatchedAt,
|
|
32
|
+
});
|
|
33
|
+
const attach = await sdk.constructRenewalScheduleAttachmentReceiptV2(
|
|
34
|
+
copy(sourceConfigure.attachReceipt),
|
|
35
|
+
);
|
|
36
|
+
const configure = await sdk.projectRenewalConfigurationV2(
|
|
37
|
+
copy(sourceConfigure),
|
|
38
|
+
);
|
|
39
|
+
assert.equal(configure.status, "projected_configure_request");
|
|
40
|
+
// Identity-valid unchanged baseline response deliberately makes no configuration-application claim.
|
|
41
|
+
const responseBody = copy(sourceConfigure.schedule),
|
|
42
|
+
transport = { status: 200, requestId: "req_SYNTHETIC_ADOPTION" };
|
|
43
|
+
const stored = await sdk.constructRenewalConfigurationReceiptV2({
|
|
44
|
+
configuration: copy(sourceConfigure),
|
|
45
|
+
actualDispatch: wire(configure),
|
|
46
|
+
providerSnapshot: responseBody,
|
|
47
|
+
transport,
|
|
48
|
+
});
|
|
49
|
+
const a = await material.classifyRetainedAttachmentV2({
|
|
50
|
+
attachRequest: copy(sourceAttach),
|
|
51
|
+
intent: "initial",
|
|
52
|
+
}),
|
|
53
|
+
c = await material.classifyFreshConfigurationV2(copy(x));
|
|
54
|
+
assert.equal(a.status, "classified");
|
|
55
|
+
assert.equal(c.status, "classified");
|
|
56
|
+
assert.deepEqual(a.material.originalPrepared, prepared);
|
|
57
|
+
assert.deepEqual(c.material.originalPrepared, prepared);
|
|
58
|
+
assert.deepEqual(a.material.completeRequest, request);
|
|
59
|
+
assert.deepEqual(c.material.completeRequest, configure);
|
|
60
|
+
assert.deepEqual(c.material.stageEvidence.acknowledgedAttachReceipt, attach);
|
|
61
|
+
for (const stage of ["attach", "configure"] as const) {
|
|
62
|
+
const records: EventRecord[] = [],
|
|
63
|
+
opts = {
|
|
64
|
+
timeoutMs: 5000,
|
|
65
|
+
send: async (r: EventRecord, ack: (value: unknown) => void) => {
|
|
66
|
+
records.push(r);
|
|
67
|
+
ack({ sequence: r.sequence, binding: r.binding });
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
const compiler =
|
|
71
|
+
stage === "attach"
|
|
72
|
+
? createAttachEventCompiler(sourceAttach, opts)
|
|
73
|
+
: createConfigureEventCompiler(sourceConfigure, opts);
|
|
74
|
+
const events =
|
|
75
|
+
stage === "attach"
|
|
76
|
+
? [
|
|
77
|
+
{ event: "dispatch", stage, request },
|
|
78
|
+
{
|
|
79
|
+
event: "response",
|
|
80
|
+
stage,
|
|
81
|
+
request,
|
|
82
|
+
body: copy(sourceConfigure.attachReceipt.providerSnapshot),
|
|
83
|
+
status: 200,
|
|
84
|
+
},
|
|
85
|
+
{ event: "receipt", stage, request, receipt: attach },
|
|
86
|
+
]
|
|
87
|
+
: [
|
|
88
|
+
{ event: "dispatch", stage, request: configure },
|
|
89
|
+
{
|
|
90
|
+
event: "response",
|
|
91
|
+
stage,
|
|
92
|
+
request: configure,
|
|
93
|
+
body: responseBody,
|
|
94
|
+
transport,
|
|
95
|
+
},
|
|
96
|
+
{ event: "receipt", stage, request: configure, receipt: stored },
|
|
97
|
+
];
|
|
98
|
+
const expected = copy(events);
|
|
99
|
+
for (const event of events)
|
|
100
|
+
await compiler[event.event as "dispatch" | "response" | "receipt"](event);
|
|
101
|
+
assert.equal(records.length, 3);
|
|
102
|
+
for (const [i, r] of records.entries()) {
|
|
103
|
+
assert.equal(r.sequence, i + 1);
|
|
104
|
+
assert.deepEqual(r.data, expected[i]);
|
|
105
|
+
assert.equal(
|
|
106
|
+
r.binding,
|
|
107
|
+
binding("unbound-qualification-event", {
|
|
108
|
+
sequence: i + 1,
|
|
109
|
+
data: expected[i],
|
|
110
|
+
}),
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { CapturedNode } from "./eventCodec.js";
|
|
2
|
+
export function stop(): never {
|
|
3
|
+
throw Error("C10_SOURCE_STOP");
|
|
4
|
+
}
|
|
5
|
+
export function need(x: unknown): asserts x {
|
|
6
|
+
if (!x) stop();
|
|
7
|
+
}
|
|
8
|
+
export function freeze<T>(x: T): T {
|
|
9
|
+
if (x && typeof x === "object") {
|
|
10
|
+
for (const v of Object.values(x)) freeze(v);
|
|
11
|
+
Object.freeze(x);
|
|
12
|
+
}
|
|
13
|
+
return x;
|
|
14
|
+
}
|
|
15
|
+
export function closed(
|
|
16
|
+
raw: unknown,
|
|
17
|
+
required: readonly string[],
|
|
18
|
+
optional: readonly string[] = [],
|
|
19
|
+
): Record<string, unknown> {
|
|
20
|
+
need(raw && typeof raw === "object" && !Array.isArray(raw));
|
|
21
|
+
const p = Object.getPrototypeOf(raw);
|
|
22
|
+
need(p === Object.prototype || p === null);
|
|
23
|
+
const keys = Reflect.ownKeys(raw);
|
|
24
|
+
need(
|
|
25
|
+
keys.every(
|
|
26
|
+
(k) =>
|
|
27
|
+
typeof k === "string" && (required.includes(k) || optional.includes(k)),
|
|
28
|
+
) && required.every((k) => keys.includes(k)),
|
|
29
|
+
);
|
|
30
|
+
const out = Object.create(null) as Record<string, unknown>;
|
|
31
|
+
for (const k of keys) {
|
|
32
|
+
need(typeof k === "string");
|
|
33
|
+
const d = Object.getOwnPropertyDescriptor(raw, k);
|
|
34
|
+
need(d && d.enumerable && Object.prototype.hasOwnProperty.call(d, "value"));
|
|
35
|
+
out[k] = d.value;
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
export function equalNodes(a: CapturedNode, b: CapturedNode): boolean {
|
|
40
|
+
if (a.kind !== b.kind) return false;
|
|
41
|
+
if (a.kind === "scalar") return b.kind === "scalar" && a.value === b.value;
|
|
42
|
+
if (b.kind === "scalar" || a.entries.length !== b.entries.length)
|
|
43
|
+
return false;
|
|
44
|
+
const other = new Map(b.entries);
|
|
45
|
+
return a.entries.every(
|
|
46
|
+
([k, v]) => other.has(k) && equalNodes(v, other.get(k)!),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export function field(node: CapturedNode, key: string): CapturedNode {
|
|
50
|
+
need(node.kind === "object");
|
|
51
|
+
const pair = node.entries.find(([k]) => k === key);
|
|
52
|
+
need(pair);
|
|
53
|
+
return pair[1];
|
|
54
|
+
}
|
|
55
|
+
export function scalar(node: CapturedNode): unknown {
|
|
56
|
+
need(node.kind === "scalar");
|
|
57
|
+
return node.value;
|
|
58
|
+
}
|
|
59
|
+
export interface EventRecord {
|
|
60
|
+
readonly sequence: number;
|
|
61
|
+
readonly binding: string;
|
|
62
|
+
readonly data: unknown;
|
|
63
|
+
}
|
|
64
|
+
export interface AppendOptions {
|
|
65
|
+
readonly timeoutMs: number;
|
|
66
|
+
readonly send: (
|
|
67
|
+
record: Readonly<EventRecord>,
|
|
68
|
+
ack: (value: unknown) => void,
|
|
69
|
+
) => unknown;
|
|
70
|
+
}
|
|
71
|
+
export function options(raw: unknown): AppendOptions {
|
|
72
|
+
try {
|
|
73
|
+
const x = closed(raw, ["send", "timeoutMs"]);
|
|
74
|
+
need(
|
|
75
|
+
typeof x.send === "function" &&
|
|
76
|
+
typeof x.timeoutMs === "number" &&
|
|
77
|
+
Number.isSafeInteger(x.timeoutMs) &&
|
|
78
|
+
x.timeoutMs >= 1 &&
|
|
79
|
+
x.timeoutMs <= 5000,
|
|
80
|
+
);
|
|
81
|
+
return x as unknown as AppendOptions;
|
|
82
|
+
} catch {
|
|
83
|
+
stop();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
type Wire = {
|
|
87
|
+
scope: string;
|
|
88
|
+
apiVersion: string;
|
|
89
|
+
method: string;
|
|
90
|
+
path: string;
|
|
91
|
+
payload: unknown;
|
|
92
|
+
key: string;
|
|
93
|
+
firstDispatchedAt: number;
|
|
94
|
+
};
|
|
95
|
+
export const sevenWire = <T extends Wire>(r: T): Pick<T, keyof Wire> => ({
|
|
96
|
+
scope: r.scope,
|
|
97
|
+
apiVersion: r.apiVersion,
|
|
98
|
+
method: r.method,
|
|
99
|
+
path: r.path,
|
|
100
|
+
payload: r.payload,
|
|
101
|
+
key: r.key,
|
|
102
|
+
firstDispatchedAt: r.firstDispatchedAt,
|
|
103
|
+
});
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { afterEach, expect, it, vi } from "vitest";
|
|
2
|
+
import type { EventRecord } from "./ownData.js";
|
|
3
|
+
|
|
4
|
+
function deferred<T>() {
|
|
5
|
+
let resolve!: (value: T) => void;
|
|
6
|
+
const promise = new Promise<T>((r) => {
|
|
7
|
+
resolve = r;
|
|
8
|
+
});
|
|
9
|
+
return { promise, resolve };
|
|
10
|
+
}
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
vi.doUnmock("../sourceBindings.js");
|
|
13
|
+
vi.doUnmock("./publicApi.js");
|
|
14
|
+
vi.resetModules();
|
|
15
|
+
vi.useRealTimers();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
async function rig() {
|
|
19
|
+
vi.resetModules();
|
|
20
|
+
const { fixture } = await import("./test-fixtures/fixture.mjs");
|
|
21
|
+
const f = await fixture();
|
|
22
|
+
const start = f.sourceAttach.firstDispatchedAt * 1000;
|
|
23
|
+
const time = { wallMs: start, ns: BigInt(start) * 1_000_000n };
|
|
24
|
+
const basis = {
|
|
25
|
+
startWallMs: start,
|
|
26
|
+
startNs: time.ns,
|
|
27
|
+
workEndWallMs: start + 180_000,
|
|
28
|
+
workEndNs: time.ns + 180_000_000_000n,
|
|
29
|
+
endWallMs: start + 210_000,
|
|
30
|
+
endNs: time.ns + 210_000_000_000n,
|
|
31
|
+
};
|
|
32
|
+
const source = {
|
|
33
|
+
clock: {
|
|
34
|
+
basis,
|
|
35
|
+
sample: () => ({ ...time }),
|
|
36
|
+
subscribeRetirement: () => () => {},
|
|
37
|
+
},
|
|
38
|
+
originalPolicy: {
|
|
39
|
+
firstDispatchedAt: f.sourceAttach.firstDispatchedAt,
|
|
40
|
+
periodStart: f.sourceAttach.firstDispatchedAt - 1,
|
|
41
|
+
periodEnd: f.sourceAttach.firstDispatchedAt + 1000,
|
|
42
|
+
},
|
|
43
|
+
originAssociation: Object.freeze({}),
|
|
44
|
+
};
|
|
45
|
+
vi.doMock("../sourceBindings.js", () => ({
|
|
46
|
+
loadOwnedOriginalSource: () => source,
|
|
47
|
+
}));
|
|
48
|
+
const { OWNER } = await import("../originalOwner.js");
|
|
49
|
+
return { f, time, basis, OWNER };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const boundaries = [
|
|
53
|
+
["C1", "prepareRenewalPriceReplacementV2", "attach", "dispatch"],
|
|
54
|
+
["C2", "prepareRenewalScheduleAttachmentV2", "attach", "dispatch"],
|
|
55
|
+
["C3", "constructRenewalScheduleAttachmentReceiptV2", "attach", "receipt"],
|
|
56
|
+
["C6", "projectRenewalConfigurationV2", "configure", "dispatch"],
|
|
57
|
+
["C9", "constructRenewalConfigurationReceiptV2", "configure", "receipt"],
|
|
58
|
+
] as const;
|
|
59
|
+
|
|
60
|
+
for (const [family, method, stage, branch] of boundaries) {
|
|
61
|
+
it(`actual original owner retirement rejects held real ${family} before the next continuation`, async () => {
|
|
62
|
+
const { f, OWNER } = await rig();
|
|
63
|
+
const api = await import("./publicApi.js");
|
|
64
|
+
const entered = deferred<void>(),
|
|
65
|
+
release = deferred<void>();
|
|
66
|
+
const calls: string[] = [];
|
|
67
|
+
const held: Promise<unknown>[] = [];
|
|
68
|
+
const facade = Object.fromEntries(
|
|
69
|
+
Object.entries(api).map(([name, fn]) => [
|
|
70
|
+
name,
|
|
71
|
+
async (...args: unknown[]) => {
|
|
72
|
+
calls.push(name);
|
|
73
|
+
const value = await Reflect.apply(fn, undefined, args);
|
|
74
|
+
if (name === method) {
|
|
75
|
+
entered.resolve();
|
|
76
|
+
await release.promise;
|
|
77
|
+
}
|
|
78
|
+
return value;
|
|
79
|
+
},
|
|
80
|
+
]),
|
|
81
|
+
);
|
|
82
|
+
vi.doMock("./publicApi.js", () => facade);
|
|
83
|
+
const { createAttachEventCompiler } = await import("./attachEvents.js");
|
|
84
|
+
const { createConfigureEventCompiler } =
|
|
85
|
+
await import("./configureEvents.js");
|
|
86
|
+
const records: EventRecord[] = [];
|
|
87
|
+
const options = {
|
|
88
|
+
timeoutMs: 5000,
|
|
89
|
+
send(record: EventRecord, ack: (v: unknown) => void) {
|
|
90
|
+
records.push(record);
|
|
91
|
+
ack({ sequence: record.sequence, binding: record.binding });
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
const request = stage === "attach" ? f.request : f.configure;
|
|
95
|
+
const compiler =
|
|
96
|
+
stage === "attach"
|
|
97
|
+
? createAttachEventCompiler(f.sourceAttach, options)
|
|
98
|
+
: createConfigureEventCompiler(f.sourceConfigure, options);
|
|
99
|
+
if (branch === "receipt") {
|
|
100
|
+
await compiler.dispatch({ event: "dispatch", stage, request });
|
|
101
|
+
await compiler.response(
|
|
102
|
+
stage === "attach"
|
|
103
|
+
? {
|
|
104
|
+
event: "response",
|
|
105
|
+
stage,
|
|
106
|
+
request,
|
|
107
|
+
body: f.s.attach.providerSnapshot,
|
|
108
|
+
status: 200,
|
|
109
|
+
}
|
|
110
|
+
: {
|
|
111
|
+
event: "response",
|
|
112
|
+
stage,
|
|
113
|
+
request,
|
|
114
|
+
body: f.s.configuredBody,
|
|
115
|
+
transport: f.transport,
|
|
116
|
+
},
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
const before = records.length;
|
|
120
|
+
const operation =
|
|
121
|
+
branch === "dispatch"
|
|
122
|
+
? compiler.dispatch({ event: "dispatch", stage, request })
|
|
123
|
+
: compiler.receipt({
|
|
124
|
+
event: "receipt",
|
|
125
|
+
stage,
|
|
126
|
+
request,
|
|
127
|
+
receipt: stage === "attach" ? f.attach : f.stored,
|
|
128
|
+
});
|
|
129
|
+
// A setup refusal must fail this prerequisite rather than hang at the barrier.
|
|
130
|
+
const settled = operation.then(
|
|
131
|
+
() => {
|
|
132
|
+
throw Error("SETTLED_BEFORE_REAL_CONSTRUCTOR_BARRIER");
|
|
133
|
+
},
|
|
134
|
+
() => {
|
|
135
|
+
throw Error("REFUSED_BEFORE_REAL_CONSTRUCTOR_BARRIER");
|
|
136
|
+
},
|
|
137
|
+
);
|
|
138
|
+
held.push(settled.catch(() => {}));
|
|
139
|
+
try {
|
|
140
|
+
await Promise.race([entered.promise, settled]);
|
|
141
|
+
const entries = calls.length;
|
|
142
|
+
OWNER.retire();
|
|
143
|
+
await expect(operation).rejects.toThrow("C10_SOURCE_STOP");
|
|
144
|
+
expect(records).toHaveLength(before);
|
|
145
|
+
release.resolve();
|
|
146
|
+
await Promise.all(held);
|
|
147
|
+
expect(calls).toHaveLength(entries);
|
|
148
|
+
expect(() => OWNER.check()).toThrow("ORIGINAL_OWNER_STOP");
|
|
149
|
+
} finally {
|
|
150
|
+
release.resolve();
|
|
151
|
+
await operation.catch(() => {});
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
it("ACK alone cannot succeed after actual owner retirement while send remains held", async () => {
|
|
157
|
+
const { OWNER } = await rig();
|
|
158
|
+
const { createAppendAckAdapter } = await import("./appendAck.js");
|
|
159
|
+
const { scalarNode } = await import("./eventCodec.js");
|
|
160
|
+
const entered = deferred<void>(),
|
|
161
|
+
release = deferred<void>();
|
|
162
|
+
let sends = 0;
|
|
163
|
+
const append = createAppendAckAdapter({
|
|
164
|
+
timeoutMs: 5000,
|
|
165
|
+
send(record: EventRecord, ack: (v: unknown) => void) {
|
|
166
|
+
sends++;
|
|
167
|
+
ack({ sequence: record.sequence, binding: record.binding });
|
|
168
|
+
entered.resolve();
|
|
169
|
+
return release.promise;
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
const operation = append(scalarNode("ordinary"));
|
|
173
|
+
try {
|
|
174
|
+
await entered.promise;
|
|
175
|
+
OWNER.retire();
|
|
176
|
+
await expect(operation).rejects.toThrow("C10_SOURCE_STOP");
|
|
177
|
+
release.resolve();
|
|
178
|
+
await expect(append(scalarNode("late"))).rejects.toThrow("C10_SOURCE_STOP");
|
|
179
|
+
expect(sends).toBe(1);
|
|
180
|
+
} finally {
|
|
181
|
+
release.resolve();
|
|
182
|
+
await operation.catch(() => {});
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it.each(["append", "original"] as const)(
|
|
187
|
+
"%s deadline closes held send without resetting the original basis",
|
|
188
|
+
async (limit) => {
|
|
189
|
+
const { OWNER, time, basis } = await rig();
|
|
190
|
+
vi.useFakeTimers();
|
|
191
|
+
if (limit === "original") {
|
|
192
|
+
time.wallMs = basis.workEndWallMs - 20;
|
|
193
|
+
time.ns = basis.workEndNs - 20_000_000n;
|
|
194
|
+
}
|
|
195
|
+
const { createAppendAckAdapter } = await import("./appendAck.js");
|
|
196
|
+
const { scalarNode } = await import("./eventCodec.js");
|
|
197
|
+
const entered = deferred<void>(),
|
|
198
|
+
release = deferred<void>();
|
|
199
|
+
const append = createAppendAckAdapter({
|
|
200
|
+
timeoutMs: limit === "append" ? 25 : 5000,
|
|
201
|
+
send(record: EventRecord, ack: (v: unknown) => void) {
|
|
202
|
+
ack({ sequence: record.sequence, binding: record.binding });
|
|
203
|
+
entered.resolve();
|
|
204
|
+
return release.promise;
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
const operation = append(scalarNode("ordinary"));
|
|
208
|
+
const rejection = expect(operation).rejects.toThrow("C10_SOURCE_STOP");
|
|
209
|
+
try {
|
|
210
|
+
await entered.promise;
|
|
211
|
+
const originalBasis = OWNER.basis;
|
|
212
|
+
const delta = limit === "append" ? 25 : 20;
|
|
213
|
+
time.wallMs += delta;
|
|
214
|
+
time.ns += BigInt(delta) * 1_000_000n;
|
|
215
|
+
await vi.advanceTimersByTimeAsync(delta);
|
|
216
|
+
await rejection;
|
|
217
|
+
expect(originalBasis.startWallMs).toBe(basis.startWallMs);
|
|
218
|
+
if (limit === "append") expect(OWNER.check().retired).toBe(false);
|
|
219
|
+
else expect(() => OWNER.check()).toThrow("ORIGINAL_OWNER_STOP");
|
|
220
|
+
} finally {
|
|
221
|
+
release.resolve();
|
|
222
|
+
await operation.catch(() => {});
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
it("retirement at the real C10 digest return prevents actual send", async () => {
|
|
228
|
+
const { OWNER } = await rig();
|
|
229
|
+
const { createAppendAckAdapter } = await import("./appendAck.js");
|
|
230
|
+
const { scalarNode } = await import("./eventCodec.js");
|
|
231
|
+
const original = globalThis.crypto.subtle.digest;
|
|
232
|
+
const entered = deferred<void>(),
|
|
233
|
+
release = deferred<void>();
|
|
234
|
+
let sends = 0,
|
|
235
|
+
realDigests = 0;
|
|
236
|
+
const operations: Promise<ArrayBuffer>[] = [];
|
|
237
|
+
const spy = vi
|
|
238
|
+
.spyOn(globalThis.crypto.subtle, "digest")
|
|
239
|
+
.mockImplementation(function (algorithm, input) {
|
|
240
|
+
// This facade forwards the actual receiver and original bytes without replacement.
|
|
241
|
+
const operation = Reflect.apply(original, globalThis.crypto.subtle, [
|
|
242
|
+
algorithm,
|
|
243
|
+
input,
|
|
244
|
+
]).then(async (value: ArrayBuffer) => {
|
|
245
|
+
realDigests++;
|
|
246
|
+
entered.resolve();
|
|
247
|
+
await release.promise;
|
|
248
|
+
return value;
|
|
249
|
+
});
|
|
250
|
+
operations.push(operation);
|
|
251
|
+
return operation;
|
|
252
|
+
});
|
|
253
|
+
const append = createAppendAckAdapter({
|
|
254
|
+
timeoutMs: 5000,
|
|
255
|
+
send() {
|
|
256
|
+
sends++;
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
const operation = append(scalarNode("ordinary"));
|
|
260
|
+
const settled = operation.then(
|
|
261
|
+
() => {
|
|
262
|
+
throw Error("SETTLED_BEFORE_DIGEST");
|
|
263
|
+
},
|
|
264
|
+
() => {
|
|
265
|
+
throw Error("REFUSED_BEFORE_DIGEST");
|
|
266
|
+
},
|
|
267
|
+
);
|
|
268
|
+
void settled.catch(() => {});
|
|
269
|
+
try {
|
|
270
|
+
await Promise.race([entered.promise, settled]);
|
|
271
|
+
OWNER.retire();
|
|
272
|
+
await expect(operation).rejects.toThrow("C10_SOURCE_STOP");
|
|
273
|
+
release.resolve();
|
|
274
|
+
await Promise.all(operations);
|
|
275
|
+
expect(realDigests).toBe(1);
|
|
276
|
+
expect(sends).toBe(0);
|
|
277
|
+
} finally {
|
|
278
|
+
release.resolve();
|
|
279
|
+
await operation.catch(() => {});
|
|
280
|
+
await Promise.allSettled(operations);
|
|
281
|
+
spy.mockRestore();
|
|
282
|
+
}
|
|
283
|
+
});
|