@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,257 @@
|
|
|
1
|
+
import { closed } from "../material/nodeKernel.js";
|
|
2
|
+
import type { AttachRaw, Bundle } from "../material/capture.js";
|
|
3
|
+
import type {
|
|
4
|
+
ProjectRenewalConfigurationV2Options,
|
|
5
|
+
ProjectedRenewalConfigurationV2,
|
|
6
|
+
RenewalScheduleAttachmentReceiptV2,
|
|
7
|
+
} from "../../../renewalV2/index.js";
|
|
8
|
+
export type Data = Record<string, unknown>;
|
|
9
|
+
export type Configuration = ProjectRenewalConfigurationV2Options & {
|
|
10
|
+
preparation: AttachRaw["preparation"];
|
|
11
|
+
attachReceipt: ProjectRenewalConfigurationV2Options["attachReceipt"] & {
|
|
12
|
+
attachRequest: AttachRaw;
|
|
13
|
+
};
|
|
14
|
+
freshSubscription: Bundle["wireSubscription"];
|
|
15
|
+
};
|
|
16
|
+
/** Detached consistency data, never a Source, dispatch, ownership or acknowledgement capability. */
|
|
17
|
+
export interface PreflightRecord {
|
|
18
|
+
configuration: Configuration;
|
|
19
|
+
request: ProjectedRenewalConfigurationV2;
|
|
20
|
+
attachReceipt: RenewalScheduleAttachmentReceiptV2;
|
|
21
|
+
originalBundle: Bundle;
|
|
22
|
+
}
|
|
23
|
+
export interface CurrentEvidence {
|
|
24
|
+
bundle: Bundle;
|
|
25
|
+
schedule: Data;
|
|
26
|
+
observedAt: number;
|
|
27
|
+
}
|
|
28
|
+
export interface PreflightOutput {
|
|
29
|
+
status: "configure_preflight_consistent";
|
|
30
|
+
originalRecord: PreflightRecord;
|
|
31
|
+
currentEvidence: CurrentEvidence;
|
|
32
|
+
request: ProjectedRenewalConfigurationV2;
|
|
33
|
+
operationalAuthority: false;
|
|
34
|
+
}
|
|
35
|
+
export const recordFamilies: Readonly<Record<string, string>> = Object.freeze({
|
|
36
|
+
"/request/logicalBinding": "renewal",
|
|
37
|
+
"/request/attachReceiptBinding": "renewal-attach-receipt",
|
|
38
|
+
"/request/baselineBinding": "renewal-baseline",
|
|
39
|
+
"/request/defaultSettingsBinding": "renewal-defaults",
|
|
40
|
+
"/request/requestIdentity/binding": "renewal-configure",
|
|
41
|
+
"/attachReceipt/logicalBinding": "renewal",
|
|
42
|
+
"/attachReceipt/request/logicalBinding": "renewal",
|
|
43
|
+
"/attachReceipt/request/requestIdentity/binding": "renewal-attach",
|
|
44
|
+
"/attachReceipt/binding": "renewal-attach-receipt",
|
|
45
|
+
});
|
|
46
|
+
export const outputFamilies: Readonly<Record<string, string>> = Object.freeze({
|
|
47
|
+
"/originalRecord/request/logicalBinding": "renewal",
|
|
48
|
+
"/originalRecord/request/attachReceiptBinding": "renewal-attach-receipt",
|
|
49
|
+
"/originalRecord/request/baselineBinding": "renewal-baseline",
|
|
50
|
+
"/originalRecord/request/defaultSettingsBinding": "renewal-defaults",
|
|
51
|
+
"/originalRecord/request/requestIdentity/binding": "renewal-configure",
|
|
52
|
+
"/request/logicalBinding": "renewal",
|
|
53
|
+
"/request/attachReceiptBinding": "renewal-attach-receipt",
|
|
54
|
+
"/request/baselineBinding": "renewal-baseline",
|
|
55
|
+
"/request/defaultSettingsBinding": "renewal-defaults",
|
|
56
|
+
"/request/requestIdentity/binding": "renewal-configure",
|
|
57
|
+
"/originalRecord/attachReceipt/logicalBinding": "renewal",
|
|
58
|
+
"/originalRecord/attachReceipt/request/logicalBinding": "renewal",
|
|
59
|
+
"/originalRecord/attachReceipt/request/requestIdentity/binding":
|
|
60
|
+
"renewal-attach",
|
|
61
|
+
"/originalRecord/attachReceipt/binding": "renewal-attach-receipt",
|
|
62
|
+
});
|
|
63
|
+
const schema = {
|
|
64
|
+
success: {
|
|
65
|
+
root: {
|
|
66
|
+
required: [
|
|
67
|
+
"status",
|
|
68
|
+
"originalRecord",
|
|
69
|
+
"currentEvidence",
|
|
70
|
+
"request",
|
|
71
|
+
"operationalAuthority",
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
originalRecord: {
|
|
75
|
+
required: ["configuration", "request", "attachReceipt", "originalBundle"],
|
|
76
|
+
},
|
|
77
|
+
currentEvidence: {
|
|
78
|
+
required: ["bundle", "schedule", "observedAt"],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
rawConfigurationCapture: {
|
|
82
|
+
required: [
|
|
83
|
+
"preparation",
|
|
84
|
+
"attachReceipt",
|
|
85
|
+
"freshSubscription",
|
|
86
|
+
"targetPrice",
|
|
87
|
+
"schedule",
|
|
88
|
+
"apiVersion",
|
|
89
|
+
"observedAt",
|
|
90
|
+
"firstDispatchedAt",
|
|
91
|
+
"configureKey",
|
|
92
|
+
],
|
|
93
|
+
optional: ["billingCustomer"],
|
|
94
|
+
preparationRequired: ["subscription", "targetPrice", "expected", "key"],
|
|
95
|
+
preparationOptional: ["billingCustomer"],
|
|
96
|
+
rawAttachReceiptRequired: [
|
|
97
|
+
"attachRequest",
|
|
98
|
+
"actualDispatch",
|
|
99
|
+
"providerSnapshot",
|
|
100
|
+
],
|
|
101
|
+
rawAttachRequestRequired: [
|
|
102
|
+
"preparation",
|
|
103
|
+
"apiVersion",
|
|
104
|
+
"attachKey",
|
|
105
|
+
"firstDispatchedAt",
|
|
106
|
+
],
|
|
107
|
+
rawActualDispatchRequired: [
|
|
108
|
+
"scope",
|
|
109
|
+
"apiVersion",
|
|
110
|
+
"method",
|
|
111
|
+
"path",
|
|
112
|
+
"payload",
|
|
113
|
+
"key",
|
|
114
|
+
"firstDispatchedAt",
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
closedControlSchemas: {
|
|
118
|
+
"originalRecord/request": [
|
|
119
|
+
"version",
|
|
120
|
+
"stage",
|
|
121
|
+
"scope",
|
|
122
|
+
"apiVersion",
|
|
123
|
+
"logicalBinding",
|
|
124
|
+
"scheduleId",
|
|
125
|
+
"method",
|
|
126
|
+
"path",
|
|
127
|
+
"key",
|
|
128
|
+
"payload",
|
|
129
|
+
"firstDispatchedAt",
|
|
130
|
+
"attachReceiptBinding",
|
|
131
|
+
"baselineBinding",
|
|
132
|
+
"defaultSettingsBinding",
|
|
133
|
+
"status",
|
|
134
|
+
"providerQualification",
|
|
135
|
+
"profile",
|
|
136
|
+
"requestIdentity",
|
|
137
|
+
],
|
|
138
|
+
request: [
|
|
139
|
+
"version",
|
|
140
|
+
"stage",
|
|
141
|
+
"scope",
|
|
142
|
+
"apiVersion",
|
|
143
|
+
"logicalBinding",
|
|
144
|
+
"scheduleId",
|
|
145
|
+
"method",
|
|
146
|
+
"path",
|
|
147
|
+
"key",
|
|
148
|
+
"payload",
|
|
149
|
+
"firstDispatchedAt",
|
|
150
|
+
"attachReceiptBinding",
|
|
151
|
+
"baselineBinding",
|
|
152
|
+
"defaultSettingsBinding",
|
|
153
|
+
"status",
|
|
154
|
+
"providerQualification",
|
|
155
|
+
"profile",
|
|
156
|
+
"requestIdentity",
|
|
157
|
+
],
|
|
158
|
+
"originalRecord/attachReceipt": [
|
|
159
|
+
"version",
|
|
160
|
+
"stage",
|
|
161
|
+
"scope",
|
|
162
|
+
"logicalBinding",
|
|
163
|
+
"request",
|
|
164
|
+
"scheduleId",
|
|
165
|
+
"subscriptionId",
|
|
166
|
+
"customerAccountId",
|
|
167
|
+
"livemode",
|
|
168
|
+
"providerSnapshot",
|
|
169
|
+
"binding",
|
|
170
|
+
],
|
|
171
|
+
"originalRecord/attachReceipt/request": [
|
|
172
|
+
"version",
|
|
173
|
+
"stage",
|
|
174
|
+
"scope",
|
|
175
|
+
"apiVersion",
|
|
176
|
+
"logicalBinding",
|
|
177
|
+
"method",
|
|
178
|
+
"path",
|
|
179
|
+
"payload",
|
|
180
|
+
"key",
|
|
181
|
+
"firstDispatchedAt",
|
|
182
|
+
"requestIdentity",
|
|
183
|
+
],
|
|
184
|
+
"request/requestIdentity": ["key", "binding"],
|
|
185
|
+
"originalRecord/request/requestIdentity": ["key", "binding"],
|
|
186
|
+
"originalRecord/attachReceipt/request/requestIdentity": ["key", "binding"],
|
|
187
|
+
"originalRecord/originalBundle": [
|
|
188
|
+
"wireSubscription",
|
|
189
|
+
"wireTargetPrice",
|
|
190
|
+
"wireBillingCustomer",
|
|
191
|
+
"couponReads",
|
|
192
|
+
"derivedCouponJoins",
|
|
193
|
+
],
|
|
194
|
+
"currentEvidence/bundle": [
|
|
195
|
+
"wireSubscription",
|
|
196
|
+
"wireTargetPrice",
|
|
197
|
+
"wireBillingCustomer",
|
|
198
|
+
"couponReads",
|
|
199
|
+
"derivedCouponJoins",
|
|
200
|
+
],
|
|
201
|
+
"eachBundle/derivedCouponJoins": ["subscription", "item"],
|
|
202
|
+
"eachBundle/couponReads/row": ["couponId", "wireCoupon", "association"],
|
|
203
|
+
"eachBundle/couponReads/row/association": ["resource", "ordinal"],
|
|
204
|
+
"eachBundle/derivedCouponJoins/eachRow": [
|
|
205
|
+
"index",
|
|
206
|
+
"discountId",
|
|
207
|
+
"originalCouponReference",
|
|
208
|
+
"couponReadIndex",
|
|
209
|
+
"joinedDiscount",
|
|
210
|
+
],
|
|
211
|
+
"eachProjectedRequest/profile": [
|
|
212
|
+
"apiVersion",
|
|
213
|
+
"billingMode",
|
|
214
|
+
"cadence",
|
|
215
|
+
"anchor",
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
export function controls(x: unknown, path: string, output: boolean): void {
|
|
220
|
+
const prefix = output ? "/originalRecord" : "";
|
|
221
|
+
if (path === (output ? "/originalRecord" : ""))
|
|
222
|
+
closed(x, schema.success.originalRecord.required);
|
|
223
|
+
if (output && path === "") closed(x, schema.success.root.required);
|
|
224
|
+
if (output && path === "/currentEvidence")
|
|
225
|
+
closed(x, schema.success.currentEvidence.required);
|
|
226
|
+
if (path === prefix + "/configuration")
|
|
227
|
+
closed(
|
|
228
|
+
x,
|
|
229
|
+
schema.rawConfigurationCapture.required,
|
|
230
|
+
schema.rawConfigurationCapture.optional,
|
|
231
|
+
);
|
|
232
|
+
if (
|
|
233
|
+
path === prefix + "/configuration/preparation" ||
|
|
234
|
+
path === prefix + "/configuration/attachReceipt/attachRequest/preparation"
|
|
235
|
+
)
|
|
236
|
+
closed(
|
|
237
|
+
x,
|
|
238
|
+
schema.rawConfigurationCapture.preparationRequired,
|
|
239
|
+
schema.rawConfigurationCapture.preparationOptional,
|
|
240
|
+
);
|
|
241
|
+
if (path === prefix + "/configuration/attachReceipt")
|
|
242
|
+
closed(x, schema.rawConfigurationCapture.rawAttachReceiptRequired);
|
|
243
|
+
if (path === prefix + "/configuration/attachReceipt/attachRequest")
|
|
244
|
+
closed(x, schema.rawConfigurationCapture.rawAttachRequestRequired);
|
|
245
|
+
if (path === prefix + "/configuration/attachReceipt/actualDispatch")
|
|
246
|
+
closed(x, schema.rawConfigurationCapture.rawActualDispatchRequired);
|
|
247
|
+
const relative = output ? path.replace(/^\//, "") : "originalRecord" + path;
|
|
248
|
+
if (
|
|
249
|
+
Object.prototype.hasOwnProperty.call(schema.closedControlSchemas, relative)
|
|
250
|
+
)
|
|
251
|
+
closed(
|
|
252
|
+
x,
|
|
253
|
+
(schema.closedControlSchemas as Record<string, readonly string[]>)[
|
|
254
|
+
relative
|
|
255
|
+
]!,
|
|
256
|
+
);
|
|
257
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
import type {
|
|
7
|
+
PreflightRecord,
|
|
8
|
+
CurrentEvidence,
|
|
9
|
+
PreflightOutput,
|
|
10
|
+
} from "./grammar.js";
|
|
11
|
+
import type {
|
|
12
|
+
ProjectedRenewalConfigurationV2,
|
|
13
|
+
RenewalScheduleAttachmentReceiptV2,
|
|
14
|
+
} from "../../../renewalV2/index.js";
|
|
15
|
+
export function releasePreflight(
|
|
16
|
+
record: PreflightRecord,
|
|
17
|
+
currentEvidence: CurrentEvidence,
|
|
18
|
+
request: ProjectedRenewalConfigurationV2,
|
|
19
|
+
originalC6: ProjectedRenewalConfigurationV2,
|
|
20
|
+
ackC3: RenewalScheduleAttachmentReceiptV2,
|
|
21
|
+
): PreflightOutput {
|
|
22
|
+
OWNER.check();
|
|
23
|
+
need(
|
|
24
|
+
equal(record.request, originalC6) &&
|
|
25
|
+
equal(request, originalC6) &&
|
|
26
|
+
equal(record.attachReceipt, ackC3),
|
|
27
|
+
);
|
|
28
|
+
const result = {
|
|
29
|
+
status: "configure_preflight_consistent",
|
|
30
|
+
originalRecord: record,
|
|
31
|
+
currentEvidence,
|
|
32
|
+
request,
|
|
33
|
+
operationalAuthority: false,
|
|
34
|
+
};
|
|
35
|
+
const captured = capturePreflightOutput(result),
|
|
36
|
+
expected = expectedSlots(originalC6, ackC3, true);
|
|
37
|
+
for (const [path, value] of Object.entries(expected))
|
|
38
|
+
need(captured.slots.get(path) === value);
|
|
39
|
+
const output = freeze(materialize(captured.node));
|
|
40
|
+
OWNER.check();
|
|
41
|
+
return output as PreflightOutput;
|
|
42
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { afterEach, expect, it, vi } from "vitest";
|
|
2
|
+
afterEach(() => {
|
|
3
|
+
vi.doUnmock("../sourceBindings.js");
|
|
4
|
+
vi.resetModules();
|
|
5
|
+
});
|
|
6
|
+
it("keeps the shared Source defaults empty and unbound without loading an Owner", async () => {
|
|
7
|
+
vi.resetModules();
|
|
8
|
+
let loads = 0;
|
|
9
|
+
vi.doMock("../sourceBindings.js", () => ({
|
|
10
|
+
loadOwnedOriginalSource() {
|
|
11
|
+
loads++;
|
|
12
|
+
throw Error("UNBOUND");
|
|
13
|
+
},
|
|
14
|
+
}));
|
|
15
|
+
const source = await import("../operations/sourceOperations.js");
|
|
16
|
+
expect(source.COMPILED_PREFLIGHT_ENTRIES).toEqual([]);
|
|
17
|
+
expect(Object.isFrozen(source.COMPILED_PREFLIGHT_ENTRIES)).toBe(true);
|
|
18
|
+
expect(source.ORIGINAL_ORIGIN_ASSOCIATION).toBe(null);
|
|
19
|
+
expect(() => source.loadOwnedConfigureOperation()).toThrow(
|
|
20
|
+
"CONFIGURE_PREFLIGHT_SOURCE_UNBOUND",
|
|
21
|
+
);
|
|
22
|
+
expect(loads).toBe(0);
|
|
23
|
+
});
|
|
24
|
+
it("checks the canonical retired Owner before any raw record reflection", async () => {
|
|
25
|
+
vi.resetModules();
|
|
26
|
+
const first = 1768867140;
|
|
27
|
+
vi.doMock("../sourceBindings.js", () => ({
|
|
28
|
+
loadOwnedOriginalSource: () => ({
|
|
29
|
+
clock: {
|
|
30
|
+
basis: {
|
|
31
|
+
startWallMs: first * 1000,
|
|
32
|
+
startNs: BigInt(first) * 1000000000n,
|
|
33
|
+
workEndWallMs: (first + 180) * 1000,
|
|
34
|
+
workEndNs: BigInt(first + 180) * 1000000000n,
|
|
35
|
+
endWallMs: (first + 210) * 1000,
|
|
36
|
+
endNs: BigInt(first + 210) * 1000000000n,
|
|
37
|
+
},
|
|
38
|
+
sample: () => ({
|
|
39
|
+
wallMs: first * 1000 + 1,
|
|
40
|
+
ns: BigInt(first) * 1000000000n + 1000000n,
|
|
41
|
+
}),
|
|
42
|
+
subscribeRetirement: () => () => {},
|
|
43
|
+
},
|
|
44
|
+
originalPolicy: {
|
|
45
|
+
firstDispatchedAt: first,
|
|
46
|
+
periodStart: 1768435200,
|
|
47
|
+
periodEnd: 1771113600,
|
|
48
|
+
},
|
|
49
|
+
originAssociation: Object.freeze({}),
|
|
50
|
+
}),
|
|
51
|
+
}));
|
|
52
|
+
const { OWNER } = await import("../originalOwner.js");
|
|
53
|
+
OWNER.check();
|
|
54
|
+
OWNER.retire();
|
|
55
|
+
const { capturePreflightRecord } = await import("./record.js");
|
|
56
|
+
let traps = 0;
|
|
57
|
+
const raw = new Proxy(
|
|
58
|
+
{},
|
|
59
|
+
{
|
|
60
|
+
getPrototypeOf() {
|
|
61
|
+
traps++;
|
|
62
|
+
throw Error("RAW");
|
|
63
|
+
},
|
|
64
|
+
ownKeys() {
|
|
65
|
+
traps++;
|
|
66
|
+
throw Error("RAW");
|
|
67
|
+
},
|
|
68
|
+
getOwnPropertyDescriptor() {
|
|
69
|
+
traps++;
|
|
70
|
+
throw Error("RAW");
|
|
71
|
+
},
|
|
72
|
+
get() {
|
|
73
|
+
traps++;
|
|
74
|
+
throw Error("RAW");
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
);
|
|
78
|
+
expect(() => capturePreflightRecord(raw)).toThrow("ORIGINAL_OWNER_STOP");
|
|
79
|
+
expect(traps).toBe(0);
|
|
80
|
+
});
|
|
81
|
+
// Full capture/invoke continuation and 44-read ownership tests await the real shared
|
|
82
|
+
// read binding and Schedule factor; these helper tests do not advertise that API.
|