@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,348 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { OWNER } from "../originalOwner.js";
|
|
3
|
+
import { closed } from "../operations/types.js";
|
|
4
|
+
import { equal } from "../../../renewalAggregate/shared.js";
|
|
5
|
+
import {
|
|
6
|
+
loadConfigureWriteTransportSource,
|
|
7
|
+
loadConfigureReplayTransportSource,
|
|
8
|
+
} from "../operations/sourceOperations.js";
|
|
9
|
+
import { captureConfigureRequest } from "./output.js";
|
|
10
|
+
import { captureConfigureReply, configureDiagnostics } from "./capture.js";
|
|
11
|
+
import {
|
|
12
|
+
capturePlan,
|
|
13
|
+
samePlan,
|
|
14
|
+
ownMethod,
|
|
15
|
+
need,
|
|
16
|
+
stop,
|
|
17
|
+
type Row,
|
|
18
|
+
} from "./request.js";
|
|
19
|
+
import type { Diagnostics } from "../operations/providerFailure.js";
|
|
20
|
+
|
|
21
|
+
type Fact = Readonly<{
|
|
22
|
+
phase: "read" | "post";
|
|
23
|
+
resource: string;
|
|
24
|
+
ordinal: number;
|
|
25
|
+
diagnostics: Diagnostics;
|
|
26
|
+
}>;
|
|
27
|
+
export type Disposition =
|
|
28
|
+
| "NOT_STARTED"
|
|
29
|
+
| "PENDING"
|
|
30
|
+
| "REJECTED"
|
|
31
|
+
| "FULFILLED_UNVERIFIED"
|
|
32
|
+
| "FULFILLED_SAFE";
|
|
33
|
+
function build(load: () => unknown) {
|
|
34
|
+
OWNER.check();
|
|
35
|
+
const raw = load();
|
|
36
|
+
OWNER.check();
|
|
37
|
+
need(!types.isProxy(raw));
|
|
38
|
+
const frame = closed(raw, [
|
|
39
|
+
"owner",
|
|
40
|
+
"operation",
|
|
41
|
+
"request",
|
|
42
|
+
"readPlan",
|
|
43
|
+
"delegate",
|
|
44
|
+
]);
|
|
45
|
+
need(frame.owner === OWNER);
|
|
46
|
+
const operation = frame.operation,
|
|
47
|
+
readPlanReference = frame.readPlan,
|
|
48
|
+
delegate = frame.delegate;
|
|
49
|
+
const request = captureConfigureRequest(frame.request),
|
|
50
|
+
plan = capturePlan(readPlanReference),
|
|
51
|
+
method = ownMethod(delegate, "rawRequest"),
|
|
52
|
+
generation = Object.freeze({});
|
|
53
|
+
let phase = "unused",
|
|
54
|
+
index = 0,
|
|
55
|
+
closedOwner = false,
|
|
56
|
+
checking = false,
|
|
57
|
+
dispatching = false,
|
|
58
|
+
postState: Disposition = "NOT_STARTED";
|
|
59
|
+
type Attempt = Readonly<{
|
|
60
|
+
generation: object;
|
|
61
|
+
ordinal: number;
|
|
62
|
+
phase: "read" | "post";
|
|
63
|
+
resource: string;
|
|
64
|
+
promise: Promise<unknown>;
|
|
65
|
+
}>;
|
|
66
|
+
let pending: Attempt | null = null,
|
|
67
|
+
readCatch: { attempt: Attempt; fact: Fact } | null = null,
|
|
68
|
+
lastRead: Attempt | null = null,
|
|
69
|
+
postAttempt: Attempt | null = null;
|
|
70
|
+
const postCatches = new WeakMap<object, { attempt: Attempt; fact: Fact }>(),
|
|
71
|
+
notStarted = new WeakSet<object>();
|
|
72
|
+
let _quarantine: { attempt: Attempt; raw: unknown } | null = null;
|
|
73
|
+
function gate() {
|
|
74
|
+
if (closedOwner || checking) {
|
|
75
|
+
closedOwner = true;
|
|
76
|
+
stop();
|
|
77
|
+
}
|
|
78
|
+
checking = true;
|
|
79
|
+
try {
|
|
80
|
+
OWNER.check();
|
|
81
|
+
if (closedOwner) stop();
|
|
82
|
+
} catch {
|
|
83
|
+
closedOwner = true;
|
|
84
|
+
stop();
|
|
85
|
+
} finally {
|
|
86
|
+
checking = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const live = () => {
|
|
90
|
+
try {
|
|
91
|
+
gate();
|
|
92
|
+
return true;
|
|
93
|
+
} catch {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const valid = (a: Attempt) => pending === a && a.generation === generation;
|
|
98
|
+
function start(kind: "read" | "post", resource: string, args: unknown[]) {
|
|
99
|
+
need(pending === null && !dispatching);
|
|
100
|
+
// A synchronous throw or non-Promise result is not an actual asynchronous catch.
|
|
101
|
+
let promise: unknown;
|
|
102
|
+
dispatching = true;
|
|
103
|
+
try {
|
|
104
|
+
promise = Reflect.apply(method, delegate, args);
|
|
105
|
+
} finally {
|
|
106
|
+
dispatching = false;
|
|
107
|
+
}
|
|
108
|
+
need(types.isPromise(promise));
|
|
109
|
+
const attempt = Object.freeze({
|
|
110
|
+
generation,
|
|
111
|
+
ordinal: index + 1,
|
|
112
|
+
phase: kind,
|
|
113
|
+
resource,
|
|
114
|
+
promise: promise as Promise<unknown>,
|
|
115
|
+
});
|
|
116
|
+
need(attempt.ordinal <= (kind === "read" ? 44 : 45));
|
|
117
|
+
pending = attempt;
|
|
118
|
+
return attempt;
|
|
119
|
+
}
|
|
120
|
+
const readTransport = Object.freeze({
|
|
121
|
+
async rawRequest(
|
|
122
|
+
verb: "GET",
|
|
123
|
+
path: string,
|
|
124
|
+
body: undefined,
|
|
125
|
+
options: unknown,
|
|
126
|
+
): Promise<unknown> {
|
|
127
|
+
need(arguments.length === 4);
|
|
128
|
+
gate();
|
|
129
|
+
need(
|
|
130
|
+
phase === "reserved" &&
|
|
131
|
+
pending === null &&
|
|
132
|
+
!dispatching &&
|
|
133
|
+
index < plan.length,
|
|
134
|
+
);
|
|
135
|
+
const row = plan[index];
|
|
136
|
+
need(!types.isProxy(options));
|
|
137
|
+
const o = closed(options, ["apiVersion", "maxNetworkRetries"]);
|
|
138
|
+
need(
|
|
139
|
+
verb === row.method &&
|
|
140
|
+
path === row.path &&
|
|
141
|
+
body === undefined &&
|
|
142
|
+
o.apiVersion === row.options.apiVersion &&
|
|
143
|
+
o.maxNetworkRetries === 0,
|
|
144
|
+
);
|
|
145
|
+
const a = start("read", row.resource, [verb, path, body, row.options]);
|
|
146
|
+
let reply: unknown;
|
|
147
|
+
try {
|
|
148
|
+
reply = await a.promise;
|
|
149
|
+
} catch (error) {
|
|
150
|
+
phase = "failed";
|
|
151
|
+
lastRead = a;
|
|
152
|
+
if (live() && valid(a))
|
|
153
|
+
readCatch = {
|
|
154
|
+
attempt: a,
|
|
155
|
+
fact: Object.freeze({
|
|
156
|
+
phase: "read",
|
|
157
|
+
resource: a.resource,
|
|
158
|
+
ordinal: a.ordinal,
|
|
159
|
+
diagnostics: configureDiagnostics(error),
|
|
160
|
+
}),
|
|
161
|
+
};
|
|
162
|
+
pending = null;
|
|
163
|
+
return stop();
|
|
164
|
+
}
|
|
165
|
+
gate();
|
|
166
|
+
need(valid(a));
|
|
167
|
+
pending = null;
|
|
168
|
+
index++;
|
|
169
|
+
if (index === plan.length) phase = "readclosed";
|
|
170
|
+
return reply;
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
const transport = Object.freeze({
|
|
174
|
+
readTransport,
|
|
175
|
+
postDisposition(): Disposition {
|
|
176
|
+
need(arguments.length === 0);
|
|
177
|
+
return postState;
|
|
178
|
+
},
|
|
179
|
+
async postConfigure() {
|
|
180
|
+
need(arguments.length === 0);
|
|
181
|
+
if (
|
|
182
|
+
phase !== "readclosed" ||
|
|
183
|
+
pending !== null ||
|
|
184
|
+
postState !== "NOT_STARTED" ||
|
|
185
|
+
!live()
|
|
186
|
+
) {
|
|
187
|
+
const reply = Object.freeze({ outcome: "not_started" as const });
|
|
188
|
+
notStarted.add(reply);
|
|
189
|
+
return reply;
|
|
190
|
+
}
|
|
191
|
+
phase = "posting";
|
|
192
|
+
// Mark mutation uncertainty before invoking the actual stock delegate.
|
|
193
|
+
postState = "PENDING";
|
|
194
|
+
let a: Attempt;
|
|
195
|
+
try {
|
|
196
|
+
a = start("post", "configure", [
|
|
197
|
+
request.method,
|
|
198
|
+
request.path,
|
|
199
|
+
request.payload,
|
|
200
|
+
{
|
|
201
|
+
apiVersion: request.apiVersion,
|
|
202
|
+
idempotencyKey: request.key,
|
|
203
|
+
maxNetworkRetries: 0,
|
|
204
|
+
},
|
|
205
|
+
]);
|
|
206
|
+
} catch {
|
|
207
|
+
phase = "failed";
|
|
208
|
+
return Object.freeze({ outcome: "post_unknown" as const });
|
|
209
|
+
}
|
|
210
|
+
postAttempt = a;
|
|
211
|
+
let reply: unknown;
|
|
212
|
+
try {
|
|
213
|
+
reply = await a.promise;
|
|
214
|
+
} catch (error) {
|
|
215
|
+
postState = "REJECTED";
|
|
216
|
+
phase = "failed";
|
|
217
|
+
const record = Object.freeze({ outcome: "provider_rejected" as const });
|
|
218
|
+
if (live() && valid(a))
|
|
219
|
+
postCatches.set(record, {
|
|
220
|
+
attempt: a,
|
|
221
|
+
fact: Object.freeze({
|
|
222
|
+
phase: "post",
|
|
223
|
+
resource: "configure",
|
|
224
|
+
ordinal: a.ordinal,
|
|
225
|
+
diagnostics: configureDiagnostics(error),
|
|
226
|
+
}),
|
|
227
|
+
});
|
|
228
|
+
pending = null;
|
|
229
|
+
return record;
|
|
230
|
+
}
|
|
231
|
+
if (valid(a) && postAttempt === a)
|
|
232
|
+
_quarantine = { attempt: a, raw: reply };
|
|
233
|
+
postState = "FULFILLED_UNVERIFIED";
|
|
234
|
+
phase = "fulfilled";
|
|
235
|
+
try {
|
|
236
|
+
gate();
|
|
237
|
+
need(valid(a));
|
|
238
|
+
const admitted = captureConfigureReply(reply);
|
|
239
|
+
gate();
|
|
240
|
+
pending = null;
|
|
241
|
+
postState = "FULFILLED_SAFE";
|
|
242
|
+
return Object.freeze({
|
|
243
|
+
outcome: "fulfilled_safe" as const,
|
|
244
|
+
body: admitted.body,
|
|
245
|
+
transport: admitted.transport,
|
|
246
|
+
});
|
|
247
|
+
} catch {
|
|
248
|
+
pending = null;
|
|
249
|
+
return Object.freeze({ outcome: "fulfilled_unverified" as const });
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
const capability = Object.freeze({
|
|
254
|
+
assertSourceOperationBinding(
|
|
255
|
+
actualOperation: unknown,
|
|
256
|
+
originalRequest: unknown,
|
|
257
|
+
actualReadPlan: unknown,
|
|
258
|
+
actualDelegate: unknown,
|
|
259
|
+
originalMethod: unknown,
|
|
260
|
+
expected: readonly Row[],
|
|
261
|
+
) {
|
|
262
|
+
need(arguments.length === 6);
|
|
263
|
+
gate();
|
|
264
|
+
if (
|
|
265
|
+
phase !== "unused" ||
|
|
266
|
+
operation !== actualOperation ||
|
|
267
|
+
actualReadPlan !== readPlanReference ||
|
|
268
|
+
actualDelegate !== delegate ||
|
|
269
|
+
originalMethod !== method
|
|
270
|
+
) {
|
|
271
|
+
phase = "invalid";
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
const matches =
|
|
275
|
+
equal(request, captureConfigureRequest(originalRequest)) &&
|
|
276
|
+
samePlan(plan, capturePlan(actualReadPlan)) &&
|
|
277
|
+
samePlan(plan, expected);
|
|
278
|
+
gate();
|
|
279
|
+
phase = matches ? "bound" : "invalid";
|
|
280
|
+
return matches;
|
|
281
|
+
},
|
|
282
|
+
reserveAcquisition() {
|
|
283
|
+
need(arguments.length === 0);
|
|
284
|
+
gate();
|
|
285
|
+
if (phase !== "bound" || index !== 0 || pending !== null) return false;
|
|
286
|
+
phase = "reserved";
|
|
287
|
+
return true;
|
|
288
|
+
},
|
|
289
|
+
consumeReadCatch() {
|
|
290
|
+
need(arguments.length === 0);
|
|
291
|
+
if (!live()) return null;
|
|
292
|
+
const slot = readCatch;
|
|
293
|
+
if (
|
|
294
|
+
!slot ||
|
|
295
|
+
slot.attempt !== lastRead ||
|
|
296
|
+
slot.attempt.generation !== generation ||
|
|
297
|
+
pending !== null ||
|
|
298
|
+
phase !== "failed"
|
|
299
|
+
)
|
|
300
|
+
return null;
|
|
301
|
+
readCatch = null;
|
|
302
|
+
return slot.fact;
|
|
303
|
+
},
|
|
304
|
+
consumePostCatch(actualReply: unknown) {
|
|
305
|
+
need(arguments.length === 1);
|
|
306
|
+
if (!live()) return null;
|
|
307
|
+
const slot =
|
|
308
|
+
actualReply !== null && typeof actualReply === "object"
|
|
309
|
+
? postCatches.get(actualReply)
|
|
310
|
+
: undefined;
|
|
311
|
+
if (
|
|
312
|
+
!slot ||
|
|
313
|
+
slot.attempt !== postAttempt ||
|
|
314
|
+
slot.attempt.generation !== generation ||
|
|
315
|
+
pending !== null ||
|
|
316
|
+
postState !== "REJECTED"
|
|
317
|
+
)
|
|
318
|
+
return null;
|
|
319
|
+
postCatches.delete(actualReply as object);
|
|
320
|
+
return slot.fact;
|
|
321
|
+
},
|
|
322
|
+
consumeNotStarted(actualReply: unknown) {
|
|
323
|
+
need(arguments.length === 1);
|
|
324
|
+
if (
|
|
325
|
+
actualReply === null ||
|
|
326
|
+
typeof actualReply !== "object" ||
|
|
327
|
+
!notStarted.has(actualReply) ||
|
|
328
|
+
postState !== "NOT_STARTED"
|
|
329
|
+
)
|
|
330
|
+
return false;
|
|
331
|
+
notStarted.delete(actualReply);
|
|
332
|
+
return true;
|
|
333
|
+
},
|
|
334
|
+
// No Owner sample/callback/reflection here: final actor gate immediately precedes this.
|
|
335
|
+
discardFulfilledQuarantine() {
|
|
336
|
+
_quarantine = null;
|
|
337
|
+
},
|
|
338
|
+
});
|
|
339
|
+
return Object.freeze({ transport, capability });
|
|
340
|
+
}
|
|
341
|
+
export function createConfigureWriteTransport() {
|
|
342
|
+
need(arguments.length === 0);
|
|
343
|
+
return build(loadConfigureWriteTransportSource);
|
|
344
|
+
}
|
|
345
|
+
export function createConfigureReplayTransport() {
|
|
346
|
+
need(arguments.length === 0);
|
|
347
|
+
return build(loadConfigureReplayTransportSource);
|
|
348
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { requiredJSONSnapshot } from "./requiredJson.js";
|
|
3
|
+
import { closed, need, freeze } from "./nodeKernel.js";
|
|
4
|
+
import { equal } from "../../../renewalAggregate/shared.js";
|
|
5
|
+
import type { PrepareRenewalPriceReplacementV2Options } from "../../../renewalV2/index.js";
|
|
6
|
+
type Data = Record<string, unknown>;
|
|
7
|
+
type Discount = Data & {
|
|
8
|
+
id: unknown;
|
|
9
|
+
source: Data & { coupon: string | Data };
|
|
10
|
+
};
|
|
11
|
+
type Subscription = Data & {
|
|
12
|
+
schedule: unknown;
|
|
13
|
+
discounts: Discount[];
|
|
14
|
+
items: { data: { discounts: Discount[] }[] };
|
|
15
|
+
};
|
|
16
|
+
export type AttachRaw = {
|
|
17
|
+
preparation: PrepareRenewalPriceReplacementV2Options & {
|
|
18
|
+
subscription: Subscription;
|
|
19
|
+
targetPrice: Data;
|
|
20
|
+
billingCustomer?: Data;
|
|
21
|
+
};
|
|
22
|
+
apiVersion: string;
|
|
23
|
+
attachKey: string;
|
|
24
|
+
firstDispatchedAt: number;
|
|
25
|
+
};
|
|
26
|
+
export type Bundle = {
|
|
27
|
+
wireSubscription: Subscription;
|
|
28
|
+
wireTargetPrice: Data;
|
|
29
|
+
wireBillingCustomer: Data;
|
|
30
|
+
couponReads: {
|
|
31
|
+
couponId: unknown;
|
|
32
|
+
wireCoupon: Data;
|
|
33
|
+
association: { resource: unknown; ordinal: unknown };
|
|
34
|
+
}[];
|
|
35
|
+
derivedCouponJoins: { subscription: unknown; item: unknown };
|
|
36
|
+
};
|
|
37
|
+
export type RetainedInput = {
|
|
38
|
+
attachRequest: AttachRaw;
|
|
39
|
+
originalBundle: Bundle;
|
|
40
|
+
};
|
|
41
|
+
export type FreshInput = RetainedInput & {
|
|
42
|
+
currentBundle: Bundle;
|
|
43
|
+
observedAt: number;
|
|
44
|
+
};
|
|
45
|
+
export type OwnedDiscounts = { subscription: unknown; item: unknown };
|
|
46
|
+
const isProxy = types.isProxy;
|
|
47
|
+
function rejectProxy(value: unknown) {
|
|
48
|
+
const active = new Set<object>();
|
|
49
|
+
let nodes = 0;
|
|
50
|
+
function walk(x: unknown, depth: number) {
|
|
51
|
+
need(++nodes <= 10000 && depth <= 40 && !isProxy(x));
|
|
52
|
+
if (x === null || typeof x !== "object") return;
|
|
53
|
+
need(!active.has(x));
|
|
54
|
+
active.add(x);
|
|
55
|
+
const array = Array.isArray(x),
|
|
56
|
+
keys = Reflect.ownKeys(x);
|
|
57
|
+
need(keys.length <= 10001);
|
|
58
|
+
for (const key of keys) {
|
|
59
|
+
need(typeof key === "string");
|
|
60
|
+
const d = Object.getOwnPropertyDescriptor(x, key);
|
|
61
|
+
need(d && "value" in d);
|
|
62
|
+
if (array && key === "length") continue;
|
|
63
|
+
need(d.enumerable);
|
|
64
|
+
walk(d.value, depth + 1);
|
|
65
|
+
}
|
|
66
|
+
active.delete(x);
|
|
67
|
+
}
|
|
68
|
+
walk(value, 0);
|
|
69
|
+
}
|
|
70
|
+
function attachShape(a: Record<string, unknown>) {
|
|
71
|
+
const p = closed(
|
|
72
|
+
a.preparation,
|
|
73
|
+
["subscription", "targetPrice", "expected", "key"],
|
|
74
|
+
["billingCustomer"],
|
|
75
|
+
);
|
|
76
|
+
closed(p.expected, [
|
|
77
|
+
"customerAccountId",
|
|
78
|
+
"subscriptionId",
|
|
79
|
+
"itemId",
|
|
80
|
+
"currentPriceId",
|
|
81
|
+
"currentProductId",
|
|
82
|
+
"targetPriceId",
|
|
83
|
+
"targetProductId",
|
|
84
|
+
"periodStart",
|
|
85
|
+
"periodEnd",
|
|
86
|
+
"livemode",
|
|
87
|
+
]);
|
|
88
|
+
}
|
|
89
|
+
function bundleShape(b: unknown) {
|
|
90
|
+
const v = closed(b, [
|
|
91
|
+
"wireSubscription",
|
|
92
|
+
"wireTargetPrice",
|
|
93
|
+
"wireBillingCustomer",
|
|
94
|
+
"couponReads",
|
|
95
|
+
"derivedCouponJoins",
|
|
96
|
+
]);
|
|
97
|
+
closed(v.derivedCouponJoins, ["subscription", "item"]);
|
|
98
|
+
}
|
|
99
|
+
function retainedShape(raw: unknown) {
|
|
100
|
+
const x = closed(raw, ["attachRequest", "originalBundle"]),
|
|
101
|
+
a = closed(x.attachRequest, [
|
|
102
|
+
"preparation",
|
|
103
|
+
"apiVersion",
|
|
104
|
+
"attachKey",
|
|
105
|
+
"firstDispatchedAt",
|
|
106
|
+
]);
|
|
107
|
+
attachShape(a);
|
|
108
|
+
need(
|
|
109
|
+
typeof a.apiVersion === "string" &&
|
|
110
|
+
typeof a.attachKey === "string" &&
|
|
111
|
+
typeof a.firstDispatchedAt === "number",
|
|
112
|
+
);
|
|
113
|
+
bundleShape(x.originalBundle);
|
|
114
|
+
}
|
|
115
|
+
function freshShape(raw: unknown) {
|
|
116
|
+
const x = closed(raw, [
|
|
117
|
+
"attachRequest",
|
|
118
|
+
"originalBundle",
|
|
119
|
+
"currentBundle",
|
|
120
|
+
"observedAt",
|
|
121
|
+
]);
|
|
122
|
+
need(Number.isSafeInteger(x.observedAt) && (x.observedAt as number) >= 0);
|
|
123
|
+
const a = closed(x.attachRequest, [
|
|
124
|
+
"preparation",
|
|
125
|
+
"apiVersion",
|
|
126
|
+
"attachKey",
|
|
127
|
+
"firstDispatchedAt",
|
|
128
|
+
]);
|
|
129
|
+
attachShape(a);
|
|
130
|
+
for (const b of [x.originalBundle, x.currentBundle]) bundleShape(b);
|
|
131
|
+
}
|
|
132
|
+
export function captureRetainedInput(raw: unknown): RetainedInput {
|
|
133
|
+
rejectProxy(raw);
|
|
134
|
+
retainedShape(raw);
|
|
135
|
+
const value = requiredJSONSnapshot(raw);
|
|
136
|
+
retainedShape(value);
|
|
137
|
+
return freeze(value) as RetainedInput;
|
|
138
|
+
}
|
|
139
|
+
export function captureOwnedInput(raw: unknown): FreshInput {
|
|
140
|
+
rejectProxy(raw);
|
|
141
|
+
freshShape(raw);
|
|
142
|
+
const value = requiredJSONSnapshot(raw);
|
|
143
|
+
freshShape(value);
|
|
144
|
+
return freeze(value) as FreshInput;
|
|
145
|
+
}
|
|
146
|
+
const couponID = (id: unknown): id is string =>
|
|
147
|
+
typeof id === "string" &&
|
|
148
|
+
id.length > 0 &&
|
|
149
|
+
id.length <= 255 &&
|
|
150
|
+
/\S/.test(id) &&
|
|
151
|
+
id !== "." &&
|
|
152
|
+
id !== "..";
|
|
153
|
+
function rebuild(b: Bundle) {
|
|
154
|
+
const subscription = b.wireSubscription;
|
|
155
|
+
need(
|
|
156
|
+
subscription &&
|
|
157
|
+
subscription.items &&
|
|
158
|
+
Array.isArray(subscription.items.data) &&
|
|
159
|
+
subscription.items.data.length === 1,
|
|
160
|
+
);
|
|
161
|
+
const lists = [subscription.discounts, subscription.items.data[0].discounts];
|
|
162
|
+
need(lists.every((x) => Array.isArray(x) && x.length <= 20));
|
|
163
|
+
need(Array.isArray(b.couponReads) && b.couponReads.length <= 40);
|
|
164
|
+
const ids = new Map<string, number>();
|
|
165
|
+
const joined = lists.map((list) =>
|
|
166
|
+
list.map((discount, index) => {
|
|
167
|
+
need(discount && discount.source);
|
|
168
|
+
const ref = discount.source.coupon,
|
|
169
|
+
id = typeof ref === "string" ? ref : ref?.id;
|
|
170
|
+
need(couponID(id));
|
|
171
|
+
if (!ids.has(id)) {
|
|
172
|
+
const i = ids.size,
|
|
173
|
+
row = closed(b.couponReads[i], [
|
|
174
|
+
"couponId",
|
|
175
|
+
"wireCoupon",
|
|
176
|
+
"association",
|
|
177
|
+
]);
|
|
178
|
+
const association = closed(row.association, ["resource", "ordinal"]);
|
|
179
|
+
need(
|
|
180
|
+
row.couponId === id &&
|
|
181
|
+
association.resource === "coupon" &&
|
|
182
|
+
association.ordinal === 4 + i,
|
|
183
|
+
);
|
|
184
|
+
const c = row.wireCoupon as Data;
|
|
185
|
+
need(c && c.id === id && c.object === "coupon" && c.deleted !== true);
|
|
186
|
+
ids.set(id, i);
|
|
187
|
+
}
|
|
188
|
+
const couponReadIndex = ids.get(id)!,
|
|
189
|
+
coupon = b.couponReads[couponReadIndex].wireCoupon;
|
|
190
|
+
need(typeof ref === "string" || equal(ref, coupon));
|
|
191
|
+
const joinedDiscount = {
|
|
192
|
+
...discount,
|
|
193
|
+
source: { ...discount.source, coupon },
|
|
194
|
+
};
|
|
195
|
+
return {
|
|
196
|
+
index,
|
|
197
|
+
discountId: discount.id,
|
|
198
|
+
originalCouponReference: ref,
|
|
199
|
+
couponReadIndex,
|
|
200
|
+
joinedDiscount,
|
|
201
|
+
};
|
|
202
|
+
}),
|
|
203
|
+
);
|
|
204
|
+
need(
|
|
205
|
+
ids.size === b.couponReads.length &&
|
|
206
|
+
equal(b.derivedCouponJoins, { subscription: joined[0], item: joined[1] }),
|
|
207
|
+
);
|
|
208
|
+
return {
|
|
209
|
+
subscription: joined[0].map((x) => x.joinedDiscount),
|
|
210
|
+
item: joined[1].map((x) => x.joinedDiscount),
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export function ownedRetainedEligibility(value: RetainedInput) {
|
|
214
|
+
const p = value.attachRequest.preparation,
|
|
215
|
+
original = value.originalBundle;
|
|
216
|
+
need(original.wireSubscription.schedule === null);
|
|
217
|
+
for (const [key, wire] of [
|
|
218
|
+
["subscription", "wireSubscription"],
|
|
219
|
+
["targetPrice", "wireTargetPrice"],
|
|
220
|
+
["billingCustomer", "wireBillingCustomer"],
|
|
221
|
+
] as const)
|
|
222
|
+
need(equal(p[key], original[wire]));
|
|
223
|
+
return freeze(rebuild(original));
|
|
224
|
+
}
|
|
225
|
+
export function ownedCouponEligibility(value: FreshInput) {
|
|
226
|
+
const p = value.attachRequest.preparation,
|
|
227
|
+
original = value.originalBundle,
|
|
228
|
+
current = value.currentBundle;
|
|
229
|
+
need(
|
|
230
|
+
original.wireSubscription.schedule === null &&
|
|
231
|
+
current.wireSubscription.schedule === null,
|
|
232
|
+
);
|
|
233
|
+
for (const [key, wire] of [
|
|
234
|
+
["subscription", "wireSubscription"],
|
|
235
|
+
["targetPrice", "wireTargetPrice"],
|
|
236
|
+
["billingCustomer", "wireBillingCustomer"],
|
|
237
|
+
] as const)
|
|
238
|
+
need(equal(p[key], original[wire]) && equal(original[wire], current[wire]));
|
|
239
|
+
rebuild(original);
|
|
240
|
+
const joined = rebuild(current);
|
|
241
|
+
need(equal(original.couponReads, current.couponReads));
|
|
242
|
+
return freeze(joined);
|
|
243
|
+
}
|