@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,354 @@
|
|
|
1
|
+
import { afterEach, expect, it, vi } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
fixture,
|
|
4
|
+
API_VERSION,
|
|
5
|
+
} from "../../../../../../tests/renewalObservation/native-fixture.js";
|
|
6
|
+
import {
|
|
7
|
+
prepareRenewalPriceReplacementV2,
|
|
8
|
+
prepareRenewalScheduleAttachmentV2,
|
|
9
|
+
constructRenewalScheduleAttachmentReceiptV2,
|
|
10
|
+
projectRenewalConfigurationV2,
|
|
11
|
+
} from "../../../renewalV2/index.js";
|
|
12
|
+
import type { Bundle } from "../material/capture.js";
|
|
13
|
+
import type {
|
|
14
|
+
PreflightRecord,
|
|
15
|
+
CurrentEvidence,
|
|
16
|
+
PreflightOutput,
|
|
17
|
+
} from "./grammar.js";
|
|
18
|
+
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
vi.doUnmock("../sourceBindings.js");
|
|
21
|
+
vi.resetModules();
|
|
22
|
+
vi.useRealTimers();
|
|
23
|
+
vi.restoreAllMocks();
|
|
24
|
+
});
|
|
25
|
+
async function inputs(padding = 0) {
|
|
26
|
+
vi.resetModules();
|
|
27
|
+
const first = 1768867140,
|
|
28
|
+
observed = 1768867200;
|
|
29
|
+
const clock = {
|
|
30
|
+
basis: {
|
|
31
|
+
startWallMs: first * 1000,
|
|
32
|
+
startNs: BigInt(first) * 1000000000n,
|
|
33
|
+
workEndWallMs: (first + 180) * 1000,
|
|
34
|
+
workEndNs: BigInt(first + 180) * 1000000000n,
|
|
35
|
+
endWallMs: (first + 210) * 1000,
|
|
36
|
+
endNs: BigInt(first + 210) * 1000000000n,
|
|
37
|
+
},
|
|
38
|
+
sample: () => ({
|
|
39
|
+
wallMs: observed * 1000 + 1,
|
|
40
|
+
ns: BigInt(observed) * 1000000000n + 1000000n,
|
|
41
|
+
}),
|
|
42
|
+
subscribeRetirement: (_fn: () => void) => () => {},
|
|
43
|
+
};
|
|
44
|
+
vi.doMock("../sourceBindings.js", () => ({
|
|
45
|
+
loadOwnedOriginalSource: () => ({
|
|
46
|
+
clock,
|
|
47
|
+
originalPolicy: {
|
|
48
|
+
firstDispatchedAt: first,
|
|
49
|
+
periodStart: 1768435200,
|
|
50
|
+
periodEnd: 1771113600,
|
|
51
|
+
},
|
|
52
|
+
originAssociation: Object.freeze({}),
|
|
53
|
+
}),
|
|
54
|
+
}));
|
|
55
|
+
vi.useFakeTimers();
|
|
56
|
+
vi.setSystemTime(observed * 1000 + 1);
|
|
57
|
+
// Current repository factory supplies raw native bodies only; its V1 claims are ignored.
|
|
58
|
+
// Every new scenario value is declared before the actual V2 subject constructors.
|
|
59
|
+
const f = fixture({ subscription: { trial_start: null, trial_end: null } });
|
|
60
|
+
const subscription = structuredClone(f.subscription),
|
|
61
|
+
targetPrice = structuredClone(f.targetPrice),
|
|
62
|
+
billingCustomer = structuredClone(f.billingCustomer);
|
|
63
|
+
if (padding)
|
|
64
|
+
Object.defineProperty(targetPrice, "opaque", {
|
|
65
|
+
value: "x".repeat(padding),
|
|
66
|
+
enumerable: true,
|
|
67
|
+
});
|
|
68
|
+
const item = subscription.items.data[0];
|
|
69
|
+
const expected = {
|
|
70
|
+
customerAccountId: "acct_buyer",
|
|
71
|
+
subscriptionId: "sub_original",
|
|
72
|
+
itemId: "si_original",
|
|
73
|
+
currentPriceId: "price_original",
|
|
74
|
+
currentProductId: "custom-original",
|
|
75
|
+
targetPriceId: "price_target",
|
|
76
|
+
targetProductId: "custom-target",
|
|
77
|
+
periodStart: 1768435200,
|
|
78
|
+
periodEnd: 1771113600,
|
|
79
|
+
livemode: false,
|
|
80
|
+
};
|
|
81
|
+
const preparation = {
|
|
82
|
+
subscription,
|
|
83
|
+
targetPrice,
|
|
84
|
+
billingCustomer,
|
|
85
|
+
expected,
|
|
86
|
+
key: "renewal:logical-original",
|
|
87
|
+
};
|
|
88
|
+
const prepared = await prepareRenewalPriceReplacementV2(preparation);
|
|
89
|
+
const request = await prepareRenewalScheduleAttachmentV2({
|
|
90
|
+
prepared,
|
|
91
|
+
apiVersion: API_VERSION,
|
|
92
|
+
attachKey: "renewal:attach-original",
|
|
93
|
+
firstDispatchedAt: first,
|
|
94
|
+
});
|
|
95
|
+
const rawAttach = {
|
|
96
|
+
preparation: structuredClone(preparation),
|
|
97
|
+
apiVersion: API_VERSION,
|
|
98
|
+
attachKey: request.key,
|
|
99
|
+
firstDispatchedAt: first,
|
|
100
|
+
};
|
|
101
|
+
const actualDispatch = {
|
|
102
|
+
scope: request.scope,
|
|
103
|
+
apiVersion: request.apiVersion,
|
|
104
|
+
method: request.method,
|
|
105
|
+
path: request.path,
|
|
106
|
+
payload: request.payload,
|
|
107
|
+
key: request.key,
|
|
108
|
+
firstDispatchedAt: request.firstDispatchedAt,
|
|
109
|
+
};
|
|
110
|
+
const rawReceipt = {
|
|
111
|
+
attachRequest: rawAttach,
|
|
112
|
+
actualDispatch,
|
|
113
|
+
providerSnapshot: structuredClone(f.schedule),
|
|
114
|
+
};
|
|
115
|
+
const ack = await constructRenewalScheduleAttachmentReceiptV2(rawReceipt);
|
|
116
|
+
const configuration = {
|
|
117
|
+
preparation,
|
|
118
|
+
attachReceipt: rawReceipt,
|
|
119
|
+
freshSubscription: {
|
|
120
|
+
...structuredClone(subscription),
|
|
121
|
+
schedule: ack.scheduleId,
|
|
122
|
+
},
|
|
123
|
+
targetPrice: structuredClone(targetPrice),
|
|
124
|
+
billingCustomer: structuredClone(billingCustomer),
|
|
125
|
+
schedule: structuredClone(f.schedule),
|
|
126
|
+
apiVersion: API_VERSION,
|
|
127
|
+
observedAt: observed,
|
|
128
|
+
firstDispatchedAt: observed,
|
|
129
|
+
configureKey: "renewal:configure-original",
|
|
130
|
+
};
|
|
131
|
+
const projected = await projectRenewalConfigurationV2(configuration);
|
|
132
|
+
if (projected.status !== "projected_configure_request")
|
|
133
|
+
throw Error("PUBLIC_C6_FIXTURE_PREREQUISITE");
|
|
134
|
+
const sourceRows = [subscription.discounts, item.discounts],
|
|
135
|
+
coupons = new Map<
|
|
136
|
+
string,
|
|
137
|
+
(typeof subscription.discounts)[number]["source"]["coupon"]
|
|
138
|
+
>();
|
|
139
|
+
for (const list of sourceRows)
|
|
140
|
+
for (const d of list)
|
|
141
|
+
if (!coupons.has(d.source.coupon.id))
|
|
142
|
+
coupons.set(d.source.coupon.id, structuredClone(d.source.coupon));
|
|
143
|
+
const couponReads = [...coupons].map(([couponId, wireCoupon], index) => ({
|
|
144
|
+
couponId,
|
|
145
|
+
wireCoupon,
|
|
146
|
+
association: { resource: "coupon", ordinal: 4 + index },
|
|
147
|
+
}));
|
|
148
|
+
const joins = sourceRows.map((list) =>
|
|
149
|
+
list.map((d, index) => {
|
|
150
|
+
const couponReadIndex = couponReads.findIndex(
|
|
151
|
+
(row) => row.couponId === d.source.coupon.id,
|
|
152
|
+
);
|
|
153
|
+
expect(couponReadIndex).toBeGreaterThanOrEqual(0);
|
|
154
|
+
return {
|
|
155
|
+
index,
|
|
156
|
+
discountId: d.id,
|
|
157
|
+
originalCouponReference: structuredClone(d.source.coupon),
|
|
158
|
+
couponReadIndex,
|
|
159
|
+
joinedDiscount: {
|
|
160
|
+
...structuredClone(d),
|
|
161
|
+
source: {
|
|
162
|
+
...structuredClone(d.source),
|
|
163
|
+
coupon: structuredClone(couponReads[couponReadIndex]!.wireCoupon),
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}),
|
|
168
|
+
);
|
|
169
|
+
const originalBundle: Bundle = {
|
|
170
|
+
wireSubscription: structuredClone(subscription),
|
|
171
|
+
wireTargetPrice: structuredClone(targetPrice),
|
|
172
|
+
wireBillingCustomer: structuredClone(billingCustomer),
|
|
173
|
+
couponReads,
|
|
174
|
+
derivedCouponJoins: { subscription: joins[0], item: joins[1] },
|
|
175
|
+
};
|
|
176
|
+
const record: PreflightRecord = {
|
|
177
|
+
configuration,
|
|
178
|
+
request: projected,
|
|
179
|
+
attachReceipt: ack,
|
|
180
|
+
originalBundle,
|
|
181
|
+
};
|
|
182
|
+
const evidence: CurrentEvidence = {
|
|
183
|
+
bundle: {
|
|
184
|
+
...structuredClone(originalBundle),
|
|
185
|
+
wireSubscription: structuredClone(configuration.freshSubscription),
|
|
186
|
+
},
|
|
187
|
+
schedule: structuredClone(configuration.schedule),
|
|
188
|
+
observedAt: observed,
|
|
189
|
+
};
|
|
190
|
+
const capture = await import("./record.js"),
|
|
191
|
+
relations = await import("./relations.js"),
|
|
192
|
+
output = await import("./output.js");
|
|
193
|
+
return { record, evidence, projected, ack, capture, relations, output };
|
|
194
|
+
}
|
|
195
|
+
function metrics(value: unknown) {
|
|
196
|
+
let nodes = 0,
|
|
197
|
+
depth = 0;
|
|
198
|
+
const active = new Set<object>();
|
|
199
|
+
function visit(x: unknown, d: number) {
|
|
200
|
+
nodes++;
|
|
201
|
+
depth = Math.max(depth, d);
|
|
202
|
+
if (x && typeof x === "object") {
|
|
203
|
+
if (active.has(x)) throw Error("TEST_CYCLE");
|
|
204
|
+
active.add(x);
|
|
205
|
+
for (const y of Object.values(x)) visit(y, d + 1);
|
|
206
|
+
active.delete(x);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
visit(value, 0);
|
|
210
|
+
const text = JSON.stringify(value);
|
|
211
|
+
return {
|
|
212
|
+
chars: text.length,
|
|
213
|
+
bytes: new TextEncoder().encode(text).length,
|
|
214
|
+
nodes,
|
|
215
|
+
depth,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
it("reconstructs the complete four-field record and releases only the full fourteen-slot DATA wrapper", async () => {
|
|
219
|
+
const f = await inputs();
|
|
220
|
+
const captured = f.capture.capturePreflightRecord(f.record);
|
|
221
|
+
const record = f.relations.verifyPreflightRecord(
|
|
222
|
+
captured,
|
|
223
|
+
f.projected,
|
|
224
|
+
f.ack,
|
|
225
|
+
);
|
|
226
|
+
f.relations.verifyCurrentPreflight(record, f.evidence);
|
|
227
|
+
const out = f.output.releasePreflight(
|
|
228
|
+
record,
|
|
229
|
+
f.evidence,
|
|
230
|
+
f.projected,
|
|
231
|
+
f.projected,
|
|
232
|
+
f.ack,
|
|
233
|
+
);
|
|
234
|
+
expect(out).toEqual({
|
|
235
|
+
status: "configure_preflight_consistent",
|
|
236
|
+
originalRecord: f.record,
|
|
237
|
+
currentEvidence: f.evidence,
|
|
238
|
+
request: f.projected,
|
|
239
|
+
operationalAuthority: false,
|
|
240
|
+
});
|
|
241
|
+
expect(Object.isFrozen(out)).toBe(true);
|
|
242
|
+
const m = metrics(out);
|
|
243
|
+
expect(m.bytes).toBeLessThanOrEqual(500000);
|
|
244
|
+
expect(m.nodes).toBeLessThanOrEqual(10000);
|
|
245
|
+
expect(m.depth).toBeLessThanOrEqual(40);
|
|
246
|
+
});
|
|
247
|
+
it("refuses every generated value tamper and extra control data", async () => {
|
|
248
|
+
const f = await inputs();
|
|
249
|
+
const { outputFamilies } = await import("./grammar.js");
|
|
250
|
+
for (const path of Object.keys(outputFamilies)) {
|
|
251
|
+
const record = structuredClone(f.record),
|
|
252
|
+
request = structuredClone(f.projected);
|
|
253
|
+
const root: Record<string, unknown> = { originalRecord: record, request };
|
|
254
|
+
let cursor = root;
|
|
255
|
+
const keys = path.slice(1).split("/");
|
|
256
|
+
for (const key of keys.slice(0, -1))
|
|
257
|
+
cursor = cursor[key] as Record<string, unknown>;
|
|
258
|
+
const key = keys[keys.length - 1]!;
|
|
259
|
+
const old = cursor[key];
|
|
260
|
+
expect(typeof old).toBe("string");
|
|
261
|
+
cursor[key] =
|
|
262
|
+
String(old).slice(0, -1) + (String(old).endsWith("a") ? "b" : "a");
|
|
263
|
+
expect(() =>
|
|
264
|
+
f.output.releasePreflight(
|
|
265
|
+
record,
|
|
266
|
+
f.evidence,
|
|
267
|
+
request,
|
|
268
|
+
f.projected,
|
|
269
|
+
f.ack,
|
|
270
|
+
),
|
|
271
|
+
).toThrow();
|
|
272
|
+
}
|
|
273
|
+
expect(() =>
|
|
274
|
+
f.capture.capturePreflightRecord({ ...f.record, extra: true }),
|
|
275
|
+
).toThrow();
|
|
276
|
+
});
|
|
277
|
+
it("preserves an ordinary digest-looking raw string while rejecting the unchanged bounded digit pattern", async () => {
|
|
278
|
+
const f = await inputs();
|
|
279
|
+
const ordinary = "renewal:v2:sha256:" + "1".repeat(64),
|
|
280
|
+
raw = structuredClone(f.record);
|
|
281
|
+
Object.defineProperty(raw.configuration.targetPrice as object, "opaque", {
|
|
282
|
+
value: ordinary,
|
|
283
|
+
enumerable: true,
|
|
284
|
+
});
|
|
285
|
+
const admitted = f.capture.capturePreflightRecord(raw);
|
|
286
|
+
expect(
|
|
287
|
+
Object.getOwnPropertyDescriptor(
|
|
288
|
+
admitted.configuration.targetPrice as object,
|
|
289
|
+
"opaque",
|
|
290
|
+
)?.value,
|
|
291
|
+
).toBe(ordinary);
|
|
292
|
+
const bad = structuredClone(f.record);
|
|
293
|
+
Object.defineProperty(bad.configuration.targetPrice as object, "opaque", {
|
|
294
|
+
value:
|
|
295
|
+
"renewal:v2:sha256:" + "a".repeat(25) + "1".repeat(13) + "b".repeat(26),
|
|
296
|
+
enumerable: true,
|
|
297
|
+
});
|
|
298
|
+
expect(() => f.capture.capturePreflightRecord(bad)).toThrow();
|
|
299
|
+
});
|
|
300
|
+
it("refuses complete current Schedule and body drift without using a selected-view comparison", async () => {
|
|
301
|
+
const f = await inputs();
|
|
302
|
+
const record = f.relations.verifyPreflightRecord(
|
|
303
|
+
f.capture.capturePreflightRecord(f.record),
|
|
304
|
+
f.projected,
|
|
305
|
+
f.ack,
|
|
306
|
+
);
|
|
307
|
+
const schedule = structuredClone(f.evidence);
|
|
308
|
+
schedule.schedule.opaque = "current-only";
|
|
309
|
+
expect(() => f.relations.verifyCurrentPreflight(record, schedule)).toThrow();
|
|
310
|
+
for (const key of [
|
|
311
|
+
"wireSubscription",
|
|
312
|
+
"wireTargetPrice",
|
|
313
|
+
"wireBillingCustomer",
|
|
314
|
+
] as const) {
|
|
315
|
+
const evidence = structuredClone(f.evidence);
|
|
316
|
+
Object.defineProperty(evidence.bundle[key], "opaque", {
|
|
317
|
+
value: "current-only",
|
|
318
|
+
enumerable: true,
|
|
319
|
+
});
|
|
320
|
+
expect(() =>
|
|
321
|
+
f.relations.verifyCurrentPreflight(record, evidence),
|
|
322
|
+
).toThrow();
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
it("isolates output overflow after earlier fits and entry into the actual release function", async () => {
|
|
326
|
+
const f = await inputs(115000);
|
|
327
|
+
const captured = f.capture.capturePreflightRecord(f.record),
|
|
328
|
+
record = f.relations.verifyPreflightRecord(captured, f.projected, f.ack);
|
|
329
|
+
f.relations.verifyCurrentPreflight(record, f.evidence);
|
|
330
|
+
for (const component of [f.record, f.evidence, f.projected, f.ack]) {
|
|
331
|
+
const m = metrics(component);
|
|
332
|
+
expect(m.bytes).toBeLessThanOrEqual(500000);
|
|
333
|
+
expect(m.nodes).toBeLessThanOrEqual(10000);
|
|
334
|
+
expect(m.depth).toBeLessThanOrEqual(40);
|
|
335
|
+
}
|
|
336
|
+
const expected: PreflightOutput = {
|
|
337
|
+
status: "configure_preflight_consistent",
|
|
338
|
+
originalRecord: f.record,
|
|
339
|
+
currentEvidence: f.evidence,
|
|
340
|
+
request: f.projected,
|
|
341
|
+
operationalAuthority: false,
|
|
342
|
+
};
|
|
343
|
+
expect(metrics(expected).bytes).toBeGreaterThan(500000);
|
|
344
|
+
let releaseEntries = 0;
|
|
345
|
+
const actual = f.output.releasePreflight;
|
|
346
|
+
const release = (...args: Parameters<typeof actual>) => {
|
|
347
|
+
releaseEntries++;
|
|
348
|
+
return Reflect.apply(actual, f.output, args);
|
|
349
|
+
};
|
|
350
|
+
expect(() =>
|
|
351
|
+
release(record, f.evidence, f.projected, f.projected, f.ack),
|
|
352
|
+
).toThrow("MATERIAL_V2_UNSUPPORTED");
|
|
353
|
+
expect(releaseEntries).toBe(1);
|
|
354
|
+
});
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { OWNER } from "../originalOwner.js";
|
|
3
|
+
import { requiredJSONSnapshot } from "../material/requiredJson.js";
|
|
4
|
+
import {
|
|
5
|
+
objectNode,
|
|
6
|
+
scalarNode,
|
|
7
|
+
encode,
|
|
8
|
+
materialize,
|
|
9
|
+
need,
|
|
10
|
+
freeze,
|
|
11
|
+
} from "../material/nodeKernel.js";
|
|
12
|
+
import type { Node } from "../material/nodeKernel.js";
|
|
13
|
+
import { controls, recordFamilies, outputFamilies } from "./grammar.js";
|
|
14
|
+
import type { Configuration } from "./grammar.js";
|
|
15
|
+
import type { Bundle } from "../material/capture.js";
|
|
16
|
+
export interface CapturedRecord {
|
|
17
|
+
readonly node: Node;
|
|
18
|
+
readonly slots: ReadonlyMap<string, string>;
|
|
19
|
+
}
|
|
20
|
+
export interface CapturedPreflightRecord {
|
|
21
|
+
readonly captured: CapturedRecord;
|
|
22
|
+
readonly configuration: Configuration;
|
|
23
|
+
readonly originalBundle: Bundle;
|
|
24
|
+
}
|
|
25
|
+
const pointer = (key: string) => key.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
26
|
+
// Only lexical entry points below choose these TWO fixed path tables; no caller paths/families.
|
|
27
|
+
function capture(value: unknown, output: boolean): CapturedRecord {
|
|
28
|
+
const families = output ? outputFamilies : recordFamilies,
|
|
29
|
+
slots = new Map<string, string>(),
|
|
30
|
+
active = new Set<object>();
|
|
31
|
+
let nodes = 0,
|
|
32
|
+
rawChars = 0;
|
|
33
|
+
function walk(x: unknown, path: string, depth: number): Node {
|
|
34
|
+
need(++nodes <= 10000 && depth <= 40 && !types.isProxy(x));
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(families, path)) {
|
|
36
|
+
need(
|
|
37
|
+
typeof x === "string" &&
|
|
38
|
+
new RegExp("^" + families[path] + ":v2:sha256:[0-9a-f]{64}$").test(x),
|
|
39
|
+
);
|
|
40
|
+
slots.set(path, x);
|
|
41
|
+
rawChars += x.length;
|
|
42
|
+
need(rawChars <= 500000);
|
|
43
|
+
return scalarNode(x);
|
|
44
|
+
}
|
|
45
|
+
if (x === null || typeof x !== "object") {
|
|
46
|
+
requiredJSONSnapshot(x);
|
|
47
|
+
if (typeof x === "string") rawChars += x.length;
|
|
48
|
+
need(rawChars <= 500000);
|
|
49
|
+
return scalarNode(x);
|
|
50
|
+
}
|
|
51
|
+
need(!active.has(x));
|
|
52
|
+
active.add(x);
|
|
53
|
+
const array = Array.isArray(x),
|
|
54
|
+
proto = Object.getPrototypeOf(x);
|
|
55
|
+
need(
|
|
56
|
+
array
|
|
57
|
+
? proto === Array.prototype
|
|
58
|
+
: proto === Object.prototype || proto === null,
|
|
59
|
+
);
|
|
60
|
+
const keys = Reflect.ownKeys(x);
|
|
61
|
+
need(keys.length <= 10001);
|
|
62
|
+
controls(x, path, output);
|
|
63
|
+
const entries: [string, Node][] = [];
|
|
64
|
+
const length = array ? Object.getOwnPropertyDescriptor(x, "length") : null;
|
|
65
|
+
const count: unknown = length?.value;
|
|
66
|
+
if (array)
|
|
67
|
+
need(
|
|
68
|
+
length &&
|
|
69
|
+
"value" in length &&
|
|
70
|
+
typeof count === "number" &&
|
|
71
|
+
Number.isSafeInteger(count) &&
|
|
72
|
+
count <= 10000,
|
|
73
|
+
);
|
|
74
|
+
for (const key of keys) {
|
|
75
|
+
need(typeof key === "string");
|
|
76
|
+
if (array && key === "length") continue;
|
|
77
|
+
const d = Object.getOwnPropertyDescriptor(x, key);
|
|
78
|
+
need(d && d.enumerable && "value" in d);
|
|
79
|
+
requiredJSONSnapshot(key);
|
|
80
|
+
requiredJSONSnapshot({ [key]: d.value === null ? null : true });
|
|
81
|
+
rawChars += key.length;
|
|
82
|
+
need(rawChars <= 500000);
|
|
83
|
+
need(
|
|
84
|
+
!array ||
|
|
85
|
+
(/^(0|[1-9][0-9]*)$/.test(key) && Number(key) < (count as number)),
|
|
86
|
+
);
|
|
87
|
+
entries.push([key, walk(d.value, path + "/" + pointer(key), depth + 1)]);
|
|
88
|
+
}
|
|
89
|
+
active.delete(x);
|
|
90
|
+
if (array) {
|
|
91
|
+
need(entries.length === count);
|
|
92
|
+
entries.sort(([a], [b]) => Number(a) - Number(b));
|
|
93
|
+
return Object.freeze({
|
|
94
|
+
kind: "array" as const,
|
|
95
|
+
entries: Object.freeze(entries.map((entry) => Object.freeze(entry))),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return objectNode(entries);
|
|
99
|
+
}
|
|
100
|
+
const node = walk(value, "", 0);
|
|
101
|
+
need(slots.size === Object.keys(families).length);
|
|
102
|
+
encode(node);
|
|
103
|
+
return Object.freeze({ node, slots });
|
|
104
|
+
}
|
|
105
|
+
const child = (node: Node, key: string): Node => {
|
|
106
|
+
need(node.kind === "object");
|
|
107
|
+
const row = node.entries.find(([k]) => k === key);
|
|
108
|
+
need(row);
|
|
109
|
+
return row[1];
|
|
110
|
+
};
|
|
111
|
+
export function capturePreflightRecord(raw: unknown): CapturedPreflightRecord {
|
|
112
|
+
OWNER.check();
|
|
113
|
+
const captured = capture(raw, false);
|
|
114
|
+
const configuration = freeze(
|
|
115
|
+
materialize(child(captured.node, "configuration")),
|
|
116
|
+
) as Configuration,
|
|
117
|
+
originalBundle = freeze(
|
|
118
|
+
materialize(child(captured.node, "originalBundle")),
|
|
119
|
+
) as Bundle;
|
|
120
|
+
OWNER.check();
|
|
121
|
+
return Object.freeze({ captured, configuration, originalBundle });
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Package-private capture; release owns the same before/after Owner guards as the Source body. */
|
|
125
|
+
export function capturePreflightOutput(value: unknown): CapturedRecord {
|
|
126
|
+
return capture(value, true);
|
|
127
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { OWNER } from "../originalOwner.js";
|
|
2
|
+
import { closed, need, freeze, materialize } from "../material/nodeKernel.js";
|
|
3
|
+
import { equal, referenceId } from "../../../renewalAggregate/shared.js";
|
|
4
|
+
import type { Bundle } from "../material/capture.js";
|
|
5
|
+
import type {
|
|
6
|
+
CurrentEvidence,
|
|
7
|
+
PreflightRecord,
|
|
8
|
+
Configuration,
|
|
9
|
+
Data,
|
|
10
|
+
} from "./grammar.js";
|
|
11
|
+
import type { CapturedPreflightRecord } from "./record.js";
|
|
12
|
+
import type {
|
|
13
|
+
ProjectedRenewalConfigurationV2,
|
|
14
|
+
RenewalScheduleAttachmentReceiptV2,
|
|
15
|
+
} from "../../../renewalV2/index.js";
|
|
16
|
+
const couponID = (id: unknown): id is string =>
|
|
17
|
+
typeof id === "string" &&
|
|
18
|
+
id.length > 0 &&
|
|
19
|
+
id.length <= 255 &&
|
|
20
|
+
/\S/.test(id) &&
|
|
21
|
+
id !== "." &&
|
|
22
|
+
id !== "..";
|
|
23
|
+
function rebuild(b: Bundle) {
|
|
24
|
+
const subscription = b.wireSubscription;
|
|
25
|
+
need(
|
|
26
|
+
subscription &&
|
|
27
|
+
subscription.items &&
|
|
28
|
+
Array.isArray(subscription.items.data) &&
|
|
29
|
+
subscription.items.data.length === 1,
|
|
30
|
+
);
|
|
31
|
+
const lists = [subscription.discounts, subscription.items.data[0].discounts];
|
|
32
|
+
need(lists.every((x) => Array.isArray(x) && x.length <= 20));
|
|
33
|
+
need(Array.isArray(b.couponReads) && b.couponReads.length <= 40);
|
|
34
|
+
const ids = new Map<string, number>();
|
|
35
|
+
const joined = lists.map((list) =>
|
|
36
|
+
list.map((discount, index) => {
|
|
37
|
+
need(discount && discount.source);
|
|
38
|
+
const ref = discount.source.coupon,
|
|
39
|
+
id = typeof ref === "string" ? ref : ref?.id;
|
|
40
|
+
need(couponID(id));
|
|
41
|
+
if (!ids.has(id)) {
|
|
42
|
+
const i = ids.size,
|
|
43
|
+
row = closed(b.couponReads[i], [
|
|
44
|
+
"couponId",
|
|
45
|
+
"wireCoupon",
|
|
46
|
+
"association",
|
|
47
|
+
]);
|
|
48
|
+
const association = closed(row.association, ["resource", "ordinal"]);
|
|
49
|
+
need(
|
|
50
|
+
row.couponId === id &&
|
|
51
|
+
association.resource === "coupon" &&
|
|
52
|
+
association.ordinal === 4 + i,
|
|
53
|
+
);
|
|
54
|
+
const c = row.wireCoupon as Record<string, unknown>;
|
|
55
|
+
need(c && c.id === id && c.object === "coupon" && c.deleted !== true);
|
|
56
|
+
ids.set(id, i);
|
|
57
|
+
}
|
|
58
|
+
const couponReadIndex = ids.get(id)!,
|
|
59
|
+
coupon = b.couponReads[couponReadIndex].wireCoupon;
|
|
60
|
+
need(typeof ref === "string" || equal(ref, coupon));
|
|
61
|
+
const joinedDiscount = {
|
|
62
|
+
...discount,
|
|
63
|
+
source: { ...discount.source, coupon },
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
index,
|
|
67
|
+
discountId: discount.id,
|
|
68
|
+
originalCouponReference: ref,
|
|
69
|
+
couponReadIndex,
|
|
70
|
+
joinedDiscount,
|
|
71
|
+
};
|
|
72
|
+
}),
|
|
73
|
+
);
|
|
74
|
+
need(
|
|
75
|
+
ids.size === b.couponReads.length &&
|
|
76
|
+
equal(b.derivedCouponJoins, { subscription: joined[0], item: joined[1] }),
|
|
77
|
+
);
|
|
78
|
+
return {
|
|
79
|
+
subscription: joined[0].map((x) => x.joinedDiscount),
|
|
80
|
+
item: joined[1].map((x) => x.joinedDiscount),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export function expectedSlots(
|
|
84
|
+
request: ProjectedRenewalConfigurationV2,
|
|
85
|
+
receipt: RenewalScheduleAttachmentReceiptV2,
|
|
86
|
+
output: boolean,
|
|
87
|
+
): Record<string, string> {
|
|
88
|
+
const record = {
|
|
89
|
+
"/request/logicalBinding": request.logicalBinding,
|
|
90
|
+
"/request/attachReceiptBinding": request.attachReceiptBinding,
|
|
91
|
+
"/request/baselineBinding": request.baselineBinding,
|
|
92
|
+
"/request/defaultSettingsBinding": request.defaultSettingsBinding,
|
|
93
|
+
"/request/requestIdentity/binding": request.requestIdentity.binding,
|
|
94
|
+
"/attachReceipt/logicalBinding": receipt.logicalBinding,
|
|
95
|
+
"/attachReceipt/request/logicalBinding": receipt.request.logicalBinding,
|
|
96
|
+
"/attachReceipt/request/requestIdentity/binding":
|
|
97
|
+
receipt.request.requestIdentity.binding,
|
|
98
|
+
"/attachReceipt/binding": receipt.binding,
|
|
99
|
+
};
|
|
100
|
+
if (!output) return record;
|
|
101
|
+
return Object.fromEntries([
|
|
102
|
+
...Object.entries(record).map(([k, v]) => ["/originalRecord" + k, v]),
|
|
103
|
+
...Object.entries(record).filter(([k]) => k.startsWith("/request/")),
|
|
104
|
+
]);
|
|
105
|
+
}
|
|
106
|
+
export function verifyPreflightRecord(
|
|
107
|
+
captured: CapturedPreflightRecord,
|
|
108
|
+
originalC6: ProjectedRenewalConfigurationV2,
|
|
109
|
+
ackC3: RenewalScheduleAttachmentReceiptV2,
|
|
110
|
+
): PreflightRecord {
|
|
111
|
+
OWNER.check();
|
|
112
|
+
const expected = expectedSlots(originalC6, ackC3, false);
|
|
113
|
+
for (const [path, value] of Object.entries(expected))
|
|
114
|
+
need(captured.captured.slots.get(path) === value);
|
|
115
|
+
const record = materialize(captured.captured.node) as PreflightRecord;
|
|
116
|
+
need(equal(record.request, originalC6) && equal(record.attachReceipt, ackC3));
|
|
117
|
+
verifyOriginalRaw(record, ackC3);
|
|
118
|
+
OWNER.check();
|
|
119
|
+
return freeze(record);
|
|
120
|
+
}
|
|
121
|
+
function association(value: unknown, id: string, configuration: Configuration) {
|
|
122
|
+
const e = configuration.preparation.expected,
|
|
123
|
+
ctx = { customerAccountId: e.customerAccountId, livemode: e.livemode };
|
|
124
|
+
need(referenceId(value, "sub_sched", "subscription_schedule", ctx) === id);
|
|
125
|
+
if (value !== null && typeof value === "object")
|
|
126
|
+
need(
|
|
127
|
+
!Object.prototype.hasOwnProperty.call(value, "deleted") ||
|
|
128
|
+
(value as Record<string, unknown>).deleted === false,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function verifyOriginalRaw(
|
|
132
|
+
record: PreflightRecord,
|
|
133
|
+
ack: RenewalScheduleAttachmentReceiptV2,
|
|
134
|
+
) {
|
|
135
|
+
const c = record.configuration,
|
|
136
|
+
o = record.originalBundle,
|
|
137
|
+
p = c.preparation,
|
|
138
|
+
a = c.attachReceipt.attachRequest;
|
|
139
|
+
need(
|
|
140
|
+
equal(c.schedule, ack.providerSnapshot) &&
|
|
141
|
+
equal(c.attachReceipt.providerSnapshot, ack.providerSnapshot) &&
|
|
142
|
+
equal(p, a.preparation) &&
|
|
143
|
+
c.apiVersion === a.apiVersion,
|
|
144
|
+
);
|
|
145
|
+
need(
|
|
146
|
+
c.configureKey !== a.attachKey &&
|
|
147
|
+
Object.prototype.hasOwnProperty.call(o.wireSubscription, "schedule") &&
|
|
148
|
+
o.wireSubscription.schedule === null &&
|
|
149
|
+
Object.prototype.hasOwnProperty.call(c.freshSubscription, "schedule") &&
|
|
150
|
+
c.freshSubscription.schedule !== null,
|
|
151
|
+
);
|
|
152
|
+
const { schedule: oldAssociation, ...oldResidual } = o.wireSubscription,
|
|
153
|
+
{ schedule: newAssociation, ...newResidual } = c.freshSubscription;
|
|
154
|
+
need(
|
|
155
|
+
oldAssociation === null &&
|
|
156
|
+
equal(oldResidual, newResidual) &&
|
|
157
|
+
equal(p.subscription, o.wireSubscription),
|
|
158
|
+
);
|
|
159
|
+
association(newAssociation, ack.scheduleId, c);
|
|
160
|
+
for (const [name, wire] of [
|
|
161
|
+
["targetPrice", "wireTargetPrice"],
|
|
162
|
+
["billingCustomer", "wireBillingCustomer"],
|
|
163
|
+
] as const)
|
|
164
|
+
need(equal(p[name], o[wire]) && equal(c[name], o[wire]));
|
|
165
|
+
rebuild(o);
|
|
166
|
+
const preconfigure = {
|
|
167
|
+
wireSubscription: c.freshSubscription,
|
|
168
|
+
wireTargetPrice: c.targetPrice as Data,
|
|
169
|
+
wireBillingCustomer: c.billingCustomer as Data,
|
|
170
|
+
couponReads: o.couponReads,
|
|
171
|
+
derivedCouponJoins: o.derivedCouponJoins,
|
|
172
|
+
};
|
|
173
|
+
rebuild(preconfigure);
|
|
174
|
+
}
|
|
175
|
+
export function verifyCurrentPreflight(
|
|
176
|
+
record: PreflightRecord,
|
|
177
|
+
evidence: CurrentEvidence,
|
|
178
|
+
) {
|
|
179
|
+
OWNER.check();
|
|
180
|
+
closed(evidence, ["bundle", "schedule", "observedAt"]);
|
|
181
|
+
need(Number.isSafeInteger(evidence.observedAt) && evidence.observedAt >= 0);
|
|
182
|
+
const c = record.configuration,
|
|
183
|
+
o = record.originalBundle,
|
|
184
|
+
b = evidence.bundle;
|
|
185
|
+
closed(b, [
|
|
186
|
+
"wireSubscription",
|
|
187
|
+
"wireTargetPrice",
|
|
188
|
+
"wireBillingCustomer",
|
|
189
|
+
"couponReads",
|
|
190
|
+
"derivedCouponJoins",
|
|
191
|
+
]);
|
|
192
|
+
need(
|
|
193
|
+
equal(evidence.schedule, c.schedule) &&
|
|
194
|
+
equal(evidence.schedule, record.attachReceipt.providerSnapshot),
|
|
195
|
+
);
|
|
196
|
+
for (const [name, wire] of [
|
|
197
|
+
["freshSubscription", "wireSubscription"],
|
|
198
|
+
["targetPrice", "wireTargetPrice"],
|
|
199
|
+
["billingCustomer", "wireBillingCustomer"],
|
|
200
|
+
] as const)
|
|
201
|
+
need(equal(c[name], b[wire]));
|
|
202
|
+
rebuild(b);
|
|
203
|
+
need(
|
|
204
|
+
equal(b.couponReads, o.couponReads) &&
|
|
205
|
+
equal(b.derivedCouponJoins, o.derivedCouponJoins),
|
|
206
|
+
);
|
|
207
|
+
association(b.wireSubscription.schedule, record.attachReceipt.scheduleId, c);
|
|
208
|
+
OWNER.check();
|
|
209
|
+
}
|