@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,181 @@
|
|
|
1
|
+
// Private required-material prerequisite. No operator, PII or typed-field admission.
|
|
2
|
+
const STOP = "REQUIRED_JSON_PRIVACY_STOP";
|
|
3
|
+
const credentialNames = new Set([
|
|
4
|
+
"clientsecret",
|
|
5
|
+
"confirmationsecret",
|
|
6
|
+
"accesstoken",
|
|
7
|
+
"refreshtoken",
|
|
8
|
+
"authorization",
|
|
9
|
+
"apikey",
|
|
10
|
+
"secretkey",
|
|
11
|
+
"adminkey",
|
|
12
|
+
"privatekey",
|
|
13
|
+
"stripesecretkey",
|
|
14
|
+
"cardnumber",
|
|
15
|
+
"creditcardnumber",
|
|
16
|
+
"cvc",
|
|
17
|
+
"cvv",
|
|
18
|
+
"bankaccountnumber",
|
|
19
|
+
"routingnumber",
|
|
20
|
+
"iban",
|
|
21
|
+
"accountnumber",
|
|
22
|
+
]);
|
|
23
|
+
const credentialText =
|
|
24
|
+
/(?:sk|rk)_(?:test|live)_|whsec_|_secret_|\bBearer\s+|\bAuthorization\s*:|-----BEGIN (?:[A-Z]+ )?PRIVATE KEY-----|(?:^|\D)(?:\d[ -]?){12,18}\d(?:$|\D)/i;
|
|
25
|
+
function fail(): never {
|
|
26
|
+
throw new Error(STOP);
|
|
27
|
+
}
|
|
28
|
+
// Counts JSON escaping without serializing or reading object properties.
|
|
29
|
+
function stringSize(text: string) {
|
|
30
|
+
let bytes = 2,
|
|
31
|
+
characters = 2;
|
|
32
|
+
for (let i = 0; i < text.length; i++) {
|
|
33
|
+
const n = text.charCodeAt(i);
|
|
34
|
+
if (n === 34 || n === 92 || [8, 9, 10, 12, 13].includes(n)) {
|
|
35
|
+
bytes += 2;
|
|
36
|
+
characters += 2;
|
|
37
|
+
} else if (n < 32) {
|
|
38
|
+
bytes += 6;
|
|
39
|
+
characters += 6;
|
|
40
|
+
} else if (
|
|
41
|
+
n >= 0xd800 &&
|
|
42
|
+
n <= 0xdbff &&
|
|
43
|
+
i + 1 < text.length &&
|
|
44
|
+
text.charCodeAt(i + 1) >= 0xdc00 &&
|
|
45
|
+
text.charCodeAt(i + 1) <= 0xdfff
|
|
46
|
+
) {
|
|
47
|
+
bytes += 4;
|
|
48
|
+
characters += 2;
|
|
49
|
+
i++;
|
|
50
|
+
} else if (n >= 0xd800 && n <= 0xdfff) {
|
|
51
|
+
bytes += 6;
|
|
52
|
+
characters += 6;
|
|
53
|
+
} else {
|
|
54
|
+
bytes += n < 128 ? 1 : n < 2048 ? 2 : 3;
|
|
55
|
+
characters++;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return { bytes, characters };
|
|
59
|
+
}
|
|
60
|
+
export function requiredJSONSnapshot(value: unknown): unknown {
|
|
61
|
+
try {
|
|
62
|
+
let nodes = 0,
|
|
63
|
+
rawCharacters = 0,
|
|
64
|
+
jsonCharacters = 0,
|
|
65
|
+
utf8Bytes = 0;
|
|
66
|
+
const active = new Set<object>(),
|
|
67
|
+
captures = new Map<
|
|
68
|
+
object,
|
|
69
|
+
{ array: boolean; entries: [string, unknown][] }
|
|
70
|
+
>();
|
|
71
|
+
function charge(characters: number, bytes: number) {
|
|
72
|
+
jsonCharacters += characters;
|
|
73
|
+
utf8Bytes += bytes;
|
|
74
|
+
if (jsonCharacters > 500000 || utf8Bytes > 500000) fail();
|
|
75
|
+
}
|
|
76
|
+
function string(text: string) {
|
|
77
|
+
if (credentialText.test(text)) fail();
|
|
78
|
+
rawCharacters += text.length;
|
|
79
|
+
if (rawCharacters > 500000) fail();
|
|
80
|
+
const size = stringSize(text);
|
|
81
|
+
charge(size.characters, size.bytes);
|
|
82
|
+
}
|
|
83
|
+
function scan(item: unknown, depth: number): void {
|
|
84
|
+
if (++nodes > 10000 || depth > 40) fail();
|
|
85
|
+
if (typeof item === "string") {
|
|
86
|
+
string(item);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (item === null) {
|
|
90
|
+
charge(4, 4);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (typeof item === "boolean") {
|
|
94
|
+
charge(item ? 4 : 5, item ? 4 : 5);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (typeof item === "number") {
|
|
98
|
+
if (
|
|
99
|
+
!Number.isFinite(item) ||
|
|
100
|
+
(Number.isInteger(item) && !Number.isSafeInteger(item))
|
|
101
|
+
)
|
|
102
|
+
fail();
|
|
103
|
+
const size = String(item).length;
|
|
104
|
+
charge(size, size);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (!item || typeof item !== "object" || active.has(item)) fail();
|
|
108
|
+
const array = Array.isArray(item),
|
|
109
|
+
proto = Object.getPrototypeOf(item);
|
|
110
|
+
if (
|
|
111
|
+
array
|
|
112
|
+
? proto !== Array.prototype
|
|
113
|
+
: proto !== Object.prototype && proto !== null
|
|
114
|
+
)
|
|
115
|
+
fail();
|
|
116
|
+
const keys = Reflect.ownKeys(item);
|
|
117
|
+
if (keys.some((key) => typeof key !== "string")) fail();
|
|
118
|
+
const length = array
|
|
119
|
+
? Object.getOwnPropertyDescriptor(item, "length")
|
|
120
|
+
: null;
|
|
121
|
+
if (
|
|
122
|
+
array &&
|
|
123
|
+
(!length ||
|
|
124
|
+
!("value" in length) ||
|
|
125
|
+
!Number.isSafeInteger(length!.value) ||
|
|
126
|
+
length!.value > 10000)
|
|
127
|
+
)
|
|
128
|
+
fail();
|
|
129
|
+
const entries: [string, unknown][] = [];
|
|
130
|
+
for (const key of keys) {
|
|
131
|
+
if (typeof key !== "string") fail();
|
|
132
|
+
if (array && key === "length") continue;
|
|
133
|
+
if (entries.length >= 10000) fail();
|
|
134
|
+
if (
|
|
135
|
+
array &&
|
|
136
|
+
(!/^(0|[1-9][0-9]*)$/.test(key) || Number(key) >= length!.value)
|
|
137
|
+
)
|
|
138
|
+
fail();
|
|
139
|
+
// Secret names themselves are not secret values. Non-null values stop.
|
|
140
|
+
const descriptor = Object.getOwnPropertyDescriptor(item, key);
|
|
141
|
+
if (!descriptor || !descriptor.enumerable || !("value" in descriptor))
|
|
142
|
+
fail();
|
|
143
|
+
if (
|
|
144
|
+
credentialNames.has(key.replace(/[^A-Za-z0-9]/g, "").toLowerCase()) &&
|
|
145
|
+
descriptor.value !== null
|
|
146
|
+
)
|
|
147
|
+
fail();
|
|
148
|
+
if (!array) string(key);
|
|
149
|
+
else {
|
|
150
|
+
rawCharacters += key.length;
|
|
151
|
+
if (rawCharacters > 500000) fail();
|
|
152
|
+
}
|
|
153
|
+
entries.push([key, descriptor.value]);
|
|
154
|
+
}
|
|
155
|
+
if (array && entries.length !== length!.value) fail();
|
|
156
|
+
charge(
|
|
157
|
+
2 + Math.max(0, entries.length - 1) + (array ? 0 : entries.length),
|
|
158
|
+
2 + Math.max(0, entries.length - 1) + (array ? 0 : entries.length),
|
|
159
|
+
);
|
|
160
|
+
active.add(item);
|
|
161
|
+
for (const [, child] of entries) scan(child, depth + 1);
|
|
162
|
+
active.delete(item);
|
|
163
|
+
// Internal descriptor capture only. No detached JSON clone exists until all scans pass.
|
|
164
|
+
captures.set(item, { array, entries });
|
|
165
|
+
}
|
|
166
|
+
scan(value, 0);
|
|
167
|
+
function copy(item: unknown): unknown {
|
|
168
|
+
if (!item || typeof item !== "object") return item;
|
|
169
|
+
const { array, entries } = captures.get(item)!;
|
|
170
|
+
if (array) return entries.map(([, child]) => copy(child));
|
|
171
|
+
return Object.fromEntries(
|
|
172
|
+
entries
|
|
173
|
+
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
|
|
174
|
+
.map(([key, child]) => [key, copy(child)]),
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
return copy(value);
|
|
178
|
+
} catch {
|
|
179
|
+
fail();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Internal standard repo constructors only, no caller-selected resolver. */
|
|
2
|
+
export {
|
|
3
|
+
prepareRenewalPriceReplacementV2,
|
|
4
|
+
prepareRenewalScheduleAttachmentV2,
|
|
5
|
+
constructRenewalScheduleAttachmentReceiptV2,
|
|
6
|
+
projectRenewalConfigurationV2,
|
|
7
|
+
constructRenewalConfigurationReceiptV2,
|
|
8
|
+
} from "../../../renewalV2/index.js";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import "./test-fixtures/semanticSetup.js";
|
|
2
|
+
import { it as test } from "vitest";
|
|
3
|
+
import assert from "node:assert/strict";
|
|
4
|
+
const { fixture, copy } = await import("./test-fixtures/fixture.mjs");
|
|
5
|
+
const { createAttachEventCompiler } =
|
|
6
|
+
await import("./test-fixtures/compilerIndex.mjs");
|
|
7
|
+
for (const kind of [
|
|
8
|
+
"secret-object",
|
|
9
|
+
"secret-array",
|
|
10
|
+
"secret-text",
|
|
11
|
+
"whole-bytes",
|
|
12
|
+
])
|
|
13
|
+
test(
|
|
14
|
+
"reflection between ordinary admission and detach rejects " +
|
|
15
|
+
kind +
|
|
16
|
+
" before materialize/hash",
|
|
17
|
+
async () => {
|
|
18
|
+
const f = await fixture(),
|
|
19
|
+
raw = copy(f.sourceAttach);
|
|
20
|
+
let prototypes = 0,
|
|
21
|
+
clones = 0,
|
|
22
|
+
hashes = 0;
|
|
23
|
+
const property =
|
|
24
|
+
kind.startsWith("secret-") && kind !== "secret-text"
|
|
25
|
+
? "client_secret"
|
|
26
|
+
: "unclassified";
|
|
27
|
+
const value =
|
|
28
|
+
kind === "secret-object"
|
|
29
|
+
? {}
|
|
30
|
+
: kind === "secret-array"
|
|
31
|
+
? []
|
|
32
|
+
: kind === "secret-text"
|
|
33
|
+
? "sk_test_SYNTHETIC"
|
|
34
|
+
: Array.from({ length: 20 }, () => "x".repeat(30000));
|
|
35
|
+
raw.preparation.subscription = new Proxy(raw.preparation.subscription, {
|
|
36
|
+
getPrototypeOf(t) {
|
|
37
|
+
prototypes++;
|
|
38
|
+
if (prototypes === 2)
|
|
39
|
+
Object.defineProperty(t, property, {
|
|
40
|
+
value,
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
});
|
|
44
|
+
return Object.prototype;
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
const originalEntries = Object.fromEntries,
|
|
48
|
+
originalDigest = globalThis.crypto.subtle.digest;
|
|
49
|
+
Object.fromEntries = function (
|
|
50
|
+
entries: Iterable<readonly [PropertyKey, unknown]>,
|
|
51
|
+
) {
|
|
52
|
+
const rows = Array.from(entries);
|
|
53
|
+
if (
|
|
54
|
+
rows.some(
|
|
55
|
+
([k, v]) =>
|
|
56
|
+
k === property &&
|
|
57
|
+
v !== null &&
|
|
58
|
+
(typeof v === "object" || typeof v === "string"),
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
clones++;
|
|
62
|
+
return originalEntries(rows);
|
|
63
|
+
};
|
|
64
|
+
globalThis.crypto.subtle.digest = function (...a) {
|
|
65
|
+
hashes++;
|
|
66
|
+
return originalDigest.apply(this, a);
|
|
67
|
+
};
|
|
68
|
+
try {
|
|
69
|
+
assert.throws(
|
|
70
|
+
() =>
|
|
71
|
+
createAttachEventCompiler(raw, {
|
|
72
|
+
timeoutMs: 5000,
|
|
73
|
+
send: async () => {
|
|
74
|
+
throw Error("NO_SEND");
|
|
75
|
+
},
|
|
76
|
+
}),
|
|
77
|
+
/C10_SOURCE_STOP/,
|
|
78
|
+
);
|
|
79
|
+
assert.ok(prototypes >= 2);
|
|
80
|
+
assert.equal(clones, 0);
|
|
81
|
+
assert.equal(hashes, 0);
|
|
82
|
+
} finally {
|
|
83
|
+
Object.fromEntries = originalEntries;
|
|
84
|
+
globalThis.crypto.subtle.digest = originalDigest;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Raw synthetic sources only; never imports the TEST owner/model/first-construction entry.
|
|
2
|
+
import { instantiateRequired } from "./frozen/f24.mjs";
|
|
3
|
+
import * as sdk from "../../../../renewalV2/index.js";
|
|
4
|
+
export const copy = (x) => structuredClone(x);
|
|
5
|
+
export const wire = (x) => ({
|
|
6
|
+
scope: x.scope,
|
|
7
|
+
apiVersion: x.apiVersion,
|
|
8
|
+
method: x.method,
|
|
9
|
+
path: x.path,
|
|
10
|
+
payload: copy(x.payload),
|
|
11
|
+
key: x.key,
|
|
12
|
+
firstDispatchedAt: x.firstDispatchedAt,
|
|
13
|
+
});
|
|
14
|
+
export async function fixture() {
|
|
15
|
+
const s = instantiateRequired(),
|
|
16
|
+
sourceAttach = copy(s.attach.attachRequest),
|
|
17
|
+
sourceConfigure = copy(s.configuration);
|
|
18
|
+
const prepared = await sdk.prepareRenewalPriceReplacementV2(
|
|
19
|
+
sourceAttach.preparation,
|
|
20
|
+
),
|
|
21
|
+
request = await sdk.prepareRenewalScheduleAttachmentV2({
|
|
22
|
+
prepared,
|
|
23
|
+
apiVersion: sourceAttach.apiVersion,
|
|
24
|
+
attachKey: sourceAttach.attachKey,
|
|
25
|
+
firstDispatchedAt: sourceAttach.firstDispatchedAt,
|
|
26
|
+
}),
|
|
27
|
+
attach = await sdk.constructRenewalScheduleAttachmentReceiptV2(s.attach),
|
|
28
|
+
configure = await sdk.projectRenewalConfigurationV2(sourceConfigure);
|
|
29
|
+
if (configure.status !== "projected_configure_request")
|
|
30
|
+
throw Error("SYNTHETIC_CONFIGURE_UNSUPPORTED");
|
|
31
|
+
const transport = { status: 200, requestId: "req_SYNTHETIC_C10" },
|
|
32
|
+
stored = await sdk.constructRenewalConfigurationReceiptV2({
|
|
33
|
+
configuration: sourceConfigure,
|
|
34
|
+
actualDispatch: s.configuredDispatch,
|
|
35
|
+
providerSnapshot: s.configuredBody,
|
|
36
|
+
transport,
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
s,
|
|
40
|
+
sourceAttach,
|
|
41
|
+
sourceConfigure,
|
|
42
|
+
request,
|
|
43
|
+
attach,
|
|
44
|
+
configure,
|
|
45
|
+
stored,
|
|
46
|
+
transport,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export { sdk };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { object, timestamp, unsupported } from "./f02.mjs";
|
|
3
|
+
const mode = z
|
|
4
|
+
.object({
|
|
5
|
+
type: z.enum(["classic", "flexible"]),
|
|
6
|
+
flexible: z
|
|
7
|
+
.object({
|
|
8
|
+
proration_discounts: z.enum(["included", "itemized"]).optional(),
|
|
9
|
+
})
|
|
10
|
+
.strict()
|
|
11
|
+
.nullable(),
|
|
12
|
+
updated_at: timestamp.optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict()
|
|
15
|
+
.refine((value) => value.type !== "classic" || value.flexible === null);
|
|
16
|
+
const anchorConfig = z
|
|
17
|
+
.object({
|
|
18
|
+
day_of_month: z.number().int().min(1).max(31),
|
|
19
|
+
month: z.number().int().min(1).max(12).nullable(),
|
|
20
|
+
hour: z.number().int().min(0).max(23).nullable(),
|
|
21
|
+
minute: z.number().int().min(0).max(59).nullable(),
|
|
22
|
+
second: z.number().int().min(0).max(59).nullable(),
|
|
23
|
+
})
|
|
24
|
+
.strict()
|
|
25
|
+
.nullable();
|
|
26
|
+
export function profileOf(subscription, currentPrice, targetPrice, apiVersion) {
|
|
27
|
+
const parsedMode = mode.safeParse(subscription.billing_mode);
|
|
28
|
+
if (!parsedMode.success) unsupported("unsupported_billing_mode");
|
|
29
|
+
const parsedConfig = anchorConfig.safeParse(
|
|
30
|
+
subscription.billing_cycle_anchor_config,
|
|
31
|
+
);
|
|
32
|
+
if (!parsedConfig.success) unsupported("unsupported_anchor_config");
|
|
33
|
+
const anchor = timestamp.safeParse(subscription.billing_cycle_anchor);
|
|
34
|
+
if (
|
|
35
|
+
!anchor.success ||
|
|
36
|
+
!Number.isFinite(new Date(anchor.data * 1000).getTime())
|
|
37
|
+
)
|
|
38
|
+
unsupported("unsupported_numeric_anchor");
|
|
39
|
+
const current = object(object(currentPrice).recurring);
|
|
40
|
+
const target = object(object(targetPrice).recurring);
|
|
41
|
+
const cadence =
|
|
42
|
+
current.interval === target.interval &&
|
|
43
|
+
current.interval_count === target.interval_count
|
|
44
|
+
? "same"
|
|
45
|
+
: "changed";
|
|
46
|
+
if (parsedConfig.data !== null) {
|
|
47
|
+
if (current.interval !== "month" && current.interval !== "year")
|
|
48
|
+
unsupported("unsupported_anchor_config_cadence");
|
|
49
|
+
if (cadence === "changed")
|
|
50
|
+
unsupported("unsupported_changed_cadence_anchor_config");
|
|
51
|
+
}
|
|
52
|
+
const calendar = current.interval === "month" || current.interval === "year";
|
|
53
|
+
const edge =
|
|
54
|
+
calendar &&
|
|
55
|
+
(new Date(anchor.data * 1000).getUTCDate() >= 29 ||
|
|
56
|
+
(parsedConfig.data?.day_of_month ?? 0) >= 29);
|
|
57
|
+
return {
|
|
58
|
+
apiVersion,
|
|
59
|
+
billingMode: parsedMode.data.type,
|
|
60
|
+
cadence,
|
|
61
|
+
anchor: edge ? "calendar_edge" : "ordinary",
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import {
|
|
3
|
+
renewalSubscription,
|
|
4
|
+
renewalPrice,
|
|
5
|
+
renewalBillingCustomer,
|
|
6
|
+
} from "./f09.mjs";
|
|
7
|
+
import {
|
|
8
|
+
referenceId,
|
|
9
|
+
equal,
|
|
10
|
+
conflict,
|
|
11
|
+
unsupported,
|
|
12
|
+
supportedVersion,
|
|
13
|
+
timestamp,
|
|
14
|
+
resourceId,
|
|
15
|
+
productId,
|
|
16
|
+
} from "./f02.mjs";
|
|
17
|
+
import { profileOf } from "./f00.mjs";
|
|
18
|
+
import { qualifySourceDiscounts } from "./f03.mjs";
|
|
19
|
+
import { qualifyOriginalSettings } from "./f04.mjs";
|
|
20
|
+
const attachedReference = z.union([
|
|
21
|
+
resourceId("sub_sched"),
|
|
22
|
+
z
|
|
23
|
+
.object({
|
|
24
|
+
id: resourceId("sub_sched"),
|
|
25
|
+
object: z.literal("subscription_schedule"),
|
|
26
|
+
deleted: z.literal(false).optional(),
|
|
27
|
+
customer_account: resourceId("acct").optional(),
|
|
28
|
+
livemode: z.boolean().optional(),
|
|
29
|
+
})
|
|
30
|
+
.passthrough(),
|
|
31
|
+
]);
|
|
32
|
+
export function validateReadMaterial(args, prepared, scheduleId) {
|
|
33
|
+
supportedVersion(args.apiVersion);
|
|
34
|
+
const subscription = renewalSubscription
|
|
35
|
+
.extend({ schedule: scheduleId ? attachedReference : z.null() })
|
|
36
|
+
.safeParse(args.freshSubscription);
|
|
37
|
+
if (!subscription.success)
|
|
38
|
+
unsupported("unsupported_original_subscription_state");
|
|
39
|
+
const source = subscription.data;
|
|
40
|
+
if (scheduleId) {
|
|
41
|
+
if (
|
|
42
|
+
referenceId(source.schedule, "sub_sched", "subscription_schedule") !==
|
|
43
|
+
scheduleId
|
|
44
|
+
)
|
|
45
|
+
conflict("schedule_association_mismatch");
|
|
46
|
+
if (
|
|
47
|
+
typeof source.schedule === "object" &&
|
|
48
|
+
source.schedule !== null &&
|
|
49
|
+
((source.schedule.customer_account !== undefined &&
|
|
50
|
+
source.schedule.customer_account !==
|
|
51
|
+
prepared.expected.customerAccountId) ||
|
|
52
|
+
(source.schedule.livemode !== undefined &&
|
|
53
|
+
source.schedule.livemode !== prepared.expected.livemode))
|
|
54
|
+
)
|
|
55
|
+
conflict("schedule_association_mismatch");
|
|
56
|
+
}
|
|
57
|
+
const { schedule: originalSchedule, ...original } =
|
|
58
|
+
prepared.providerSnapshot.subscription;
|
|
59
|
+
// Compare complete captured bodies, not parser outputs that may omit own keys.
|
|
60
|
+
const { schedule: freshSchedule, ...fresh } = args.freshSubscription;
|
|
61
|
+
if (scheduleId ? originalSchedule !== null : freshSchedule !== null)
|
|
62
|
+
conflict("schedule_association_mismatch");
|
|
63
|
+
if (!equal(original, fresh)) conflict("original_source_drift");
|
|
64
|
+
const target = renewalPrice.safeParse(args.targetPrice);
|
|
65
|
+
if (!target.success || !target.data.active)
|
|
66
|
+
unsupported("unsupported_target_price");
|
|
67
|
+
if (!equal(args.targetPrice, prepared.providerSnapshot.targetPrice))
|
|
68
|
+
conflict("target_price_drift");
|
|
69
|
+
if (
|
|
70
|
+
prepared.providerSnapshot.billingCustomer === undefined ||
|
|
71
|
+
args.billingCustomer === undefined
|
|
72
|
+
)
|
|
73
|
+
unsupported("missing_retained_billing_customer");
|
|
74
|
+
const customer = renewalBillingCustomer.safeParse(args.billingCustomer);
|
|
75
|
+
if (!customer.success) unsupported("unsupported_billing_customer");
|
|
76
|
+
if (!equal(args.billingCustomer, prepared.providerSnapshot.billingCustomer))
|
|
77
|
+
conflict("billing_customer_drift");
|
|
78
|
+
const referenceContext = {
|
|
79
|
+
customerAccountId: prepared.expected.customerAccountId,
|
|
80
|
+
livemode: prepared.expected.livemode,
|
|
81
|
+
};
|
|
82
|
+
if (
|
|
83
|
+
referenceId(source.customer, "cus", "customer", referenceContext) !==
|
|
84
|
+
customer.data.id ||
|
|
85
|
+
customer.data.customer_account !== prepared.expected.customerAccountId ||
|
|
86
|
+
customer.data.livemode !== prepared.expected.livemode
|
|
87
|
+
)
|
|
88
|
+
conflict("billing_customer_identity_mismatch");
|
|
89
|
+
const item = source.items.data[0];
|
|
90
|
+
if (
|
|
91
|
+
productId(item.price.product, referenceContext) !==
|
|
92
|
+
prepared.expected.currentProductId ||
|
|
93
|
+
productId(target.data.product, referenceContext) !==
|
|
94
|
+
prepared.expected.targetProductId
|
|
95
|
+
)
|
|
96
|
+
unsupported("product_identity_mismatch");
|
|
97
|
+
if (
|
|
98
|
+
args.observedAt < prepared.expected.periodStart ||
|
|
99
|
+
args.observedAt >= prepared.expected.periodEnd
|
|
100
|
+
)
|
|
101
|
+
unsupported("outside_original_paid_period");
|
|
102
|
+
for (const field of [
|
|
103
|
+
"billing_thresholds",
|
|
104
|
+
"managed_payments",
|
|
105
|
+
"next_pending_invoice_item_invoice",
|
|
106
|
+
"pending_invoice_item_interval",
|
|
107
|
+
"pending_setup_intent",
|
|
108
|
+
"canceled_at",
|
|
109
|
+
"ended_at",
|
|
110
|
+
"trial_settings",
|
|
111
|
+
])
|
|
112
|
+
if (source[field] !== null) unsupported(`unsupported_original_${field}`);
|
|
113
|
+
if (item.billing_thresholds !== null)
|
|
114
|
+
unsupported("unsupported_item_billing_thresholds");
|
|
115
|
+
if (item.current_trial !== null)
|
|
116
|
+
unsupported("unsupported_or_missing_item_current_trial");
|
|
117
|
+
if (
|
|
118
|
+
!Array.isArray(source.billing_schedules) ||
|
|
119
|
+
source.billing_schedules.length
|
|
120
|
+
)
|
|
121
|
+
unsupported("unsupported_original_billing_schedules");
|
|
122
|
+
if (
|
|
123
|
+
source.trial_end !== null &&
|
|
124
|
+
(!timestamp.safeParse(source.trial_end).success ||
|
|
125
|
+
Number(source.trial_end) > prepared.expected.periodStart)
|
|
126
|
+
)
|
|
127
|
+
unsupported("unsupported_original_trial");
|
|
128
|
+
if (source.status_details != null || source.presentment_details != null)
|
|
129
|
+
unsupported("unsupported_special_billing_state");
|
|
130
|
+
const originalSettings = qualifyOriginalSettings(source, item, customer.data);
|
|
131
|
+
const profile = profileOf(source, item.price, target.data, args.apiVersion);
|
|
132
|
+
const anchor = timestamp.parse(source.billing_cycle_anchor);
|
|
133
|
+
if (anchor > prepared.expected.periodStart)
|
|
134
|
+
unsupported("unqualified_anchor_after_paid_period_start");
|
|
135
|
+
const discounts = qualifySourceDiscounts(
|
|
136
|
+
source.discounts,
|
|
137
|
+
"subscription",
|
|
138
|
+
prepared.expected,
|
|
139
|
+
customer.data.id,
|
|
140
|
+
args.observedAt,
|
|
141
|
+
);
|
|
142
|
+
const itemDiscounts = qualifySourceDiscounts(
|
|
143
|
+
item.discounts,
|
|
144
|
+
"item",
|
|
145
|
+
prepared.expected,
|
|
146
|
+
customer.data.id,
|
|
147
|
+
args.observedAt,
|
|
148
|
+
);
|
|
149
|
+
return {
|
|
150
|
+
prepared,
|
|
151
|
+
subscription: source,
|
|
152
|
+
item,
|
|
153
|
+
customer: customer.data,
|
|
154
|
+
targetPrice: target.data,
|
|
155
|
+
profile,
|
|
156
|
+
discounts,
|
|
157
|
+
itemDiscounts,
|
|
158
|
+
originalSettings,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { renewalSnapshot } from "./f10.mjs";
|
|
3
|
+
export const timestamp = z
|
|
4
|
+
.number()
|
|
5
|
+
.int()
|
|
6
|
+
.nonnegative()
|
|
7
|
+
.max(Number.MAX_SAFE_INTEGER);
|
|
8
|
+
export const resourceId = (prefix) =>
|
|
9
|
+
z
|
|
10
|
+
.string()
|
|
11
|
+
.max(255)
|
|
12
|
+
.regex(new RegExp(`^${prefix}_[A-Za-z0-9_]+$`));
|
|
13
|
+
export class ProjectionError extends Error {
|
|
14
|
+
kind;
|
|
15
|
+
constructor(kind, reason) {
|
|
16
|
+
super(reason);
|
|
17
|
+
this.kind = kind;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function unsupported(reason) {
|
|
21
|
+
throw new ProjectionError("unsupported", reason);
|
|
22
|
+
}
|
|
23
|
+
export function conflict(reason) {
|
|
24
|
+
throw new ProjectionError("conflict", reason);
|
|
25
|
+
}
|
|
26
|
+
export const object = (value) => z.record(z.string(), z.unknown()).parse(value);
|
|
27
|
+
export const canonical = (value) => JSON.stringify(renewalSnapshot(value));
|
|
28
|
+
export const binding = (namespace, value) =>
|
|
29
|
+
`${namespace}:v1:${canonical(value)}`;
|
|
30
|
+
export const equal = (left, right) => canonical(left) === canonical(right);
|
|
31
|
+
function referenceFacts(reference, context) {
|
|
32
|
+
if (
|
|
33
|
+
context &&
|
|
34
|
+
((reference.livemode !== undefined &&
|
|
35
|
+
reference.livemode !== context.livemode) ||
|
|
36
|
+
(reference.customer_account !== undefined &&
|
|
37
|
+
reference.customer_account !== context.customerAccountId))
|
|
38
|
+
)
|
|
39
|
+
unsupported("expanded_reference_scope_mismatch");
|
|
40
|
+
}
|
|
41
|
+
export function referenceId(value, prefix, kind, context) {
|
|
42
|
+
if (typeof value === "string") return resourceId(prefix).parse(value);
|
|
43
|
+
const reference = object(value);
|
|
44
|
+
if (reference.object !== kind || reference.deleted === true)
|
|
45
|
+
unsupported(`invalid_${kind}_reference`);
|
|
46
|
+
referenceFacts(reference, context);
|
|
47
|
+
return resourceId(prefix).parse(reference.id);
|
|
48
|
+
}
|
|
49
|
+
export function productId(value, context) {
|
|
50
|
+
const id = z.string().min(1).max(255).regex(/\S/);
|
|
51
|
+
if (typeof value === "string") return id.parse(value);
|
|
52
|
+
const reference = object(value);
|
|
53
|
+
if (reference.object !== "product" || reference.deleted === true)
|
|
54
|
+
unsupported("invalid_product_reference");
|
|
55
|
+
referenceFacts(reference, context);
|
|
56
|
+
return id.parse(reference.id);
|
|
57
|
+
}
|
|
58
|
+
export function failure(error, scheduleId) {
|
|
59
|
+
const known = error instanceof ProjectionError;
|
|
60
|
+
const kind = known ? error.kind : "unsupported";
|
|
61
|
+
const reason = known ? error.message : "incomplete_or_unsupported_schema";
|
|
62
|
+
if (kind === "unsupported" && scheduleId)
|
|
63
|
+
return { status: "attached_unconfigured", scheduleId, reason };
|
|
64
|
+
return { status: kind, reason };
|
|
65
|
+
}
|
|
66
|
+
export const readInput = z
|
|
67
|
+
.object({
|
|
68
|
+
prepared: z.unknown(),
|
|
69
|
+
freshSubscription: z.unknown(),
|
|
70
|
+
targetPrice: z.unknown(),
|
|
71
|
+
billingCustomer: z.unknown().optional(),
|
|
72
|
+
apiVersion: z.string(),
|
|
73
|
+
observedAt: timestamp,
|
|
74
|
+
})
|
|
75
|
+
.strict();
|
|
76
|
+
export const configureInput = readInput
|
|
77
|
+
.extend({
|
|
78
|
+
attachReceipt: z.unknown(),
|
|
79
|
+
schedule: z.unknown(),
|
|
80
|
+
configureKey: z.string(),
|
|
81
|
+
firstDispatchedAt: timestamp,
|
|
82
|
+
})
|
|
83
|
+
.strict();
|
|
84
|
+
export function supportedVersion(version) {
|
|
85
|
+
if (version !== "2026-09-30.endive")
|
|
86
|
+
unsupported("unqualified_api_version_profile");
|
|
87
|
+
return version;
|
|
88
|
+
}
|