@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,102 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resourceId, unsupported } from "./f02.mjs";
|
|
3
|
+
const customId = z.string().min(1).max(255).regex(/\S/);
|
|
4
|
+
const originalRedemptions = z
|
|
5
|
+
.array(
|
|
6
|
+
z
|
|
7
|
+
.object({
|
|
8
|
+
id: resourceId("di"),
|
|
9
|
+
object: z.literal("discount"),
|
|
10
|
+
deleted: z.literal(false).optional(),
|
|
11
|
+
customer_account: resourceId("acct"),
|
|
12
|
+
customer: z
|
|
13
|
+
.union([
|
|
14
|
+
resourceId("cus"),
|
|
15
|
+
z
|
|
16
|
+
.object({
|
|
17
|
+
id: resourceId("cus"),
|
|
18
|
+
object: z.literal("customer"),
|
|
19
|
+
deleted: z.literal(false).optional(),
|
|
20
|
+
livemode: z.boolean().optional(),
|
|
21
|
+
customer_account: resourceId("acct").nullable().optional(),
|
|
22
|
+
})
|
|
23
|
+
.passthrough(),
|
|
24
|
+
])
|
|
25
|
+
.nullable()
|
|
26
|
+
.optional(),
|
|
27
|
+
subscription: resourceId("sub").nullable(),
|
|
28
|
+
subscription_item: resourceId("si").nullable(),
|
|
29
|
+
start: z.number().int().nonnegative(),
|
|
30
|
+
end: z.null(),
|
|
31
|
+
source: z
|
|
32
|
+
.object({
|
|
33
|
+
type: z.literal("coupon"),
|
|
34
|
+
coupon: z
|
|
35
|
+
.object({
|
|
36
|
+
id: customId,
|
|
37
|
+
object: z.literal("coupon"),
|
|
38
|
+
deleted: z.literal(false).optional(),
|
|
39
|
+
livemode: z.boolean().optional(),
|
|
40
|
+
duration: z.literal("forever"),
|
|
41
|
+
applies_to: z
|
|
42
|
+
.object({ products: z.array(customId) })
|
|
43
|
+
.strict()
|
|
44
|
+
.optional(),
|
|
45
|
+
})
|
|
46
|
+
.passthrough(),
|
|
47
|
+
})
|
|
48
|
+
.passthrough(),
|
|
49
|
+
})
|
|
50
|
+
.passthrough(),
|
|
51
|
+
)
|
|
52
|
+
.max(20);
|
|
53
|
+
export function qualifySourceDiscounts(
|
|
54
|
+
value,
|
|
55
|
+
level,
|
|
56
|
+
context,
|
|
57
|
+
customerId,
|
|
58
|
+
observedAt,
|
|
59
|
+
) {
|
|
60
|
+
const parsed = originalRedemptions.safeParse(value);
|
|
61
|
+
if (!parsed.success)
|
|
62
|
+
unsupported("incomplete_or_unsupported_discount_evidence");
|
|
63
|
+
if (!parsed.data.length) unsupported("ambiguous_empty_discount_hierarchy");
|
|
64
|
+
if (
|
|
65
|
+
new Set(parsed.data.map((discount) => discount.id)).size !==
|
|
66
|
+
parsed.data.length
|
|
67
|
+
)
|
|
68
|
+
unsupported("duplicate_discount_redemptions");
|
|
69
|
+
for (const discount of parsed.data) {
|
|
70
|
+
const customer = discount.customer;
|
|
71
|
+
if (
|
|
72
|
+
discount.customer_account !== context.customerAccountId ||
|
|
73
|
+
discount.start > observedAt ||
|
|
74
|
+
(typeof customer === "string" && customer !== customerId) ||
|
|
75
|
+
(typeof customer === "object" &&
|
|
76
|
+
customer !== null &&
|
|
77
|
+
(customer.id !== customerId ||
|
|
78
|
+
(customer.livemode !== undefined &&
|
|
79
|
+
customer.livemode !== context.livemode) ||
|
|
80
|
+
(customer.customer_account !== undefined &&
|
|
81
|
+
customer.customer_account !== context.customerAccountId))) ||
|
|
82
|
+
(level === "subscription" &&
|
|
83
|
+
(discount.subscription !== context.subscriptionId ||
|
|
84
|
+
discount.subscription_item !== null)) ||
|
|
85
|
+
(level === "item" &&
|
|
86
|
+
(discount.subscription_item !== context.itemId ||
|
|
87
|
+
(discount.subscription !== null &&
|
|
88
|
+
discount.subscription !== context.subscriptionId)))
|
|
89
|
+
)
|
|
90
|
+
unsupported("discount_owner_or_start_mismatch");
|
|
91
|
+
const coupon = discount.source.coupon;
|
|
92
|
+
if (coupon.livemode !== undefined && coupon.livemode !== context.livemode)
|
|
93
|
+
unsupported("discount_coupon_mode_mismatch");
|
|
94
|
+
if (
|
|
95
|
+
coupon.applies_to &&
|
|
96
|
+
(!coupon.applies_to.products.includes(context.currentProductId) ||
|
|
97
|
+
!coupon.applies_to.products.includes(context.targetProductId))
|
|
98
|
+
)
|
|
99
|
+
unsupported("discount_product_applicability");
|
|
100
|
+
}
|
|
101
|
+
return parsed.data;
|
|
102
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { settingsInput } from "./f08.mjs";
|
|
2
|
+
import { projectRenewalPhaseSettings } from "./f07.mjs";
|
|
3
|
+
import { projectRenewalItemSettings } from "./f06.mjs";
|
|
4
|
+
import { explicitTaxIds } from "./f05.mjs";
|
|
5
|
+
import { unsupported } from "./f02.mjs";
|
|
6
|
+
const invoiceSchema = settingsInput.shape.settings.shape.invoice_settings
|
|
7
|
+
.unwrap()
|
|
8
|
+
.omit({ days_until_due: true })
|
|
9
|
+
.extend({
|
|
10
|
+
issuer: settingsInput.shape.context.shape.effectiveInvoiceIssuer,
|
|
11
|
+
})
|
|
12
|
+
.strict();
|
|
13
|
+
/**
|
|
14
|
+
* Classify actual original subscription/item fields before any attachment.
|
|
15
|
+
* The field projections below are validation views, not fabricated phase reads
|
|
16
|
+
* or provider acknowledgement. Their output is never dispatched or adopted.
|
|
17
|
+
*/
|
|
18
|
+
export function qualifyOriginalSettings(subscription, item, customer) {
|
|
19
|
+
const invoice = invoiceSchema.safeParse(subscription.invoice_settings);
|
|
20
|
+
if (!invoice.success) unsupported("unsupported_original_invoice_settings");
|
|
21
|
+
const automaticTax = settingsInput.shape.settings.shape.automatic_tax
|
|
22
|
+
.unwrap()
|
|
23
|
+
.safeParse(subscription.automatic_tax);
|
|
24
|
+
if (!automaticTax.success) unsupported("unsupported_original_automatic_tax");
|
|
25
|
+
const parsedContext = settingsInput.shape.context.safeParse({
|
|
26
|
+
customerId: customer.id,
|
|
27
|
+
customerAccountId: customer.customer_account,
|
|
28
|
+
livemode: customer.livemode,
|
|
29
|
+
effectiveCollectionMethod: subscription.collection_method,
|
|
30
|
+
effectiveAutomaticTax: automaticTax.data.enabled,
|
|
31
|
+
effectiveInvoiceIssuer: invoice.data.issuer,
|
|
32
|
+
});
|
|
33
|
+
if (!parsedContext.success)
|
|
34
|
+
unsupported("unsupported_original_billing_context");
|
|
35
|
+
const context = parsedContext.data;
|
|
36
|
+
const taxLevels = {
|
|
37
|
+
subscription: explicitTaxIds(
|
|
38
|
+
subscription.default_tax_rates,
|
|
39
|
+
"original_subscription",
|
|
40
|
+
),
|
|
41
|
+
item: explicitTaxIds(item.tax_rates, "original_item"),
|
|
42
|
+
};
|
|
43
|
+
const projection = projectRenewalPhaseSettings({
|
|
44
|
+
context,
|
|
45
|
+
settings: {
|
|
46
|
+
application_fee_percent: subscription.application_fee_percent,
|
|
47
|
+
billing_thresholds: subscription.billing_thresholds,
|
|
48
|
+
collection_method: subscription.collection_method,
|
|
49
|
+
default_payment_method: subscription.default_payment_method,
|
|
50
|
+
on_behalf_of: subscription.on_behalf_of,
|
|
51
|
+
transfer_data: subscription.transfer_data,
|
|
52
|
+
automatic_tax: automaticTax.data,
|
|
53
|
+
default_tax_rates: subscription.default_tax_rates,
|
|
54
|
+
// days_until_due is a top-level Subscription field in Stripe 23.
|
|
55
|
+
invoice_settings: {
|
|
56
|
+
...invoice.data,
|
|
57
|
+
days_until_due: subscription.days_until_due,
|
|
58
|
+
},
|
|
59
|
+
description: subscription.description,
|
|
60
|
+
metadata: null,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
if (projection.status !== "projected")
|
|
64
|
+
unsupported(`unsupported_original_settings_${projection.reason}`);
|
|
65
|
+
const itemProjection = projectRenewalItemSettings({
|
|
66
|
+
effectiveAutomaticTax: context.effectiveAutomaticTax,
|
|
67
|
+
livemode: context.livemode,
|
|
68
|
+
settings: {
|
|
69
|
+
billing_thresholds: item.billing_thresholds,
|
|
70
|
+
tax_rates: item.tax_rates,
|
|
71
|
+
metadata: item.metadata,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
if (itemProjection.status !== "projected")
|
|
75
|
+
unsupported(`unsupported_original_${itemProjection.reason}`);
|
|
76
|
+
return {
|
|
77
|
+
context,
|
|
78
|
+
invoice: invoice.data,
|
|
79
|
+
automaticTax: automaticTax.data,
|
|
80
|
+
taxLevels,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { taxRate } from "./f08.mjs";
|
|
3
|
+
import { equal, unsupported } from "./f02.mjs";
|
|
4
|
+
/** Null/absent read hierarchies are not evidence of an explicit empty list. */
|
|
5
|
+
export function explicitTaxIds(value, level) {
|
|
6
|
+
const parsed = z.array(taxRate).max(20).safeParse(value);
|
|
7
|
+
if (!parsed.success) unsupported(`unproven_${level}_tax_hierarchy`);
|
|
8
|
+
return parsed.data.map((tax) => tax.id);
|
|
9
|
+
}
|
|
10
|
+
export function preserveTaxLevels(original, phaseTax, phaseItemTax) {
|
|
11
|
+
const phase = explicitTaxIds(phaseTax, "phase_default");
|
|
12
|
+
const item = explicitTaxIds(phaseItemTax, "phase_item");
|
|
13
|
+
if (!equal(original.subscription, phase))
|
|
14
|
+
unsupported("phase_default_tax_retention_mismatch");
|
|
15
|
+
// An empty item array means no item override. Its subscription/phase default
|
|
16
|
+
// applies instead. Equal current totals cannot authorize changing that level.
|
|
17
|
+
if (original.item.length > 0 !== item.length > 0)
|
|
18
|
+
unsupported("item_tax_override_level_changed");
|
|
19
|
+
if (!equal(original.item, item)) unsupported("item_tax_retention_mismatch");
|
|
20
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { renewalSnapshot } from "./f10.mjs";
|
|
3
|
+
import { taxRate } from "./f08.mjs";
|
|
4
|
+
const inputSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
effectiveAutomaticTax: z.boolean(),
|
|
7
|
+
livemode: z.boolean(),
|
|
8
|
+
settings: z
|
|
9
|
+
.object({
|
|
10
|
+
billing_thresholds: z.null(),
|
|
11
|
+
tax_rates: z.array(taxRate).max(20).nullable().optional(),
|
|
12
|
+
metadata: z
|
|
13
|
+
.record(z.string().max(40), z.string().min(1).max(500))
|
|
14
|
+
.nullable(),
|
|
15
|
+
})
|
|
16
|
+
.strict(),
|
|
17
|
+
})
|
|
18
|
+
.strict();
|
|
19
|
+
/** Field projection only. The assembler must derive effective tax from defaults. */
|
|
20
|
+
export function projectRenewalItemSettings(input) {
|
|
21
|
+
let args;
|
|
22
|
+
try {
|
|
23
|
+
args = inputSchema.parse(renewalSnapshot(input));
|
|
24
|
+
} catch {
|
|
25
|
+
return { status: "unsupported", reason: "unsupported_item_settings" };
|
|
26
|
+
}
|
|
27
|
+
const { settings: source } = args;
|
|
28
|
+
if (
|
|
29
|
+
(args.effectiveAutomaticTax && source.tax_rates?.length) ||
|
|
30
|
+
source.tax_rates?.some((tax) => tax.livemode !== args.livemode)
|
|
31
|
+
)
|
|
32
|
+
return { status: "unsupported", reason: "incompatible_item_tax" };
|
|
33
|
+
const settings = {};
|
|
34
|
+
if (source.tax_rates != null)
|
|
35
|
+
settings.tax_rates = source.tax_rates.length
|
|
36
|
+
? source.tax_rates.map((tax) => tax.id)
|
|
37
|
+
: "";
|
|
38
|
+
if (source.metadata !== null && Object.keys(source.metadata).length)
|
|
39
|
+
settings.metadata = source.metadata;
|
|
40
|
+
return { status: "projected", settings, requiresProviderQualification: true };
|
|
41
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { renewalSnapshot } from "./f10.mjs";
|
|
2
|
+
import { settingsInput } from "./f08.mjs";
|
|
3
|
+
const identity = (ref) => (typeof ref === "string" ? ref : ref.id);
|
|
4
|
+
/**
|
|
5
|
+
* Map only the named fields of a provider phase. The aggregate assembler must
|
|
6
|
+
* correlate context with its full acknowledged schedule and unchanged defaults.
|
|
7
|
+
* A projection is neither a complete phase nor evidence of provider retention.
|
|
8
|
+
*/
|
|
9
|
+
export function projectRenewalPhaseSettings(input) {
|
|
10
|
+
let args;
|
|
11
|
+
try {
|
|
12
|
+
args = settingsInput.parse(renewalSnapshot(input));
|
|
13
|
+
} catch {
|
|
14
|
+
return { status: "unsupported", reason: "unsupported_phase_settings" };
|
|
15
|
+
}
|
|
16
|
+
const { settings: source, context } = args;
|
|
17
|
+
const failure = (reason) => ({
|
|
18
|
+
status: "unsupported",
|
|
19
|
+
reason,
|
|
20
|
+
});
|
|
21
|
+
const referenceMatches = (ref) => {
|
|
22
|
+
if (ref == null || typeof ref === "string") return true;
|
|
23
|
+
const customer = ref.customer;
|
|
24
|
+
if (
|
|
25
|
+
typeof customer === "object" &&
|
|
26
|
+
customer !== null &&
|
|
27
|
+
((customer.livemode !== undefined &&
|
|
28
|
+
customer.livemode !== context.livemode) ||
|
|
29
|
+
(customer.customer_account !== undefined &&
|
|
30
|
+
customer.customer_account !== context.customerAccountId))
|
|
31
|
+
)
|
|
32
|
+
return false;
|
|
33
|
+
return (
|
|
34
|
+
(ref.livemode === undefined || ref.livemode === context.livemode) &&
|
|
35
|
+
(ref.customer_account == null ||
|
|
36
|
+
ref.customer_account === context.customerAccountId) &&
|
|
37
|
+
(customer == null || identity(customer) === context.customerId)
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
const references = [
|
|
41
|
+
source.default_payment_method,
|
|
42
|
+
source.on_behalf_of,
|
|
43
|
+
source.transfer_data?.destination,
|
|
44
|
+
...(source.invoice_settings?.account_tax_ids ?? []),
|
|
45
|
+
...(source.default_tax_rates ?? []),
|
|
46
|
+
source.automatic_tax?.liability?.account,
|
|
47
|
+
source.invoice_settings?.issuer?.account,
|
|
48
|
+
];
|
|
49
|
+
if (!references.every(referenceMatches))
|
|
50
|
+
return failure("foreign_setting_reference");
|
|
51
|
+
const issuerIdentity = (issuer) =>
|
|
52
|
+
issuer.type === "self" ? "self" : identity(issuer.account);
|
|
53
|
+
if (
|
|
54
|
+
source.invoice_settings?.issuer != null &&
|
|
55
|
+
issuerIdentity(source.invoice_settings.issuer) !==
|
|
56
|
+
issuerIdentity(context.effectiveInvoiceIssuer)
|
|
57
|
+
)
|
|
58
|
+
return failure("invoice_issuer_mismatch");
|
|
59
|
+
for (const taxId of source.invoice_settings?.account_tax_ids ?? []) {
|
|
60
|
+
if (typeof taxId === "string") continue;
|
|
61
|
+
const owner = taxId.owner;
|
|
62
|
+
if (
|
|
63
|
+
issuerIdentity(owner) !==
|
|
64
|
+
issuerIdentity(context.effectiveInvoiceIssuer) ||
|
|
65
|
+
(owner.type === "account" && !referenceMatches(owner.account))
|
|
66
|
+
)
|
|
67
|
+
return failure("foreign_invoice_tax_owner");
|
|
68
|
+
}
|
|
69
|
+
if (
|
|
70
|
+
source.collection_method != null &&
|
|
71
|
+
source.collection_method !== context.effectiveCollectionMethod
|
|
72
|
+
)
|
|
73
|
+
return failure("collection_method_mismatch");
|
|
74
|
+
if (
|
|
75
|
+
source.automatic_tax !== undefined &&
|
|
76
|
+
source.automatic_tax.enabled !== context.effectiveAutomaticTax
|
|
77
|
+
)
|
|
78
|
+
return failure("automatic_tax_mismatch");
|
|
79
|
+
if (context.effectiveAutomaticTax && source.default_tax_rates?.length)
|
|
80
|
+
return failure("automatic_and_manual_tax");
|
|
81
|
+
const out = {};
|
|
82
|
+
if (source.collection_method !== null)
|
|
83
|
+
out.collection_method = source.collection_method;
|
|
84
|
+
if (source.default_payment_method !== null)
|
|
85
|
+
out.default_payment_method = identity(source.default_payment_method);
|
|
86
|
+
if (source.on_behalf_of !== null)
|
|
87
|
+
out.on_behalf_of = identity(source.on_behalf_of);
|
|
88
|
+
if (source.transfer_data !== null) {
|
|
89
|
+
out.transfer_data = {
|
|
90
|
+
destination: identity(source.transfer_data.destination),
|
|
91
|
+
};
|
|
92
|
+
if (source.transfer_data.amount_percent !== null)
|
|
93
|
+
out.transfer_data.amount_percent = source.transfer_data.amount_percent;
|
|
94
|
+
}
|
|
95
|
+
const mapIssuer = (issuer) =>
|
|
96
|
+
issuer?.type === "account"
|
|
97
|
+
? { type: "account", account: identity(issuer.account) }
|
|
98
|
+
: { type: "self" };
|
|
99
|
+
if (source.automatic_tax !== undefined) {
|
|
100
|
+
out.automatic_tax = { enabled: source.automatic_tax.enabled };
|
|
101
|
+
if (source.automatic_tax.liability != null)
|
|
102
|
+
out.automatic_tax.liability = mapIssuer(source.automatic_tax.liability);
|
|
103
|
+
}
|
|
104
|
+
if (source.default_tax_rates != null)
|
|
105
|
+
out.default_tax_rates = source.default_tax_rates.length
|
|
106
|
+
? source.default_tax_rates.map(identity)
|
|
107
|
+
: "";
|
|
108
|
+
const invoice = source.invoice_settings;
|
|
109
|
+
if (invoice !== null) {
|
|
110
|
+
const mapped = {};
|
|
111
|
+
if (invoice.account_tax_ids !== null)
|
|
112
|
+
mapped.account_tax_ids = invoice.account_tax_ids.length
|
|
113
|
+
? invoice.account_tax_ids.map(identity)
|
|
114
|
+
: "";
|
|
115
|
+
if (invoice.custom_fields !== null)
|
|
116
|
+
mapped.custom_fields = invoice.custom_fields.length
|
|
117
|
+
? invoice.custom_fields.map(({ name, value }) => ({ name, value }))
|
|
118
|
+
: "";
|
|
119
|
+
if (invoice.issuer !== null) mapped.issuer = mapIssuer(invoice.issuer);
|
|
120
|
+
if (invoice.days_until_due !== null) {
|
|
121
|
+
if (context.effectiveCollectionMethod !== "send_invoice")
|
|
122
|
+
return failure("incompatible_invoice_due_days");
|
|
123
|
+
mapped.days_until_due = invoice.days_until_due;
|
|
124
|
+
}
|
|
125
|
+
if (invoice.description !== null) mapped.description = invoice.description;
|
|
126
|
+
if (invoice.footer !== null) mapped.footer = invoice.footer;
|
|
127
|
+
if (Object.keys(mapped).length) out.invoice_settings = mapped;
|
|
128
|
+
}
|
|
129
|
+
if (source.description !== null) out.description = source.description;
|
|
130
|
+
if (source.metadata !== null && Object.keys(source.metadata).length)
|
|
131
|
+
out.metadata = source.metadata;
|
|
132
|
+
return {
|
|
133
|
+
status: "projected",
|
|
134
|
+
settings: out,
|
|
135
|
+
requiresProviderQualification: true,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const id = (prefix) =>
|
|
3
|
+
z
|
|
4
|
+
.string()
|
|
5
|
+
.max(255)
|
|
6
|
+
.regex(new RegExp(`^${prefix}_[A-Za-z0-9_]+$`));
|
|
7
|
+
export const reference = (prefix, object) =>
|
|
8
|
+
z.union([
|
|
9
|
+
id(prefix),
|
|
10
|
+
z
|
|
11
|
+
.object({
|
|
12
|
+
id: id(prefix),
|
|
13
|
+
object: z.literal(object),
|
|
14
|
+
deleted: z.literal(false).optional(),
|
|
15
|
+
livemode: z.boolean().optional(),
|
|
16
|
+
customer: z
|
|
17
|
+
.union([
|
|
18
|
+
id("cus"),
|
|
19
|
+
z
|
|
20
|
+
.object({
|
|
21
|
+
id: id("cus"),
|
|
22
|
+
object: z.literal("customer"),
|
|
23
|
+
deleted: z.literal(false).optional(),
|
|
24
|
+
livemode: z.boolean().optional(),
|
|
25
|
+
customer_account: id("acct").nullable().optional(),
|
|
26
|
+
})
|
|
27
|
+
.passthrough(),
|
|
28
|
+
])
|
|
29
|
+
.nullable()
|
|
30
|
+
.optional(),
|
|
31
|
+
customer_account: id("acct").nullable().optional(),
|
|
32
|
+
})
|
|
33
|
+
.passthrough(),
|
|
34
|
+
]);
|
|
35
|
+
const account = reference("acct", "account");
|
|
36
|
+
const issuer = z.discriminatedUnion("type", [
|
|
37
|
+
z.object({ type: z.literal("self"), account: z.null().optional() }).strict(),
|
|
38
|
+
z.object({ type: z.literal("account"), account }).strict(),
|
|
39
|
+
]);
|
|
40
|
+
const invoiceTaxId = z.union([
|
|
41
|
+
id("txi"),
|
|
42
|
+
z
|
|
43
|
+
.object({
|
|
44
|
+
id: id("txi"),
|
|
45
|
+
object: z.literal("tax_id"),
|
|
46
|
+
deleted: z.literal(false).optional(),
|
|
47
|
+
livemode: z.boolean(),
|
|
48
|
+
customer: z.null().optional(),
|
|
49
|
+
customer_account: z.null().optional(),
|
|
50
|
+
owner: z.discriminatedUnion("type", [
|
|
51
|
+
z
|
|
52
|
+
.object({
|
|
53
|
+
type: z.literal("self"),
|
|
54
|
+
customer_account: z.null(),
|
|
55
|
+
account: z.null().optional(),
|
|
56
|
+
customer: z.null().optional(),
|
|
57
|
+
})
|
|
58
|
+
.strict(),
|
|
59
|
+
z
|
|
60
|
+
.object({
|
|
61
|
+
type: z.literal("account"),
|
|
62
|
+
account,
|
|
63
|
+
customer_account: z.null(),
|
|
64
|
+
customer: z.null().optional(),
|
|
65
|
+
})
|
|
66
|
+
.strict(),
|
|
67
|
+
]),
|
|
68
|
+
})
|
|
69
|
+
.passthrough(),
|
|
70
|
+
]);
|
|
71
|
+
export const taxRate = z
|
|
72
|
+
.object({
|
|
73
|
+
id: id("txr"),
|
|
74
|
+
object: z.literal("tax_rate"),
|
|
75
|
+
deleted: z.literal(false).optional(),
|
|
76
|
+
livemode: z.boolean(),
|
|
77
|
+
})
|
|
78
|
+
.passthrough();
|
|
79
|
+
const string = z.string().max(5000);
|
|
80
|
+
export const settingsInput = z
|
|
81
|
+
.object({
|
|
82
|
+
context: z
|
|
83
|
+
.object({
|
|
84
|
+
customerAccountId: id("acct"),
|
|
85
|
+
customerId: id("cus"),
|
|
86
|
+
livemode: z.boolean(),
|
|
87
|
+
effectiveCollectionMethod: z.enum([
|
|
88
|
+
"charge_automatically",
|
|
89
|
+
"send_invoice",
|
|
90
|
+
]),
|
|
91
|
+
effectiveAutomaticTax: z.boolean(),
|
|
92
|
+
effectiveInvoiceIssuer: issuer,
|
|
93
|
+
})
|
|
94
|
+
.strict(),
|
|
95
|
+
settings: z
|
|
96
|
+
.object({
|
|
97
|
+
application_fee_percent: z.null(),
|
|
98
|
+
billing_thresholds: z.null(),
|
|
99
|
+
collection_method: z
|
|
100
|
+
.enum(["charge_automatically", "send_invoice"])
|
|
101
|
+
.nullable(),
|
|
102
|
+
default_payment_method: reference("pm", "payment_method").nullable(),
|
|
103
|
+
on_behalf_of: account.nullable(),
|
|
104
|
+
transfer_data: z
|
|
105
|
+
.object({
|
|
106
|
+
destination: account,
|
|
107
|
+
amount_percent: z
|
|
108
|
+
.number()
|
|
109
|
+
.min(0)
|
|
110
|
+
.max(100)
|
|
111
|
+
.multipleOf(0.01)
|
|
112
|
+
.nullable(),
|
|
113
|
+
})
|
|
114
|
+
.strict()
|
|
115
|
+
.nullable(),
|
|
116
|
+
automatic_tax: z
|
|
117
|
+
.object({
|
|
118
|
+
enabled: z.boolean(),
|
|
119
|
+
liability: issuer.nullable().optional(),
|
|
120
|
+
disabled_reason: z.null().optional(),
|
|
121
|
+
})
|
|
122
|
+
.strict()
|
|
123
|
+
.optional(),
|
|
124
|
+
default_tax_rates: z.array(taxRate).max(20).nullable().optional(),
|
|
125
|
+
invoice_settings: z
|
|
126
|
+
.object({
|
|
127
|
+
account_tax_ids: z.array(invoiceTaxId).max(20).nullable(),
|
|
128
|
+
custom_fields: z
|
|
129
|
+
.array(
|
|
130
|
+
z
|
|
131
|
+
.object({
|
|
132
|
+
name: z.string().max(40),
|
|
133
|
+
value: z.string().max(140),
|
|
134
|
+
})
|
|
135
|
+
.strict(),
|
|
136
|
+
)
|
|
137
|
+
.max(4)
|
|
138
|
+
.nullable(),
|
|
139
|
+
days_until_due: z.number().int().nonnegative().max(3650).nullable(),
|
|
140
|
+
description: string.nullable(),
|
|
141
|
+
footer: string.nullable(),
|
|
142
|
+
issuer: issuer.nullable(),
|
|
143
|
+
})
|
|
144
|
+
.strict()
|
|
145
|
+
.nullable(),
|
|
146
|
+
description: string.nullable(),
|
|
147
|
+
metadata: z
|
|
148
|
+
.record(z.string().max(40), z.string().min(1).max(500))
|
|
149
|
+
.nullable(),
|
|
150
|
+
})
|
|
151
|
+
.strict(),
|
|
152
|
+
})
|
|
153
|
+
.strict();
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const id = (prefix) =>
|
|
3
|
+
z
|
|
4
|
+
.string()
|
|
5
|
+
.max(255)
|
|
6
|
+
.regex(new RegExp(`^${prefix}_[A-Za-z0-9_]+$`));
|
|
7
|
+
const integer = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
8
|
+
// Stripe allows caller-supplied product IDs, including IDs without prod_.
|
|
9
|
+
const productId = z.string().min(1).max(255).regex(/\S/);
|
|
10
|
+
const product = z.union([
|
|
11
|
+
productId,
|
|
12
|
+
z
|
|
13
|
+
.object({
|
|
14
|
+
id: productId,
|
|
15
|
+
object: z.literal("product"),
|
|
16
|
+
deleted: z.literal(false).optional(),
|
|
17
|
+
})
|
|
18
|
+
.passthrough(),
|
|
19
|
+
]);
|
|
20
|
+
export const renewalPrice = z
|
|
21
|
+
.object({
|
|
22
|
+
id: id("price"),
|
|
23
|
+
object: z.literal("price"),
|
|
24
|
+
product,
|
|
25
|
+
active: z.boolean(),
|
|
26
|
+
livemode: z.boolean(),
|
|
27
|
+
type: z.literal("recurring"),
|
|
28
|
+
currency: z.string().regex(/^[a-z]{3}$/),
|
|
29
|
+
billing_scheme: z.literal("per_unit"),
|
|
30
|
+
recurring: z
|
|
31
|
+
.object({
|
|
32
|
+
interval: z.enum(["day", "week", "month", "year"]),
|
|
33
|
+
interval_count: integer,
|
|
34
|
+
usage_type: z.literal("licensed"),
|
|
35
|
+
})
|
|
36
|
+
.passthrough(),
|
|
37
|
+
})
|
|
38
|
+
.passthrough();
|
|
39
|
+
export const renewalExpected = z
|
|
40
|
+
.object({
|
|
41
|
+
customerAccountId: id("acct"),
|
|
42
|
+
subscriptionId: id("sub"),
|
|
43
|
+
itemId: id("si"),
|
|
44
|
+
currentPriceId: id("price"),
|
|
45
|
+
currentProductId: productId,
|
|
46
|
+
targetPriceId: id("price"),
|
|
47
|
+
targetProductId: productId,
|
|
48
|
+
periodStart: integer,
|
|
49
|
+
periodEnd: integer,
|
|
50
|
+
livemode: z.boolean(),
|
|
51
|
+
})
|
|
52
|
+
.strict()
|
|
53
|
+
.refine((v) => v.periodEnd > v.periodStart, "Invalid original period.");
|
|
54
|
+
export const renewalSubscription = z
|
|
55
|
+
.object({
|
|
56
|
+
id: id("sub"),
|
|
57
|
+
object: z.literal("subscription"),
|
|
58
|
+
customer_account: id("acct"),
|
|
59
|
+
status: z.literal("active"),
|
|
60
|
+
currency: z.string().regex(/^[a-z]{3}$/),
|
|
61
|
+
livemode: z.boolean(),
|
|
62
|
+
schedule: z.null(),
|
|
63
|
+
cancel_at: z.null(),
|
|
64
|
+
cancel_at_period_end: z.literal(false),
|
|
65
|
+
pause_collection: z.null(),
|
|
66
|
+
pending_update: z.null(),
|
|
67
|
+
default_source: z.null(),
|
|
68
|
+
application_fee_percent: z.null(),
|
|
69
|
+
payment_settings: z.union([
|
|
70
|
+
z.null(),
|
|
71
|
+
z
|
|
72
|
+
.object({
|
|
73
|
+
payment_method_options: z.null(),
|
|
74
|
+
payment_method_types: z.null(),
|
|
75
|
+
save_default_payment_method: z.literal("off").nullable(),
|
|
76
|
+
})
|
|
77
|
+
.strict(),
|
|
78
|
+
]),
|
|
79
|
+
billing_schedules: z.array(z.unknown()).length(0).optional(),
|
|
80
|
+
items: z
|
|
81
|
+
.object({
|
|
82
|
+
has_more: z.literal(false),
|
|
83
|
+
data: z.tuple([
|
|
84
|
+
z
|
|
85
|
+
.object({
|
|
86
|
+
id: id("si"),
|
|
87
|
+
object: z.literal("subscription_item"),
|
|
88
|
+
subscription: id("sub"),
|
|
89
|
+
current_period_start: integer,
|
|
90
|
+
current_period_end: integer,
|
|
91
|
+
quantity: integer,
|
|
92
|
+
price: renewalPrice,
|
|
93
|
+
})
|
|
94
|
+
.passthrough(),
|
|
95
|
+
]),
|
|
96
|
+
})
|
|
97
|
+
.passthrough(),
|
|
98
|
+
})
|
|
99
|
+
.passthrough();
|
|
100
|
+
export const renewalBillingCustomer = z
|
|
101
|
+
.object({
|
|
102
|
+
id: id("cus"),
|
|
103
|
+
object: z.literal("customer"),
|
|
104
|
+
customer_account: id("acct"),
|
|
105
|
+
livemode: z.boolean(),
|
|
106
|
+
deleted: z.literal(false).optional(),
|
|
107
|
+
discount: z.union([
|
|
108
|
+
z.null(),
|
|
109
|
+
z
|
|
110
|
+
.object({
|
|
111
|
+
id: id("di"),
|
|
112
|
+
object: z.literal("discount"),
|
|
113
|
+
deleted: z.literal(false).optional(),
|
|
114
|
+
})
|
|
115
|
+
.passthrough(),
|
|
116
|
+
]),
|
|
117
|
+
})
|
|
118
|
+
.passthrough();
|
|
119
|
+
export const renewalPreparationInput = z
|
|
120
|
+
.object({
|
|
121
|
+
subscription: z.unknown(),
|
|
122
|
+
targetPrice: z.unknown(),
|
|
123
|
+
billingCustomer: z.unknown().optional(),
|
|
124
|
+
expected: renewalExpected,
|
|
125
|
+
key: z.string(),
|
|
126
|
+
})
|
|
127
|
+
.strict();
|