@openlup/platform 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (458) hide show
  1. package/CHANGELOG.md +272 -278
  2. package/README.md +195 -6
  3. package/dist/composition/composeBundle.d.ts +13 -0
  4. package/dist/composition/composeBundle.js +4 -0
  5. package/dist/composition/fulfillmentContribution.d.ts +21 -0
  6. package/dist/composition/fulfillmentContribution.js +19 -0
  7. package/dist/composition/index.d.ts +1 -0
  8. package/dist/composition/index.js +2 -0
  9. package/dist/fulfillment/adapterConformance.d.ts +3 -0
  10. package/dist/fulfillment/adapterConformance.js +223 -0
  11. package/dist/fulfillment/bindings.d.ts +3 -0
  12. package/dist/fulfillment/bindings.js +29 -0
  13. package/dist/fulfillment/commerceFulfillmentHandlers.d.ts +29 -0
  14. package/dist/fulfillment/commerceFulfillmentHandlers.js +184 -0
  15. package/dist/fulfillment/commerceFulfillmentReadModel.d.ts +86 -0
  16. package/dist/fulfillment/commerceFulfillmentReadModel.js +131 -0
  17. package/dist/fulfillment/contracts/alignment.d.ts +25 -0
  18. package/dist/fulfillment/contracts/alignment.js +1 -0
  19. package/dist/fulfillment/contracts/bindings.d.ts +51 -0
  20. package/dist/fulfillment/contracts/bindings.js +1 -0
  21. package/dist/fulfillment/contracts/capabilities.d.ts +29 -0
  22. package/dist/fulfillment/contracts/capabilities.js +1 -0
  23. package/dist/fulfillment/contracts/conformance.d.ts +93 -0
  24. package/dist/fulfillment/contracts/conformance.js +1 -0
  25. package/dist/fulfillment/contracts/customerAlignment.d.ts +6 -0
  26. package/dist/fulfillment/contracts/customerAlignment.js +1 -0
  27. package/dist/fulfillment/contracts/dispatch.d.ts +105 -0
  28. package/dist/fulfillment/contracts/dispatch.js +1 -0
  29. package/dist/fulfillment/contracts/index.d.ts +18 -0
  30. package/dist/fulfillment/contracts/index.js +1 -0
  31. package/dist/fulfillment/contracts/label.d.ts +35 -0
  32. package/dist/fulfillment/contracts/label.js +1 -0
  33. package/dist/fulfillment/contracts/nativeUnsupported.d.ts +6 -0
  34. package/dist/fulfillment/contracts/nativeUnsupported.js +1 -0
  35. package/dist/fulfillment/contracts/observation.d.ts +52 -0
  36. package/dist/fulfillment/contracts/observation.js +1 -0
  37. package/dist/fulfillment/contracts/operator.d.ts +64 -0
  38. package/dist/fulfillment/contracts/operator.js +1 -0
  39. package/dist/fulfillment/contracts/read.d.ts +110 -0
  40. package/dist/fulfillment/contracts/read.js +1 -0
  41. package/dist/fulfillment/contracts/readback.d.ts +38 -0
  42. package/dist/fulfillment/contracts/readback.js +1 -0
  43. package/dist/fulfillment/contracts/replacement.d.ts +34 -0
  44. package/dist/fulfillment/contracts/replacement.js +1 -0
  45. package/dist/fulfillment/contracts/store.d.ts +86 -0
  46. package/dist/fulfillment/contracts/store.js +1 -0
  47. package/dist/fulfillment/contracts/sync.d.ts +170 -0
  48. package/dist/fulfillment/contracts/sync.js +1 -0
  49. package/dist/fulfillment/currentFulfillmentParcel.d.ts +2 -0
  50. package/dist/fulfillment/currentFulfillmentParcel.js +1 -0
  51. package/dist/fulfillment/delayReadModel.d.ts +11 -0
  52. package/dist/fulfillment/delayReadModel.js +45 -0
  53. package/dist/fulfillment/deliveryAlignmentReadModel.d.ts +4 -0
  54. package/dist/fulfillment/deliveryAlignmentReadModel.js +12 -0
  55. package/dist/fulfillment/dispatchProjection.d.ts +7 -0
  56. package/dist/fulfillment/dispatchProjection.js +18 -0
  57. package/dist/fulfillment/fulfillmentObservationEffects.d.ts +66 -0
  58. package/dist/fulfillment/fulfillmentObservationEffects.js +36 -0
  59. package/dist/fulfillment/handlerSchemas.d.ts +647 -0
  60. package/dist/fulfillment/handlerSchemas.js +213 -0
  61. package/dist/fulfillment/handlerSupport.d.ts +33 -0
  62. package/dist/fulfillment/handlerSupport.js +25 -0
  63. package/dist/fulfillment/index.d.ts +37 -0
  64. package/dist/fulfillment/index.js +37 -0
  65. package/dist/fulfillment/labelLifecycle.d.ts +24 -0
  66. package/dist/fulfillment/labelLifecycle.js +9 -0
  67. package/dist/fulfillment/lowStockEvidenceHandler.d.ts +36 -0
  68. package/dist/fulfillment/lowStockEvidenceHandler.js +46 -0
  69. package/dist/fulfillment/migrations.d.ts +27 -0
  70. package/dist/fulfillment/migrations.js +8 -0
  71. package/dist/fulfillment/nativeUnsupported.d.ts +10 -0
  72. package/dist/fulfillment/nativeUnsupported.js +18 -0
  73. package/dist/fulfillment/normalizedFulfillmentFacts.d.ts +2 -0
  74. package/dist/fulfillment/normalizedFulfillmentFacts.js +1 -0
  75. package/dist/fulfillment/observationProjection.d.ts +11 -0
  76. package/dist/fulfillment/observationProjection.js +37 -0
  77. package/dist/fulfillment/omnipack/capabilities.d.ts +3 -0
  78. package/dist/fulfillment/omnipack/capabilities.js +16 -0
  79. package/dist/fulfillment/omnipack/client.d.ts +37 -0
  80. package/dist/fulfillment/omnipack/client.js +162 -0
  81. package/dist/fulfillment/omnipack/index.d.ts +52 -0
  82. package/dist/fulfillment/omnipack/index.js +349 -0
  83. package/dist/fulfillment/omnipack/mappers.d.ts +73 -0
  84. package/dist/fulfillment/omnipack/mappers.js +177 -0
  85. package/dist/fulfillment/omnipack/observation.d.ts +21 -0
  86. package/dist/fulfillment/omnipack/observation.js +57 -0
  87. package/dist/fulfillment/omnipack/omnipackDispatchPayload.d.ts +36 -0
  88. package/dist/fulfillment/omnipack/omnipackDispatchPayload.js +63 -0
  89. package/dist/fulfillment/omnipack/omnipackOutboundOrderPayload.d.ts +83 -0
  90. package/dist/fulfillment/omnipack/omnipackOutboundOrderPayload.js +113 -0
  91. package/dist/fulfillment/omnipack/omnipackProductPackPayload.d.ts +11 -0
  92. package/dist/fulfillment/omnipack/omnipackProductPackPayload.js +38 -0
  93. package/dist/fulfillment/omnipack/omnipackProductPayload.d.ts +18 -0
  94. package/dist/fulfillment/omnipack/omnipackProductPayload.js +51 -0
  95. package/dist/fulfillment/omnipack/omnipackReconciliationPayload.d.ts +1 -0
  96. package/dist/fulfillment/omnipack/omnipackReconciliationPayload.js +3 -0
  97. package/dist/fulfillment/omnipack/omnipackStatusVocabulary.d.ts +4 -0
  98. package/dist/fulfillment/omnipack/omnipackStatusVocabulary.js +87 -0
  99. package/dist/fulfillment/omnipack/omnipackWebhookPayload.d.ts +9 -0
  100. package/dist/fulfillment/omnipack/omnipackWebhookPayload.js +76 -0
  101. package/dist/fulfillment/omnipack/productSyncMappers.d.ts +18 -0
  102. package/dist/fulfillment/omnipack/productSyncMappers.js +43 -0
  103. package/dist/fulfillment/omnipack/providerError.d.ts +25 -0
  104. package/dist/fulfillment/omnipack/providerError.js +47 -0
  105. package/dist/fulfillment/omnipack/trackingReferences.d.ts +16 -0
  106. package/dist/fulfillment/omnipack/trackingReferences.js +52 -0
  107. package/dist/fulfillment/paidFulfillmentRecovery.d.ts +67 -0
  108. package/dist/fulfillment/paidFulfillmentRecovery.js +154 -0
  109. package/dist/fulfillment/paidHandoff.d.ts +27 -0
  110. package/dist/fulfillment/paidHandoff.js +86 -0
  111. package/dist/fulfillment/paidHandoffPorts.d.ts +24 -0
  112. package/dist/fulfillment/paidHandoffPorts.js +3 -0
  113. package/dist/fulfillment/postgresDeliveryAlignment.d.ts +4 -0
  114. package/dist/fulfillment/postgresDeliveryAlignment.js +12 -0
  115. package/dist/fulfillment/postgresDispatchStore.d.ts +16 -0
  116. package/dist/fulfillment/postgresDispatchStore.js +44 -0
  117. package/dist/fulfillment/postgresEvidenceReadPort.d.ts +25 -0
  118. package/dist/fulfillment/postgresEvidenceReadPort.js +45 -0
  119. package/dist/fulfillment/postgresPaidFulfillmentRecovery.d.ts +25 -0
  120. package/dist/fulfillment/postgresPaidFulfillmentRecovery.js +26 -0
  121. package/dist/fulfillment/postgresPaidHandoffStore.d.ts +4 -0
  122. package/dist/fulfillment/postgresPaidHandoffStore.js +10 -0
  123. package/dist/fulfillment/postgresShipmentSpine.d.ts +63 -0
  124. package/dist/fulfillment/postgresShipmentSpine.js +232 -0
  125. package/dist/fulfillment/postgresStockSyncPort.d.ts +8 -0
  126. package/dist/fulfillment/postgresStockSyncPort.js +63 -0
  127. package/dist/fulfillment/productReconciliationEvidenceHandler.d.ts +36 -0
  128. package/dist/fulfillment/productReconciliationEvidenceHandler.js +50 -0
  129. package/dist/fulfillment/providerCapabilities.d.ts +9 -0
  130. package/dist/fulfillment/providerCapabilities.js +17 -0
  131. package/dist/fulfillment/providerCommandLedger.d.ts +143 -0
  132. package/dist/fulfillment/providerCommandLedger.js +14 -0
  133. package/dist/fulfillment/providerDispatchAcceptance.d.ts +26 -0
  134. package/dist/fulfillment/providerDispatchAcceptance.js +23 -0
  135. package/dist/fulfillment/providerDispatchError.d.ts +6 -0
  136. package/dist/fulfillment/providerDispatchError.js +5 -0
  137. package/dist/fulfillment/providerDispatchWorker.d.ts +31 -0
  138. package/dist/fulfillment/providerDispatchWorker.js +172 -0
  139. package/dist/fulfillment/providerProductSyncWorker.d.ts +28 -0
  140. package/dist/fulfillment/providerProductSyncWorker.js +122 -0
  141. package/dist/fulfillment/providerReconciliationError.d.ts +9 -0
  142. package/dist/fulfillment/providerReconciliationError.js +17 -0
  143. package/dist/fulfillment/providerReconciliationTerminalSkip.d.ts +2 -0
  144. package/dist/fulfillment/providerReconciliationTerminalSkip.js +6 -0
  145. package/dist/fulfillment/providerReconciliationTimestamp.d.ts +1 -0
  146. package/dist/fulfillment/providerReconciliationTimestamp.js +27 -0
  147. package/dist/fulfillment/providerReconciliationWorker.d.ts +82 -0
  148. package/dist/fulfillment/providerReconciliationWorker.js +151 -0
  149. package/dist/fulfillment/providerStockAvailability.d.ts +13 -0
  150. package/dist/fulfillment/providerStockAvailability.js +51 -0
  151. package/dist/fulfillment/providerStockSyncWorker.d.ts +37 -0
  152. package/dist/fulfillment/providerStockSyncWorker.js +186 -0
  153. package/dist/fulfillment/providerTrackingReferences.d.ts +15 -0
  154. package/dist/fulfillment/providerTrackingReferences.js +23 -0
  155. package/dist/fulfillment/replacementRefusals.d.ts +5 -0
  156. package/dist/fulfillment/replacementRefusals.js +38 -0
  157. package/dist/fulfillment/replacementShipmentHandler.d.ts +5 -0
  158. package/dist/fulfillment/replacementShipmentHandler.js +46 -0
  159. package/dist/fulfillment/schemaCapabilities.d.ts +13 -0
  160. package/dist/fulfillment/schemaCapabilities.js +7 -0
  161. package/dist/fulfillment/shipmentsOverviewHandler.d.ts +16 -0
  162. package/dist/fulfillment/shipmentsOverviewHandler.js +54 -0
  163. package/dist/fulfillment/statusMap.d.ts +2 -0
  164. package/dist/fulfillment/statusMap.js +1 -0
  165. package/dist/fulfillment/trackingProgress.d.ts +1 -0
  166. package/dist/fulfillment/trackingProgress.js +1 -0
  167. package/dist/fulfillment/verifiedIngress.d.ts +52 -0
  168. package/dist/fulfillment/verifiedIngress.js +66 -0
  169. package/dist/payments/adapterConformance.d.ts +8 -0
  170. package/dist/payments/adapterConformance.js +109 -0
  171. package/dist/payments/bindings.d.ts +3 -0
  172. package/dist/payments/bindings.js +17 -0
  173. package/dist/payments/checkoutActivePaymentActionResolver.d.ts +7 -0
  174. package/dist/payments/checkoutActivePaymentActionResolver.js +77 -0
  175. package/dist/payments/checkoutRecoveryPaymentResolver.d.ts +8 -0
  176. package/dist/payments/checkoutRecoveryPaymentResolver.js +87 -0
  177. package/dist/payments/contracts/adapter.d.ts +113 -0
  178. package/dist/payments/contracts/adapter.js +1 -0
  179. package/dist/payments/contracts/conformance.d.ts +155 -0
  180. package/dist/payments/contracts/conformance.js +1 -0
  181. package/dist/payments/contracts/evidence.d.ts +157 -0
  182. package/dist/payments/contracts/evidence.js +1 -0
  183. package/dist/payments/contracts/index.d.ts +10 -0
  184. package/dist/payments/contracts/index.js +1 -0
  185. package/dist/payments/contracts/preparedAttempt.d.ts +69 -0
  186. package/dist/payments/contracts/preparedAttempt.js +1 -0
  187. package/dist/payments/contracts/reconciliation.d.ts +303 -0
  188. package/dist/payments/contracts/reconciliation.js +1 -0
  189. package/dist/payments/contracts/repair.d.ts +92 -0
  190. package/dist/payments/contracts/repair.js +1 -0
  191. package/dist/payments/contracts/truth.d.ts +92 -0
  192. package/dist/payments/contracts/truth.js +1 -0
  193. package/dist/payments/eventConformanceRunner.d.ts +12 -0
  194. package/dist/payments/eventConformanceRunner.js +125 -0
  195. package/dist/payments/index.d.ts +16 -0
  196. package/dist/payments/index.js +16 -0
  197. package/dist/payments/paymentAttemptSilenceWindow.d.ts +10 -0
  198. package/dist/payments/paymentAttemptSilenceWindow.js +19 -0
  199. package/dist/payments/paymentMethodLifecycle.d.ts +11 -0
  200. package/dist/payments/paymentMethodLifecycle.js +37 -0
  201. package/dist/payments/paymentProviderReconciliationAbsenceReopen.d.ts +7 -0
  202. package/dist/payments/paymentProviderReconciliationAbsenceReopen.js +100 -0
  203. package/dist/payments/paymentProviderReconciliationEvidence.d.ts +36 -0
  204. package/dist/payments/paymentProviderReconciliationEvidence.js +91 -0
  205. package/dist/payments/paymentProviderReconciliationWorker.d.ts +4 -0
  206. package/dist/payments/paymentProviderReconciliationWorker.js +245 -0
  207. package/dist/payments/paymentTruth.d.ts +8 -0
  208. package/dist/payments/paymentTruth.js +125 -0
  209. package/dist/payments/paymentVerifyNowHandler.d.ts +27 -0
  210. package/dist/payments/paymentVerifyNowHandler.js +70 -0
  211. package/dist/payments/paymentVerifyNowService.d.ts +23 -0
  212. package/dist/payments/paymentVerifyNowService.js +93 -0
  213. package/dist/payments/paymentWebhookPostProcessing.d.ts +22 -0
  214. package/dist/payments/paymentWebhookPostProcessing.js +15 -0
  215. package/dist/payments/postgresPaymentTruth.d.ts +10 -0
  216. package/dist/payments/postgresPaymentTruth.js +126 -0
  217. package/dist/payments/preparedAttempt.d.ts +6 -0
  218. package/dist/payments/preparedAttempt.js +70 -0
  219. package/dist/payments/preparedAttemptFinalization.d.ts +5 -0
  220. package/dist/payments/preparedAttemptFinalization.js +12 -0
  221. package/dist/payments/schemaCapabilities.d.ts +10 -0
  222. package/dist/payments/schemaCapabilities.js +10 -0
  223. package/dist/payments/sql.d.ts +20 -0
  224. package/dist/payments/sql.js +6 -0
  225. package/dist/payments/stripe/classifyDecline.d.ts +46 -0
  226. package/dist/payments/stripe/classifyDecline.js +58 -0
  227. package/dist/payments/stripe/declineFailureHints.d.ts +46 -0
  228. package/dist/payments/stripe/declineFailureHints.js +87 -0
  229. package/dist/payments/stripe/donorContracts.d.ts +120 -0
  230. package/dist/payments/stripe/donorContracts.js +1 -0
  231. package/dist/payments/stripe/executionDecline.d.ts +53 -0
  232. package/dist/payments/stripe/executionDecline.js +107 -0
  233. package/dist/payments/stripe/index.d.ts +41 -0
  234. package/dist/payments/stripe/index.js +264 -0
  235. package/dist/payments/stripe/intentMapper.d.ts +26 -0
  236. package/dist/payments/stripe/intentMapper.js +51 -0
  237. package/dist/payments/stripe/methodFacts.d.ts +10 -0
  238. package/dist/payments/stripe/methodFacts.js +12 -0
  239. package/dist/payments/stripe/paymentFailureEvidence.d.ts +26 -0
  240. package/dist/payments/stripe/paymentFailureEvidence.js +33 -0
  241. package/dist/payments/stripe/stripeFailureEvidence.d.ts +41 -0
  242. package/dist/payments/stripe/stripeFailureEvidence.js +82 -0
  243. package/dist/payments/stripe/stripeIntentConfirmationEvidence.d.ts +28 -0
  244. package/dist/payments/stripe/stripeIntentConfirmationEvidence.js +32 -0
  245. package/dist/payments/stripe/stripePaymentReconciliationProvider.d.ts +35 -0
  246. package/dist/payments/stripe/stripePaymentReconciliationProvider.js +222 -0
  247. package/dist/payments/stripe/stripeRefundEvidence.d.ts +8 -0
  248. package/dist/payments/stripe/stripeRefundEvidence.js +17 -0
  249. package/dist/payments/stripe/stripeSandboxPaymentExecutionAdapter.d.ts +45 -0
  250. package/dist/payments/stripe/stripeSandboxPaymentExecutionAdapter.js +220 -0
  251. package/dist/payments/stripe/stripeWebhookNormalizer.d.ts +14 -0
  252. package/dist/payments/stripe/stripeWebhookNormalizer.js +243 -0
  253. package/dist/payments/stripe/webhookSignature.d.ts +14 -0
  254. package/dist/payments/stripe/webhookSignature.js +43 -0
  255. package/dist/payments/tpay/blikRecurringMapper.d.ts +37 -0
  256. package/dist/payments/tpay/blikRecurringMapper.js +24 -0
  257. package/dist/payments/tpay/capabilities.d.ts +3 -0
  258. package/dist/payments/tpay/capabilities.js +18 -0
  259. package/dist/payments/tpay/classifyDecline.d.ts +46 -0
  260. package/dist/payments/tpay/classifyDecline.js +58 -0
  261. package/dist/payments/tpay/declineFailureHints.d.ts +72 -0
  262. package/dist/payments/tpay/declineFailureHints.js +37 -0
  263. package/dist/payments/tpay/donorContracts.d.ts +140 -0
  264. package/dist/payments/tpay/donorContracts.js +1 -0
  265. package/dist/payments/tpay/index.d.ts +73 -0
  266. package/dist/payments/tpay/index.js +294 -0
  267. package/dist/payments/tpay/paymentFailureEvidence.d.ts +26 -0
  268. package/dist/payments/tpay/paymentFailureEvidence.js +33 -0
  269. package/dist/payments/tpay/preparedProviderAttempt.d.ts +22 -0
  270. package/dist/payments/tpay/preparedProviderAttempt.js +24 -0
  271. package/dist/payments/tpay/providerAttemptFailureDiagnostic.d.ts +3 -0
  272. package/dist/payments/tpay/providerAttemptFailureDiagnostic.js +95 -0
  273. package/dist/payments/tpay/tpayCreateTransactionInput.d.ts +25 -0
  274. package/dist/payments/tpay/tpayCreateTransactionInput.js +128 -0
  275. package/dist/payments/tpay/tpayDeclineEvidence.d.ts +126 -0
  276. package/dist/payments/tpay/tpayDeclineEvidence.js +177 -0
  277. package/dist/payments/tpay/tpayDispatchFailure.d.ts +60 -0
  278. package/dist/payments/tpay/tpayDispatchFailure.js +121 -0
  279. package/dist/payments/tpay/tpayFailureEvidence.d.ts +20 -0
  280. package/dist/payments/tpay/tpayFailureEvidence.js +61 -0
  281. package/dist/payments/tpay/tpayHttpClient.d.ts +52 -0
  282. package/dist/payments/tpay/tpayHttpClient.js +185 -0
  283. package/dist/payments/tpay/tpayHttpFailure.d.ts +57 -0
  284. package/dist/payments/tpay/tpayHttpFailure.js +143 -0
  285. package/dist/payments/tpay/tpayPaymentExecutionAdapter.d.ts +20 -0
  286. package/dist/payments/tpay/tpayPaymentExecutionAdapter.js +249 -0
  287. package/dist/payments/tpay/tpayPaymentReconciliationProvider.d.ts +5 -0
  288. package/dist/payments/tpay/tpayPaymentReconciliationProvider.js +244 -0
  289. package/dist/payments/tpay/tpayTransactionPayload.d.ts +120 -0
  290. package/dist/payments/tpay/tpayTransactionPayload.js +96 -0
  291. package/dist/payments/tpay/wallClockTime.d.ts +31 -0
  292. package/dist/payments/tpay/wallClockTime.js +57 -0
  293. package/dist/payments/tpay/webhookJwsVerifier.d.ts +17 -0
  294. package/dist/payments/tpay/webhookJwsVerifier.js +51 -0
  295. package/dist/payments/tpay/webhookNormalizer.d.ts +54 -0
  296. package/dist/payments/tpay/webhookNormalizer.js +200 -0
  297. package/dist/payments/verifiedEvidenceProjection.d.ts +12 -0
  298. package/dist/payments/verifiedEvidenceProjection.js +166 -0
  299. package/dist/payments/verifiedIngress.d.ts +119 -0
  300. package/dist/payments/verifiedIngress.js +220 -0
  301. package/package.json +37 -2
  302. package/release-gates.json +105 -3
  303. package/sql/20260808210000_fulfillment_shipment_rail.sql +810 -0
  304. package/sql/20260810180000_payment_settlement_rail.sql +574 -0
  305. package/sql/20260815150000_payment_truth_reconciliation.sql +479 -0
  306. package/sql/20260819150000_fulfillment_shipment_sequence.sql +98 -0
  307. package/sql/20260826100000_late_payment_shifts_the_subscription_cycle.sql +215 -0
  308. package/sql/20261022080000_fulfillment_command_ledger.sql +786 -0
  309. package/sql/20261022090000_fulfillment_delivery_alignment.sql +1106 -0
  310. package/src/composition/composeBundle.ts +13 -0
  311. package/src/composition/fulfillmentContribution.ts +28 -0
  312. package/src/composition/index.ts +2 -0
  313. package/src/fulfillment/adapterConformance.ts +195 -0
  314. package/src/fulfillment/bindings.ts +26 -0
  315. package/src/fulfillment/commerceFulfillmentHandlers.ts +263 -0
  316. package/src/fulfillment/commerceFulfillmentReadModel.ts +257 -0
  317. package/src/fulfillment/contracts/alignment.ts +13 -0
  318. package/src/fulfillment/contracts/bindings.ts +30 -0
  319. package/src/fulfillment/contracts/capabilities.ts +15 -0
  320. package/src/fulfillment/contracts/conformance.ts +61 -0
  321. package/src/fulfillment/contracts/customerAlignment.ts +4 -0
  322. package/src/fulfillment/contracts/dispatch.ts +58 -0
  323. package/src/fulfillment/contracts/index.ts +18 -0
  324. package/src/fulfillment/contracts/label.ts +9 -0
  325. package/src/fulfillment/contracts/nativeUnsupported.ts +6 -0
  326. package/src/fulfillment/contracts/observation.ts +18 -0
  327. package/src/fulfillment/contracts/operator.ts +31 -0
  328. package/src/fulfillment/contracts/read.ts +42 -0
  329. package/src/fulfillment/contracts/readback.ts +11 -0
  330. package/src/fulfillment/contracts/replacement.ts +15 -0
  331. package/src/fulfillment/contracts/store.ts +26 -0
  332. package/src/fulfillment/contracts/sync.ts +61 -0
  333. package/src/fulfillment/currentFulfillmentParcel.ts +2 -0
  334. package/src/fulfillment/delayReadModel.ts +60 -0
  335. package/src/fulfillment/deliveryAlignmentReadModel.ts +15 -0
  336. package/src/fulfillment/dispatchProjection.ts +20 -0
  337. package/src/fulfillment/fulfillmentObservationEffects.ts +86 -0
  338. package/src/fulfillment/handlerSchemas.ts +255 -0
  339. package/src/fulfillment/handlerSupport.ts +25 -0
  340. package/src/fulfillment/index.ts +38 -0
  341. package/src/fulfillment/labelLifecycle.ts +11 -0
  342. package/src/fulfillment/lowStockEvidenceHandler.ts +60 -0
  343. package/src/fulfillment/migrations.ts +8 -0
  344. package/src/fulfillment/nativeUnsupported.ts +23 -0
  345. package/src/fulfillment/normalizedFulfillmentFacts.ts +2 -0
  346. package/src/fulfillment/observationProjection.ts +41 -0
  347. package/src/fulfillment/omnipack/capabilities.ts +18 -0
  348. package/src/fulfillment/omnipack/client.ts +258 -0
  349. package/src/fulfillment/omnipack/index.ts +312 -0
  350. package/src/fulfillment/omnipack/mappers.ts +261 -0
  351. package/src/fulfillment/omnipack/observation.ts +61 -0
  352. package/src/fulfillment/omnipack/omnipackDispatchPayload.ts +93 -0
  353. package/src/fulfillment/omnipack/omnipackOutboundOrderPayload.ts +194 -0
  354. package/src/fulfillment/omnipack/omnipackProductPackPayload.ts +47 -0
  355. package/src/fulfillment/omnipack/omnipackProductPayload.ts +67 -0
  356. package/src/fulfillment/omnipack/omnipackReconciliationPayload.ts +7 -0
  357. package/src/fulfillment/omnipack/omnipackStatusVocabulary.ts +103 -0
  358. package/src/fulfillment/omnipack/omnipackWebhookPayload.ts +73 -0
  359. package/src/fulfillment/omnipack/productSyncMappers.ts +74 -0
  360. package/src/fulfillment/omnipack/providerError.ts +64 -0
  361. package/src/fulfillment/omnipack/trackingReferences.ts +77 -0
  362. package/src/fulfillment/paidFulfillmentRecovery.ts +252 -0
  363. package/src/fulfillment/paidHandoff.ts +122 -0
  364. package/src/fulfillment/paidHandoffPorts.ts +21 -0
  365. package/src/fulfillment/postgresDeliveryAlignment.ts +14 -0
  366. package/src/fulfillment/postgresDispatchStore.ts +55 -0
  367. package/src/fulfillment/postgresEvidenceReadPort.ts +59 -0
  368. package/src/fulfillment/postgresPaidFulfillmentRecovery.ts +29 -0
  369. package/src/fulfillment/postgresPaidHandoffStore.ts +11 -0
  370. package/src/fulfillment/postgresShipmentSpine.ts +321 -0
  371. package/src/fulfillment/postgresStockSyncPort.ts +65 -0
  372. package/src/fulfillment/productReconciliationEvidenceHandler.ts +64 -0
  373. package/src/fulfillment/providerCapabilities.ts +18 -0
  374. package/src/fulfillment/providerCommandLedger.ts +53 -0
  375. package/src/fulfillment/providerDispatchAcceptance.ts +31 -0
  376. package/src/fulfillment/providerDispatchError.ts +7 -0
  377. package/src/fulfillment/providerDispatchWorker.ts +131 -0
  378. package/src/fulfillment/providerProductSyncWorker.ts +154 -0
  379. package/src/fulfillment/providerReconciliationError.ts +20 -0
  380. package/src/fulfillment/providerReconciliationTerminalSkip.ts +8 -0
  381. package/src/fulfillment/providerReconciliationTimestamp.ts +34 -0
  382. package/src/fulfillment/providerReconciliationWorker.ts +150 -0
  383. package/src/fulfillment/providerStockAvailability.ts +60 -0
  384. package/src/fulfillment/providerStockSyncWorker.ts +222 -0
  385. package/src/fulfillment/providerTrackingReferences.ts +31 -0
  386. package/src/fulfillment/replacementRefusals.ts +43 -0
  387. package/src/fulfillment/replacementShipmentHandler.ts +47 -0
  388. package/src/fulfillment/schemaCapabilities.ts +7 -0
  389. package/src/fulfillment/shipmentsOverviewHandler.ts +73 -0
  390. package/src/fulfillment/statusMap.ts +2 -0
  391. package/src/fulfillment/trackingProgress.ts +1 -0
  392. package/src/fulfillment/verifiedIngress.ts +80 -0
  393. package/src/payments/adapterConformance.ts +118 -0
  394. package/src/payments/bindings.ts +17 -0
  395. package/src/payments/checkoutActivePaymentActionResolver.ts +97 -0
  396. package/src/payments/checkoutRecoveryPaymentResolver.ts +108 -0
  397. package/src/payments/contracts/adapter.ts +96 -0
  398. package/src/payments/contracts/conformance.ts +171 -0
  399. package/src/payments/contracts/evidence.ts +142 -0
  400. package/src/payments/contracts/index.ts +54 -0
  401. package/src/payments/contracts/preparedAttempt.ts +86 -0
  402. package/src/payments/contracts/reconciliation.ts +296 -0
  403. package/src/payments/contracts/repair.ts +95 -0
  404. package/src/payments/contracts/truth.ts +108 -0
  405. package/src/payments/eventConformanceRunner.ts +149 -0
  406. package/src/payments/index.ts +21 -0
  407. package/src/payments/paymentAttemptSilenceWindow.ts +26 -0
  408. package/src/payments/paymentMethodLifecycle.ts +50 -0
  409. package/src/payments/paymentProviderReconciliationAbsenceReopen.ts +130 -0
  410. package/src/payments/paymentProviderReconciliationEvidence.ts +117 -0
  411. package/src/payments/paymentProviderReconciliationWorker.ts +291 -0
  412. package/src/payments/paymentTruth.ts +131 -0
  413. package/src/payments/paymentVerifyNowHandler.ts +94 -0
  414. package/src/payments/paymentVerifyNowService.ts +125 -0
  415. package/src/payments/paymentWebhookPostProcessing.ts +36 -0
  416. package/src/payments/postgresPaymentTruth.ts +149 -0
  417. package/src/payments/preparedAttempt.ts +90 -0
  418. package/src/payments/preparedAttemptFinalization.ts +13 -0
  419. package/src/payments/schemaCapabilities.ts +10 -0
  420. package/src/payments/sql.ts +6 -0
  421. package/src/payments/stripe/classifyDecline.ts +62 -0
  422. package/src/payments/stripe/declineFailureHints.ts +89 -0
  423. package/src/payments/stripe/donorContracts.ts +87 -0
  424. package/src/payments/stripe/executionDecline.ts +126 -0
  425. package/src/payments/stripe/index.ts +265 -0
  426. package/src/payments/stripe/intentMapper.ts +58 -0
  427. package/src/payments/stripe/methodFacts.ts +21 -0
  428. package/src/payments/stripe/paymentFailureEvidence.ts +58 -0
  429. package/src/payments/stripe/stripeFailureEvidence.ts +115 -0
  430. package/src/payments/stripe/stripeIntentConfirmationEvidence.ts +34 -0
  431. package/src/payments/stripe/stripePaymentReconciliationProvider.ts +263 -0
  432. package/src/payments/stripe/stripeRefundEvidence.ts +19 -0
  433. package/src/payments/stripe/stripeSandboxPaymentExecutionAdapter.ts +283 -0
  434. package/src/payments/stripe/stripeWebhookNormalizer.ts +277 -0
  435. package/src/payments/stripe/webhookSignature.ts +55 -0
  436. package/src/payments/tpay/blikRecurringMapper.ts +42 -0
  437. package/src/payments/tpay/capabilities.ts +21 -0
  438. package/src/payments/tpay/classifyDecline.ts +62 -0
  439. package/src/payments/tpay/declineFailureHints.ts +90 -0
  440. package/src/payments/tpay/donorContracts.ts +104 -0
  441. package/src/payments/tpay/index.ts +293 -0
  442. package/src/payments/tpay/paymentFailureEvidence.ts +58 -0
  443. package/src/payments/tpay/preparedProviderAttempt.ts +38 -0
  444. package/src/payments/tpay/providerAttemptFailureDiagnostic.ts +99 -0
  445. package/src/payments/tpay/tpayCreateTransactionInput.ts +158 -0
  446. package/src/payments/tpay/tpayDeclineEvidence.ts +233 -0
  447. package/src/payments/tpay/tpayDispatchFailure.ts +186 -0
  448. package/src/payments/tpay/tpayFailureEvidence.ts +75 -0
  449. package/src/payments/tpay/tpayHttpClient.ts +290 -0
  450. package/src/payments/tpay/tpayHttpFailure.ts +186 -0
  451. package/src/payments/tpay/tpayPaymentExecutionAdapter.ts +297 -0
  452. package/src/payments/tpay/tpayPaymentReconciliationProvider.ts +285 -0
  453. package/src/payments/tpay/tpayTransactionPayload.ts +207 -0
  454. package/src/payments/tpay/wallClockTime.ts +57 -0
  455. package/src/payments/tpay/webhookJwsVerifier.ts +82 -0
  456. package/src/payments/tpay/webhookNormalizer.ts +279 -0
  457. package/src/payments/verifiedEvidenceProjection.ts +179 -0
  458. package/src/payments/verifiedIngress.ts +317 -0
@@ -0,0 +1,647 @@
1
+ import { z } from 'zod';
2
+ export declare const COMMERCE_FULFILLMENT_CONTRACT_VERSION = "commerce.fulfillment.v0";
3
+ export declare const COMMERCE_FULFILLMENT_STATUSES: readonly ["created", "packed", "label_pending", "label_created", "handed_over", "in_transit", "delivered", "exception", "cancelled"];
4
+ export declare const COMMERCE_FULFILLMENT_OPERATION_TYPES: readonly ["created", "packed", "provider_attempt_recorded", "label_created", "handed_over", "tracking_event_recorded", "cancelled"];
5
+ export declare const COMMERCE_FULFILLMENT_PROVIDER_ATTEMPT_STATUSES: readonly ["recorded", "succeeded", "failed"];
6
+ export declare const commerceFulfillmentStatusSchema: z.ZodEnum<{
7
+ created: "created";
8
+ exception: "exception";
9
+ delivered: "delivered";
10
+ cancelled: "cancelled";
11
+ packed: "packed";
12
+ in_transit: "in_transit";
13
+ label_pending: "label_pending";
14
+ label_created: "label_created";
15
+ handed_over: "handed_over";
16
+ }>;
17
+ export declare const commerceFulfillmentOperationTypeSchema: z.ZodEnum<{
18
+ created: "created";
19
+ cancelled: "cancelled";
20
+ packed: "packed";
21
+ label_created: "label_created";
22
+ handed_over: "handed_over";
23
+ provider_attempt_recorded: "provider_attempt_recorded";
24
+ tracking_event_recorded: "tracking_event_recorded";
25
+ }>;
26
+ export declare const commerceFulfillmentProviderAttemptStatusSchema: z.ZodEnum<{
27
+ failed: "failed";
28
+ recorded: "recorded";
29
+ succeeded: "succeeded";
30
+ }>;
31
+ export declare const commerceFulfillmentPaymentStatusSchema: z.ZodEnum<{
32
+ expired: "expired";
33
+ created: "created";
34
+ failed: "failed";
35
+ cancelled: "cancelled";
36
+ succeeded: "succeeded";
37
+ refunded: "refunded";
38
+ requires_action: "requires_action";
39
+ processing: "processing";
40
+ partially_refunded: "partially_refunded";
41
+ disputed: "disputed";
42
+ not_started: "not_started";
43
+ }>;
44
+ export declare const commerceFulfillmentInventoryStatusSchema: z.ZodEnum<{
45
+ expired: "expired";
46
+ missing: "missing";
47
+ reserved: "reserved";
48
+ not_checked: "not_checked";
49
+ released: "released";
50
+ consumed: "consumed";
51
+ review_required: "review_required";
52
+ }>;
53
+ export declare const commerceFulfillmentBlockReasonSchema: z.ZodEnum<{
54
+ order_not_paid: "order_not_paid";
55
+ payment_not_succeeded: "payment_not_succeeded";
56
+ subscription_cycle_not_paid: "subscription_cycle_not_paid";
57
+ active_hold: "active_hold";
58
+ missing_shipping_address: "missing_shipping_address";
59
+ inventory_review: "inventory_review";
60
+ risk_review: "risk_review";
61
+ }>;
62
+ export declare const commerceFulfillmentShippingAddressSnapshotSchema: z.ZodObject<{
63
+ addressId: z.ZodGUID;
64
+ clientId: z.ZodGUID;
65
+ label: z.ZodNullable<z.ZodString>;
66
+ line1: z.ZodString;
67
+ line2: z.ZodNullable<z.ZodString>;
68
+ city: z.ZodString;
69
+ postalCode: z.ZodString;
70
+ country: z.ZodString;
71
+ }, z.core.$strict>;
72
+ export declare const commerceFulfillmentLineSchema: z.ZodObject<{
73
+ id: z.ZodNullable<z.ZodGUID>;
74
+ orderItemId: z.ZodGUID;
75
+ skuId: z.ZodGUID;
76
+ sku: z.ZodString;
77
+ title: z.ZodNullable<z.ZodString>;
78
+ quantity: z.ZodNumber;
79
+ inventoryReservationIds: z.ZodArray<z.ZodGUID>;
80
+ productSnapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
81
+ }, z.core.$strict>;
82
+ export declare const commerceFulfillmentPaymentSummarySchema: z.ZodObject<{
83
+ paymentIntentId: z.ZodGUID;
84
+ paymentStatus: z.ZodEnum<{
85
+ expired: "expired";
86
+ created: "created";
87
+ failed: "failed";
88
+ cancelled: "cancelled";
89
+ succeeded: "succeeded";
90
+ refunded: "refunded";
91
+ requires_action: "requires_action";
92
+ processing: "processing";
93
+ partially_refunded: "partially_refunded";
94
+ disputed: "disputed";
95
+ not_started: "not_started";
96
+ }>;
97
+ providerPaymentId: z.ZodNullable<z.ZodString>;
98
+ }, z.core.$strict>;
99
+ export declare const commerceFulfillmentInventorySummarySchema: z.ZodObject<{
100
+ status: z.ZodEnum<{
101
+ expired: "expired";
102
+ missing: "missing";
103
+ reserved: "reserved";
104
+ not_checked: "not_checked";
105
+ released: "released";
106
+ consumed: "consumed";
107
+ review_required: "review_required";
108
+ }>;
109
+ reservationId: z.ZodNullable<z.ZodGUID>;
110
+ reservationStatus: z.ZodNullable<z.ZodEnum<{
111
+ expired: "expired";
112
+ reserved: "reserved";
113
+ released: "released";
114
+ consumed: "consumed";
115
+ }>>;
116
+ expiresAt: z.ZodNullable<z.ZodString>;
117
+ locationId: z.ZodNullable<z.ZodGUID>;
118
+ locationCode: z.ZodNullable<z.ZodString>;
119
+ }, z.core.$strict>;
120
+ export declare const commerceFulfillmentOmsEligibilitySchema: z.ZodObject<{
121
+ allowed: z.ZodBoolean;
122
+ reason: z.ZodNullable<z.ZodEnum<{
123
+ order_not_paid: "order_not_paid";
124
+ payment_not_succeeded: "payment_not_succeeded";
125
+ subscription_cycle_not_paid: "subscription_cycle_not_paid";
126
+ active_hold: "active_hold";
127
+ missing_shipping_address: "missing_shipping_address";
128
+ inventory_review: "inventory_review";
129
+ risk_review: "risk_review";
130
+ }>>;
131
+ }, z.core.$strict>;
132
+ export declare const commerceFulfillmentOperationSchema: z.ZodObject<{
133
+ id: z.ZodGUID;
134
+ type: z.ZodEnum<{
135
+ created: "created";
136
+ cancelled: "cancelled";
137
+ packed: "packed";
138
+ label_created: "label_created";
139
+ handed_over: "handed_over";
140
+ provider_attempt_recorded: "provider_attempt_recorded";
141
+ tracking_event_recorded: "tracking_event_recorded";
142
+ }>;
143
+ occurredAt: z.ZodString;
144
+ actorUserId: z.ZodNullable<z.ZodGUID>;
145
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
146
+ }, z.core.$strict>;
147
+ export declare const commerceFulfillmentOrderSchema: z.ZodObject<{
148
+ id: z.ZodGUID;
149
+ orderId: z.ZodGUID;
150
+ clientId: z.ZodNullable<z.ZodGUID>;
151
+ status: z.ZodEnum<{
152
+ created: "created";
153
+ exception: "exception";
154
+ delivered: "delivered";
155
+ cancelled: "cancelled";
156
+ packed: "packed";
157
+ in_transit: "in_transit";
158
+ label_pending: "label_pending";
159
+ label_created: "label_created";
160
+ handed_over: "handed_over";
161
+ }>;
162
+ providerKind: z.ZodNullable<z.ZodString>;
163
+ providerTrackingId: z.ZodNullable<z.ZodString>;
164
+ shippingAddress: z.ZodObject<{
165
+ addressId: z.ZodGUID;
166
+ clientId: z.ZodGUID;
167
+ label: z.ZodNullable<z.ZodString>;
168
+ line1: z.ZodString;
169
+ line2: z.ZodNullable<z.ZodString>;
170
+ city: z.ZodString;
171
+ postalCode: z.ZodString;
172
+ country: z.ZodString;
173
+ }, z.core.$strict>;
174
+ lines: z.ZodArray<z.ZodObject<{
175
+ id: z.ZodNullable<z.ZodGUID>;
176
+ orderItemId: z.ZodGUID;
177
+ skuId: z.ZodGUID;
178
+ sku: z.ZodString;
179
+ title: z.ZodNullable<z.ZodString>;
180
+ quantity: z.ZodNumber;
181
+ inventoryReservationIds: z.ZodArray<z.ZodGUID>;
182
+ productSnapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
183
+ }, z.core.$strict>>;
184
+ payment: z.ZodObject<{
185
+ paymentIntentId: z.ZodGUID;
186
+ paymentStatus: z.ZodEnum<{
187
+ expired: "expired";
188
+ created: "created";
189
+ failed: "failed";
190
+ cancelled: "cancelled";
191
+ succeeded: "succeeded";
192
+ refunded: "refunded";
193
+ requires_action: "requires_action";
194
+ processing: "processing";
195
+ partially_refunded: "partially_refunded";
196
+ disputed: "disputed";
197
+ not_started: "not_started";
198
+ }>;
199
+ providerPaymentId: z.ZodNullable<z.ZodString>;
200
+ }, z.core.$strict>;
201
+ inventory: z.ZodObject<{
202
+ status: z.ZodEnum<{
203
+ expired: "expired";
204
+ missing: "missing";
205
+ reserved: "reserved";
206
+ not_checked: "not_checked";
207
+ released: "released";
208
+ consumed: "consumed";
209
+ review_required: "review_required";
210
+ }>;
211
+ reservationId: z.ZodNullable<z.ZodGUID>;
212
+ reservationStatus: z.ZodNullable<z.ZodEnum<{
213
+ expired: "expired";
214
+ reserved: "reserved";
215
+ released: "released";
216
+ consumed: "consumed";
217
+ }>>;
218
+ expiresAt: z.ZodNullable<z.ZodString>;
219
+ locationId: z.ZodNullable<z.ZodGUID>;
220
+ locationCode: z.ZodNullable<z.ZodString>;
221
+ }, z.core.$strict>;
222
+ omsEligibility: z.ZodObject<{
223
+ allowed: z.ZodBoolean;
224
+ reason: z.ZodNullable<z.ZodEnum<{
225
+ order_not_paid: "order_not_paid";
226
+ payment_not_succeeded: "payment_not_succeeded";
227
+ subscription_cycle_not_paid: "subscription_cycle_not_paid";
228
+ active_hold: "active_hold";
229
+ missing_shipping_address: "missing_shipping_address";
230
+ inventory_review: "inventory_review";
231
+ risk_review: "risk_review";
232
+ }>>;
233
+ }, z.core.$strict>;
234
+ latestOperation: z.ZodNullable<z.ZodObject<{
235
+ id: z.ZodGUID;
236
+ type: z.ZodEnum<{
237
+ created: "created";
238
+ cancelled: "cancelled";
239
+ packed: "packed";
240
+ label_created: "label_created";
241
+ handed_over: "handed_over";
242
+ provider_attempt_recorded: "provider_attempt_recorded";
243
+ tracking_event_recorded: "tracking_event_recorded";
244
+ }>;
245
+ occurredAt: z.ZodString;
246
+ actorUserId: z.ZodNullable<z.ZodGUID>;
247
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
248
+ }, z.core.$strict>>;
249
+ createdAt: z.ZodString;
250
+ updatedAt: z.ZodString;
251
+ }, z.core.$strict>;
252
+ export declare const adminCommerceFulfillmentOrdersListRequestSchema: z.ZodObject<{
253
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
254
+ pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
255
+ status: z.ZodOptional<z.ZodEnum<{
256
+ created: "created";
257
+ exception: "exception";
258
+ delivered: "delivered";
259
+ cancelled: "cancelled";
260
+ packed: "packed";
261
+ in_transit: "in_transit";
262
+ label_pending: "label_pending";
263
+ label_created: "label_created";
264
+ handed_over: "handed_over";
265
+ }>>;
266
+ }, z.core.$strict>;
267
+ export declare const adminCommerceFulfillmentOrderDetailRequestSchema: z.ZodObject<{
268
+ fulfillmentOrderId: z.ZodOptional<z.ZodGUID>;
269
+ orderId: z.ZodOptional<z.ZodGUID>;
270
+ }, z.core.$strict>;
271
+ export declare const adminCommerceFulfillmentCreateRequestSchema: z.ZodObject<{
272
+ idempotencyKey: z.ZodString;
273
+ orderId: z.ZodGUID;
274
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
275
+ }, z.core.$strict>;
276
+ export declare const adminCommerceFulfillmentRecordProviderAttemptRequestSchema: z.ZodObject<{
277
+ idempotencyKey: z.ZodString;
278
+ fulfillmentOrderId: z.ZodGUID;
279
+ providerKind: z.ZodString;
280
+ status: z.ZodEnum<{
281
+ failed: "failed";
282
+ recorded: "recorded";
283
+ succeeded: "succeeded";
284
+ }>;
285
+ requestPayload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
286
+ responsePayload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
287
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
288
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
289
+ }, z.core.$strict>;
290
+ export declare const adminCommerceFulfillmentRecordLabelRequestSchema: z.ZodObject<{
291
+ idempotencyKey: z.ZodString;
292
+ fulfillmentOrderId: z.ZodGUID;
293
+ providerKind: z.ZodString;
294
+ providerTrackingId: z.ZodString;
295
+ labelUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
+ deliveryEstimateDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
297
+ rawProviderPayload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
298
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
299
+ }, z.core.$strict>;
300
+ export declare const adminCommerceFulfillmentHandOffRequestSchema: z.ZodObject<{
301
+ idempotencyKey: z.ZodString;
302
+ fulfillmentOrderId: z.ZodGUID;
303
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
304
+ }, z.core.$strict>;
305
+ export declare const adminCommerceFulfillmentTrackingEventRequestSchema: z.ZodObject<{
306
+ idempotencyKey: z.ZodString;
307
+ fulfillmentOrderId: z.ZodGUID;
308
+ status: z.ZodEnum<{
309
+ exception: "exception";
310
+ delivered: "delivered";
311
+ in_transit: "in_transit";
312
+ }>;
313
+ providerTrackingId: z.ZodOptional<z.ZodString>;
314
+ rawEvent: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
315
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
316
+ }, z.core.$strict>;
317
+ export declare const adminCommerceFulfillmentCancelRequestSchema: z.ZodObject<{
318
+ idempotencyKey: z.ZodString;
319
+ fulfillmentOrderId: z.ZodGUID;
320
+ reason: z.ZodString;
321
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
322
+ }, z.core.$strict>;
323
+ export declare const adminCommerceFulfillmentOrdersListResponseSchema: z.ZodObject<{
324
+ contractVersion: z.ZodLiteral<"commerce.fulfillment.v0">;
325
+ orders: z.ZodArray<z.ZodObject<{
326
+ id: z.ZodGUID;
327
+ orderId: z.ZodGUID;
328
+ clientId: z.ZodNullable<z.ZodGUID>;
329
+ status: z.ZodEnum<{
330
+ created: "created";
331
+ exception: "exception";
332
+ delivered: "delivered";
333
+ cancelled: "cancelled";
334
+ packed: "packed";
335
+ in_transit: "in_transit";
336
+ label_pending: "label_pending";
337
+ label_created: "label_created";
338
+ handed_over: "handed_over";
339
+ }>;
340
+ providerKind: z.ZodNullable<z.ZodString>;
341
+ providerTrackingId: z.ZodNullable<z.ZodString>;
342
+ shippingAddress: z.ZodObject<{
343
+ addressId: z.ZodGUID;
344
+ clientId: z.ZodGUID;
345
+ label: z.ZodNullable<z.ZodString>;
346
+ line1: z.ZodString;
347
+ line2: z.ZodNullable<z.ZodString>;
348
+ city: z.ZodString;
349
+ postalCode: z.ZodString;
350
+ country: z.ZodString;
351
+ }, z.core.$strict>;
352
+ lines: z.ZodArray<z.ZodObject<{
353
+ id: z.ZodNullable<z.ZodGUID>;
354
+ orderItemId: z.ZodGUID;
355
+ skuId: z.ZodGUID;
356
+ sku: z.ZodString;
357
+ title: z.ZodNullable<z.ZodString>;
358
+ quantity: z.ZodNumber;
359
+ inventoryReservationIds: z.ZodArray<z.ZodGUID>;
360
+ productSnapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
361
+ }, z.core.$strict>>;
362
+ payment: z.ZodObject<{
363
+ paymentIntentId: z.ZodGUID;
364
+ paymentStatus: z.ZodEnum<{
365
+ expired: "expired";
366
+ created: "created";
367
+ failed: "failed";
368
+ cancelled: "cancelled";
369
+ succeeded: "succeeded";
370
+ refunded: "refunded";
371
+ requires_action: "requires_action";
372
+ processing: "processing";
373
+ partially_refunded: "partially_refunded";
374
+ disputed: "disputed";
375
+ not_started: "not_started";
376
+ }>;
377
+ providerPaymentId: z.ZodNullable<z.ZodString>;
378
+ }, z.core.$strict>;
379
+ inventory: z.ZodObject<{
380
+ status: z.ZodEnum<{
381
+ expired: "expired";
382
+ missing: "missing";
383
+ reserved: "reserved";
384
+ not_checked: "not_checked";
385
+ released: "released";
386
+ consumed: "consumed";
387
+ review_required: "review_required";
388
+ }>;
389
+ reservationId: z.ZodNullable<z.ZodGUID>;
390
+ reservationStatus: z.ZodNullable<z.ZodEnum<{
391
+ expired: "expired";
392
+ reserved: "reserved";
393
+ released: "released";
394
+ consumed: "consumed";
395
+ }>>;
396
+ expiresAt: z.ZodNullable<z.ZodString>;
397
+ locationId: z.ZodNullable<z.ZodGUID>;
398
+ locationCode: z.ZodNullable<z.ZodString>;
399
+ }, z.core.$strict>;
400
+ omsEligibility: z.ZodObject<{
401
+ allowed: z.ZodBoolean;
402
+ reason: z.ZodNullable<z.ZodEnum<{
403
+ order_not_paid: "order_not_paid";
404
+ payment_not_succeeded: "payment_not_succeeded";
405
+ subscription_cycle_not_paid: "subscription_cycle_not_paid";
406
+ active_hold: "active_hold";
407
+ missing_shipping_address: "missing_shipping_address";
408
+ inventory_review: "inventory_review";
409
+ risk_review: "risk_review";
410
+ }>>;
411
+ }, z.core.$strict>;
412
+ latestOperation: z.ZodNullable<z.ZodObject<{
413
+ id: z.ZodGUID;
414
+ type: z.ZodEnum<{
415
+ created: "created";
416
+ cancelled: "cancelled";
417
+ packed: "packed";
418
+ label_created: "label_created";
419
+ handed_over: "handed_over";
420
+ provider_attempt_recorded: "provider_attempt_recorded";
421
+ tracking_event_recorded: "tracking_event_recorded";
422
+ }>;
423
+ occurredAt: z.ZodString;
424
+ actorUserId: z.ZodNullable<z.ZodGUID>;
425
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
426
+ }, z.core.$strict>>;
427
+ createdAt: z.ZodString;
428
+ updatedAt: z.ZodString;
429
+ }, z.core.$strict>>;
430
+ totalCount: z.ZodNumber;
431
+ page: z.ZodNumber;
432
+ pageSize: z.ZodNumber;
433
+ }, z.core.$strict>;
434
+ export declare const adminCommerceFulfillmentOrderDetailResponseSchema: z.ZodObject<{
435
+ contractVersion: z.ZodLiteral<"commerce.fulfillment.v0">;
436
+ order: z.ZodObject<{
437
+ id: z.ZodGUID;
438
+ orderId: z.ZodGUID;
439
+ clientId: z.ZodNullable<z.ZodGUID>;
440
+ status: z.ZodEnum<{
441
+ created: "created";
442
+ exception: "exception";
443
+ delivered: "delivered";
444
+ cancelled: "cancelled";
445
+ packed: "packed";
446
+ in_transit: "in_transit";
447
+ label_pending: "label_pending";
448
+ label_created: "label_created";
449
+ handed_over: "handed_over";
450
+ }>;
451
+ providerKind: z.ZodNullable<z.ZodString>;
452
+ providerTrackingId: z.ZodNullable<z.ZodString>;
453
+ shippingAddress: z.ZodObject<{
454
+ addressId: z.ZodGUID;
455
+ clientId: z.ZodGUID;
456
+ label: z.ZodNullable<z.ZodString>;
457
+ line1: z.ZodString;
458
+ line2: z.ZodNullable<z.ZodString>;
459
+ city: z.ZodString;
460
+ postalCode: z.ZodString;
461
+ country: z.ZodString;
462
+ }, z.core.$strict>;
463
+ lines: z.ZodArray<z.ZodObject<{
464
+ id: z.ZodNullable<z.ZodGUID>;
465
+ orderItemId: z.ZodGUID;
466
+ skuId: z.ZodGUID;
467
+ sku: z.ZodString;
468
+ title: z.ZodNullable<z.ZodString>;
469
+ quantity: z.ZodNumber;
470
+ inventoryReservationIds: z.ZodArray<z.ZodGUID>;
471
+ productSnapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
472
+ }, z.core.$strict>>;
473
+ payment: z.ZodObject<{
474
+ paymentIntentId: z.ZodGUID;
475
+ paymentStatus: z.ZodEnum<{
476
+ expired: "expired";
477
+ created: "created";
478
+ failed: "failed";
479
+ cancelled: "cancelled";
480
+ succeeded: "succeeded";
481
+ refunded: "refunded";
482
+ requires_action: "requires_action";
483
+ processing: "processing";
484
+ partially_refunded: "partially_refunded";
485
+ disputed: "disputed";
486
+ not_started: "not_started";
487
+ }>;
488
+ providerPaymentId: z.ZodNullable<z.ZodString>;
489
+ }, z.core.$strict>;
490
+ inventory: z.ZodObject<{
491
+ status: z.ZodEnum<{
492
+ expired: "expired";
493
+ missing: "missing";
494
+ reserved: "reserved";
495
+ not_checked: "not_checked";
496
+ released: "released";
497
+ consumed: "consumed";
498
+ review_required: "review_required";
499
+ }>;
500
+ reservationId: z.ZodNullable<z.ZodGUID>;
501
+ reservationStatus: z.ZodNullable<z.ZodEnum<{
502
+ expired: "expired";
503
+ reserved: "reserved";
504
+ released: "released";
505
+ consumed: "consumed";
506
+ }>>;
507
+ expiresAt: z.ZodNullable<z.ZodString>;
508
+ locationId: z.ZodNullable<z.ZodGUID>;
509
+ locationCode: z.ZodNullable<z.ZodString>;
510
+ }, z.core.$strict>;
511
+ omsEligibility: z.ZodObject<{
512
+ allowed: z.ZodBoolean;
513
+ reason: z.ZodNullable<z.ZodEnum<{
514
+ order_not_paid: "order_not_paid";
515
+ payment_not_succeeded: "payment_not_succeeded";
516
+ subscription_cycle_not_paid: "subscription_cycle_not_paid";
517
+ active_hold: "active_hold";
518
+ missing_shipping_address: "missing_shipping_address";
519
+ inventory_review: "inventory_review";
520
+ risk_review: "risk_review";
521
+ }>>;
522
+ }, z.core.$strict>;
523
+ latestOperation: z.ZodNullable<z.ZodObject<{
524
+ id: z.ZodGUID;
525
+ type: z.ZodEnum<{
526
+ created: "created";
527
+ cancelled: "cancelled";
528
+ packed: "packed";
529
+ label_created: "label_created";
530
+ handed_over: "handed_over";
531
+ provider_attempt_recorded: "provider_attempt_recorded";
532
+ tracking_event_recorded: "tracking_event_recorded";
533
+ }>;
534
+ occurredAt: z.ZodString;
535
+ actorUserId: z.ZodNullable<z.ZodGUID>;
536
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
537
+ }, z.core.$strict>>;
538
+ createdAt: z.ZodString;
539
+ updatedAt: z.ZodString;
540
+ }, z.core.$strict>;
541
+ }, z.core.$strict>;
542
+ export declare const adminCommerceFulfillmentMutationResponseSchema: z.ZodObject<{
543
+ contractVersion: z.ZodLiteral<"commerce.fulfillment.v0">;
544
+ fulfillmentOrderId: z.ZodGUID;
545
+ orderId: z.ZodGUID;
546
+ status: z.ZodEnum<{
547
+ created: "created";
548
+ exception: "exception";
549
+ delivered: "delivered";
550
+ cancelled: "cancelled";
551
+ packed: "packed";
552
+ in_transit: "in_transit";
553
+ label_pending: "label_pending";
554
+ label_created: "label_created";
555
+ handed_over: "handed_over";
556
+ }>;
557
+ replayed: z.ZodBoolean;
558
+ }, z.core.$strict>;
559
+ export type AdminCommerceFulfillmentOrdersListRequest = z.infer<typeof adminCommerceFulfillmentOrdersListRequestSchema>;
560
+ export type AdminCommerceFulfillmentOrderDetailRequest = z.infer<typeof adminCommerceFulfillmentOrderDetailRequestSchema>;
561
+ export type AdminCommerceFulfillmentCreateRequest = z.infer<typeof adminCommerceFulfillmentCreateRequestSchema>;
562
+ export type AdminCommerceFulfillmentRecordProviderAttemptRequest = z.input<typeof adminCommerceFulfillmentRecordProviderAttemptRequestSchema>;
563
+ export type AdminCommerceFulfillmentRecordLabelRequest = z.input<typeof adminCommerceFulfillmentRecordLabelRequestSchema>;
564
+ export type AdminCommerceFulfillmentHandOffRequest = z.infer<typeof adminCommerceFulfillmentHandOffRequestSchema>;
565
+ export type AdminCommerceFulfillmentTrackingEventRequest = z.input<typeof adminCommerceFulfillmentTrackingEventRequestSchema>;
566
+ export type AdminCommerceFulfillmentCancelRequest = z.infer<typeof adminCommerceFulfillmentCancelRequestSchema>;
567
+ export type AdminCommerceFulfillmentOrdersListResponse = z.infer<typeof adminCommerceFulfillmentOrdersListResponseSchema>;
568
+ export type AdminCommerceFulfillmentOrderDetailResponse = z.infer<typeof adminCommerceFulfillmentOrderDetailResponseSchema>;
569
+ export type AdminCommerceFulfillmentMutationResponse = z.infer<typeof adminCommerceFulfillmentMutationResponseSchema>;
570
+ export type CommerceFulfillmentOrder = z.infer<typeof commerceFulfillmentOrderSchema>;
571
+ export type CommerceFulfillmentStatus = z.infer<typeof commerceFulfillmentStatusSchema>;
572
+ export type CommerceFulfillmentOperationType = z.infer<typeof commerceFulfillmentOperationTypeSchema>;
573
+ export declare const adminCommerceOrderRequestReplacementShipmentRequestSchema: z.ZodObject<{
574
+ idempotencyKey: z.ZodString;
575
+ orderId: z.ZodGUID;
576
+ reason: z.ZodEnum<{
577
+ other: "other";
578
+ damaged: "damaged";
579
+ lost: "lost";
580
+ returned_undelivered: "returned_undelivered";
581
+ }>;
582
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
583
+ }, z.core.$strict>;
584
+ export declare const omsOperationTypeSchema: z.ZodEnum<{
585
+ hold_created: "hold_created";
586
+ hold_released: "hold_released";
587
+ fulfillment_reviewed: "fulfillment_reviewed";
588
+ support_note: "support_note";
589
+ shipping_address_updated: "shipping_address_updated";
590
+ order_marked_refunded: "order_marked_refunded";
591
+ order_cancelled_manual: "order_cancelled_manual";
592
+ replacement_shipment_requested: "replacement_shipment_requested";
593
+ }>;
594
+ export declare const omsOrderOperationSchema: z.ZodObject<{
595
+ id: z.ZodGUID;
596
+ orderId: z.ZodGUID;
597
+ type: z.ZodEnum<{
598
+ hold_created: "hold_created";
599
+ hold_released: "hold_released";
600
+ fulfillment_reviewed: "fulfillment_reviewed";
601
+ support_note: "support_note";
602
+ shipping_address_updated: "shipping_address_updated";
603
+ order_marked_refunded: "order_marked_refunded";
604
+ order_cancelled_manual: "order_cancelled_manual";
605
+ replacement_shipment_requested: "replacement_shipment_requested";
606
+ }>;
607
+ holdId: z.ZodNullable<z.ZodGUID>;
608
+ actorUserId: z.ZodNullable<z.ZodGUID>;
609
+ occurredAt: z.ZodString;
610
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
611
+ }, z.core.$strip>;
612
+ export declare const adminCommerceOrderRequestReplacementShipmentResponseSchema: z.ZodObject<{
613
+ contractVersion: z.ZodLiteral<"commerce.v0">;
614
+ operation: z.ZodObject<{
615
+ id: z.ZodGUID;
616
+ orderId: z.ZodGUID;
617
+ type: z.ZodEnum<{
618
+ hold_created: "hold_created";
619
+ hold_released: "hold_released";
620
+ fulfillment_reviewed: "fulfillment_reviewed";
621
+ support_note: "support_note";
622
+ shipping_address_updated: "shipping_address_updated";
623
+ order_marked_refunded: "order_marked_refunded";
624
+ order_cancelled_manual: "order_cancelled_manual";
625
+ replacement_shipment_requested: "replacement_shipment_requested";
626
+ }>;
627
+ holdId: z.ZodNullable<z.ZodGUID>;
628
+ actorUserId: z.ZodNullable<z.ZodGUID>;
629
+ occurredAt: z.ZodString;
630
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
631
+ }, z.core.$strip>;
632
+ replacement: z.ZodObject<{
633
+ fulfillmentOrderId: z.ZodString;
634
+ orderId: z.ZodString;
635
+ sequenceNo: z.ZodNumber;
636
+ replacesFulfillmentOrderId: z.ZodString;
637
+ reason: z.ZodEnum<{
638
+ other: "other";
639
+ damaged: "damaged";
640
+ lost: "lost";
641
+ returned_undelivered: "returned_undelivered";
642
+ }>;
643
+ status: z.ZodString;
644
+ }, z.core.$strip>;
645
+ releasedHoldIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
646
+ replayed: z.ZodBoolean;
647
+ }, z.core.$strip>;