@openlup/platform 0.20.0 → 0.22.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 +272 -278
- package/README.md +195 -6
- package/dist/composition/composeBundle.d.ts +13 -0
- package/dist/composition/composeBundle.js +4 -0
- package/dist/composition/fulfillmentContribution.d.ts +21 -0
- package/dist/composition/fulfillmentContribution.js +19 -0
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/index.js +2 -0
- package/dist/fulfillment/adapterConformance.d.ts +3 -0
- package/dist/fulfillment/adapterConformance.js +223 -0
- package/dist/fulfillment/bindings.d.ts +3 -0
- package/dist/fulfillment/bindings.js +29 -0
- package/dist/fulfillment/commerceFulfillmentHandlers.d.ts +29 -0
- package/dist/fulfillment/commerceFulfillmentHandlers.js +184 -0
- package/dist/fulfillment/commerceFulfillmentReadModel.d.ts +86 -0
- package/dist/fulfillment/commerceFulfillmentReadModel.js +131 -0
- package/dist/fulfillment/contracts/alignment.d.ts +25 -0
- package/dist/fulfillment/contracts/alignment.js +1 -0
- package/dist/fulfillment/contracts/bindings.d.ts +51 -0
- package/dist/fulfillment/contracts/bindings.js +1 -0
- package/dist/fulfillment/contracts/capabilities.d.ts +29 -0
- package/dist/fulfillment/contracts/capabilities.js +1 -0
- package/dist/fulfillment/contracts/conformance.d.ts +93 -0
- package/dist/fulfillment/contracts/conformance.js +1 -0
- package/dist/fulfillment/contracts/customerAlignment.d.ts +6 -0
- package/dist/fulfillment/contracts/customerAlignment.js +1 -0
- package/dist/fulfillment/contracts/dispatch.d.ts +105 -0
- package/dist/fulfillment/contracts/dispatch.js +1 -0
- package/dist/fulfillment/contracts/index.d.ts +18 -0
- package/dist/fulfillment/contracts/index.js +1 -0
- package/dist/fulfillment/contracts/label.d.ts +35 -0
- package/dist/fulfillment/contracts/label.js +1 -0
- package/dist/fulfillment/contracts/nativeUnsupported.d.ts +6 -0
- package/dist/fulfillment/contracts/nativeUnsupported.js +1 -0
- package/dist/fulfillment/contracts/observation.d.ts +52 -0
- package/dist/fulfillment/contracts/observation.js +1 -0
- package/dist/fulfillment/contracts/operator.d.ts +64 -0
- package/dist/fulfillment/contracts/operator.js +1 -0
- package/dist/fulfillment/contracts/read.d.ts +110 -0
- package/dist/fulfillment/contracts/read.js +1 -0
- package/dist/fulfillment/contracts/readback.d.ts +38 -0
- package/dist/fulfillment/contracts/readback.js +1 -0
- package/dist/fulfillment/contracts/replacement.d.ts +34 -0
- package/dist/fulfillment/contracts/replacement.js +1 -0
- package/dist/fulfillment/contracts/store.d.ts +86 -0
- package/dist/fulfillment/contracts/store.js +1 -0
- package/dist/fulfillment/contracts/sync.d.ts +170 -0
- package/dist/fulfillment/contracts/sync.js +1 -0
- package/dist/fulfillment/currentFulfillmentParcel.d.ts +2 -0
- package/dist/fulfillment/currentFulfillmentParcel.js +1 -0
- package/dist/fulfillment/delayReadModel.d.ts +11 -0
- package/dist/fulfillment/delayReadModel.js +45 -0
- package/dist/fulfillment/deliveryAlignmentReadModel.d.ts +4 -0
- package/dist/fulfillment/deliveryAlignmentReadModel.js +12 -0
- package/dist/fulfillment/dispatchProjection.d.ts +7 -0
- package/dist/fulfillment/dispatchProjection.js +18 -0
- package/dist/fulfillment/fulfillmentObservationEffects.d.ts +66 -0
- package/dist/fulfillment/fulfillmentObservationEffects.js +36 -0
- package/dist/fulfillment/handlerSchemas.d.ts +647 -0
- package/dist/fulfillment/handlerSchemas.js +213 -0
- package/dist/fulfillment/handlerSupport.d.ts +33 -0
- package/dist/fulfillment/handlerSupport.js +25 -0
- package/dist/fulfillment/index.d.ts +37 -0
- package/dist/fulfillment/index.js +37 -0
- package/dist/fulfillment/labelLifecycle.d.ts +24 -0
- package/dist/fulfillment/labelLifecycle.js +9 -0
- package/dist/fulfillment/lowStockEvidenceHandler.d.ts +36 -0
- package/dist/fulfillment/lowStockEvidenceHandler.js +46 -0
- package/dist/fulfillment/migrations.d.ts +27 -0
- package/dist/fulfillment/migrations.js +8 -0
- package/dist/fulfillment/nativeUnsupported.d.ts +10 -0
- package/dist/fulfillment/nativeUnsupported.js +18 -0
- package/dist/fulfillment/normalizedFulfillmentFacts.d.ts +2 -0
- package/dist/fulfillment/normalizedFulfillmentFacts.js +1 -0
- package/dist/fulfillment/observationProjection.d.ts +11 -0
- package/dist/fulfillment/observationProjection.js +37 -0
- package/dist/fulfillment/omnipack/capabilities.d.ts +3 -0
- package/dist/fulfillment/omnipack/capabilities.js +16 -0
- package/dist/fulfillment/omnipack/client.d.ts +37 -0
- package/dist/fulfillment/omnipack/client.js +162 -0
- package/dist/fulfillment/omnipack/index.d.ts +52 -0
- package/dist/fulfillment/omnipack/index.js +349 -0
- package/dist/fulfillment/omnipack/mappers.d.ts +73 -0
- package/dist/fulfillment/omnipack/mappers.js +177 -0
- package/dist/fulfillment/omnipack/observation.d.ts +21 -0
- package/dist/fulfillment/omnipack/observation.js +57 -0
- package/dist/fulfillment/omnipack/omnipackDispatchPayload.d.ts +36 -0
- package/dist/fulfillment/omnipack/omnipackDispatchPayload.js +63 -0
- package/dist/fulfillment/omnipack/omnipackOutboundOrderPayload.d.ts +83 -0
- package/dist/fulfillment/omnipack/omnipackOutboundOrderPayload.js +113 -0
- package/dist/fulfillment/omnipack/omnipackProductPackPayload.d.ts +11 -0
- package/dist/fulfillment/omnipack/omnipackProductPackPayload.js +38 -0
- package/dist/fulfillment/omnipack/omnipackProductPayload.d.ts +18 -0
- package/dist/fulfillment/omnipack/omnipackProductPayload.js +51 -0
- package/dist/fulfillment/omnipack/omnipackReconciliationPayload.d.ts +1 -0
- package/dist/fulfillment/omnipack/omnipackReconciliationPayload.js +3 -0
- package/dist/fulfillment/omnipack/omnipackStatusVocabulary.d.ts +4 -0
- package/dist/fulfillment/omnipack/omnipackStatusVocabulary.js +87 -0
- package/dist/fulfillment/omnipack/omnipackWebhookPayload.d.ts +9 -0
- package/dist/fulfillment/omnipack/omnipackWebhookPayload.js +76 -0
- package/dist/fulfillment/omnipack/productSyncMappers.d.ts +18 -0
- package/dist/fulfillment/omnipack/productSyncMappers.js +43 -0
- package/dist/fulfillment/omnipack/providerError.d.ts +25 -0
- package/dist/fulfillment/omnipack/providerError.js +47 -0
- package/dist/fulfillment/omnipack/trackingReferences.d.ts +16 -0
- package/dist/fulfillment/omnipack/trackingReferences.js +52 -0
- package/dist/fulfillment/paidFulfillmentRecovery.d.ts +67 -0
- package/dist/fulfillment/paidFulfillmentRecovery.js +154 -0
- package/dist/fulfillment/paidHandoff.d.ts +27 -0
- package/dist/fulfillment/paidHandoff.js +86 -0
- package/dist/fulfillment/paidHandoffPorts.d.ts +24 -0
- package/dist/fulfillment/paidHandoffPorts.js +3 -0
- package/dist/fulfillment/postgresDeliveryAlignment.d.ts +4 -0
- package/dist/fulfillment/postgresDeliveryAlignment.js +12 -0
- package/dist/fulfillment/postgresDispatchStore.d.ts +16 -0
- package/dist/fulfillment/postgresDispatchStore.js +44 -0
- package/dist/fulfillment/postgresEvidenceReadPort.d.ts +25 -0
- package/dist/fulfillment/postgresEvidenceReadPort.js +45 -0
- package/dist/fulfillment/postgresPaidFulfillmentRecovery.d.ts +25 -0
- package/dist/fulfillment/postgresPaidFulfillmentRecovery.js +26 -0
- package/dist/fulfillment/postgresPaidHandoffStore.d.ts +4 -0
- package/dist/fulfillment/postgresPaidHandoffStore.js +10 -0
- package/dist/fulfillment/postgresShipmentSpine.d.ts +63 -0
- package/dist/fulfillment/postgresShipmentSpine.js +232 -0
- package/dist/fulfillment/postgresStockSyncPort.d.ts +8 -0
- package/dist/fulfillment/postgresStockSyncPort.js +63 -0
- package/dist/fulfillment/productReconciliationEvidenceHandler.d.ts +36 -0
- package/dist/fulfillment/productReconciliationEvidenceHandler.js +50 -0
- package/dist/fulfillment/providerCapabilities.d.ts +9 -0
- package/dist/fulfillment/providerCapabilities.js +17 -0
- package/dist/fulfillment/providerCommandLedger.d.ts +143 -0
- package/dist/fulfillment/providerCommandLedger.js +14 -0
- package/dist/fulfillment/providerDispatchAcceptance.d.ts +26 -0
- package/dist/fulfillment/providerDispatchAcceptance.js +23 -0
- package/dist/fulfillment/providerDispatchError.d.ts +6 -0
- package/dist/fulfillment/providerDispatchError.js +5 -0
- package/dist/fulfillment/providerDispatchWorker.d.ts +31 -0
- package/dist/fulfillment/providerDispatchWorker.js +172 -0
- package/dist/fulfillment/providerProductSyncWorker.d.ts +28 -0
- package/dist/fulfillment/providerProductSyncWorker.js +122 -0
- package/dist/fulfillment/providerReconciliationError.d.ts +9 -0
- package/dist/fulfillment/providerReconciliationError.js +17 -0
- package/dist/fulfillment/providerReconciliationTerminalSkip.d.ts +2 -0
- package/dist/fulfillment/providerReconciliationTerminalSkip.js +6 -0
- package/dist/fulfillment/providerReconciliationTimestamp.d.ts +1 -0
- package/dist/fulfillment/providerReconciliationTimestamp.js +27 -0
- package/dist/fulfillment/providerReconciliationWorker.d.ts +82 -0
- package/dist/fulfillment/providerReconciliationWorker.js +151 -0
- package/dist/fulfillment/providerStockAvailability.d.ts +13 -0
- package/dist/fulfillment/providerStockAvailability.js +51 -0
- package/dist/fulfillment/providerStockSyncWorker.d.ts +37 -0
- package/dist/fulfillment/providerStockSyncWorker.js +186 -0
- package/dist/fulfillment/providerTrackingReferences.d.ts +15 -0
- package/dist/fulfillment/providerTrackingReferences.js +23 -0
- package/dist/fulfillment/replacementRefusals.d.ts +5 -0
- package/dist/fulfillment/replacementRefusals.js +38 -0
- package/dist/fulfillment/replacementShipmentHandler.d.ts +5 -0
- package/dist/fulfillment/replacementShipmentHandler.js +46 -0
- package/dist/fulfillment/schemaCapabilities.d.ts +13 -0
- package/dist/fulfillment/schemaCapabilities.js +7 -0
- package/dist/fulfillment/shipmentsOverviewHandler.d.ts +16 -0
- package/dist/fulfillment/shipmentsOverviewHandler.js +54 -0
- package/dist/fulfillment/statusMap.d.ts +2 -0
- package/dist/fulfillment/statusMap.js +1 -0
- package/dist/fulfillment/trackingProgress.d.ts +1 -0
- package/dist/fulfillment/trackingProgress.js +1 -0
- package/dist/fulfillment/verifiedIngress.d.ts +52 -0
- package/dist/fulfillment/verifiedIngress.js +66 -0
- package/dist/payments/adapterConformance.d.ts +8 -0
- package/dist/payments/adapterConformance.js +109 -0
- package/dist/payments/bindings.d.ts +3 -0
- package/dist/payments/bindings.js +17 -0
- package/dist/payments/checkoutActivePaymentActionResolver.d.ts +7 -0
- package/dist/payments/checkoutActivePaymentActionResolver.js +77 -0
- package/dist/payments/checkoutRecoveryPaymentResolver.d.ts +8 -0
- package/dist/payments/checkoutRecoveryPaymentResolver.js +87 -0
- package/dist/payments/contracts/adapter.d.ts +113 -0
- package/dist/payments/contracts/adapter.js +1 -0
- package/dist/payments/contracts/conformance.d.ts +155 -0
- package/dist/payments/contracts/conformance.js +1 -0
- package/dist/payments/contracts/evidence.d.ts +157 -0
- package/dist/payments/contracts/evidence.js +1 -0
- package/dist/payments/contracts/index.d.ts +10 -0
- package/dist/payments/contracts/index.js +1 -0
- package/dist/payments/contracts/preparedAttempt.d.ts +69 -0
- package/dist/payments/contracts/preparedAttempt.js +1 -0
- package/dist/payments/contracts/reconciliation.d.ts +303 -0
- package/dist/payments/contracts/reconciliation.js +1 -0
- package/dist/payments/contracts/repair.d.ts +92 -0
- package/dist/payments/contracts/repair.js +1 -0
- package/dist/payments/contracts/truth.d.ts +92 -0
- package/dist/payments/contracts/truth.js +1 -0
- package/dist/payments/eventConformanceRunner.d.ts +12 -0
- package/dist/payments/eventConformanceRunner.js +125 -0
- package/dist/payments/index.d.ts +16 -0
- package/dist/payments/index.js +16 -0
- package/dist/payments/paymentAttemptSilenceWindow.d.ts +10 -0
- package/dist/payments/paymentAttemptSilenceWindow.js +19 -0
- package/dist/payments/paymentMethodLifecycle.d.ts +11 -0
- package/dist/payments/paymentMethodLifecycle.js +37 -0
- package/dist/payments/paymentProviderReconciliationAbsenceReopen.d.ts +7 -0
- package/dist/payments/paymentProviderReconciliationAbsenceReopen.js +100 -0
- package/dist/payments/paymentProviderReconciliationEvidence.d.ts +36 -0
- package/dist/payments/paymentProviderReconciliationEvidence.js +91 -0
- package/dist/payments/paymentProviderReconciliationWorker.d.ts +4 -0
- package/dist/payments/paymentProviderReconciliationWorker.js +245 -0
- package/dist/payments/paymentTruth.d.ts +8 -0
- package/dist/payments/paymentTruth.js +125 -0
- package/dist/payments/paymentVerifyNowHandler.d.ts +27 -0
- package/dist/payments/paymentVerifyNowHandler.js +70 -0
- package/dist/payments/paymentVerifyNowService.d.ts +23 -0
- package/dist/payments/paymentVerifyNowService.js +93 -0
- package/dist/payments/paymentWebhookPostProcessing.d.ts +22 -0
- package/dist/payments/paymentWebhookPostProcessing.js +15 -0
- package/dist/payments/postgresPaymentTruth.d.ts +10 -0
- package/dist/payments/postgresPaymentTruth.js +126 -0
- package/dist/payments/preparedAttempt.d.ts +6 -0
- package/dist/payments/preparedAttempt.js +70 -0
- package/dist/payments/preparedAttemptFinalization.d.ts +5 -0
- package/dist/payments/preparedAttemptFinalization.js +12 -0
- package/dist/payments/schemaCapabilities.d.ts +10 -0
- package/dist/payments/schemaCapabilities.js +10 -0
- package/dist/payments/sql.d.ts +20 -0
- package/dist/payments/sql.js +6 -0
- package/dist/payments/stripe/classifyDecline.d.ts +46 -0
- package/dist/payments/stripe/classifyDecline.js +58 -0
- package/dist/payments/stripe/declineFailureHints.d.ts +46 -0
- package/dist/payments/stripe/declineFailureHints.js +87 -0
- package/dist/payments/stripe/donorContracts.d.ts +120 -0
- package/dist/payments/stripe/donorContracts.js +1 -0
- package/dist/payments/stripe/executionDecline.d.ts +53 -0
- package/dist/payments/stripe/executionDecline.js +107 -0
- package/dist/payments/stripe/index.d.ts +41 -0
- package/dist/payments/stripe/index.js +264 -0
- package/dist/payments/stripe/intentMapper.d.ts +26 -0
- package/dist/payments/stripe/intentMapper.js +51 -0
- package/dist/payments/stripe/methodFacts.d.ts +10 -0
- package/dist/payments/stripe/methodFacts.js +12 -0
- package/dist/payments/stripe/paymentFailureEvidence.d.ts +26 -0
- package/dist/payments/stripe/paymentFailureEvidence.js +33 -0
- package/dist/payments/stripe/stripeFailureEvidence.d.ts +41 -0
- package/dist/payments/stripe/stripeFailureEvidence.js +82 -0
- package/dist/payments/stripe/stripeIntentConfirmationEvidence.d.ts +28 -0
- package/dist/payments/stripe/stripeIntentConfirmationEvidence.js +32 -0
- package/dist/payments/stripe/stripePaymentReconciliationProvider.d.ts +35 -0
- package/dist/payments/stripe/stripePaymentReconciliationProvider.js +222 -0
- package/dist/payments/stripe/stripeRefundEvidence.d.ts +8 -0
- package/dist/payments/stripe/stripeRefundEvidence.js +17 -0
- package/dist/payments/stripe/stripeSandboxPaymentExecutionAdapter.d.ts +45 -0
- package/dist/payments/stripe/stripeSandboxPaymentExecutionAdapter.js +220 -0
- package/dist/payments/stripe/stripeWebhookNormalizer.d.ts +14 -0
- package/dist/payments/stripe/stripeWebhookNormalizer.js +243 -0
- package/dist/payments/stripe/webhookSignature.d.ts +14 -0
- package/dist/payments/stripe/webhookSignature.js +43 -0
- package/dist/payments/tpay/blikRecurringMapper.d.ts +37 -0
- package/dist/payments/tpay/blikRecurringMapper.js +24 -0
- package/dist/payments/tpay/capabilities.d.ts +3 -0
- package/dist/payments/tpay/capabilities.js +18 -0
- package/dist/payments/tpay/classifyDecline.d.ts +46 -0
- package/dist/payments/tpay/classifyDecline.js +58 -0
- package/dist/payments/tpay/declineFailureHints.d.ts +72 -0
- package/dist/payments/tpay/declineFailureHints.js +37 -0
- package/dist/payments/tpay/donorContracts.d.ts +140 -0
- package/dist/payments/tpay/donorContracts.js +1 -0
- package/dist/payments/tpay/index.d.ts +73 -0
- package/dist/payments/tpay/index.js +294 -0
- package/dist/payments/tpay/paymentFailureEvidence.d.ts +26 -0
- package/dist/payments/tpay/paymentFailureEvidence.js +33 -0
- package/dist/payments/tpay/preparedProviderAttempt.d.ts +22 -0
- package/dist/payments/tpay/preparedProviderAttempt.js +24 -0
- package/dist/payments/tpay/providerAttemptFailureDiagnostic.d.ts +3 -0
- package/dist/payments/tpay/providerAttemptFailureDiagnostic.js +95 -0
- package/dist/payments/tpay/tpayCreateTransactionInput.d.ts +25 -0
- package/dist/payments/tpay/tpayCreateTransactionInput.js +128 -0
- package/dist/payments/tpay/tpayDeclineEvidence.d.ts +126 -0
- package/dist/payments/tpay/tpayDeclineEvidence.js +177 -0
- package/dist/payments/tpay/tpayDispatchFailure.d.ts +60 -0
- package/dist/payments/tpay/tpayDispatchFailure.js +121 -0
- package/dist/payments/tpay/tpayFailureEvidence.d.ts +20 -0
- package/dist/payments/tpay/tpayFailureEvidence.js +61 -0
- package/dist/payments/tpay/tpayHttpClient.d.ts +52 -0
- package/dist/payments/tpay/tpayHttpClient.js +185 -0
- package/dist/payments/tpay/tpayHttpFailure.d.ts +57 -0
- package/dist/payments/tpay/tpayHttpFailure.js +143 -0
- package/dist/payments/tpay/tpayPaymentExecutionAdapter.d.ts +20 -0
- package/dist/payments/tpay/tpayPaymentExecutionAdapter.js +249 -0
- package/dist/payments/tpay/tpayPaymentReconciliationProvider.d.ts +5 -0
- package/dist/payments/tpay/tpayPaymentReconciliationProvider.js +244 -0
- package/dist/payments/tpay/tpayTransactionPayload.d.ts +120 -0
- package/dist/payments/tpay/tpayTransactionPayload.js +96 -0
- package/dist/payments/tpay/wallClockTime.d.ts +31 -0
- package/dist/payments/tpay/wallClockTime.js +57 -0
- package/dist/payments/tpay/webhookJwsVerifier.d.ts +17 -0
- package/dist/payments/tpay/webhookJwsVerifier.js +51 -0
- package/dist/payments/tpay/webhookNormalizer.d.ts +54 -0
- package/dist/payments/tpay/webhookNormalizer.js +200 -0
- package/dist/payments/verifiedEvidenceProjection.d.ts +12 -0
- package/dist/payments/verifiedEvidenceProjection.js +166 -0
- package/dist/payments/verifiedIngress.d.ts +119 -0
- package/dist/payments/verifiedIngress.js +220 -0
- package/package.json +37 -2
- package/release-gates.json +105 -3
- package/sql/20260808210000_fulfillment_shipment_rail.sql +810 -0
- package/sql/20260810180000_payment_settlement_rail.sql +574 -0
- package/sql/20260815150000_payment_truth_reconciliation.sql +479 -0
- package/sql/20260819150000_fulfillment_shipment_sequence.sql +98 -0
- package/sql/20260826100000_late_payment_shifts_the_subscription_cycle.sql +215 -0
- package/sql/20261022080000_fulfillment_command_ledger.sql +786 -0
- package/sql/20261022090000_fulfillment_delivery_alignment.sql +1106 -0
- package/src/composition/composeBundle.ts +13 -0
- package/src/composition/fulfillmentContribution.ts +28 -0
- package/src/composition/index.ts +2 -0
- package/src/fulfillment/adapterConformance.ts +195 -0
- package/src/fulfillment/bindings.ts +26 -0
- package/src/fulfillment/commerceFulfillmentHandlers.ts +263 -0
- package/src/fulfillment/commerceFulfillmentReadModel.ts +257 -0
- package/src/fulfillment/contracts/alignment.ts +13 -0
- package/src/fulfillment/contracts/bindings.ts +30 -0
- package/src/fulfillment/contracts/capabilities.ts +15 -0
- package/src/fulfillment/contracts/conformance.ts +61 -0
- package/src/fulfillment/contracts/customerAlignment.ts +4 -0
- package/src/fulfillment/contracts/dispatch.ts +58 -0
- package/src/fulfillment/contracts/index.ts +18 -0
- package/src/fulfillment/contracts/label.ts +9 -0
- package/src/fulfillment/contracts/nativeUnsupported.ts +6 -0
- package/src/fulfillment/contracts/observation.ts +18 -0
- package/src/fulfillment/contracts/operator.ts +31 -0
- package/src/fulfillment/contracts/read.ts +42 -0
- package/src/fulfillment/contracts/readback.ts +11 -0
- package/src/fulfillment/contracts/replacement.ts +15 -0
- package/src/fulfillment/contracts/store.ts +26 -0
- package/src/fulfillment/contracts/sync.ts +61 -0
- package/src/fulfillment/currentFulfillmentParcel.ts +2 -0
- package/src/fulfillment/delayReadModel.ts +60 -0
- package/src/fulfillment/deliveryAlignmentReadModel.ts +15 -0
- package/src/fulfillment/dispatchProjection.ts +20 -0
- package/src/fulfillment/fulfillmentObservationEffects.ts +86 -0
- package/src/fulfillment/handlerSchemas.ts +255 -0
- package/src/fulfillment/handlerSupport.ts +25 -0
- package/src/fulfillment/index.ts +38 -0
- package/src/fulfillment/labelLifecycle.ts +11 -0
- package/src/fulfillment/lowStockEvidenceHandler.ts +60 -0
- package/src/fulfillment/migrations.ts +8 -0
- package/src/fulfillment/nativeUnsupported.ts +23 -0
- package/src/fulfillment/normalizedFulfillmentFacts.ts +2 -0
- package/src/fulfillment/observationProjection.ts +41 -0
- package/src/fulfillment/omnipack/capabilities.ts +18 -0
- package/src/fulfillment/omnipack/client.ts +258 -0
- package/src/fulfillment/omnipack/index.ts +312 -0
- package/src/fulfillment/omnipack/mappers.ts +261 -0
- package/src/fulfillment/omnipack/observation.ts +61 -0
- package/src/fulfillment/omnipack/omnipackDispatchPayload.ts +93 -0
- package/src/fulfillment/omnipack/omnipackOutboundOrderPayload.ts +194 -0
- package/src/fulfillment/omnipack/omnipackProductPackPayload.ts +47 -0
- package/src/fulfillment/omnipack/omnipackProductPayload.ts +67 -0
- package/src/fulfillment/omnipack/omnipackReconciliationPayload.ts +7 -0
- package/src/fulfillment/omnipack/omnipackStatusVocabulary.ts +103 -0
- package/src/fulfillment/omnipack/omnipackWebhookPayload.ts +73 -0
- package/src/fulfillment/omnipack/productSyncMappers.ts +74 -0
- package/src/fulfillment/omnipack/providerError.ts +64 -0
- package/src/fulfillment/omnipack/trackingReferences.ts +77 -0
- package/src/fulfillment/paidFulfillmentRecovery.ts +252 -0
- package/src/fulfillment/paidHandoff.ts +122 -0
- package/src/fulfillment/paidHandoffPorts.ts +21 -0
- package/src/fulfillment/postgresDeliveryAlignment.ts +14 -0
- package/src/fulfillment/postgresDispatchStore.ts +55 -0
- package/src/fulfillment/postgresEvidenceReadPort.ts +59 -0
- package/src/fulfillment/postgresPaidFulfillmentRecovery.ts +29 -0
- package/src/fulfillment/postgresPaidHandoffStore.ts +11 -0
- package/src/fulfillment/postgresShipmentSpine.ts +321 -0
- package/src/fulfillment/postgresStockSyncPort.ts +65 -0
- package/src/fulfillment/productReconciliationEvidenceHandler.ts +64 -0
- package/src/fulfillment/providerCapabilities.ts +18 -0
- package/src/fulfillment/providerCommandLedger.ts +53 -0
- package/src/fulfillment/providerDispatchAcceptance.ts +31 -0
- package/src/fulfillment/providerDispatchError.ts +7 -0
- package/src/fulfillment/providerDispatchWorker.ts +131 -0
- package/src/fulfillment/providerProductSyncWorker.ts +154 -0
- package/src/fulfillment/providerReconciliationError.ts +20 -0
- package/src/fulfillment/providerReconciliationTerminalSkip.ts +8 -0
- package/src/fulfillment/providerReconciliationTimestamp.ts +34 -0
- package/src/fulfillment/providerReconciliationWorker.ts +150 -0
- package/src/fulfillment/providerStockAvailability.ts +60 -0
- package/src/fulfillment/providerStockSyncWorker.ts +222 -0
- package/src/fulfillment/providerTrackingReferences.ts +31 -0
- package/src/fulfillment/replacementRefusals.ts +43 -0
- package/src/fulfillment/replacementShipmentHandler.ts +47 -0
- package/src/fulfillment/schemaCapabilities.ts +7 -0
- package/src/fulfillment/shipmentsOverviewHandler.ts +73 -0
- package/src/fulfillment/statusMap.ts +2 -0
- package/src/fulfillment/trackingProgress.ts +1 -0
- package/src/fulfillment/verifiedIngress.ts +80 -0
- package/src/payments/adapterConformance.ts +118 -0
- package/src/payments/bindings.ts +17 -0
- package/src/payments/checkoutActivePaymentActionResolver.ts +97 -0
- package/src/payments/checkoutRecoveryPaymentResolver.ts +108 -0
- package/src/payments/contracts/adapter.ts +96 -0
- package/src/payments/contracts/conformance.ts +171 -0
- package/src/payments/contracts/evidence.ts +142 -0
- package/src/payments/contracts/index.ts +54 -0
- package/src/payments/contracts/preparedAttempt.ts +86 -0
- package/src/payments/contracts/reconciliation.ts +296 -0
- package/src/payments/contracts/repair.ts +95 -0
- package/src/payments/contracts/truth.ts +108 -0
- package/src/payments/eventConformanceRunner.ts +149 -0
- package/src/payments/index.ts +21 -0
- package/src/payments/paymentAttemptSilenceWindow.ts +26 -0
- package/src/payments/paymentMethodLifecycle.ts +50 -0
- package/src/payments/paymentProviderReconciliationAbsenceReopen.ts +130 -0
- package/src/payments/paymentProviderReconciliationEvidence.ts +117 -0
- package/src/payments/paymentProviderReconciliationWorker.ts +291 -0
- package/src/payments/paymentTruth.ts +131 -0
- package/src/payments/paymentVerifyNowHandler.ts +94 -0
- package/src/payments/paymentVerifyNowService.ts +125 -0
- package/src/payments/paymentWebhookPostProcessing.ts +36 -0
- package/src/payments/postgresPaymentTruth.ts +149 -0
- package/src/payments/preparedAttempt.ts +90 -0
- package/src/payments/preparedAttemptFinalization.ts +13 -0
- package/src/payments/schemaCapabilities.ts +10 -0
- package/src/payments/sql.ts +6 -0
- package/src/payments/stripe/classifyDecline.ts +62 -0
- package/src/payments/stripe/declineFailureHints.ts +89 -0
- package/src/payments/stripe/donorContracts.ts +87 -0
- package/src/payments/stripe/executionDecline.ts +126 -0
- package/src/payments/stripe/index.ts +265 -0
- package/src/payments/stripe/intentMapper.ts +58 -0
- package/src/payments/stripe/methodFacts.ts +21 -0
- package/src/payments/stripe/paymentFailureEvidence.ts +58 -0
- package/src/payments/stripe/stripeFailureEvidence.ts +115 -0
- package/src/payments/stripe/stripeIntentConfirmationEvidence.ts +34 -0
- package/src/payments/stripe/stripePaymentReconciliationProvider.ts +263 -0
- package/src/payments/stripe/stripeRefundEvidence.ts +19 -0
- package/src/payments/stripe/stripeSandboxPaymentExecutionAdapter.ts +283 -0
- package/src/payments/stripe/stripeWebhookNormalizer.ts +277 -0
- package/src/payments/stripe/webhookSignature.ts +55 -0
- package/src/payments/tpay/blikRecurringMapper.ts +42 -0
- package/src/payments/tpay/capabilities.ts +21 -0
- package/src/payments/tpay/classifyDecline.ts +62 -0
- package/src/payments/tpay/declineFailureHints.ts +90 -0
- package/src/payments/tpay/donorContracts.ts +104 -0
- package/src/payments/tpay/index.ts +293 -0
- package/src/payments/tpay/paymentFailureEvidence.ts +58 -0
- package/src/payments/tpay/preparedProviderAttempt.ts +38 -0
- package/src/payments/tpay/providerAttemptFailureDiagnostic.ts +99 -0
- package/src/payments/tpay/tpayCreateTransactionInput.ts +158 -0
- package/src/payments/tpay/tpayDeclineEvidence.ts +233 -0
- package/src/payments/tpay/tpayDispatchFailure.ts +186 -0
- package/src/payments/tpay/tpayFailureEvidence.ts +75 -0
- package/src/payments/tpay/tpayHttpClient.ts +290 -0
- package/src/payments/tpay/tpayHttpFailure.ts +186 -0
- package/src/payments/tpay/tpayPaymentExecutionAdapter.ts +297 -0
- package/src/payments/tpay/tpayPaymentReconciliationProvider.ts +285 -0
- package/src/payments/tpay/tpayTransactionPayload.ts +207 -0
- package/src/payments/tpay/wallClockTime.ts +57 -0
- package/src/payments/tpay/webhookJwsVerifier.ts +82 -0
- package/src/payments/tpay/webhookNormalizer.ts +279 -0
- package/src/payments/verifiedEvidenceProjection.ts +179 -0
- package/src/payments/verifiedIngress.ts +317 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { ActivePaymentActionAuthority, CheckoutActivePaymentActionResolver, CheckoutActionReadProvider, PaymentRecoveryAction } from "./contracts/repair.js";
|
|
2
|
+
import type { PaymentVerifyReadPort, VerifiableAttemptSnapshot } from "./contracts/reconciliation.js";
|
|
3
|
+
import { toClaimedAttemptShape } from "./paymentVerifyNowService.js";
|
|
4
|
+
|
|
5
|
+
const LIVE_INTENT_STATUSES = new Set(["requires_action", "processing"]);
|
|
6
|
+
const LIVE_ATTEMPT_STATUSES = new Set(["sent_to_provider", "requires_action", "processing"]);
|
|
7
|
+
|
|
8
|
+
export function createCheckoutActivePaymentActionResolver(deps: {
|
|
9
|
+
readPort: PaymentVerifyReadPort;
|
|
10
|
+
providers: Partial<Record<string, CheckoutActionReadProvider>>;
|
|
11
|
+
railHandoffKinds(rail: string): readonly ("redirect" | "client-confirmed")[];
|
|
12
|
+
}): CheckoutActivePaymentActionResolver {
|
|
13
|
+
return {
|
|
14
|
+
async readActiveAction(authority) {
|
|
15
|
+
try {
|
|
16
|
+
const initial = await deps.readPort.readVerifiableAttempt({
|
|
17
|
+
orderId: authority.orderId,
|
|
18
|
+
paymentIntentId: authority.paymentIntentId,
|
|
19
|
+
});
|
|
20
|
+
if (!matchesAuthority(initial, authority) || !isLive(initial)) return null;
|
|
21
|
+
const provider = deps.providers[authority.executionRail];
|
|
22
|
+
const providerPaymentId = provider?.resolvePaymentReference(initial) ?? null;
|
|
23
|
+
if (!provider || !providerPaymentId) return null;
|
|
24
|
+
const attempt = toClaimedAttemptShape(initial, providerPaymentId);
|
|
25
|
+
const reading = await provider.readRecoveryPayment({
|
|
26
|
+
providerPaymentId,
|
|
27
|
+
attempt,
|
|
28
|
+
purpose: "active_checkout",
|
|
29
|
+
});
|
|
30
|
+
if (
|
|
31
|
+
!reading.clientAction
|
|
32
|
+
|| !actionMatchesRail(reading.clientAction, authority.executionRail, deps.railHandoffKinds)
|
|
33
|
+
|| reading.manualReviewRequired
|
|
34
|
+
|| !reading.identityMatches
|
|
35
|
+
|| !reading.configuredMoneyMatches
|
|
36
|
+
|| reading.status.status !== "pending"
|
|
37
|
+
) return null;
|
|
38
|
+
|
|
39
|
+
const current = await deps.readPort.readVerifiableAttempt({
|
|
40
|
+
orderId: authority.orderId,
|
|
41
|
+
paymentIntentId: authority.paymentIntentId,
|
|
42
|
+
});
|
|
43
|
+
if (!sameCanonicalAttempt(initial, current) || !isLive(current)) return null;
|
|
44
|
+
return reading.clientAction;
|
|
45
|
+
} catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function matchesAuthority(
|
|
53
|
+
snapshot: VerifiableAttemptSnapshot | null,
|
|
54
|
+
authority: ActivePaymentActionAuthority,
|
|
55
|
+
): snapshot is VerifiableAttemptSnapshot {
|
|
56
|
+
return Boolean(snapshot)
|
|
57
|
+
&& snapshot?.orderId === authority.orderId
|
|
58
|
+
&& snapshot.orderClientId === authority.clientId
|
|
59
|
+
&& snapshot.paymentIntentId === authority.paymentIntentId
|
|
60
|
+
&& snapshot.paymentAttemptId === authority.paymentAttemptId
|
|
61
|
+
&& snapshot.provider === authority.executionRail;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function isLive(snapshot: VerifiableAttemptSnapshot | null): snapshot is VerifiableAttemptSnapshot {
|
|
65
|
+
return Boolean(snapshot)
|
|
66
|
+
&& LIVE_INTENT_STATUSES.has(snapshot?.intentStatus ?? "")
|
|
67
|
+
&& LIVE_ATTEMPT_STATUSES.has(snapshot?.attemptStatus ?? "");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function actionMatchesRail(
|
|
71
|
+
action: PaymentRecoveryAction,
|
|
72
|
+
rail: ActivePaymentActionAuthority["executionRail"],
|
|
73
|
+
railHandoffKinds: (rail: string) => readonly ("redirect" | "client-confirmed")[],
|
|
74
|
+
): boolean {
|
|
75
|
+
return action.provider === rail && railHandoffKinds(rail).includes(action.kind);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function sameCanonicalAttempt(
|
|
79
|
+
before: VerifiableAttemptSnapshot,
|
|
80
|
+
after: VerifiableAttemptSnapshot | null,
|
|
81
|
+
): after is VerifiableAttemptSnapshot {
|
|
82
|
+
return Boolean(after)
|
|
83
|
+
&& after?.orderId === before.orderId
|
|
84
|
+
&& after.orderClientId === before.orderClientId
|
|
85
|
+
&& after.paymentIntentId === before.paymentIntentId
|
|
86
|
+
&& after.paymentAttemptId === before.paymentAttemptId
|
|
87
|
+
&& after.paymentId === before.paymentId
|
|
88
|
+
&& after.provider === before.provider
|
|
89
|
+
&& after.providerAttemptId === before.providerAttemptId
|
|
90
|
+
&& after.providerSessionId === before.providerSessionId
|
|
91
|
+
&& after.intentProviderPaymentId === before.intentProviderPaymentId
|
|
92
|
+
&& after.intentStatus === before.intentStatus
|
|
93
|
+
&& after.attemptStatus === before.attemptStatus
|
|
94
|
+
&& after.amountMinor === before.amountMinor
|
|
95
|
+
&& after.currency.toUpperCase() === before.currency.toUpperCase()
|
|
96
|
+
&& after.localUpdatedAt === before.localUpdatedAt;
|
|
97
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { CheckoutRecoveryPaymentResolution, CheckoutRecoveryPaymentResolver, PaymentProviderRecoveryProvider } from "./contracts/repair.js";
|
|
2
|
+
import type { PaymentVerifyReadPort, VerifiableAttemptSnapshot, PaymentProviderReconciliationPort } from "./contracts/reconciliation.js";
|
|
3
|
+
import { terminalAmountMismatch } from "./paymentProviderReconciliationEvidence.js";
|
|
4
|
+
import { toClaimedAttemptShape, verifyPaymentAttemptNow } from "./paymentVerifyNowService.js";
|
|
5
|
+
|
|
6
|
+
const LIVE_ATTEMPT_STATUSES = new Set(["sent_to_provider", "requires_action", "processing", "created"]);
|
|
7
|
+
|
|
8
|
+
export function createCheckoutRecoveryPaymentResolver(deps: {
|
|
9
|
+
readPort: PaymentVerifyReadPort;
|
|
10
|
+
applyPort: Pick<PaymentProviderReconciliationPort, "applyTerminalResult">;
|
|
11
|
+
providers: Partial<Record<string, PaymentProviderRecoveryProvider>>;
|
|
12
|
+
now?: () => Date;
|
|
13
|
+
}): CheckoutRecoveryPaymentResolver {
|
|
14
|
+
const now = deps.now ?? (() => new Date());
|
|
15
|
+
return {
|
|
16
|
+
async resolve(input) {
|
|
17
|
+
if (!input.paymentIntentId) return { kind: "retry_new" };
|
|
18
|
+
const snapshot = await deps.readPort.readVerifiableAttempt({
|
|
19
|
+
orderId: input.orderId,
|
|
20
|
+
paymentIntentId: input.paymentIntentId,
|
|
21
|
+
});
|
|
22
|
+
if (!snapshot) {
|
|
23
|
+
return input.intentStatus === "created" || input.intentStatus === "failed"
|
|
24
|
+
? { kind: "retry_new" }
|
|
25
|
+
: { kind: "awaiting_provider" };
|
|
26
|
+
}
|
|
27
|
+
return resolveSnapshot(snapshot, deps, now);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function resolveSnapshot(
|
|
33
|
+
snapshot: VerifiableAttemptSnapshot,
|
|
34
|
+
deps: {
|
|
35
|
+
readPort: PaymentVerifyReadPort;
|
|
36
|
+
applyPort: Pick<PaymentProviderReconciliationPort, "applyTerminalResult">;
|
|
37
|
+
providers: Partial<Record<string, PaymentProviderRecoveryProvider>>;
|
|
38
|
+
},
|
|
39
|
+
now: () => Date,
|
|
40
|
+
): Promise<CheckoutRecoveryPaymentResolution> {
|
|
41
|
+
if (snapshot.attemptStatus === "succeeded" || snapshot.intentStatus === "succeeded") {
|
|
42
|
+
return { kind: "paid" };
|
|
43
|
+
}
|
|
44
|
+
if (snapshot.attemptStatus === "failed" || snapshot.intentStatus === "failed") {
|
|
45
|
+
return { kind: "retry_new" };
|
|
46
|
+
}
|
|
47
|
+
if (!LIVE_ATTEMPT_STATUSES.has(snapshot.attemptStatus)) {
|
|
48
|
+
return { kind: "awaiting_provider" };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const provider = deps.providers[snapshot.provider];
|
|
52
|
+
const providerPaymentId = provider?.resolvePaymentReference(snapshot) ?? null;
|
|
53
|
+
if (!provider || !providerPaymentId) return { kind: "awaiting_provider" };
|
|
54
|
+
const attempt = toClaimedAttemptShape(snapshot, providerPaymentId);
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
// Every caller of this resolver is a buyer holding a recovery link open, so
|
|
58
|
+
// an intent still waiting for its first payment method is one they can be
|
|
59
|
+
// handed back — not one to close under them and replace.
|
|
60
|
+
const recovery = await provider.readRecoveryPayment({
|
|
61
|
+
providerPaymentId,
|
|
62
|
+
attempt,
|
|
63
|
+
purpose: "active_checkout",
|
|
64
|
+
});
|
|
65
|
+
if (
|
|
66
|
+
recovery.manualReviewRequired
|
|
67
|
+
|| !recovery.identityMatches
|
|
68
|
+
|| !recovery.configuredMoneyMatches
|
|
69
|
+
) {
|
|
70
|
+
return { kind: "manual_review" };
|
|
71
|
+
}
|
|
72
|
+
if (recovery.clientAction) {
|
|
73
|
+
return { kind: "resume_existing", clientAction: recovery.clientAction };
|
|
74
|
+
}
|
|
75
|
+
if (recovery.status.status === "pending" || recovery.status.status === "unknown") {
|
|
76
|
+
return { kind: "awaiting_provider" };
|
|
77
|
+
}
|
|
78
|
+
if (terminalAmountMismatch(attempt, recovery.status)) {
|
|
79
|
+
return { kind: "manual_review" };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const verified = await verifyPaymentAttemptNow({
|
|
83
|
+
snapshot,
|
|
84
|
+
applyPort: deps.applyPort,
|
|
85
|
+
providers: deps.providers,
|
|
86
|
+
providerPaymentId,
|
|
87
|
+
providerStatus: recovery.status,
|
|
88
|
+
now,
|
|
89
|
+
});
|
|
90
|
+
if (verified.status !== "succeeded" && verified.status !== "failed") {
|
|
91
|
+
return { kind: "awaiting_provider" };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const current = await deps.readPort.readVerifiableAttempt({
|
|
95
|
+
orderId: snapshot.orderId,
|
|
96
|
+
paymentIntentId: snapshot.paymentIntentId,
|
|
97
|
+
});
|
|
98
|
+
if (current?.attemptStatus === "succeeded" || current?.intentStatus === "succeeded") {
|
|
99
|
+
return { kind: "paid" };
|
|
100
|
+
}
|
|
101
|
+
if (current?.attemptStatus === "failed" || current?.intentStatus === "failed") {
|
|
102
|
+
return { kind: "retry_new" };
|
|
103
|
+
}
|
|
104
|
+
return verified.status === "succeeded" ? { kind: "paid" } : { kind: "retry_new" };
|
|
105
|
+
} catch {
|
|
106
|
+
return { kind: "awaiting_provider" };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
PaymentExecutionAttemptStatus,
|
|
3
|
+
PaymentFailureClass,
|
|
4
|
+
PaymentFailureHint,
|
|
5
|
+
PaymentProviderCapabilityDescriptor,
|
|
6
|
+
PaymentRetryAdviceCode,
|
|
7
|
+
StoredMandateSnapshot,
|
|
8
|
+
} from "@openlup/core/payment";
|
|
9
|
+
import type { PaymentAbsencePort, PaymentReadbackPort, PaymentVerifyNormalizePort } from "./evidence.js";
|
|
10
|
+
|
|
11
|
+
declare const transientSecret: unique symbol;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* One-time customer authorization or opaque client handoff, held only in memory.
|
|
15
|
+
* Never persist, log, fingerprint, or include in request/response diagnostics.
|
|
16
|
+
* The host brands a value only at the transient client/server input boundary.
|
|
17
|
+
*/
|
|
18
|
+
export type TransientSecret = string & { readonly [transientSecret]: true };
|
|
19
|
+
|
|
20
|
+
/** Hosted navigation or client confirmation; opaque payloads are transient only. */
|
|
21
|
+
export type PaymentMethodHandoff =
|
|
22
|
+
| { kind: "redirect"; url: string }
|
|
23
|
+
| { kind: "client-confirmed"; payload: TransientSecret };
|
|
24
|
+
|
|
25
|
+
/** Only core neutral taxonomy crosses the adapter boundary; no provider prose. */
|
|
26
|
+
export interface PaymentRefusalEnvelope {
|
|
27
|
+
code: PaymentFailureClass;
|
|
28
|
+
hints: readonly PaymentFailureHint[];
|
|
29
|
+
adviceCode?: PaymentRetryAdviceCode;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A non-terminal attempt or synchronous decline; terminal money is evidence-owned.
|
|
34
|
+
* Diagnostics must exclude transient secrets, handoff payloads, raw bodies and
|
|
35
|
+
* provider prose. Persist only explicitly redacted request/response diagnostics.
|
|
36
|
+
*/
|
|
37
|
+
export interface PaymentExecutionEnvelope {
|
|
38
|
+
outcome:
|
|
39
|
+
| { kind: "attempt"; status: PaymentExecutionAttemptStatus }
|
|
40
|
+
| { kind: "decline"; refusal: PaymentRefusalEnvelope };
|
|
41
|
+
dispatch:
|
|
42
|
+
| { kind: "dispatched"; providerPaymentRef: string }
|
|
43
|
+
| { kind: "notDispatched"; evidence: { exact: true; phase: "before-dispatch"; reason: PaymentRefusalEnvelope } }
|
|
44
|
+
| { kind: "unknown" };
|
|
45
|
+
handoff?: PaymentMethodHandoff;
|
|
46
|
+
diagnostics: Readonly<Record<string, string | number | boolean | null>>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Host identity/key/fingerprint and configured integer-minor money pass verbatim.
|
|
50
|
+
* Missing adapter-required input must refuse before dispatch with exact
|
|
51
|
+
* notDispatched evidence (phase before-dispatch), never unknown or dispatched.
|
|
52
|
+
*/
|
|
53
|
+
export interface PaymentAttemptPort {
|
|
54
|
+
validateInput(input: {
|
|
55
|
+
attemptRef: string;
|
|
56
|
+
intentRef: string;
|
|
57
|
+
fingerprint: string;
|
|
58
|
+
providerIdempotencyKey: string;
|
|
59
|
+
money: { amountMinor: number; currency: string };
|
|
60
|
+
mode: "live" | "test";
|
|
61
|
+
purpose: "initial" | "renewal-unattended" | "recovery";
|
|
62
|
+
methodSelection?: { family: "card" | "wallet" | "bank-redirect" | "one-time-code"; channelRef?: string };
|
|
63
|
+
/** Transient dispatch input only; never persist, audit, log or diagnose. */
|
|
64
|
+
payer?: { email: string; name?: string };
|
|
65
|
+
storedMethod?: { reference: string; mandate: StoredMandateSnapshot };
|
|
66
|
+
/** Client-entered, server-submitted authorization; never persisted or echoed. */
|
|
67
|
+
customerAuthorization?: TransientSecret;
|
|
68
|
+
}): void;
|
|
69
|
+
execute(input: Parameters<PaymentAttemptPort["validateInput"]>[0]): Promise<PaymentExecutionEnvelope>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Platform overlay; the shared core descriptor remains unchanged. */
|
|
73
|
+
export interface PaymentAdapterCapabilities extends Omit<PaymentProviderCapabilityDescriptor, "captureFlows"> {
|
|
74
|
+
captureFlows: readonly {
|
|
75
|
+
kind: string;
|
|
76
|
+
handoff: PaymentMethodHandoff["kind"] | "customer-authorization";
|
|
77
|
+
methodFamilies: readonly ("card" | "wallet" | "bank-redirect" | "one-time-code")[];
|
|
78
|
+
}[];
|
|
79
|
+
supportedCurrencies: readonly string[];
|
|
80
|
+
unattended: "supported" | "unsupported";
|
|
81
|
+
readback: "supported" | "unsupported";
|
|
82
|
+
close: "supported" | "unsupported";
|
|
83
|
+
exactAbsence: "supported" | "unsupported";
|
|
84
|
+
refundObservation: "supported" | "unsupported";
|
|
85
|
+
refundCreate: "unsupported";
|
|
86
|
+
authorizationCaptureSplit: "unsupported";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** The neutral bundle an adapter factory returns; optional ports match declared capabilities. */
|
|
90
|
+
export interface PaymentAdapter {
|
|
91
|
+
capabilities: PaymentAdapterCapabilities;
|
|
92
|
+
attemptPort: PaymentAttemptPort;
|
|
93
|
+
verifyPort: PaymentVerifyNormalizePort;
|
|
94
|
+
readbackPort: PaymentReadbackPort;
|
|
95
|
+
absencePort?: PaymentAbsencePort;
|
|
96
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { PaymentAdapter, PaymentAttemptPort, PaymentExecutionEnvelope } from "./adapter.js";
|
|
2
|
+
import type { PaymentAbsenceEnvelope, PaymentAbsencePort, PaymentReadbackEnvelope, PaymentReadbackPort } from "./evidence.js";
|
|
3
|
+
|
|
4
|
+
/** A fixture binds its own identity, adapter ports and inputs; scenarios accept multiple subjects. */
|
|
5
|
+
export interface PaymentAdapterConformanceSubject {
|
|
6
|
+
subjectId: string;
|
|
7
|
+
adapter: PaymentAdapter;
|
|
8
|
+
executionInput: Parameters<PaymentAttemptPort["execute"]>[0];
|
|
9
|
+
readbackInput: Parameters<PaymentReadbackPort["readPayment"]>[0];
|
|
10
|
+
/** Required when the adapter supplies an absence port. */
|
|
11
|
+
absenceInput?: Parameters<PaymentAbsencePort["proveAbsence"]>[0];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Runner-independent observations; never include transient input or raw diagnostics. */
|
|
15
|
+
export interface PaymentAdapterConformanceEvidence {
|
|
16
|
+
subjects: readonly {
|
|
17
|
+
subjectId: string;
|
|
18
|
+
execution: Omit<PaymentExecutionEnvelope, "handoff">;
|
|
19
|
+
readback: PaymentReadbackEnvelope & { handoff?: never };
|
|
20
|
+
absence?: PaymentAbsenceEnvelope;
|
|
21
|
+
}[];
|
|
22
|
+
cases: readonly { subjectIds: readonly string[]; name: string; passed: boolean }[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
import type { PaymentExecutionBaseInput, PaymentExecutionContractResult } from "@openlup/core/testing";
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export type ExecutionCapability = { readonly name: string; readonly durabilityClaim: false };
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export type SimulatorResult = PaymentExecutionContractResult & {
|
|
32
|
+
providerDecline?: { code?: string; mandateUnsupported?: boolean } | null;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export type ExecutionSubject<TInput extends PaymentExecutionBaseInput, TResult extends SimulatorResult> = {
|
|
37
|
+
readonly execute: (request: TInput) => Promise<TResult>;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The expected provider identity is a property of the adapter under proof, not of
|
|
43
|
+
* this contract. The collector that constructs the subject owns that literal, so a
|
|
44
|
+
* second runtime bundle proves the same behaviour under its own provider identity
|
|
45
|
+
* and this contract names no provider at all.
|
|
46
|
+
*/
|
|
47
|
+
export type ExecutionProviderIdentity = { readonly expectedProvider: string };
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export type ExecutionEvidence = {
|
|
51
|
+
readonly capability: ExecutionCapability;
|
|
52
|
+
readonly executions: number;
|
|
53
|
+
readonly providerCalls: number;
|
|
54
|
+
readonly capturedEffects: number;
|
|
55
|
+
readonly permanentRefusals: number;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
export type AggregateKey = "outOfOrder" | "lateSuccess";
|
|
60
|
+
|
|
61
|
+
export type ResultStatus = "succeeded" | "failed";
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
export type DurableEventCounts = {
|
|
65
|
+
clients: number;
|
|
66
|
+
orders: number;
|
|
67
|
+
payments: number;
|
|
68
|
+
intents: number;
|
|
69
|
+
attempts: number;
|
|
70
|
+
events: number;
|
|
71
|
+
transitions: number;
|
|
72
|
+
idempotencyKeys: number;
|
|
73
|
+
outboxEvents: number;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
export type DurableEventAggregate = {
|
|
78
|
+
orderId: string;
|
|
79
|
+
paymentId: string;
|
|
80
|
+
paymentIntentId: string;
|
|
81
|
+
paymentAttemptId: string;
|
|
82
|
+
orderStatus: string;
|
|
83
|
+
paymentStatus: string;
|
|
84
|
+
intentStatus: string;
|
|
85
|
+
attemptStatus: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/** Fixture cardinality that stays constant for the whole run. */
|
|
90
|
+
export type DurableEventFixtureCardinality = Pick<
|
|
91
|
+
DurableEventCounts,
|
|
92
|
+
"clients" | "orders" | "payments" | "intents" | "attempts"
|
|
93
|
+
>;
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/** Durable writes the adapter emits per step. */
|
|
97
|
+
export type DurableEventWriteCardinality = Pick<
|
|
98
|
+
DurableEventCounts,
|
|
99
|
+
"events" | "transitions" | "idempotencyKeys" | "outboxEvents"
|
|
100
|
+
>;
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Exact write cardinality is adapter-owned, not part of the portable contract:
|
|
105
|
+
* how many transitions, idempotency keys, and outbox rows one payment event
|
|
106
|
+
* produces is a property of the writer and outbox fan-out under proof, and a
|
|
107
|
+
* second runtime bundle emits its own. The behavioural assertions below (no
|
|
108
|
+
* second canonical event, no regression after a stale failure, convergence on
|
|
109
|
+
* late success) are the portable part; the collector that owns the adapter
|
|
110
|
+
* injects its own numbers so they are still asserted at the exact same step.
|
|
111
|
+
*/
|
|
112
|
+
export type DurableEventCardinalityExpectations = {
|
|
113
|
+
readonly fixture: DurableEventFixtureCardinality;
|
|
114
|
+
readonly baseline: DurableEventWriteCardinality;
|
|
115
|
+
readonly afterOutOfOrderSuccess: DurableEventWriteCardinality;
|
|
116
|
+
readonly afterOutOfOrderFailure: DurableEventWriteCardinality;
|
|
117
|
+
readonly afterDuplicate: DurableEventWriteCardinality;
|
|
118
|
+
readonly afterLateFailure: DurableEventWriteCardinality;
|
|
119
|
+
readonly final: DurableEventWriteCardinality;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
export type DurableEventSnapshot = {
|
|
124
|
+
counts: DurableEventCounts;
|
|
125
|
+
aggregates: Record<AggregateKey, DurableEventAggregate>;
|
|
126
|
+
events: Array<{
|
|
127
|
+
id: string;
|
|
128
|
+
eventKey: string;
|
|
129
|
+
paymentIntentId: string;
|
|
130
|
+
paymentAttemptId: string;
|
|
131
|
+
processingStatus: string;
|
|
132
|
+
}>;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
export type EventReceipt = { paymentEventId: string; replayed: boolean };
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
export type DurableEventCapability = {
|
|
140
|
+
readonly name: string;
|
|
141
|
+
readonly durabilityClaim: true;
|
|
142
|
+
assertSafe(): void;
|
|
143
|
+
reset(): Promise<{ residualRows: number }>;
|
|
144
|
+
seed(): Promise<void>;
|
|
145
|
+
snapshot(): Promise<DurableEventSnapshot>;
|
|
146
|
+
ingest(input: {
|
|
147
|
+
aggregate: AggregateKey;
|
|
148
|
+
eventKey: string;
|
|
149
|
+
resultStatus: ResultStatus;
|
|
150
|
+
occurredAt: string;
|
|
151
|
+
}): Promise<EventReceipt>;
|
|
152
|
+
apply(input: {
|
|
153
|
+
aggregate: AggregateKey;
|
|
154
|
+
paymentEventId: string;
|
|
155
|
+
eventKey: string;
|
|
156
|
+
resultStatus: ResultStatus;
|
|
157
|
+
occurredAt: string;
|
|
158
|
+
}): Promise<{ replayed: boolean }>;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
export type DurableEventEvidence = {
|
|
163
|
+
capability: { name: string; durabilityClaim: true };
|
|
164
|
+
baseline: DurableEventSnapshot;
|
|
165
|
+
afterOutOfOrderSuccess: DurableEventSnapshot;
|
|
166
|
+
afterOutOfOrderFailure: DurableEventSnapshot;
|
|
167
|
+
afterDuplicate: DurableEventSnapshot;
|
|
168
|
+
afterLateFailure: DurableEventSnapshot;
|
|
169
|
+
final: DurableEventSnapshot;
|
|
170
|
+
cleanupResidualRows: 0;
|
|
171
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { PaymentMethodLifecycleEvent } from "@openlup/core/payment";
|
|
2
|
+
import type { PaymentMethodHandoff, PaymentRefusalEnvelope } from "./adapter.js";
|
|
3
|
+
|
|
4
|
+
/** Configured integer-minor money; currency bytes pass through unchanged. */
|
|
5
|
+
export type PaymentMoney = { amountMinor: number; currency: string };
|
|
6
|
+
/** Exact attempt identity for readback, close and absence lookups. */
|
|
7
|
+
export type PaymentAttemptIdentity = {
|
|
8
|
+
provider: string;
|
|
9
|
+
/** Null permits an exact intent lookup when dispatch acknowledgement was lost. */
|
|
10
|
+
providerPaymentRef: string | null;
|
|
11
|
+
intentRef: string;
|
|
12
|
+
attemptRef: string;
|
|
13
|
+
};
|
|
14
|
+
type VerifiedIdentity = {
|
|
15
|
+
provider: string;
|
|
16
|
+
/** Adapter-derived; includes outcome/status class, never transaction identity alone. */
|
|
17
|
+
providerEventId: string;
|
|
18
|
+
/** Provider-asserted time or null; never substitute receipt time. */
|
|
19
|
+
providerOccurredAt: string | null;
|
|
20
|
+
/** Stable normalized evidence fingerprint; excludes receipt time and secrets. */
|
|
21
|
+
fingerprint: string;
|
|
22
|
+
/** Adapter-filtered provider facts for host audit/repair readers. Never raw bodies,
|
|
23
|
+
* transient secrets, handoffs or customer authorization; excluded from identity/fingerprint.
|
|
24
|
+
* Typed evidence takes precedence over overlapping audit facts. */
|
|
25
|
+
providerAuditPayload?: Readonly<Record<string, unknown>>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** Original payment money and stable operation identity accompany every reversal. */
|
|
29
|
+
export type PaymentRefundObservation = {
|
|
30
|
+
operationId: string;
|
|
31
|
+
originalPaymentMoney: PaymentMoney;
|
|
32
|
+
} & (
|
|
33
|
+
| { kind: "cumulative-snapshot"; refundedMoney: PaymentMoney }
|
|
34
|
+
| { kind: "event-delta"; refundedMoney: PaymentMoney }
|
|
35
|
+
| { kind: "full-reversal"; reason: "refund" | "chargeback" }
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
/** Type-only policy: require-evidence is default; legacy behavior needs explicit opt-in. */
|
|
39
|
+
export type RefundEvidencePolicy = "require-evidence" | "legacy-assume-full";
|
|
40
|
+
|
|
41
|
+
/** Verified money facts; authorization alone is never settled money. */
|
|
42
|
+
export type VerifiedPaymentEvidence = VerifiedIdentity & {
|
|
43
|
+
kind: "money";
|
|
44
|
+
providerPaymentRef: string;
|
|
45
|
+
intentRef: string | null;
|
|
46
|
+
attemptRef: string | null;
|
|
47
|
+
outcome: "succeeded" | "failed" | "pending" | "refunded" | "disputed";
|
|
48
|
+
money: PaymentMoney | null;
|
|
49
|
+
refusal?: PaymentRefusalEnvelope;
|
|
50
|
+
refund?: PaymentRefundObservation;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Method lifecycle facts, separate from the money-outcome union; setup is never money success.
|
|
55
|
+
* Outcomes follow the core method lifecycle kinds plus setup failure and required customer action.
|
|
56
|
+
*/
|
|
57
|
+
export type VerifiedMethodEvidence = VerifiedIdentity & {
|
|
58
|
+
kind: "method";
|
|
59
|
+
outcome: "registered" | "updated" | "revoked" | "expired" | "suspended" | "failed" | "requires-action";
|
|
60
|
+
methodLifecycle?: PaymentMethodLifecycleEvent;
|
|
61
|
+
/** Registration facts only. The host resolves client/subscription ownership. */
|
|
62
|
+
reusableMethod?: {
|
|
63
|
+
providerCustomerRef?: string | null;
|
|
64
|
+
providerMethodRef: string;
|
|
65
|
+
providerMandateRef?: string | null;
|
|
66
|
+
methodKind: string;
|
|
67
|
+
status: "pending_verification" | "active" | "inactive" | "expired" | "revoked";
|
|
68
|
+
};
|
|
69
|
+
methodRef: string;
|
|
70
|
+
setupRef: string | null;
|
|
71
|
+
intentRef: string | null;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** Verification uses injected I/O and original bytes; never reserialize rawBody. */
|
|
75
|
+
export interface PaymentVerifyNormalizePort {
|
|
76
|
+
verifyAndNormalize(input: {
|
|
77
|
+
rawBody: Uint8Array;
|
|
78
|
+
headers: Readonly<Record<string, string | readonly string[] | undefined>>;
|
|
79
|
+
/** Freshness only; never part of identity or fingerprint. */
|
|
80
|
+
receivedAt: string;
|
|
81
|
+
}): Promise<VerifiedPaymentEvidence | VerifiedMethodEvidence | {
|
|
82
|
+
kind: "refusal";
|
|
83
|
+
reason: "signature" | "stale" | "malformed" | "unsupported-event";
|
|
84
|
+
}>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Existing purpose bytes are preserved for reference reconciliation callers. */
|
|
88
|
+
export type ProviderReadPurpose = "active_checkout" | "recovery";
|
|
89
|
+
|
|
90
|
+
/** Absence requires a complete bounded lookup of exact identity and configured money. */
|
|
91
|
+
export type PaymentAbsenceEnvelope = {
|
|
92
|
+
identity: PaymentAttemptIdentity;
|
|
93
|
+
expectedMoney: PaymentMoney;
|
|
94
|
+
} & (
|
|
95
|
+
| { kind: "absent"; evidence: { exact: true; complete: true; lookupReference: string } }
|
|
96
|
+
| { kind: "unknown"; reason: "timeout" | "truncated" | "indeterminate" }
|
|
97
|
+
| { kind: "unsupported" }
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
/** Unknown is neither absence nor unsupported. Timeout/truncation stays unknown. */
|
|
101
|
+
export type PaymentReadbackEnvelope = {
|
|
102
|
+
identity: PaymentAttemptIdentity;
|
|
103
|
+
expectedMoney: PaymentMoney;
|
|
104
|
+
purpose: ProviderReadPurpose;
|
|
105
|
+
} & (
|
|
106
|
+
| { kind: "succeeded" | "failed" | "pending"; observedMoney: PaymentMoney; providerOccurredAt: string | null;
|
|
107
|
+
refusal?: PaymentRefusalEnvelope; handoff?: PaymentMethodHandoff }
|
|
108
|
+
| { kind: "unknown"; reason: "timeout" | "truncated" | "indeterminate" }
|
|
109
|
+
| { kind: "absent"; evidence: Extract<PaymentAbsenceEnvelope, { kind: "absent" }>["evidence"] }
|
|
110
|
+
| { kind: "unsupported" }
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
/** Exact readback of one attempt; a browser return or provider silence is never money truth. */
|
|
114
|
+
export interface PaymentReadbackPort {
|
|
115
|
+
readPayment(input: {
|
|
116
|
+
identity: PaymentAttemptIdentity;
|
|
117
|
+
expectedMoney: PaymentMoney;
|
|
118
|
+
purpose: ProviderReadPurpose;
|
|
119
|
+
}): Promise<PaymentReadbackEnvelope>;
|
|
120
|
+
/** Present only when capabilities declare close supported; returns the post-close readback. */
|
|
121
|
+
close?(input: {
|
|
122
|
+
identity: PaymentAttemptIdentity;
|
|
123
|
+
expectedMoney: PaymentMoney;
|
|
124
|
+
purpose: ProviderReadPurpose;
|
|
125
|
+
}): Promise<PaymentReadbackEnvelope>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Present only when capabilities declare exact absence supported. */
|
|
129
|
+
export interface PaymentAbsencePort {
|
|
130
|
+
proveAbsence(input: {
|
|
131
|
+
identity: PaymentAttemptIdentity;
|
|
132
|
+
expectedMoney: PaymentMoney;
|
|
133
|
+
}): Promise<PaymentAbsenceEnvelope>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Transport-neutral acknowledgement; hosts write their own HTTP response. */
|
|
137
|
+
export interface PaymentIngressPort {
|
|
138
|
+
receive(input: Parameters<PaymentVerifyNormalizePort["verifyAndNormalize"]>[0]): Promise<{
|
|
139
|
+
status: 200 | 400 | 409 | 503;
|
|
140
|
+
data: Record<string, unknown>;
|
|
141
|
+
}>;
|
|
142
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
PreparedAttemptPrepareInput,
|
|
3
|
+
PreparedAttemptPersistenceResult,
|
|
4
|
+
PreparedAttemptFinalizeInput,
|
|
5
|
+
PreparedAttemptPersistencePort,
|
|
6
|
+
PreparedAttemptExecutionPort,
|
|
7
|
+
PreparedAttemptExecutionInput,
|
|
8
|
+
PreparedAttemptFailurePolicy,
|
|
9
|
+
PreparedAttemptExecutionResult,
|
|
10
|
+
} from "./preparedAttempt.js";
|
|
11
|
+
export type {
|
|
12
|
+
TransientSecret,
|
|
13
|
+
PaymentMethodHandoff,
|
|
14
|
+
PaymentRefusalEnvelope,
|
|
15
|
+
PaymentExecutionEnvelope,
|
|
16
|
+
PaymentAttemptPort,
|
|
17
|
+
PaymentAdapterCapabilities,
|
|
18
|
+
PaymentAdapter,
|
|
19
|
+
} from "./adapter.js";
|
|
20
|
+
export type {
|
|
21
|
+
PaymentRefundObservation,
|
|
22
|
+
RefundEvidencePolicy,
|
|
23
|
+
VerifiedPaymentEvidence,
|
|
24
|
+
VerifiedMethodEvidence,
|
|
25
|
+
PaymentVerifyNormalizePort,
|
|
26
|
+
ProviderReadPurpose,
|
|
27
|
+
PaymentAbsenceEnvelope,
|
|
28
|
+
PaymentReadbackEnvelope,
|
|
29
|
+
PaymentMoney,
|
|
30
|
+
PaymentAttemptIdentity,
|
|
31
|
+
PaymentReadbackPort,
|
|
32
|
+
PaymentAbsencePort,
|
|
33
|
+
} from "./evidence.js";
|
|
34
|
+
export type { PaymentAdapterConformanceSubject, PaymentAdapterConformanceEvidence } from "./conformance.js";
|
|
35
|
+
|
|
36
|
+
export type {
|
|
37
|
+
PaymentTruthOutcome, PaymentTruthRefusalClass, PaymentSourceEvidence, PaymentTruthEvent,
|
|
38
|
+
PaymentReconciliationResult, PaymentTruthReadback, PaymentTruthPort, CanonicalPaymentSource,
|
|
39
|
+
} from "./truth.js";
|
|
40
|
+
export type { PaymentIngressPort } from "./evidence.js";
|
|
41
|
+
export type {
|
|
42
|
+
ProviderReconciliationStatusKind, ProviderReconciliationStatus,
|
|
43
|
+
PaymentProviderReconciliationProvider, ClaimedPaymentAttempt, PaymentProviderReconciliationPort,
|
|
44
|
+
InteractivePreparedAttemptManualReconciliationPort, ManualInteractivePreparedAttemptAbsenceEvidence,
|
|
45
|
+
InteractivePreparedAttemptReopenResult, PaymentProviderReconciliationWorkerResult,
|
|
46
|
+
PaymentProviderReconciliationWorkerInput, SilenceWindowLookup,
|
|
47
|
+
PaymentVerifyReadPort, VerifiableAttemptSnapshot, PaymentVerifyNowResult,
|
|
48
|
+
} from "./reconciliation.js";
|
|
49
|
+
|
|
50
|
+
export type { PostgresPaymentTruthOptions } from "./truth.js";
|
|
51
|
+
|
|
52
|
+
export type { ActivePaymentActionAuthority, CheckoutActivePaymentActionResolver, CheckoutRecoveryPaymentResolver, CheckoutRecoveryPaymentResolution, PaymentRecoveryAction, PaymentRepairMethodPort } from "./repair.js";
|
|
53
|
+
|
|
54
|
+
export type { PaymentServicesOptions, PaymentServices } from "./repair.js";
|