@reventlessdev/online-shop-dcb-ordering 1.0.0-alpha.246 → 1.0.0-alpha.248

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 (446) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/bs/.compiler.log +2 -2
  3. package/lib/bs/OrderingPlugin.cmi +0 -0
  4. package/lib/bs/OrderingPlugin.cmt +0 -0
  5. package/lib/bs/OrderingPlugin.mlmap +2 -0
  6. package/lib/bs/compiler-info.json +1 -1
  7. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct-OrderingPlugin.cmi +0 -0
  8. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct-OrderingPlugin.cmt +0 -0
  9. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct.ast +0 -0
  10. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct.res +4 -4
  11. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct.res.mjs +5 -4
  12. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
  13. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
  14. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts-OrderingPlugin.cmi +0 -0
  15. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts-OrderingPlugin.cmt +0 -0
  16. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts.ast +0 -0
  17. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts.res +6 -3
  18. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts.res.mjs +7 -3
  19. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
  20. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
  21. package/lib/bs/src/Customer/CustomerId-OrderingPlugin.cmi +0 -0
  22. package/lib/bs/src/Customer/CustomerId-OrderingPlugin.cmj +0 -0
  23. package/lib/bs/src/Customer/CustomerId-OrderingPlugin.cmt +0 -0
  24. package/lib/bs/src/Customer/CustomerId.ast +0 -0
  25. package/lib/bs/src/Customer/CustomerId.res +4 -0
  26. package/lib/bs/src/Customer/CustomerId.res.mjs +29 -0
  27. package/lib/bs/src/Customer/StateChange/ChangeAddress-OrderingPlugin.cmi +0 -0
  28. package/lib/bs/src/Customer/StateChange/ChangeAddress-OrderingPlugin.cmt +0 -0
  29. package/lib/bs/src/Customer/StateChange/ChangeAddress.ast +0 -0
  30. package/lib/bs/src/Customer/StateChange/ChangeAddress.res +2 -2
  31. package/lib/bs/src/Customer/StateChange/ChangeAddress.res.mjs +3 -2
  32. package/lib/bs/src/Customer/StateChange/ChangeAddress_Behavior-OrderingPlugin.cmi +0 -0
  33. package/lib/bs/src/Customer/StateChange/ChangeAddress_Behavior-OrderingPlugin.cmt +0 -0
  34. package/lib/bs/src/Customer/StateChange/ChangeEmail-OrderingPlugin.cmi +0 -0
  35. package/lib/bs/src/Customer/StateChange/ChangeEmail-OrderingPlugin.cmt +0 -0
  36. package/lib/bs/src/Customer/StateChange/ChangeEmail.ast +0 -0
  37. package/lib/bs/src/Customer/StateChange/ChangeEmail.res +2 -2
  38. package/lib/bs/src/Customer/StateChange/ChangeEmail.res.mjs +3 -2
  39. package/lib/bs/src/Customer/StateChange/ChangeEmail_Behavior-OrderingPlugin.cmi +0 -0
  40. package/lib/bs/src/Customer/StateChange/ChangeEmail_Behavior-OrderingPlugin.cmt +0 -0
  41. package/lib/bs/src/Customer/StateChange/DeactivateCustomer-OrderingPlugin.cmi +0 -0
  42. package/lib/bs/src/Customer/StateChange/DeactivateCustomer-OrderingPlugin.cmt +0 -0
  43. package/lib/bs/src/Customer/StateChange/DeactivateCustomer.ast +0 -0
  44. package/lib/bs/src/Customer/StateChange/DeactivateCustomer.res +2 -2
  45. package/lib/bs/src/Customer/StateChange/DeactivateCustomer.res.mjs +3 -2
  46. package/lib/bs/src/Customer/StateChange/DeactivateCustomer_Behavior-OrderingPlugin.cmi +0 -0
  47. package/lib/bs/src/Customer/StateChange/DeactivateCustomer_Behavior-OrderingPlugin.cmt +0 -0
  48. package/lib/bs/src/Customer/StateChange/RegisterCustomer-OrderingPlugin.cmi +0 -0
  49. package/lib/bs/src/Customer/StateChange/RegisterCustomer-OrderingPlugin.cmt +0 -0
  50. package/lib/bs/src/Customer/StateChange/RegisterCustomer.ast +0 -0
  51. package/lib/bs/src/Customer/StateChange/RegisterCustomer.res +2 -2
  52. package/lib/bs/src/Customer/StateChange/RegisterCustomer.res.mjs +3 -2
  53. package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
  54. package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
  55. package/lib/bs/src/Customer/StateView/Customers-OrderingPlugin.cmi +0 -0
  56. package/lib/bs/src/Customer/StateView/Customers-OrderingPlugin.cmt +0 -0
  57. package/lib/bs/src/Customer/StateView/Customers.ast +0 -0
  58. package/lib/bs/src/Customer/StateView/Customers.res +8 -5
  59. package/lib/bs/src/Customer/StateView/Customers.res.mjs +9 -5
  60. package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmi +0 -0
  61. package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmt +0 -0
  62. package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
  63. package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
  64. package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
  65. package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
  66. package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.ast +0 -0
  67. package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res +29 -10
  68. package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +32 -23
  69. package/lib/bs/src/LifecycleModel-OrderingPlugin.cmi +0 -0
  70. package/lib/bs/src/LifecycleModel-OrderingPlugin.cmt +0 -0
  71. package/lib/bs/src/Order/Automation/AutoShipOrder-OrderingPlugin.cmi +0 -0
  72. package/lib/bs/src/Order/Automation/AutoShipOrder-OrderingPlugin.cmt +0 -0
  73. package/lib/bs/src/Order/Automation/AutoShipOrder.ast +0 -0
  74. package/lib/bs/src/Order/Automation/AutoShipOrder.res +2 -2
  75. package/lib/bs/src/Order/Automation/AutoShipOrder.res.mjs +3 -2
  76. package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
  77. package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
  78. package/lib/bs/src/Order/Automation/AutoShipOrder_Automation.ast +0 -0
  79. package/lib/bs/src/Order/Automation/AutoShipOrder_Automation.res +8 -5
  80. package/lib/bs/src/Order/Automation/AutoShipOrder_Automation.res.mjs +7 -6
  81. package/lib/bs/src/Order/OrderId-OrderingPlugin.cmi +0 -0
  82. package/lib/bs/src/Order/OrderId-OrderingPlugin.cmj +0 -0
  83. package/lib/bs/src/Order/OrderId-OrderingPlugin.cmt +0 -0
  84. package/lib/bs/src/Order/OrderId.ast +0 -0
  85. package/lib/bs/src/Order/OrderId.res +4 -0
  86. package/lib/bs/src/Order/OrderId.res.mjs +29 -0
  87. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation-OrderingPlugin.cmi +0 -0
  88. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation-OrderingPlugin.cmt +0 -0
  89. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation.ast +0 -0
  90. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation.res +2 -2
  91. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation.res.mjs +6 -4
  92. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
  93. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
  94. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.ast +0 -0
  95. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res +5 -2
  96. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res.mjs +4 -2
  97. package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmi +0 -0
  98. package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmt +0 -0
  99. package/lib/bs/src/Order/StateChange/CancelOrder.ast +0 -0
  100. package/lib/bs/src/Order/StateChange/CancelOrder.res +3 -3
  101. package/lib/bs/src/Order/StateChange/CancelOrder.res.mjs +6 -4
  102. package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
  103. package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
  104. package/lib/bs/src/Order/StateChange/CancelOrder_Behavior.ast +0 -0
  105. package/lib/bs/src/Order/StateChange/CancelOrder_Behavior.res +6 -1
  106. package/lib/bs/src/Order/StateChange/PlaceOrder-OrderingPlugin.cmi +0 -0
  107. package/lib/bs/src/Order/StateChange/PlaceOrder-OrderingPlugin.cmt +0 -0
  108. package/lib/bs/src/Order/StateChange/PlaceOrder.ast +0 -0
  109. package/lib/bs/src/Order/StateChange/PlaceOrder.res +12 -7
  110. package/lib/bs/src/Order/StateChange/PlaceOrder.res.mjs +12 -9
  111. package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
  112. package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
  113. package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior.ast +0 -0
  114. package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior.res +1 -1
  115. package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmi +0 -0
  116. package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmt +0 -0
  117. package/lib/bs/src/Order/StateChange/ShipOrder.ast +0 -0
  118. package/lib/bs/src/Order/StateChange/ShipOrder.res +2 -2
  119. package/lib/bs/src/Order/StateChange/ShipOrder.res.mjs +3 -2
  120. package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
  121. package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
  122. package/lib/bs/src/Order/StateView/Orders-OrderingPlugin.cmi +0 -0
  123. package/lib/bs/src/Order/StateView/Orders-OrderingPlugin.cmt +0 -0
  124. package/lib/bs/src/Order/StateView/Orders.ast +0 -0
  125. package/lib/bs/src/Order/StateView/Orders.res +13 -6
  126. package/lib/bs/src/Order/StateView/Orders.res.mjs +14 -8
  127. package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmi +0 -0
  128. package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmt +0 -0
  129. package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
  130. package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
  131. package/lib/bs/src/Plugin.res.mjs +6 -8
  132. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
  133. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
  134. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.ast +0 -0
  135. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +8 -6
  136. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +10 -6
  137. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
  138. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
  139. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.ast +0 -0
  140. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +7 -5
  141. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -5
  142. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
  143. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
  144. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.ast +0 -0
  145. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res +7 -5
  146. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +9 -5
  147. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
  148. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
  149. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.ast +0 -0
  150. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res +7 -5
  151. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +9 -5
  152. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
  153. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
  154. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.ast +0 -0
  155. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res +6 -4
  156. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +8 -4
  157. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
  158. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
  159. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.ast +0 -0
  160. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res +7 -3
  161. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +7 -3
  162. package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmi +0 -0
  163. package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmt +0 -0
  164. package/lib/bs/tests/Customer/StateView/Customers_GWT.ast +0 -0
  165. package/lib/bs/tests/Customer/StateView/Customers_GWT.res +21 -11
  166. package/lib/bs/tests/Customer/StateView/Customers_GWT.res.mjs +16 -11
  167. package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
  168. package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
  169. package/lib/bs/tests/Extension/Products_Extension_GWT.ast +0 -0
  170. package/lib/bs/tests/Extension/Products_Extension_GWT.res +8 -4
  171. package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +8 -4
  172. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
  173. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
  174. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.ast +0 -0
  175. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +10 -2
  176. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +19 -7
  177. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
  178. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
  179. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.ast +0 -0
  180. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res +9 -7
  181. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +11 -7
  182. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
  183. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
  184. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.ast +0 -0
  185. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -4
  186. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +16 -8
  187. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
  188. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
  189. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.ast +0 -0
  190. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res +11 -8
  191. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res.mjs +19 -11
  192. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
  193. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
  194. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.ast +0 -0
  195. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res +19 -13
  196. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +42 -30
  197. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
  198. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
  199. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.ast +0 -0
  200. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res +7 -5
  201. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res.mjs +9 -5
  202. package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmi +0 -0
  203. package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmt +0 -0
  204. package/lib/bs/tests/Order/StateView/Orders_GWT.ast +0 -0
  205. package/lib/bs/tests/Order/StateView/Orders_GWT.res +19 -8
  206. package/lib/bs/tests/Order/StateView/Orders_GWT.res.mjs +35 -22
  207. package/lib/ocaml/.compiler.log +2 -2
  208. package/lib/ocaml/AutoShipOrder-OrderingPlugin.cmi +0 -0
  209. package/lib/ocaml/AutoShipOrder-OrderingPlugin.cmt +0 -0
  210. package/lib/ocaml/AutoShipOrder.ast +0 -0
  211. package/lib/ocaml/AutoShipOrder.res +2 -2
  212. package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
  213. package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
  214. package/lib/ocaml/AutoShipOrder_Automation.ast +0 -0
  215. package/lib/ocaml/AutoShipOrder_Automation.res +8 -5
  216. package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
  217. package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
  218. package/lib/ocaml/AutoShipOrder_GWT.ast +0 -0
  219. package/lib/ocaml/AutoShipOrder_GWT.res +9 -7
  220. package/lib/ocaml/AvailableProducts-OrderingPlugin.cmi +0 -0
  221. package/lib/ocaml/AvailableProducts-OrderingPlugin.cmt +0 -0
  222. package/lib/ocaml/AvailableProducts.ast +0 -0
  223. package/lib/ocaml/AvailableProducts.res +6 -3
  224. package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
  225. package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
  226. package/lib/ocaml/AvailableProducts_GWT.ast +0 -0
  227. package/lib/ocaml/AvailableProducts_GWT.res +7 -5
  228. package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
  229. package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
  230. package/lib/ocaml/CancelOrder-OrderingPlugin.cmi +0 -0
  231. package/lib/ocaml/CancelOrder-OrderingPlugin.cmt +0 -0
  232. package/lib/ocaml/CancelOrder.ast +0 -0
  233. package/lib/ocaml/CancelOrder.res +3 -3
  234. package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
  235. package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
  236. package/lib/ocaml/CancelOrder_Behavior.ast +0 -0
  237. package/lib/ocaml/CancelOrder_Behavior.res +6 -1
  238. package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
  239. package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
  240. package/lib/ocaml/CancelOrder_GWT.ast +0 -0
  241. package/lib/ocaml/CancelOrder_GWT.res +11 -8
  242. package/lib/ocaml/ChangeAddress-OrderingPlugin.cmi +0 -0
  243. package/lib/ocaml/ChangeAddress-OrderingPlugin.cmt +0 -0
  244. package/lib/ocaml/ChangeAddress.ast +0 -0
  245. package/lib/ocaml/ChangeAddress.res +2 -2
  246. package/lib/ocaml/ChangeAddress_Behavior-OrderingPlugin.cmi +0 -0
  247. package/lib/ocaml/ChangeAddress_Behavior-OrderingPlugin.cmt +0 -0
  248. package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
  249. package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
  250. package/lib/ocaml/ChangeAddress_GWT.ast +0 -0
  251. package/lib/ocaml/ChangeAddress_GWT.res +7 -5
  252. package/lib/ocaml/ChangeEmail-OrderingPlugin.cmi +0 -0
  253. package/lib/ocaml/ChangeEmail-OrderingPlugin.cmt +0 -0
  254. package/lib/ocaml/ChangeEmail.ast +0 -0
  255. package/lib/ocaml/ChangeEmail.res +2 -2
  256. package/lib/ocaml/ChangeEmail_Behavior-OrderingPlugin.cmi +0 -0
  257. package/lib/ocaml/ChangeEmail_Behavior-OrderingPlugin.cmt +0 -0
  258. package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
  259. package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
  260. package/lib/ocaml/ChangeEmail_GWT.ast +0 -0
  261. package/lib/ocaml/ChangeEmail_GWT.res +7 -5
  262. package/lib/ocaml/CustomerId-OrderingPlugin.cmi +0 -0
  263. package/lib/ocaml/CustomerId-OrderingPlugin.cmj +0 -0
  264. package/lib/ocaml/CustomerId-OrderingPlugin.cmt +0 -0
  265. package/lib/ocaml/CustomerId.ast +0 -0
  266. package/lib/ocaml/CustomerId.res +4 -0
  267. package/lib/ocaml/Customers-OrderingPlugin.cmi +0 -0
  268. package/lib/ocaml/Customers-OrderingPlugin.cmt +0 -0
  269. package/lib/ocaml/Customers.ast +0 -0
  270. package/lib/ocaml/Customers.res +8 -5
  271. package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
  272. package/lib/ocaml/Customers_GWT-OrderingPlugin.cmt +0 -0
  273. package/lib/ocaml/Customers_GWT.ast +0 -0
  274. package/lib/ocaml/Customers_GWT.res +21 -11
  275. package/lib/ocaml/Customers_Projection-OrderingPlugin.cmi +0 -0
  276. package/lib/ocaml/Customers_Projection-OrderingPlugin.cmt +0 -0
  277. package/lib/ocaml/DeactivateCustomer-OrderingPlugin.cmi +0 -0
  278. package/lib/ocaml/DeactivateCustomer-OrderingPlugin.cmt +0 -0
  279. package/lib/ocaml/DeactivateCustomer.ast +0 -0
  280. package/lib/ocaml/DeactivateCustomer.res +2 -2
  281. package/lib/ocaml/DeactivateCustomer_Behavior-OrderingPlugin.cmi +0 -0
  282. package/lib/ocaml/DeactivateCustomer_Behavior-OrderingPlugin.cmt +0 -0
  283. package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
  284. package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
  285. package/lib/ocaml/DeactivateCustomer_GWT.ast +0 -0
  286. package/lib/ocaml/DeactivateCustomer_GWT.res +6 -4
  287. package/lib/ocaml/LifecycleModel-OrderingPlugin.cmi +0 -0
  288. package/lib/ocaml/LifecycleModel-OrderingPlugin.cmt +0 -0
  289. package/lib/ocaml/OrderId-OrderingPlugin.cmi +0 -0
  290. package/lib/ocaml/OrderId-OrderingPlugin.cmj +0 -0
  291. package/lib/ocaml/OrderId-OrderingPlugin.cmt +0 -0
  292. package/lib/ocaml/OrderId.ast +0 -0
  293. package/lib/ocaml/OrderId.res +4 -0
  294. package/lib/ocaml/OrderingPlugin.cmi +0 -0
  295. package/lib/ocaml/OrderingPlugin.cmt +0 -0
  296. package/lib/ocaml/OrderingPlugin.mlmap +2 -0
  297. package/lib/ocaml/Orders-OrderingPlugin.cmi +0 -0
  298. package/lib/ocaml/Orders-OrderingPlugin.cmt +0 -0
  299. package/lib/ocaml/Orders.ast +0 -0
  300. package/lib/ocaml/Orders.res +13 -6
  301. package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
  302. package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
  303. package/lib/ocaml/Orders_ExtensionPointMapping.ast +0 -0
  304. package/lib/ocaml/Orders_ExtensionPointMapping.res +29 -10
  305. package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
  306. package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
  307. package/lib/ocaml/Orders_ExtensionPointMapping_GWT.ast +0 -0
  308. package/lib/ocaml/Orders_ExtensionPointMapping_GWT.res +10 -2
  309. package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
  310. package/lib/ocaml/Orders_GWT-OrderingPlugin.cmt +0 -0
  311. package/lib/ocaml/Orders_GWT.ast +0 -0
  312. package/lib/ocaml/Orders_GWT.res +19 -8
  313. package/lib/ocaml/Orders_Projection-OrderingPlugin.cmi +0 -0
  314. package/lib/ocaml/Orders_Projection-OrderingPlugin.cmt +0 -0
  315. package/lib/ocaml/PlaceOrder-OrderingPlugin.cmi +0 -0
  316. package/lib/ocaml/PlaceOrder-OrderingPlugin.cmt +0 -0
  317. package/lib/ocaml/PlaceOrder.ast +0 -0
  318. package/lib/ocaml/PlaceOrder.res +12 -7
  319. package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
  320. package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
  321. package/lib/ocaml/PlaceOrder_Behavior.ast +0 -0
  322. package/lib/ocaml/PlaceOrder_Behavior.res +1 -1
  323. package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
  324. package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
  325. package/lib/ocaml/PlaceOrder_GWT.ast +0 -0
  326. package/lib/ocaml/PlaceOrder_GWT.res +19 -13
  327. package/lib/ocaml/Plugin-OrderingPlugin.cmi +0 -0
  328. package/lib/ocaml/Plugin-OrderingPlugin.cmt +0 -0
  329. package/lib/ocaml/Products_Extension-OrderingPlugin.cmi +0 -0
  330. package/lib/ocaml/Products_Extension-OrderingPlugin.cmt +0 -0
  331. package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
  332. package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
  333. package/lib/ocaml/Products_Extension_GWT.ast +0 -0
  334. package/lib/ocaml/Products_Extension_GWT.res +8 -4
  335. package/lib/ocaml/RegisterCustomer-OrderingPlugin.cmi +0 -0
  336. package/lib/ocaml/RegisterCustomer-OrderingPlugin.cmt +0 -0
  337. package/lib/ocaml/RegisterCustomer.ast +0 -0
  338. package/lib/ocaml/RegisterCustomer.res +2 -2
  339. package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
  340. package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
  341. package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
  342. package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
  343. package/lib/ocaml/RegisterCustomer_GWT.ast +0 -0
  344. package/lib/ocaml/RegisterCustomer_GWT.res +7 -3
  345. package/lib/ocaml/SendOrderConfirmation-OrderingPlugin.cmi +0 -0
  346. package/lib/ocaml/SendOrderConfirmation-OrderingPlugin.cmt +0 -0
  347. package/lib/ocaml/SendOrderConfirmation.ast +0 -0
  348. package/lib/ocaml/SendOrderConfirmation.res +2 -2
  349. package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
  350. package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
  351. package/lib/ocaml/SendOrderConfirmation_GWT.ast +0 -0
  352. package/lib/ocaml/SendOrderConfirmation_GWT.res +7 -4
  353. package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
  354. package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
  355. package/lib/ocaml/SendOrderConfirmation_Translation.ast +0 -0
  356. package/lib/ocaml/SendOrderConfirmation_Translation.res +5 -2
  357. package/lib/ocaml/ShipOrder-OrderingPlugin.cmi +0 -0
  358. package/lib/ocaml/ShipOrder-OrderingPlugin.cmt +0 -0
  359. package/lib/ocaml/ShipOrder.ast +0 -0
  360. package/lib/ocaml/ShipOrder.res +2 -2
  361. package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
  362. package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
  363. package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
  364. package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
  365. package/lib/ocaml/ShipOrder_GWT.ast +0 -0
  366. package/lib/ocaml/ShipOrder_GWT.res +7 -5
  367. package/lib/ocaml/SyncCatalogProduct-OrderingPlugin.cmi +0 -0
  368. package/lib/ocaml/SyncCatalogProduct-OrderingPlugin.cmt +0 -0
  369. package/lib/ocaml/SyncCatalogProduct.ast +0 -0
  370. package/lib/ocaml/SyncCatalogProduct.res +4 -4
  371. package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
  372. package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
  373. package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
  374. package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
  375. package/lib/ocaml/SyncCatalogProduct_GWT.ast +0 -0
  376. package/lib/ocaml/SyncCatalogProduct_GWT.res +8 -6
  377. package/package.json +8 -8
  378. package/src/CatalogProduct/StateChange/SyncCatalogProduct.res +4 -4
  379. package/src/CatalogProduct/StateChange/SyncCatalogProduct.res.mjs +5 -4
  380. package/src/CatalogProduct/StateView/AvailableProducts.res +6 -3
  381. package/src/CatalogProduct/StateView/AvailableProducts.res.mjs +7 -3
  382. package/src/Customer/CustomerId.res +4 -0
  383. package/src/Customer/CustomerId.res.mjs +29 -0
  384. package/src/Customer/StateChange/ChangeAddress.res +2 -2
  385. package/src/Customer/StateChange/ChangeAddress.res.mjs +3 -2
  386. package/src/Customer/StateChange/ChangeEmail.res +2 -2
  387. package/src/Customer/StateChange/ChangeEmail.res.mjs +3 -2
  388. package/src/Customer/StateChange/DeactivateCustomer.res +2 -2
  389. package/src/Customer/StateChange/DeactivateCustomer.res.mjs +3 -2
  390. package/src/Customer/StateChange/RegisterCustomer.res +2 -2
  391. package/src/Customer/StateChange/RegisterCustomer.res.mjs +3 -2
  392. package/src/Customer/StateView/Customers.res +8 -5
  393. package/src/Customer/StateView/Customers.res.mjs +9 -5
  394. package/src/ExtensionPoint/Orders_ExtensionPointMapping.res +29 -10
  395. package/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +32 -23
  396. package/src/Order/Automation/AutoShipOrder.res +2 -2
  397. package/src/Order/Automation/AutoShipOrder.res.mjs +3 -2
  398. package/src/Order/Automation/AutoShipOrder_Automation.res +8 -5
  399. package/src/Order/Automation/AutoShipOrder_Automation.res.mjs +7 -6
  400. package/src/Order/OrderId.res +4 -0
  401. package/src/Order/OrderId.res.mjs +29 -0
  402. package/src/Order/OutboundTranslation/SendOrderConfirmation.res +2 -2
  403. package/src/Order/OutboundTranslation/SendOrderConfirmation.res.mjs +6 -4
  404. package/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res +5 -2
  405. package/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res.mjs +4 -2
  406. package/src/Order/StateChange/CancelOrder.res +3 -3
  407. package/src/Order/StateChange/CancelOrder.res.mjs +6 -4
  408. package/src/Order/StateChange/CancelOrder_Behavior.res +6 -1
  409. package/src/Order/StateChange/PlaceOrder.res +12 -7
  410. package/src/Order/StateChange/PlaceOrder.res.mjs +12 -9
  411. package/src/Order/StateChange/PlaceOrder_Behavior.res +1 -1
  412. package/src/Order/StateChange/ShipOrder.res +2 -2
  413. package/src/Order/StateChange/ShipOrder.res.mjs +3 -2
  414. package/src/Order/StateView/Orders.res +13 -6
  415. package/src/Order/StateView/Orders.res.mjs +14 -8
  416. package/src/Plugin.res.mjs +6 -8
  417. package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +8 -6
  418. package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +10 -6
  419. package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +7 -5
  420. package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -5
  421. package/tests/Customer/StateChange/ChangeAddress_GWT.res +7 -5
  422. package/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +9 -5
  423. package/tests/Customer/StateChange/ChangeEmail_GWT.res +7 -5
  424. package/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +9 -5
  425. package/tests/Customer/StateChange/DeactivateCustomer_GWT.res +6 -4
  426. package/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +8 -4
  427. package/tests/Customer/StateChange/RegisterCustomer_GWT.res +7 -3
  428. package/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +7 -3
  429. package/tests/Customer/StateView/Customers_GWT.res +21 -11
  430. package/tests/Customer/StateView/Customers_GWT.res.mjs +16 -11
  431. package/tests/Extension/Products_Extension_GWT.res +8 -4
  432. package/tests/Extension/Products_Extension_GWT.res.mjs +8 -4
  433. package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +10 -2
  434. package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +19 -7
  435. package/tests/Order/Automation/AutoShipOrder_GWT.res +9 -7
  436. package/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +11 -7
  437. package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -4
  438. package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +16 -8
  439. package/tests/Order/StateChange/CancelOrder_GWT.res +11 -8
  440. package/tests/Order/StateChange/CancelOrder_GWT.res.mjs +19 -11
  441. package/tests/Order/StateChange/PlaceOrder_GWT.res +19 -13
  442. package/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +42 -30
  443. package/tests/Order/StateChange/ShipOrder_GWT.res +7 -5
  444. package/tests/Order/StateChange/ShipOrder_GWT.res.mjs +9 -5
  445. package/tests/Order/StateView/Orders_GWT.res +19 -8
  446. package/tests/Order/StateView/Orders_GWT.res.mjs +35 -22
@@ -1,12 +1,16 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
3
  import * as Orders$OrderingPlugin from "../../../src/Order/StateView/Orders.res.mjs";
4
+ import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
5
+ import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
6
+ import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
4
7
  import * as Projection_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Projection_GWT.res.mjs";
5
8
  import * as Orders_Projection$OrderingPlugin from "../../../src/Order/StateView/Orders_Projection.res.mjs";
6
9
 
7
10
  let include = Projection_GWT$ReventlessGwt.Make({
8
11
  name: Orders$OrderingPlugin.name,
9
12
  stateSchema: Orders$OrderingPlugin.stateSchema,
13
+ Key: OrderId$OrderingPlugin,
10
14
  consumedEventSchema: Orders$OrderingPlugin.consumedEventSchema,
11
15
  subIdConfig: undefined
12
16
  })({
@@ -26,47 +30,47 @@ let thenStateWithId = include.thenStateWithId;
26
30
  describe("Orders StateViewSlice", () => {
27
31
  test("OrderPlaced creates a row with status Placed", undefined, () => thenStateWithId(whenEvent(givenEvents([]), {
28
32
  TAG: "OrderPlaced",
29
- orderId: "o1",
30
- customerId: "c1",
33
+ orderId: OrderId$OrderingPlugin.make("o1"),
34
+ customerId: CustomerId$OrderingPlugin.make("c1"),
31
35
  productIds: [
32
- "p1",
33
- "p2"
36
+ ProductId$CatalogSpec.make("p1"),
37
+ ProductId$CatalogSpec.make("p2")
34
38
  ]
35
39
  }), "o1", {
36
- orderId: "o1",
37
- customerId: "c1",
40
+ orderId: OrderId$OrderingPlugin.make("o1"),
41
+ customerId: CustomerId$OrderingPlugin.make("c1"),
38
42
  productIds: [
39
- "p1",
40
- "p2"
43
+ ProductId$CatalogSpec.make("p1"),
44
+ ProductId$CatalogSpec.make("p2")
41
45
  ],
42
46
  lifecycle: "Placed"
43
47
  }));
44
48
  test("OrderShipped updates status to Shipped", undefined, () => thenStateWithId(whenEvent(givenEvents([{
45
49
  TAG: "OrderPlaced",
46
- orderId: "o1",
47
- customerId: "c1",
48
- productIds: ["p1"]
50
+ orderId: OrderId$OrderingPlugin.make("o1"),
51
+ customerId: CustomerId$OrderingPlugin.make("c1"),
52
+ productIds: [ProductId$CatalogSpec.make("p1")]
49
53
  }]), {
50
54
  TAG: "OrderShipped",
51
- orderId: "o1"
55
+ orderId: OrderId$OrderingPlugin.make("o1")
52
56
  }), "o1", {
53
- orderId: "o1",
54
- customerId: "c1",
55
- productIds: ["p1"],
57
+ orderId: OrderId$OrderingPlugin.make("o1"),
58
+ customerId: CustomerId$OrderingPlugin.make("c1"),
59
+ productIds: [ProductId$CatalogSpec.make("p1")],
56
60
  lifecycle: "Shipped"
57
61
  }));
58
62
  test("OrderCancelled updates status to Cancelled", undefined, () => thenStateWithId(whenEvent(givenEvents([{
59
63
  TAG: "OrderPlaced",
60
- orderId: "o1",
61
- customerId: "c1",
62
- productIds: ["p1"]
64
+ orderId: OrderId$OrderingPlugin.make("o1"),
65
+ customerId: CustomerId$OrderingPlugin.make("c1"),
66
+ productIds: [ProductId$CatalogSpec.make("p1")]
63
67
  }]), {
64
68
  TAG: "OrderCancelled",
65
- orderId: "o1"
69
+ orderId: OrderId$OrderingPlugin.make("o1")
66
70
  }), "o1", {
67
- orderId: "o1",
68
- customerId: "c1",
69
- productIds: ["p1"],
71
+ orderId: OrderId$OrderingPlugin.make("o1"),
72
+ customerId: CustomerId$OrderingPlugin.make("c1"),
73
+ productIds: [ProductId$CatalogSpec.make("p1")],
70
74
  lifecycle: "Cancelled"
71
75
  }));
72
76
  });
@@ -93,6 +97,12 @@ let thenThrow = include.thenThrow;
93
97
 
94
98
  let thenFail = include.thenFail;
95
99
 
100
+ let cid = CustomerId$OrderingPlugin.make;
101
+
102
+ let oid = OrderId$OrderingPlugin.make;
103
+
104
+ let pid = ProductId$CatalogSpec.make;
105
+
96
106
  export {
97
107
  Spec,
98
108
  describe,
@@ -110,5 +120,8 @@ export {
110
120
  thenNoState,
111
121
  thenThrow,
112
122
  thenFail,
123
+ cid,
124
+ oid,
125
+ pid,
113
126
  }
114
127
  /* include Not a pure module */
@@ -1,2 +1,2 @@
1
- #Start(1789989171081)
2
- #Done(1789989173453)
1
+ #Start(1789997169658)
2
+ #Done(1789997172500)
Binary file
@@ -9,10 +9,10 @@
9
9
  @@reventless.spec
10
10
 
11
11
  @schema
12
- type todoItem = {orderId: string}
12
+ type todoItem = {orderId: OrderId.t}
13
13
 
14
14
  @schema
15
- type command = ShipOrder({orderId: string})
15
+ type command = ShipOrder({orderId: OrderId.t})
16
16
 
17
17
  let maxRetries = 3
18
18
  let heartbeatInterval = 60
@@ -5,8 +5,8 @@ module OrderingDcbSource = {
5
5
  let name = "OrderingDcbEventLog"
6
6
  @schema
7
7
  type event =
8
- | OrderPlaced({orderId: string})
9
- | OrderShipped({orderId: string})
8
+ | OrderPlaced({orderId: OrderId.t})
9
+ | OrderShipped({orderId: OrderId.t})
10
10
  }
11
11
 
12
12
  module FromOrderingDcb = Mapping.Make(
@@ -17,13 +17,16 @@ module FromOrderingDcb = Mapping.Make(
17
17
 
18
18
  let collect = (event, ~sourceId as _, _ctx) =>
19
19
  switch event {
20
- | OrderPlaced({orderId}) => [(orderId, ({orderId: orderId}: AutoShipOrder.todoItem))]
20
+ // To-do rows are keyed by string; the item keeps the typed id.
21
+ | OrderPlaced({orderId}) => [
22
+ (orderId->OrderId.toString, ({orderId: orderId}: AutoShipOrder.todoItem)),
23
+ ]
21
24
  | OrderShipped(_) => []
22
25
  }
23
26
 
24
27
  let resolve = event =>
25
28
  switch event {
26
- | OrderShipped({orderId}) => Some(orderId)
29
+ | OrderShipped({orderId}) => Some(orderId->OrderId.toString)
27
30
  | OrderPlaced(_) => None
28
31
  }
29
32
  },
@@ -31,7 +34,7 @@ module FromOrderingDcb = Mapping.Make(
31
34
 
32
35
  let mappings: array<module(Mapping)> = [module(FromOrderingDcb)]
33
36
 
34
- let process = (id, _item) => Some((id, ShipOrder({orderId: id})))
37
+ let process = (id, item: AutoShipOrder.todoItem) => Some((id, ShipOrder({orderId: item.orderId})))
35
38
 
36
39
  // Nothing to say: an order the shipping automation gave up on is a Placed order
37
40
  // that never shipped, which the Orders view already shows. A command here would
Binary file
@@ -22,34 +22,36 @@ module AutoShipOrderSlice = {
22
22
 
23
23
  @@reventless.gwt
24
24
 
25
+ let oid = OrderId.make
26
+
25
27
  describe("AutoShipOrder AutomationSlice", () => {
26
28
  test("collect: OrderPlaced creates a pending TODO", () =>
27
- givenEvent(OrderPlaced({orderId: "o1"}))
29
+ givenEvent(OrderPlaced({orderId: oid("o1")}))
28
30
  ->whenCollect
29
- ->thenTodos([("o1", {orderId: "o1"})])
31
+ ->thenTodos([("o1", {orderId: oid("o1")})])
30
32
  )
31
33
 
32
34
  test("collect: OrderShipped is ignored (no TODO)", () =>
33
- givenEvent(OrderShipped({orderId: "o1"}))
35
+ givenEvent(OrderShipped({orderId: oid("o1")}))
34
36
  ->whenCollect
35
37
  ->thenTodos([])
36
38
  )
37
39
 
38
40
  test("resolve: OrderShipped marks the TODO done", () =>
39
- givenEvent(OrderShipped({orderId: "o1"}))
41
+ givenEvent(OrderShipped({orderId: oid("o1")}))
40
42
  ->whenResolve
41
43
  ->thenResolved(Some("o1"))
42
44
  )
43
45
 
44
46
  test("resolve: OrderPlaced does not mark anything done", () =>
45
- givenEvent(OrderPlaced({orderId: "o1"}))
47
+ givenEvent(OrderPlaced({orderId: oid("o1")}))
46
48
  ->whenResolve
47
49
  ->thenResolved(None)
48
50
  )
49
51
 
50
52
  test("process: pending TODO emits ShipOrder for the same id", () =>
51
- givenTodo("o1", {orderId: "o1"})
53
+ givenTodo("o1", {orderId: oid("o1")})
52
54
  ->whenProcess
53
- ->thenCommand("o1", ShipOrder({orderId: "o1"}))
55
+ ->thenCommand("o1", ShipOrder({orderId: oid("o1")}))
54
56
  )
55
57
  })
Binary file
@@ -4,10 +4,13 @@
4
4
  @@reventless.spec
5
5
  @@reventless.visibility(Internal)
6
6
 
7
+ // Rows are keyed by this identity.
8
+ module Key = CatalogSpec.ProductId
9
+
7
10
  @schema
8
- type state = {productId: string, name: string, price: float}
11
+ type state = {productId: CatalogSpec.ProductId.t, name: string, price: float}
9
12
 
10
13
  @schema
11
14
  type consumedEvent =
12
- | CatalogProductSynced({productId: string, name: string, price: float})
13
- | CatalogProductPriceChanged({productId: string, price: float})
15
+ | CatalogProductSynced({productId: CatalogSpec.ProductId.t, name: string, price: float})
16
+ | CatalogProductPriceChanged({productId: CatalogSpec.ProductId.t, price: float})
Binary file
@@ -1,15 +1,17 @@
1
1
  @@reventless.gwt
2
2
 
3
+ let pid = CatalogSpec.ProductId.make
4
+
3
5
  describe("AvailableProducts StateViewSlice", () => {
4
6
  test("CatalogProductSynced creates a row", () =>
5
7
  givenEvents([])
6
- ->whenEvent(CatalogProductSynced({productId: "p1", name: "Laptop", price: 999.99}))
7
- ->thenStateWithId("p1", {productId: "p1", name: "Laptop", price: 999.99})
8
+ ->whenEvent(CatalogProductSynced({productId: pid("p1"), name: "Laptop", price: 999.99}))
9
+ ->thenStateWithId("p1", {productId: pid("p1"), name: "Laptop", price: 999.99})
8
10
  )
9
11
 
10
12
  test("CatalogProductPriceChanged updates the price", () =>
11
- givenEvents([CatalogProductSynced({productId: "p1", name: "Laptop", price: 999.99})])
12
- ->whenEvent(CatalogProductPriceChanged({productId: "p1", price: 899.99}))
13
- ->thenStateWithId("p1", {productId: "p1", name: "Laptop", price: 899.99})
13
+ givenEvents([CatalogProductSynced({productId: pid("p1"), name: "Laptop", price: 999.99})])
14
+ ->whenEvent(CatalogProductPriceChanged({productId: pid("p1"), price: 899.99}))
15
+ ->thenStateWithId("p1", {productId: pid("p1"), name: "Laptop", price: 899.99})
14
16
  )
15
17
  })
Binary file
@@ -4,12 +4,12 @@
4
4
 
5
5
  @schema
6
6
  type consumedEvent =
7
- | OrderPlaced({productIds: array<string>})
7
+ | OrderPlaced({productIds: array<CatalogSpec.ProductId.t>})
8
8
  | OrderShipped
9
9
  | OrderCancelled
10
10
 
11
11
  @schema
12
- type command = CancelOrder({orderId: string})
12
+ type command = CancelOrder({orderId: OrderId.t})
13
13
 
14
14
  @schema
15
15
  type error =
@@ -17,7 +17,7 @@ type error =
17
17
  | OrderAlreadyShipped
18
18
 
19
19
  @schema
20
- type event = OrderCancelled({orderId: string, productIds: array<string>})
20
+ type event = OrderCancelled({orderId: OrderId.t, productIds: array<CatalogSpec.ProductId.t>})
21
21
 
22
22
  type lifecycleState = Orders.lifecycle
23
23
 
Binary file
@@ -1,6 +1,11 @@
1
1
  @@reventless.behavior
2
2
 
3
- type state = {exists: bool, shipped: bool, cancelled: bool, productIds: array<string>}
3
+ type state = {
4
+ exists: bool,
5
+ shipped: bool,
6
+ cancelled: bool,
7
+ productIds: array<CatalogSpec.ProductId.t>,
8
+ }
4
9
 
5
10
  let initialState = {exists: false, shipped: false, cancelled: false, productIds: []}
6
11
 
Binary file
@@ -1,27 +1,30 @@
1
1
  @@reventless.gwt
2
2
 
3
+ let oid = OrderId.make
4
+ let pid = CatalogSpec.ProductId.make
5
+
3
6
  describe("CancelOrder StateChangeSlice", () => {
4
7
  test("non-existent order returns OrderNotFound", () =>
5
8
  givenEvents([])
6
- ->whenCmd(CancelOrder({orderId: "o1"}))
9
+ ->whenCmd(CancelOrder({orderId: oid("o1")}))
7
10
  ->thenError(OrderNotFound)
8
11
  )
9
12
 
10
13
  test("placed order produces OrderCancelled with productIds carried over", () =>
11
- givenEvents([OrderPlaced({productIds: ["p1", "p2"]})])
12
- ->whenCmd(CancelOrder({orderId: "o1"}))
13
- ->thenEvent(OrderCancelled({orderId: "o1", productIds: ["p1", "p2"]}))
14
+ givenEvents([OrderPlaced({productIds: [pid("p1"), pid("p2")]})])
15
+ ->whenCmd(CancelOrder({orderId: oid("o1")}))
16
+ ->thenEvent(OrderCancelled({orderId: oid("o1"), productIds: [pid("p1"), pid("p2")]}))
14
17
  )
15
18
 
16
19
  test("already cancelled order produces no events (idempotent)", () =>
17
- givenEvents([OrderPlaced({productIds: ["p1"]}), OrderCancelled])
18
- ->whenCmd(CancelOrder({orderId: "o1"}))
20
+ givenEvents([OrderPlaced({productIds: [pid("p1")]}), OrderCancelled])
21
+ ->whenCmd(CancelOrder({orderId: oid("o1")}))
19
22
  ->thenNoEvent
20
23
  )
21
24
 
22
25
  test("shipped order returns OrderAlreadyShipped", () =>
23
- givenEvents([OrderPlaced({productIds: ["p1"]}), OrderShipped])
24
- ->whenCmd(CancelOrder({orderId: "o1"}))
26
+ givenEvents([OrderPlaced({productIds: [pid("p1")]}), OrderShipped])
27
+ ->whenCmd(CancelOrder({orderId: oid("o1")}))
25
28
  ->thenError(OrderAlreadyShipped)
26
29
  )
27
30
  })
Binary file
@@ -9,7 +9,7 @@ type consumedEvent =
9
9
  | CustomerDeactivated
10
10
 
11
11
  @schema
12
- type command = ChangeAddress({customerId: string, address: string})
12
+ type command = ChangeAddress({customerId: CustomerId.t, address: string})
13
13
 
14
14
  @schema
15
15
  type error =
@@ -17,4 +17,4 @@ type error =
17
17
  | CustomerAlreadyDeactivated
18
18
 
19
19
  @schema
20
- type event = AddressChanged({customerId: string, address: string})
20
+ type event = AddressChanged({customerId: CustomerId.t, address: string})
Binary file
@@ -1,27 +1,29 @@
1
1
  @@reventless.gwt
2
2
 
3
+ let cid = CustomerId.make
4
+
3
5
  describe("ChangeAddress StateChangeSlice", () => {
4
6
  test("non-existent customer returns CustomerNotFound", () =>
5
7
  givenEvents([])
6
- ->whenCmd(ChangeAddress({customerId: "c1", address: "789 Pine"}))
8
+ ->whenCmd(ChangeAddress({customerId: cid("c1"), address: "789 Pine"}))
7
9
  ->thenError(CustomerNotFound)
8
10
  )
9
11
 
10
12
  test("active customer produces AddressChanged", () =>
11
13
  givenEvents([CustomerRegistered({address: "123 Main"})])
12
- ->whenCmd(ChangeAddress({customerId: "c1", address: "789 Pine"}))
13
- ->thenEvent(AddressChanged({customerId: "c1", address: "789 Pine"}))
14
+ ->whenCmd(ChangeAddress({customerId: cid("c1"), address: "789 Pine"}))
15
+ ->thenEvent(AddressChanged({customerId: cid("c1"), address: "789 Pine"}))
14
16
  )
15
17
 
16
18
  test("same address produces no events (idempotent)", () =>
17
19
  givenEvents([CustomerRegistered({address: "123 Main"})])
18
- ->whenCmd(ChangeAddress({customerId: "c1", address: "123 Main"}))
20
+ ->whenCmd(ChangeAddress({customerId: cid("c1"), address: "123 Main"}))
19
21
  ->thenNoEvent
20
22
  )
21
23
 
22
24
  test("deactivated customer returns CustomerAlreadyDeactivated", () =>
23
25
  givenEvents([CustomerRegistered({address: "123 Main"}), CustomerDeactivated])
24
- ->whenCmd(ChangeAddress({customerId: "c1", address: "789 Pine"}))
26
+ ->whenCmd(ChangeAddress({customerId: cid("c1"), address: "789 Pine"}))
25
27
  ->thenError(CustomerAlreadyDeactivated)
26
28
  )
27
29
  })
Binary file
@@ -9,7 +9,7 @@ type consumedEvent =
9
9
  | CustomerDeactivated
10
10
 
11
11
  @schema
12
- type command = ChangeEmail({customerId: string, email: string})
12
+ type command = ChangeEmail({customerId: CustomerId.t, email: string})
13
13
 
14
14
  @schema
15
15
  type error =
@@ -17,4 +17,4 @@ type error =
17
17
  | CustomerAlreadyDeactivated
18
18
 
19
19
  @schema
20
- type event = EmailChanged({customerId: string, email: string})
20
+ type event = EmailChanged({customerId: CustomerId.t, email: string})
Binary file
@@ -1,27 +1,29 @@
1
1
  @@reventless.gwt
2
2
 
3
+ let cid = CustomerId.make
4
+
3
5
  describe("ChangeEmail StateChangeSlice", () => {
4
6
  test("non-existent customer returns CustomerNotFound", () =>
5
7
  givenEvents([])
6
- ->whenCmd(ChangeEmail({customerId: "c1", email: "alice2@x.y"}))
8
+ ->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice2@x.y"}))
7
9
  ->thenError(CustomerNotFound)
8
10
  )
9
11
 
10
12
  test("active customer produces EmailChanged", () =>
11
13
  givenEvents([CustomerRegistered({email: "alice@x.y"})])
12
- ->whenCmd(ChangeEmail({customerId: "c1", email: "alice2@x.y"}))
13
- ->thenEvent(EmailChanged({customerId: "c1", email: "alice2@x.y"}))
14
+ ->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice2@x.y"}))
15
+ ->thenEvent(EmailChanged({customerId: cid("c1"), email: "alice2@x.y"}))
14
16
  )
15
17
 
16
18
  test("same email produces no events (idempotent)", () =>
17
19
  givenEvents([CustomerRegistered({email: "alice@x.y"})])
18
- ->whenCmd(ChangeEmail({customerId: "c1", email: "alice@x.y"}))
20
+ ->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice@x.y"}))
19
21
  ->thenNoEvent
20
22
  )
21
23
 
22
24
  test("deactivated customer returns CustomerAlreadyDeactivated", () =>
23
25
  givenEvents([CustomerRegistered({email: "alice@x.y"}), CustomerDeactivated])
24
- ->whenCmd(ChangeEmail({customerId: "c1", email: "alice2@x.y"}))
26
+ ->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice2@x.y"}))
25
27
  ->thenError(CustomerAlreadyDeactivated)
26
28
  )
27
29
  })
Binary file
@@ -0,0 +1,4 @@
1
+ // A customer's id: the partition its slices decide about, and an order's buyer.
2
+ include Reventless.Id.Make({
3
+ let key = "customerId"
4
+ })
Binary file
@@ -2,9 +2,12 @@
2
2
  // Projects customer events from the shared ordering event log into a Customers read model.
3
3
  @@reventless.spec
4
4
 
5
+ // Rows are keyed by this identity.
6
+ module Key = CustomerId
7
+
5
8
  @schema
6
9
  type state = {
7
- customerId: string,
10
+ customerId: CustomerId.t,
8
11
  @displayName email: string,
9
12
  address: string,
10
13
  deactivated: bool,
@@ -12,7 +15,7 @@ type state = {
12
15
 
13
16
  @schema
14
17
  type consumedEvent =
15
- | CustomerRegistered({customerId: string, email: string, address: string})
16
- | EmailChanged({customerId: string, email: string})
17
- | AddressChanged({customerId: string, address: string})
18
- | CustomerDeactivated({customerId: string})
18
+ | CustomerRegistered({customerId: CustomerId.t, email: string, address: string})
19
+ | EmailChanged({customerId: CustomerId.t, email: string})
20
+ | AddressChanged({customerId: CustomerId.t, address: string})
21
+ | CustomerDeactivated({customerId: CustomerId.t})
Binary file