@fantastic.dev/better-stripe 0.88.1 → 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 +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/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/billing/renewalAttach/internal/originalOwner.d.ts +27 -0
- package/dist/client/billing/renewalAttach/internal/originalOwner.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/originalOwner.js +236 -0
- package/dist/client/billing/renewalAttach/internal/originalOwner.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/sourceBindings.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/sourceBindings.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/sourceBindings.js +9 -0
- package/dist/client/billing/renewalAttach/internal/sourceBindings.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/stockRawDelegate.d.ts +6 -0
- package/dist/client/billing/renewalAttach/internal/stockRawDelegate.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/stockRawDelegate.js +35 -0
- package/dist/client/billing/renewalAttach/internal/stockRawDelegate.js.map +1 -0
- package/docs/renewal-context-reads.md +43 -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
- package/src/client/billing/renewalAttach/internal/originalOwner.test.ts +258 -0
- package/src/client/billing/renewalAttach/internal/originalOwner.ts +280 -0
- package/src/client/billing/renewalAttach/internal/sourceBindings.test.ts +13 -0
- package/src/client/billing/renewalAttach/internal/sourceBindings.ts +8 -0
- package/src/client/billing/renewalAttach/internal/stockRawDelegate.test.ts +156 -0
- package/src/client/billing/renewalAttach/internal/stockRawDelegate.ts +43 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
export declare function validateReadMaterial(args: any, prepared: any, scheduleId: any): {
|
|
2
|
+
prepared: any;
|
|
3
|
+
subscription: {
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
id: string;
|
|
6
|
+
object: "subscription";
|
|
7
|
+
customer_account: string;
|
|
8
|
+
status: "active";
|
|
9
|
+
currency: string;
|
|
10
|
+
livemode: boolean;
|
|
11
|
+
cancel_at: null;
|
|
12
|
+
cancel_at_period_end: false;
|
|
13
|
+
pause_collection: null;
|
|
14
|
+
pending_update: null;
|
|
15
|
+
default_source: null;
|
|
16
|
+
application_fee_percent: null;
|
|
17
|
+
payment_settings: {
|
|
18
|
+
payment_method_options: null;
|
|
19
|
+
payment_method_types: null;
|
|
20
|
+
save_default_payment_method: "off" | null;
|
|
21
|
+
} | null;
|
|
22
|
+
billing_schedules?: unknown[] | undefined;
|
|
23
|
+
items: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
has_more: false;
|
|
26
|
+
data: [{
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
id: string;
|
|
29
|
+
object: "subscription_item";
|
|
30
|
+
subscription: string;
|
|
31
|
+
current_period_start: number;
|
|
32
|
+
current_period_end: number;
|
|
33
|
+
quantity: number;
|
|
34
|
+
price: {
|
|
35
|
+
[x: string]: unknown;
|
|
36
|
+
id: string;
|
|
37
|
+
object: "price";
|
|
38
|
+
product: string | {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
id: string;
|
|
41
|
+
object: "product";
|
|
42
|
+
deleted?: false | undefined;
|
|
43
|
+
};
|
|
44
|
+
active: boolean;
|
|
45
|
+
livemode: boolean;
|
|
46
|
+
type: "recurring";
|
|
47
|
+
currency: string;
|
|
48
|
+
billing_scheme: "per_unit";
|
|
49
|
+
recurring: {
|
|
50
|
+
[x: string]: unknown;
|
|
51
|
+
interval: "day" | "month" | "week" | "year";
|
|
52
|
+
interval_count: number;
|
|
53
|
+
usage_type: "licensed";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}];
|
|
57
|
+
};
|
|
58
|
+
schedule: string | {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
id: string;
|
|
61
|
+
object: "subscription_schedule";
|
|
62
|
+
deleted?: false | undefined;
|
|
63
|
+
customer_account?: string | undefined;
|
|
64
|
+
livemode?: boolean | undefined;
|
|
65
|
+
} | null;
|
|
66
|
+
} | undefined;
|
|
67
|
+
item: {
|
|
68
|
+
[x: string]: unknown;
|
|
69
|
+
id: string;
|
|
70
|
+
object: "subscription_item";
|
|
71
|
+
subscription: string;
|
|
72
|
+
current_period_start: number;
|
|
73
|
+
current_period_end: number;
|
|
74
|
+
quantity: number;
|
|
75
|
+
price: {
|
|
76
|
+
[x: string]: unknown;
|
|
77
|
+
id: string;
|
|
78
|
+
object: "price";
|
|
79
|
+
product: string | {
|
|
80
|
+
[x: string]: unknown;
|
|
81
|
+
id: string;
|
|
82
|
+
object: "product";
|
|
83
|
+
deleted?: false | undefined;
|
|
84
|
+
};
|
|
85
|
+
active: boolean;
|
|
86
|
+
livemode: boolean;
|
|
87
|
+
type: "recurring";
|
|
88
|
+
currency: string;
|
|
89
|
+
billing_scheme: "per_unit";
|
|
90
|
+
recurring: {
|
|
91
|
+
[x: string]: unknown;
|
|
92
|
+
interval: "day" | "month" | "week" | "year";
|
|
93
|
+
interval_count: number;
|
|
94
|
+
usage_type: "licensed";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
customer: {
|
|
99
|
+
[x: string]: unknown;
|
|
100
|
+
id: string;
|
|
101
|
+
object: "customer";
|
|
102
|
+
customer_account: string;
|
|
103
|
+
livemode: boolean;
|
|
104
|
+
deleted?: false | undefined;
|
|
105
|
+
discount: {
|
|
106
|
+
[x: string]: unknown;
|
|
107
|
+
id: string;
|
|
108
|
+
object: "discount";
|
|
109
|
+
deleted?: false | undefined;
|
|
110
|
+
} | null;
|
|
111
|
+
} | undefined;
|
|
112
|
+
targetPrice: {
|
|
113
|
+
[x: string]: unknown;
|
|
114
|
+
id: string;
|
|
115
|
+
object: "price";
|
|
116
|
+
product: string | {
|
|
117
|
+
[x: string]: unknown;
|
|
118
|
+
id: string;
|
|
119
|
+
object: "product";
|
|
120
|
+
deleted?: false | undefined;
|
|
121
|
+
};
|
|
122
|
+
active: boolean;
|
|
123
|
+
livemode: boolean;
|
|
124
|
+
type: "recurring";
|
|
125
|
+
currency: string;
|
|
126
|
+
billing_scheme: "per_unit";
|
|
127
|
+
recurring: {
|
|
128
|
+
[x: string]: unknown;
|
|
129
|
+
interval: "day" | "month" | "week" | "year";
|
|
130
|
+
interval_count: number;
|
|
131
|
+
usage_type: "licensed";
|
|
132
|
+
};
|
|
133
|
+
} | undefined;
|
|
134
|
+
profile: {
|
|
135
|
+
apiVersion: any;
|
|
136
|
+
billingMode: "classic" | "flexible";
|
|
137
|
+
cadence: string;
|
|
138
|
+
anchor: string;
|
|
139
|
+
};
|
|
140
|
+
discounts: {
|
|
141
|
+
[x: string]: unknown;
|
|
142
|
+
id: string;
|
|
143
|
+
object: "discount";
|
|
144
|
+
deleted?: false | undefined;
|
|
145
|
+
customer_account: string;
|
|
146
|
+
customer?: string | {
|
|
147
|
+
[x: string]: unknown;
|
|
148
|
+
id: string;
|
|
149
|
+
object: "customer";
|
|
150
|
+
deleted?: false | undefined;
|
|
151
|
+
livemode?: boolean | undefined;
|
|
152
|
+
customer_account?: string | null | undefined;
|
|
153
|
+
} | null | undefined;
|
|
154
|
+
subscription: string | null;
|
|
155
|
+
subscription_item: string | null;
|
|
156
|
+
start: number;
|
|
157
|
+
end: null;
|
|
158
|
+
source: {
|
|
159
|
+
[x: string]: unknown;
|
|
160
|
+
type: "coupon";
|
|
161
|
+
coupon: {
|
|
162
|
+
[x: string]: unknown;
|
|
163
|
+
id: string;
|
|
164
|
+
object: "coupon";
|
|
165
|
+
deleted?: false | undefined;
|
|
166
|
+
livemode?: boolean | undefined;
|
|
167
|
+
duration: "forever";
|
|
168
|
+
applies_to?: {
|
|
169
|
+
products: string[];
|
|
170
|
+
} | undefined;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
itemDiscounts: {
|
|
175
|
+
[x: string]: unknown;
|
|
176
|
+
id: string;
|
|
177
|
+
object: "discount";
|
|
178
|
+
deleted?: false | undefined;
|
|
179
|
+
customer_account: string;
|
|
180
|
+
customer?: string | {
|
|
181
|
+
[x: string]: unknown;
|
|
182
|
+
id: string;
|
|
183
|
+
object: "customer";
|
|
184
|
+
deleted?: false | undefined;
|
|
185
|
+
livemode?: boolean | undefined;
|
|
186
|
+
customer_account?: string | null | undefined;
|
|
187
|
+
} | null | undefined;
|
|
188
|
+
subscription: string | null;
|
|
189
|
+
subscription_item: string | null;
|
|
190
|
+
start: number;
|
|
191
|
+
end: null;
|
|
192
|
+
source: {
|
|
193
|
+
[x: string]: unknown;
|
|
194
|
+
type: "coupon";
|
|
195
|
+
coupon: {
|
|
196
|
+
[x: string]: unknown;
|
|
197
|
+
id: string;
|
|
198
|
+
object: "coupon";
|
|
199
|
+
deleted?: false | undefined;
|
|
200
|
+
livemode?: boolean | undefined;
|
|
201
|
+
duration: "forever";
|
|
202
|
+
applies_to?: {
|
|
203
|
+
products: string[];
|
|
204
|
+
} | undefined;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
}[] | undefined;
|
|
208
|
+
originalSettings: {
|
|
209
|
+
context: {
|
|
210
|
+
customerAccountId: string;
|
|
211
|
+
customerId: string;
|
|
212
|
+
livemode: boolean;
|
|
213
|
+
effectiveCollectionMethod: "charge_automatically" | "send_invoice";
|
|
214
|
+
effectiveAutomaticTax: boolean;
|
|
215
|
+
effectiveInvoiceIssuer: {
|
|
216
|
+
type: "self";
|
|
217
|
+
account?: null | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
type: "account";
|
|
220
|
+
account: string | {
|
|
221
|
+
[x: string]: unknown;
|
|
222
|
+
id: string;
|
|
223
|
+
object: any;
|
|
224
|
+
deleted?: false | undefined;
|
|
225
|
+
livemode?: boolean | undefined;
|
|
226
|
+
customer?: string | {
|
|
227
|
+
[x: string]: unknown;
|
|
228
|
+
id: string;
|
|
229
|
+
object: "customer";
|
|
230
|
+
deleted?: false | undefined;
|
|
231
|
+
livemode?: boolean | undefined;
|
|
232
|
+
customer_account?: string | null | undefined;
|
|
233
|
+
} | null | undefined;
|
|
234
|
+
customer_account?: string | null | undefined;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
} | undefined;
|
|
238
|
+
invoice: {
|
|
239
|
+
account_tax_ids: (string | {
|
|
240
|
+
[x: string]: unknown;
|
|
241
|
+
id: string;
|
|
242
|
+
object: "tax_id";
|
|
243
|
+
deleted?: false | undefined;
|
|
244
|
+
livemode: boolean;
|
|
245
|
+
customer?: null | undefined;
|
|
246
|
+
customer_account?: null | undefined;
|
|
247
|
+
owner: {
|
|
248
|
+
type: "self";
|
|
249
|
+
customer_account: null;
|
|
250
|
+
account?: null | undefined;
|
|
251
|
+
customer?: null | undefined;
|
|
252
|
+
} | {
|
|
253
|
+
type: "account";
|
|
254
|
+
account: string | {
|
|
255
|
+
[x: string]: unknown;
|
|
256
|
+
id: string;
|
|
257
|
+
object: any;
|
|
258
|
+
deleted?: false | undefined;
|
|
259
|
+
livemode?: boolean | undefined;
|
|
260
|
+
customer?: string | {
|
|
261
|
+
[x: string]: unknown;
|
|
262
|
+
id: string;
|
|
263
|
+
object: "customer";
|
|
264
|
+
deleted?: false | undefined;
|
|
265
|
+
livemode?: boolean | undefined;
|
|
266
|
+
customer_account?: string | null | undefined;
|
|
267
|
+
} | null | undefined;
|
|
268
|
+
customer_account?: string | null | undefined;
|
|
269
|
+
};
|
|
270
|
+
customer_account: null;
|
|
271
|
+
customer?: null | undefined;
|
|
272
|
+
};
|
|
273
|
+
})[] | null;
|
|
274
|
+
custom_fields: {
|
|
275
|
+
name: string;
|
|
276
|
+
value: string;
|
|
277
|
+
}[] | null;
|
|
278
|
+
description: string | null;
|
|
279
|
+
footer: string | null;
|
|
280
|
+
issuer: {
|
|
281
|
+
type: "self";
|
|
282
|
+
account?: null | undefined;
|
|
283
|
+
} | {
|
|
284
|
+
type: "account";
|
|
285
|
+
account: string | {
|
|
286
|
+
[x: string]: unknown;
|
|
287
|
+
id: string;
|
|
288
|
+
object: any;
|
|
289
|
+
deleted?: false | undefined;
|
|
290
|
+
livemode?: boolean | undefined;
|
|
291
|
+
customer?: string | {
|
|
292
|
+
[x: string]: unknown;
|
|
293
|
+
id: string;
|
|
294
|
+
object: "customer";
|
|
295
|
+
deleted?: false | undefined;
|
|
296
|
+
livemode?: boolean | undefined;
|
|
297
|
+
customer_account?: string | null | undefined;
|
|
298
|
+
} | null | undefined;
|
|
299
|
+
customer_account?: string | null | undefined;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
} | undefined;
|
|
303
|
+
automaticTax: {
|
|
304
|
+
enabled: boolean;
|
|
305
|
+
liability?: {
|
|
306
|
+
type: "self";
|
|
307
|
+
account?: null | undefined;
|
|
308
|
+
} | {
|
|
309
|
+
type: "account";
|
|
310
|
+
account: string | {
|
|
311
|
+
[x: string]: unknown;
|
|
312
|
+
id: string;
|
|
313
|
+
object: any;
|
|
314
|
+
deleted?: false | undefined;
|
|
315
|
+
livemode?: boolean | undefined;
|
|
316
|
+
customer?: string | {
|
|
317
|
+
[x: string]: unknown;
|
|
318
|
+
id: string;
|
|
319
|
+
object: "customer";
|
|
320
|
+
deleted?: false | undefined;
|
|
321
|
+
livemode?: boolean | undefined;
|
|
322
|
+
customer_account?: string | null | undefined;
|
|
323
|
+
} | null | undefined;
|
|
324
|
+
customer_account?: string | null | undefined;
|
|
325
|
+
};
|
|
326
|
+
} | null | undefined;
|
|
327
|
+
disabled_reason?: null | undefined;
|
|
328
|
+
} | undefined;
|
|
329
|
+
taxLevels: {
|
|
330
|
+
subscription: string[];
|
|
331
|
+
item: string[];
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
//# sourceMappingURL=f01.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"f01.d.mts","sourceRoot":"","sources":["../../../../../../../../src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs"],"names":[],"mappings":"AA+BA,wBAAgB,oBAAoB,CAAC,IAAI,KAAA,EAAE,QAAQ,KAAA,EAAE,UAAU,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgI9D"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { renewalSubscription, renewalPrice, renewalBillingCustomer, } from "./f09.mjs";
|
|
3
|
+
import { referenceId, equal, conflict, unsupported, supportedVersion, timestamp, resourceId, productId, } from "./f02.mjs";
|
|
4
|
+
import { profileOf } from "./f00.mjs";
|
|
5
|
+
import { qualifySourceDiscounts } from "./f03.mjs";
|
|
6
|
+
import { qualifyOriginalSettings } from "./f04.mjs";
|
|
7
|
+
const attachedReference = z.union([
|
|
8
|
+
resourceId("sub_sched"),
|
|
9
|
+
z
|
|
10
|
+
.object({
|
|
11
|
+
id: resourceId("sub_sched"),
|
|
12
|
+
object: z.literal("subscription_schedule"),
|
|
13
|
+
deleted: z.literal(false).optional(),
|
|
14
|
+
customer_account: resourceId("acct").optional(),
|
|
15
|
+
livemode: z.boolean().optional(),
|
|
16
|
+
})
|
|
17
|
+
.passthrough(),
|
|
18
|
+
]);
|
|
19
|
+
export function validateReadMaterial(args, prepared, scheduleId) {
|
|
20
|
+
supportedVersion(args.apiVersion);
|
|
21
|
+
const subscription = renewalSubscription
|
|
22
|
+
.extend({ schedule: scheduleId ? attachedReference : z.null() })
|
|
23
|
+
.safeParse(args.freshSubscription);
|
|
24
|
+
if (!subscription.success)
|
|
25
|
+
unsupported("unsupported_original_subscription_state");
|
|
26
|
+
const source = subscription.data;
|
|
27
|
+
if (scheduleId) {
|
|
28
|
+
if (referenceId(source.schedule, "sub_sched", "subscription_schedule") !==
|
|
29
|
+
scheduleId)
|
|
30
|
+
conflict("schedule_association_mismatch");
|
|
31
|
+
if (typeof source.schedule === "object" &&
|
|
32
|
+
source.schedule !== null &&
|
|
33
|
+
((source.schedule.customer_account !== undefined &&
|
|
34
|
+
source.schedule.customer_account !==
|
|
35
|
+
prepared.expected.customerAccountId) ||
|
|
36
|
+
(source.schedule.livemode !== undefined &&
|
|
37
|
+
source.schedule.livemode !== prepared.expected.livemode)))
|
|
38
|
+
conflict("schedule_association_mismatch");
|
|
39
|
+
}
|
|
40
|
+
const { schedule: originalSchedule, ...original } = prepared.providerSnapshot.subscription;
|
|
41
|
+
// Compare complete captured bodies, not parser outputs that may omit own keys.
|
|
42
|
+
const { schedule: freshSchedule, ...fresh } = args.freshSubscription;
|
|
43
|
+
if (scheduleId ? originalSchedule !== null : freshSchedule !== null)
|
|
44
|
+
conflict("schedule_association_mismatch");
|
|
45
|
+
if (!equal(original, fresh))
|
|
46
|
+
conflict("original_source_drift");
|
|
47
|
+
const target = renewalPrice.safeParse(args.targetPrice);
|
|
48
|
+
if (!target.success || !target.data.active)
|
|
49
|
+
unsupported("unsupported_target_price");
|
|
50
|
+
if (!equal(args.targetPrice, prepared.providerSnapshot.targetPrice))
|
|
51
|
+
conflict("target_price_drift");
|
|
52
|
+
if (prepared.providerSnapshot.billingCustomer === undefined ||
|
|
53
|
+
args.billingCustomer === undefined)
|
|
54
|
+
unsupported("missing_retained_billing_customer");
|
|
55
|
+
const customer = renewalBillingCustomer.safeParse(args.billingCustomer);
|
|
56
|
+
if (!customer.success)
|
|
57
|
+
unsupported("unsupported_billing_customer");
|
|
58
|
+
if (!equal(args.billingCustomer, prepared.providerSnapshot.billingCustomer))
|
|
59
|
+
conflict("billing_customer_drift");
|
|
60
|
+
const referenceContext = {
|
|
61
|
+
customerAccountId: prepared.expected.customerAccountId,
|
|
62
|
+
livemode: prepared.expected.livemode,
|
|
63
|
+
};
|
|
64
|
+
if (referenceId(source.customer, "cus", "customer", referenceContext) !==
|
|
65
|
+
customer.data.id ||
|
|
66
|
+
customer.data.customer_account !== prepared.expected.customerAccountId ||
|
|
67
|
+
customer.data.livemode !== prepared.expected.livemode)
|
|
68
|
+
conflict("billing_customer_identity_mismatch");
|
|
69
|
+
const item = source.items.data[0];
|
|
70
|
+
if (productId(item.price.product, referenceContext) !==
|
|
71
|
+
prepared.expected.currentProductId ||
|
|
72
|
+
productId(target.data.product, referenceContext) !==
|
|
73
|
+
prepared.expected.targetProductId)
|
|
74
|
+
unsupported("product_identity_mismatch");
|
|
75
|
+
if (args.observedAt < prepared.expected.periodStart ||
|
|
76
|
+
args.observedAt >= prepared.expected.periodEnd)
|
|
77
|
+
unsupported("outside_original_paid_period");
|
|
78
|
+
for (const field of [
|
|
79
|
+
"billing_thresholds",
|
|
80
|
+
"managed_payments",
|
|
81
|
+
"next_pending_invoice_item_invoice",
|
|
82
|
+
"pending_invoice_item_interval",
|
|
83
|
+
"pending_setup_intent",
|
|
84
|
+
"canceled_at",
|
|
85
|
+
"ended_at",
|
|
86
|
+
"trial_settings",
|
|
87
|
+
])
|
|
88
|
+
if (source[field] !== null)
|
|
89
|
+
unsupported(`unsupported_original_${field}`);
|
|
90
|
+
if (item.billing_thresholds !== null)
|
|
91
|
+
unsupported("unsupported_item_billing_thresholds");
|
|
92
|
+
if (item.current_trial !== null)
|
|
93
|
+
unsupported("unsupported_or_missing_item_current_trial");
|
|
94
|
+
if (!Array.isArray(source.billing_schedules) ||
|
|
95
|
+
source.billing_schedules.length)
|
|
96
|
+
unsupported("unsupported_original_billing_schedules");
|
|
97
|
+
if (source.trial_end !== null &&
|
|
98
|
+
(!timestamp.safeParse(source.trial_end).success ||
|
|
99
|
+
Number(source.trial_end) > prepared.expected.periodStart))
|
|
100
|
+
unsupported("unsupported_original_trial");
|
|
101
|
+
if (source.status_details != null || source.presentment_details != null)
|
|
102
|
+
unsupported("unsupported_special_billing_state");
|
|
103
|
+
const originalSettings = qualifyOriginalSettings(source, item, customer.data);
|
|
104
|
+
const profile = profileOf(source, item.price, target.data, args.apiVersion);
|
|
105
|
+
const anchor = timestamp.parse(source.billing_cycle_anchor);
|
|
106
|
+
if (anchor > prepared.expected.periodStart)
|
|
107
|
+
unsupported("unqualified_anchor_after_paid_period_start");
|
|
108
|
+
const discounts = qualifySourceDiscounts(source.discounts, "subscription", prepared.expected, customer.data.id, args.observedAt);
|
|
109
|
+
const itemDiscounts = qualifySourceDiscounts(item.discounts, "item", prepared.expected, customer.data.id, args.observedAt);
|
|
110
|
+
return {
|
|
111
|
+
prepared,
|
|
112
|
+
subscription: source,
|
|
113
|
+
item,
|
|
114
|
+
customer: customer.data,
|
|
115
|
+
targetPrice: target.data,
|
|
116
|
+
profile,
|
|
117
|
+
discounts,
|
|
118
|
+
itemDiscounts,
|
|
119
|
+
originalSettings,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=f01.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"f01.mjs","sourceRoot":"","sources":["../../../../../../../../src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f01.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,KAAK,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC;IAChC,UAAU,CAAC,WAAW,CAAC;IACvB,CAAC;SACE,MAAM,CAAC;QACN,EAAE,EAAE,UAAU,CAAC,WAAW,CAAC;QAC3B,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC;QAC1C,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QACpC,gBAAgB,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;QA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ACjB,QAAQ,CAAC,IAAI,CAAC,EAAE,EAChB,IAAI,CAAC,UAAU,CAChB,CAAC;IACF,OAAO;QACL,QAAQ;QACR,YAAY,EAAE,MAAM;QACpB,IAAI;QACJ,QAAQ,EAAE,QAAQ,CAAC,IAAI;QACvB,WAAW,EAAE,MAAM,CAAC,IAAI;QACxB,OAAO;QACP,SAAS;QACT,aAAa;QACb,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const timestamp: z.ZodNumber;
|
|
3
|
+
export declare const resourceId: (prefix: any) => z.ZodString;
|
|
4
|
+
export declare class ProjectionError extends Error {
|
|
5
|
+
kind: any;
|
|
6
|
+
constructor(kind: any, reason: any);
|
|
7
|
+
}
|
|
8
|
+
export declare function unsupported(reason: any): void;
|
|
9
|
+
export declare function conflict(reason: any): void;
|
|
10
|
+
export declare const object: (value: any) => Record<string, unknown>;
|
|
11
|
+
export declare const canonical: (value: any) => string;
|
|
12
|
+
export declare const binding: (namespace: any, value: any) => string;
|
|
13
|
+
export declare const equal: (left: any, right: any) => boolean;
|
|
14
|
+
export declare function referenceId(value: any, prefix: any, kind: any, context: any): string;
|
|
15
|
+
export declare function productId(value: any, context: any): string;
|
|
16
|
+
export declare function failure(error: any, scheduleId: any): {
|
|
17
|
+
status: string;
|
|
18
|
+
scheduleId: any;
|
|
19
|
+
reason: string;
|
|
20
|
+
} | {
|
|
21
|
+
scheduleId?: undefined;
|
|
22
|
+
status: any;
|
|
23
|
+
reason: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const readInput: z.ZodObject<{
|
|
26
|
+
prepared: z.ZodUnknown;
|
|
27
|
+
freshSubscription: z.ZodUnknown;
|
|
28
|
+
targetPrice: z.ZodUnknown;
|
|
29
|
+
billingCustomer: z.ZodOptional<z.ZodUnknown>;
|
|
30
|
+
apiVersion: z.ZodString;
|
|
31
|
+
observedAt: z.ZodNumber;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export declare const configureInput: z.ZodObject<{
|
|
34
|
+
prepared: z.ZodUnknown;
|
|
35
|
+
freshSubscription: z.ZodUnknown;
|
|
36
|
+
targetPrice: z.ZodUnknown;
|
|
37
|
+
billingCustomer: z.ZodOptional<z.ZodUnknown>;
|
|
38
|
+
apiVersion: z.ZodString;
|
|
39
|
+
observedAt: z.ZodNumber;
|
|
40
|
+
attachReceipt: z.ZodUnknown;
|
|
41
|
+
schedule: z.ZodUnknown;
|
|
42
|
+
configureKey: z.ZodString;
|
|
43
|
+
firstDispatchedAt: z.ZodNumber;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export declare function supportedVersion(version: any): any;
|
|
46
|
+
//# sourceMappingURL=f02.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"f02.d.mts","sourceRoot":"","sources":["../../../../../../../../src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS,aAIS,CAAC;AAChC,eAAO,MAAM,UAAU,8BAI4B,CAAC;AACpD,qBAAa,eAAgB,SAAQ,KAAK;IACxC,IAAI,MAAC;IACL,YAAY,IAAI,KAAA,EAAE,MAAM,KAAA,EAGvB;CACF;AACD,wBAAgB,WAAW,CAAC,MAAM,KAAA,QAEjC;AACD,wBAAgB,QAAQ,CAAC,MAAM,KAAA,QAE9B;AACD,eAAO,MAAM,MAAM,yCAA4D,CAAC;AAChF,eAAO,MAAM,SAAS,wBAAoD,CAAC;AAC3E,eAAO,MAAM,OAAO,wCACmB,CAAC;AACxC,eAAO,MAAM,KAAK,oCAAwD,CAAC;AAW3E,wBAAgB,WAAW,CAAC,KAAK,KAAA,EAAE,MAAM,KAAA,EAAE,IAAI,KAAA,EAAE,OAAO,KAAA,UAOvD;AACD,wBAAgB,SAAS,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA,UAQvC;AACD,wBAAgB,OAAO,CAAC,KAAK,KAAA,EAAE,UAAU,KAAA;;;;;;;;EAOxC;AACD,eAAO,MAAM,SAAS;;;;;;;kBASX,CAAC;AACZ,eAAO,MAAM,cAAc;;;;;;;;;;;kBAOhB,CAAC;AACZ,wBAAgB,gBAAgB,CAAC,OAAO,KAAA,OAIvC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { renewalSnapshot } from "./f10.mjs";
|
|
3
|
+
export const timestamp = z
|
|
4
|
+
.number()
|
|
5
|
+
.int()
|
|
6
|
+
.nonnegative()
|
|
7
|
+
.max(Number.MAX_SAFE_INTEGER);
|
|
8
|
+
export const resourceId = (prefix) => z
|
|
9
|
+
.string()
|
|
10
|
+
.max(255)
|
|
11
|
+
.regex(new RegExp(`^${prefix}_[A-Za-z0-9_]+$`));
|
|
12
|
+
export class ProjectionError extends Error {
|
|
13
|
+
kind;
|
|
14
|
+
constructor(kind, reason) {
|
|
15
|
+
super(reason);
|
|
16
|
+
this.kind = kind;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function unsupported(reason) {
|
|
20
|
+
throw new ProjectionError("unsupported", reason);
|
|
21
|
+
}
|
|
22
|
+
export function conflict(reason) {
|
|
23
|
+
throw new ProjectionError("conflict", reason);
|
|
24
|
+
}
|
|
25
|
+
export const object = (value) => z.record(z.string(), z.unknown()).parse(value);
|
|
26
|
+
export const canonical = (value) => JSON.stringify(renewalSnapshot(value));
|
|
27
|
+
export const binding = (namespace, value) => `${namespace}:v1:${canonical(value)}`;
|
|
28
|
+
export const equal = (left, right) => canonical(left) === canonical(right);
|
|
29
|
+
function referenceFacts(reference, context) {
|
|
30
|
+
if (context &&
|
|
31
|
+
((reference.livemode !== undefined &&
|
|
32
|
+
reference.livemode !== context.livemode) ||
|
|
33
|
+
(reference.customer_account !== undefined &&
|
|
34
|
+
reference.customer_account !== context.customerAccountId)))
|
|
35
|
+
unsupported("expanded_reference_scope_mismatch");
|
|
36
|
+
}
|
|
37
|
+
export function referenceId(value, prefix, kind, context) {
|
|
38
|
+
if (typeof value === "string")
|
|
39
|
+
return resourceId(prefix).parse(value);
|
|
40
|
+
const reference = object(value);
|
|
41
|
+
if (reference.object !== kind || reference.deleted === true)
|
|
42
|
+
unsupported(`invalid_${kind}_reference`);
|
|
43
|
+
referenceFacts(reference, context);
|
|
44
|
+
return resourceId(prefix).parse(reference.id);
|
|
45
|
+
}
|
|
46
|
+
export function productId(value, context) {
|
|
47
|
+
const id = z.string().min(1).max(255).regex(/\S/);
|
|
48
|
+
if (typeof value === "string")
|
|
49
|
+
return id.parse(value);
|
|
50
|
+
const reference = object(value);
|
|
51
|
+
if (reference.object !== "product" || reference.deleted === true)
|
|
52
|
+
unsupported("invalid_product_reference");
|
|
53
|
+
referenceFacts(reference, context);
|
|
54
|
+
return id.parse(reference.id);
|
|
55
|
+
}
|
|
56
|
+
export function failure(error, scheduleId) {
|
|
57
|
+
const known = error instanceof ProjectionError;
|
|
58
|
+
const kind = known ? error.kind : "unsupported";
|
|
59
|
+
const reason = known ? error.message : "incomplete_or_unsupported_schema";
|
|
60
|
+
if (kind === "unsupported" && scheduleId)
|
|
61
|
+
return { status: "attached_unconfigured", scheduleId, reason };
|
|
62
|
+
return { status: kind, reason };
|
|
63
|
+
}
|
|
64
|
+
export const readInput = z
|
|
65
|
+
.object({
|
|
66
|
+
prepared: z.unknown(),
|
|
67
|
+
freshSubscription: z.unknown(),
|
|
68
|
+
targetPrice: z.unknown(),
|
|
69
|
+
billingCustomer: z.unknown().optional(),
|
|
70
|
+
apiVersion: z.string(),
|
|
71
|
+
observedAt: timestamp,
|
|
72
|
+
})
|
|
73
|
+
.strict();
|
|
74
|
+
export const configureInput = readInput
|
|
75
|
+
.extend({
|
|
76
|
+
attachReceipt: z.unknown(),
|
|
77
|
+
schedule: z.unknown(),
|
|
78
|
+
configureKey: z.string(),
|
|
79
|
+
firstDispatchedAt: timestamp,
|
|
80
|
+
})
|
|
81
|
+
.strict();
|
|
82
|
+
export function supportedVersion(version) {
|
|
83
|
+
if (version !== "2026-09-30.endive")
|
|
84
|
+
unsupported("unqualified_api_version_profile");
|
|
85
|
+
return version;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=f02.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"f02.mjs","sourceRoot":"","sources":["../../../../../../../../src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f02.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,GAAG,EAAE;KACL,WAAW,EAAE;KACb,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,EAAE,CACnC,CAAC;KACE,MAAM,EAAE;KACR,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,MAAM,iBAAiB,CAAC,CAAC,CAAC;AACpD,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,IAAI,CAAC;IACL,YAAY,IAAI,EAAE,MAAM;QACtB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AACD,MAAM,UAAU,WAAW,CAAC,MAAM;IAChC,MAAM,IAAI,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AACD,MAAM,UAAU,QAAQ,CAAC,MAAM;IAC7B,MAAM,IAAI,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC;AACD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,EAAE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;KACvB,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;IACxB,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,SAAS;CACtB,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS;KACpC,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;IAC1B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,iBAAiB,EAAE,SAAS;CAC7B,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,MAAM,UAAU,gBAAgB,CAAC,OAAO;IACtC,IAAI,OAAO,KAAK,mBAAmB;QACjC,WAAW,CAAC,iCAAiC,CAAC,CAAC;IACjD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare function qualifySourceDiscounts(value: any, level: any, context: any, customerId: any, observedAt: any): {
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
id: string;
|
|
4
|
+
object: "discount";
|
|
5
|
+
deleted?: false | undefined;
|
|
6
|
+
customer_account: string;
|
|
7
|
+
customer?: string | {
|
|
8
|
+
[x: string]: unknown;
|
|
9
|
+
id: string;
|
|
10
|
+
object: "customer";
|
|
11
|
+
deleted?: false | undefined;
|
|
12
|
+
livemode?: boolean | undefined;
|
|
13
|
+
customer_account?: string | null | undefined;
|
|
14
|
+
} | null | undefined;
|
|
15
|
+
subscription: string | null;
|
|
16
|
+
subscription_item: string | null;
|
|
17
|
+
start: number;
|
|
18
|
+
end: null;
|
|
19
|
+
source: {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
type: "coupon";
|
|
22
|
+
coupon: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
id: string;
|
|
25
|
+
object: "coupon";
|
|
26
|
+
deleted?: false | undefined;
|
|
27
|
+
livemode?: boolean | undefined;
|
|
28
|
+
duration: "forever";
|
|
29
|
+
applies_to?: {
|
|
30
|
+
products: string[];
|
|
31
|
+
} | undefined;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
//# sourceMappingURL=f03.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"f03.d.mts","sourceRoot":"","sources":["../../../../../../../../src/client/billing/renewalAttach/internal/c10/test-fixtures/frozen/f03.mjs"],"names":[],"mappings":"AAoDA,wBAAgB,sBAAsB,CACpC,KAAK,KAAA,EACL,KAAK,KAAA,EACL,OAAO,KAAA,EACP,UAAU,KAAA,EACV,UAAU,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA4CX"}
|