@openlup/platform 0.26.0 → 0.28.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 +305 -327
- package/README.md +332 -16
- package/dist/account-support/accountReadFacade.d.ts +8 -0
- package/dist/account-support/accountReadFacade.js +10 -0
- package/dist/account-support/accountReadModels.d.ts +69 -0
- package/dist/account-support/accountReadModels.js +272 -0
- package/dist/account-support/bindings.d.ts +23 -0
- package/dist/account-support/bindings.js +16 -0
- package/dist/account-support/contracts/account.d.ts +281 -0
- package/dist/account-support/contracts/account.js +1 -0
- package/dist/account-support/contracts/capabilities.d.ts +44 -0
- package/dist/account-support/contracts/capabilities.js +1 -0
- package/dist/account-support/contracts/commands.d.ts +307 -0
- package/dist/account-support/contracts/commands.js +1 -0
- package/dist/account-support/contracts/customer360.d.ts +154 -0
- package/dist/account-support/contracts/customer360.js +1 -0
- package/dist/account-support/contracts/index.d.ts +10 -0
- package/dist/account-support/contracts/index.js +1 -0
- package/dist/account-support/contracts/invoice.d.ts +79 -0
- package/dist/account-support/contracts/invoice.js +1 -0
- package/dist/account-support/contracts/operator.d.ts +289 -0
- package/dist/account-support/contracts/operator.js +1 -0
- package/dist/account-support/contribution.d.ts +24 -0
- package/dist/account-support/contribution.js +22 -0
- package/dist/account-support/customer360.d.ts +106 -0
- package/dist/account-support/customer360.js +163 -0
- package/dist/account-support/customerAccountReadDiagnostics.d.ts +11 -0
- package/dist/account-support/customerAccountReadDiagnostics.js +71 -0
- package/dist/account-support/index.d.ts +26 -0
- package/dist/account-support/index.js +15 -0
- package/dist/account-support/invoiceAccess.d.ts +57 -0
- package/dist/account-support/invoiceAccess.js +40 -0
- package/dist/account-support/migrations.d.ts +14 -0
- package/dist/account-support/migrations.js +7 -0
- package/dist/account-support/operatorAuthority.d.ts +67 -0
- package/dist/account-support/operatorAuthority.js +379 -0
- package/dist/account-support/operatorRecovery.d.ts +66 -0
- package/dist/account-support/operatorRecovery.js +129 -0
- package/dist/account-support/orderHistory.d.ts +50 -0
- package/dist/account-support/orderHistory.js +188 -0
- package/dist/account-support/paymentMethodComposition.d.ts +5 -0
- package/dist/account-support/paymentMethodComposition.js +4 -0
- package/dist/account-support/postgresOperatorAuthority.d.ts +16 -0
- package/dist/account-support/postgresOperatorAuthority.js +93 -0
- package/dist/account-support/selfService.d.ts +6 -0
- package/dist/account-support/selfService.js +81 -0
- package/dist/account-support/subscriptionCommandCodec.d.ts +10 -0
- package/dist/account-support/subscriptionCommandCodec.js +38 -0
- package/dist/catalog/draftSchemas.d.ts +1 -1
- package/dist/catalog/foundationSchemas.d.ts +3 -3
- package/dist/catalog/resolvedSkuProjection.d.ts +2 -2
- package/dist/catalog/sellableSchemas.d.ts +2 -2
- package/dist/commerce/adapters/managed/commerceOmsControlPlane.d.ts +3 -0
- package/dist/commerce/adapters/managed/commerceOmsControlPlane.js +71 -0
- package/dist/commerce/adapters/managed/commerceOmsMutations.d.ts +10 -0
- package/dist/commerce/adapters/managed/commerceOmsMutations.js +119 -0
- package/dist/commerce/adapters/managed/commerceOmsPort.d.ts +28 -0
- package/dist/commerce/adapters/managed/commerceOmsPort.js +101 -0
- package/dist/commerce/adapters/managed/oms/accounting.d.ts +3 -0
- package/dist/commerce/adapters/managed/oms/accounting.js +13 -0
- package/dist/commerce/adapters/managed/oms/fulfillmentReads.d.ts +17 -0
- package/dist/commerce/adapters/managed/oms/fulfillmentReads.js +81 -0
- package/dist/commerce/adapters/managed/oms/inboundEvents.d.ts +9 -0
- package/dist/commerce/adapters/managed/oms/inboundEvents.js +40 -0
- package/dist/commerce/adapters/managed/oms/outboxEvents.d.ts +2 -0
- package/dist/commerce/adapters/managed/oms/outboxEvents.js +23 -0
- package/dist/commerce/adapters/managed/oms/paymentAttempts.d.ts +3 -0
- package/dist/commerce/adapters/managed/oms/paymentAttempts.js +15 -0
- package/dist/commerce/adapters/managed/oms/queueSelection.d.ts +12 -0
- package/dist/commerce/adapters/managed/oms/queueSelection.js +109 -0
- package/dist/commerce/adapters/managed/oms/readProjections.d.ts +18 -0
- package/dist/commerce/adapters/managed/oms/readProjections.js +13 -0
- package/dist/commerce/adapters/managed/oms/readQueries.d.ts +16 -0
- package/dist/commerce/adapters/managed/oms/readQueries.js +276 -0
- package/dist/commerce/adapters/managed/oms/types.d.ts +2 -0
- package/dist/commerce/adapters/managed/oms/types.js +7 -0
- package/dist/commerce/checkoutCommandSchemas.d.ts +89 -0
- package/dist/commerce/checkoutCommandSchemas.js +70 -0
- package/dist/commerce/checkoutHelpers.d.ts +21 -0
- package/dist/commerce/checkoutHelpers.js +29 -0
- package/dist/commerce/checkoutResumeSchemas.d.ts +158 -0
- package/dist/commerce/checkoutResumeSchemas.js +145 -0
- package/dist/commerce/checkoutSchemas.d.ts +158 -0
- package/dist/commerce/checkoutSchemas.js +161 -0
- package/dist/commerce/commerceReturnsPort.d.ts +97 -0
- package/dist/commerce/commerceReturnsPort.js +39 -0
- package/dist/commerce/configuratorIntentPersistenceSchemas.d.ts +20 -0
- package/dist/commerce/configuratorIntentPersistenceSchemas.js +21 -0
- package/dist/commerce/configuratorIntentSchemas.d.ts +63 -0
- package/dist/commerce/configuratorIntentSchemas.js +43 -0
- package/dist/commerce/contractPrimitives.d.ts +50 -0
- package/dist/commerce/contractPrimitives.js +25 -0
- package/dist/commerce/contracts/availability.d.ts +23 -0
- package/dist/commerce/contracts/availability.js +1 -0
- package/dist/commerce/contracts/fulfillmentRecovery.d.ts +25 -0
- package/dist/commerce/contracts/fulfillmentRecovery.js +1 -0
- package/dist/commerce/contracts/index.d.ts +13 -0
- package/dist/commerce/contracts/index.js +1 -0
- package/dist/commerce/contracts/intent.d.ts +86 -0
- package/dist/commerce/contracts/intent.js +1 -0
- package/dist/commerce/contracts/omsTypes.d.ts +1216 -0
- package/dist/commerce/contracts/omsTypes.js +1 -0
- package/dist/commerce/contracts/order.d.ts +39 -0
- package/dist/commerce/contracts/order.js +1 -0
- package/dist/commerce/contracts/orderMoney.d.ts +52 -0
- package/dist/commerce/contracts/orderMoney.js +1 -0
- package/dist/commerce/contracts/ports.d.ts +113 -0
- package/dist/commerce/contracts/ports.js +1 -0
- package/dist/commerce/contracts/recovery.d.ts +11 -0
- package/dist/commerce/contracts/recovery.js +1 -0
- package/dist/commerce/contracts/runtimePorts.d.ts +196 -0
- package/dist/commerce/contracts/runtimePorts.js +1 -0
- package/dist/commerce/contracts/state.d.ts +26 -0
- package/dist/commerce/contracts/state.js +43 -0
- package/dist/commerce/customerDefaultsSnapshotSchemas.d.ts +51 -0
- package/dist/commerce/customerDefaultsSnapshotSchemas.js +106 -0
- package/dist/commerce/errors.d.ts +18 -0
- package/dist/commerce/errors.js +36 -0
- package/dist/commerce/fulfillmentEligibility.d.ts +6 -0
- package/dist/commerce/fulfillmentEligibility.js +31 -0
- package/dist/commerce/index.d.ts +72 -0
- package/dist/commerce/index.js +67 -0
- package/dist/commerce/model/customerFulfillmentRecovery.d.ts +40 -0
- package/dist/commerce/model/customerFulfillmentRecovery.js +144 -0
- package/dist/commerce/model/fulfillmentCancellationEligibility.d.ts +7 -0
- package/dist/commerce/model/fulfillmentCancellationEligibility.js +9 -0
- package/dist/commerce/model/omsAccountingVisibility.d.ts +12 -0
- package/dist/commerce/model/omsAccountingVisibility.js +118 -0
- package/dist/commerce/model/omsBillingInvoiceBuyer.d.ts +2 -0
- package/dist/commerce/model/omsBillingInvoiceBuyer.js +15 -0
- package/dist/commerce/model/omsCurrency.d.ts +4 -0
- package/dist/commerce/model/omsCurrency.js +5 -0
- package/dist/commerce/model/omsFulfillmentDebug.d.ts +20 -0
- package/dist/commerce/model/omsFulfillmentDebug.js +122 -0
- package/dist/commerce/model/omsFulfillmentSummary.d.ts +16 -0
- package/dist/commerce/model/omsFulfillmentSummary.js +189 -0
- package/dist/commerce/model/omsListTotals.d.ts +13 -0
- package/dist/commerce/model/omsListTotals.js +32 -0
- package/dist/commerce/model/omsOperationalLadder.d.ts +51 -0
- package/dist/commerce/model/omsOperationalLadder.js +158 -0
- package/dist/commerce/model/omsOrderLineMoney.d.ts +4 -0
- package/dist/commerce/model/omsOrderLineMoney.js +25 -0
- package/dist/commerce/model/omsPaymentMethodSummary.d.ts +5 -0
- package/dist/commerce/model/omsPaymentMethodSummary.js +11 -0
- package/dist/commerce/model/omsReadModel.d.ts +43 -0
- package/dist/commerce/model/omsReadModel.js +211 -0
- package/dist/commerce/model/omsReadModelCommunication.d.ts +3 -0
- package/dist/commerce/model/omsReadModelCommunication.js +29 -0
- package/dist/commerce/model/omsReadModelHelpers.d.ts +125 -0
- package/dist/commerce/model/omsReadModelHelpers.js +212 -0
- package/dist/commerce/model/omsReadModelList.d.ts +33 -0
- package/dist/commerce/model/omsReadModelList.js +50 -0
- package/dist/commerce/model/omsReadModelListSummary.d.ts +3 -0
- package/dist/commerce/model/omsReadModelListSummary.js +13 -0
- package/dist/commerce/model/omsReadModelPricing.d.ts +5 -0
- package/dist/commerce/model/omsReadModelPricing.js +36 -0
- package/dist/commerce/model/omsReadModelProjections.d.ts +1 -0
- package/dist/commerce/model/omsReadModelProjections.js +1 -0
- package/dist/commerce/model/omsReadModelRowCore.d.ts +79 -0
- package/dist/commerce/model/omsReadModelRowCore.js +149 -0
- package/dist/commerce/model/omsReadModelRows.d.ts +1 -0
- package/dist/commerce/model/omsReadModelRows.js +6 -0
- package/dist/commerce/offerAvailability.d.ts +18 -0
- package/dist/commerce/offerAvailability.js +53 -0
- package/dist/commerce/offerAvailabilitySchemas.d.ts +43 -0
- package/dist/commerce/offerAvailabilitySchemas.js +42 -0
- package/dist/commerce/offerEvidenceSchemas.d.ts +7 -0
- package/dist/commerce/offerEvidenceSchemas.js +13 -0
- package/dist/commerce/oms/omsContractBase.d.ts +130 -0
- package/dist/commerce/oms/omsContractBase.js +86 -0
- package/dist/commerce/oms/omsContractReadAuxSchemas.d.ts +222 -0
- package/dist/commerce/oms/omsContractReadAuxSchemas.js +123 -0
- package/dist/commerce/oms/omsContractReadSchemas.d.ts +2266 -0
- package/dist/commerce/oms/omsContractReadSchemas.js +277 -0
- package/dist/commerce/oms/omsContractRequests.d.ts +196 -0
- package/dist/commerce/oms/omsContractRequests.js +118 -0
- package/dist/commerce/oms/omsContracts.d.ts +5 -0
- package/dist/commerce/oms/omsContracts.js +4 -0
- package/dist/commerce/oms/omsControlPlane.d.ts +275 -0
- package/dist/commerce/oms/omsControlPlane.js +72 -0
- package/dist/commerce/oms/omsFulfillmentContractSchemas.d.ts +203 -0
- package/dist/commerce/oms/omsFulfillmentContractSchemas.js +94 -0
- package/dist/commerce/oms/omsFulfillmentDebugSchemas.d.ts +69 -0
- package/dist/commerce/oms/omsFulfillmentDebugSchemas.js +33 -0
- package/dist/commerce/oms/omsFulfillmentHealthSchemas.d.ts +67 -0
- package/dist/commerce/oms/omsFulfillmentHealthSchemas.js +44 -0
- package/dist/commerce/oms/omsPorts.d.ts +84 -0
- package/dist/commerce/oms/omsPorts.js +148 -0
- package/dist/commerce/oms/omsPrimitives.d.ts +5 -0
- package/dist/commerce/oms/omsPrimitives.js +3 -0
- package/dist/commerce/oms/omsProviderEvidenceSchemas.d.ts +15 -0
- package/dist/commerce/oms/omsProviderEvidenceSchemas.js +12 -0
- package/dist/commerce/orderDraftErrors.d.ts +13 -0
- package/dist/commerce/orderDraftErrors.js +20 -0
- package/dist/commerce/orderEmailEligibility.d.ts +54 -0
- package/dist/commerce/orderEmailEligibility.js +123 -0
- package/dist/commerce/orderEmailLines.d.ts +12 -0
- package/dist/commerce/orderEmailLines.js +8 -0
- package/dist/commerce/orderFeedbackContracts.d.ts +41 -0
- package/dist/commerce/orderFeedbackContracts.js +33 -0
- package/dist/commerce/orderMoney.d.ts +6 -0
- package/dist/commerce/orderMoney.js +168 -0
- package/dist/commerce/orderReviewContracts.d.ts +475 -0
- package/dist/commerce/orderReviewContracts.js +94 -0
- package/dist/commerce/orderReviewPorts.d.ts +140 -0
- package/dist/commerce/orderReviewPorts.js +1 -0
- package/dist/commerce/outboxDispatchContracts.d.ts +30 -0
- package/dist/commerce/outboxDispatchContracts.js +1 -0
- package/dist/commerce/outboxEventSchemas.d.ts +162 -0
- package/dist/commerce/outboxEventSchemas.js +164 -0
- package/dist/commerce/outboxOrderDraftEmailPorts.d.ts +207 -0
- package/dist/commerce/outboxOrderDraftEmailPorts.js +12 -0
- package/dist/commerce/paymentContinuation.d.ts +4 -0
- package/dist/commerce/paymentContinuation.js +4 -0
- package/dist/commerce/ports.d.ts +8 -0
- package/dist/commerce/ports.js +1 -0
- package/dist/commerce/recoveryDestination.d.ts +3 -0
- package/dist/commerce/recoveryDestination.js +17 -0
- package/dist/commerce/runtimeErrors.d.ts +8 -0
- package/dist/commerce/runtimeErrors.js +16 -0
- package/dist/commerce/salesChannelEnvelope.d.ts +20 -0
- package/dist/commerce/salesChannelEnvelope.js +7 -0
- package/dist/commerce/schemas.d.ts +174 -0
- package/dist/commerce/schemas.js +84 -0
- package/dist/commerce/server/checkoutCompensation.d.ts +21 -0
- package/dist/commerce/server/checkoutCompensation.js +32 -0
- package/dist/commerce/server/checkoutConflictClassifiers.d.ts +17 -0
- package/dist/commerce/server/checkoutConflictClassifiers.js +38 -0
- package/dist/commerce/server/checkoutExpiredRecoveryPolicy.d.ts +38 -0
- package/dist/commerce/server/checkoutExpiredRecoveryPolicy.js +85 -0
- package/dist/commerce/server/checkoutInvoiceBuyerSnapshot.d.ts +22 -0
- package/dist/commerce/server/checkoutInvoiceBuyerSnapshot.js +30 -0
- package/dist/commerce/server/checkoutOfferPolicyPort.d.ts +33 -0
- package/dist/commerce/server/checkoutOfferPolicyPort.js +49 -0
- package/dist/commerce/server/checkoutPaymentContinuationCredential.d.ts +58 -0
- package/dist/commerce/server/checkoutPaymentContinuationCredential.js +154 -0
- package/dist/commerce/server/checkoutQuoteTypes.d.ts +19 -0
- package/dist/commerce/server/checkoutQuoteTypes.js +1 -0
- package/dist/commerce/server/checkoutRecoveryOrderPort.d.ts +42 -0
- package/dist/commerce/server/checkoutRecoveryOrderPort.js +1 -0
- package/dist/commerce/server/checkoutRecoveryToken.d.ts +40 -0
- package/dist/commerce/server/checkoutRecoveryToken.js +26 -0
- package/dist/commerce/server/checkoutRefusalContinuation.d.ts +24 -0
- package/dist/commerce/server/checkoutRefusalContinuation.js +18 -0
- package/dist/commerce/server/checkoutRuntimeTypes.d.ts +81 -0
- package/dist/commerce/server/checkoutRuntimeTypes.js +1 -0
- package/dist/commerce/server/commerceCheckoutCommandExecution.d.ts +60 -0
- package/dist/commerce/server/commerceCheckoutCommandExecution.js +136 -0
- package/dist/commerce/server/commerceCheckoutCompensation.d.ts +26 -0
- package/dist/commerce/server/commerceCheckoutCompensation.js +46 -0
- package/dist/commerce/server/commerceCheckoutContinuationTerms.d.ts +50 -0
- package/dist/commerce/server/commerceCheckoutContinuationTerms.js +66 -0
- package/dist/commerce/server/commerceCheckoutCustomerDefaults.d.ts +18 -0
- package/dist/commerce/server/commerceCheckoutCustomerDefaults.js +17 -0
- package/dist/commerce/server/commerceCheckoutFailureHandler.d.ts +51 -0
- package/dist/commerce/server/commerceCheckoutFailureHandler.js +90 -0
- package/dist/commerce/server/commerceCheckoutHandler.d.ts +213 -0
- package/dist/commerce/server/commerceCheckoutHandler.js +196 -0
- package/dist/commerce/server/commerceCheckoutHandlerAdmission.d.ts +58 -0
- package/dist/commerce/server/commerceCheckoutHandlerAdmission.js +94 -0
- package/dist/commerce/server/commerceCheckoutHandlerHelpers.d.ts +67 -0
- package/dist/commerce/server/commerceCheckoutHandlerHelpers.js +155 -0
- package/dist/commerce/server/commerceCheckoutOrchestrationError.d.ts +9 -0
- package/dist/commerce/server/commerceCheckoutOrchestrationError.js +14 -0
- package/dist/commerce/server/commerceCheckoutPromotionPriceChange.d.ts +47 -0
- package/dist/commerce/server/commerceCheckoutPromotionPriceChange.js +43 -0
- package/dist/commerce/server/commerceCheckoutProviderPayment.d.ts +34 -0
- package/dist/commerce/server/commerceCheckoutProviderPayment.js +37 -0
- package/dist/commerce/server/commerceCheckoutQuoteGuard.d.ts +62 -0
- package/dist/commerce/server/commerceCheckoutQuoteGuard.js +106 -0
- package/dist/commerce/server/commerceCheckoutResume.d.ts +29 -0
- package/dist/commerce/server/commerceCheckoutResume.js +81 -0
- package/dist/commerce/server/commerceCheckoutResumeGuard.d.ts +54 -0
- package/dist/commerce/server/commerceCheckoutResumeGuard.js +138 -0
- package/dist/commerce/server/commerceCheckoutSavedPaymentMethod.d.ts +39 -0
- package/dist/commerce/server/commerceCheckoutSavedPaymentMethod.js +44 -0
- package/dist/commerce/server/commerceCheckoutStartRuntimeFailure.d.ts +7 -0
- package/dist/commerce/server/commerceCheckoutStartRuntimeFailure.js +39 -0
- package/dist/commerce/server/commerceCheckoutTiming.d.ts +8 -0
- package/dist/commerce/server/commerceCheckoutTiming.js +31 -0
- package/dist/commerce/server/commerceDiagnostics.d.ts +6 -0
- package/dist/commerce/server/commerceDiagnostics.js +31 -0
- package/dist/commerce/server/commerceOmsCancelOrderHandler.d.ts +7 -0
- package/dist/commerce/server/commerceOmsCancelOrderHandler.js +22 -0
- package/dist/commerce/server/commerceOmsControlPlaneHandlers.d.ts +18 -0
- package/dist/commerce/server/commerceOmsControlPlaneHandlers.js +60 -0
- package/dist/commerce/server/commerceOmsHandlers.d.ts +47 -0
- package/dist/commerce/server/commerceOmsHandlers.js +176 -0
- package/dist/commerce/server/commerceOmsMarkRefundedHandler.d.ts +7 -0
- package/dist/commerce/server/commerceOmsMarkRefundedHandler.js +19 -0
- package/dist/commerce/server/commerceOrderDraft.d.ts +24 -0
- package/dist/commerce/server/commerceOrderDraft.js +92 -0
- package/dist/commerce/server/commercePaidOrderOrchestration.d.ts +131 -0
- package/dist/commerce/server/commercePaidOrderOrchestration.js +140 -0
- package/dist/commerce/server/commerceProviderAttemptFailure.d.ts +133 -0
- package/dist/commerce/server/commerceProviderAttemptFailure.js +175 -0
- package/dist/commerce/server/commerceReturnsHandlers.d.ts +41 -0
- package/dist/commerce/server/commerceReturnsHandlers.js +100 -0
- package/dist/commerce/server/commerceRuntimePort.d.ts +16 -0
- package/dist/commerce/server/commerceRuntimePort.js +57 -0
- package/dist/commerce/server/commerceRuntimeService.d.ts +98 -0
- package/dist/commerce/server/commerceRuntimeService.js +186 -0
- package/dist/commerce/server/commerceRuntimeStartResponse.d.ts +37 -0
- package/dist/commerce/server/commerceRuntimeStartResponse.js +56 -0
- package/dist/commerce/server/commerceStarterOfferGuard.d.ts +55 -0
- package/dist/commerce/server/commerceStarterOfferGuard.js +128 -0
- package/dist/commerce/server/configuratorIntentPersistence.d.ts +47 -0
- package/dist/commerce/server/configuratorIntentPersistence.js +85 -0
- package/dist/commerce/server/configuratorIntentPersistenceHandler.d.ts +14 -0
- package/dist/commerce/server/configuratorIntentPersistenceHandler.js +42 -0
- package/dist/commerce/server/emailRuntime.d.ts +47 -0
- package/dist/commerce/server/emailRuntime.js +1 -0
- package/dist/commerce/server/handlerSupport.d.ts +68 -0
- package/dist/commerce/server/handlerSupport.js +1 -0
- package/dist/commerce/server/index.d.ts +178 -0
- package/dist/commerce/server/index.js +127 -0
- package/dist/commerce/server/offerAvailability.d.ts +21 -0
- package/dist/commerce/server/offerAvailability.js +163 -0
- package/dist/commerce/server/orderDraftRpcPayload.d.ts +20 -0
- package/dist/commerce/server/orderDraftRpcPayload.js +21 -0
- package/dist/commerce/server/orderFeedbackSubmit.d.ts +20 -0
- package/dist/commerce/server/orderFeedbackSubmit.js +16 -0
- package/dist/commerce/server/orderFeedbackTokenCheck.d.ts +17 -0
- package/dist/commerce/server/orderFeedbackTokenCheck.js +14 -0
- package/dist/commerce/server/orderReviewAdminHandlers.d.ts +47 -0
- package/dist/commerce/server/orderReviewAdminHandlers.js +41 -0
- package/dist/commerce/server/orderReviewHandlers.d.ts +114 -0
- package/dist/commerce/server/orderReviewHandlers.js +42 -0
- package/dist/commerce/server/orderReviewLifecycle.d.ts +10 -0
- package/dist/commerce/server/orderReviewLifecycle.js +121 -0
- package/dist/commerce/server/orderReviewMedia.d.ts +11 -0
- package/dist/commerce/server/orderReviewMedia.js +172 -0
- package/dist/commerce/server/orderReviewRawUploadHandler.d.ts +40 -0
- package/dist/commerce/server/orderReviewRawUploadHandler.js +316 -0
- package/dist/commerce/server/outboxCheckoutExpiredEmailHandler.d.ts +14 -0
- package/dist/commerce/server/outboxCheckoutExpiredEmailHandler.js +57 -0
- package/dist/commerce/server/outboxCheckoutRecoveryEmailHandler.d.ts +13 -0
- package/dist/commerce/server/outboxCheckoutRecoveryEmailHandler.js +150 -0
- package/dist/commerce/server/outboxDispatchRegistry.d.ts +46 -0
- package/dist/commerce/server/outboxDispatchRegistry.js +184 -0
- package/dist/commerce/server/outboxDispatchRegistryComposition.d.ts +6 -0
- package/dist/commerce/server/outboxDispatchRegistryComposition.js +23 -0
- package/dist/commerce/server/outboxOrderDraftEmailHandler.d.ts +14 -0
- package/dist/commerce/server/outboxOrderDraftEmailHandler.js +130 -0
- package/dist/commerce/server/outboxOrderPaidEmailHandler.d.ts +21 -0
- package/dist/commerce/server/outboxOrderPaidEmailHandler.js +93 -0
- package/dist/commerce/server/outboxOrderPaidFulfillmentHandler.d.ts +3 -0
- package/dist/commerce/server/outboxOrderPaidFulfillmentHandler.js +1 -0
- package/dist/commerce/server/outboxOrderPaidFulfillmentPorts.d.ts +3 -0
- package/dist/commerce/server/outboxOrderPaidFulfillmentPorts.js +1 -0
- package/dist/commerce/server/outboxOrderRefundedEmailHandler.d.ts +13 -0
- package/dist/commerce/server/outboxOrderRefundedEmailHandler.js +42 -0
- package/dist/commerce/server/outboxPaymentFailedEmailHandler.d.ts +14 -0
- package/dist/commerce/server/outboxPaymentFailedEmailHandler.js +65 -0
- package/dist/commerce/server/outboxReturnEmailHandlers.d.ts +26 -0
- package/dist/commerce/server/outboxReturnEmailHandlers.js +53 -0
- package/dist/commerce/server/outboxShipmentDeliveredEmailHandler.d.ts +17 -0
- package/dist/commerce/server/outboxShipmentDeliveredEmailHandler.js +52 -0
- package/dist/commerce/server/outboxShipmentDispatchedEmailHandler.d.ts +13 -0
- package/dist/commerce/server/outboxShipmentDispatchedEmailHandler.js +87 -0
- package/dist/commerce/server/outboxShipmentExceptionEmailHandler.d.ts +13 -0
- package/dist/commerce/server/outboxShipmentExceptionEmailHandler.js +46 -0
- package/dist/commerce/server/referenceCheckoutHandler.d.ts +48 -0
- package/dist/commerce/server/referenceCheckoutHandler.js +68 -0
- package/dist/commerce/server/reservationSweepPort.d.ts +31 -0
- package/dist/commerce/server/reservationSweepPort.js +45 -0
- package/dist/commerce/server/starterTermsPort.d.ts +22 -0
- package/dist/commerce/server/starterTermsPort.js +1 -0
- package/dist/commerce/server/supabaseCommerceReturnsPort.d.ts +13 -0
- package/dist/commerce/server/supabaseCommerceReturnsPort.js +56 -0
- package/dist/communications/consentPurposeRegistry.d.ts +1 -1
- package/dist/communications/newsletterIntegrationContracts.d.ts +10 -10
- package/dist/composition/accountSupportContribution.d.ts +18 -0
- package/dist/composition/accountSupportContribution.js +21 -0
- package/dist/composition/commerceContribution.d.ts +21 -0
- package/dist/composition/commerceContribution.js +27 -0
- package/dist/composition/index.d.ts +2 -0
- package/dist/composition/index.js +2 -0
- package/dist/fulfillment/handlerSchemas.d.ts +69 -69
- package/dist/fulfillment/index.d.ts +1 -1
- package/dist/fulfillment/index.js +1 -1
- package/dist/fulfillment/paidHandoff.d.ts +12 -1
- package/dist/fulfillment/paidHandoff.js +2 -2
- package/dist/fulfillment/providerDispatchWorker.d.ts +4 -4
- package/dist/identity/customerContracts.d.ts +4 -4
- package/dist/inventory/bindings.d.ts +3 -0
- package/dist/inventory/bindings.js +10 -4
- package/dist/inventory/index.d.ts +1 -0
- package/dist/inventory/index.js +1 -0
- package/dist/inventory/managedStockAvailability.d.ts +15 -0
- package/dist/inventory/managedStockAvailability.js +16 -0
- package/dist/inventory/postgresStockAvailability.js +2 -25
- package/dist/inventory/schemas.d.ts +1 -1
- package/dist/inventory/stockReadResponse.d.ts +4 -0
- package/dist/inventory/stockReadResponse.js +27 -0
- package/dist/invoicing/snapshot.d.ts +1 -1
- package/dist/pricing/acquisitionQuoteBinding.d.ts +1 -1
- package/dist/pricing/browser/index.d.ts +6 -0
- package/dist/pricing/browser/index.js +6 -0
- package/dist/pricing/catalogFactsSchemas.d.ts +1 -1
- package/dist/pricing/quotePromotionEvidence.d.ts +1 -1
- package/dist/pricing/quoteSchemas.d.ts +56 -56
- package/dist/promotions/adminPromotionCodesContracts.d.ts +30 -30
- package/dist/promotions/adminPromotionsContracts.d.ts +16 -16
- package/dist/subscriptions/index.d.ts +3 -2
- package/dist/subscriptions/index.js +3 -2
- package/package.json +32 -2
- package/release-gates.json +90 -8
- package/sql/20261026120000_account_support_operator_authority.sql +693 -0
- package/src/account-support/accountReadFacade.ts +15 -0
- package/src/account-support/accountReadModels.ts +371 -0
- package/src/account-support/bindings.ts +28 -0
- package/src/account-support/contracts/account.ts +306 -0
- package/src/account-support/contracts/capabilities.ts +30 -0
- package/src/account-support/contracts/commands.ts +243 -0
- package/src/account-support/contracts/customer360.ts +150 -0
- package/src/account-support/contracts/index.ts +141 -0
- package/src/account-support/contracts/invoice.ts +44 -0
- package/src/account-support/contracts/operator.ts +123 -0
- package/src/account-support/contribution.ts +35 -0
- package/src/account-support/customer360.ts +268 -0
- package/src/account-support/customerAccountReadDiagnostics.ts +83 -0
- package/src/account-support/index.ts +72 -0
- package/src/account-support/invoiceAccess.ts +63 -0
- package/src/account-support/migrations.ts +7 -0
- package/src/account-support/operatorAuthority.ts +393 -0
- package/src/account-support/operatorRecovery.ts +136 -0
- package/src/account-support/orderHistory.ts +309 -0
- package/src/account-support/paymentMethodComposition.ts +8 -0
- package/src/account-support/postgresOperatorAuthority.ts +92 -0
- package/src/account-support/selfService.ts +83 -0
- package/src/account-support/subscriptionCommandCodec.ts +48 -0
- package/src/commerce/adapters/managed/commerceOmsControlPlane.ts +80 -0
- package/src/commerce/adapters/managed/commerceOmsMutations.ts +145 -0
- package/src/commerce/adapters/managed/commerceOmsPort.ts +158 -0
- package/src/commerce/adapters/managed/oms/accounting.ts +18 -0
- package/src/commerce/adapters/managed/oms/fulfillmentReads.ts +82 -0
- package/src/commerce/adapters/managed/oms/inboundEvents.ts +45 -0
- package/src/commerce/adapters/managed/oms/outboxEvents.ts +30 -0
- package/src/commerce/adapters/managed/oms/paymentAttempts.ts +19 -0
- package/src/commerce/adapters/managed/oms/queueSelection.ts +132 -0
- package/src/commerce/adapters/managed/oms/readProjections.ts +22 -0
- package/src/commerce/adapters/managed/oms/readQueries.ts +292 -0
- package/src/commerce/adapters/managed/oms/types.ts +9 -0
- package/src/commerce/checkoutCommandSchemas.ts +93 -0
- package/src/commerce/checkoutHelpers.ts +47 -0
- package/src/commerce/checkoutResumeSchemas.ts +164 -0
- package/src/commerce/checkoutSchemas.ts +182 -0
- package/src/commerce/commerceReturnsPort.ts +67 -0
- package/src/commerce/configuratorIntentPersistenceSchemas.ts +26 -0
- package/src/commerce/configuratorIntentSchemas.ts +47 -0
- package/src/commerce/contractPrimitives.ts +30 -0
- package/src/commerce/contracts/availability.ts +21 -0
- package/src/commerce/contracts/fulfillmentRecovery.ts +26 -0
- package/src/commerce/contracts/index.ts +17 -0
- package/src/commerce/contracts/intent.ts +58 -0
- package/src/commerce/contracts/omsTypes.ts +1217 -0
- package/src/commerce/contracts/order.ts +44 -0
- package/src/commerce/contracts/orderMoney.ts +75 -0
- package/src/commerce/contracts/ports.ts +124 -0
- package/src/commerce/contracts/recovery.ts +24 -0
- package/src/commerce/contracts/runtimePorts.ts +201 -0
- package/src/commerce/contracts/state.ts +64 -0
- package/src/commerce/customerDefaultsSnapshotSchemas.ts +117 -0
- package/src/commerce/errors.ts +53 -0
- package/src/commerce/fulfillmentEligibility.ts +32 -0
- package/src/commerce/index.ts +82 -0
- package/src/commerce/model/customerFulfillmentRecovery.ts +185 -0
- package/src/commerce/model/fulfillmentCancellationEligibility.ts +18 -0
- package/src/commerce/model/omsAccountingVisibility.ts +135 -0
- package/src/commerce/model/omsBillingInvoiceBuyer.ts +20 -0
- package/src/commerce/model/omsCurrency.ts +8 -0
- package/src/commerce/model/omsFulfillmentDebug.ts +157 -0
- package/src/commerce/model/omsFulfillmentSummary.ts +225 -0
- package/src/commerce/model/omsListTotals.ts +38 -0
- package/src/commerce/model/omsOperationalLadder.ts +181 -0
- package/src/commerce/model/omsOrderLineMoney.ts +34 -0
- package/src/commerce/model/omsPaymentMethodSummary.ts +19 -0
- package/src/commerce/model/omsReadModel.ts +302 -0
- package/src/commerce/model/omsReadModelCommunication.ts +32 -0
- package/src/commerce/model/omsReadModelHelpers.ts +279 -0
- package/src/commerce/model/omsReadModelList.ts +90 -0
- package/src/commerce/model/omsReadModelListSummary.ts +19 -0
- package/src/commerce/model/omsReadModelPricing.ts +57 -0
- package/src/commerce/model/omsReadModelProjections.ts +1 -0
- package/src/commerce/model/omsReadModelRowCore.ts +193 -0
- package/src/commerce/model/omsReadModelRows.ts +7 -0
- package/src/commerce/offerAvailability.ts +75 -0
- package/src/commerce/offerAvailabilitySchemas.ts +56 -0
- package/src/commerce/offerEvidenceSchemas.ts +17 -0
- package/src/commerce/oms/omsContractBase.ts +92 -0
- package/src/commerce/oms/omsContractReadAuxSchemas.ts +130 -0
- package/src/commerce/oms/omsContractReadSchemas.ts +303 -0
- package/src/commerce/oms/omsContractRequests.ts +143 -0
- package/src/commerce/oms/omsContracts.ts +6 -0
- package/src/commerce/oms/omsControlPlane.ts +85 -0
- package/src/commerce/oms/omsFulfillmentContractSchemas.ts +113 -0
- package/src/commerce/oms/omsFulfillmentDebugSchemas.ts +38 -0
- package/src/commerce/oms/omsFulfillmentHealthSchemas.ts +46 -0
- package/src/commerce/oms/omsPorts.ts +165 -0
- package/src/commerce/oms/omsPrimitives.ts +3 -0
- package/src/commerce/oms/omsProviderEvidenceSchemas.ts +13 -0
- package/src/commerce/orderDraftErrors.ts +28 -0
- package/src/commerce/orderEmailEligibility.ts +131 -0
- package/src/commerce/orderEmailLines.ts +22 -0
- package/src/commerce/orderFeedbackContracts.ts +47 -0
- package/src/commerce/orderMoney.ts +207 -0
- package/src/commerce/orderReviewContracts.ts +124 -0
- package/src/commerce/orderReviewPorts.ts +94 -0
- package/src/commerce/outboxDispatchContracts.ts +30 -0
- package/src/commerce/outboxEventSchemas.ts +230 -0
- package/src/commerce/outboxOrderDraftEmailPorts.ts +241 -0
- package/src/commerce/paymentContinuation.ts +5 -0
- package/src/commerce/ports.ts +7 -0
- package/src/commerce/recoveryDestination.ts +23 -0
- package/src/commerce/runtimeErrors.ts +19 -0
- package/src/commerce/salesChannelEnvelope.ts +28 -0
- package/src/commerce/schemas.ts +104 -0
- package/src/commerce/server/checkoutCompensation.ts +49 -0
- package/src/commerce/server/checkoutConflictClassifiers.ts +53 -0
- package/src/commerce/server/checkoutExpiredRecoveryPolicy.ts +107 -0
- package/src/commerce/server/checkoutInvoiceBuyerSnapshot.ts +36 -0
- package/src/commerce/server/checkoutOfferPolicyPort.ts +60 -0
- package/src/commerce/server/checkoutPaymentContinuationCredential.ts +222 -0
- package/src/commerce/server/checkoutQuoteTypes.ts +9 -0
- package/src/commerce/server/checkoutRecoveryOrderPort.ts +40 -0
- package/src/commerce/server/checkoutRecoveryToken.ts +63 -0
- package/src/commerce/server/checkoutRefusalContinuation.ts +29 -0
- package/src/commerce/server/checkoutRuntimeTypes.ts +26 -0
- package/src/commerce/server/commerceCheckoutCommandExecution.ts +188 -0
- package/src/commerce/server/commerceCheckoutCompensation.ts +66 -0
- package/src/commerce/server/commerceCheckoutContinuationTerms.ts +87 -0
- package/src/commerce/server/commerceCheckoutCustomerDefaults.ts +24 -0
- package/src/commerce/server/commerceCheckoutFailureHandler.ts +144 -0
- package/src/commerce/server/commerceCheckoutHandler.ts +269 -0
- package/src/commerce/server/commerceCheckoutHandlerAdmission.ts +157 -0
- package/src/commerce/server/commerceCheckoutHandlerHelpers.ts +223 -0
- package/src/commerce/server/commerceCheckoutOrchestrationError.ts +15 -0
- package/src/commerce/server/commerceCheckoutPromotionPriceChange.ts +83 -0
- package/src/commerce/server/commerceCheckoutProviderPayment.ts +45 -0
- package/src/commerce/server/commerceCheckoutQuoteGuard.ts +172 -0
- package/src/commerce/server/commerceCheckoutResume.ts +132 -0
- package/src/commerce/server/commerceCheckoutResumeGuard.ts +195 -0
- package/src/commerce/server/commerceCheckoutSavedPaymentMethod.ts +85 -0
- package/src/commerce/server/commerceCheckoutStartRuntimeFailure.ts +59 -0
- package/src/commerce/server/commerceCheckoutTiming.ts +53 -0
- package/src/commerce/server/commerceDiagnostics.ts +37 -0
- package/src/commerce/server/commerceOmsCancelOrderHandler.ts +43 -0
- package/src/commerce/server/commerceOmsControlPlaneHandlers.ts +71 -0
- package/src/commerce/server/commerceOmsHandlers.ts +275 -0
- package/src/commerce/server/commerceOmsMarkRefundedHandler.ts +39 -0
- package/src/commerce/server/commerceOrderDraft.ts +131 -0
- package/src/commerce/server/commercePaidOrderOrchestration.ts +275 -0
- package/src/commerce/server/commerceProviderAttemptFailure.ts +257 -0
- package/src/commerce/server/commerceReturnsHandlers.ts +143 -0
- package/src/commerce/server/commerceRuntimePort.ts +75 -0
- package/src/commerce/server/commerceRuntimeService.ts +229 -0
- package/src/commerce/server/commerceRuntimeStartResponse.ts +76 -0
- package/src/commerce/server/commerceStarterOfferGuard.ts +200 -0
- package/src/commerce/server/configuratorIntentPersistence.ts +161 -0
- package/src/commerce/server/configuratorIntentPersistenceHandler.ts +54 -0
- package/src/commerce/server/emailRuntime.ts +30 -0
- package/src/commerce/server/handlerSupport.ts +22 -0
- package/src/commerce/server/index.ts +181 -0
- package/src/commerce/server/offerAvailability.ts +275 -0
- package/src/commerce/server/orderDraftRpcPayload.ts +39 -0
- package/src/commerce/server/orderFeedbackSubmit.ts +40 -0
- package/src/commerce/server/orderFeedbackTokenCheck.ts +28 -0
- package/src/commerce/server/orderReviewAdminHandlers.ts +43 -0
- package/src/commerce/server/orderReviewHandlers.ts +57 -0
- package/src/commerce/server/orderReviewLifecycle.ts +129 -0
- package/src/commerce/server/orderReviewMedia.ts +170 -0
- package/src/commerce/server/orderReviewRawUploadHandler.ts +300 -0
- package/src/commerce/server/outboxCheckoutExpiredEmailHandler.ts +86 -0
- package/src/commerce/server/outboxCheckoutRecoveryEmailHandler.ts +188 -0
- package/src/commerce/server/outboxDispatchRegistry.ts +269 -0
- package/src/commerce/server/outboxDispatchRegistryComposition.ts +31 -0
- package/src/commerce/server/outboxOrderDraftEmailHandler.ts +162 -0
- package/src/commerce/server/outboxOrderPaidEmailHandler.ts +147 -0
- package/src/commerce/server/outboxOrderPaidFulfillmentHandler.ts +4 -0
- package/src/commerce/server/outboxOrderPaidFulfillmentPorts.ts +3 -0
- package/src/commerce/server/outboxOrderRefundedEmailHandler.ts +58 -0
- package/src/commerce/server/outboxPaymentFailedEmailHandler.ts +99 -0
- package/src/commerce/server/outboxReturnEmailHandlers.ts +92 -0
- package/src/commerce/server/outboxShipmentDeliveredEmailHandler.ts +94 -0
- package/src/commerce/server/outboxShipmentDispatchedEmailHandler.ts +112 -0
- package/src/commerce/server/outboxShipmentExceptionEmailHandler.ts +73 -0
- package/src/commerce/server/referenceCheckoutHandler.ts +87 -0
- package/src/commerce/server/reservationSweepPort.ts +67 -0
- package/src/commerce/server/starterTermsPort.ts +22 -0
- package/src/commerce/server/supabaseCommerceReturnsPort.ts +81 -0
- package/src/composition/accountSupportContribution.ts +28 -0
- package/src/composition/commerceContribution.ts +35 -0
- package/src/composition/index.ts +2 -0
- package/src/fulfillment/index.ts +1 -1
- package/src/fulfillment/paidHandoff.ts +2 -2
- package/src/inventory/bindings.ts +12 -4
- package/src/inventory/index.ts +1 -0
- package/src/inventory/managedStockAvailability.ts +23 -0
- package/src/inventory/postgresStockAvailability.ts +2 -21
- package/src/inventory/stockReadResponse.ts +25 -0
- package/src/pricing/browser/index.ts +6 -0
- package/src/subscriptions/index.ts +3 -2
package/README.md
CHANGED
|
@@ -10,19 +10,31 @@ Development preview. This package is part of the publishable set with core and o
|
|
|
10
10
|
|
|
11
11
|
It holds the runnable server substrate an OpenLup application composes: the Node HTTP runtime, BFF dispatch, scheduling and job leases, blob storage, data gateways, the node-postgres migration runner and bundle composition. Ports and their contracts stay in `@openlup/core/platform-runtime`.
|
|
12
12
|
|
|
13
|
-
For the prepared `0.
|
|
14
|
-
limitations](CHANGELOG.md#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
For the prepared `0.28.0` set, read the [adjacent-release migration and known
|
|
14
|
+
limitations](CHANGELOG.md#0280) before selecting optional services. Experimental
|
|
15
|
+
account/support APIs use `./account-support` and the type-only
|
|
16
|
+
`./account-support/contracts`; reference bindings remain inert and default-off.
|
|
17
|
+
Apply the M12 support-authority forwards after complete same-rail predecessors
|
|
18
|
+
and follow the email-correction admission, claim, identity-commit and settlement
|
|
19
|
+
migration notes before replacing retired callers. Experimental
|
|
20
|
+
commerce schemas and ports use `./commerce` and `./commerce/contracts`;
|
|
21
|
+
handlers, adapters and checkout engines use the Node-only `./commerce/server`.
|
|
22
|
+
The commerce contribution and reference binding remain inert and default-off.
|
|
23
|
+
Install the complete native chain through the M12 support-authority forward
|
|
24
|
+
(`20261026120000_account_support_operator_authority.sql`). Sparse SQL projections
|
|
25
|
+
are not an install chain. Native runtime
|
|
26
|
+
roles need the ATP/exposure EXECUTE and underlying SELECT grants described in
|
|
27
|
+
the release notes.
|
|
28
|
+
Managed hosts apply the complete prefix through `20261026120100`, including
|
|
29
|
+
the current support-authority forward and M11's nine forwards for preference/return ownership, operator receipts,
|
|
30
|
+
acquisition/finalize admission, ATP preview and starter graduation. Legacy
|
|
31
|
+
omitted-country input uses the configured settlement region; neutral commands
|
|
32
|
+
require explicit country. Starter graduation admits 14, 21 or 28 days; rollback
|
|
33
|
+
below that forward with a 21-day marker is unsupported, so roll forward.
|
|
34
|
+
The service-only ATP preview uses owner privileges and a fixed search path.
|
|
35
|
+
Retain exact applied failure-attempt attribution for the existing managed
|
|
36
|
+
dunning overloads; native attempt-replay parity remains registered. These
|
|
37
|
+
managed forwards authorize no host activation.
|
|
26
38
|
Preserve captured obligations and receipts on rollback.
|
|
27
39
|
M10 subscription services and contributions remain **EXPERIMENTAL and DEFAULT-OFF**.
|
|
28
40
|
Hosts explicitly supply readiness, execution, commands, mandatory G23 admission,
|
|
@@ -38,7 +50,7 @@ Adopters must not activate unselected or unready invoicing; installation and
|
|
|
38
50
|
inert contributions register no runner, worker, route or schedule.
|
|
39
51
|
M06 managed-host proof classes remain pending in the
|
|
40
52
|
[M06 parity ledger](../../docs/platform/plans/oss-m06-stock-reservations-delivery.md#parity-pending-rows).
|
|
41
|
-
Size comparison uses the published `0.
|
|
53
|
+
Size comparison uses the published `0.27.0` tarball. Preparation and offline
|
|
42
54
|
adapter evidence grant no publication or provider-account certification.
|
|
43
55
|
|
|
44
56
|
Longer module recipes live in the [platform package reference](../../docs/platform/PLATFORM_PACKAGE_REFERENCE.md).
|
|
@@ -81,13 +93,209 @@ timestamp used in the webhook's idempotency key.
|
|
|
81
93
|
| `./inventory` | Experimental schemas/ports, handlers, native stores, projection, injected forecast and SQL descriptor; `./inventory/contracts` DTOs. |
|
|
82
94
|
| `./catalog` | Experimental neutral catalog schemas, drafts, reads, media source packs and publication ports |
|
|
83
95
|
| `./catalog/contracts` | Dependency-free catalog DTOs, media resolver, authority and canonicalization helpers |
|
|
96
|
+
| `./commerce`, `./commerce/contracts` | Browser-safe neutral commerce schema cores, generic ports and pure contract helpers |
|
|
97
|
+
| `./commerce/server` | Node-only OMS, returns, native reviews/media and hosted-feedback handlers/adapters and order-detail composition, email consumers, dispatch registry, paid-fulfillment binding and checkout compensation, checkout handlers, runtime and shared paid-order saga |
|
|
84
98
|
| `./pricing` | Experimental price authority, quote computation/handlers, offer projection/cache, readiness and policy tokens |
|
|
99
|
+
| `./pricing/browser` | Existing quote primitives, acquisition validators and shipping-terms validator, browser-safe |
|
|
85
100
|
| `./pricing/contracts` | Dependency-free authority, money, quote and offer DTOs and version constants |
|
|
86
101
|
| `./promotions` | Experimental promotion application, admin handlers, native read/sweep, SQL projections and acceptance |
|
|
87
102
|
| `./promotions/contracts` | Dependency-free preview and admin DTOs |
|
|
88
103
|
| `./shipping` | Experimental delivery ports, injected-schema handlers, summary/evidence; native flat-rate port + Core schema readiness |
|
|
89
104
|
| `./shipping/contracts` | Type-only delivery, pickup-point, summary and evidence DTOs |
|
|
90
105
|
|
|
106
|
+
## Commerce contracts
|
|
107
|
+
|
|
108
|
+
`./composition` exports the inert `createCommerceContribution` for the installed
|
|
109
|
+
commerce entries and selected callables. Duplicate descriptor identities refuse;
|
|
110
|
+
the [composition recipe](../../docs/platform/ARCHITECTURE_AND_EXTENSIONS.md#contributions-seams-and-readiness)
|
|
111
|
+
and [reference binding](../../docs/platform/RUNTIME_AND_SELF_HOSTING.md#opt-in-disposable-subscription-reference)
|
|
112
|
+
describe host readiness, one executor per operation and native recovery limits.
|
|
113
|
+
|
|
114
|
+
`./commerce` stays browser-safe. `./commerce/server` is the separate Node-only
|
|
115
|
+
entry for checkout engines, handlers, stores and adapters. It exports
|
|
116
|
+
`tryCompensate` and `CheckoutCompensationPort`: release the selected order's
|
|
117
|
+
reservations, attempt unstarted-promotion cancellation, then cancel the abandoned
|
|
118
|
+
order only when promotion cleanup did not succeed. Existing keys, reasons,
|
|
119
|
+
warning messages and swallowed cleanup failures are preserved. The reference
|
|
120
|
+
facade delegates to the same function; composition still owns the cleanup ports.
|
|
121
|
+
The package boundary test bundles the browser entry without Node built-ins or
|
|
122
|
+
the server subtree, and the cold consumer exercises installed compensation.
|
|
123
|
+
Starter declaration types are inferred from the `createStarterOfferGuard`
|
|
124
|
+
binding signature; the declaration interface stays internal to the engine.
|
|
125
|
+
|
|
126
|
+
The Node-only entry owns the checkout admission/quote/resume/failure sequence,
|
|
127
|
+
neutral command adapter, runtime and one paid-order saga. Composition injects
|
|
128
|
+
HTTP schemas/responder, quote and persistence ports, subject/metadata projections
|
|
129
|
+
and the existing prepared-payment execution callables. Provider roles, flow
|
|
130
|
+
selection and trusted provider-evidence classification are reference inputs.
|
|
131
|
+
Saved-method alias and recurring-mode strings are host-defined generics passed
|
|
132
|
+
unchanged through resolver, saga and runtime; the evidence schema owns its internal JSON-length bound. The reference retains
|
|
133
|
+
locale, fiscal, profile, starter-policy, request observation and status-link
|
|
134
|
+
bindings. Acquisition expectations and accepted shipping terms require quote
|
|
135
|
+
acceptance; offer asks require a bound policy. A matching owned saved epoch can
|
|
136
|
+
resume; edited or incomplete state re-quotes. Stock refusal compensates only a
|
|
137
|
+
proved pre-dispatch draft; scoped contention and uncertain dispatch carry no
|
|
138
|
+
cleanup capability. A synchronous decline stays failed and is never auto-settled.
|
|
139
|
+
Neutral finalize and one-time reservation conformance tests use recording ports;
|
|
140
|
+
atomic acquisition/finalize SQL still requires integration with its migration chain.
|
|
141
|
+
|
|
142
|
+
The server entry also owns generic order-draft, runtime-finalize, intent-persistence
|
|
143
|
+
and resume stores, cancellation adapters and reservation sweeps. Structural clients
|
|
144
|
+
retain the incumbent RPC/table calls; composition supplies frozen snapshot schemas,
|
|
145
|
+
ordered finalize arguments, response decoders and fail-open phone normalization.
|
|
146
|
+
Use `createCommerceOrderDraftRpcPort`, `createCheckoutCompensationRpcAdapter`,
|
|
147
|
+
`createCommerceCheckoutResumeQueryPort` and `createConfiguratorIntentPersistenceRpcPort`
|
|
148
|
+
with structural clients, including `ConfiguratorIntentRpcQueryClient` for intent
|
|
149
|
+
persistence. Reference bindings retain their incumbent exported factory names.
|
|
150
|
+
Verified identity overwrites submitted identity after normalization. Draft retries
|
|
151
|
+
supersede only once after an idempotency conflict; catalog refusals do not supersede.
|
|
152
|
+
Recovery classifiers inject subject admission, compare shipping terms as well as
|
|
153
|
+
money, and separate continuation, expiry policy and refused token states. Application
|
|
154
|
+
recovery projection, routes and destinations stay in the host. SQL atomicity and
|
|
155
|
+
active-subscription guards require real PostgreSQL integration; the C2 handoff
|
|
156
|
+
release check is **to be released**.
|
|
157
|
+
|
|
158
|
+
`./commerce/contracts` is a type-only, browser-safe entry for commerce-owned
|
|
159
|
+
records and generic persistence, checkout/runtime, availability, recovery and
|
|
160
|
+
offer-policy ports. It imports no pricing module. Consume pricing DTOs from
|
|
161
|
+
`./pricing/contracts` directly. Commerce does not re-export pricing DTOs; its runtime
|
|
162
|
+
reuses the version constant through `./pricing/contracts`. Quote ports take the
|
|
163
|
+
host request, response and existing options as type parameters; the reference
|
|
164
|
+
binds the existing pricing definitions, adding only the server-bound offer.
|
|
165
|
+
|
|
166
|
+
`./commerce/server` supplies the Node-only OMS handlers, managed adapters and
|
|
167
|
+
order-detail composition.
|
|
168
|
+
`./commerce` remains browser-safe, including its full runtime import closure.
|
|
169
|
+
It also owns canonical order-money validation and commerce event payload schemas.
|
|
170
|
+
The latter reuse the core outbox envelope and inject host quote/draft validators,
|
|
171
|
+
without importing an outbox worker or storage implementation.
|
|
172
|
+
The same entry owns `deriveOfferAvailability`, `defaultOfferAvailability`,
|
|
173
|
+
`availabilityBySku`, `statusForSellableNow`, `reasonCodeFor` and the low-stock
|
|
174
|
+
threshold. Their reference facades preserve function identity. The server entry's
|
|
175
|
+
`createOfferAvailabilityPort` runs the existing physical-table projection over
|
|
176
|
+
an `OfferAvailabilityQueryClient` and an injected `isStockProvider` predicate.
|
|
177
|
+
It preserves active-hold subtraction, lot/location eligibility and provider
|
|
178
|
+
missing/stale refusals. SDK narrowing and provider selection stay host-owned.
|
|
179
|
+
M06 owns normalized new-purchase reads and reservation TTL policy; the reference
|
|
180
|
+
composition passes its selected read port through unchanged. With `dataKind: "postgres"`,
|
|
181
|
+
the host supplies `stockSourceKey` to bind the native ATP reader; omission reports
|
|
182
|
+
`inventory_stock_source_key_required`. Managed composition prefers an injected
|
|
183
|
+
reader, then binds `stockRpc` over `inventory_new_purchase_stock_read`; without
|
|
184
|
+
either it reports `inventory_new_purchase_stock_reader_required`.
|
|
185
|
+
W2 conformance distinguishes reads, fallback and one-time allocation; real SQL
|
|
186
|
+
atomicity and consumption remain integration obligations.
|
|
187
|
+
|
|
188
|
+
`./commerce` provides neutral cart/order/read, checkout, intent, persistence,
|
|
189
|
+
resume and customer-default schema cores and factories. Bind existing pricing
|
|
190
|
+
schemas and explicit host vocabulary, then extend the object cores with local
|
|
191
|
+
locale, profile, sizing, fiscal and provider policy. The reference retains those
|
|
192
|
+
extensions; it does not publish that policy into the package.
|
|
193
|
+
The intent factory accepts a SKU schema with string input and output, preserving
|
|
194
|
+
string SKU inputs when hosts infer request types. Resume and availability bindings
|
|
195
|
+
also preserve string SKU and product-slug inputs. When composing host fields,
|
|
196
|
+
retain their legacy positions: object key order also determines validation issue
|
|
197
|
+
order, including nested variants and checkout requests.
|
|
198
|
+
Offer tokens are opaque; `minimumUnits` is an untrusted ask with an injected default, never an
|
|
199
|
+
admission grant. The server entry executes the offer binding and bounds its server-minted evidence.
|
|
200
|
+
The starter guard receives terms, basket/discount functions and its plan schema
|
|
201
|
+
from the host. These entries install no store, route,
|
|
202
|
+
migration or provider.
|
|
203
|
+
|
|
204
|
+
Required root discovery includes `test/commerce/`: schema refusal/replay and
|
|
205
|
+
port-fit tests join recovery/error/helper witnesses, compensation and neutral W4 composition.
|
|
206
|
+
The unchanged reference suites and a pre-extraction parse transcript protect
|
|
207
|
+
host bindings. The cold consumer imports both installed entries and checks
|
|
208
|
+
availability projection/refusal, opaque offers, injected minimums and snapshot
|
|
209
|
+
refusal without optional peers. This establishes contract proof only.
|
|
210
|
+
|
|
211
|
+
OMS schemas and pure operational builders export from browser-safe `./commerce`.
|
|
212
|
+
Order-money derivation and paid-event constants reuse the existing commerce
|
|
213
|
+
owners. `OmsOrderPaymentStatus` binds the existing generic
|
|
214
|
+
`OmsPaymentStatus<PaymentIntentStatus>` to the core payment states; the generic
|
|
215
|
+
K1 contract remains available unchanged.
|
|
216
|
+
Node-only `./commerce/server` owns the generic handlers, managed RPC/query store
|
|
217
|
+
and detail composition that uses the shipping runtime. DTOs and structural ports
|
|
218
|
+
remain in the type-only contracts entry. Inject settlement,
|
|
219
|
+
identity/presentation and provider read projections at composition. The managed
|
|
220
|
+
client requires only `rpc`; table reads and note persistence receive a separate
|
|
221
|
+
query capability, including the `is(column, value)` filter required by hydration.
|
|
222
|
+
Unprojected timeline labels use canonical step keys; hosts supply localized copy
|
|
223
|
+
through `timelineLabel`. Refund marking remains an operator mark. Replacement creation
|
|
224
|
+
uses the existing fulfillment handler and never confirms arrival or interrupts
|
|
225
|
+
an active subscription. W5/W6 tests pin replay tuples and forbidden effects.
|
|
226
|
+
|
|
227
|
+
Returns expose request, approve and reject only: `CommerceReturnsPort` and
|
|
228
|
+
its schemas are at `./commerce`; the three handler factories and
|
|
229
|
+
`createSupabaseCommerceReturnsPort` are at `./commerce/server`. `restockDisposition`, `refundMode` and
|
|
230
|
+
`refundAmountCents` record intent. Receive, restock and refund execution do not
|
|
231
|
+
exist. The host supplies authorization and a `BffResponder`; the request adapter
|
|
232
|
+
forwards the authenticated principal as `p_requested_by` to the database's owner,
|
|
233
|
+
idempotency-key and fingerprint checks.
|
|
234
|
+
The package request schema defaults to neutral reason codes. Bind a host set with
|
|
235
|
+
`createCommerceReturnsSchemas(reasonCodes)` and supply its request schema to the
|
|
236
|
+
customer handler's `requestSchema` dependency; the reference binding retains its
|
|
237
|
+
legacy set and unchanged request/refusal envelopes.
|
|
238
|
+
|
|
239
|
+
Native order-review contracts and the type-only `OrderReviewLifecyclePort` stay
|
|
240
|
+
at `./commerce`. Customer/admin handler factories, PostgreSQL lifecycle/media
|
|
241
|
+
adapters and raw uploads are exported from `./commerce/server`. Strict schemas keep
|
|
242
|
+
pending declarations distinct from stored/confirmed observed media and keep
|
|
243
|
+
storage locators out of public results. The raw upload handler accepts an
|
|
244
|
+
`OrderReviewRawUploadBinding`; metadata finalization holds its transaction across
|
|
245
|
+
the host's promotion callback. The reference host retains its private filesystem
|
|
246
|
+
object store, lease composition and reconciliation. M02 `BlobStoragePort` is not a
|
|
247
|
+
drop-in binding: it has no private read, inspection, temporary write or promotion
|
|
248
|
+
operations. K3b preserves that host seam and adds no M02 storage bridge.
|
|
249
|
+
|
|
250
|
+
Hosted feedback has its own contracts at `./commerce` and injected Supabase
|
|
251
|
+
submit/token-check ports at `./commerce/server`. This tokenized public post-delivery lifecycle is distinct from native order
|
|
252
|
+
reviews. It requires the adopter's database to provide `submit_order_feedback`
|
|
253
|
+
and `check_order_feedback_token`; native `db/platform` supplies neither RPC.
|
|
254
|
+
These ports add no route or native binding. Review-delay policy remains host-owned
|
|
255
|
+
SQL (class (b) retention): native uses 14 days and the contributed managed profile
|
|
256
|
+
uses 21 days. There is no TypeScript delay parameter or SQL change.
|
|
257
|
+
The reference browser contract facades initialize their shared Zod instance in
|
|
258
|
+
jitless mode before loading package schemas, preserving CSP-safe construction.
|
|
259
|
+
The package contracts add no global Zod configuration side effect. Browser
|
|
260
|
+
conformance bundles the complete commerce entry and both reference facades
|
|
261
|
+
without externals; the raw-upload source is a failing browser control, while
|
|
262
|
+
the complete server entry bundles for Node.
|
|
263
|
+
|
|
264
|
+
Neutral producer event contracts are exported from `./commerce`;
|
|
265
|
+
`createCommerceOutboxEventSchemas` binds the host's exact quote/draft snapshots.
|
|
266
|
+
Event-type literals and host payload behavior are preserved.
|
|
267
|
+
|
|
268
|
+
## Commerce domain effects
|
|
269
|
+
|
|
270
|
+
The experimental Node-only `./commerce/server` entry provides the transactional email
|
|
271
|
+
consumer factories, their descriptors and dispatch registry. Compose explicit
|
|
272
|
+
`uniqueRegistry` composition from `@openlup/outbox` and
|
|
273
|
+
`CommerceEmailRuntime` bindings for the fulfillment payload parser, communications
|
|
274
|
+
transactional scaffold and send-outcome mapping, plus locale, money, generic
|
|
275
|
+
line labels, paid-order presentation and tracking/notification policy. The
|
|
276
|
+
package selects no provider, country, commercial offer or environment policy.
|
|
277
|
+
Neutral email ports take the host locale as a type parameter and carry `contextName` and
|
|
278
|
+
`messageId`; the reference maps its existing extension/provider field names.
|
|
279
|
+
|
|
280
|
+
Draft, paid-email and paid-fulfillment consumers register by separate flags.
|
|
281
|
+
Fulfillment reuses M08's existing handoff and risk seam. This registry adds no
|
|
282
|
+
emitter, dispatcher, invoice executor, schedule, migration or subscription
|
|
283
|
+
mutation. Cancellation email stays unregistered; `extraHandlers` can bind the
|
|
284
|
+
independent accounting consumer. The refund consumer trusts amounts only with
|
|
285
|
+
`provider-refund.v2` evidence. Return approved/rejected are separate notices.
|
|
286
|
+
The live channel-comms policy suppresses the same buyer-facing handlers at
|
|
287
|
+
handle time, settling them as processed with `channel_owns_buyer_comms`.
|
|
288
|
+
|
|
289
|
+
The browser-safe `./commerce` entry provides event contracts, email DTOs and pure
|
|
290
|
+
projections; it never imports `./commerce/server`.
|
|
291
|
+
`projectCommerceSalesChannelEnvelope` retains opaque source identity without
|
|
292
|
+
normalization. `CommerceChannelExposureReadPort` is only a host-injected read;
|
|
293
|
+
no inventory exposure SQL or default implementation is supplied. Producer event
|
|
294
|
+
schemas bind exact host quote/draft snapshots through a factory; email consumers
|
|
295
|
+
retain frozen minimal subsets for in-flight compatibility. W8/W9 package
|
|
296
|
+
conformance and the rebound reference suites cover this boundary. UI extraction
|
|
297
|
+
and any artifact-cap change require their own approved scope.
|
|
298
|
+
|
|
91
299
|
## Shipping
|
|
92
300
|
|
|
93
301
|
Shipping handlers require injected host schemas; contracts are type-only with opaque provider/carrier strings.
|
|
@@ -101,7 +309,7 @@ caller-declared schema requirements. Missing proof keeps the named refusal.
|
|
|
101
309
|
|
|
102
310
|
## Inventory
|
|
103
311
|
|
|
104
|
-
`createInventoryBindings` selects one store with exact host provider validation.
|
|
312
|
+
`createInventoryBindings` selects one store with exact host provider validation. With `dataKind: "postgres"`, supply `stockSourceKey` to bind the existing native ATP new-purchase reader; without it, `unsupported.newPurchaseStockRead` reports `inventory_stock_source_key_required`. Admin reads remain ready. Preview availability subtracts all live holds, remaining subscription demand inside 14 days and channel exposure, clamped at zero. The native reader refuses a different horizon or an own-order exclusion as `native_stock_read_options_unsupported`. For managed reads, an injected reader wins; otherwise supply `stockRpc` to bind `createManagedStockAvailability` with the managed forward `20261025109000_inventory_new_purchase_stock_read.sql`. Without either dependency, the reason remains `inventory_new_purchase_stock_reader_required`. Managed previews retain provider-tagged ATP accounting and refuse other horizons or exclusions as `managed_stock_read_options_unsupported`. The managed SQL reader refuses a NULL as-of timestamp as `inventory_stock_as_of_invalid` (SQLSTATE `22023`). Their conservative stale flag is true if any provider row for the SKU is stale; ATP quantities and allocator freshness checks are unchanged. `createInventoryContribution` declares selected callables without activation.
|
|
105
313
|
|
|
106
314
|
`INVENTORY_MIGRATIONS` projects canonical units 27/33 byte-for-byte; install the full catalogue. Store support and pending proof: [M06 parity](../../docs/platform/plans/oss-m06-stock-reservations-delivery.md#parity-pending-rows).
|
|
107
315
|
|
|
@@ -188,7 +396,15 @@ base reads using the selected list ID, with base-refusal precedence.
|
|
|
188
396
|
|
|
189
397
|
`./pricing/contracts` contains dependency-free authority observations, policy
|
|
190
398
|
DTOs and version constants; its only external type comes from the exact
|
|
191
|
-
`@openlup/core/pricing` entry.
|
|
399
|
+
`@openlup/core/pricing` entry. `./pricing/browser` directly re-exports exactly
|
|
400
|
+
`createCommerceQuotePrimitives`, `acquisitionCapabilitySchema` and
|
|
401
|
+
`acquisitionTermsExpectationSchema`, `resolvedAcquisitionTermsSchema` and
|
|
402
|
+
`shippingTermsSchema`. Acquisition schemas come from their defining file; shipping
|
|
403
|
+
re-exports its pure validator owner through an exact linted edge, preserving identity
|
|
404
|
+
without handlers or Node HTTP declarations. The reference
|
|
405
|
+
quote context admits both terms as optional fields and retains its existing strict
|
|
406
|
+
fields and refusals. The complete browser bundle contains no Node imports or
|
|
407
|
+
pricing server root. Other schemas, Web Crypto hashing and Node HMAC token
|
|
192
408
|
operations stay in the server entry. Tokens retain assignment binding, the
|
|
193
409
|
72-hour default compatibility window and rollback behavior. Secret selection,
|
|
194
410
|
feature flags and readiness remain reference composition responsibilities.
|
|
@@ -828,3 +1044,103 @@ transport or query projection is host-owned. No executor is installed.
|
|
|
828
1044
|
store seller binding and managed wrappers persist its first-ever claim revision;
|
|
829
1045
|
legacy fallback and forward-only migration limits are owned by the
|
|
830
1046
|
[M09 migration section](../../docs/platform/DATA_AND_MIGRATIONS.md#m09-invoicing-forward-design-and-control-approval).
|
|
1047
|
+
|
|
1048
|
+
OMS read projections are optional. Omitting the host health classifier preserves the original unprojected empty health snapshot (`ok`, no reasons or evidence IDs); it does not evaluate provider health. The reference composition injects its existing classifier and evidence readers.
|
|
1049
|
+
|
|
1050
|
+
## Account and support contracts
|
|
1051
|
+
|
|
1052
|
+
Experimental `@openlup/platform/account-support` supplies `createAccountReadFacade`
|
|
1053
|
+
and the unchanged account-read diagnostic helpers. Inject account and order owner
|
|
1054
|
+
ports; delegation preserves their arguments, receivers, results, nulls and thrown
|
|
1055
|
+
failures. Authentication, authorization and private profile/market projection stay
|
|
1056
|
+
with the host. Importing this entry selects no driver or capability.
|
|
1057
|
+
|
|
1058
|
+
`account-support/contracts` is type-only and browser-safe. It declares account,
|
|
1059
|
+
Customer 360, self-service command, operator recovery and invoice-access envelopes
|
|
1060
|
+
with explicit capability flags. These declarations do not install their services.
|
|
1061
|
+
The [account/support reference](../../docs/platform/PLATFORM_PACKAGE_REFERENCE.md#account-and-support-contracts)
|
|
1062
|
+
owns the available boundary and later-phase limits.
|
|
1063
|
+
|
|
1064
|
+
R2 adds `readAccountSnapshot` with the two-stage fan-out and a store-level recent
|
|
1065
|
+
20-order request, stored-money order history/detail, Customer 360 projections
|
|
1066
|
+
and M09 invoice history/PDF delegation. `createInvoiceAccess` checks the requested
|
|
1067
|
+
document against the owned account/order history before resolving its ticket or
|
|
1068
|
+
reading PDF bytes; foreign or unknown documents return `{ kind: "denied" }`. Select pricing, captured line
|
|
1069
|
+
presentation, private extensions and fulfillment evidence through typed host
|
|
1070
|
+
ports. Missing evidence stays unknown; owner refusals retain their distinctions.
|
|
1071
|
+
The default-off reference selections and host-fed read views are unmounted.
|
|
1072
|
+
Native Customer 360 uses the existing authorized PostgreSQL support reader;
|
|
1073
|
+
account/history/invoice drivers still require explicit host selection.
|
|
1074
|
+
Subscription pointer enrichment preserves optional nullable `paymentMethodKind`:
|
|
1075
|
+
selected-empty evidence is null, while unread evidence is omitted. Reference
|
|
1076
|
+
line presentation explicitly picks the declared display keys before projection.
|
|
1077
|
+
|
|
1078
|
+
`createCustomer360ReadFacade({ authorize, journey, summary, diagnostics })`
|
|
1079
|
+
requires `authorize(): Promise<boolean>` before every method's source read.
|
|
1080
|
+
Refused callers receive `{ kind: "denied" }`; authorized delegates preserve
|
|
1081
|
+
arguments, results, nulls and thrown failures. The reference binding supplies
|
|
1082
|
+
that authorization once per call, before opening either support scope.
|
|
1083
|
+
|
|
1084
|
+
The [account/support reference](../../docs/platform/PLATFORM_PACKAGE_REFERENCE.md#account-and-support-contracts)
|
|
1085
|
+
owns the available R1 boundary and later-phase limits.
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
R3 adds `createSelfServiceCommandFacade({ context, capabilities, ...lanes })`,
|
|
1089
|
+
returning `SelfServiceCommandFacade` with required host capabilities and every
|
|
1090
|
+
managedSubscription, nativeLegacySubscription, subscriptionControl, typed/raw,
|
|
1091
|
+
profile, paymentMethod, commerce and recovery output lane. Input lanes are optional.
|
|
1092
|
+
Unselected methods return `{ supported: false, refusalCode }`; paymentMethod uses
|
|
1093
|
+
the host paymentMethodSetup refusal by identity, commerce uses commerceRecovery,
|
|
1094
|
+
and other lanes use a frozen host_binding_required refusal. Every lane guards
|
|
1095
|
+
the principal; typed/raw lanes require a supplied clientId equal to context.clientId.
|
|
1096
|
+
The trailing `ControlSnapshot = unknown` generic retains the control snapshot type.
|
|
1097
|
+
Native legacy routing preserves
|
|
1098
|
+
explicit pause and ownership before bundle quote validation. Owner results,
|
|
1099
|
+
refusals and nulls retain identity. Supported paymentMethodSetup requires a
|
|
1100
|
+
paymentMethod lane; supported commerceRecovery/configuredPurchase require commerce.
|
|
1101
|
+
Supported genericBundleCommands/commandBoundReceipts require a selected subscription
|
|
1102
|
+
command lane. Missing required lanes refuse customer_self_service_lane_configuration_required.
|
|
1103
|
+
`encodeNativeSubscriptionCommand`, `decodeNativeSubscriptionPreview` and
|
|
1104
|
+
`createNativeSubscriptionDriver` retain the raw owner protocol and apply key;
|
|
1105
|
+
apply never previews. `createPaymentMethodComposition` adapts generic M07
|
|
1106
|
+
setupMethod to paymentMethod.execute without owner imports. Native repair is a
|
|
1107
|
+
[registered follow-up](../../docs/platform/plans/oss-m12-account-support.md#follow-up-register).
|
|
1108
|
+
The default-off reference binding mounts nothing; browser key retention and
|
|
1109
|
+
native profile/start remain unselected.
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
R4 adds `createOperatorRecovery`, `createManagedOperatorAuthority`,
|
|
1113
|
+
`createPostgresOperatorAuthority`, `operatorAuthorityCapabilities`,
|
|
1114
|
+
`moveIdentityForEmailCorrection`, `executeOperatorAccountLink`, `linkThenApply`
|
|
1115
|
+
and `ACCOUNT_SUPPORT_MIGRATIONS`. The host injects its transaction/RPC and identity
|
|
1116
|
+
ports, verified human operator and recovery-path policy. Recovery token generation
|
|
1117
|
+
and SHA-256 hashing use the runtime Web Crypto API without a Node import; the
|
|
1118
|
+
host may still inject its opaque-token generator. Managed email admission
|
|
1119
|
+
and claim precede identity mutation and settlement. Native lifecycle commands
|
|
1120
|
+
delegate to M10, with actual optional owner receipts and named unavailable
|
|
1121
|
+
subcases. Link-then-action reports a completed link separately when the second
|
|
1122
|
+
command refuses or fails. The reference binding is default-off and unmounted;
|
|
1123
|
+
no import provisions authority or activates a route.
|
|
1124
|
+
|
|
1125
|
+
R5a adds `createAccountSupportBindings` and `createAccountSupportServices` here,
|
|
1126
|
+
and `createAccountSupportContribution` in `/composition`. Supply already bound
|
|
1127
|
+
R1–R4/owner operations for one explicit managed/native graph, host capabilities
|
|
1128
|
+
and a readiness observer. Each distinct callable receives one guard shared by
|
|
1129
|
+
its service, port and route aliases; each entrance re-observes readiness. Disabled
|
|
1130
|
+
construction calls no observer. Refusals are `disabled`, `schema_unknown` and
|
|
1131
|
+
`schema_unsatisfied`; owner results and thrown failures pass through unchanged.
|
|
1132
|
+
A null selected operation remains a required port without an executable binding.
|
|
1133
|
+
The separate injected commerce record uses `commerce(key, ...args)` and returns
|
|
1134
|
+
`{ kind: "unsupported", code: "host_binding_required" }` for a null record/member.
|
|
1135
|
+
The reference host may select real M11 checkout/recovery, ATP and existing effect
|
|
1136
|
+
descriptors by supplying its already-built selection through `commerceOwner`
|
|
1137
|
+
and its existing registry through `commerceRegistry`. R5b does not construct M11
|
|
1138
|
+
or import its adapters; the host supplies the complete account/M11/ATP schema
|
|
1139
|
+
and matching enablement/readiness. Keep capability flags unsupported until
|
|
1140
|
+
their owner callables are bound. This adds no package export or owner import to
|
|
1141
|
+
account-support contracts. One M11 result is forwarded without rewrapping its
|
|
1142
|
+
guarded services; unknown stock, unsupported options and handler outcomes retain
|
|
1143
|
+
their owner meaning. Contribution descriptors install no routes, handlers,
|
|
1144
|
+
schedules or workers. See the
|
|
1145
|
+
[reference recipe](../../docs/platform/RUNTIME_AND_SELF_HOSTING.md#opt-in-disposable-subscription-reference)
|
|
1146
|
+
for the host's schema and transport obligations.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AccountReadPort } from "./contracts/index.js";
|
|
2
|
+
/** Pure delegation to selected owner reads. Authorization, defaults, diagnostics,
|
|
3
|
+
* private fields and transport refusal mapping remain with the injected owners.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createAccountReadFacade<Account, OrderList, OrderDetail>(ports: {
|
|
6
|
+
account: Pick<AccountReadPort<Account, OrderList, OrderDetail>, "getAccount">;
|
|
7
|
+
orders: Pick<AccountReadPort<Account, OrderList, OrderDetail>, "listOrders" | "getOrderDetail">;
|
|
8
|
+
}): AccountReadPort<Account, OrderList, OrderDetail>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Pure delegation to selected owner reads. Authorization, defaults, diagnostics,
|
|
2
|
+
* private fields and transport refusal mapping remain with the injected owners.
|
|
3
|
+
*/
|
|
4
|
+
export function createAccountReadFacade(ports) {
|
|
5
|
+
return {
|
|
6
|
+
getAccount(userId) { return ports.account.getAccount(userId); },
|
|
7
|
+
listOrders(userId, input) { return ports.orders.listOrders(userId, input); },
|
|
8
|
+
getOrderDetail(userId, orderId) { return ports.orders.getOrderDetail(userId, orderId); },
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { AccountActionRequired, AccountSnapshot, AccountSubscription, AccountSubscriptionLine, AccountOrderSummary } from "./contracts/account.js";
|
|
2
|
+
import type { SubscriptionPaymentMethodStatus } from "./contracts/commands.js";
|
|
3
|
+
export declare const CUSTOMER_ACCOUNT_V2_CONTRACT_VERSION: "customer.account.v3";
|
|
4
|
+
type Row = Record<string, unknown>;
|
|
5
|
+
export interface CustomerSubscriptionEligibilityInput {
|
|
6
|
+
subscriptionId: string;
|
|
7
|
+
status: AccountSubscription["status"];
|
|
8
|
+
nextCycleAt: string | null;
|
|
9
|
+
editCutoffAt: string | null;
|
|
10
|
+
paymentMethodKind: string | null;
|
|
11
|
+
paymentMethodRefPresent: boolean;
|
|
12
|
+
paymentMethodStatus?: SubscriptionPaymentMethodStatus;
|
|
13
|
+
}
|
|
14
|
+
export interface CustomerSubscriptionEligibility {
|
|
15
|
+
canEdit: boolean;
|
|
16
|
+
reason: AccountSubscription["editBlockedReason"];
|
|
17
|
+
}
|
|
18
|
+
export interface SubscriptionActionState {
|
|
19
|
+
subscriptionId: string;
|
|
20
|
+
orderId: string | null;
|
|
21
|
+
blockedReason: AccountActionRequired["blockedReason"];
|
|
22
|
+
failureCause: AccountActionRequired["failureCause"];
|
|
23
|
+
recoveryEligible: boolean;
|
|
24
|
+
dueAt: string | null;
|
|
25
|
+
nextRetryAt: string | null;
|
|
26
|
+
}
|
|
27
|
+
export interface AccountReadSources<Extension, ChargeEvidence = AccountSubscription["nextCharge"], PaymentEvidence = unknown> {
|
|
28
|
+
readExtension(clientId: string): Promise<Extension>;
|
|
29
|
+
/** The selected store applies the bound BEFORE visibility filtering. */
|
|
30
|
+
readSubscriptionRows(clientId: string, limit: number): Promise<Row[]>;
|
|
31
|
+
readAddresses(clientId: string): Promise<AccountSnapshot["addresses"]>;
|
|
32
|
+
readOrdererProfiles(clientId: string): Promise<AccountSnapshot["ordererProfiles"]>;
|
|
33
|
+
readPaymentPreferences(clientId: string): Promise<AccountSnapshot["paymentPreferences"]>;
|
|
34
|
+
readDeliveryPreferences(clientId: string): Promise<AccountSnapshot["deliveryPreferences"]>;
|
|
35
|
+
readOrders(clientId: string, limit: number): Promise<{
|
|
36
|
+
orders: AccountOrderSummary[];
|
|
37
|
+
}>;
|
|
38
|
+
readEvents(clientId: string): Promise<AccountSnapshot["events"]>;
|
|
39
|
+
readSubscriptionLines(ids: string[]): Promise<Map<string, AccountSubscriptionLine[]>>;
|
|
40
|
+
readSubscriptionBlockers(ids: string[], nextCycles: Map<string, string | null>): Promise<Map<string, NonNullable<AccountSubscription["editBlockedReason"]>>>;
|
|
41
|
+
readPauseWindows(ids: string[]): Promise<Map<string, Pick<AccountSubscription, "pausePreset" | "pauseStartedAt" | "pauseEndsAt">>>;
|
|
42
|
+
readPaymentEvidence(ids: string[]): Promise<Map<string, PaymentEvidence>>;
|
|
43
|
+
/** Owner interprets M08 refusal; unsupported MUST throw, never return an empty Map. */
|
|
44
|
+
readDeliveryAlignments(nextCycles: Map<string, string | null>): Promise<Map<string, {
|
|
45
|
+
state: "protected" | "aligned";
|
|
46
|
+
}>>;
|
|
47
|
+
readNextCharges(rows: Row[]): Promise<Map<string, ChargeEvidence>>;
|
|
48
|
+
readActionStates(ids: string[]): Promise<Map<string, SubscriptionActionState>>;
|
|
49
|
+
}
|
|
50
|
+
export interface AccountReadProjectionPolicy<ChargeEvidence = AccountSubscription["nextCharge"], PaymentEvidence = unknown> {
|
|
51
|
+
paymentMethodStatus(input: {
|
|
52
|
+
clientId: string;
|
|
53
|
+
clientEmail: string | null;
|
|
54
|
+
row: Row;
|
|
55
|
+
evidence: PaymentEvidence | undefined;
|
|
56
|
+
}): SubscriptionPaymentMethodStatus;
|
|
57
|
+
canUsePaymentMethodForRenewal(status: SubscriptionPaymentMethodStatus): boolean;
|
|
58
|
+
packageSummary(lines: AccountSubscriptionLine[], constraint: unknown): string | null;
|
|
59
|
+
/** Pricing authority selects payable-cycle/acquisition shipping precedence. */
|
|
60
|
+
withNextCharge(recurring: AccountSubscription["recurringPrice"], next: ChargeEvidence | undefined): Pick<AccountSubscription, "recurringPrice" | "nextCharge">;
|
|
61
|
+
}
|
|
62
|
+
/** Two observation stages, including the original nested subscription fan-out. Auth/ownership precedes this call. */
|
|
63
|
+
export declare function readAccountSnapshot<Extension, ChargeEvidence, PaymentEvidence>(sources: AccountReadSources<Extension, ChargeEvidence, PaymentEvidence>, policy: AccountReadProjectionPolicy<ChargeEvidence, PaymentEvidence>, client: Row): Promise<AccountSnapshot<Extension>>;
|
|
64
|
+
export declare function isCustomerVisibleSubscription(row: Row): boolean;
|
|
65
|
+
export declare function recurringPrice(lines: AccountSubscriptionLine[]): AccountSubscription["recurringPrice"];
|
|
66
|
+
export declare function editCutoff(nextCycleAt: string | null, editWindowHours: number | null): string | null;
|
|
67
|
+
export declare function computeEditState(input: CustomerSubscriptionEligibilityInput, blockers: ReadonlyMap<string, NonNullable<AccountSubscription["editBlockedReason"]>>, canUse: AccountReadProjectionPolicy["canUsePaymentMethodForRenewal"]): CustomerSubscriptionEligibility;
|
|
68
|
+
export declare function buildActionRequired(subscriptions: AccountSubscription[], orders: AccountOrderSummary[], states: Map<string, SubscriptionActionState> | undefined, canUse: AccountReadProjectionPolicy["canUsePaymentMethodForRenewal"]): AccountActionRequired[];
|
|
69
|
+
export {};
|