@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
@@ -2,6 +2,9 @@
2
2
  // Projects order events from the shared ordering event log into an Orders read model.
3
3
  @@reventless.spec
4
4
 
5
+ // Rows are keyed by this identity.
6
+ module Key = OrderId
7
+
5
8
  @schema
6
9
  type lifecycle =
7
10
  | Placed
@@ -10,9 +13,9 @@ type lifecycle =
10
13
 
11
14
  @schema
12
15
  type state = {
13
- orderId: string,
14
- customerId: string,
15
- productIds: array<string>,
16
+ orderId: OrderId.t,
17
+ customerId: CustomerId.t,
18
+ productIds: array<CatalogSpec.ProductId.t>,
16
19
  // No annotation: the field name is the declaration. `@lifecycle` exists for
17
20
  // records whose lifecycle field is honestly called something else.
18
21
  lifecycle: lifecycle,
@@ -20,6 +23,10 @@ type state = {
20
23
 
21
24
  @schema
22
25
  type consumedEvent =
23
- | OrderPlaced({orderId: string, customerId: string, productIds: array<string>})
24
- | OrderShipped({orderId: string})
25
- | OrderCancelled({orderId: string})
26
+ | OrderPlaced({
27
+ orderId: OrderId.t,
28
+ customerId: CustomerId.t,
29
+ productIds: array<CatalogSpec.ProductId.t>,
30
+ })
31
+ | OrderShipped({orderId: OrderId.t})
32
+ | OrderCancelled({orderId: OrderId.t})
@@ -3,6 +3,9 @@
3
3
  import * as Sury from "sury";
4
4
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
5
5
  import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
6
+ import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
7
+ import * as OrderId$OrderingPlugin from "../OrderId.res.mjs";
8
+ import * as CustomerId$OrderingPlugin from "../../Customer/CustomerId.res.mjs";
6
9
 
7
10
  let lifecycleSchema = Sury.union([
8
11
  Sury.literal("Placed"),
@@ -11,26 +14,26 @@ let lifecycleSchema = Sury.union([
11
14
  ]);
12
15
 
13
16
  let stateSchema = Sury.$schema(s => ({
14
- orderId: s.m(Sury.string),
15
- customerId: s.m(Sury.string),
16
- productIds: s.m(Sury.array(Sury.string)),
17
+ orderId: s.m(OrderId$OrderingPlugin.schema),
18
+ customerId: s.m(CustomerId$OrderingPlugin.schema),
19
+ productIds: s.m(Sury.array(ProductId$CatalogSpec.schema)),
17
20
  lifecycle: s.m(lifecycleSchema)
18
21
  }));
19
22
 
20
23
  let consumedEventSchema = Sury.union([
21
24
  Sury.$schema(s => ({
22
25
  TAG: "OrderPlaced",
23
- orderId: s.m(DcbTag$Reventless.string),
24
- customerId: s.m(DcbTag$Reventless.string),
25
- productIds: s.m(Sury.array(DcbTag$Reventless.stringForKey("productId")))
26
+ orderId: s.m(DcbTag$Reventless.mark(OrderId$OrderingPlugin.schema)),
27
+ customerId: s.m(DcbTag$Reventless.mark(CustomerId$OrderingPlugin.schema)),
28
+ productIds: s.m(Sury.array(DcbTag$Reventless.mark(ProductId$CatalogSpec.schema)))
26
29
  })),
27
30
  Sury.$schema(s => ({
28
31
  TAG: "OrderShipped",
29
- orderId: s.m(DcbTag$Reventless.string)
32
+ orderId: s.m(DcbTag$Reventless.mark(OrderId$OrderingPlugin.schema))
30
33
  })),
31
34
  Sury.$schema(s => ({
32
35
  TAG: "OrderCancelled",
33
- orderId: s.m(DcbTag$Reventless.string)
36
+ orderId: s.m(DcbTag$Reventless.mark(OrderId$OrderingPlugin.schema))
34
37
  }))
35
38
  ]);
36
39
 
@@ -40,6 +43,8 @@ let name = "Orders";
40
43
 
41
44
  let Id;
42
45
 
46
+ let Key;
47
+
43
48
  let subIdConfig;
44
49
 
45
50
  let moduleUrl = "@reventlessdev/online-shop-dcb-ordering/src/Order/StateView/Orders.res.mjs";
@@ -51,6 +56,7 @@ let visibility = "Public";
51
56
  export {
52
57
  name,
53
58
  Id,
59
+ Key,
54
60
  lifecycleSchema,
55
61
  stateSchema,
56
62
  consumedEventSchema,
@@ -3,8 +3,11 @@
3
3
  import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
4
4
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
5
5
  import * as Orders$OrderingPlugin from "./Order/StateView/Orders.res.mjs";
6
+ import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
7
+ import * as OrderId$OrderingPlugin from "./Order/OrderId.res.mjs";
6
8
  import * as Customers$OrderingPlugin from "./Customer/StateView/Customers.res.mjs";
7
9
  import * as ShipOrder$OrderingPlugin from "./Order/StateChange/ShipOrder.res.mjs";
10
+ import * as CustomerId$OrderingPlugin from "./Customer/CustomerId.res.mjs";
8
11
  import * as PlaceOrder$OrderingPlugin from "./Order/StateChange/PlaceOrder.res.mjs";
9
12
  import * as CancelOrder$OrderingPlugin from "./Order/StateChange/CancelOrder.res.mjs";
10
13
  import * as ChangeEmail$OrderingPlugin from "./Customer/StateChange/ChangeEmail.res.mjs";
@@ -97,7 +100,6 @@ function Make(Platform) {
97
100
  let CancelOrderSlice = Platform.StateChangeSlice.Make({
98
101
  name: CancelOrder$OrderingPlugin.name,
99
102
  moduleUrl: CancelOrder$OrderingPlugin.moduleUrl,
100
- Id: Id$Reventless.$$String,
101
103
  consumedEventSchema: CancelOrder$OrderingPlugin.consumedEventSchema,
102
104
  errorSchema: CancelOrder$OrderingPlugin.errorSchema,
103
105
  eventSchema: CancelOrder$OrderingPlugin.eventSchema,
@@ -115,7 +117,6 @@ function Make(Platform) {
115
117
  let ChangeAddressSlice = Platform.StateChangeSlice.Make({
116
118
  name: ChangeAddress$OrderingPlugin.name,
117
119
  moduleUrl: ChangeAddress$OrderingPlugin.moduleUrl,
118
- Id: Id$Reventless.$$String,
119
120
  consumedEventSchema: ChangeAddress$OrderingPlugin.consumedEventSchema,
120
121
  errorSchema: ChangeAddress$OrderingPlugin.errorSchema,
121
122
  eventSchema: ChangeAddress$OrderingPlugin.eventSchema,
@@ -133,7 +134,6 @@ function Make(Platform) {
133
134
  let ChangeEmailSlice = Platform.StateChangeSlice.Make({
134
135
  name: ChangeEmail$OrderingPlugin.name,
135
136
  moduleUrl: ChangeEmail$OrderingPlugin.moduleUrl,
136
- Id: Id$Reventless.$$String,
137
137
  consumedEventSchema: ChangeEmail$OrderingPlugin.consumedEventSchema,
138
138
  errorSchema: ChangeEmail$OrderingPlugin.errorSchema,
139
139
  eventSchema: ChangeEmail$OrderingPlugin.eventSchema,
@@ -151,7 +151,6 @@ function Make(Platform) {
151
151
  let DeactivateCustomerSlice = Platform.StateChangeSlice.Make({
152
152
  name: DeactivateCustomer$OrderingPlugin.name,
153
153
  moduleUrl: DeactivateCustomer$OrderingPlugin.moduleUrl,
154
- Id: Id$Reventless.$$String,
155
154
  consumedEventSchema: DeactivateCustomer$OrderingPlugin.consumedEventSchema,
156
155
  errorSchema: DeactivateCustomer$OrderingPlugin.errorSchema,
157
156
  eventSchema: DeactivateCustomer$OrderingPlugin.eventSchema,
@@ -169,7 +168,6 @@ function Make(Platform) {
169
168
  let PlaceOrderSlice = Platform.StateChangeSlice.Make({
170
169
  name: PlaceOrder$OrderingPlugin.name,
171
170
  moduleUrl: PlaceOrder$OrderingPlugin.moduleUrl,
172
- Id: Id$Reventless.$$String,
173
171
  consumedEventSchema: PlaceOrder$OrderingPlugin.consumedEventSchema,
174
172
  errorSchema: PlaceOrder$OrderingPlugin.errorSchema,
175
173
  eventSchema: PlaceOrder$OrderingPlugin.eventSchema,
@@ -187,7 +185,6 @@ function Make(Platform) {
187
185
  let RegisterCustomerSlice = Platform.StateChangeSlice.Make({
188
186
  name: RegisterCustomer$OrderingPlugin.name,
189
187
  moduleUrl: RegisterCustomer$OrderingPlugin.moduleUrl,
190
- Id: Id$Reventless.$$String,
191
188
  consumedEventSchema: RegisterCustomer$OrderingPlugin.consumedEventSchema,
192
189
  errorSchema: RegisterCustomer$OrderingPlugin.errorSchema,
193
190
  eventSchema: RegisterCustomer$OrderingPlugin.eventSchema,
@@ -205,7 +202,6 @@ function Make(Platform) {
205
202
  let ShipOrderSlice = Platform.StateChangeSlice.Make({
206
203
  name: ShipOrder$OrderingPlugin.name,
207
204
  moduleUrl: ShipOrder$OrderingPlugin.moduleUrl,
208
- Id: Id$Reventless.$$String,
209
205
  consumedEventSchema: ShipOrder$OrderingPlugin.consumedEventSchema,
210
206
  errorSchema: ShipOrder$OrderingPlugin.errorSchema,
211
207
  eventSchema: ShipOrder$OrderingPlugin.eventSchema,
@@ -223,7 +219,6 @@ function Make(Platform) {
223
219
  let SyncCatalogProductSlice = Platform.StateChangeSlice.Make({
224
220
  name: SyncCatalogProduct$OrderingPlugin.name,
225
221
  moduleUrl: SyncCatalogProduct$OrderingPlugin.moduleUrl,
226
- Id: Id$Reventless.$$String,
227
222
  consumedEventSchema: SyncCatalogProduct$OrderingPlugin.consumedEventSchema,
228
223
  errorSchema: SyncCatalogProduct$OrderingPlugin.errorSchema,
229
224
  eventSchema: SyncCatalogProduct$OrderingPlugin.eventSchema,
@@ -242,6 +237,7 @@ function Make(Platform) {
242
237
  name: AvailableProducts$OrderingPlugin.name,
243
238
  moduleUrl: AvailableProducts$OrderingPlugin.moduleUrl,
244
239
  stateSchema: AvailableProducts$OrderingPlugin.stateSchema,
240
+ Key: ProductId$CatalogSpec,
245
241
  consumedEventSchema: AvailableProducts$OrderingPlugin.consumedEventSchema,
246
242
  config: AvailableProducts$OrderingPlugin.config,
247
243
  subIdConfig: undefined,
@@ -255,6 +251,7 @@ function Make(Platform) {
255
251
  name: Customers$OrderingPlugin.name,
256
252
  moduleUrl: Customers$OrderingPlugin.moduleUrl,
257
253
  stateSchema: Customers$OrderingPlugin.stateSchema,
254
+ Key: CustomerId$OrderingPlugin,
258
255
  consumedEventSchema: Customers$OrderingPlugin.consumedEventSchema,
259
256
  config: Customers$OrderingPlugin.config,
260
257
  subIdConfig: undefined,
@@ -268,6 +265,7 @@ function Make(Platform) {
268
265
  name: Orders$OrderingPlugin.name,
269
266
  moduleUrl: Orders$OrderingPlugin.moduleUrl,
270
267
  stateSchema: Orders$OrderingPlugin.stateSchema,
268
+ Key: OrderId$OrderingPlugin,
271
269
  consumedEventSchema: Orders$OrderingPlugin.consumedEventSchema,
272
270
  config: Orders$OrderingPlugin.config,
273
271
  subIdConfig: undefined,
@@ -1,27 +1,29 @@
1
1
  @@reventless.gwt
2
2
 
3
+ let pid = CatalogSpec.ProductId.make
4
+
3
5
  describe("SyncCatalogProduct StateChangeSlice", () => {
4
6
  test("SyncNewProduct produces CatalogProductSynced", () =>
5
7
  givenEvents([])
6
- ->whenCmd(SyncNewProduct({productId: "p1", name: "Laptop", price: 999.99}))
7
- ->thenEvent(CatalogProductSynced({productId: "p1", name: "Laptop", price: 999.99}))
8
+ ->whenCmd(SyncNewProduct({productId: pid("p1"), name: "Laptop", price: 999.99}))
9
+ ->thenEvent(CatalogProductSynced({productId: pid("p1"), name: "Laptop", price: 999.99}))
8
10
  )
9
11
 
10
12
  test("ChangeSyncedPrice produces CatalogProductPriceChanged", () =>
11
13
  givenEvents([CatalogProductSynced({name: "Laptop", price: 999.99})])
12
- ->whenCmd(ChangeSyncedPrice({productId: "p1", price: 899.99}))
13
- ->thenEvent(CatalogProductPriceChanged({productId: "p1", price: 899.99}))
14
+ ->whenCmd(ChangeSyncedPrice({productId: pid("p1"), price: 899.99}))
15
+ ->thenEvent(CatalogProductPriceChanged({productId: pid("p1"), price: 899.99}))
14
16
  )
15
17
 
16
18
  test("re-syncing identical product data produces no events (idempotent)", () =>
17
19
  givenEvents([CatalogProductSynced({name: "Laptop", price: 999.99})])
18
- ->whenCmd(SyncNewProduct({productId: "p1", name: "Laptop", price: 999.99}))
20
+ ->whenCmd(SyncNewProduct({productId: pid("p1"), name: "Laptop", price: 999.99}))
19
21
  ->thenNoEvent
20
22
  )
21
23
 
22
24
  test("re-applying the current price produces no events (idempotent)", () =>
23
25
  givenEvents([CatalogProductSynced({name: "Laptop", price: 999.99})])
24
- ->whenCmd(ChangeSyncedPrice({productId: "p1", price: 999.99}))
26
+ ->whenCmd(ChangeSyncedPrice({productId: pid("p1"), price: 999.99}))
25
27
  ->thenNoEvent
26
28
  )
27
29
  })
@@ -1,5 +1,6 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
+ import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
3
4
  import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
4
5
  import * as SyncCatalogProduct$OrderingPlugin from "../../../src/CatalogProduct/StateChange/SyncCatalogProduct.res.mjs";
5
6
  import * as SyncCatalogProduct_Behavior$OrderingPlugin from "../../../src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior.res.mjs";
@@ -31,12 +32,12 @@ let thenNoEvent = include.thenNoEvent;
31
32
  describe("SyncCatalogProduct StateChangeSlice", () => {
32
33
  test("SyncNewProduct produces CatalogProductSynced", () => thenEvent(whenCmd(givenEvents([]), {
33
34
  TAG: "SyncNewProduct",
34
- productId: "p1",
35
+ productId: ProductId$CatalogSpec.make("p1"),
35
36
  name: "Laptop",
36
37
  price: 999.99
37
38
  }), {
38
39
  TAG: "CatalogProductSynced",
39
- productId: "p1",
40
+ productId: ProductId$CatalogSpec.make("p1"),
40
41
  name: "Laptop",
41
42
  price: 999.99
42
43
  }));
@@ -46,11 +47,11 @@ describe("SyncCatalogProduct StateChangeSlice", () => {
46
47
  price: 999.99
47
48
  }]), {
48
49
  TAG: "ChangeSyncedPrice",
49
- productId: "p1",
50
+ productId: ProductId$CatalogSpec.make("p1"),
50
51
  price: 899.99
51
52
  }), {
52
53
  TAG: "CatalogProductPriceChanged",
53
- productId: "p1",
54
+ productId: ProductId$CatalogSpec.make("p1"),
54
55
  price: 899.99
55
56
  }));
56
57
  test("re-syncing identical product data produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([{
@@ -59,7 +60,7 @@ describe("SyncCatalogProduct StateChangeSlice", () => {
59
60
  price: 999.99
60
61
  }]), {
61
62
  TAG: "SyncNewProduct",
62
- productId: "p1",
63
+ productId: ProductId$CatalogSpec.make("p1"),
63
64
  name: "Laptop",
64
65
  price: 999.99
65
66
  })));
@@ -69,7 +70,7 @@ describe("SyncCatalogProduct StateChangeSlice", () => {
69
70
  price: 999.99
70
71
  }]), {
71
72
  TAG: "ChangeSyncedPrice",
72
- productId: "p1",
73
+ productId: ProductId$CatalogSpec.make("p1"),
73
74
  price: 999.99
74
75
  })));
75
76
  });
@@ -90,6 +91,8 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
90
91
 
91
92
  let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
92
93
 
94
+ let pid = ProductId$CatalogSpec.make;
95
+
93
96
  export {
94
97
  Spec,
95
98
  describe,
@@ -105,5 +108,6 @@ export {
105
108
  thenError,
106
109
  thenAppendsConditionedOn,
107
110
  thenAppendsConditionedOnExactly,
111
+ pid,
108
112
  }
109
113
  /* include Not a pure module */
@@ -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
  })
@@ -1,5 +1,6 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
+ import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
3
4
  import * as Projection_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Projection_GWT.res.mjs";
4
5
  import * as AvailableProducts$OrderingPlugin from "../../../src/CatalogProduct/StateView/AvailableProducts.res.mjs";
5
6
  import * as AvailableProducts_Projection$OrderingPlugin from "../../../src/CatalogProduct/StateView/AvailableProducts_Projection.res.mjs";
@@ -7,6 +8,7 @@ import * as AvailableProducts_Projection$OrderingPlugin from "../../../src/Catal
7
8
  let include = Projection_GWT$ReventlessGwt.Make({
8
9
  name: AvailableProducts$OrderingPlugin.name,
9
10
  stateSchema: AvailableProducts$OrderingPlugin.stateSchema,
11
+ Key: ProductId$CatalogSpec,
10
12
  consumedEventSchema: AvailableProducts$OrderingPlugin.consumedEventSchema,
11
13
  subIdConfig: undefined
12
14
  })({
@@ -26,25 +28,25 @@ let thenStateWithId = include.thenStateWithId;
26
28
  describe("AvailableProducts StateViewSlice", () => {
27
29
  test("CatalogProductSynced creates a row", undefined, () => thenStateWithId(whenEvent(givenEvents([]), {
28
30
  TAG: "CatalogProductSynced",
29
- productId: "p1",
31
+ productId: ProductId$CatalogSpec.make("p1"),
30
32
  name: "Laptop",
31
33
  price: 999.99
32
34
  }), "p1", {
33
- productId: "p1",
35
+ productId: ProductId$CatalogSpec.make("p1"),
34
36
  name: "Laptop",
35
37
  price: 999.99
36
38
  }));
37
39
  test("CatalogProductPriceChanged updates the price", undefined, () => thenStateWithId(whenEvent(givenEvents([{
38
40
  TAG: "CatalogProductSynced",
39
- productId: "p1",
41
+ productId: ProductId$CatalogSpec.make("p1"),
40
42
  name: "Laptop",
41
43
  price: 999.99
42
44
  }]), {
43
45
  TAG: "CatalogProductPriceChanged",
44
- productId: "p1",
46
+ productId: ProductId$CatalogSpec.make("p1"),
45
47
  price: 899.99
46
48
  }), "p1", {
47
- productId: "p1",
49
+ productId: ProductId$CatalogSpec.make("p1"),
48
50
  name: "Laptop",
49
51
  price: 899.99
50
52
  }));
@@ -72,6 +74,8 @@ let thenThrow = include.thenThrow;
72
74
 
73
75
  let thenFail = include.thenFail;
74
76
 
77
+ let pid = ProductId$CatalogSpec.make;
78
+
75
79
  export {
76
80
  Spec,
77
81
  describe,
@@ -89,5 +93,6 @@ export {
89
93
  thenNoState,
90
94
  thenThrow,
91
95
  thenFail,
96
+ pid,
92
97
  }
93
98
  /* include Not a pure module */
@@ -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
  })
@@ -1,5 +1,6 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
+ import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
3
4
  import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
4
5
  import * as ChangeAddress$OrderingPlugin from "../../../src/Customer/StateChange/ChangeAddress.res.mjs";
5
6
  import * as ChangeAddress_Behavior$OrderingPlugin from "../../../src/Customer/StateChange/ChangeAddress_Behavior.res.mjs";
@@ -33,7 +34,7 @@ let thenError = include.thenError;
33
34
  describe("ChangeAddress StateChangeSlice", () => {
34
35
  test("non-existent customer returns CustomerNotFound", () => thenError(whenCmd(givenEvents([]), {
35
36
  TAG: "ChangeAddress",
36
- customerId: "c1",
37
+ customerId: CustomerId$OrderingPlugin.make("c1"),
37
38
  address: "789 Pine"
38
39
  }), "CustomerNotFound"));
39
40
  test("active customer produces AddressChanged", () => thenEvent(whenCmd(givenEvents([{
@@ -41,11 +42,11 @@ describe("ChangeAddress StateChangeSlice", () => {
41
42
  address: "123 Main"
42
43
  }]), {
43
44
  TAG: "ChangeAddress",
44
- customerId: "c1",
45
+ customerId: CustomerId$OrderingPlugin.make("c1"),
45
46
  address: "789 Pine"
46
47
  }), {
47
48
  TAG: "AddressChanged",
48
- customerId: "c1",
49
+ customerId: CustomerId$OrderingPlugin.make("c1"),
49
50
  address: "789 Pine"
50
51
  }));
51
52
  test("same address produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([{
@@ -53,7 +54,7 @@ describe("ChangeAddress StateChangeSlice", () => {
53
54
  address: "123 Main"
54
55
  }]), {
55
56
  TAG: "ChangeAddress",
56
- customerId: "c1",
57
+ customerId: CustomerId$OrderingPlugin.make("c1"),
57
58
  address: "123 Main"
58
59
  })));
59
60
  test("deactivated customer returns CustomerAlreadyDeactivated", () => thenError(whenCmd(givenEvents([
@@ -64,7 +65,7 @@ describe("ChangeAddress StateChangeSlice", () => {
64
65
  "CustomerDeactivated"
65
66
  ]), {
66
67
  TAG: "ChangeAddress",
67
- customerId: "c1",
68
+ customerId: CustomerId$OrderingPlugin.make("c1"),
68
69
  address: "789 Pine"
69
70
  }), "CustomerAlreadyDeactivated"));
70
71
  });
@@ -83,6 +84,8 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
83
84
 
84
85
  let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
85
86
 
87
+ let cid = CustomerId$OrderingPlugin.make;
88
+
86
89
  export {
87
90
  Spec,
88
91
  describe,
@@ -98,5 +101,6 @@ export {
98
101
  thenError,
99
102
  thenAppendsConditionedOn,
100
103
  thenAppendsConditionedOnExactly,
104
+ cid,
101
105
  }
102
106
  /* include Not a pure module */
@@ -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
  })
@@ -1,5 +1,6 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
+ import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
3
4
  import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
4
5
  import * as ChangeEmail$OrderingPlugin from "../../../src/Customer/StateChange/ChangeEmail.res.mjs";
5
6
  import * as ChangeEmail_Behavior$OrderingPlugin from "../../../src/Customer/StateChange/ChangeEmail_Behavior.res.mjs";
@@ -33,7 +34,7 @@ let thenError = include.thenError;
33
34
  describe("ChangeEmail StateChangeSlice", () => {
34
35
  test("non-existent customer returns CustomerNotFound", () => thenError(whenCmd(givenEvents([]), {
35
36
  TAG: "ChangeEmail",
36
- customerId: "c1",
37
+ customerId: CustomerId$OrderingPlugin.make("c1"),
37
38
  email: "alice2@x.y"
38
39
  }), "CustomerNotFound"));
39
40
  test("active customer produces EmailChanged", () => thenEvent(whenCmd(givenEvents([{
@@ -41,11 +42,11 @@ describe("ChangeEmail StateChangeSlice", () => {
41
42
  email: "alice@x.y"
42
43
  }]), {
43
44
  TAG: "ChangeEmail",
44
- customerId: "c1",
45
+ customerId: CustomerId$OrderingPlugin.make("c1"),
45
46
  email: "alice2@x.y"
46
47
  }), {
47
48
  TAG: "EmailChanged",
48
- customerId: "c1",
49
+ customerId: CustomerId$OrderingPlugin.make("c1"),
49
50
  email: "alice2@x.y"
50
51
  }));
51
52
  test("same email produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([{
@@ -53,7 +54,7 @@ describe("ChangeEmail StateChangeSlice", () => {
53
54
  email: "alice@x.y"
54
55
  }]), {
55
56
  TAG: "ChangeEmail",
56
- customerId: "c1",
57
+ customerId: CustomerId$OrderingPlugin.make("c1"),
57
58
  email: "alice@x.y"
58
59
  })));
59
60
  test("deactivated customer returns CustomerAlreadyDeactivated", () => thenError(whenCmd(givenEvents([
@@ -64,7 +65,7 @@ describe("ChangeEmail StateChangeSlice", () => {
64
65
  "CustomerDeactivated"
65
66
  ]), {
66
67
  TAG: "ChangeEmail",
67
- customerId: "c1",
68
+ customerId: CustomerId$OrderingPlugin.make("c1"),
68
69
  email: "alice2@x.y"
69
70
  }), "CustomerAlreadyDeactivated"));
70
71
  });
@@ -83,6 +84,8 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
83
84
 
84
85
  let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
85
86
 
87
+ let cid = CustomerId$OrderingPlugin.make;
88
+
86
89
  export {
87
90
  Spec,
88
91
  describe,
@@ -98,5 +101,6 @@ export {
98
101
  thenError,
99
102
  thenAppendsConditionedOn,
100
103
  thenAppendsConditionedOnExactly,
104
+ cid,
101
105
  }
102
106
  /* include Not a pure module */