@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.
Files changed (603) hide show
  1. package/CHANGELOG.md +305 -327
  2. package/README.md +332 -16
  3. package/dist/account-support/accountReadFacade.d.ts +8 -0
  4. package/dist/account-support/accountReadFacade.js +10 -0
  5. package/dist/account-support/accountReadModels.d.ts +69 -0
  6. package/dist/account-support/accountReadModels.js +272 -0
  7. package/dist/account-support/bindings.d.ts +23 -0
  8. package/dist/account-support/bindings.js +16 -0
  9. package/dist/account-support/contracts/account.d.ts +281 -0
  10. package/dist/account-support/contracts/account.js +1 -0
  11. package/dist/account-support/contracts/capabilities.d.ts +44 -0
  12. package/dist/account-support/contracts/capabilities.js +1 -0
  13. package/dist/account-support/contracts/commands.d.ts +307 -0
  14. package/dist/account-support/contracts/commands.js +1 -0
  15. package/dist/account-support/contracts/customer360.d.ts +154 -0
  16. package/dist/account-support/contracts/customer360.js +1 -0
  17. package/dist/account-support/contracts/index.d.ts +10 -0
  18. package/dist/account-support/contracts/index.js +1 -0
  19. package/dist/account-support/contracts/invoice.d.ts +79 -0
  20. package/dist/account-support/contracts/invoice.js +1 -0
  21. package/dist/account-support/contracts/operator.d.ts +289 -0
  22. package/dist/account-support/contracts/operator.js +1 -0
  23. package/dist/account-support/contribution.d.ts +24 -0
  24. package/dist/account-support/contribution.js +22 -0
  25. package/dist/account-support/customer360.d.ts +106 -0
  26. package/dist/account-support/customer360.js +163 -0
  27. package/dist/account-support/customerAccountReadDiagnostics.d.ts +11 -0
  28. package/dist/account-support/customerAccountReadDiagnostics.js +71 -0
  29. package/dist/account-support/index.d.ts +26 -0
  30. package/dist/account-support/index.js +15 -0
  31. package/dist/account-support/invoiceAccess.d.ts +57 -0
  32. package/dist/account-support/invoiceAccess.js +40 -0
  33. package/dist/account-support/migrations.d.ts +14 -0
  34. package/dist/account-support/migrations.js +7 -0
  35. package/dist/account-support/operatorAuthority.d.ts +67 -0
  36. package/dist/account-support/operatorAuthority.js +379 -0
  37. package/dist/account-support/operatorRecovery.d.ts +66 -0
  38. package/dist/account-support/operatorRecovery.js +129 -0
  39. package/dist/account-support/orderHistory.d.ts +50 -0
  40. package/dist/account-support/orderHistory.js +188 -0
  41. package/dist/account-support/paymentMethodComposition.d.ts +5 -0
  42. package/dist/account-support/paymentMethodComposition.js +4 -0
  43. package/dist/account-support/postgresOperatorAuthority.d.ts +16 -0
  44. package/dist/account-support/postgresOperatorAuthority.js +93 -0
  45. package/dist/account-support/selfService.d.ts +6 -0
  46. package/dist/account-support/selfService.js +81 -0
  47. package/dist/account-support/subscriptionCommandCodec.d.ts +10 -0
  48. package/dist/account-support/subscriptionCommandCodec.js +38 -0
  49. package/dist/catalog/draftSchemas.d.ts +1 -1
  50. package/dist/catalog/foundationSchemas.d.ts +3 -3
  51. package/dist/catalog/resolvedSkuProjection.d.ts +2 -2
  52. package/dist/catalog/sellableSchemas.d.ts +2 -2
  53. package/dist/commerce/adapters/managed/commerceOmsControlPlane.d.ts +3 -0
  54. package/dist/commerce/adapters/managed/commerceOmsControlPlane.js +71 -0
  55. package/dist/commerce/adapters/managed/commerceOmsMutations.d.ts +10 -0
  56. package/dist/commerce/adapters/managed/commerceOmsMutations.js +119 -0
  57. package/dist/commerce/adapters/managed/commerceOmsPort.d.ts +28 -0
  58. package/dist/commerce/adapters/managed/commerceOmsPort.js +101 -0
  59. package/dist/commerce/adapters/managed/oms/accounting.d.ts +3 -0
  60. package/dist/commerce/adapters/managed/oms/accounting.js +13 -0
  61. package/dist/commerce/adapters/managed/oms/fulfillmentReads.d.ts +17 -0
  62. package/dist/commerce/adapters/managed/oms/fulfillmentReads.js +81 -0
  63. package/dist/commerce/adapters/managed/oms/inboundEvents.d.ts +9 -0
  64. package/dist/commerce/adapters/managed/oms/inboundEvents.js +40 -0
  65. package/dist/commerce/adapters/managed/oms/outboxEvents.d.ts +2 -0
  66. package/dist/commerce/adapters/managed/oms/outboxEvents.js +23 -0
  67. package/dist/commerce/adapters/managed/oms/paymentAttempts.d.ts +3 -0
  68. package/dist/commerce/adapters/managed/oms/paymentAttempts.js +15 -0
  69. package/dist/commerce/adapters/managed/oms/queueSelection.d.ts +12 -0
  70. package/dist/commerce/adapters/managed/oms/queueSelection.js +109 -0
  71. package/dist/commerce/adapters/managed/oms/readProjections.d.ts +18 -0
  72. package/dist/commerce/adapters/managed/oms/readProjections.js +13 -0
  73. package/dist/commerce/adapters/managed/oms/readQueries.d.ts +16 -0
  74. package/dist/commerce/adapters/managed/oms/readQueries.js +276 -0
  75. package/dist/commerce/adapters/managed/oms/types.d.ts +2 -0
  76. package/dist/commerce/adapters/managed/oms/types.js +7 -0
  77. package/dist/commerce/checkoutCommandSchemas.d.ts +89 -0
  78. package/dist/commerce/checkoutCommandSchemas.js +70 -0
  79. package/dist/commerce/checkoutHelpers.d.ts +21 -0
  80. package/dist/commerce/checkoutHelpers.js +29 -0
  81. package/dist/commerce/checkoutResumeSchemas.d.ts +158 -0
  82. package/dist/commerce/checkoutResumeSchemas.js +145 -0
  83. package/dist/commerce/checkoutSchemas.d.ts +158 -0
  84. package/dist/commerce/checkoutSchemas.js +161 -0
  85. package/dist/commerce/commerceReturnsPort.d.ts +97 -0
  86. package/dist/commerce/commerceReturnsPort.js +39 -0
  87. package/dist/commerce/configuratorIntentPersistenceSchemas.d.ts +20 -0
  88. package/dist/commerce/configuratorIntentPersistenceSchemas.js +21 -0
  89. package/dist/commerce/configuratorIntentSchemas.d.ts +63 -0
  90. package/dist/commerce/configuratorIntentSchemas.js +43 -0
  91. package/dist/commerce/contractPrimitives.d.ts +50 -0
  92. package/dist/commerce/contractPrimitives.js +25 -0
  93. package/dist/commerce/contracts/availability.d.ts +23 -0
  94. package/dist/commerce/contracts/availability.js +1 -0
  95. package/dist/commerce/contracts/fulfillmentRecovery.d.ts +25 -0
  96. package/dist/commerce/contracts/fulfillmentRecovery.js +1 -0
  97. package/dist/commerce/contracts/index.d.ts +13 -0
  98. package/dist/commerce/contracts/index.js +1 -0
  99. package/dist/commerce/contracts/intent.d.ts +86 -0
  100. package/dist/commerce/contracts/intent.js +1 -0
  101. package/dist/commerce/contracts/omsTypes.d.ts +1216 -0
  102. package/dist/commerce/contracts/omsTypes.js +1 -0
  103. package/dist/commerce/contracts/order.d.ts +39 -0
  104. package/dist/commerce/contracts/order.js +1 -0
  105. package/dist/commerce/contracts/orderMoney.d.ts +52 -0
  106. package/dist/commerce/contracts/orderMoney.js +1 -0
  107. package/dist/commerce/contracts/ports.d.ts +113 -0
  108. package/dist/commerce/contracts/ports.js +1 -0
  109. package/dist/commerce/contracts/recovery.d.ts +11 -0
  110. package/dist/commerce/contracts/recovery.js +1 -0
  111. package/dist/commerce/contracts/runtimePorts.d.ts +196 -0
  112. package/dist/commerce/contracts/runtimePorts.js +1 -0
  113. package/dist/commerce/contracts/state.d.ts +26 -0
  114. package/dist/commerce/contracts/state.js +43 -0
  115. package/dist/commerce/customerDefaultsSnapshotSchemas.d.ts +51 -0
  116. package/dist/commerce/customerDefaultsSnapshotSchemas.js +106 -0
  117. package/dist/commerce/errors.d.ts +18 -0
  118. package/dist/commerce/errors.js +36 -0
  119. package/dist/commerce/fulfillmentEligibility.d.ts +6 -0
  120. package/dist/commerce/fulfillmentEligibility.js +31 -0
  121. package/dist/commerce/index.d.ts +72 -0
  122. package/dist/commerce/index.js +67 -0
  123. package/dist/commerce/model/customerFulfillmentRecovery.d.ts +40 -0
  124. package/dist/commerce/model/customerFulfillmentRecovery.js +144 -0
  125. package/dist/commerce/model/fulfillmentCancellationEligibility.d.ts +7 -0
  126. package/dist/commerce/model/fulfillmentCancellationEligibility.js +9 -0
  127. package/dist/commerce/model/omsAccountingVisibility.d.ts +12 -0
  128. package/dist/commerce/model/omsAccountingVisibility.js +118 -0
  129. package/dist/commerce/model/omsBillingInvoiceBuyer.d.ts +2 -0
  130. package/dist/commerce/model/omsBillingInvoiceBuyer.js +15 -0
  131. package/dist/commerce/model/omsCurrency.d.ts +4 -0
  132. package/dist/commerce/model/omsCurrency.js +5 -0
  133. package/dist/commerce/model/omsFulfillmentDebug.d.ts +20 -0
  134. package/dist/commerce/model/omsFulfillmentDebug.js +122 -0
  135. package/dist/commerce/model/omsFulfillmentSummary.d.ts +16 -0
  136. package/dist/commerce/model/omsFulfillmentSummary.js +189 -0
  137. package/dist/commerce/model/omsListTotals.d.ts +13 -0
  138. package/dist/commerce/model/omsListTotals.js +32 -0
  139. package/dist/commerce/model/omsOperationalLadder.d.ts +51 -0
  140. package/dist/commerce/model/omsOperationalLadder.js +158 -0
  141. package/dist/commerce/model/omsOrderLineMoney.d.ts +4 -0
  142. package/dist/commerce/model/omsOrderLineMoney.js +25 -0
  143. package/dist/commerce/model/omsPaymentMethodSummary.d.ts +5 -0
  144. package/dist/commerce/model/omsPaymentMethodSummary.js +11 -0
  145. package/dist/commerce/model/omsReadModel.d.ts +43 -0
  146. package/dist/commerce/model/omsReadModel.js +211 -0
  147. package/dist/commerce/model/omsReadModelCommunication.d.ts +3 -0
  148. package/dist/commerce/model/omsReadModelCommunication.js +29 -0
  149. package/dist/commerce/model/omsReadModelHelpers.d.ts +125 -0
  150. package/dist/commerce/model/omsReadModelHelpers.js +212 -0
  151. package/dist/commerce/model/omsReadModelList.d.ts +33 -0
  152. package/dist/commerce/model/omsReadModelList.js +50 -0
  153. package/dist/commerce/model/omsReadModelListSummary.d.ts +3 -0
  154. package/dist/commerce/model/omsReadModelListSummary.js +13 -0
  155. package/dist/commerce/model/omsReadModelPricing.d.ts +5 -0
  156. package/dist/commerce/model/omsReadModelPricing.js +36 -0
  157. package/dist/commerce/model/omsReadModelProjections.d.ts +1 -0
  158. package/dist/commerce/model/omsReadModelProjections.js +1 -0
  159. package/dist/commerce/model/omsReadModelRowCore.d.ts +79 -0
  160. package/dist/commerce/model/omsReadModelRowCore.js +149 -0
  161. package/dist/commerce/model/omsReadModelRows.d.ts +1 -0
  162. package/dist/commerce/model/omsReadModelRows.js +6 -0
  163. package/dist/commerce/offerAvailability.d.ts +18 -0
  164. package/dist/commerce/offerAvailability.js +53 -0
  165. package/dist/commerce/offerAvailabilitySchemas.d.ts +43 -0
  166. package/dist/commerce/offerAvailabilitySchemas.js +42 -0
  167. package/dist/commerce/offerEvidenceSchemas.d.ts +7 -0
  168. package/dist/commerce/offerEvidenceSchemas.js +13 -0
  169. package/dist/commerce/oms/omsContractBase.d.ts +130 -0
  170. package/dist/commerce/oms/omsContractBase.js +86 -0
  171. package/dist/commerce/oms/omsContractReadAuxSchemas.d.ts +222 -0
  172. package/dist/commerce/oms/omsContractReadAuxSchemas.js +123 -0
  173. package/dist/commerce/oms/omsContractReadSchemas.d.ts +2266 -0
  174. package/dist/commerce/oms/omsContractReadSchemas.js +277 -0
  175. package/dist/commerce/oms/omsContractRequests.d.ts +196 -0
  176. package/dist/commerce/oms/omsContractRequests.js +118 -0
  177. package/dist/commerce/oms/omsContracts.d.ts +5 -0
  178. package/dist/commerce/oms/omsContracts.js +4 -0
  179. package/dist/commerce/oms/omsControlPlane.d.ts +275 -0
  180. package/dist/commerce/oms/omsControlPlane.js +72 -0
  181. package/dist/commerce/oms/omsFulfillmentContractSchemas.d.ts +203 -0
  182. package/dist/commerce/oms/omsFulfillmentContractSchemas.js +94 -0
  183. package/dist/commerce/oms/omsFulfillmentDebugSchemas.d.ts +69 -0
  184. package/dist/commerce/oms/omsFulfillmentDebugSchemas.js +33 -0
  185. package/dist/commerce/oms/omsFulfillmentHealthSchemas.d.ts +67 -0
  186. package/dist/commerce/oms/omsFulfillmentHealthSchemas.js +44 -0
  187. package/dist/commerce/oms/omsPorts.d.ts +84 -0
  188. package/dist/commerce/oms/omsPorts.js +148 -0
  189. package/dist/commerce/oms/omsPrimitives.d.ts +5 -0
  190. package/dist/commerce/oms/omsPrimitives.js +3 -0
  191. package/dist/commerce/oms/omsProviderEvidenceSchemas.d.ts +15 -0
  192. package/dist/commerce/oms/omsProviderEvidenceSchemas.js +12 -0
  193. package/dist/commerce/orderDraftErrors.d.ts +13 -0
  194. package/dist/commerce/orderDraftErrors.js +20 -0
  195. package/dist/commerce/orderEmailEligibility.d.ts +54 -0
  196. package/dist/commerce/orderEmailEligibility.js +123 -0
  197. package/dist/commerce/orderEmailLines.d.ts +12 -0
  198. package/dist/commerce/orderEmailLines.js +8 -0
  199. package/dist/commerce/orderFeedbackContracts.d.ts +41 -0
  200. package/dist/commerce/orderFeedbackContracts.js +33 -0
  201. package/dist/commerce/orderMoney.d.ts +6 -0
  202. package/dist/commerce/orderMoney.js +168 -0
  203. package/dist/commerce/orderReviewContracts.d.ts +475 -0
  204. package/dist/commerce/orderReviewContracts.js +94 -0
  205. package/dist/commerce/orderReviewPorts.d.ts +140 -0
  206. package/dist/commerce/orderReviewPorts.js +1 -0
  207. package/dist/commerce/outboxDispatchContracts.d.ts +30 -0
  208. package/dist/commerce/outboxDispatchContracts.js +1 -0
  209. package/dist/commerce/outboxEventSchemas.d.ts +162 -0
  210. package/dist/commerce/outboxEventSchemas.js +164 -0
  211. package/dist/commerce/outboxOrderDraftEmailPorts.d.ts +207 -0
  212. package/dist/commerce/outboxOrderDraftEmailPorts.js +12 -0
  213. package/dist/commerce/paymentContinuation.d.ts +4 -0
  214. package/dist/commerce/paymentContinuation.js +4 -0
  215. package/dist/commerce/ports.d.ts +8 -0
  216. package/dist/commerce/ports.js +1 -0
  217. package/dist/commerce/recoveryDestination.d.ts +3 -0
  218. package/dist/commerce/recoveryDestination.js +17 -0
  219. package/dist/commerce/runtimeErrors.d.ts +8 -0
  220. package/dist/commerce/runtimeErrors.js +16 -0
  221. package/dist/commerce/salesChannelEnvelope.d.ts +20 -0
  222. package/dist/commerce/salesChannelEnvelope.js +7 -0
  223. package/dist/commerce/schemas.d.ts +174 -0
  224. package/dist/commerce/schemas.js +84 -0
  225. package/dist/commerce/server/checkoutCompensation.d.ts +21 -0
  226. package/dist/commerce/server/checkoutCompensation.js +32 -0
  227. package/dist/commerce/server/checkoutConflictClassifiers.d.ts +17 -0
  228. package/dist/commerce/server/checkoutConflictClassifiers.js +38 -0
  229. package/dist/commerce/server/checkoutExpiredRecoveryPolicy.d.ts +38 -0
  230. package/dist/commerce/server/checkoutExpiredRecoveryPolicy.js +85 -0
  231. package/dist/commerce/server/checkoutInvoiceBuyerSnapshot.d.ts +22 -0
  232. package/dist/commerce/server/checkoutInvoiceBuyerSnapshot.js +30 -0
  233. package/dist/commerce/server/checkoutOfferPolicyPort.d.ts +33 -0
  234. package/dist/commerce/server/checkoutOfferPolicyPort.js +49 -0
  235. package/dist/commerce/server/checkoutPaymentContinuationCredential.d.ts +58 -0
  236. package/dist/commerce/server/checkoutPaymentContinuationCredential.js +154 -0
  237. package/dist/commerce/server/checkoutQuoteTypes.d.ts +19 -0
  238. package/dist/commerce/server/checkoutQuoteTypes.js +1 -0
  239. package/dist/commerce/server/checkoutRecoveryOrderPort.d.ts +42 -0
  240. package/dist/commerce/server/checkoutRecoveryOrderPort.js +1 -0
  241. package/dist/commerce/server/checkoutRecoveryToken.d.ts +40 -0
  242. package/dist/commerce/server/checkoutRecoveryToken.js +26 -0
  243. package/dist/commerce/server/checkoutRefusalContinuation.d.ts +24 -0
  244. package/dist/commerce/server/checkoutRefusalContinuation.js +18 -0
  245. package/dist/commerce/server/checkoutRuntimeTypes.d.ts +81 -0
  246. package/dist/commerce/server/checkoutRuntimeTypes.js +1 -0
  247. package/dist/commerce/server/commerceCheckoutCommandExecution.d.ts +60 -0
  248. package/dist/commerce/server/commerceCheckoutCommandExecution.js +136 -0
  249. package/dist/commerce/server/commerceCheckoutCompensation.d.ts +26 -0
  250. package/dist/commerce/server/commerceCheckoutCompensation.js +46 -0
  251. package/dist/commerce/server/commerceCheckoutContinuationTerms.d.ts +50 -0
  252. package/dist/commerce/server/commerceCheckoutContinuationTerms.js +66 -0
  253. package/dist/commerce/server/commerceCheckoutCustomerDefaults.d.ts +18 -0
  254. package/dist/commerce/server/commerceCheckoutCustomerDefaults.js +17 -0
  255. package/dist/commerce/server/commerceCheckoutFailureHandler.d.ts +51 -0
  256. package/dist/commerce/server/commerceCheckoutFailureHandler.js +90 -0
  257. package/dist/commerce/server/commerceCheckoutHandler.d.ts +213 -0
  258. package/dist/commerce/server/commerceCheckoutHandler.js +196 -0
  259. package/dist/commerce/server/commerceCheckoutHandlerAdmission.d.ts +58 -0
  260. package/dist/commerce/server/commerceCheckoutHandlerAdmission.js +94 -0
  261. package/dist/commerce/server/commerceCheckoutHandlerHelpers.d.ts +67 -0
  262. package/dist/commerce/server/commerceCheckoutHandlerHelpers.js +155 -0
  263. package/dist/commerce/server/commerceCheckoutOrchestrationError.d.ts +9 -0
  264. package/dist/commerce/server/commerceCheckoutOrchestrationError.js +14 -0
  265. package/dist/commerce/server/commerceCheckoutPromotionPriceChange.d.ts +47 -0
  266. package/dist/commerce/server/commerceCheckoutPromotionPriceChange.js +43 -0
  267. package/dist/commerce/server/commerceCheckoutProviderPayment.d.ts +34 -0
  268. package/dist/commerce/server/commerceCheckoutProviderPayment.js +37 -0
  269. package/dist/commerce/server/commerceCheckoutQuoteGuard.d.ts +62 -0
  270. package/dist/commerce/server/commerceCheckoutQuoteGuard.js +106 -0
  271. package/dist/commerce/server/commerceCheckoutResume.d.ts +29 -0
  272. package/dist/commerce/server/commerceCheckoutResume.js +81 -0
  273. package/dist/commerce/server/commerceCheckoutResumeGuard.d.ts +54 -0
  274. package/dist/commerce/server/commerceCheckoutResumeGuard.js +138 -0
  275. package/dist/commerce/server/commerceCheckoutSavedPaymentMethod.d.ts +39 -0
  276. package/dist/commerce/server/commerceCheckoutSavedPaymentMethod.js +44 -0
  277. package/dist/commerce/server/commerceCheckoutStartRuntimeFailure.d.ts +7 -0
  278. package/dist/commerce/server/commerceCheckoutStartRuntimeFailure.js +39 -0
  279. package/dist/commerce/server/commerceCheckoutTiming.d.ts +8 -0
  280. package/dist/commerce/server/commerceCheckoutTiming.js +31 -0
  281. package/dist/commerce/server/commerceDiagnostics.d.ts +6 -0
  282. package/dist/commerce/server/commerceDiagnostics.js +31 -0
  283. package/dist/commerce/server/commerceOmsCancelOrderHandler.d.ts +7 -0
  284. package/dist/commerce/server/commerceOmsCancelOrderHandler.js +22 -0
  285. package/dist/commerce/server/commerceOmsControlPlaneHandlers.d.ts +18 -0
  286. package/dist/commerce/server/commerceOmsControlPlaneHandlers.js +60 -0
  287. package/dist/commerce/server/commerceOmsHandlers.d.ts +47 -0
  288. package/dist/commerce/server/commerceOmsHandlers.js +176 -0
  289. package/dist/commerce/server/commerceOmsMarkRefundedHandler.d.ts +7 -0
  290. package/dist/commerce/server/commerceOmsMarkRefundedHandler.js +19 -0
  291. package/dist/commerce/server/commerceOrderDraft.d.ts +24 -0
  292. package/dist/commerce/server/commerceOrderDraft.js +92 -0
  293. package/dist/commerce/server/commercePaidOrderOrchestration.d.ts +131 -0
  294. package/dist/commerce/server/commercePaidOrderOrchestration.js +140 -0
  295. package/dist/commerce/server/commerceProviderAttemptFailure.d.ts +133 -0
  296. package/dist/commerce/server/commerceProviderAttemptFailure.js +175 -0
  297. package/dist/commerce/server/commerceReturnsHandlers.d.ts +41 -0
  298. package/dist/commerce/server/commerceReturnsHandlers.js +100 -0
  299. package/dist/commerce/server/commerceRuntimePort.d.ts +16 -0
  300. package/dist/commerce/server/commerceRuntimePort.js +57 -0
  301. package/dist/commerce/server/commerceRuntimeService.d.ts +98 -0
  302. package/dist/commerce/server/commerceRuntimeService.js +186 -0
  303. package/dist/commerce/server/commerceRuntimeStartResponse.d.ts +37 -0
  304. package/dist/commerce/server/commerceRuntimeStartResponse.js +56 -0
  305. package/dist/commerce/server/commerceStarterOfferGuard.d.ts +55 -0
  306. package/dist/commerce/server/commerceStarterOfferGuard.js +128 -0
  307. package/dist/commerce/server/configuratorIntentPersistence.d.ts +47 -0
  308. package/dist/commerce/server/configuratorIntentPersistence.js +85 -0
  309. package/dist/commerce/server/configuratorIntentPersistenceHandler.d.ts +14 -0
  310. package/dist/commerce/server/configuratorIntentPersistenceHandler.js +42 -0
  311. package/dist/commerce/server/emailRuntime.d.ts +47 -0
  312. package/dist/commerce/server/emailRuntime.js +1 -0
  313. package/dist/commerce/server/handlerSupport.d.ts +68 -0
  314. package/dist/commerce/server/handlerSupport.js +1 -0
  315. package/dist/commerce/server/index.d.ts +178 -0
  316. package/dist/commerce/server/index.js +127 -0
  317. package/dist/commerce/server/offerAvailability.d.ts +21 -0
  318. package/dist/commerce/server/offerAvailability.js +163 -0
  319. package/dist/commerce/server/orderDraftRpcPayload.d.ts +20 -0
  320. package/dist/commerce/server/orderDraftRpcPayload.js +21 -0
  321. package/dist/commerce/server/orderFeedbackSubmit.d.ts +20 -0
  322. package/dist/commerce/server/orderFeedbackSubmit.js +16 -0
  323. package/dist/commerce/server/orderFeedbackTokenCheck.d.ts +17 -0
  324. package/dist/commerce/server/orderFeedbackTokenCheck.js +14 -0
  325. package/dist/commerce/server/orderReviewAdminHandlers.d.ts +47 -0
  326. package/dist/commerce/server/orderReviewAdminHandlers.js +41 -0
  327. package/dist/commerce/server/orderReviewHandlers.d.ts +114 -0
  328. package/dist/commerce/server/orderReviewHandlers.js +42 -0
  329. package/dist/commerce/server/orderReviewLifecycle.d.ts +10 -0
  330. package/dist/commerce/server/orderReviewLifecycle.js +121 -0
  331. package/dist/commerce/server/orderReviewMedia.d.ts +11 -0
  332. package/dist/commerce/server/orderReviewMedia.js +172 -0
  333. package/dist/commerce/server/orderReviewRawUploadHandler.d.ts +40 -0
  334. package/dist/commerce/server/orderReviewRawUploadHandler.js +316 -0
  335. package/dist/commerce/server/outboxCheckoutExpiredEmailHandler.d.ts +14 -0
  336. package/dist/commerce/server/outboxCheckoutExpiredEmailHandler.js +57 -0
  337. package/dist/commerce/server/outboxCheckoutRecoveryEmailHandler.d.ts +13 -0
  338. package/dist/commerce/server/outboxCheckoutRecoveryEmailHandler.js +150 -0
  339. package/dist/commerce/server/outboxDispatchRegistry.d.ts +46 -0
  340. package/dist/commerce/server/outboxDispatchRegistry.js +184 -0
  341. package/dist/commerce/server/outboxDispatchRegistryComposition.d.ts +6 -0
  342. package/dist/commerce/server/outboxDispatchRegistryComposition.js +23 -0
  343. package/dist/commerce/server/outboxOrderDraftEmailHandler.d.ts +14 -0
  344. package/dist/commerce/server/outboxOrderDraftEmailHandler.js +130 -0
  345. package/dist/commerce/server/outboxOrderPaidEmailHandler.d.ts +21 -0
  346. package/dist/commerce/server/outboxOrderPaidEmailHandler.js +93 -0
  347. package/dist/commerce/server/outboxOrderPaidFulfillmentHandler.d.ts +3 -0
  348. package/dist/commerce/server/outboxOrderPaidFulfillmentHandler.js +1 -0
  349. package/dist/commerce/server/outboxOrderPaidFulfillmentPorts.d.ts +3 -0
  350. package/dist/commerce/server/outboxOrderPaidFulfillmentPorts.js +1 -0
  351. package/dist/commerce/server/outboxOrderRefundedEmailHandler.d.ts +13 -0
  352. package/dist/commerce/server/outboxOrderRefundedEmailHandler.js +42 -0
  353. package/dist/commerce/server/outboxPaymentFailedEmailHandler.d.ts +14 -0
  354. package/dist/commerce/server/outboxPaymentFailedEmailHandler.js +65 -0
  355. package/dist/commerce/server/outboxReturnEmailHandlers.d.ts +26 -0
  356. package/dist/commerce/server/outboxReturnEmailHandlers.js +53 -0
  357. package/dist/commerce/server/outboxShipmentDeliveredEmailHandler.d.ts +17 -0
  358. package/dist/commerce/server/outboxShipmentDeliveredEmailHandler.js +52 -0
  359. package/dist/commerce/server/outboxShipmentDispatchedEmailHandler.d.ts +13 -0
  360. package/dist/commerce/server/outboxShipmentDispatchedEmailHandler.js +87 -0
  361. package/dist/commerce/server/outboxShipmentExceptionEmailHandler.d.ts +13 -0
  362. package/dist/commerce/server/outboxShipmentExceptionEmailHandler.js +46 -0
  363. package/dist/commerce/server/referenceCheckoutHandler.d.ts +48 -0
  364. package/dist/commerce/server/referenceCheckoutHandler.js +68 -0
  365. package/dist/commerce/server/reservationSweepPort.d.ts +31 -0
  366. package/dist/commerce/server/reservationSweepPort.js +45 -0
  367. package/dist/commerce/server/starterTermsPort.d.ts +22 -0
  368. package/dist/commerce/server/starterTermsPort.js +1 -0
  369. package/dist/commerce/server/supabaseCommerceReturnsPort.d.ts +13 -0
  370. package/dist/commerce/server/supabaseCommerceReturnsPort.js +56 -0
  371. package/dist/communications/consentPurposeRegistry.d.ts +1 -1
  372. package/dist/communications/newsletterIntegrationContracts.d.ts +10 -10
  373. package/dist/composition/accountSupportContribution.d.ts +18 -0
  374. package/dist/composition/accountSupportContribution.js +21 -0
  375. package/dist/composition/commerceContribution.d.ts +21 -0
  376. package/dist/composition/commerceContribution.js +27 -0
  377. package/dist/composition/index.d.ts +2 -0
  378. package/dist/composition/index.js +2 -0
  379. package/dist/fulfillment/handlerSchemas.d.ts +69 -69
  380. package/dist/fulfillment/index.d.ts +1 -1
  381. package/dist/fulfillment/index.js +1 -1
  382. package/dist/fulfillment/paidHandoff.d.ts +12 -1
  383. package/dist/fulfillment/paidHandoff.js +2 -2
  384. package/dist/fulfillment/providerDispatchWorker.d.ts +4 -4
  385. package/dist/identity/customerContracts.d.ts +4 -4
  386. package/dist/inventory/bindings.d.ts +3 -0
  387. package/dist/inventory/bindings.js +10 -4
  388. package/dist/inventory/index.d.ts +1 -0
  389. package/dist/inventory/index.js +1 -0
  390. package/dist/inventory/managedStockAvailability.d.ts +15 -0
  391. package/dist/inventory/managedStockAvailability.js +16 -0
  392. package/dist/inventory/postgresStockAvailability.js +2 -25
  393. package/dist/inventory/schemas.d.ts +1 -1
  394. package/dist/inventory/stockReadResponse.d.ts +4 -0
  395. package/dist/inventory/stockReadResponse.js +27 -0
  396. package/dist/invoicing/snapshot.d.ts +1 -1
  397. package/dist/pricing/acquisitionQuoteBinding.d.ts +1 -1
  398. package/dist/pricing/browser/index.d.ts +6 -0
  399. package/dist/pricing/browser/index.js +6 -0
  400. package/dist/pricing/catalogFactsSchemas.d.ts +1 -1
  401. package/dist/pricing/quotePromotionEvidence.d.ts +1 -1
  402. package/dist/pricing/quoteSchemas.d.ts +56 -56
  403. package/dist/promotions/adminPromotionCodesContracts.d.ts +30 -30
  404. package/dist/promotions/adminPromotionsContracts.d.ts +16 -16
  405. package/dist/subscriptions/index.d.ts +3 -2
  406. package/dist/subscriptions/index.js +3 -2
  407. package/package.json +32 -2
  408. package/release-gates.json +90 -8
  409. package/sql/20261026120000_account_support_operator_authority.sql +693 -0
  410. package/src/account-support/accountReadFacade.ts +15 -0
  411. package/src/account-support/accountReadModels.ts +371 -0
  412. package/src/account-support/bindings.ts +28 -0
  413. package/src/account-support/contracts/account.ts +306 -0
  414. package/src/account-support/contracts/capabilities.ts +30 -0
  415. package/src/account-support/contracts/commands.ts +243 -0
  416. package/src/account-support/contracts/customer360.ts +150 -0
  417. package/src/account-support/contracts/index.ts +141 -0
  418. package/src/account-support/contracts/invoice.ts +44 -0
  419. package/src/account-support/contracts/operator.ts +123 -0
  420. package/src/account-support/contribution.ts +35 -0
  421. package/src/account-support/customer360.ts +268 -0
  422. package/src/account-support/customerAccountReadDiagnostics.ts +83 -0
  423. package/src/account-support/index.ts +72 -0
  424. package/src/account-support/invoiceAccess.ts +63 -0
  425. package/src/account-support/migrations.ts +7 -0
  426. package/src/account-support/operatorAuthority.ts +393 -0
  427. package/src/account-support/operatorRecovery.ts +136 -0
  428. package/src/account-support/orderHistory.ts +309 -0
  429. package/src/account-support/paymentMethodComposition.ts +8 -0
  430. package/src/account-support/postgresOperatorAuthority.ts +92 -0
  431. package/src/account-support/selfService.ts +83 -0
  432. package/src/account-support/subscriptionCommandCodec.ts +48 -0
  433. package/src/commerce/adapters/managed/commerceOmsControlPlane.ts +80 -0
  434. package/src/commerce/adapters/managed/commerceOmsMutations.ts +145 -0
  435. package/src/commerce/adapters/managed/commerceOmsPort.ts +158 -0
  436. package/src/commerce/adapters/managed/oms/accounting.ts +18 -0
  437. package/src/commerce/adapters/managed/oms/fulfillmentReads.ts +82 -0
  438. package/src/commerce/adapters/managed/oms/inboundEvents.ts +45 -0
  439. package/src/commerce/adapters/managed/oms/outboxEvents.ts +30 -0
  440. package/src/commerce/adapters/managed/oms/paymentAttempts.ts +19 -0
  441. package/src/commerce/adapters/managed/oms/queueSelection.ts +132 -0
  442. package/src/commerce/adapters/managed/oms/readProjections.ts +22 -0
  443. package/src/commerce/adapters/managed/oms/readQueries.ts +292 -0
  444. package/src/commerce/adapters/managed/oms/types.ts +9 -0
  445. package/src/commerce/checkoutCommandSchemas.ts +93 -0
  446. package/src/commerce/checkoutHelpers.ts +47 -0
  447. package/src/commerce/checkoutResumeSchemas.ts +164 -0
  448. package/src/commerce/checkoutSchemas.ts +182 -0
  449. package/src/commerce/commerceReturnsPort.ts +67 -0
  450. package/src/commerce/configuratorIntentPersistenceSchemas.ts +26 -0
  451. package/src/commerce/configuratorIntentSchemas.ts +47 -0
  452. package/src/commerce/contractPrimitives.ts +30 -0
  453. package/src/commerce/contracts/availability.ts +21 -0
  454. package/src/commerce/contracts/fulfillmentRecovery.ts +26 -0
  455. package/src/commerce/contracts/index.ts +17 -0
  456. package/src/commerce/contracts/intent.ts +58 -0
  457. package/src/commerce/contracts/omsTypes.ts +1217 -0
  458. package/src/commerce/contracts/order.ts +44 -0
  459. package/src/commerce/contracts/orderMoney.ts +75 -0
  460. package/src/commerce/contracts/ports.ts +124 -0
  461. package/src/commerce/contracts/recovery.ts +24 -0
  462. package/src/commerce/contracts/runtimePorts.ts +201 -0
  463. package/src/commerce/contracts/state.ts +64 -0
  464. package/src/commerce/customerDefaultsSnapshotSchemas.ts +117 -0
  465. package/src/commerce/errors.ts +53 -0
  466. package/src/commerce/fulfillmentEligibility.ts +32 -0
  467. package/src/commerce/index.ts +82 -0
  468. package/src/commerce/model/customerFulfillmentRecovery.ts +185 -0
  469. package/src/commerce/model/fulfillmentCancellationEligibility.ts +18 -0
  470. package/src/commerce/model/omsAccountingVisibility.ts +135 -0
  471. package/src/commerce/model/omsBillingInvoiceBuyer.ts +20 -0
  472. package/src/commerce/model/omsCurrency.ts +8 -0
  473. package/src/commerce/model/omsFulfillmentDebug.ts +157 -0
  474. package/src/commerce/model/omsFulfillmentSummary.ts +225 -0
  475. package/src/commerce/model/omsListTotals.ts +38 -0
  476. package/src/commerce/model/omsOperationalLadder.ts +181 -0
  477. package/src/commerce/model/omsOrderLineMoney.ts +34 -0
  478. package/src/commerce/model/omsPaymentMethodSummary.ts +19 -0
  479. package/src/commerce/model/omsReadModel.ts +302 -0
  480. package/src/commerce/model/omsReadModelCommunication.ts +32 -0
  481. package/src/commerce/model/omsReadModelHelpers.ts +279 -0
  482. package/src/commerce/model/omsReadModelList.ts +90 -0
  483. package/src/commerce/model/omsReadModelListSummary.ts +19 -0
  484. package/src/commerce/model/omsReadModelPricing.ts +57 -0
  485. package/src/commerce/model/omsReadModelProjections.ts +1 -0
  486. package/src/commerce/model/omsReadModelRowCore.ts +193 -0
  487. package/src/commerce/model/omsReadModelRows.ts +7 -0
  488. package/src/commerce/offerAvailability.ts +75 -0
  489. package/src/commerce/offerAvailabilitySchemas.ts +56 -0
  490. package/src/commerce/offerEvidenceSchemas.ts +17 -0
  491. package/src/commerce/oms/omsContractBase.ts +92 -0
  492. package/src/commerce/oms/omsContractReadAuxSchemas.ts +130 -0
  493. package/src/commerce/oms/omsContractReadSchemas.ts +303 -0
  494. package/src/commerce/oms/omsContractRequests.ts +143 -0
  495. package/src/commerce/oms/omsContracts.ts +6 -0
  496. package/src/commerce/oms/omsControlPlane.ts +85 -0
  497. package/src/commerce/oms/omsFulfillmentContractSchemas.ts +113 -0
  498. package/src/commerce/oms/omsFulfillmentDebugSchemas.ts +38 -0
  499. package/src/commerce/oms/omsFulfillmentHealthSchemas.ts +46 -0
  500. package/src/commerce/oms/omsPorts.ts +165 -0
  501. package/src/commerce/oms/omsPrimitives.ts +3 -0
  502. package/src/commerce/oms/omsProviderEvidenceSchemas.ts +13 -0
  503. package/src/commerce/orderDraftErrors.ts +28 -0
  504. package/src/commerce/orderEmailEligibility.ts +131 -0
  505. package/src/commerce/orderEmailLines.ts +22 -0
  506. package/src/commerce/orderFeedbackContracts.ts +47 -0
  507. package/src/commerce/orderMoney.ts +207 -0
  508. package/src/commerce/orderReviewContracts.ts +124 -0
  509. package/src/commerce/orderReviewPorts.ts +94 -0
  510. package/src/commerce/outboxDispatchContracts.ts +30 -0
  511. package/src/commerce/outboxEventSchemas.ts +230 -0
  512. package/src/commerce/outboxOrderDraftEmailPorts.ts +241 -0
  513. package/src/commerce/paymentContinuation.ts +5 -0
  514. package/src/commerce/ports.ts +7 -0
  515. package/src/commerce/recoveryDestination.ts +23 -0
  516. package/src/commerce/runtimeErrors.ts +19 -0
  517. package/src/commerce/salesChannelEnvelope.ts +28 -0
  518. package/src/commerce/schemas.ts +104 -0
  519. package/src/commerce/server/checkoutCompensation.ts +49 -0
  520. package/src/commerce/server/checkoutConflictClassifiers.ts +53 -0
  521. package/src/commerce/server/checkoutExpiredRecoveryPolicy.ts +107 -0
  522. package/src/commerce/server/checkoutInvoiceBuyerSnapshot.ts +36 -0
  523. package/src/commerce/server/checkoutOfferPolicyPort.ts +60 -0
  524. package/src/commerce/server/checkoutPaymentContinuationCredential.ts +222 -0
  525. package/src/commerce/server/checkoutQuoteTypes.ts +9 -0
  526. package/src/commerce/server/checkoutRecoveryOrderPort.ts +40 -0
  527. package/src/commerce/server/checkoutRecoveryToken.ts +63 -0
  528. package/src/commerce/server/checkoutRefusalContinuation.ts +29 -0
  529. package/src/commerce/server/checkoutRuntimeTypes.ts +26 -0
  530. package/src/commerce/server/commerceCheckoutCommandExecution.ts +188 -0
  531. package/src/commerce/server/commerceCheckoutCompensation.ts +66 -0
  532. package/src/commerce/server/commerceCheckoutContinuationTerms.ts +87 -0
  533. package/src/commerce/server/commerceCheckoutCustomerDefaults.ts +24 -0
  534. package/src/commerce/server/commerceCheckoutFailureHandler.ts +144 -0
  535. package/src/commerce/server/commerceCheckoutHandler.ts +269 -0
  536. package/src/commerce/server/commerceCheckoutHandlerAdmission.ts +157 -0
  537. package/src/commerce/server/commerceCheckoutHandlerHelpers.ts +223 -0
  538. package/src/commerce/server/commerceCheckoutOrchestrationError.ts +15 -0
  539. package/src/commerce/server/commerceCheckoutPromotionPriceChange.ts +83 -0
  540. package/src/commerce/server/commerceCheckoutProviderPayment.ts +45 -0
  541. package/src/commerce/server/commerceCheckoutQuoteGuard.ts +172 -0
  542. package/src/commerce/server/commerceCheckoutResume.ts +132 -0
  543. package/src/commerce/server/commerceCheckoutResumeGuard.ts +195 -0
  544. package/src/commerce/server/commerceCheckoutSavedPaymentMethod.ts +85 -0
  545. package/src/commerce/server/commerceCheckoutStartRuntimeFailure.ts +59 -0
  546. package/src/commerce/server/commerceCheckoutTiming.ts +53 -0
  547. package/src/commerce/server/commerceDiagnostics.ts +37 -0
  548. package/src/commerce/server/commerceOmsCancelOrderHandler.ts +43 -0
  549. package/src/commerce/server/commerceOmsControlPlaneHandlers.ts +71 -0
  550. package/src/commerce/server/commerceOmsHandlers.ts +275 -0
  551. package/src/commerce/server/commerceOmsMarkRefundedHandler.ts +39 -0
  552. package/src/commerce/server/commerceOrderDraft.ts +131 -0
  553. package/src/commerce/server/commercePaidOrderOrchestration.ts +275 -0
  554. package/src/commerce/server/commerceProviderAttemptFailure.ts +257 -0
  555. package/src/commerce/server/commerceReturnsHandlers.ts +143 -0
  556. package/src/commerce/server/commerceRuntimePort.ts +75 -0
  557. package/src/commerce/server/commerceRuntimeService.ts +229 -0
  558. package/src/commerce/server/commerceRuntimeStartResponse.ts +76 -0
  559. package/src/commerce/server/commerceStarterOfferGuard.ts +200 -0
  560. package/src/commerce/server/configuratorIntentPersistence.ts +161 -0
  561. package/src/commerce/server/configuratorIntentPersistenceHandler.ts +54 -0
  562. package/src/commerce/server/emailRuntime.ts +30 -0
  563. package/src/commerce/server/handlerSupport.ts +22 -0
  564. package/src/commerce/server/index.ts +181 -0
  565. package/src/commerce/server/offerAvailability.ts +275 -0
  566. package/src/commerce/server/orderDraftRpcPayload.ts +39 -0
  567. package/src/commerce/server/orderFeedbackSubmit.ts +40 -0
  568. package/src/commerce/server/orderFeedbackTokenCheck.ts +28 -0
  569. package/src/commerce/server/orderReviewAdminHandlers.ts +43 -0
  570. package/src/commerce/server/orderReviewHandlers.ts +57 -0
  571. package/src/commerce/server/orderReviewLifecycle.ts +129 -0
  572. package/src/commerce/server/orderReviewMedia.ts +170 -0
  573. package/src/commerce/server/orderReviewRawUploadHandler.ts +300 -0
  574. package/src/commerce/server/outboxCheckoutExpiredEmailHandler.ts +86 -0
  575. package/src/commerce/server/outboxCheckoutRecoveryEmailHandler.ts +188 -0
  576. package/src/commerce/server/outboxDispatchRegistry.ts +269 -0
  577. package/src/commerce/server/outboxDispatchRegistryComposition.ts +31 -0
  578. package/src/commerce/server/outboxOrderDraftEmailHandler.ts +162 -0
  579. package/src/commerce/server/outboxOrderPaidEmailHandler.ts +147 -0
  580. package/src/commerce/server/outboxOrderPaidFulfillmentHandler.ts +4 -0
  581. package/src/commerce/server/outboxOrderPaidFulfillmentPorts.ts +3 -0
  582. package/src/commerce/server/outboxOrderRefundedEmailHandler.ts +58 -0
  583. package/src/commerce/server/outboxPaymentFailedEmailHandler.ts +99 -0
  584. package/src/commerce/server/outboxReturnEmailHandlers.ts +92 -0
  585. package/src/commerce/server/outboxShipmentDeliveredEmailHandler.ts +94 -0
  586. package/src/commerce/server/outboxShipmentDispatchedEmailHandler.ts +112 -0
  587. package/src/commerce/server/outboxShipmentExceptionEmailHandler.ts +73 -0
  588. package/src/commerce/server/referenceCheckoutHandler.ts +87 -0
  589. package/src/commerce/server/reservationSweepPort.ts +67 -0
  590. package/src/commerce/server/starterTermsPort.ts +22 -0
  591. package/src/commerce/server/supabaseCommerceReturnsPort.ts +81 -0
  592. package/src/composition/accountSupportContribution.ts +28 -0
  593. package/src/composition/commerceContribution.ts +35 -0
  594. package/src/composition/index.ts +2 -0
  595. package/src/fulfillment/index.ts +1 -1
  596. package/src/fulfillment/paidHandoff.ts +2 -2
  597. package/src/inventory/bindings.ts +12 -4
  598. package/src/inventory/index.ts +1 -0
  599. package/src/inventory/managedStockAvailability.ts +23 -0
  600. package/src/inventory/postgresStockAvailability.ts +2 -21
  601. package/src/inventory/stockReadResponse.ts +25 -0
  602. package/src/pricing/browser/index.ts +6 -0
  603. package/src/subscriptions/index.ts +3 -2
package/CHANGELOG.md CHANGED
@@ -10,6 +10,311 @@ in the source repository.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.28.0]
14
+
15
+ - Publishable on the npm `latest` dist-tag as `0.28.0`, from tag
16
+ `openlup-platform-v0.28.0`.
17
+
18
+ Add experimental account-support and type-only account-support/contracts exports
19
+ with five owner-derived envelopes, explicit capability types, unchanged account-read
20
+ diagnostics and an injected read facade. Hosts retain authorization, projections,
21
+ private extensions and driver selection; command envelopes install no executor.
22
+ Add owner-equality, browser, delegation, reference and packed-consumer witnesses.
23
+
24
+ Migration: none for existing callers. The new subpaths are additive and the
25
+ reference diagnostic path retains its exports and behavior. The catalog,
26
+ commerce-server, commerce, fulfillment, identity, pricing and promotions API
27
+ reports (`api/catalog.api.md`, `api/commerce-server.api.md`, `api/commerce.api.md`,
28
+ `api/fulfillment.api.md`, `api/identity.api.md`, `api/pricing.api.md`,
29
+ `api/promotions.api.md`) reorder existing enum/union members because declaration
30
+ emit order changed after adding the module: member order only, no declaration
31
+ change; no member is added, removed or changed. No SQL migration or activation.
32
+
33
+ Add bounded account/support read composition through the existing experimental
34
+ account-support and type-only account-support/contracts entries. New runtime
35
+ exports: CUSTOMER_ACCOUNT_V2_CONTRACT_VERSION, readAccountSnapshot,
36
+ isCustomerVisibleSubscription, recurringPrice, computeEditState, editCutoff,
37
+ buildActionRequired, CUSTOMER_ORDERS_CONTRACT_VERSION, readCustomerOrderSummaries,
38
+ readCustomerOrderDetail, customerOrderMoney, toOrderMoneyHeader, toOrderMoneyItem,
39
+ mapCustomerOrderLines, lineListTotalMinor, SUPPORT_CUSTOMER_360_CONTRACT_VERSION,
40
+ projectCustomer360Snapshot, deriveContactHealth, boundedCustomerJourneyAudit,
41
+ createCustomer360ReadFacade, createInvoiceAccess, downloadOwnedInvoicePdf and
42
+ deriveCustomerDocumentDeliveryStatus. Add neutral account/order/support DTOs and
43
+ typed source, projection and invoice-owner ports; preserve R1 exports.
44
+
45
+ Reference factories and host-fed views are default-off/unmounted. Native support
46
+ reads use the existing authorized PostgreSQL scope; unselected capabilities
47
+ refuse explicitly. Pricing, captured presentation and private extensions stay
48
+ host injected. Invoice access binds the document to a found owned-order history
49
+ before ticket resolution or artifact IO, adding one history read; foreign/unknown
50
+ documents return denied. Download requires a bound owned-order history; an unbound
51
+ history reports unsupported (host_binding_required). Denied, unknown and unsupported
52
+ history results retain their distinct M09 outcomes before ticket/artifact IO;
53
+ thrown history stays unknown. M09 PDF validation remains unchanged.
54
+ Customer 360 facade authorization now runs before every source read and returns
55
+ denied with zero source IO on refusal. The reference binding uses that callback
56
+ once per call before opening a governed journey or independent diagnostic scope.
57
+ Customer 360 subscription pointer enrichment includes optional nullable
58
+ paymentMethodKind, preserving selected-empty null and unread omission. Reference
59
+ diagnostic search, segment history and v2 overview select their own authorized
60
+ scope; reference line presentation picks only its declared display fields.
61
+
62
+ Migration: the unreleased Customer360Subscription gains optional nullable
63
+ paymentMethodKind. Selected Customer360ProjectionInput.subscriptionPointers values
64
+ now supply paymentMethodKind alongside shippingAddressId; use null for known-empty
65
+ evidence and omit the pointer source when unread. Callers of the unreleased
66
+ createCustomer360ReadFacade now supply authorize(): Promise<boolean> alongside
67
+ journey, summary and diagnostics, and handle the added { kind: "denied" } result
68
+ on every method. No SQL migration is required.
69
+
70
+ The unchanged generator also regenerates these sibling API reports:
71
+ - `packages/platform/api/catalog.api.md`
72
+ - `packages/platform/api/commerce-server.api.md`
73
+ - `packages/platform/api/commerce.api.md`
74
+ - `packages/platform/api/communications.api.md`
75
+ - `packages/platform/api/fulfillment.api.md`
76
+ - `packages/platform/api/identity.api.md`
77
+ - `packages/platform/api/invoicing.api.md`
78
+ - `packages/platform/api/pricing.api.md`
79
+ - `packages/platform/api/promotions.api.md`
80
+
81
+ These generated companions are member order only, no declaration change. No
82
+ snapshot is hand-edited; no member is added, removed or changed in those reports.
83
+
84
+ Add experimental self-service composition returning SelfServiceCommandFacade,
85
+ with required host capabilities and every guarded output lane. ENV-R3-1 keeps
86
+ input lanes optional and adds nativeLegacySubscription plus subscriptionControl.
87
+ Unselected methods return AccountSupportLaneUnavailable: paymentMethod uses the
88
+ host paymentMethodSetup refusal by identity, commerce uses commerceRecovery,
89
+ and every other lane uses a frozen host_binding_required refusal after its guard.
90
+ Native routing retains ownership-before-quote behavior and explicit pause; typed,
91
+ raw, profile, method, commerce and recovery delegates keep owner results/refusals.
92
+ Raw/typed admission requires the supplied clientId before every owner call. The
93
+ trailing `ControlSnapshot = unknown` generic preserves snapshot DTOs and existing
94
+ twelve-argument consumers.
95
+ The generic M07 adapter maps setupMethod to paymentMethod.execute. No owner type
96
+ imports or new module-graph edges. Native repair is a registered follow-up, not a
97
+ cut; token handlers stay in reference source. The reference binding remains off.
98
+
99
+ The unchanged API generator leaves two sibling snapshots changed from final R1:
100
+ `commerce-server.api.md` and `commerce.api.md` under `packages/platform/api/`.
101
+ These are disclosed generated companions: member order only, no
102
+ declaration change, proven by AST comparison normalizing union/enum member order.
103
+
104
+ Migration: development-preview envelope delta ENV-R3-1. Supply verified context,
105
+ AccountSupportCapabilities and complete selected owner lanes. Handle the named
106
+ unavailable arm in method results. Supported paymentMethodSetup requires paymentMethod; supported
107
+ commerceRecovery/configuredPurchase require commerce; supported subscription
108
+ genericBundleCommands/commandBoundReceipts require a subscription command lane. No schema, dependency, release cap, activation or browser cutover change.
109
+
110
+ Add explicit operator recovery composition, current managed email claim/settlement,
111
+ managed account link and human recovery fence, and native support delegation to
112
+ M10 through injected executors. Preserve donor callback and failure ordering;
113
+ expose actual optional owner receipts and truthful link-then-action partial results.
114
+ The reference binding remains default-off and unmounted.
115
+
116
+ Migration:
117
+ - Introduce the frozen native support-authority SQL and packed twin plus the
118
+ managed current-authority forward, after complete same-rail predecessors.
119
+ - Retire `customer_support_correct_subject_email_v1`: human calls raise 55000
120
+ `customer_support_email_correction_requires_admission`; drain old callers and
121
+ use admission → claim → claim-fenced identity commit → settlement.
122
+ - operator_subscription_actions: 3 combined email calls now execute admission → claim → claimed auth move (linked only, deferred fence forced before settlement) → settlement; existing success/replay/collision/stale/audit expectations retained; human roster fixture added.
123
+ - operator_contact_correction: 4 combined email calls now execute admission → claim → claimed auth move (linked only, deferred fence forced before settlement) → settlement; existing success/replay/collision/stale/audit expectations retained; human roster fixture added.
124
+ - runtime_capability_boundary: missing-subject/null-clock correction uses admission (same subject_not_found result); human admission fixture added; machine retired-entry 42501 unchanged.
125
+ - marketing_lead_email_namespace: 1 combined email calls now execute admission → claim → claimed auth move (linked only, deferred fence forced before settlement) → settlement; existing success/replay/collision/stale/audit expectations retained; human roster fixture added.
126
+ - absorb_lead: 1 combined email calls now execute admission → claim → claimed auth move (linked only, deferred fence forced before settlement) → settlement; existing success/replay/collision/stale/audit expectations retained; human roster fixture added.
127
+ - CD-8: use `status = 'payment_pending'` for native residual-unpaid detection,
128
+ matching the native cycle CHECK; native outcomes and the managed predicate stay
129
+ unchanged. The native witness covers resume with and without that cycle.
130
+ - CD-9 standing donor-adopter adoption mapping: link keeps the same body; the donor adopter uses
131
+ INVOKER with table-wide `service_role` access, while OpenLup uses DEFINER under
132
+ column-level capability closure. Preserve the migration owner, fixed search
133
+ path and service-only EXECUTE; widen no table grant. Retired email correction
134
+ and recovery remain INVOKER.
135
+ - RD-R4-4 link refusal proof: machine/non-human, missing and inactive operators
136
+ leave clients, support commands and audit rows unchanged. Subject refusals
137
+ leave clients and auth identities unchanged and write exactly one refusal
138
+ receipt plus one matching audit row for the key, with no other row/xmin changes.
139
+ Unknown subjects return `refused` / `subject_not_found`; email expectation,
140
+ foreign-identity and already-linked conflicts return `conflict` with
141
+ `email_expectation_conflict`, `identity_linked_elsewhere` and
142
+ `subject_account_linked`, respectively. Same-key replay returns the stored
143
+ refusal unchanged with zero further writes.
144
+ - Native M03 contact/link and unsupported M10 subcases remain named refusals;
145
+ no historical migration, pin, module graph or source-release contract changes.
146
+
147
+ API generator companions and measured verification are recorded in the module plan.
148
+
149
+ Add inert account/support graph bindings, guarded owner services and composition
150
+ descriptors over the R1–R4 envelopes. The reference recipe is default-off, mounts
151
+ nothing and starts no workers. Service/port/route aliases share one callable
152
+ guard; readiness is observed before every entrance. Owner authorization, keys,
153
+ receipts, refusals and M04 delivery/replay remain with their existing owners.
154
+ The reference operator subscription adapter restores donor BFF command metadata
155
+ around one R4 dispatch and serializes only the strict donor outcome fields,
156
+ including decoded ISO timestamps and explicit nulls. Optional native `ownerReceipt`
157
+ evidence stays server-side and is absent from the response. The composition witness
158
+ distinguishes that response from SQL storage.
159
+
160
+ Migration: additive `createAccountSupportBindings`, `createAccountSupportServices`
161
+ and `createAccountSupportContribution` exports. Hosts supply one graph, prebound
162
+ operations, exact selected schema and complete catalogue identity, map admission
163
+ refusals before serving routes, and explicitly compose declared owner contributions.
164
+ Null selected operations remain required/unbound. Commerce is a nullable injected
165
+ record returning `unsupported/host_binding_required` when unbound. The reference
166
+ `commerceOwner` option accepts the host-built M11 selection over bound checkout,
167
+ recovery and ATP callables, with the complete account/M11/ATP schema union and
168
+ matching enablement/readiness. R5b does not construct M11 or import its adapters;
169
+ it uses a local structural selection type. Supply the existing effect registry
170
+ as `commerceRegistry` and forward guarded services and contributions once;
171
+ unknown stock, unsupported options and commerce outcomes remain unchanged.
172
+ While account-support is disabled, a supplied M11 selection stays cold: the
173
+ keyed commerce entrance returns the disabled refusal before the selected owner
174
+ or the injected record runs, and no M11 contribution, port, route, trigger,
175
+ reference handle or schema requirement is forwarded.
176
+ Configured recovery/purchase elements use explicit host paths and clients. No SQL, version, serving
177
+ activation or source-release snapshot changes. Regenerated account-support and
178
+ composition API reports describe these additions; no sibling API report changed.
179
+
180
+ ## [0.27.0]
181
+
182
+ - Publishable on the npm `latest` dist-tag as `0.27.0`, from tag
183
+ `openlup-platform-v0.27.0`.
184
+
185
+ - Bind experimental native new-purchase previews to the existing ATP reader through the inventory and reference composition, protecting subscription stock without another stock calculation.
186
+ - Migration: PostgreSQL hosts supply the optional `stockSourceKey` binding dependency to enable `newPurchaseStockReadPort`. The preview then binds with no unsupported reason; an absent or blank key reports `inventory_stock_source_key_required`. Admin readiness is unchanged; a required preview leaves reference readiness refused until the key is supplied.
187
+ - Migration: Native previews subtract all live holds, remaining active subscription demand inside 14 days and channel exposure. For 20 units with 5 held and 7 still due, both availability fields report 8; a provider-tag-filtered preview counting only 2 of those held units would report 11 for new purchases. Credited own-cycle holds are not subtracted twice. Exposure of 4 reduces a budget of 11 to 7.
188
+ - Migration: Native budgets clamp at zero, stale stock contributes zero to ATP, and local-only stock has no native source. The native preview refuses own-order exclusions or a horizon other than 14 days as `native_stock_read_options_unsupported`; it provides no one-time or replacement allocation seam.
189
+ - Migration: Managed hosts apply the managed forward `20261025109000_inventory_new_purchase_stock_read.sql` after the managed migration prefix (`public.inventory_new_purchase_stock_read(p_skus jsonb, p_as_of timestamptz) RETURNS jsonb`, service_role-only execution), then supply optional `stockRpc` to the inventory binding (also forwarded through the reference store). An injected `newPurchaseStockReadPort` wins; without either dependency the existing `inventory_new_purchase_stock_reader_required` remains.
190
+ - Migration: Managed preview quantities equal ATP with renewal exemption fixed false, preserving M10 provider-tagged holds, safety, 14-day uncredited demand and channel exposure. Both availability fields now include demand and clamp at zero. Other horizons and own-order exclusions refuse `managed_stock_read_options_unsupported`; SQL accepts at most 200 requested array items before deduplication and refuses a NULL as-of timestamp as `inventory_stock_as_of_invalid` (SQLSTATE `22023`). The managed preview treats ANY stale provider-stock evidence for the SKU as stale (fail-safe; exact when one provider kind exists); quantities remain unchanged and the allocator's own stale refusal stays authoritative.
191
+ - Migration: Managed `source` is "provider" iff ATP returns a row for the SKU; otherwise it is "missing".
192
+
193
+ - Add experimental `@openlup/platform/commerce` neutral schema cores, contract helpers and ports, plus type-only browser-safe `@openlup/platform/commerce/contracts`. Reference bindings extend these cores with existing profile, locale, fiscal and provider policy. No version or artifact cap changes.
194
+ Migration: Commerce-owned ports and generic records may be imported from `commerce/contracts`. Pricing DTOs remain at `@openlup/platform/pricing/contracts` directly, without convenience re-exports from commerce. Reference exported names remain available.
195
+ Migration: `commerceOfferVersionSchema` now validates opaque offer tokens of at most 40 characters, using the lower-case token grammar (D1).
196
+ Migration: The commerce quote port's out-of-band `CreateQuoteOptions` now accepts the server-bound `offerVersion`; the M05 options and quote DTOs remain their existing owner (D2).
197
+ Migration: Reference quote context types additionally carry optional shipping and acquisition terms using their existing package definitions (D3).
198
+ Migration: Checkout expected-quote acceptance and price-change responses now admit acquisition expectations independently of totals; invalid revisions and discount bounds are refused (D4).
199
+ Migration: Configurator intents additionally admit acquisition capability, opaque `offerVersion` and bounded `minimumUnits` asks (D5).
200
+ Migration: A supplied minimum replaces the injected host default for untrusted intent validation only; it does not authorize server checkout admission (D6).
201
+ Migration: `offerAvailabilityRequestItems` projects one unit per variant in input order and the supplied checkout mode (D7).
202
+ Migration: The reference configurator-to-quote mapper forwards an admitted acquisition capability, leaving absent capabilities absent (D8). This does not activate an acquisition issuer or offer guard.
203
+ Migration: `CheckoutOfferPolicyPort<Intent, Quote>` and its bound/refused result are available as types only (D9). Offer resolution, evidence execution and the starter guard remain outside K1 and are deferred to K2a.
204
+ Migration: Reference recovery policy, nominal errors and order-contact helpers delegate to the package with identity preserved. Neutral checkout, resume and defaults schema factories require explicit host bindings; their reference extensions retain existing acceptance, parsed output and error paths.
205
+ Migration: `commerce/server` is a reserved empty Node-only entry; browser consumers continue to use `commerce` and `commerce/contracts`. Canonical order-money and commerce outbox payload validation are available from `commerce`; host quote/draft schemas are injected with the existing validation behavior.
206
+ Migration: Checkout admission refuses unbound offer/minimum asks while no server offer resolver is composed, retaining the host floor for ordinary requests; untrusted intent parsing still accepts those asks.
207
+ Migration: The commerce quote port requires request, response and host-options type parameters; the reference binds the existing pricing definitions and retains its named types. This removes an unnecessary pricing declaration closure without copying its contracts or changing pricing behavior.
208
+ - Add browser-safe `@openlup/platform/pricing/browser` with direct re-exports of the existing quote primitive factory and acquisition capability/expectation schemas. Reference imports retain symbol identity and validation behavior; the pricing root and contracts entry are unchanged.
209
+ Migration: Regenerated `communications.api.md`, `fulfillment.api.md` and `inventory.api.md` change declaration order only: TypeScript emits union and enum members in literal-creation order across the program. For `defaultCommunicationPurposeRegistry`, before: `"transactional" | "marketing_launch_offer" | "marketing_newsletter" | "tester_program" | "subscription_dunning" | "admin_notification"`; after: `"transactional" | "subscription_dunning" | "marketing_launch_offer" | "marketing_newsletter" | "tester_program" | "admin_notification"`. Communications newsletter, fulfillment and inventory enum members likewise appear in a different order. The member sets and all types are unchanged; type consumers are unaffected and need no code or SQL migration.
210
+
211
+ - K2 lands no SQL. A dedicated later PR, L1, lands all nine reviewed managed M11 slots (`scripts/fixtures/reviewed-m11/supabase/migrations/20261025100000..110000`) in order; no release ships K2 without them (D-M11-SQL-LAND-1).
212
+ - Until L1 lands on the managed rail, a 21-day starter graduation cadence passes admission but fails at provisional-subscription creation: the installed `subscription_create_provisional_for_checkout` and `subscription_apply_starter_graduation` still accept only 14 and 28. Checkout returns the generic failure (HTTP 503).
213
+ - Until L1 lands on the managed rail, the finalize acquisition-admission backstop is inert: `commerce_finalize_order_for_checkout` does not invoke `private.commerce_assert_acquisition_admission` to raise `acquisition_terms_changed` (SQLSTATE 55000), so the package mapping and the safe-compensation re-quote it triggers never fire from the database. The TypeScript quote guard still re-quotes a changed acquisition expectation before finalize.
214
+ - Until L1 lands on the managed rail, `commerce_configurator_persist_intent` lacks the donor preference write scope: preference/consent writes are not restricted to the authenticated owner, and the legacy country fallback stays as installed.
215
+
216
+ - Move the unchanged checkout compensation helper and cleanup port into `@openlup/platform/commerce/server`. The reference facade re-exports the identical function; release/cancellation ordering, idempotency keys, reasons and warnings are unchanged.
217
+
218
+ - Move checkout handlers, the shared paid-order saga, runtime and command execution into the experimental Node-only commerce entry. Host projections, schemas, response routing, starter policy and existing payment execution are injected; reference paths delegate to one package implementation.
219
+ Migration: Acquisition expectations independently reject changed terms in the TypeScript quote guard before finalize; a locked finalize refusal re-quotes only after safe draft compensation once the managed forwards land (L1) (N1). Shipping or acquisition terms now require promotion acceptance even without a current promotion discount (F2).
220
+ Migration: Failed promotion-price-change re-quotes now map `CommerceQuoteError` code `UNKNOWN_SKU` to `BAD_REQUEST` (HTTP 400), and `PRICE_NOT_CONFIGURED`, `UNSUPPORTED_TAX_PROFILE` or `PRICING_INVARIANT_VIOLATION` to `CONFLICT` (HTTP 409), forwarding `error.message` and `error.details` instead of the base's `UPSTREAM_UNAVAILABLE` (HTTP 503), "Checkout failed" and `{ feature: "checkout", stage: "quote" }`. Newly supported acquisition-terms-change re-quotes use the same typed mapping (donor N1).
221
+ Migration: Failed promotion-price-change re-quotes with `CommerceQuoteCatalogReadError` retain `UPSTREAM_UNAVAILABLE` (HTTP 503), but now return "Commerce catalog is unavailable" and `{ reason: "catalog_unavailable", refusalCode: error.code }` instead of the base's "Checkout failed" and `{ feature: "checkout", stage: "quote" }`. Newly supported acquisition-terms-change re-quotes use the same catalog mapping (donor N1).
222
+ Migration: Initial quotes, including normal quoting after saved-continuation fallback, and promotion-price-change re-quotes now map `AcquisitionTermsError` reasons `acquisition_terms_capability_required` and `acquisition_terms_v2_required` to `CONFLICT` (HTTP 409), "Acquisition terms unavailable" and `{ reason: error.reason, refreshRequired: true }`. The base returned `UPSTREAM_UNAVAILABLE` (HTTP 503), "Checkout failed" and `{ feature: "checkout", stage: "orchestrate_order" }` with an optional sanitized preview `diagnosticReason` for initial quotes, or `{ feature: "checkout", stage: "quote" }` for promotion re-quotes. Newly supported acquisition-terms-change re-quotes use the same acquisition mapping (donor N1).
223
+ Migration: On those initial/continuation and promotion re-quote paths, `AcquisitionTermsError` reasons `acquisition_terms_policy_unconfigured`, `acquisition_terms_invalid`, `acquisition_terms_ambiguous` and `acquisition_terms_not_effective` retain `UPSTREAM_UNAVAILABLE` (HTTP 503), but now return "Acquisition terms unavailable" and `{ reason: error.reason, refreshRequired: false }` instead of the base's "Checkout failed" and initial-quote orchestration/preview or promotion re-quote stage details described above. Newly supported acquisition-terms-change re-quotes use the same acquisition mapping (donor N1).
224
+ Migration: An offer-version or minimum-units ask requires a server offer-policy binding. Without a resolver, reference admission retains its host minimum and original validation refusal before persistence. A composed resolver binds or refuses before any quote, order-draft or runtime write; identity persistence retains its existing earlier ordering. Accepted evidence is bounded and the bound version follows authoritative, steady and replacement quotes (N2).
225
+ Migration: An owned saved acquisition quote may continue before re-quoting only when subject context, basket, total, terms, contact, invoice, delivery and starter state match exactly; edits and failed/incomplete lookups take normal quoting (N3).
226
+ Migration: Scoped inventory admission contention returns retryable unavailability without provider dispatch or compensation capability; retry identities are unchanged (N4). Raw database error classification remains an adapter responsibility.
227
+ Migration: Starter admission accepts injected terms and a supplied graduation constraint, includes the 21-day graduation cadence, compares acquisition revision and rate, and freezes the selected second-delivery discount with steady quote policy/version (N5). Reference starter defaults remain host inputs. End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
228
+ Migration: The best-effort account-link helper accepts an optional trigger for its existing timeout log; without a trigger its log and timeout behavior are unchanged (N8).
229
+ Migration: Saved-method alias and recurring-mode metadata are host-defined string generics throughout the checkout resolver, handler, orchestration, command and runtime APIs. Reference bindings retain their existing provider unions, wire values and execution behavior.
230
+ Migration: The offer-evidence JSON-length limit is internal; consumers use the exported evidence schema.
231
+ Migration: The reference browser quote context now admits optional shipping and resolved acquisition terms through their existing validators, preserving strictness and existing fields (donor D3; K1-scope port carried by K2). `pricing/browser` re-exports the identical schema objects without new validation logic.
232
+ Migration: `outbox.commerceOrderDraftCreatedEventSchema` now accepts the 21-day starter cadence at `payload.quoteSnapshot.quote.context.starterPack.graduation.cadenceDays`, `payload.orderDraftSnapshot.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
233
+ Migration: `outbox.commerceOrderDraftCreatedOutboxRecordSchema` now accepts the 21-day starter cadence at `payload.quoteSnapshot.quote.context.starterPack.graduation.cadenceDays`, `payload.orderDraftSnapshot.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
234
+ Migration: `outbox.commerceOrderDraftCreatedPayloadSchema` now accepts the 21-day starter cadence at `quoteSnapshot.quote.context.starterPack.graduation.cadenceDays`, `orderDraftSnapshot.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
235
+ Migration: `checkout.checkoutRequestSchema` now accepts the 21-day starter cadence at `intent.starterOffer.steady.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
236
+ Migration: `checkout.checkoutResponseSchema` now accepts the 21-day starter cadence at `authoritativeQuote.quote.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
237
+ Migration: `contracts.commerceQuoteSchema` now accepts the 21-day starter cadence at `context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
238
+ Migration: `contracts.createOrderDraftRequestSchema` now accepts the 21-day starter cadence at `quoteSnapshot.quote.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
239
+ Migration: `contracts.createOrderDraftResponseSchema` now accepts the 21-day starter cadence at `orderDraft.quoteSnapshot.quote.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
240
+ Migration: `contracts.createQuoteBatchResponseSchema` now accepts the 21-day starter cadence at `quotes.0.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
241
+ Migration: `contracts.createQuoteResponseSchema` now accepts the 21-day starter cadence at `quote.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
242
+ Migration: `contracts.orderDraftSummarySchema` now accepts the 21-day starter cadence at `quoteSnapshot.quote.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
243
+ Migration: `contracts.publicCreateQuoteBatchResponseSchema` now accepts the 21-day starter cadence at `quotes.0.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
244
+ Migration: `contracts.publicCreateQuoteResponseSchema` now accepts the 21-day starter cadence at `quote.context.starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
245
+ Migration: `contracts.quoteContextSchema` now accepts the 21-day starter cadence at `starterPack.graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
246
+ Migration: `contracts.starterPackPlanSchema` now accepts the 21-day starter cadence at `graduation.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
247
+ Migration: `intent.configuratorIntentSchema` now accepts the 21-day starter cadence at `starterOffer.steady.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
248
+ Migration: `persistence.configuratorIntentPersistenceRequestSchema` now accepts the 21-day starter cadence at `starterOffer.steady.cadenceDays`; invalid-cadence issue alternatives change from `[14, 28]` to `[14, 21, 28]` in that order (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
249
+ Migration: The reference subscription starter-marker reader now also accepts the 21-day graduation cadence, matching the checkout starter plan; 30 days remains refused (donor N5). End-to-end managed checkout with this cadence requires the managed forwards to land (L1).
250
+
251
+ - Move generic draft/finalize/intent/resume stores, cancellation and sweep adapters, bounded recovery classifiers and token helpers into `commerce/server`. Reference factories inject existing schemas, ordered arguments, response projections and phone normalization; verified subject stamping remains last. Recovery projection/routes stay reference-owned; the C2 release handoff is to be released.
252
+ Migration: Runtime-finalize `acquisition_terms_changed` now retains its scoped conflict reason; database-triggered safe pre-dispatch draft compensation and repricing become reachable once the managed forwards land (L1) (N1).
253
+ Migration: Draft catalog-head-moved, missing-anchor and offer-membership refusals now map to catalog-admission conflicts without superseding a draft (N1).
254
+ Migration: Expired subscription recovery permits an absent host subject only with the exact persisted neutral-command marker and all other eligibility fences; public runtime schemas gain no marker bypass (N6).
255
+ Migration: Recovery commercial fingerprints now include shipping terms version, currency, flat charge and threshold; same-money policy drift refuses recreation (N6).
256
+ Migration: The token-state classifier permits continuation only for active/order-not-recoverable, separates expired-policy handling and refuses revoked/used/missing/unknown states. Retained routes are not rewired by this addition (N7).
257
+ Migration: `StarterDeclaration` stays internal to the checkout engine; derive a declaration type from the `createStarterOfferGuard` binding signature instead of importing a standalone type from `commerce/server`.
258
+
259
+ - Add the unchanged physical-table offer-availability projection at `commerce/server` over a structural client and explicit provider predicate, and the pure status/reason ladder at browser-safe `commerce`. Reference adapters retain SDK/provider policy and delegate to the one package implementation; M06 retains normalized stock reads and reservation TTL ownership. No preview ATP switch or second allocator.
260
+ Migration: The reference reservation binding now maps protected inventory `55P03` failures to scoped `inventory_admission_busy`/`inventory_lock_unavailable` details, refuses schema fallback under contention and preserves the original retry keys (N4). Checkout exposes the existing retryable refusal before dispatch; no compensation capability is fabricated.
261
+ - Give structural draft, resume, intent and compensation factories neutral RPC/query names. Reference bindings retain their incumbent exported names and behavior.
262
+
263
+ - Add experimental neutral OMS schema cores, browser-safe DTOs and ports, generic handler factories, read builders and managed adapters through the existing commerce entries. Reference wrappers bind identity, settlement, fiscal fields, governance and provider projections. No versions, SQL, migrations or pack caps change.
264
+ Migration: Host integrations supply `respond`, `authorizeAdmin` and optional read-gate/schema bindings. Mutation request parsing and response envelopes use the donor shared helpers; invalid results remain 502, nominal conflicts 409 and upstream throws 503 with their existing messages.
265
+ Migration: Managed clients are structural and RPC-only; query hydration and idempotent note persistence require a separately injected query capability. Manual refund marking calls only the operator-mark RPC and creates no refund.
266
+ Migration: Neutral read contracts omit private identity and first-cycle presentation, use open provider/accounting status strings, a neutral fiscal field and neutral provider counter. Hosts extend the schema and pass projections through final validation to preserve their existing response fields and acceptance.
267
+ Migration: The reference replacement facade now delegates to the existing fulfillment handler instead of its local handler engine. For managed results, request parsing, success bodies (including defaulted released hold IDs), replay receipts, metadata, idempotency keys, RPC arguments, receiver identity, named 409 refusals and ordinary 400/401/403/405/502/503 responses are unchanged. The fulfillment handler additionally recognizes the native-unsupported sentinel and returns its specific 503; the old local handler would classify that sentinel as an invalid 502 response. The managed adapter does not emit this sentinel. Neither path creates a refund or confirms delivery alignment.
268
+ Migration: Default neutral settlement validation checks a three-letter currency and labels empty totals with `XXX`; hosts inject their actual acceptance/default policy. Delivery summaries and labels use neutral defaults until the host supplies its projections.
269
+ Migration: Browser-safe `./commerce` exports schemas and pure helpers; handlers, managed RPC/query adapters and detail composition now import from the Node-only `./commerce/server` entry. `./commerce/contracts` remains type-only.
270
+ Migration: Unprojected OMS timeline labels now use canonical step keys (for example `delivered`) instead of the reference locale labels. Unknown tokens retain `Delivery status updated`; reference presentation remains behind the existing `timelineLabel` projection. Managed query clients must implement the required `is(column, value)` filter for hydration; class query receivers are preserved by the adapter factory.
271
+ Migration: Omitted fulfillment debug now defaults to `No fulfillment data.` in neutral detail schemas. The reference schema binding retains its previous localized summary and serialized field order.
272
+ Migration: Commerce no longer re-exports the core locale label helper `timelineLabelForStep` or the label-bearing `FULFILLMENT_STATUS_MAP`. Presentation consumers import these from their core owner or host binding; commerce retains pure canonical step and recovery helpers.
273
+ Migration: OMS binds K1 order-money and paid-event exports directly. The concrete OMS payment type is `OmsOrderPaymentStatus`, using K1's unchanged generic `OmsPaymentStatus<PaymentIntentStatus>`. Fulfillment recovery DTOs are commerce-owned alongside their pure recovery helpers.
274
+ Migration: Regenerated `commerce.api.md`, `commerce-contracts.api.md`, `commerce-server.api.md`, `communications.api.md`, `fulfillment.api.md` and `identity.api.md` reflect this final declaration graph. Beyond the commerce additions described above, existing declarations change order only: newsletter event `ignored`, fulfillment status members and identity lifecycle-stage members move within their existing declarations. Before and after member sets and types are identical; consumers need no code or SQL migration for this ordering.
275
+ - @openlup/platform size growth: Neutral OMS read model, handlers, managed adapters and contracts moved into `@openlup/platform/commerce` and the new Node-only `./commerce/server` entry, together with the rest of the M11 commerce stack; K1+K3a measured 1,562,728 packed bytes; adding K3b, K4, K2 (K2a x1.4) and F3 projects 1,749,300 packed bytes; caps raised once with 10% headroom to 1,925,000 packed bytes, 1,648,000 code-gzip bytes, 8,970,000 unpacked bytes, 2,520 code files and 2,580 total files (K3a PR #370, cap-raise commit 5e42e9ec).
276
+
277
+ - Add experimental returns, native order review/media and separate hosted-feedback contracts at `@openlup/platform/commerce`, with handlers and adapters at `@openlup/platform/commerce/server`. Reference paths remain thin facades; no route, SQL, activation or release is added.
278
+ - Migration: Import returns and native order-review/media handlers and adapters from `@openlup/platform/commerce/server`; schemas and port declarations remain at `@openlup/platform/commerce`. Standalone returns handlers require an injected `BffResponder`; reference handler signatures and observed response context are preserved by their facades. Raw upload HTTP types now use the equivalent package HTTP shapes.
279
+ - Migration: Hosted-feedback schemas and RPC-name constants are available from `@openlup/platform/commerce`; Supabase submit/token-check factories are at `@openlup/platform/commerce/server`. Adopters must supply `submit_order_feedback` and `check_order_feedback_token`; native `db/platform` has neither RPC. Hosted feedback remains distinct from native order reviews.
280
+ - Returns scope (F9): only request, approve and reject exist. `restockDisposition`, `refundMode` and `refundAmountCents` record intent; receive, restock and refund execution were never implemented. Request owner/key/fingerprint enforcement stays in the database; the contributed TypeScript RPC arguments are unchanged.
281
+ - Native handler donor-ahead command-runner contribution is observably identical to the prior inline handlers: the 96 pre-move result pins pass, including admin error mapping and exact `replayed` presence. No behavior migration arises from this command-runner contribution.
282
+ - HOST-OWNED class (b) retention: review delay is SQL-only, 14 days native and 21 days in the contributed managed profile. No TypeScript delay seam or SQL change is included.
283
+ - Media retains its existing private storage/upload seams. M02 blob storage lacks private read, inspection, temporary write and promotion operations, so a behavior-changing bridge is not included.
284
+ - Migration: The package default returns reason set is neutral. Use `createCommerceReturnsSchemas(reasonCodes)` and the customer handler's `requestSchema` dependency for host policy; the reference keeps the legacy set with BASE-identical parsed output, refusal details and responses. Return request/approve/reject RPC behavior is unchanged.
285
+ - Migration: Reference browser review and hosted-feedback facades restore jitless Zod initialization before package schema construction. This restores BASE/donor CSP behavior without adding global configuration to the package modules.
286
+ - Migration: `runOrderReviewCommand` is internal to the package. Import the customer/admin handler factories from the commerce/server entry; the reference customer-handler facade keeps its BASE factory export.
287
+ - Migration: Handlers, adapters and raw upload use the existing `@openlup/platform/commerce/server` entry. The `./commerce` runtime graph is browser-safe; `./commerce/contracts` stays type-only. Reference import paths and observed behavior are unchanged.
288
+
289
+ - Add experimental Node-only commerce domain-effect consumers at `@openlup/platform/commerce/server`; browser-safe event contracts, projections and ports stay at `@openlup/platform/commerce`. No new executor, emitter or dispatcher.
290
+ - Record omitted adopter-private W8/W9 assertions and their owners in the [reference commerce guide](../../src/domains/commerce/README.md#w8w9-conformance-dropped-adopter-private-assertions).
291
+ - Migration: Import handler factories, registry composition and `CommerceEmailRuntime` from `@openlup/platform/commerce/server`. The browser entry never imports the server entry or M08 runtime.
292
+ - Migration: Reference email handlers and the dispatch registry bind a single neutral implementation. Package ports use `contextName` and `messageId`; reference adapters retain their existing extension/provider fields and public send behavior.
293
+ - Migration: `uniqueRegistry` is injected from the existing outbox rail, with no new package dependency. `CommerceEmailRuntime` requires explicit communications parser, transactional scaffold, outcome mapping, locale, money, line-label, paid-presentation, tracking and notification-policy bindings. Reference locale, formatting, provider outcomes and legacy tracking URLs remain unchanged.
294
+ - Migration: Refund notices display amounts only with `refundEvidenceVersion: "provider-refund.v2"`; historical order totals and unversioned refund amounts no longer appear as refund evidence (donor-ahead).
295
+ - Migration: The frozen refund consumer subset ignores legacy `totalCents` and admits optional string `refundEvidenceVersion`; supplied refund amounts and currencies retain their existing validation.
296
+ - Migration: Paid-receipt presentation forwards its proved discount percentage, including non-default percentages (donor-ahead); commercial eligibility stays with the host.
297
+ - Migration: Core handler descriptors and expected-descriptor validation are available before claiming. Claim order, flags, independent paid-email/fulfillment duties, same-event timeout composition and risk gating retain donor behavior.
298
+ - Migration: Channel-owned buyer communication settles as processed with `skipped: "channel_owns_buyer_comms"`, using a live policy read per event. Cancellation email remains unregistered; its fact can be consumed through adopter `extraHandlers`.
299
+ - Migration: Producer event-type literals and payload schema behavior remain unchanged; the draft-event factory accepts exact host snapshot schemas. The neutral source projection preserves external-reference bytes and case, with no inventory SQL or exposure default.
300
+ - Migration: Reference email payload parsing binds the existing fulfillment `parseOutboxPayload` export; its schema issues and bounded discard reason are unchanged. K1 owns all producer schemas through `createCommerceOutboxEventSchemas`; all nine golden parse/refusal cases pass unchanged.
301
+ - Migration: Paid-fulfillment registration re-exports the existing fulfillment descriptor, preserving its identity, event literal and timeout instead of maintaining a second descriptor.
302
+
303
+ - Add an experimental structural commerce contribution at the existing composition entry, with explicit installed commerce exports, namespaced ports and existing handler, route and schedule descriptors. Duplicate registrations refuse before maps can overwrite an executor.
304
+ - Add an inert, default-off reference commerce binding over existing package callables and the existing native checkout-recovery adapter. Only ready schema observations admit work; unknown and unsatisfied candidates leave the serving selection intact. Native recovery records reminder intents, authorizes their delivery and compacts terminal outbox rows; managed-only expiry and recreation remain separate.
305
+ - K5 adds no refactor: the event-contract gap and server entry scaffold are already resolved in the preceding imports. Existing commerce witnesses and engines remain unchanged; no SQL, timer, route activation or second executor is introduced.
306
+ Migration: `@openlup/platform/composition` additively exports `createCommerceContribution`. Supply the selected callables, complete required schema and existing descriptors; the factory declares them without installation or execution. Existing imports and default compositions need no change.
307
+
308
+ - Managed commerce migrations preserve the exact reviewed fixture bytes and ordered prerequisite chain.
309
+ Migration: Guest configurator destinations do not rewrite saved delivery or payment preferences; preference writes require a server-proved matching account.
310
+ Migration: Legacy omitted-country fallback uses `platform_region_code()` for address identity and insertion; configure the adopter's settlement region. Neutral commands require explicit country.
311
+ Migration: Return creation and replay require the server-supplied principal's owned order and identical normalized command; foreign or changed commands refuse atomically.
312
+ Migration: Checkout payment-link receipts use the service-only operator entry point and the `checkout_payment_link_mint` audit action.
313
+ Migration: Subscription finalize validates retained acquisition terms under the shared policy lock; policy writers require its exclusive counterpart. Completed finalize replay preserves its response after policy changes; one-time checkout is exempt.
314
+ Migration: The acquisition terms reader refuses absent effective terms; the no-policy finalize compatibility branch remains available.
315
+ Migration: New-purchase stock reads use ATP with renewal exemption fixed false, bounded SKU arrays and conservative stale reporting. The service-only reader uses owner privileges with `SECURITY DEFINER` and `search_path = pg_catalog, pg_temp`.
316
+ Migration: Starter graduation admits 14, 21 or 28 days, while provisional creation uses the retained starter interval and subscription timezone default. Rolling back below the forward with a 21-day marker is unsupported; roll forward.
317
+
13
318
  ## [0.26.0]
14
319
 
15
320
  - Publishable on the npm `latest` dist-tag as `0.26.0`, from tag
@@ -27,330 +332,3 @@ Migration: managed hosts must pass exact applied-transition attribution to the n
27
332
 
28
333
  Native attempt-replay parity remains REGISTERED with M10; these managed forwards
29
334
  do not implement native parity or authorize host activation.
30
-
31
- ## [0.25.0]
32
-
33
- - Publishable on the npm `latest` dist-tag as `0.25.0`, from tag
34
- `openlup-platform-v0.25.0`.
35
-
36
- - Re-pin the pending M10/F17 control fixtures after landed M08/M09 without
37
- changing either installation rail, the migration manifest or landed N1. The
38
- 16-entry packet has seven native and nine managed pins. Native X restores
39
- ATP-counted late-positive stock recovery; Y filters paid retry candidates
40
- before LIMIT. Fold command-preview receipt replay into uninstalled N2, keeping
41
- apply unchanged. Preserve the historical 14-pin approval reader and exact
42
- prefix, definition, statement, ACL and catalog controls. Real PostgreSQL
43
- witnesses cover ATP, starvation, all 43 fresh command scenarios and raw preview
44
- replay with no counts/columns/xmin delta.
45
-
46
- No package SQL asset, export, runtime activation or external CI dependency is
47
- introduced. The development-preview boundary remains.
48
-
49
- - Fix uninstalled N3 normal_due pagination to exclude waiting/stock_secured cases before LIMIT, preventing normal-renewal starvation.
50
-
51
- - Repair uninstalled N2 donor no-op truth for native bundle/resize, plan, package, add-on and same-UTC-day slide commands before repricing: preserve locked prices after catalogue changes, writing only the command receipt, with no quote, event or version increment. Native resize compares lines/cadence; portion mode/factor remain host-owned without native storage. Predicate-removal mutants cover every mapped donor action; apply stays unchanged.
52
-
53
- - Audit pending M10 donor change and no-op semantics together. N2 plan edits
54
- apply requested core lines; new add-ons normalize quantity, preserve cadence
55
- and compare UUIDs by value. N3 preserves paused waits, filters eligible recovery
56
- before LIMIT, binds frozen reads to the current active schedule, reports free
57
- stock separately from own holds, and ignores closed/unpaid realization notices.
58
- Real PostgreSQL tables cover applied state, no-op/refusal/replay and rolled-back
59
- assignment mutants. Installed rails and N2 apply remain unchanged; channel
60
- exposure/admission parity stays outside the frozen stock-seam claim.
61
-
62
- - Close the 0.24.0 known limitation that managed dunning exhaustion still pauses active subscriptions.
63
- - Land the reviewed managed M1/M2 prefix: refunds preserve subscription lifecycle and paid history; exhausted dunning stays open with NULL retry and active service until authorized same-cycle repair.
64
- - Folded scope E-gate-replay-loop-landed-untested: retain the existing interleaving-aware catalog replay and add the Docker-free landed N1/M1/M2 witness.
65
- - Folded scope D-earlier-pin-digest-unplanted: prove CI and release refuse changed earlier M1 bytes beneath landed M2.
66
-
67
- Migration notes: Apply M1 then M2. Existing paused, expired and refund-cancelled history is not rewritten or reactivated. The existing first-cycle refund stock-release guard remains; later refund-evidence parity and stock-wait/winback changes are separate. No runner is activated.
68
-
69
- - Add native N2 command preview/apply stores and a P1 command adapter with atomic future terms, actor/key/actual-command receipts and applied/replayed/noop/refused outcomes; preserve frozen current obligations and existing native callers.
70
- - Type-level flip for dev-preview consumers: `NATIVE_SUBSCRIPTION_CAPABILITIES.genericBundleCommands.supported` and `.commandBoundReceipts.supported` change from `false` to `true`; command results now include `SubscriptionCommandRefusal`.
71
-
72
- Migration: install N1 then N2 through the complete native manifest; preserve receipts on rollback. Accepted future prices use lock_until_edit, proration none. Address mutation and private introductory/graduation policy stay host-owned; native activation continues to require captured payment evidence.
73
-
74
- Migration (C73, temporary limitation): managed `subscription_create_provisional_for_checkout` stamps an explicit timezone literal equal to today's `subscriptions.timezone` column DEFAULT. Adopters changing that DEFAULT must also replace the function until the scheduled follow-up forward follows the DEFAULT; no managed SQL changes here.
75
-
76
- Migration: `SubscriptionCommandPort.apply()` may now return `SubscriptionCommandRefusal` (`outcome: "refused"`), so callers must handle it.
77
-
78
- - Type-level change visible to dev-preview consumers: `RenewalPaymentRail.execute` adds an optional `failure` field for explicit failure evidence.
79
- - A host or driver skips `openCase` after a replayed `applyFailure` receipt only when that rung's case propagation already committed; otherwise recovery must complete propagation. The P8 retry driver must add a replay/case-advanced signal and a zero-delta witness for replay after committed propagation.
80
- - N2 preview follows the supplied core lines for plan-length changes (omitted lines retain stored expansion); new add-ons normalize missing/nonpositive quantity to one, add-on actions preserve cadence, and quantity updates/removals compare variant UUIDs case-insensitively.
81
-
82
- Land the seven reviewed managed stock-wait/ATP and F17 refund-parity forwards.
83
- Managed hosts can use the service-role SQL functions and pgTAP witnesses; the
84
- package declares the SQL surface and keeps TypeScript stock recovery unavailable
85
- because no managed adapter implements the stock-wait/availability ports.
86
-
87
- Migration: apply the complete managed prefix through `20261024185100` before
88
- calling stock-wait or refund-evidence functions. M4 extends M2's active/open
89
- continuity with wait exclusion before LIMIT. M5 makes positive customer
90
- cancellations immediately winback-eligible within 120 days, retaining episode
91
- dedupe, and maps started/resumed notices. F17 accepts cumulative provider snapshots,
92
- emits one refunded event on transition, and preserves M1 refund/lifecycle
93
- independence. Keep captured obligations and receipts on rollback and disable the
94
- host stock-wait driver first. SQL installs no scheduler or payment executor.
95
-
96
- ATP protects active upcoming demand within 14 days plus live provider hard holds.
97
- The exposure hook remains zero; current donor channel admission is deferred.
98
- This is a development-preview SQL surface, not a composed managed TypeScript port
99
- or a claim of advance future-cycle reservations or stable installation support.
100
-
101
- Native stock-wait persistence, frozen discovery and stock-only refusal recovery
102
- now have transaction-bound adapters. The native ATP/new-purchase read protects
103
- hard holds and fixed 14-day soft subscription demand; the renewal allocator uses
104
- the same seam. X restores late-paid released stock once, and Y filters paid and
105
- settled retry obligations before LIMIT. Managed stock wait and runner composition
106
- remain separate; native selection still requires passing real-PostgreSQL proof.
107
-
108
- Migration: install the native N3, ATP seam, allocator, X and Y prefix in filename
109
- order, with their package twins and regenerated selected-catalog-v2 inventory.
110
- Migration: upgrading hosts must grant their native inventory-reserving runtime
111
- role EXECUTE on public.inventory_available_to_promise(text,text,timestamptz,boolean)
112
- and public.inventory_channel_exposure_quantity(text,text), plus SELECT on the
113
- seam's underlying relations as listed in Data and migrations, before using the
114
- updated allocator or N3 stock-wait paths.
115
- `StockWaitStorePort.listCandidates` now returns `StockWaitFrozenCase[]`: discovery
116
- may have no durable case yet. Hosts must retain its frozen snapshot and binding.
117
- Frozen discovery requires the active current schedule; paused current waits remain open.
118
- Deficits separate own reserved units from free ATP and subtract both for missing
119
- units. Closed or pending-payment resume callbacks return null without writes; paid
120
- fulfillment-pending orders can complete realization admission.
121
- No advance reservation, physical coverage guarantee or one-time checkout writer
122
- is introduced. No pause, payment execution or parcel-arrival fact is added.
123
- Uncaptured stock refusals rotate on the operation selection timestamp even when
124
- missing or stale stock prevents case creation, allowing replenished work through
125
- a bounded candidate page.
126
-
127
- M10 P6 + P8: composed subscriptions (development preview)
128
-
129
- Migration: Additive `./subscriptions` facades are `createSubscriptionServices`, `createSubscriptionCommandExamples`, `createSubscriptionLifecycleMessages` and `subscriptionLifecycleTemplate`; hosts explicitly supply readiness, execution, commands and M04 delivery. No factory activates serving work. `SubscriptionLifecycleFact` is exported from this entry; `subscriptionLifecycleTemplate(kind, retryAttempt?)` preserves the installed payment-failure rungs (1, 2, otherwise 3). `runRenewalBatchRows` exposes the existing per-row error-result isolation for composed hosts.
130
- Migration: Additive `./composition` entry `createSubscriptionContribution` describes exactly one selected subscription schedule; off supplies none. Hosts bind its callable to their existing population lease and observe the complete installed schema.
131
- Migration: `createPostgresRetryStore` adds `failureProgress(operationId,key)`, returning receipt replay and committed case progression. The native retry driver completes interrupted propagation and skips already advanced cases; existing applyFailure/openCase signatures remain unchanged.
132
-
133
- The inert native reference binding composes mandatory G23, dunning and stock wait.
134
- Captured alignment cases retain authority under off. Prepared attempts reconcile
135
- without re-execution; ordinary retries bind the frozen mandate and logical cycle.
136
- M04 owns delivery; M12 owns aggregation. No SQL asset, serving swap, release or
137
- managed TypeScript recovery is introduced. Native multi-cycle prepaid and M07
138
- prepared-attempt-store capabilities retain their named unsupported boundaries.
139
-
140
- ## [0.24.0]
141
-
142
- - Publishable on the npm `latest` dist-tag as `0.24.0`, from tag
143
- `openlup-platform-v0.24.0`.
144
-
145
- - Require Zod `^4.6.6` to fix GHSA-mrhx-c7xc-m3w5; oversized constrained
146
- request collections fail before element validation accumulates errors.
147
- - Preserve the observation adapter's accepted minute-precision occurrence timestamps and raw
148
- idempotency-key bytes with the updated validator; impossible dates still fail.
149
-
150
- - Add the optional `runFulfillmentDispatchWorker.shadowCommandFingerprint` callback for a pure, local adopter command hash in shadow mode. Without it, shadow evidence still hashes the same `JSON.stringify(request)` bytes with SHA-256. The callback must return a lowercase 64-hex SHA-256 digest of the adopter's canonical command bytes, never command contents, credentials or contact data. The package accepts only strings matching `/^[a-f0-9]{64}$/`; invalid output or a throw returns a typed refusal with closed cause `adopter_fingerprint_invalid` or `adopter_fingerprint_failed`, without raw output, exception text or claim/attempt/evidence writes. Stage/live never invoke the callback. The fingerprint is used across shadow claim/readback/attempt, including mapped-attempt replay; shadow never begins, and live preparation must produce the same identity; shadow still performs no provider preparation, credentials lookup or POST.
151
- - Preserve optional boolean `submissionAttempted` and `responseBodyRead` facts on typed dispatch errors and finalize evidence. `submissionAttempted: false` proves no provider submission was attempted; absence is unknown. `responseBodyRead: true` means the response body was read, including empty or malformed JSON; `false` means reading failed, and absence means there is no body-read evidence. Credential/request-construction failures include explicit non-submission proof; command validation/rebuild retains its closed `not_dispatchable` refusal. No raw body, exception prose or credentials enter these facts; durable projections admit only actual booleans.
152
-
153
- Migration: existing callers need no changes. `shadowDispatchEvidence(request)` becomes `shadowDispatchEvidence(request, commandFingerprint?)`; omitting the new optional argument keeps the same evidence bytes and hash. These facts allow adopter classification without inferring uncertainty from retryability. Package classification remains unchanged: definitive rejections (including an unreadable HTTP 400 body) are `not_dispatched`; ambiguous submission and unreadable successful acknowledgements are `unknown`. No release, default binding, route, schedule or activation is added.
154
-
155
- - Add inert native unsupported invoicing ports and runner-independent offline adapter conformance for exact recovery, parent identity, scoped absence, declared host capabilities and safe evidence.
156
- - Document the invoicing design and host boundaries without installing workers, stores, fiscal providers, routes or activation.
157
-
158
- - Extract invoice issue sequencing, snapshot/canonical line verification, unchanged allocation, payment evidence and handoff helpers into the existing invoicing entry; retain host payloads, keys, seller/tax policy and routing.
159
- - Migration: compatibility callbacks preserve existing RPC/provider request bytes, issue fences and handoff descriptors. No native store, D7/O2 behavior, default provider, executor registration or activation is added.
160
-
161
- - Add correction and reversal workers to the experimental invoicing entry, preserving durable correction identity, recovery, host event/key semantics and fenced outcomes. The reference host requires an explicit conforming correction bridge; its legacy vendor copy stays unchanged and unselected.
162
- - Migration: introduce the two pinned managed v2/compatibility forwards with versioned adapter and pgTAP callers. Unkeyed attempted legacy corrections remain visibly unresolved for provider reconciliation. Preview correction references use correctionRef. Native forwards and runtime activation remain separate.
163
- - See the [M09 forward owner](../../docs/platform/DATA_AND_MIGRATIONS.md#m09-invoicing-forward-design-and-control-approval) for sync-first settlement and permanent-failure parking.
164
- - Registered limit: multi-reason / late-issue compensation can yield more than one full correction per invoice, as the incumbent does today.
165
-
166
- - Add an experimental structural-executor native invoice store, a create/readback issue binding, separate native/managed migration descriptors, and six byte-identical sparse SQL assets. Read-only bounded discovery exposes duty/order IDs before facts are installed. Missing host fiscal facts refuse before writes; local-only document construction retains its previous behavior. Native fresh non-ready preflights settle before dispatch; stale preflight/finalizer results write no failure.
167
- - Migration: append the three reviewed native duty/effect/payment forwards at positions 77–79 after the unchanged 160000/165000 prefix. Install the complete catalogue. Native child-document and managed base-row corrections have distinct descriptors. Seller revision and activation remain separate.
168
-
169
- ### Independent native invoicing duties
170
-
171
- Experimental invoicing adds `collectInvoiceDuties` and
172
- `createIndependentInvoiceDutyBinding` for explicitly invoked, separately committed
173
- duty collection. Native fulfillment no longer waits for accounting readiness or
174
- invoice requests. Managed dispatch behavior stays unchanged.
175
-
176
- Install the full native catalogue, including 190000/191000 before the exact
177
- reviewed 192000 payment-decoupling forward. Captured settlement and dunning
178
- recovery survive invoice capture failure; retained paid/handoff facts support
179
- later repair. New unlinked payment events retain `accountingRequested=false`,
180
- including after independent issue; historical linked events retain their readback.
181
- Use owed-duty readback for invoice progress. No payment
182
- export, provider activation, scheduler registration or fiscal default is added.
183
-
184
- - Extract invoice delivery, PDF validation, accepted-document synchronization, payout item recording and document-history/read helpers into the existing invoicing entry; bind the reference host facades through explicit callbacks.
185
- - Migration: F8 retains A2 payout transport and exact settlement keys; the legacy batch/payment importer preserves donor calls and aggregate results, while package receipt reuse across item scopes is an identity conflict with continued processing and no extra write; distinct recorded receipts require an item-capable host recorder/resolver. F11 retains M04 content, recipient, locale, transport and uncertainty. F9 bounds reference consumers; F12 leaves runbooks and customer correction intent host-owned. Native delivery uses an optional host envelope projection over P4’s store; job store mode binds fenced terminal/backoff outcomes (whole seconds clamp 60..86400, absent/invalid 900, retryable:false parks); callback mode requires terminalFailure before claim; native history requires a safe owned projection. PDF downloads now refuse invalid bytes; the reference panel displays closed diagnostic codes without free-text provider errors. No SQL, activation, executor or fiscal-policy change.
186
-
187
- Explicit invoicing composition and first-claim seller revision
188
-
189
- PART A: `createInvoiceServices`, `InvoiceServices` and `createInvoiceContribution`
190
- use the existing `/invoicing` entry. Host selection is default-off; readiness
191
- precedes factories and claim. Native helpers compose the real P4/P5 store,
192
- collection, delivery, sync and read-model implementations. Host-specific factories
193
- retain auth, configuration, transport/query projection and the existing executor,
194
- registry and lease. Targeted module runs refuse before leasing.
195
-
196
- PART B — Migration: native 195000 and managed 195100 are forward-only,
197
- byte-identical introductions of the approved CTL-M09-4 fixtures. Eligible
198
- obligations freeze the seller at their first-ever durable claim, independently
199
- for corrections; retries retain it. Previously claimed legacy obligations keep
200
- execution-time fallback. Issued documents and installed buyer/line facts are
201
- unchanged. Native reversals use the correction request branch; managed order
202
- reversals preserve incumbent results through the seller request wrapper.
203
- Unknown/unsupported seller reads and order-scoped managed corrections refuse
204
- before claim. SQL replay conflicts surface as typed identity conflicts.
205
-
206
- ### Selection and installation boundary
207
-
208
- Invoicing remains EXPERIMENTAL and DEFAULT-OFF. The issue/correction/reversal,
209
- durable duty collection, native store, delivery/document/payout sync, safe history
210
- and first-claim seller revision helpers are available for explicit host composition.
211
- Select a provider and capability, bind host ports and establish readiness before
212
- factories or claim; the structural contribution registers nothing itself. Fiscal
213
- policy, ownership/authentication, M04 transport, artifact/history projections,
214
- execution leases and route/job registration remain host responsibilities. No live
215
- provider, fiscal acceptance or inbox-delivery evidence is established. Adopters
216
- must not activate unselected or unready invoicing, or infer activation from SQL.
217
-
218
- M10 subscription renewal/retry stages remain EXPERIMENTAL, INCOMPLETE and
219
- DEFAULT-OFF, not for adopter activation: contracts, native stores/executor and
220
- N1 SQL are present, but runner activation and the G23/N1 host composition,
221
- correlation, authorization and replay obligations remain pending. Native delivery
222
- alignment must remain off or shadow until the host composes the renewal runner
223
- with its G23 admission decorator.
224
-
225
- Migration: upgrade core, outbox and platform together from `0.23.0` to `0.24.0`
226
- for exact internal peers. Install the complete canonical native migration chain
227
- through position 80 (`20261022195000_invoicing_seller_revision.sql`), including
228
- invoicing positions 77/78/79 (`190000`/`191000`/`192000`); P5 adds no SQL and P7
229
- adds position 80. Sparse package projections are not an installation chain.
230
- Managed installations use their own ordered forwards, including correction
231
- `193000`/`193100` and seller `195100`; managed descriptor paths are catalogue
232
- references, not files installed by the npm tarball. Preserve first-claim seller
233
- snapshots and legacy fallback; there is no retroactive backfill or reversal of
234
- forward SQL on application rollback. Retain the `0.23.0` shadow/observation retry
235
- and legacy stock-fingerprint migration precautions when upgrading older rows.
236
-
237
- ### Limits closed by this set
238
-
239
- - The earlier invoicing contract-only/no-SQL/no-worker surface limit is closed:
240
- P1b–P7 introduce explicit services, native store and helpers, with CTL-M09-1–4
241
- reviewed forwards at native positions 77–80 and the managed correction/seller
242
- forwards; see the [design boundary](../../docs/platform/plans/oss-m09-invoicing.md#p7-composition-and-seller-revision).
243
- Default activation and live fiscal/provider acceptance remain unclaimed.
244
- - M08 stock-evidence replay/reopen was already closed in `0.23.0` by position 76;
245
- this set does not close its legacy fingerprint conflict or other M08 gaps.
246
-
247
- ### Known limitations
248
-
249
- - Managed dunning exhaustion still pauses active subscriptions; retaining active status needs a managed forward. Native N1 lands the bounded retry/failure repair, with the host obligations below still pending.
250
- - D8-1: native advisory v2 promo-code candidates/rejection details unavailable.
251
- - D8-2: native mounted v2 issue/honor/fallback unavailable.
252
- - D8-3: native acquisition-only mounted issuance/honor unavailable.
253
- - D8-4: full native/managed eligibility equivalence unavailable.
254
- - Bundle-1: independent DB human-only actor-kind enforcement absent natively; first in the native-backend parity round.
255
- - Bundle-2: managed-equivalent actor-kind/email history absent natively.
256
- - Bundle-3 closes injected-reader M05 mounted admin/feed readback only. Native new-purchase stock read absent despite P5a installed-store proof; deferred second after bundle-1 (owner 2026-10-21); readiness refuses.
257
- - Bundle-4: incumbent real-PostgreSQL contention only; no exactly-once guarantee.
258
- - Managed schema/pgTAP retain `44.404`; removal needs owner decision/forward; reference composition supplies it to app code.
259
- - A1 offline only; account/hosted-time/owner TEST evidence unclaimed; `communications/klaviyo` verification-pending.
260
- - M05 omitted opt-ins preserve defaults/outputs/read order/schedules/refusals/acceptance-token bytes/SQL.
261
- - Native inventory adjustment unavailable; address writes refuse readiness. Flat-rate save needs selected port/Core readiness/applied-seed observation.
262
- - Native shipping audit unavailable; handler swallows best-effort audit failure.
263
- - Native flat-rate integer bounds (0 through host maximum; reference 100,000 minor units) use request schema, not DB CHECK.
264
- - Managed ATP/forecast/dated-supply/pagination readback unproved/pending M06.
265
- - Managed two-session locks/concurrency/uncovered compensation unproved/pending M06.
266
- - Managed exact-prefix upgrade/ledger unproved/pending M06.
267
- - Managed address idempotency/conflict/readback unproved/pending M06.
268
- - Managed successful flat-rate read/save unproved/pending host authority.
269
- - M06 stock-wait lifecycle/durable timing/staging controls retain C5/C6; busy/try-gate, continuity/flag/TTL transfers are dispositions, not PASS.
270
- - Shipping national-registry fields/locale-specific `canonicalAddressKey` fold await M16 host market pack/key migration; reference shipping copy stays locale-specific until M16.
271
- - Native durable prepared storage, method setup, absence reopen and cumulative refunds unavailable; no production installation parity claimed.
272
- - Typed refusal-envelope forwarding unavailable (`failureReason` only); reusable registration needs host ownership resolution.
273
- - Incomplete chargebacks stay refunds/unapplied: reclassification bypasses evidence validation into dispute apply; limited operator recovery.
274
- - Audit compatibility still detects `chargeId`; refund operation identity/original money supply no typed charge identity.
275
- - M07 follow-up: repair poll can clear host redirect; post-timeout verify never restarts polling; unlocalized poller; fixture builds/never calls handler.
276
- - M07 follow-up: reference status route wrong-rail witness.
277
- - M07 follow-up: explicit reference-route refusal for unsupported method setup.
278
- - M07 follow-up: deployment-neutral disabled-verify reason.
279
- - M07 follow-up: reference card normalizer missing-amount path; package settling evidence already requires positive money.
280
-
281
- - Native delivery alignment stays off or shadow until a host composes the native automatic-renewal runner with the G23 renewal admission decorator. The decorator alone neither composes nor activates the runner.
282
- - The core fulfillment status map carries localized adopter labels; replace them with host-injected labels or internationalization keys at the host presentation boundary.
283
- - The warehouse adapter example is opt-in and has offline conformance only; no provider-account proof or activation is established. Exact absence, label create/void and cancellation remain unsupported.
284
- - After an alignment extension, a deferred renewal operation at the old schedule remains claimed with no reader or reservation effect. Changed terms snapshots conflict under the existing snapshot-conflict rules.
285
-
286
- Native parity remains host-owned at these seams. Missing native bindings use the shared `FULFILLMENT_NATIVE_UNSUPPORTED` refusal; no partial write or parity claim is implied.
287
-
288
- | Amendment | Host-owned seam and native boundary |
289
- | --- | --- |
290
- | G18 | Replacement creation and atomic eligibility/replay receipts; native replacement callback refuses. |
291
- | G19 | Operator mutations, actor attribution and replay receipts; native mutation callbacks refuse. |
292
- | G20 | Customer alignment rows; native reader refuses, while the pure delay projection remains callable. |
293
- | G21 | Commerce list/detail and shipments overview; native read callbacks refuse. |
294
- | G22 | Authoritative preparation edits, authorization and replay receipts; missing preparation binding refuses before dispatch, after disabled/selection/readiness checks. |
295
-
296
- - M08 parity D2 KEEP-GAP: native dispatch finish still loses rejected/unknown error detail.
297
- - M08 parity KEEP-GAP: immutable stock snapshot/alert evidence storage is absent; cursor JSON is overwritten. Hosts retain referenced evidence.
298
- - Stock-evidence replay/reopen is CLOSED by native position 76; legacy `0.22.0` alert fingerprints still conflict with `23505`, including after resolution.
299
-
300
- ### Invoicing registered limitations
301
-
302
- These are notes carried from the landed design, not fixes in this preparation.
303
-
304
- - M07 `payment_truth_readback` still joins `accounting_documents`: operator
305
- ACCESS EXCLUSIVE DDL or denied ACL can block/refuse the call. New unlinked
306
- payment events remain `accountingRequested=false` after independent issue;
307
- use owed-duty readback for invoice progress (PR #334).
308
- - Managed multi-reason and late-issue compensation can create more than one full
309
- correction per invoice. A later finalizer can be fenced `claim_inactive`, leaving
310
- its row `processing`; failed/pending rows on already-corrected parents may never
311
- be reclaimed. Reconcile provider identity/evidence, including unresolved attempted
312
- legacy corrections. Broader reversal/manual arbitration needs a separately
313
- designed replacement forward (PR #329, #330, #348).
314
- - An in-flight issue can still compensate outside the seller wrapper with
315
- `legacy_fallback`; latest-parent reselection retains incumbent behavior.
316
- Managed keys are scoped to invoice/provider/reason, and delegated void stores
317
- no key; native cross-order reuse refuses. Pre-wrapper native reversal-key
318
- retries can conflict after wrapper evidence is added (PR #346, #348).
319
- - Managed paid/handoff contention (`55P03`) is a visible retryable no-effect
320
- refusal with no automatic adapter retry. Fail-soft dispatch can finish without
321
- an invoice request; durable recreation can require operator recovery and delayed
322
- shipped-without-invoice monitoring (PR #348).
323
- - A bad host fiscal revision can refuse an entire scoped/provider batch. A null
324
- payment `providerRef` falls back to the fiscal provider: hosts must supply explicit
325
- payment identity. A failing `store.fail` aborts remaining leased work; retain
326
- lease recovery and host retry handling (PR #334).
327
- - Reversed-duty fact installation can still report owed: read authoritative
328
- reversal/duty evidence, never treat that answer as permission to issue.
329
- Unsupported reversal and parked document/request residues remain visible and
330
- unclaimable; later fact installation/reversal retry can change their diagnostics
331
- (PR #332, #334; design phase obligations).
332
- - Native corrections ride the issue batch; a separate correction operation without
333
- a host factory refuses `host_binding_required`. Unknown native seller selection
334
- currently maps to non-retryable unsupported; hosts must handle recovery explicitly
335
- (PR #348).
336
- - Delivery visibility must exceed transport timeout. Fenced settlement, database
337
- failure or lease expiry can abort a batch and leave unsent leased rows uncertain.
338
- Retryable/unsupported transport diagnostics may project as `retryable`; counters
339
- omit projection failures/parked mismatches, so inspect durable status/error
340
- evidence. Malformed projections and permanently invalid PDFs can retry without
341
- an attempt cap (PR #332, #344).
342
- - Reused settlement-receipt detection continues within one call only; it does not
343
- detect another item's reuse in a later run. Legacy host aggregates expose item
344
- conflicts through count differences; distinct receipts require an item-capable
345
- recorder/resolver (PR #344).
346
- - Hosts retain accepted-document observation polling and safe history composition.
347
- `resolveDownload` must bind the document to the authorized order; the package
348
- ticket check compares `documentRef`. Opaque-reference filtering covers its listed
349
- schemes only (PR #344).
350
- - Closed diagnostic policy reduces managed message-only/non-allowlisted errors to
351
- `unknown`; an empty/non-string earlier `code` can hide a later closed code. The
352
- separate OMS projection retains redacted free text. Missing-order cleanup can
353
- log error rather than warn with the same refused/discarded outcome (PR #344, #348).
354
- - PDF content-type normalization retains OpenLup behavior; signature checks are
355
- stricter than donor ASCII decoding. `invoicePdfFilename` falls back to English
356
- `invoice`; supply host captions (PR #344).