@fantastic.dev/better-stripe 0.90.0 → 0.92.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/ownedAcquisition.d.ts +41 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +187 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts +2 -23
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +1 -112
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts +8 -3
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts +1 -1
- package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts +14 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.js +444 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.js +99 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.js +274 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.js +61 -0
- package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.js +9 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.d.ts +39 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.js +245 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts +88 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.js +289 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.js +383 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts +9 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.js +216 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.js +11 -0
- package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.js +190 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.js +317 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.d.ts +84 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.js +27 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts +18 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js +229 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +163 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +443 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +467 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts +6 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js +59 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts +10 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js +48 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts +20 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js +44 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.d.ts +42 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.js +158 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js +214 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts +33 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.js +208 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.js +25 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.js +93 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.js +153 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts +22 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.js +221 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.js +101 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.js +186 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +498 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +21 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js +119 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -0
- package/dist/client/connect/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 +26 -8
- package/docs/renewal-material-observation.md +58 -0
- package/docs/renewal-phase-assembly.md +68 -0
- package/docs/renewal-raw-acquisition.md +19 -5
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +304 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +2 -160
- package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +15 -3
- package/src/client/billing/renewalAttach/internal/configure/actor.ts +586 -0
- package/src/client/billing/renewalAttach/internal/configure/capture.ts +117 -0
- package/src/client/billing/renewalAttach/internal/configure/dispatch.integration.test.ts +32 -0
- package/src/client/billing/renewalAttach/internal/configure/limits.test.ts +510 -0
- package/src/client/billing/renewalAttach/internal/configure/order.integration.test.ts +207 -0
- package/src/client/billing/renewalAttach/internal/configure/output.ts +372 -0
- package/src/client/billing/renewalAttach/internal/configure/ownedContinuation.ts +56 -0
- package/src/client/billing/renewalAttach/internal/configure/ownership.integration.test.ts +148 -0
- package/src/client/billing/renewalAttach/internal/configure/replay.integration.test.ts +173 -0
- package/src/client/billing/renewalAttach/internal/configure/replay.ts +13 -0
- package/src/client/billing/renewalAttach/internal/configure/request.ts +312 -0
- package/src/client/billing/renewalAttach/internal/configure/transport.integration.test.ts +507 -0
- package/src/client/billing/renewalAttach/internal/configure/transport.ts +348 -0
- package/src/client/billing/renewalAttach/internal/observation/actor.ts +487 -0
- package/src/client/billing/renewalAttach/internal/observation/capture.ts +251 -0
- package/src/client/billing/renewalAttach/internal/observation/configureAcknowledgement.ts +20 -0
- package/src/client/billing/renewalAttach/internal/observation/observation.integration.test.ts +220 -0
- package/src/client/billing/renewalAttach/internal/observation/observationConfigureACK.integration.test.ts +36 -0
- package/src/client/billing/renewalAttach/internal/observation/observationConfigureACKControls.integration.test.ts +48 -0
- package/src/client/billing/renewalAttach/internal/observation/observationConfigureACKLifecycle.integration.test.ts +44 -0
- package/src/client/billing/renewalAttach/internal/observation/observationConfiguredHistory.integration.test.ts +34 -0
- package/src/client/billing/renewalAttach/internal/observation/observationRetirement.integration.test.ts +60 -0
- package/src/client/billing/renewalAttach/internal/observation/profile.ts +264 -0
- package/src/client/billing/renewalAttach/internal/observation/record.ts +408 -0
- package/src/client/billing/renewalAttach/internal/observation/types.ts +107 -0
- package/src/client/billing/renewalAttach/internal/operations/configureReadTransport.ts +285 -0
- package/src/client/billing/renewalAttach/internal/operations/defaultBindings.test.ts +69 -0
- package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +574 -0
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.integration.test.ts +34 -0
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +535 -0
- package/src/client/billing/renewalAttach/internal/operations/ownedAwait.ts +63 -0
- package/src/client/billing/renewalAttach/internal/operations/providerFailure.integration.test.ts +61 -0
- package/src/client/billing/renewalAttach/internal/operations/providerFailure.ts +66 -0
- package/src/client/billing/renewalAttach/internal/operations/sourceOperations.ts +50 -0
- package/src/client/billing/renewalAttach/internal/operations/transport.integration.test.ts +116 -0
- package/src/client/billing/renewalAttach/internal/operations/types.ts +223 -0
- package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.integration.test.ts +285 -0
- package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.ts +258 -0
- package/src/client/billing/renewalAttach/internal/preflight/configureReads.integration.test.ts +139 -0
- package/src/client/billing/renewalAttach/internal/preflight/grammar.ts +257 -0
- package/src/client/billing/renewalAttach/internal/preflight/output.ts +42 -0
- package/src/client/billing/renewalAttach/internal/preflight/owner.integration.test.ts +82 -0
- package/src/client/billing/renewalAttach/internal/preflight/preflight.integration.test.ts +354 -0
- package/src/client/billing/renewalAttach/internal/preflight/record.ts +127 -0
- package/src/client/billing/renewalAttach/internal/preflight/relations.ts +209 -0
- package/src/client/billing/renewalAttach/internal/recovery/material.ts +311 -0
- package/src/client/billing/renewalAttach/internal/recovery/output.ts +136 -0
- package/src/client/billing/renewalAttach/internal/recovery/record.ts +230 -0
- package/src/client/billing/renewalAttach/internal/recovery/recovery.integration.test.ts +463 -0
- package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +599 -0
- package/src/client/billing/renewalAttach/internal/recovery/relation.ts +175 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachEntries.ts +217 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachObservations.ts +226 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenario.ts +556 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioAssertions.ts +180 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioBarriers.ts +144 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightAssertions.ts +122 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightBarriers.ts +330 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightControls.ts +139 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightOperation.ts +513 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadNativeBaseline.ts +344 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadOperation.ts +278 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadPort.ts +17 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteAssertions.ts +537 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteBarriers.ts +125 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDeclarations.ts +325 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDelegate.ts +38 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteHistory.ts +471 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteObservations.ts +515 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteOperation.ts +587 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationAssertions.ts +211 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKAssertions.ts +115 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKDeclarations.ts +141 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleAssertions.ts +74 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleDeclarations.ts +79 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleInstrumentation.ts +207 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleOperation.ts +494 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKOperation.ts +452 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryAssertions.ts +88 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryDeclarations.ts +170 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryNative.ts +99 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryOperation.ts +411 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationDeclarations.ts +192 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationHTTP.ts +197 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationObservations.ts +269 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationOperation.ts +262 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationProbe.ts +319 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/ownedOperations.ts +94 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/sourceOperationPort.ts +16 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/stockHttp.ts +21 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { closed } from "../material/nodeKernel.js";
|
|
2
|
+
export const recordFamilies = Object.freeze({
|
|
3
|
+
"/request/logicalBinding": "renewal",
|
|
4
|
+
"/request/attachReceiptBinding": "renewal-attach-receipt",
|
|
5
|
+
"/request/baselineBinding": "renewal-baseline",
|
|
6
|
+
"/request/defaultSettingsBinding": "renewal-defaults",
|
|
7
|
+
"/request/requestIdentity/binding": "renewal-configure",
|
|
8
|
+
"/attachReceipt/logicalBinding": "renewal",
|
|
9
|
+
"/attachReceipt/request/logicalBinding": "renewal",
|
|
10
|
+
"/attachReceipt/request/requestIdentity/binding": "renewal-attach",
|
|
11
|
+
"/attachReceipt/binding": "renewal-attach-receipt",
|
|
12
|
+
});
|
|
13
|
+
export const outputFamilies = Object.freeze({
|
|
14
|
+
"/originalRecord/request/logicalBinding": "renewal",
|
|
15
|
+
"/originalRecord/request/attachReceiptBinding": "renewal-attach-receipt",
|
|
16
|
+
"/originalRecord/request/baselineBinding": "renewal-baseline",
|
|
17
|
+
"/originalRecord/request/defaultSettingsBinding": "renewal-defaults",
|
|
18
|
+
"/originalRecord/request/requestIdentity/binding": "renewal-configure",
|
|
19
|
+
"/request/logicalBinding": "renewal",
|
|
20
|
+
"/request/attachReceiptBinding": "renewal-attach-receipt",
|
|
21
|
+
"/request/baselineBinding": "renewal-baseline",
|
|
22
|
+
"/request/defaultSettingsBinding": "renewal-defaults",
|
|
23
|
+
"/request/requestIdentity/binding": "renewal-configure",
|
|
24
|
+
"/originalRecord/attachReceipt/logicalBinding": "renewal",
|
|
25
|
+
"/originalRecord/attachReceipt/request/logicalBinding": "renewal",
|
|
26
|
+
"/originalRecord/attachReceipt/request/requestIdentity/binding": "renewal-attach",
|
|
27
|
+
"/originalRecord/attachReceipt/binding": "renewal-attach-receipt",
|
|
28
|
+
});
|
|
29
|
+
const schema = {
|
|
30
|
+
success: {
|
|
31
|
+
root: {
|
|
32
|
+
required: [
|
|
33
|
+
"status",
|
|
34
|
+
"originalRecord",
|
|
35
|
+
"currentEvidence",
|
|
36
|
+
"request",
|
|
37
|
+
"operationalAuthority",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
originalRecord: {
|
|
41
|
+
required: ["configuration", "request", "attachReceipt", "originalBundle"],
|
|
42
|
+
},
|
|
43
|
+
currentEvidence: {
|
|
44
|
+
required: ["bundle", "schedule", "observedAt"],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
rawConfigurationCapture: {
|
|
48
|
+
required: [
|
|
49
|
+
"preparation",
|
|
50
|
+
"attachReceipt",
|
|
51
|
+
"freshSubscription",
|
|
52
|
+
"targetPrice",
|
|
53
|
+
"schedule",
|
|
54
|
+
"apiVersion",
|
|
55
|
+
"observedAt",
|
|
56
|
+
"firstDispatchedAt",
|
|
57
|
+
"configureKey",
|
|
58
|
+
],
|
|
59
|
+
optional: ["billingCustomer"],
|
|
60
|
+
preparationRequired: ["subscription", "targetPrice", "expected", "key"],
|
|
61
|
+
preparationOptional: ["billingCustomer"],
|
|
62
|
+
rawAttachReceiptRequired: [
|
|
63
|
+
"attachRequest",
|
|
64
|
+
"actualDispatch",
|
|
65
|
+
"providerSnapshot",
|
|
66
|
+
],
|
|
67
|
+
rawAttachRequestRequired: [
|
|
68
|
+
"preparation",
|
|
69
|
+
"apiVersion",
|
|
70
|
+
"attachKey",
|
|
71
|
+
"firstDispatchedAt",
|
|
72
|
+
],
|
|
73
|
+
rawActualDispatchRequired: [
|
|
74
|
+
"scope",
|
|
75
|
+
"apiVersion",
|
|
76
|
+
"method",
|
|
77
|
+
"path",
|
|
78
|
+
"payload",
|
|
79
|
+
"key",
|
|
80
|
+
"firstDispatchedAt",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
closedControlSchemas: {
|
|
84
|
+
"originalRecord/request": [
|
|
85
|
+
"version",
|
|
86
|
+
"stage",
|
|
87
|
+
"scope",
|
|
88
|
+
"apiVersion",
|
|
89
|
+
"logicalBinding",
|
|
90
|
+
"scheduleId",
|
|
91
|
+
"method",
|
|
92
|
+
"path",
|
|
93
|
+
"key",
|
|
94
|
+
"payload",
|
|
95
|
+
"firstDispatchedAt",
|
|
96
|
+
"attachReceiptBinding",
|
|
97
|
+
"baselineBinding",
|
|
98
|
+
"defaultSettingsBinding",
|
|
99
|
+
"status",
|
|
100
|
+
"providerQualification",
|
|
101
|
+
"profile",
|
|
102
|
+
"requestIdentity",
|
|
103
|
+
],
|
|
104
|
+
request: [
|
|
105
|
+
"version",
|
|
106
|
+
"stage",
|
|
107
|
+
"scope",
|
|
108
|
+
"apiVersion",
|
|
109
|
+
"logicalBinding",
|
|
110
|
+
"scheduleId",
|
|
111
|
+
"method",
|
|
112
|
+
"path",
|
|
113
|
+
"key",
|
|
114
|
+
"payload",
|
|
115
|
+
"firstDispatchedAt",
|
|
116
|
+
"attachReceiptBinding",
|
|
117
|
+
"baselineBinding",
|
|
118
|
+
"defaultSettingsBinding",
|
|
119
|
+
"status",
|
|
120
|
+
"providerQualification",
|
|
121
|
+
"profile",
|
|
122
|
+
"requestIdentity",
|
|
123
|
+
],
|
|
124
|
+
"originalRecord/attachReceipt": [
|
|
125
|
+
"version",
|
|
126
|
+
"stage",
|
|
127
|
+
"scope",
|
|
128
|
+
"logicalBinding",
|
|
129
|
+
"request",
|
|
130
|
+
"scheduleId",
|
|
131
|
+
"subscriptionId",
|
|
132
|
+
"customerAccountId",
|
|
133
|
+
"livemode",
|
|
134
|
+
"providerSnapshot",
|
|
135
|
+
"binding",
|
|
136
|
+
],
|
|
137
|
+
"originalRecord/attachReceipt/request": [
|
|
138
|
+
"version",
|
|
139
|
+
"stage",
|
|
140
|
+
"scope",
|
|
141
|
+
"apiVersion",
|
|
142
|
+
"logicalBinding",
|
|
143
|
+
"method",
|
|
144
|
+
"path",
|
|
145
|
+
"payload",
|
|
146
|
+
"key",
|
|
147
|
+
"firstDispatchedAt",
|
|
148
|
+
"requestIdentity",
|
|
149
|
+
],
|
|
150
|
+
"request/requestIdentity": ["key", "binding"],
|
|
151
|
+
"originalRecord/request/requestIdentity": ["key", "binding"],
|
|
152
|
+
"originalRecord/attachReceipt/request/requestIdentity": ["key", "binding"],
|
|
153
|
+
"originalRecord/originalBundle": [
|
|
154
|
+
"wireSubscription",
|
|
155
|
+
"wireTargetPrice",
|
|
156
|
+
"wireBillingCustomer",
|
|
157
|
+
"couponReads",
|
|
158
|
+
"derivedCouponJoins",
|
|
159
|
+
],
|
|
160
|
+
"currentEvidence/bundle": [
|
|
161
|
+
"wireSubscription",
|
|
162
|
+
"wireTargetPrice",
|
|
163
|
+
"wireBillingCustomer",
|
|
164
|
+
"couponReads",
|
|
165
|
+
"derivedCouponJoins",
|
|
166
|
+
],
|
|
167
|
+
"eachBundle/derivedCouponJoins": ["subscription", "item"],
|
|
168
|
+
"eachBundle/couponReads/row": ["couponId", "wireCoupon", "association"],
|
|
169
|
+
"eachBundle/couponReads/row/association": ["resource", "ordinal"],
|
|
170
|
+
"eachBundle/derivedCouponJoins/eachRow": [
|
|
171
|
+
"index",
|
|
172
|
+
"discountId",
|
|
173
|
+
"originalCouponReference",
|
|
174
|
+
"couponReadIndex",
|
|
175
|
+
"joinedDiscount",
|
|
176
|
+
],
|
|
177
|
+
"eachProjectedRequest/profile": [
|
|
178
|
+
"apiVersion",
|
|
179
|
+
"billingMode",
|
|
180
|
+
"cadence",
|
|
181
|
+
"anchor",
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
export function controls(x, path, output) {
|
|
186
|
+
const prefix = output ? "/originalRecord" : "";
|
|
187
|
+
if (path === (output ? "/originalRecord" : ""))
|
|
188
|
+
closed(x, schema.success.originalRecord.required);
|
|
189
|
+
if (output && path === "")
|
|
190
|
+
closed(x, schema.success.root.required);
|
|
191
|
+
if (output && path === "/currentEvidence")
|
|
192
|
+
closed(x, schema.success.currentEvidence.required);
|
|
193
|
+
if (path === prefix + "/configuration")
|
|
194
|
+
closed(x, schema.rawConfigurationCapture.required, schema.rawConfigurationCapture.optional);
|
|
195
|
+
if (path === prefix + "/configuration/preparation" ||
|
|
196
|
+
path === prefix + "/configuration/attachReceipt/attachRequest/preparation")
|
|
197
|
+
closed(x, schema.rawConfigurationCapture.preparationRequired, schema.rawConfigurationCapture.preparationOptional);
|
|
198
|
+
if (path === prefix + "/configuration/attachReceipt")
|
|
199
|
+
closed(x, schema.rawConfigurationCapture.rawAttachReceiptRequired);
|
|
200
|
+
if (path === prefix + "/configuration/attachReceipt/attachRequest")
|
|
201
|
+
closed(x, schema.rawConfigurationCapture.rawAttachRequestRequired);
|
|
202
|
+
if (path === prefix + "/configuration/attachReceipt/actualDispatch")
|
|
203
|
+
closed(x, schema.rawConfigurationCapture.rawActualDispatchRequired);
|
|
204
|
+
const relative = output ? path.replace(/^\//, "") : "originalRecord" + path;
|
|
205
|
+
if (Object.prototype.hasOwnProperty.call(schema.closedControlSchemas, relative))
|
|
206
|
+
closed(x, schema.closedControlSchemas[relative]);
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=grammar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/preflight/grammar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAkCnD,MAAM,CAAC,MAAM,cAAc,GAAqC,MAAM,CAAC,MAAM,CAAC;IAC5E,yBAAyB,EAAE,SAAS;IACpC,+BAA+B,EAAE,wBAAwB;IACzD,0BAA0B,EAAE,kBAAkB;IAC9C,iCAAiC,EAAE,kB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B;QACpC,MAAM,CACJ,CAAC,EACD,MAAM,CAAC,uBAAuB,CAAC,QAAQ,EACvC,MAAM,CAAC,uBAAuB,CAAC,QAAQ,CACxC,CAAC;IACJ,IACE,IAAI,KAAK,MAAM,GAAG,4BAA4B;QAC9C,IAAI,KAAK,MAAM,GAAG,wDAAwD;QAE1E,MAAM,CACJ,CAAC,EACD,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,EAClD,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CACnD,CAAC;IACJ,IAAI,IAAI,KAAK,MAAM,GAAG,8BAA8B;QAClD,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,uBAAuB,CAAC,wBAAwB,CAAC,CAAC;IACrE,IAAI,IAAI,KAAK,MAAM,GAAG,4CAA4C;QAChE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,uBAAuB,CAAC,wBAAwB,CAAC,CAAC;IACrE,IAAI,IAAI,KAAK,MAAM,GAAG,6CAA6C;QACjE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC5E,IACE,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,QAAQ,CAAC;QAE3E,MAAM,CACJ,CAAC,EACA,MAAM,CAAC,oBAA0D,CAChE,QAAQ,CACR,CACH,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PreflightRecord, CurrentEvidence, PreflightOutput } from "./grammar.js";
|
|
2
|
+
import type { ProjectedRenewalConfigurationV2, RenewalScheduleAttachmentReceiptV2 } from "../../../renewalV2/index.js";
|
|
3
|
+
export declare function releasePreflight(record: PreflightRecord, currentEvidence: CurrentEvidence, request: ProjectedRenewalConfigurationV2, originalC6: ProjectedRenewalConfigurationV2, ackC3: RenewalScheduleAttachmentReceiptV2): PreflightOutput;
|
|
4
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/preflight/output.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,eAAe,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,+BAA+B,EAC/B,kCAAkC,EACnC,MAAM,6BAA6B,CAAC;AACrC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,eAAe,EACvB,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,+BAA+B,EACxC,UAAU,EAAE,+BAA+B,EAC3C,KAAK,EAAE,kCAAkC,GACxC,eAAe,CAqBjB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OWNER } from "../originalOwner.js";
|
|
2
|
+
import { need, freeze, materialize } from "../material/nodeKernel.js";
|
|
3
|
+
import { equal } from "../../../renewalAggregate/shared.js";
|
|
4
|
+
import { capturePreflightOutput } from "./record.js";
|
|
5
|
+
import { expectedSlots } from "./relations.js";
|
|
6
|
+
export function releasePreflight(record, currentEvidence, request, originalC6, ackC3) {
|
|
7
|
+
OWNER.check();
|
|
8
|
+
need(equal(record.request, originalC6) &&
|
|
9
|
+
equal(request, originalC6) &&
|
|
10
|
+
equal(record.attachReceipt, ackC3));
|
|
11
|
+
const result = {
|
|
12
|
+
status: "configure_preflight_consistent",
|
|
13
|
+
originalRecord: record,
|
|
14
|
+
currentEvidence,
|
|
15
|
+
request,
|
|
16
|
+
operationalAuthority: false,
|
|
17
|
+
};
|
|
18
|
+
const captured = capturePreflightOutput(result), expected = expectedSlots(originalC6, ackC3, true);
|
|
19
|
+
for (const [path, value] of Object.entries(expected))
|
|
20
|
+
need(captured.slots.get(path) === value);
|
|
21
|
+
const output = freeze(materialize(captured.node));
|
|
22
|
+
OWNER.check();
|
|
23
|
+
return output;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/preflight/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAU/C,MAAM,UAAU,gBAAgB,CAC9B,MAAuB,EACvB,eAAgC,EAChC,OAAwC,EACxC,UAA2C,EAC3C,KAAyC;IAEzC,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,IAAI,CACF,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC;QAC/B,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC;QAC1B,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,CACrC,CAAC;IACF,MAAM,MAAM,GAAG;QACb,MAAM,EAAE,gCAAgC;QACxC,cAAc,EAAE,MAAM;QACtB,eAAe;QACf,OAAO;QACP,oBAAoB,EAAE,KAAK;KAC5B,CAAC;IACF,MAAM,QAAQ,GAAG,sBAAsB,CAAC,MAAM,CAAC,EAC7C,QAAQ,GAAG,aAAa,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACpD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;QAClD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,OAAO,MAAyB,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Node } from "../material/nodeKernel.js";
|
|
2
|
+
import type { Configuration } from "./grammar.js";
|
|
3
|
+
import type { Bundle } from "../material/capture.js";
|
|
4
|
+
export interface CapturedRecord {
|
|
5
|
+
readonly node: Node;
|
|
6
|
+
readonly slots: ReadonlyMap<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export interface CapturedPreflightRecord {
|
|
9
|
+
readonly captured: CapturedRecord;
|
|
10
|
+
readonly configuration: Configuration;
|
|
11
|
+
readonly originalBundle: Bundle;
|
|
12
|
+
}
|
|
13
|
+
export declare function capturePreflightRecord(raw: unknown): CapturedPreflightRecord;
|
|
14
|
+
/** Package-private capture; release owns the same before/after Owner guards as the Source body. */
|
|
15
|
+
export declare function capturePreflightOutput(value: unknown): CapturedRecord;
|
|
16
|
+
//# sourceMappingURL=record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/preflight/record.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AACD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAuFD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,uBAAuB,CAW5E;AAED,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAErE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { OWNER } from "../originalOwner.js";
|
|
3
|
+
import { requiredJSONSnapshot } from "../material/requiredJson.js";
|
|
4
|
+
import { objectNode, scalarNode, encode, materialize, need, freeze, } from "../material/nodeKernel.js";
|
|
5
|
+
import { controls, recordFamilies, outputFamilies } from "./grammar.js";
|
|
6
|
+
const pointer = (key) => key.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
7
|
+
// Only lexical entry points below choose these TWO fixed path tables; no caller paths/families.
|
|
8
|
+
function capture(value, output) {
|
|
9
|
+
const families = output ? outputFamilies : recordFamilies, slots = new Map(), active = new Set();
|
|
10
|
+
let nodes = 0, rawChars = 0;
|
|
11
|
+
function walk(x, path, depth) {
|
|
12
|
+
need(++nodes <= 10000 && depth <= 40 && !types.isProxy(x));
|
|
13
|
+
if (Object.prototype.hasOwnProperty.call(families, path)) {
|
|
14
|
+
need(typeof x === "string" &&
|
|
15
|
+
new RegExp("^" + families[path] + ":v2:sha256:[0-9a-f]{64}$").test(x));
|
|
16
|
+
slots.set(path, x);
|
|
17
|
+
rawChars += x.length;
|
|
18
|
+
need(rawChars <= 500000);
|
|
19
|
+
return scalarNode(x);
|
|
20
|
+
}
|
|
21
|
+
if (x === null || typeof x !== "object") {
|
|
22
|
+
requiredJSONSnapshot(x);
|
|
23
|
+
if (typeof x === "string")
|
|
24
|
+
rawChars += x.length;
|
|
25
|
+
need(rawChars <= 500000);
|
|
26
|
+
return scalarNode(x);
|
|
27
|
+
}
|
|
28
|
+
need(!active.has(x));
|
|
29
|
+
active.add(x);
|
|
30
|
+
const array = Array.isArray(x), proto = Object.getPrototypeOf(x);
|
|
31
|
+
need(array
|
|
32
|
+
? proto === Array.prototype
|
|
33
|
+
: proto === Object.prototype || proto === null);
|
|
34
|
+
const keys = Reflect.ownKeys(x);
|
|
35
|
+
need(keys.length <= 10001);
|
|
36
|
+
controls(x, path, output);
|
|
37
|
+
const entries = [];
|
|
38
|
+
const length = array ? Object.getOwnPropertyDescriptor(x, "length") : null;
|
|
39
|
+
const count = length?.value;
|
|
40
|
+
if (array)
|
|
41
|
+
need(length &&
|
|
42
|
+
"value" in length &&
|
|
43
|
+
typeof count === "number" &&
|
|
44
|
+
Number.isSafeInteger(count) &&
|
|
45
|
+
count <= 10000);
|
|
46
|
+
for (const key of keys) {
|
|
47
|
+
need(typeof key === "string");
|
|
48
|
+
if (array && key === "length")
|
|
49
|
+
continue;
|
|
50
|
+
const d = Object.getOwnPropertyDescriptor(x, key);
|
|
51
|
+
need(d && d.enumerable && "value" in d);
|
|
52
|
+
requiredJSONSnapshot(key);
|
|
53
|
+
requiredJSONSnapshot({ [key]: d.value === null ? null : true });
|
|
54
|
+
rawChars += key.length;
|
|
55
|
+
need(rawChars <= 500000);
|
|
56
|
+
need(!array ||
|
|
57
|
+
(/^(0|[1-9][0-9]*)$/.test(key) && Number(key) < count));
|
|
58
|
+
entries.push([key, walk(d.value, path + "/" + pointer(key), depth + 1)]);
|
|
59
|
+
}
|
|
60
|
+
active.delete(x);
|
|
61
|
+
if (array) {
|
|
62
|
+
need(entries.length === count);
|
|
63
|
+
entries.sort(([a], [b]) => Number(a) - Number(b));
|
|
64
|
+
return Object.freeze({
|
|
65
|
+
kind: "array",
|
|
66
|
+
entries: Object.freeze(entries.map((entry) => Object.freeze(entry))),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return objectNode(entries);
|
|
70
|
+
}
|
|
71
|
+
const node = walk(value, "", 0);
|
|
72
|
+
need(slots.size === Object.keys(families).length);
|
|
73
|
+
encode(node);
|
|
74
|
+
return Object.freeze({ node, slots });
|
|
75
|
+
}
|
|
76
|
+
const child = (node, key) => {
|
|
77
|
+
need(node.kind === "object");
|
|
78
|
+
const row = node.entries.find(([k]) => k === key);
|
|
79
|
+
need(row);
|
|
80
|
+
return row[1];
|
|
81
|
+
};
|
|
82
|
+
export function capturePreflightRecord(raw) {
|
|
83
|
+
OWNER.check();
|
|
84
|
+
const captured = capture(raw, false);
|
|
85
|
+
const configuration = freeze(materialize(child(captured.node, "configuration"))), originalBundle = freeze(materialize(child(captured.node, "originalBundle")));
|
|
86
|
+
OWNER.check();
|
|
87
|
+
return Object.freeze({ captured, configuration, originalBundle });
|
|
88
|
+
}
|
|
89
|
+
/** Package-private capture; release owns the same before/after Owner guards as the Source body. */
|
|
90
|
+
export function capturePreflightOutput(value) {
|
|
91
|
+
return capture(value, true);
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/preflight/record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACL,UAAU,EACV,UAAU,EACV,MAAM,EACN,WAAW,EACX,IAAI,EACJ,MAAM,GACP,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAYxE,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC9E,gGAA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Ac;IACnD,OAAO,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CurrentEvidence, PreflightRecord } from "./grammar.js";
|
|
2
|
+
import type { CapturedPreflightRecord } from "./record.js";
|
|
3
|
+
import type { ProjectedRenewalConfigurationV2, RenewalScheduleAttachmentReceiptV2 } from "../../../renewalV2/index.js";
|
|
4
|
+
export declare function expectedSlots(request: ProjectedRenewalConfigurationV2, receipt: RenewalScheduleAttachmentReceiptV2, output: boolean): Record<string, string>;
|
|
5
|
+
export declare function verifyPreflightRecord(captured: CapturedPreflightRecord, originalC6: ProjectedRenewalConfigurationV2, ackC3: RenewalScheduleAttachmentReceiptV2): PreflightRecord;
|
|
6
|
+
export declare function verifyCurrentPreflight(record: PreflightRecord, evidence: CurrentEvidence): void;
|
|
7
|
+
//# sourceMappingURL=relations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relations.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/preflight/relations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAGhB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EACV,+BAA+B,EAC/B,kCAAkC,EACnC,MAAM,6BAA6B,CAAC;AAoErC,wBAAgB,aAAa,CAC3B,OAAO,EAAE,+BAA+B,EACxC,OAAO,EAAE,kCAAkC,EAC3C,MAAM,EAAE,OAAO,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkBxB;AACD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,uBAAuB,EACjC,UAAU,EAAE,+BAA+B,EAC3C,KAAK,EAAE,kCAAkC,GACxC,eAAe,CAUjB;AAuDD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,eAAe,QAgC1B"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { OWNER } from "../originalOwner.js";
|
|
2
|
+
import { closed, need, freeze, materialize } from "../material/nodeKernel.js";
|
|
3
|
+
import { equal, referenceId } from "../../../renewalAggregate/shared.js";
|
|
4
|
+
const couponID = (id) => typeof id === "string" &&
|
|
5
|
+
id.length > 0 &&
|
|
6
|
+
id.length <= 255 &&
|
|
7
|
+
/\S/.test(id) &&
|
|
8
|
+
id !== "." &&
|
|
9
|
+
id !== "..";
|
|
10
|
+
function rebuild(b) {
|
|
11
|
+
const subscription = b.wireSubscription;
|
|
12
|
+
need(subscription &&
|
|
13
|
+
subscription.items &&
|
|
14
|
+
Array.isArray(subscription.items.data) &&
|
|
15
|
+
subscription.items.data.length === 1);
|
|
16
|
+
const lists = [subscription.discounts, subscription.items.data[0].discounts];
|
|
17
|
+
need(lists.every((x) => Array.isArray(x) && x.length <= 20));
|
|
18
|
+
need(Array.isArray(b.couponReads) && b.couponReads.length <= 40);
|
|
19
|
+
const ids = new Map();
|
|
20
|
+
const joined = lists.map((list) => list.map((discount, index) => {
|
|
21
|
+
need(discount && discount.source);
|
|
22
|
+
const ref = discount.source.coupon, id = typeof ref === "string" ? ref : ref?.id;
|
|
23
|
+
need(couponID(id));
|
|
24
|
+
if (!ids.has(id)) {
|
|
25
|
+
const i = ids.size, row = closed(b.couponReads[i], [
|
|
26
|
+
"couponId",
|
|
27
|
+
"wireCoupon",
|
|
28
|
+
"association",
|
|
29
|
+
]);
|
|
30
|
+
const association = closed(row.association, ["resource", "ordinal"]);
|
|
31
|
+
need(row.couponId === id &&
|
|
32
|
+
association.resource === "coupon" &&
|
|
33
|
+
association.ordinal === 4 + i);
|
|
34
|
+
const c = row.wireCoupon;
|
|
35
|
+
need(c && c.id === id && c.object === "coupon" && c.deleted !== true);
|
|
36
|
+
ids.set(id, i);
|
|
37
|
+
}
|
|
38
|
+
const couponReadIndex = ids.get(id), coupon = b.couponReads[couponReadIndex].wireCoupon;
|
|
39
|
+
need(typeof ref === "string" || equal(ref, coupon));
|
|
40
|
+
const joinedDiscount = {
|
|
41
|
+
...discount,
|
|
42
|
+
source: { ...discount.source, coupon },
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
index,
|
|
46
|
+
discountId: discount.id,
|
|
47
|
+
originalCouponReference: ref,
|
|
48
|
+
couponReadIndex,
|
|
49
|
+
joinedDiscount,
|
|
50
|
+
};
|
|
51
|
+
}));
|
|
52
|
+
need(ids.size === b.couponReads.length &&
|
|
53
|
+
equal(b.derivedCouponJoins, { subscription: joined[0], item: joined[1] }));
|
|
54
|
+
return {
|
|
55
|
+
subscription: joined[0].map((x) => x.joinedDiscount),
|
|
56
|
+
item: joined[1].map((x) => x.joinedDiscount),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export function expectedSlots(request, receipt, output) {
|
|
60
|
+
const record = {
|
|
61
|
+
"/request/logicalBinding": request.logicalBinding,
|
|
62
|
+
"/request/attachReceiptBinding": request.attachReceiptBinding,
|
|
63
|
+
"/request/baselineBinding": request.baselineBinding,
|
|
64
|
+
"/request/defaultSettingsBinding": request.defaultSettingsBinding,
|
|
65
|
+
"/request/requestIdentity/binding": request.requestIdentity.binding,
|
|
66
|
+
"/attachReceipt/logicalBinding": receipt.logicalBinding,
|
|
67
|
+
"/attachReceipt/request/logicalBinding": receipt.request.logicalBinding,
|
|
68
|
+
"/attachReceipt/request/requestIdentity/binding": receipt.request.requestIdentity.binding,
|
|
69
|
+
"/attachReceipt/binding": receipt.binding,
|
|
70
|
+
};
|
|
71
|
+
if (!output)
|
|
72
|
+
return record;
|
|
73
|
+
return Object.fromEntries([
|
|
74
|
+
...Object.entries(record).map(([k, v]) => ["/originalRecord" + k, v]),
|
|
75
|
+
...Object.entries(record).filter(([k]) => k.startsWith("/request/")),
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
export function verifyPreflightRecord(captured, originalC6, ackC3) {
|
|
79
|
+
OWNER.check();
|
|
80
|
+
const expected = expectedSlots(originalC6, ackC3, false);
|
|
81
|
+
for (const [path, value] of Object.entries(expected))
|
|
82
|
+
need(captured.captured.slots.get(path) === value);
|
|
83
|
+
const record = materialize(captured.captured.node);
|
|
84
|
+
need(equal(record.request, originalC6) && equal(record.attachReceipt, ackC3));
|
|
85
|
+
verifyOriginalRaw(record, ackC3);
|
|
86
|
+
OWNER.check();
|
|
87
|
+
return freeze(record);
|
|
88
|
+
}
|
|
89
|
+
function association(value, id, configuration) {
|
|
90
|
+
const e = configuration.preparation.expected, ctx = { customerAccountId: e.customerAccountId, livemode: e.livemode };
|
|
91
|
+
need(referenceId(value, "sub_sched", "subscription_schedule", ctx) === id);
|
|
92
|
+
if (value !== null && typeof value === "object")
|
|
93
|
+
need(!Object.prototype.hasOwnProperty.call(value, "deleted") ||
|
|
94
|
+
value.deleted === false);
|
|
95
|
+
}
|
|
96
|
+
function verifyOriginalRaw(record, ack) {
|
|
97
|
+
const c = record.configuration, o = record.originalBundle, p = c.preparation, a = c.attachReceipt.attachRequest;
|
|
98
|
+
need(equal(c.schedule, ack.providerSnapshot) &&
|
|
99
|
+
equal(c.attachReceipt.providerSnapshot, ack.providerSnapshot) &&
|
|
100
|
+
equal(p, a.preparation) &&
|
|
101
|
+
c.apiVersion === a.apiVersion);
|
|
102
|
+
need(c.configureKey !== a.attachKey &&
|
|
103
|
+
Object.prototype.hasOwnProperty.call(o.wireSubscription, "schedule") &&
|
|
104
|
+
o.wireSubscription.schedule === null &&
|
|
105
|
+
Object.prototype.hasOwnProperty.call(c.freshSubscription, "schedule") &&
|
|
106
|
+
c.freshSubscription.schedule !== null);
|
|
107
|
+
const { schedule: oldAssociation, ...oldResidual } = o.wireSubscription, { schedule: newAssociation, ...newResidual } = c.freshSubscription;
|
|
108
|
+
need(oldAssociation === null &&
|
|
109
|
+
equal(oldResidual, newResidual) &&
|
|
110
|
+
equal(p.subscription, o.wireSubscription));
|
|
111
|
+
association(newAssociation, ack.scheduleId, c);
|
|
112
|
+
for (const [name, wire] of [
|
|
113
|
+
["targetPrice", "wireTargetPrice"],
|
|
114
|
+
["billingCustomer", "wireBillingCustomer"],
|
|
115
|
+
])
|
|
116
|
+
need(equal(p[name], o[wire]) && equal(c[name], o[wire]));
|
|
117
|
+
rebuild(o);
|
|
118
|
+
const preconfigure = {
|
|
119
|
+
wireSubscription: c.freshSubscription,
|
|
120
|
+
wireTargetPrice: c.targetPrice,
|
|
121
|
+
wireBillingCustomer: c.billingCustomer,
|
|
122
|
+
couponReads: o.couponReads,
|
|
123
|
+
derivedCouponJoins: o.derivedCouponJoins,
|
|
124
|
+
};
|
|
125
|
+
rebuild(preconfigure);
|
|
126
|
+
}
|
|
127
|
+
export function verifyCurrentPreflight(record, evidence) {
|
|
128
|
+
OWNER.check();
|
|
129
|
+
closed(evidence, ["bundle", "schedule", "observedAt"]);
|
|
130
|
+
need(Number.isSafeInteger(evidence.observedAt) && evidence.observedAt >= 0);
|
|
131
|
+
const c = record.configuration, o = record.originalBundle, b = evidence.bundle;
|
|
132
|
+
closed(b, [
|
|
133
|
+
"wireSubscription",
|
|
134
|
+
"wireTargetPrice",
|
|
135
|
+
"wireBillingCustomer",
|
|
136
|
+
"couponReads",
|
|
137
|
+
"derivedCouponJoins",
|
|
138
|
+
]);
|
|
139
|
+
need(equal(evidence.schedule, c.schedule) &&
|
|
140
|
+
equal(evidence.schedule, record.attachReceipt.providerSnapshot));
|
|
141
|
+
for (const [name, wire] of [
|
|
142
|
+
["freshSubscription", "wireSubscription"],
|
|
143
|
+
["targetPrice", "wireTargetPrice"],
|
|
144
|
+
["billingCustomer", "wireBillingCustomer"],
|
|
145
|
+
])
|
|
146
|
+
need(equal(c[name], b[wire]));
|
|
147
|
+
rebuild(b);
|
|
148
|
+
need(equal(b.couponReads, o.couponReads) &&
|
|
149
|
+
equal(b.derivedCouponJoins, o.derivedCouponJoins));
|
|
150
|
+
association(b.wireSubscription.schedule, record.attachReceipt.scheduleId, c);
|
|
151
|
+
OWNER.check();
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=relations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relations.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/preflight/relations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAazE,MAAM,QAAQ,GAAG,CAAC,EAAW,EAAgB,EAAE,CAC7C,OAAO,EAAE,KAAK,QAAQ;IACtB,EAAE,CAAC,MAAM,GAAG,CAAC;IACb,EAAE,CAAC,MAAM,IAAI,GAAG;IAChB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACb,EAAE,KAAK,GAAG;IACV,EAAE,KAAK,IAAI,CAAC;AACd,SAAS,OAAO,CAAC,CAAS;IACxB,MAAM,YAAY,GAAG,CAAC,CAAC,gBAAgB,CAAC;IACxC,IAAI,CACF,YAAY;QACV,YAAY,CAAC,KAAK;QAClB,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CACvC,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7D,IAAI,CAAC,KAAK,CAAC,OA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CAAC,CAAC;IAChC,OAAO,CAAC,CAAC,CAAC,CAAC;IACX,IAAI,CACF,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC;QACjC,KAAK,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,kBAAkB,CAAC,CACpD,CAAC;IACF,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAC7E,KAAK,CAAC,KAAK,EAAE,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { constructRenewalScheduleAttachmentReceiptV2 } from "../../../renewalV2/index.js";
|
|
2
|
+
import type { AttachRaw } from "../material/capture.js";
|
|
3
|
+
import type { prepareRenewalPriceReplacementV2, prepareRenewalScheduleAttachmentV2 } from "../../../renewalV2/index.js";
|
|
4
|
+
type Receipt = Awaited<ReturnType<typeof constructRenewalScheduleAttachmentReceiptV2>>;
|
|
5
|
+
type Prepared = Awaited<ReturnType<typeof prepareRenewalPriceReplacementV2>>;
|
|
6
|
+
type Request = Awaited<ReturnType<typeof prepareRenewalScheduleAttachmentV2>>;
|
|
7
|
+
/** Bounded DATA admission only; the caller retains its own record and Source relation. */
|
|
8
|
+
export declare function admitReplayMaterial<T>(material: T, prepared: Prepared, request: Request): {
|
|
9
|
+
status: "classified";
|
|
10
|
+
kind: "RENEWAL_MATERIAL_V2_DATA_CONSISTENCY_ONLY";
|
|
11
|
+
material: T;
|
|
12
|
+
};
|
|
13
|
+
/** Full replay DATA equality; no Source, Owner, class or record context is accepted. */
|
|
14
|
+
export declare function assertReplayMaterial(value: unknown, prepared: Prepared, request: Request, raw: AttachRaw, current: Readonly<{
|
|
15
|
+
wireSubscription: Record<string, unknown>;
|
|
16
|
+
wireTargetPrice: Record<string, unknown>;
|
|
17
|
+
wireBillingCustomer: Record<string, unknown>;
|
|
18
|
+
}>, originalSubscription: unknown, observedAt: number): void;
|
|
19
|
+
/** Full initial ACK wrapper DATA admission before final Owner and quarantine discard. */
|
|
20
|
+
export declare function admitInitialOutput(receipt: Receipt, prepared: Prepared, request: Request): unknown;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=material.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/recovery/material.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,6BAA6B,CAAC;AAG/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAWxD,OAAO,KAAK,EACV,gCAAgC,EAChC,kCAAkC,EACnC,MAAM,6BAA6B,CAAC;AACrC,KAAK,OAAO,GAAG,OAAO,CACpB,UAAU,CAAC,OAAO,2CAA2C,CAAC,CAC/D,CAAC;AACF,KAAK,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,gCAAgC,CAAC,CAAC,CAAC;AAC7E,KAAK,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,CAAC;AAE9E,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GACf;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,2CAA2C,CAAC;IAClD,QAAQ,EAAE,CAAC,CAAC;CACb,CA4GA;AAED,wFAAwF;AACxF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,QAAQ,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,eAAe,EAAE,MAAM,C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