@fantastic.dev/better-stripe 0.89.0 → 0.90.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 +6 -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/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 +24 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +113 -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 +7 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +130 -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/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/connect/payoutExecutionTestHelpers.d.ts +16 -16
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +32 -32
- package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
- package/dist/component/financialObservations/settlementHelpers.d.ts +3 -3
- package/dist/component/usage/allowance.fixtures.d.ts +16 -16
- package/dist/component/usageCredits/accounting.fixtures.d.ts +16 -16
- package/docs/renewal-context-reads.md +28 -0
- package/docs/renewal-phase-assembly.md +23 -0
- package/docs/renewal-raw-acquisition.md +64 -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/raw-acquisition.test.js +418 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +160 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawCouponJoins.ts +110 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +156 -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/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
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
// New raw definitions, instantiated before D6/C1; never calls V4 graph factory.
|
|
2
|
+
import { INTENT as I } from "./f25.mjs";
|
|
3
|
+
import { declaredConfigureWire } from "./f29.mjs";
|
|
4
|
+
import { fixture as native } from "./f28.mjs";
|
|
5
|
+
import { invoice as invoiceBase } from "./f26.mjs";
|
|
6
|
+
import { line as lineBase } from "./f27.mjs";
|
|
7
|
+
import { roles } from "./f21.mjs";
|
|
8
|
+
const copy = (x) => structuredClone(x);
|
|
9
|
+
const freeze = (x) => {
|
|
10
|
+
if (x && typeof x === "object") {
|
|
11
|
+
for (const v of Object.values(x)) freeze(v);
|
|
12
|
+
Object.freeze(x);
|
|
13
|
+
}
|
|
14
|
+
return x;
|
|
15
|
+
};
|
|
16
|
+
const side = (s) =>
|
|
17
|
+
s === "S"
|
|
18
|
+
? { sub: I.SUB_SCHEDULED, item: I.ITEM_SCHEDULED }
|
|
19
|
+
: { sub: I.SUB_CONTROL, item: I.ITEM_CONTROL };
|
|
20
|
+
function product(role) {
|
|
21
|
+
return {
|
|
22
|
+
id: I["PRODUCT_" + role.toUpperCase()],
|
|
23
|
+
object: "product",
|
|
24
|
+
active: true,
|
|
25
|
+
livemode: false,
|
|
26
|
+
name: I.O + ":" + role,
|
|
27
|
+
metadata: { sdkQualificationRun: I.O, role },
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function price(role) {
|
|
31
|
+
return {
|
|
32
|
+
id: I["PRICE_" + role.toUpperCase()],
|
|
33
|
+
object: "price",
|
|
34
|
+
type: "recurring",
|
|
35
|
+
active: true,
|
|
36
|
+
unit_amount: I.amounts[role].integer,
|
|
37
|
+
unit_amount_decimal: I.amounts[role].decimal,
|
|
38
|
+
billing_scheme: "per_unit",
|
|
39
|
+
created: 0,
|
|
40
|
+
currency: "usd",
|
|
41
|
+
livemode: false,
|
|
42
|
+
metadata: { sdkQualificationRun: I.O, role },
|
|
43
|
+
nickname: null,
|
|
44
|
+
product: I["PRODUCT_" + role.toUpperCase()],
|
|
45
|
+
tiers_mode: null,
|
|
46
|
+
transform_quantity: null,
|
|
47
|
+
recurring: {
|
|
48
|
+
interval: "month",
|
|
49
|
+
interval_count: 1,
|
|
50
|
+
usage_type: "licensed",
|
|
51
|
+
meter: null,
|
|
52
|
+
trial_period_days: null,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function plan(p) {
|
|
57
|
+
return {
|
|
58
|
+
id: p.id,
|
|
59
|
+
object: "plan",
|
|
60
|
+
active: p.active,
|
|
61
|
+
amount: p.unit_amount,
|
|
62
|
+
amount_decimal: p.unit_amount_decimal,
|
|
63
|
+
billing_scheme: p.billing_scheme,
|
|
64
|
+
created: p.created,
|
|
65
|
+
currency: p.currency,
|
|
66
|
+
interval: p.recurring.interval,
|
|
67
|
+
interval_count: p.recurring.interval_count,
|
|
68
|
+
livemode: p.livemode,
|
|
69
|
+
metadata: copy(p.metadata),
|
|
70
|
+
meter: p.recurring.meter,
|
|
71
|
+
nickname: p.nickname,
|
|
72
|
+
product: p.product,
|
|
73
|
+
tiers_mode: p.tiers_mode,
|
|
74
|
+
transform_usage: p.transform_quantity,
|
|
75
|
+
trial_period_days: p.recurring.trial_period_days,
|
|
76
|
+
usage_type: p.recurring.usage_type,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function coupon(kind) {
|
|
80
|
+
return {
|
|
81
|
+
id: I["COUPON_" + kind.toUpperCase()],
|
|
82
|
+
object: "coupon",
|
|
83
|
+
created: 0,
|
|
84
|
+
livemode: false,
|
|
85
|
+
duration: "forever",
|
|
86
|
+
duration_in_months: null,
|
|
87
|
+
amount_off: null,
|
|
88
|
+
currency: null,
|
|
89
|
+
percent_off: I.percentOff[kind],
|
|
90
|
+
applies_to: { products: [I.PRODUCT_ORIGINAL, I.PRODUCT_TARGET] },
|
|
91
|
+
max_redemptions: null,
|
|
92
|
+
redeem_by: null,
|
|
93
|
+
times_redeemed: 2,
|
|
94
|
+
valid: true,
|
|
95
|
+
metadata: { sdkQualificationRun: I.O, role: kind },
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function discount(s, kind) {
|
|
99
|
+
const ids = side(s);
|
|
100
|
+
return {
|
|
101
|
+
id: I["DISCOUNT_" + s + "_" + (kind === "subscription" ? "SUB" : "ITEM")],
|
|
102
|
+
object: "discount",
|
|
103
|
+
checkout_session: null,
|
|
104
|
+
customer: I.MIRROR,
|
|
105
|
+
customer_account: I.BUYER,
|
|
106
|
+
end: null,
|
|
107
|
+
invoice: null,
|
|
108
|
+
invoice_item: null,
|
|
109
|
+
promotion_code: null,
|
|
110
|
+
source: { type: "coupon", coupon: coupon(kind) },
|
|
111
|
+
start: 0,
|
|
112
|
+
subscription: kind === "subscription" ? ids.sub : null,
|
|
113
|
+
subscription_item: kind === "item" ? ids.item : null,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function invoice(s, n) {
|
|
117
|
+
const ids = side(s),
|
|
118
|
+
p = price(s === "S" && n === 1 ? "target" : "original"),
|
|
119
|
+
sd = discount(s, "subscription"),
|
|
120
|
+
di = discount(s, "item"),
|
|
121
|
+
identifier =
|
|
122
|
+
I["INVOICE_" + (s === "S" ? "SCHEDULED" : "CONTROL") + "_" + n];
|
|
123
|
+
const line = {
|
|
124
|
+
...lineBase(),
|
|
125
|
+
id: I["LINE_" + (s === "S" ? "SCHEDULED" : "CONTROL") + "_" + n],
|
|
126
|
+
invoice: identifier,
|
|
127
|
+
subscription: ids.sub,
|
|
128
|
+
discounts: [sd.id, di.id],
|
|
129
|
+
discount_amounts: [{ discount: di.id, amount: 1 }],
|
|
130
|
+
pretax_credit_amounts: [{ type: "discount", discount: sd.id, amount: 1 }],
|
|
131
|
+
parent: {
|
|
132
|
+
type: "subscription_item_details",
|
|
133
|
+
invoice_item_details: null,
|
|
134
|
+
subscription_item_details: {
|
|
135
|
+
invoice_item: null,
|
|
136
|
+
proration: false,
|
|
137
|
+
proration_details: null,
|
|
138
|
+
subscription: ids.sub,
|
|
139
|
+
subscription_item: ids.item,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
period: { start: n === 0 ? I.T0 : I.T1, end: n === 0 ? I.T1 : I.T2 },
|
|
143
|
+
pricing: {
|
|
144
|
+
type: "price_details",
|
|
145
|
+
price_details: { price: p.id, product: p.product },
|
|
146
|
+
unit_amount_decimal: p.unit_amount_decimal,
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
return {
|
|
150
|
+
...invoiceBase(),
|
|
151
|
+
id: identifier,
|
|
152
|
+
customer: I.MIRROR,
|
|
153
|
+
customer_account: I.BUYER,
|
|
154
|
+
test_clock: I.CLOCK,
|
|
155
|
+
discounts: [sd, di],
|
|
156
|
+
currency: "usd",
|
|
157
|
+
billing_reason: n === 0 ? "subscription_create" : "subscription_cycle",
|
|
158
|
+
total_discount_amounts: [{ discount: di.id, amount: 1 }],
|
|
159
|
+
total_pretax_credit_amounts: [
|
|
160
|
+
{ type: "discount", discount: sd.id, amount: 1 },
|
|
161
|
+
],
|
|
162
|
+
parent: {
|
|
163
|
+
type: "subscription_details",
|
|
164
|
+
quote_details: null,
|
|
165
|
+
subscription_details: { subscription: ids.sub, metadata: {} },
|
|
166
|
+
},
|
|
167
|
+
lines: { object: "list", has_more: false, data: [line] },
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function substitute(x) {
|
|
171
|
+
if (typeof x === "string") {
|
|
172
|
+
if (x.startsWith("$O:")) return I.O + x.slice(2);
|
|
173
|
+
if (x.startsWith("$")) {
|
|
174
|
+
if (!Object.hasOwn(I, x.slice(1)))
|
|
175
|
+
throw Error("UNDECLARED_INTENT_SYMBOL");
|
|
176
|
+
return copy(I[x.slice(1)]);
|
|
177
|
+
}
|
|
178
|
+
return x;
|
|
179
|
+
}
|
|
180
|
+
if (Array.isArray(x)) return x.map(substitute);
|
|
181
|
+
return x && typeof x === "object"
|
|
182
|
+
? Object.fromEntries(Object.entries(x).map(([k, v]) => [k, substitute(v)]))
|
|
183
|
+
: x;
|
|
184
|
+
}
|
|
185
|
+
export function instantiateRequired() {
|
|
186
|
+
return instantiate(false);
|
|
187
|
+
}
|
|
188
|
+
export function instantiateOptional() {
|
|
189
|
+
return instantiate(true);
|
|
190
|
+
}
|
|
191
|
+
function instantiate(optional) {
|
|
192
|
+
const p = price("original"),
|
|
193
|
+
target = price("target"),
|
|
194
|
+
full = native({
|
|
195
|
+
start: I.T0,
|
|
196
|
+
end: I.T1,
|
|
197
|
+
observedAt: I.OBSERVED,
|
|
198
|
+
subscription: {
|
|
199
|
+
test_clock: I.CLOCK,
|
|
200
|
+
latest_invoice: I.INVOICE_SCHEDULED_0,
|
|
201
|
+
default_payment_method: I.PM_RETURNED,
|
|
202
|
+
billing_mode: copy(I.billingMode),
|
|
203
|
+
metadata: { sdkQualificationRun: I.O, role: "scheduled" },
|
|
204
|
+
discounts: [discount("S", "subscription")],
|
|
205
|
+
},
|
|
206
|
+
item: {
|
|
207
|
+
quantity: 1,
|
|
208
|
+
price: p,
|
|
209
|
+
plan: plan(p),
|
|
210
|
+
discounts: [discount("S", "item")],
|
|
211
|
+
},
|
|
212
|
+
target,
|
|
213
|
+
phaseItem: { quantity: 1 },
|
|
214
|
+
defaults: { default_payment_method: I.PM_RETURNED },
|
|
215
|
+
customer: { test_clock: I.CLOCK },
|
|
216
|
+
schedule: { test_clock: I.CLOCK },
|
|
217
|
+
});
|
|
218
|
+
const sub = copy(full.subscription),
|
|
219
|
+
customer = copy(full.billingCustomer),
|
|
220
|
+
schedule = copy(full.schedule),
|
|
221
|
+
control = {
|
|
222
|
+
...copy(sub),
|
|
223
|
+
id: I.SUB_CONTROL,
|
|
224
|
+
latest_invoice: I.INVOICE_CONTROL_0,
|
|
225
|
+
metadata: { sdkQualificationRun: I.O, role: "control" },
|
|
226
|
+
discounts: [discount("C", "subscription")],
|
|
227
|
+
items: {
|
|
228
|
+
...copy(sub.items),
|
|
229
|
+
data: [
|
|
230
|
+
{
|
|
231
|
+
...copy(sub.items.data[0]),
|
|
232
|
+
id: I.ITEM_CONTROL,
|
|
233
|
+
subscription: I.SUB_CONTROL,
|
|
234
|
+
discounts: [discount("C", "item")],
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
const targetPhase = {
|
|
240
|
+
...copy(schedule.phases[0]),
|
|
241
|
+
start_date: I.T1,
|
|
242
|
+
end_date: I.T2,
|
|
243
|
+
proration_behavior: "none",
|
|
244
|
+
billing_cycle_anchor: "automatic",
|
|
245
|
+
items: [
|
|
246
|
+
{
|
|
247
|
+
...copy(schedule.phases[0].items[0]),
|
|
248
|
+
price: I.PRICE_TARGET,
|
|
249
|
+
plan: I.PRICE_TARGET,
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
},
|
|
253
|
+
configured = {
|
|
254
|
+
...copy(schedule),
|
|
255
|
+
phases: [copy(schedule.phases[0]), targetPhase],
|
|
256
|
+
};
|
|
257
|
+
const activeSub = {
|
|
258
|
+
...copy(sub),
|
|
259
|
+
latest_invoice: I.INVOICE_SCHEDULED_1,
|
|
260
|
+
schedule: I.SCHEDULE,
|
|
261
|
+
items: {
|
|
262
|
+
...copy(sub.items),
|
|
263
|
+
data: [
|
|
264
|
+
{
|
|
265
|
+
...copy(sub.items.data[0]),
|
|
266
|
+
price: target,
|
|
267
|
+
plan: plan(target),
|
|
268
|
+
current_period_start: I.T1,
|
|
269
|
+
current_period_end: I.T2,
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
activeControl = {
|
|
275
|
+
...copy(control),
|
|
276
|
+
latest_invoice: I.INVOICE_CONTROL_1,
|
|
277
|
+
items: {
|
|
278
|
+
...copy(control.items),
|
|
279
|
+
data: [
|
|
280
|
+
{
|
|
281
|
+
...copy(control.items.data[0]),
|
|
282
|
+
current_period_start: I.T1,
|
|
283
|
+
current_period_end: I.T2,
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
const clock = {
|
|
289
|
+
id: I.CLOCK,
|
|
290
|
+
object: "test_helpers.test_clock",
|
|
291
|
+
created: 0,
|
|
292
|
+
deletes_after: 1000,
|
|
293
|
+
frozen_time: I.T0,
|
|
294
|
+
livemode: false,
|
|
295
|
+
name: I.O,
|
|
296
|
+
status: "ready",
|
|
297
|
+
status_details: {},
|
|
298
|
+
},
|
|
299
|
+
buyer = {
|
|
300
|
+
id: I.BUYER,
|
|
301
|
+
object: "v2.core.account",
|
|
302
|
+
livemode: false,
|
|
303
|
+
closed: false,
|
|
304
|
+
metadata: { bts305_bridge_owner: I.O },
|
|
305
|
+
applied_configurations: ["customer"],
|
|
306
|
+
configuration: { customer: { applied: true, test_clock: I.CLOCK } },
|
|
307
|
+
};
|
|
308
|
+
const bodyAt = (stage, name) => {
|
|
309
|
+
if (stage === "creation") {
|
|
310
|
+
const m = {
|
|
311
|
+
clock,
|
|
312
|
+
buyer,
|
|
313
|
+
originalProduct: product("original"),
|
|
314
|
+
targetProduct: product("target"),
|
|
315
|
+
originalPrice: p,
|
|
316
|
+
targetPrice: target,
|
|
317
|
+
subscriptionCoupon: coupon("subscription"),
|
|
318
|
+
itemCoupon: coupon("item"),
|
|
319
|
+
scheduledSubscription: sub,
|
|
320
|
+
controlSubscription: control,
|
|
321
|
+
};
|
|
322
|
+
if (!Object.hasOwn(m, name)) throw Error("UNKNOWN_CREATION_ROLE");
|
|
323
|
+
return copy(m[name]);
|
|
324
|
+
}
|
|
325
|
+
if (name === "billingCustomer") return copy(customer);
|
|
326
|
+
if (name === "targetPrice") return copy(target);
|
|
327
|
+
if (name === "subscriptionCoupon") return coupon("subscription");
|
|
328
|
+
if (name === "itemCoupon") return coupon("item");
|
|
329
|
+
if (name === "mirrorInventory")
|
|
330
|
+
return {
|
|
331
|
+
synthetic: true,
|
|
332
|
+
object: "list",
|
|
333
|
+
has_more: false,
|
|
334
|
+
data: [copy(customer)],
|
|
335
|
+
};
|
|
336
|
+
if (name === "schedule")
|
|
337
|
+
return stage === "active"
|
|
338
|
+
? {
|
|
339
|
+
...copy(configured),
|
|
340
|
+
current_phase: { start_date: I.T1, end_date: I.T2 },
|
|
341
|
+
}
|
|
342
|
+
: copy(configured);
|
|
343
|
+
if (name === "scheduledSubscription")
|
|
344
|
+
return stage === "active"
|
|
345
|
+
? copy(activeSub)
|
|
346
|
+
: { ...copy(sub), schedule: stage === "pending" ? I.SCHEDULE : null };
|
|
347
|
+
if (name === "controlSubscription")
|
|
348
|
+
return stage === "active" ? copy(activeControl) : copy(control);
|
|
349
|
+
for (const [s, prefix] of [
|
|
350
|
+
["S", "scheduled"],
|
|
351
|
+
["C", "control"],
|
|
352
|
+
]) {
|
|
353
|
+
const n = stage === "active" ? 1 : 0;
|
|
354
|
+
if (name === prefix + "Inventory")
|
|
355
|
+
return {
|
|
356
|
+
object: "list",
|
|
357
|
+
has_more: false,
|
|
358
|
+
data: n === 0 ? [invoice(s, 0)] : [invoice(s, 0), invoice(s, 1)],
|
|
359
|
+
};
|
|
360
|
+
if (name === prefix + "Lines") return invoice(s, n).lines;
|
|
361
|
+
if (name === prefix + "Invoice") return invoice(s, n);
|
|
362
|
+
}
|
|
363
|
+
if (name === "nativeAdvance")
|
|
364
|
+
return {
|
|
365
|
+
...copy(clock),
|
|
366
|
+
status: "advancing",
|
|
367
|
+
status_details: { advancing: { target_frozen_time: I.T1 } },
|
|
368
|
+
};
|
|
369
|
+
if (name === "clockReady")
|
|
370
|
+
return {
|
|
371
|
+
...copy(clock),
|
|
372
|
+
frozen_time: optional ? I.F1_UNVERIFIED_NATIVE_TARGET : I.T1,
|
|
373
|
+
};
|
|
374
|
+
if (name === "nativeReadyBeforeFinalization")
|
|
375
|
+
return { ...copy(clock), frozen_time: I.T1 };
|
|
376
|
+
if (name === "finalizationAdvance")
|
|
377
|
+
return {
|
|
378
|
+
...copy(clock),
|
|
379
|
+
status: "advancing",
|
|
380
|
+
frozen_time: I.T1,
|
|
381
|
+
status_details: {
|
|
382
|
+
advancing: { target_frozen_time: I.F1_UNVERIFIED_NATIVE_TARGET },
|
|
383
|
+
},
|
|
384
|
+
};
|
|
385
|
+
throw Error("UNKNOWN_LATER_ROLE");
|
|
386
|
+
};
|
|
387
|
+
const rows = { creation: {}, baseline: {}, pending: {}, active: {} };
|
|
388
|
+
for (const role of roles) {
|
|
389
|
+
if (!role.required && !optional) continue;
|
|
390
|
+
const [, stage, name] = role.pointer.split("/").slice(1),
|
|
391
|
+
request = {
|
|
392
|
+
method: role.method,
|
|
393
|
+
path: role.pathTemplate.replace(/\$[A-Z_0-9]+/g, (s) => {
|
|
394
|
+
if (!Object.hasOwn(I, s.slice(1)))
|
|
395
|
+
throw Error("UNDECLARED_INTENT_SYMBOL");
|
|
396
|
+
return encodeURIComponent(I[s.slice(1)]);
|
|
397
|
+
}),
|
|
398
|
+
apiVersion: I.API_VERSION,
|
|
399
|
+
scope: "platform",
|
|
400
|
+
...(role.method === "POST"
|
|
401
|
+
? { params: substitute(role.paramsTemplate) }
|
|
402
|
+
: {}),
|
|
403
|
+
};
|
|
404
|
+
rows[stage][name] = {
|
|
405
|
+
request,
|
|
406
|
+
response: { status: 200, requestId: null, body: bodyAt(stage, name) },
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
const setup = {
|
|
410
|
+
id: I.SETUP,
|
|
411
|
+
object: "setup_intent",
|
|
412
|
+
created: I.T0,
|
|
413
|
+
customer: I.MIRROR,
|
|
414
|
+
customer_account: I.BUYER,
|
|
415
|
+
livemode: false,
|
|
416
|
+
status: "succeeded",
|
|
417
|
+
payment_method: I.PM_RETURNED,
|
|
418
|
+
usage: "off_session",
|
|
419
|
+
payment_method_types: ["card"],
|
|
420
|
+
metadata: { sdkQualificationRun: I.O },
|
|
421
|
+
},
|
|
422
|
+
pm = {
|
|
423
|
+
id: I.PM_RETURNED,
|
|
424
|
+
object: "payment_method",
|
|
425
|
+
created: I.T0,
|
|
426
|
+
type: "card",
|
|
427
|
+
livemode: false,
|
|
428
|
+
customer: I.MIRROR,
|
|
429
|
+
customer_account: I.BUYER,
|
|
430
|
+
card: {
|
|
431
|
+
brand: "visa",
|
|
432
|
+
display_brand: "visa",
|
|
433
|
+
country: "US",
|
|
434
|
+
funding: "credit",
|
|
435
|
+
exp_month: 12,
|
|
436
|
+
exp_year: 2030,
|
|
437
|
+
last4: "4242",
|
|
438
|
+
checks: {
|
|
439
|
+
address_line1_check: null,
|
|
440
|
+
address_postal_code_check: null,
|
|
441
|
+
cvc_check: null,
|
|
442
|
+
},
|
|
443
|
+
networks: { available: ["visa"], preferred: null },
|
|
444
|
+
three_d_secure_usage: { supported: true },
|
|
445
|
+
regulated_status: null,
|
|
446
|
+
wallet: null,
|
|
447
|
+
generated_from: null,
|
|
448
|
+
},
|
|
449
|
+
};
|
|
450
|
+
const privateBodies = {
|
|
451
|
+
R01: { id: I.PLATFORM, object: "account", deleted: false, livemode: false },
|
|
452
|
+
R02: copy(buyer),
|
|
453
|
+
R04: copy(customer),
|
|
454
|
+
P03: setup,
|
|
455
|
+
R05: pm,
|
|
456
|
+
};
|
|
457
|
+
const preparation = {
|
|
458
|
+
subscription: copy(sub),
|
|
459
|
+
targetPrice: copy(target),
|
|
460
|
+
billingCustomer: copy(customer),
|
|
461
|
+
expected: copy(full.expected),
|
|
462
|
+
key: I.LOGICAL_KEY,
|
|
463
|
+
};
|
|
464
|
+
const attach = {
|
|
465
|
+
attachRequest: {
|
|
466
|
+
preparation: copy(preparation),
|
|
467
|
+
apiVersion: I.API_VERSION,
|
|
468
|
+
attachKey: I.ATTACH_KEY,
|
|
469
|
+
firstDispatchedAt: I.ATTACH_FIRST_DISPATCHED_AT,
|
|
470
|
+
},
|
|
471
|
+
actualDispatch: {
|
|
472
|
+
scope: "platform",
|
|
473
|
+
apiVersion: I.API_VERSION,
|
|
474
|
+
method: "POST",
|
|
475
|
+
path: "/v1/subscription_schedules",
|
|
476
|
+
payload: { from_subscription: I.SUB_SCHEDULED },
|
|
477
|
+
key: I.ATTACH_KEY,
|
|
478
|
+
firstDispatchedAt: I.ATTACH_FIRST_DISPATCHED_AT,
|
|
479
|
+
},
|
|
480
|
+
providerSnapshot: copy(schedule),
|
|
481
|
+
};
|
|
482
|
+
const configuration = {
|
|
483
|
+
preparation: copy(preparation),
|
|
484
|
+
attachReceipt: copy(attach),
|
|
485
|
+
freshSubscription: { ...copy(sub), schedule: I.SCHEDULE },
|
|
486
|
+
targetPrice: copy(target),
|
|
487
|
+
billingCustomer: copy(customer),
|
|
488
|
+
schedule: copy(schedule),
|
|
489
|
+
apiVersion: I.API_VERSION,
|
|
490
|
+
observedAt: I.OBSERVED,
|
|
491
|
+
firstDispatchedAt: I.CONFIGURE_FIRST_DISPATCHED_AT,
|
|
492
|
+
configureKey: I.CONFIGURE_KEY,
|
|
493
|
+
};
|
|
494
|
+
return freeze({
|
|
495
|
+
rows,
|
|
496
|
+
privateBodies,
|
|
497
|
+
preparation,
|
|
498
|
+
attach,
|
|
499
|
+
configuration,
|
|
500
|
+
configuredBody: copy(configured),
|
|
501
|
+
configuredDispatch: declaredConfigureWire,
|
|
502
|
+
intent: I,
|
|
503
|
+
syntheticOnly: true,
|
|
504
|
+
actualFulfillment: false,
|
|
505
|
+
financialQualified: false,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const freeze = (x) => {
|
|
2
|
+
if (x && typeof x === "object") {
|
|
3
|
+
for (const v of Object.values(x)) freeze(v);
|
|
4
|
+
Object.freeze(x);
|
|
5
|
+
}
|
|
6
|
+
return x;
|
|
7
|
+
};
|
|
8
|
+
export const INTENT = freeze({
|
|
9
|
+
O: "SYNTHETIC_PREFIX_JOIN_V1",
|
|
10
|
+
API_VERSION: "2026-09-30.endive",
|
|
11
|
+
LOGICAL_KEY: "SYNTHETIC_PREFIX_LOGICAL",
|
|
12
|
+
ATTACH_KEY: "SYNTHETIC_PREFIX_ATTACH",
|
|
13
|
+
CONFIGURE_KEY: "SYNTHETIC_PREFIX_CONFIGURE",
|
|
14
|
+
SCHEDULE: "sub_sched_owned",
|
|
15
|
+
CLOCK: "clock_Prefix",
|
|
16
|
+
BUYER: "acct_Prefix",
|
|
17
|
+
MIRROR: "cus_Prefix",
|
|
18
|
+
PM_RETURNED: "pm_PrefixCard",
|
|
19
|
+
SUB_SCHEDULED: "sub_PrefixS",
|
|
20
|
+
SUB_CONTROL: "sub_PrefixC",
|
|
21
|
+
ITEM_SCHEDULED: "si_PrefixS",
|
|
22
|
+
ITEM_CONTROL: "si_PrefixC",
|
|
23
|
+
PRODUCT_ORIGINAL: "prod_PrefixOriginal",
|
|
24
|
+
PRODUCT_TARGET: "prod_PrefixTarget",
|
|
25
|
+
PRICE_ORIGINAL: "price_PrefixOriginal",
|
|
26
|
+
PRICE_TARGET: "price_PrefixTarget",
|
|
27
|
+
COUPON_SUBSCRIPTION: "prefix-subscription-offer",
|
|
28
|
+
COUPON_ITEM: "prefix-item-offer",
|
|
29
|
+
DISCOUNT_S_SUB: "di_PrefixSubS",
|
|
30
|
+
DISCOUNT_S_ITEM: "di_PrefixItemS",
|
|
31
|
+
DISCOUNT_C_SUB: "di_PrefixSubC",
|
|
32
|
+
DISCOUNT_C_ITEM: "di_PrefixItemC",
|
|
33
|
+
INVOICE_SCHEDULED_0: "in_PrefixS0",
|
|
34
|
+
INVOICE_CONTROL_0: "in_PrefixC0",
|
|
35
|
+
INVOICE_SCHEDULED_1: "in_PrefixS1",
|
|
36
|
+
INVOICE_CONTROL_1: "in_PrefixC1",
|
|
37
|
+
T0: 1768435200,
|
|
38
|
+
T1: 1771113600,
|
|
39
|
+
T2: 1773532800,
|
|
40
|
+
T1_ACTUAL_PENDING_CURRENT_PHASE_END: 1771113600,
|
|
41
|
+
F1_UNVERIFIED_NATIVE_TARGET: 1772000000,
|
|
42
|
+
OBSERVED: 1768867200,
|
|
43
|
+
ATTACH_FIRST_DISPATCHED_AT: 1768867140,
|
|
44
|
+
CONFIGURE_FIRST_DISPATCHED_AT: 1768867200,
|
|
45
|
+
amounts: {
|
|
46
|
+
original: { integer: 1000, decimal: "1000.00" },
|
|
47
|
+
target: { integer: 800, decimal: "800.00" },
|
|
48
|
+
},
|
|
49
|
+
percentOff: { subscription: 10, item: 5 },
|
|
50
|
+
billingMode: {
|
|
51
|
+
type: "flexible",
|
|
52
|
+
flexible: { proration_discounts: "included" },
|
|
53
|
+
},
|
|
54
|
+
LINE_SCHEDULED_0: "il_PrefixS0",
|
|
55
|
+
LINE_SCHEDULED_1: "il_PrefixS1",
|
|
56
|
+
LINE_CONTROL_0: "il_PrefixC0",
|
|
57
|
+
LINE_CONTROL_1: "il_PrefixC1",
|
|
58
|
+
mirrorPage: { object: "list", has_more: false, count: 1 },
|
|
59
|
+
allFactsSynthetic: true,
|
|
60
|
+
actualOperatorOwnerTimeSelection: false,
|
|
61
|
+
actualFulfillment: false,
|
|
62
|
+
nativeQualification: false,
|
|
63
|
+
financialTotalsAndCountersQualified: false,
|
|
64
|
+
SETUP: "seti_Prefix",
|
|
65
|
+
PLATFORM: "acct_Platform",
|
|
66
|
+
prefixAdmission: {
|
|
67
|
+
expectedPlatformAccount: "acct_Platform",
|
|
68
|
+
nativeT0: 1768435200,
|
|
69
|
+
startMs: 1793200000000,
|
|
70
|
+
workEndMs: 1793200840000,
|
|
71
|
+
endMs: 1793200900000,
|
|
72
|
+
owner: "SYNTHETIC_PREFIX_JOIN_V1",
|
|
73
|
+
keys: {
|
|
74
|
+
K_CLOCK: "SYNTHETIC_PREFIX_K_CLOCK",
|
|
75
|
+
K_BUYER: "SYNTHETIC_PREFIX_K_BUYER",
|
|
76
|
+
K_SETUP: "SYNTHETIC_PREFIX_K_SETUP",
|
|
77
|
+
K_PRODUCT_ORIGINAL: "SYNTHETIC_PREFIX_K_PRODUCT_ORIGINAL",
|
|
78
|
+
K_PRODUCT_TARGET: "SYNTHETIC_PREFIX_K_PRODUCT_TARGET",
|
|
79
|
+
K_PRICE_ORIGINAL: "SYNTHETIC_PREFIX_K_PRICE_ORIGINAL",
|
|
80
|
+
K_PRICE_TARGET: "SYNTHETIC_PREFIX_K_PRICE_TARGET",
|
|
81
|
+
K_COUPON_SUBSCRIPTION: "SYNTHETIC_PREFIX_K_COUPON_SUBSCRIPTION",
|
|
82
|
+
K_COUPON_ITEM: "SYNTHETIC_PREFIX_K_COUPON_ITEM",
|
|
83
|
+
K_SUB_SCHEDULED: "SYNTHETIC_PREFIX_K_SUB_SCHEDULED",
|
|
84
|
+
K_SUB_CONTROL: "SYNTHETIC_PREFIX_K_SUB_CONTROL",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
declaredBeforeAnyD6C1: true,
|
|
88
|
+
SourceCompilerProduced: false,
|
|
89
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import schemas from "./f19.json" with { type: "json" };
|
|
2
|
+
export const TEST_LINE_INPUT = Object.freeze({ testOnlyLineInput: true });
|
|
3
|
+
export const fakeLine = (raw) =>
|
|
4
|
+
raw === TEST_LINE_INPUT
|
|
5
|
+
? { ok: true, value: { testOnlyValidatedLineOutput: true } }
|
|
6
|
+
: { ok: false };
|
|
7
|
+
function sample(schema) {
|
|
8
|
+
if (schema.$ref) {
|
|
9
|
+
const name = schema.$ref.split("/").at(-1);
|
|
10
|
+
if (name === "LinePage") return TEST_LINE_INPUT;
|
|
11
|
+
return sample(schemas[name]);
|
|
12
|
+
}
|
|
13
|
+
if (schema.anyOf)
|
|
14
|
+
return sample(
|
|
15
|
+
schema.anyOf.find((s) => s.type === "null") ?? schema.anyOf[0],
|
|
16
|
+
);
|
|
17
|
+
if (Object.hasOwn(schema, "const")) return schema.const;
|
|
18
|
+
if (schema.enum) return schema.enum[0];
|
|
19
|
+
if (schema.type === "null") return null;
|
|
20
|
+
if (schema.type === "boolean") return false;
|
|
21
|
+
if (schema.type === "integer")
|
|
22
|
+
return schema.exclusiveMinimum === 0 ? 1 : Math.max(0, schema.minimum ?? 0);
|
|
23
|
+
if (schema.type === "string") {
|
|
24
|
+
const prefix = schema.pattern?.match(/\^([a-z]+)_/);
|
|
25
|
+
if (prefix) return prefix[1] + "_SYNTHETIC";
|
|
26
|
+
return schema.maxLength === 3 ? "usd" : "SYNTHETIC";
|
|
27
|
+
}
|
|
28
|
+
if (schema.type === "array") return [];
|
|
29
|
+
if (schema.type === "object")
|
|
30
|
+
return Object.fromEntries(
|
|
31
|
+
(schema.required ?? []).map((key) => [
|
|
32
|
+
key,
|
|
33
|
+
sample(schema.properties[key]),
|
|
34
|
+
]),
|
|
35
|
+
);
|
|
36
|
+
throw Error("BAD_TEST_SCHEMA");
|
|
37
|
+
}
|
|
38
|
+
export const invoice = () => sample(schemas.PaidInvoice);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function line() {
|
|
2
|
+
return {
|
|
3
|
+
id: "il_SYNTHETIC",
|
|
4
|
+
object: "line_item",
|
|
5
|
+
amount: 900,
|
|
6
|
+
currency: "usd",
|
|
7
|
+
discount_amounts: [{ discount: "di_ITEM", amount: 100 }],
|
|
8
|
+
discountable: true,
|
|
9
|
+
discounts: ["di_SUB", "di_ITEM"],
|
|
10
|
+
invoice: "in_SYNTHETIC",
|
|
11
|
+
livemode: false,
|
|
12
|
+
parent: {
|
|
13
|
+
type: "subscription_item_details",
|
|
14
|
+
invoice_item_details: null,
|
|
15
|
+
subscription_item_details: {
|
|
16
|
+
invoice_item: null,
|
|
17
|
+
proration: false,
|
|
18
|
+
proration_details: null,
|
|
19
|
+
subscription: "sub_SYNTHETIC",
|
|
20
|
+
subscription_item: "si_SYNTHETIC",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
period: { start: 100, end: 200 },
|
|
24
|
+
pretax_credit_amounts: [
|
|
25
|
+
{
|
|
26
|
+
type: "discount",
|
|
27
|
+
discount: "di_ITEM",
|
|
28
|
+
amount: 100,
|
|
29
|
+
credit_balance_transaction: null,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
pricing: {
|
|
33
|
+
type: "price_details",
|
|
34
|
+
price_details: { price: "price_SYNTHETIC", product: "prod_SYNTHETIC" },
|
|
35
|
+
unit_amount_decimal: "00009.0900",
|
|
36
|
+
},
|
|
37
|
+
quantity: 1,
|
|
38
|
+
quantity_decimal: "01.000",
|
|
39
|
+
subscription: null,
|
|
40
|
+
subtotal: 1000,
|
|
41
|
+
taxes: [],
|
|
42
|
+
metadata: {},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export const page = () => ({ object: "list", has_more: false, data: [line()] });
|