@reventlessdev/online-shop-dcb-ordering 1.0.0-alpha.250 → 1.0.0-alpha.252

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 (245) hide show
  1. package/CHANGELOG.md +16 -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 +1 -0
  6. package/lib/bs/compiler-info.json +1 -1
  7. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
  8. package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
  9. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
  10. package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
  11. package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
  12. package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
  13. package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmi +0 -0
  14. package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmt +0 -0
  15. package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
  16. package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
  17. package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
  18. package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
  19. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
  20. package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
  21. package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmi +0 -0
  22. package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmt +0 -0
  23. package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
  24. package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
  25. package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
  26. package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
  27. package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmi +0 -0
  28. package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmt +0 -0
  29. package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
  30. package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
  31. package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmi +0 -0
  32. package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmt +0 -0
  33. package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
  34. package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
  35. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
  36. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
  37. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.ast +0 -0
  38. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +14 -10
  39. package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +13 -16
  40. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
  41. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
  42. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.ast +0 -0
  43. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +8 -6
  44. package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -12
  45. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
  46. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
  47. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.ast +0 -0
  48. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res +13 -9
  49. package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +14 -17
  50. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
  51. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
  52. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.ast +0 -0
  53. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res +13 -9
  54. package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +14 -17
  55. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
  56. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
  57. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.ast +0 -0
  58. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res +8 -5
  59. package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +5 -8
  60. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
  61. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
  62. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.ast +0 -0
  63. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res +6 -6
  64. package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +8 -11
  65. package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmi +0 -0
  66. package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmt +0 -0
  67. package/lib/bs/tests/Customer/StateView/Customers_GWT.ast +0 -0
  68. package/lib/bs/tests/Customer/StateView/Customers_GWT.res +16 -20
  69. package/lib/bs/tests/Customer/StateView/Customers_GWT.res.mjs +30 -32
  70. package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
  71. package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
  72. package/lib/bs/tests/Extension/Products_Extension_GWT.ast +0 -0
  73. package/lib/bs/tests/Extension/Products_Extension_GWT.res +7 -7
  74. package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +5 -8
  75. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
  76. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
  77. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.ast +0 -0
  78. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +7 -7
  79. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +8 -19
  80. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
  81. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
  82. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.ast +0 -0
  83. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res +13 -8
  84. package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +8 -11
  85. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
  86. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
  87. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.ast +0 -0
  88. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -6
  89. package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +9 -16
  90. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
  91. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
  92. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.ast +0 -0
  93. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res +13 -10
  94. package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res.mjs +12 -19
  95. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
  96. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
  97. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.ast +0 -0
  98. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res +19 -18
  99. package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +31 -42
  100. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
  101. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
  102. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.ast +0 -0
  103. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res +10 -6
  104. package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res.mjs +6 -9
  105. package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmi +0 -0
  106. package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmt +0 -0
  107. package/lib/bs/tests/Order/StateView/Orders_GWT.ast +0 -0
  108. package/lib/bs/tests/Order/StateView/Orders_GWT.res +14 -21
  109. package/lib/bs/tests/Order/StateView/Orders_GWT.res.mjs +23 -33
  110. package/lib/bs/tests/Ordering_Examples-OrderingPlugin.cmi +0 -0
  111. package/lib/bs/tests/Ordering_Examples-OrderingPlugin.cmj +0 -0
  112. package/lib/bs/tests/Ordering_Examples-OrderingPlugin.cmt +0 -0
  113. package/lib/bs/tests/Ordering_Examples.ast +0 -0
  114. package/lib/bs/tests/Ordering_Examples.res +15 -0
  115. package/lib/bs/tests/Ordering_Examples.res.mjs +39 -0
  116. package/lib/ocaml/.compiler.log +2 -2
  117. package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
  118. package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
  119. package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
  120. package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
  121. package/lib/ocaml/AutoShipOrder_GWT.ast +0 -0
  122. package/lib/ocaml/AutoShipOrder_GWT.res +13 -8
  123. package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
  124. package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
  125. package/lib/ocaml/AvailableProducts_GWT.ast +0 -0
  126. package/lib/ocaml/AvailableProducts_GWT.res +8 -6
  127. package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
  128. package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
  129. package/lib/ocaml/CancelOrder-OrderingPlugin.cmi +0 -0
  130. package/lib/ocaml/CancelOrder-OrderingPlugin.cmt +0 -0
  131. package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
  132. package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
  133. package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
  134. package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
  135. package/lib/ocaml/CancelOrder_GWT.ast +0 -0
  136. package/lib/ocaml/CancelOrder_GWT.res +13 -10
  137. package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
  138. package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
  139. package/lib/ocaml/ChangeAddress_GWT.ast +0 -0
  140. package/lib/ocaml/ChangeAddress_GWT.res +13 -9
  141. package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
  142. package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
  143. package/lib/ocaml/ChangeEmail_GWT.ast +0 -0
  144. package/lib/ocaml/ChangeEmail_GWT.res +13 -9
  145. package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
  146. package/lib/ocaml/Customers_GWT-OrderingPlugin.cmt +0 -0
  147. package/lib/ocaml/Customers_GWT.ast +0 -0
  148. package/lib/ocaml/Customers_GWT.res +16 -20
  149. package/lib/ocaml/Customers_Projection-OrderingPlugin.cmi +0 -0
  150. package/lib/ocaml/Customers_Projection-OrderingPlugin.cmt +0 -0
  151. package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
  152. package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
  153. package/lib/ocaml/DeactivateCustomer_GWT.ast +0 -0
  154. package/lib/ocaml/DeactivateCustomer_GWT.res +8 -5
  155. package/lib/ocaml/OrderingPlugin.cmi +0 -0
  156. package/lib/ocaml/OrderingPlugin.cmt +0 -0
  157. package/lib/ocaml/OrderingPlugin.mlmap +1 -0
  158. package/lib/ocaml/Ordering_Examples-OrderingPlugin.cmi +0 -0
  159. package/lib/ocaml/Ordering_Examples-OrderingPlugin.cmj +0 -0
  160. package/lib/ocaml/Ordering_Examples-OrderingPlugin.cmt +0 -0
  161. package/lib/ocaml/Ordering_Examples.ast +0 -0
  162. package/lib/ocaml/Ordering_Examples.res +15 -0
  163. package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
  164. package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
  165. package/lib/ocaml/Orders_ExtensionPointMapping_GWT.ast +0 -0
  166. package/lib/ocaml/Orders_ExtensionPointMapping_GWT.res +7 -7
  167. package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
  168. package/lib/ocaml/Orders_GWT-OrderingPlugin.cmt +0 -0
  169. package/lib/ocaml/Orders_GWT.ast +0 -0
  170. package/lib/ocaml/Orders_GWT.res +14 -21
  171. package/lib/ocaml/Orders_Projection-OrderingPlugin.cmi +0 -0
  172. package/lib/ocaml/Orders_Projection-OrderingPlugin.cmt +0 -0
  173. package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
  174. package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
  175. package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
  176. package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
  177. package/lib/ocaml/PlaceOrder_GWT.ast +0 -0
  178. package/lib/ocaml/PlaceOrder_GWT.res +19 -18
  179. package/lib/ocaml/Plugin-OrderingPlugin.cmi +0 -0
  180. package/lib/ocaml/Plugin-OrderingPlugin.cmt +0 -0
  181. package/lib/ocaml/Products_Extension-OrderingPlugin.cmi +0 -0
  182. package/lib/ocaml/Products_Extension-OrderingPlugin.cmt +0 -0
  183. package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
  184. package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
  185. package/lib/ocaml/Products_Extension_GWT.ast +0 -0
  186. package/lib/ocaml/Products_Extension_GWT.res +7 -7
  187. package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
  188. package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
  189. package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
  190. package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
  191. package/lib/ocaml/RegisterCustomer_GWT.ast +0 -0
  192. package/lib/ocaml/RegisterCustomer_GWT.res +6 -6
  193. package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
  194. package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
  195. package/lib/ocaml/SendOrderConfirmation_GWT.ast +0 -0
  196. package/lib/ocaml/SendOrderConfirmation_GWT.res +7 -6
  197. package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
  198. package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
  199. package/lib/ocaml/ShipOrder-OrderingPlugin.cmi +0 -0
  200. package/lib/ocaml/ShipOrder-OrderingPlugin.cmt +0 -0
  201. package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
  202. package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
  203. package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
  204. package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
  205. package/lib/ocaml/ShipOrder_GWT.ast +0 -0
  206. package/lib/ocaml/ShipOrder_GWT.res +10 -6
  207. package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
  208. package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
  209. package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
  210. package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
  211. package/lib/ocaml/SyncCatalogProduct_GWT.ast +0 -0
  212. package/lib/ocaml/SyncCatalogProduct_GWT.res +14 -10
  213. package/package.json +8 -8
  214. package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +14 -10
  215. package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +13 -16
  216. package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +8 -6
  217. package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -12
  218. package/tests/Customer/StateChange/ChangeAddress_GWT.res +13 -9
  219. package/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +14 -17
  220. package/tests/Customer/StateChange/ChangeEmail_GWT.res +13 -9
  221. package/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +14 -17
  222. package/tests/Customer/StateChange/DeactivateCustomer_GWT.res +8 -5
  223. package/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +5 -8
  224. package/tests/Customer/StateChange/RegisterCustomer_GWT.res +6 -6
  225. package/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +8 -11
  226. package/tests/Customer/StateView/Customers_GWT.res +16 -20
  227. package/tests/Customer/StateView/Customers_GWT.res.mjs +30 -32
  228. package/tests/Extension/Products_Extension_GWT.res +7 -7
  229. package/tests/Extension/Products_Extension_GWT.res.mjs +5 -8
  230. package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +7 -7
  231. package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +8 -19
  232. package/tests/Order/Automation/AutoShipOrder_GWT.res +13 -8
  233. package/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +8 -11
  234. package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -6
  235. package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +9 -16
  236. package/tests/Order/StateChange/CancelOrder_GWT.res +13 -10
  237. package/tests/Order/StateChange/CancelOrder_GWT.res.mjs +12 -19
  238. package/tests/Order/StateChange/PlaceOrder_GWT.res +19 -18
  239. package/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +31 -42
  240. package/tests/Order/StateChange/ShipOrder_GWT.res +10 -6
  241. package/tests/Order/StateChange/ShipOrder_GWT.res.mjs +6 -9
  242. package/tests/Order/StateView/Orders_GWT.res +14 -21
  243. package/tests/Order/StateView/Orders_GWT.res.mjs +23 -33
  244. package/tests/Ordering_Examples.res +15 -0
  245. package/tests/Ordering_Examples.res.mjs +39 -0
@@ -1,8 +1,8 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
4
3
  import * as AutoShipOrder$OrderingPlugin from "../../../src/Order/Automation/AutoShipOrder.res.mjs";
5
4
  import * as Automation_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Automation_GWT.res.mjs";
5
+ import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
6
6
  import * as AutoShipOrder_Automation$OrderingPlugin from "../../../src/Order/Automation/AutoShipOrder_Automation.res.mjs";
7
7
 
8
8
  let testContext = {
@@ -71,30 +71,30 @@ let thenCommand = include.thenCommand;
71
71
  describe("AutoShipOrder AutomationSlice", () => {
72
72
  test("collect: OrderPlaced creates a pending TODO", () => thenTodos(whenCollect(givenEvent({
73
73
  TAG: "OrderPlaced",
74
- orderId: OrderId$OrderingPlugin.make("o1")
74
+ orderId: Ordering_Examples$OrderingPlugin.o1
75
75
  })), [[
76
76
  "o1",
77
77
  {
78
- orderId: OrderId$OrderingPlugin.make("o1")
78
+ orderId: Ordering_Examples$OrderingPlugin.o1
79
79
  }
80
80
  ]]));
81
81
  test("collect: OrderShipped is ignored (no TODO)", () => thenTodos(whenCollect(givenEvent({
82
82
  TAG: "OrderShipped",
83
- orderId: OrderId$OrderingPlugin.make("o1")
83
+ orderId: Ordering_Examples$OrderingPlugin.o1
84
84
  })), []));
85
85
  test("resolve: OrderShipped marks the TODO done", () => thenResolved(whenResolve(givenEvent({
86
86
  TAG: "OrderShipped",
87
- orderId: OrderId$OrderingPlugin.make("o1")
87
+ orderId: Ordering_Examples$OrderingPlugin.o1
88
88
  })), "o1"));
89
89
  test("resolve: OrderPlaced does not mark anything done", () => thenResolved(whenResolve(givenEvent({
90
90
  TAG: "OrderPlaced",
91
- orderId: OrderId$OrderingPlugin.make("o1")
91
+ orderId: Ordering_Examples$OrderingPlugin.o1
92
92
  })), undefined));
93
93
  test("process: pending TODO emits ShipOrder for the same id", () => thenCommand(whenProcess(givenTodo("o1", {
94
- orderId: OrderId$OrderingPlugin.make("o1")
94
+ orderId: Ordering_Examples$OrderingPlugin.o1
95
95
  })), "o1", {
96
96
  TAG: "ShipOrder",
97
- orderId: OrderId$OrderingPlugin.make("o1")
97
+ orderId: Ordering_Examples$OrderingPlugin.o1
98
98
  }));
99
99
  });
100
100
 
@@ -112,8 +112,6 @@ let andThenEvents = include.andThenEvents;
112
112
 
113
113
  let thenScenarioTodos = include.thenScenarioTodos;
114
114
 
115
- let oid = OrderId$OrderingPlugin.make;
116
-
117
115
  export {
118
116
  testContext,
119
117
  AutoShipOrderSlice,
@@ -134,6 +132,5 @@ export {
134
132
  thenCommands,
135
133
  andThenEvents,
136
134
  thenScenarioTodos,
137
- oid,
138
135
  }
139
136
  /* include Not a pure module */
@@ -12,24 +12,25 @@ module SendOrderConfirmationSlice = {
12
12
 
13
13
  @@reventless.gwt
14
14
 
15
- let cid = CustomerId.make
16
- let oid = OrderId.make
15
+ open Ordering_Examples
17
16
 
18
17
  describe("SendOrderConfirmation OutboundTranslationSlice", () => {
19
18
  testSync("collect: OrderPlaced queues an outbound TODO", () =>
20
- givenEvent(OrderPlaced({orderId: oid("o1"), customerId: cid("c1")}))
19
+ givenEvent(OrderPlaced({orderId: o1, customerId: c1}))
21
20
  ->whenCollect
22
- ->thenTodos([("o1", {orderId: oid("o1"), customerId: cid("c1")})])
21
+ ->thenTodos([("o1", {orderId: o1, customerId: c1})])
23
22
  )
24
23
 
24
+ // scenario-id: f72032f8-25ba-482e-be6e-4c765908bb70
25
25
  test("translate success marks the TODO Completed", () =>
26
- givenTodo("o1", {orderId: oid("o1"), customerId: cid("c1")})
26
+ givenTodo("o1", {orderId: o1, customerId: c1})
27
27
  ->whenTranslateMocked((_id, _item) => Promise.resolve(Ok(None)))
28
28
  ->thenTodoStatus("o1", #Completed)
29
29
  )
30
30
 
31
+ // scenario-id: a4563058-8777-4756-8e12-983fcd0e8f20
31
32
  test("translate failure leaves the TODO Pending for retry", () =>
32
- givenTodo("o1", {orderId: oid("o1"), customerId: cid("c1")})
33
+ givenTodo("o1", {orderId: o1, customerId: c1})
33
34
  ->whenTranslateMocked((_id, _item) => Promise.resolve(Error("smtp down")))
34
35
  ->thenTodoStatus("o1", #Pending)
35
36
  )
@@ -1,7 +1,6 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
4
- import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
3
+ import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
5
4
  import * as SendOrderConfirmation$OrderingPlugin from "../../../src/Order/OutboundTranslation/SendOrderConfirmation.res.mjs";
6
5
  import * as OutboundTranslation_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/OutboundTranslation_GWT.res.mjs";
7
6
  import * as SendOrderConfirmation_Translation$OrderingPlugin from "../../../src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res.mjs";
@@ -52,25 +51,25 @@ let thenTodoStatus = include.thenTodoStatus;
52
51
  describe("SendOrderConfirmation OutboundTranslationSlice", () => {
53
52
  testSync("collect: OrderPlaced queues an outbound TODO", () => thenTodos(whenCollect(givenEvent({
54
53
  TAG: "OrderPlaced",
55
- orderId: OrderId$OrderingPlugin.make("o1"),
56
- customerId: CustomerId$OrderingPlugin.make("c1")
54
+ orderId: Ordering_Examples$OrderingPlugin.o1,
55
+ customerId: Ordering_Examples$OrderingPlugin.c1
57
56
  }), undefined), [[
58
57
  "o1",
59
58
  {
60
- orderId: OrderId$OrderingPlugin.make("o1"),
61
- customerId: CustomerId$OrderingPlugin.make("c1")
59
+ orderId: Ordering_Examples$OrderingPlugin.o1,
60
+ customerId: Ordering_Examples$OrderingPlugin.c1
62
61
  }
63
62
  ]]));
64
63
  test("translate success marks the TODO Completed", undefined, () => thenTodoStatus(whenTranslateMocked(givenTodo("o1", {
65
- orderId: OrderId$OrderingPlugin.make("o1"),
66
- customerId: CustomerId$OrderingPlugin.make("c1")
64
+ orderId: Ordering_Examples$OrderingPlugin.o1,
65
+ customerId: Ordering_Examples$OrderingPlugin.c1
67
66
  }), (_id, _item) => Promise.resolve({
68
67
  TAG: "Ok",
69
68
  _0: undefined
70
69
  })), "o1", "Completed"));
71
70
  test("translate failure leaves the TODO Pending for retry", undefined, () => thenTodoStatus(whenTranslateMocked(givenTodo("o1", {
72
- orderId: OrderId$OrderingPlugin.make("o1"),
73
- customerId: CustomerId$OrderingPlugin.make("c1")
71
+ orderId: Ordering_Examples$OrderingPlugin.o1,
72
+ customerId: Ordering_Examples$OrderingPlugin.c1
74
73
  }), (_id, _item) => Promise.resolve({
75
74
  TAG: "Error",
76
75
  _0: "smtp down"
@@ -87,10 +86,6 @@ let thenNoCommand = include.thenNoCommand;
87
86
 
88
87
  let thenRetryRecorded = include.thenRetryRecorded;
89
88
 
90
- let cid = CustomerId$OrderingPlugin.make;
91
-
92
- let oid = OrderId$OrderingPlugin.make;
93
-
94
89
  export {
95
90
  SendOrderConfirmationSlice,
96
91
  Spec,
@@ -107,7 +102,5 @@ export {
107
102
  thenNoCommand,
108
103
  thenRetryRecorded,
109
104
  thenTodoStatus,
110
- cid,
111
- oid,
112
105
  }
113
106
  /* include Not a pure module */
@@ -1,30 +1,33 @@
1
1
  @@reventless.gwt
2
2
 
3
- let oid = OrderId.make
4
- let pid = CatalogSpec.ProductId.make
3
+ open Ordering_Examples
5
4
 
6
5
  describe("CancelOrder StateChangeSlice", () => {
6
+ // scenario-id: 8ec10480-8490-4004-a83c-1efa3d94695c
7
7
  test("non-existent order returns OrderNotFound", () =>
8
8
  givenEvents([])
9
- ->whenCmd(CancelOrder({orderId: oid("o1")}))
9
+ ->whenCmd(CancelOrder({orderId: o1}))
10
10
  ->thenError(OrderNotFound)
11
11
  )
12
12
 
13
+ // scenario-id: df6a7117-bfed-4393-ae46-a35b13339e32
13
14
  test("placed order produces OrderCancelled with productIds carried over", () =>
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")]}))
15
+ givenEvents([OrderPlaced({productIds: [p1, p2]})])
16
+ ->whenCmd(CancelOrder({orderId: o1}))
17
+ ->thenEvent(OrderCancelled({orderId: o1, productIds: [p1, p2]}))
17
18
  )
18
19
 
20
+ // scenario-id: e639ee37-866c-45f9-ac7b-d2a902703578
19
21
  test("already cancelled order produces no events (idempotent)", () =>
20
- givenEvents([OrderPlaced({productIds: [pid("p1")]}), OrderCancelled])
21
- ->whenCmd(CancelOrder({orderId: oid("o1")}))
22
+ givenEvents([OrderPlaced({productIds: [p1]}), OrderCancelled])
23
+ ->whenCmd(CancelOrder({orderId: o1}))
22
24
  ->thenNoEvent
23
25
  )
24
26
 
27
+ // scenario-id: eb8ae949-bd89-4b4c-9b4c-25992727e172
25
28
  test("shipped order returns OrderAlreadyShipped", () =>
26
- givenEvents([OrderPlaced({productIds: [pid("p1")]}), OrderShipped])
27
- ->whenCmd(CancelOrder({orderId: oid("o1")}))
29
+ givenEvents([OrderPlaced({productIds: [p1]}), OrderShipped])
30
+ ->whenCmd(CancelOrder({orderId: o1}))
28
31
  ->thenError(OrderAlreadyShipped)
29
32
  )
30
33
  })
@@ -1,9 +1,8 @@
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";
4
- import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
5
3
  import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
6
4
  import * as CancelOrder$OrderingPlugin from "../../../src/Order/StateChange/CancelOrder.res.mjs";
5
+ import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
7
6
  import * as CancelOrder_Behavior$OrderingPlugin from "../../../src/Order/StateChange/CancelOrder_Behavior.res.mjs";
8
7
 
9
8
  let include = Behavior_GWT$ReventlessGwt.Make({
@@ -35,44 +34,44 @@ let thenError = include.thenError;
35
34
  describe("CancelOrder StateChangeSlice", () => {
36
35
  test("non-existent order returns OrderNotFound", () => thenError(whenCmd(givenEvents([]), {
37
36
  TAG: "CancelOrder",
38
- orderId: OrderId$OrderingPlugin.make("o1")
37
+ orderId: Ordering_Examples$OrderingPlugin.o1
39
38
  }), "OrderNotFound"));
40
39
  test("placed order produces OrderCancelled with productIds carried over", () => thenEvent(whenCmd(givenEvents([{
41
40
  TAG: "OrderPlaced",
42
41
  productIds: [
43
- ProductId$CatalogSpec.make("p1"),
44
- ProductId$CatalogSpec.make("p2")
42
+ Ordering_Examples$OrderingPlugin.p1,
43
+ Ordering_Examples$OrderingPlugin.p2
45
44
  ]
46
45
  }]), {
47
46
  TAG: "CancelOrder",
48
- orderId: OrderId$OrderingPlugin.make("o1")
47
+ orderId: Ordering_Examples$OrderingPlugin.o1
49
48
  }), {
50
49
  TAG: "OrderCancelled",
51
- orderId: OrderId$OrderingPlugin.make("o1"),
50
+ orderId: Ordering_Examples$OrderingPlugin.o1,
52
51
  productIds: [
53
- ProductId$CatalogSpec.make("p1"),
54
- ProductId$CatalogSpec.make("p2")
52
+ Ordering_Examples$OrderingPlugin.p1,
53
+ Ordering_Examples$OrderingPlugin.p2
55
54
  ]
56
55
  }));
57
56
  test("already cancelled order produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([
58
57
  {
59
58
  TAG: "OrderPlaced",
60
- productIds: [ProductId$CatalogSpec.make("p1")]
59
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
61
60
  },
62
61
  "OrderCancelled"
63
62
  ]), {
64
63
  TAG: "CancelOrder",
65
- orderId: OrderId$OrderingPlugin.make("o1")
64
+ orderId: Ordering_Examples$OrderingPlugin.o1
66
65
  })));
67
66
  test("shipped order returns OrderAlreadyShipped", () => thenError(whenCmd(givenEvents([
68
67
  {
69
68
  TAG: "OrderPlaced",
70
- productIds: [ProductId$CatalogSpec.make("p1")]
69
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
71
70
  },
72
71
  "OrderShipped"
73
72
  ]), {
74
73
  TAG: "CancelOrder",
75
- orderId: OrderId$OrderingPlugin.make("o1")
74
+ orderId: Ordering_Examples$OrderingPlugin.o1
76
75
  }), "OrderAlreadyShipped"));
77
76
  });
78
77
 
@@ -90,10 +89,6 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
90
89
 
91
90
  let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
92
91
 
93
- let oid = OrderId$OrderingPlugin.make;
94
-
95
- let pid = ProductId$CatalogSpec.make;
96
-
97
92
  export {
98
93
  Spec,
99
94
  describe,
@@ -109,7 +104,5 @@ export {
109
104
  thenError,
110
105
  thenAppendsConditionedOn,
111
106
  thenAppendsConditionedOnExactly,
112
- oid,
113
- pid,
114
107
  }
115
108
  /* include Not a pure module */
@@ -1,39 +1,40 @@
1
1
  @@reventless.gwt
2
2
 
3
- let cid = CustomerId.make
4
- let oid = OrderId.make
5
- let pid = CatalogSpec.ProductId.make
3
+ open Ordering_Examples
6
4
 
7
5
  describe("PlaceOrder StateChangeSlice", () => {
6
+ // scenario-id: 2165f9d4-87c0-4f25-a4f6-c3e0ac59a41b
8
7
  test("requires referenced products to be synced first", () =>
9
8
  givenEvents([])
10
- ->whenCmd(PlaceOrder({orderId: oid("o1"), customerId: cid("c1"), productIds: [pid("p1")]}))
11
- ->thenError(ProductsNotAvailable({missing: [pid("p1")]}))
9
+ ->whenCmd(PlaceOrder({orderId: o1, customerId: c1, productIds: [p1]}))
10
+ ->thenError(ProductsNotAvailable({missing: [p1]}))
12
11
  )
13
12
 
13
+ // scenario-id: d20adf8e-1883-4e2f-8d22-10f2470a1f44
14
14
  test("placement succeeds when products are available", () =>
15
- givenEvents([CatalogProductSynced({productId: pid("p1")})])
16
- ->whenCmd(PlaceOrder({orderId: oid("o1"), customerId: cid("c1"), productIds: [pid("p1")]}))
17
- ->thenEvent(OrderPlaced({orderId: oid("o1"), customerId: cid("c1"), productIds: [pid("p1")]}))
15
+ givenEvents([CatalogProductSynced({productId: p1})])
16
+ ->whenCmd(PlaceOrder({orderId: o1, customerId: c1, productIds: [p1]}))
17
+ ->thenEvent(OrderPlaced({orderId: o1, customerId: c1, productIds: [p1]}))
18
18
  )
19
19
 
20
+ // scenario-id: 7594b170-f241-4eb9-83d1-aaa651a80f66
20
21
  test("partial product availability returns ProductsNotAvailable with missing list", () =>
21
- givenEvents([CatalogProductSynced({productId: pid("p1")})])
22
- ->whenCmd(
23
- PlaceOrder({orderId: oid("o1"), customerId: cid("c1"), productIds: [pid("p1"), pid("p2")]}),
24
- )
25
- ->thenError(ProductsNotAvailable({missing: [pid("p2")]}))
22
+ givenEvents([CatalogProductSynced({productId: p1})])
23
+ ->whenCmd(PlaceOrder({orderId: o1, customerId: c1, productIds: [p1, p2]}))
24
+ ->thenError(ProductsNotAvailable({missing: [p2]}))
26
25
  )
27
26
 
27
+ // scenario-id: 2d259e4c-b8d5-40ae-b5f5-018cbf31eaa4
28
28
  test("re-placing the same orderId returns OrderAlreadyPlaced", () =>
29
- givenEvents([CatalogProductSynced({productId: pid("p1")}), OrderPlaced({orderId: oid("o1")})])
30
- ->whenCmd(PlaceOrder({orderId: oid("o1"), customerId: cid("c1"), productIds: [pid("p1")]}))
29
+ givenEvents([CatalogProductSynced({productId: p1}), OrderPlaced({orderId: o1})])
30
+ ->whenCmd(PlaceOrder({orderId: o1, customerId: c1, productIds: [p1]}))
31
31
  ->thenError(OrderAlreadyPlaced)
32
32
  )
33
33
 
34
+ // scenario-id: 2fc00acf-df4c-4c2e-8280-a82dedad5fb0
34
35
  test("a sibling OrderPlaced for a different orderId does not block placement", () =>
35
- givenEvents([CatalogProductSynced({productId: pid("p1")}), OrderPlaced({orderId: oid("o2")})])
36
- ->whenCmd(PlaceOrder({orderId: oid("o1"), customerId: cid("c1"), productIds: [pid("p1")]}))
37
- ->thenEvent(OrderPlaced({orderId: oid("o1"), customerId: cid("c1"), productIds: [pid("p1")]}))
36
+ givenEvents([CatalogProductSynced({productId: p1}), OrderPlaced({orderId: o2})])
37
+ ->whenCmd(PlaceOrder({orderId: o1, customerId: c1, productIds: [p1]}))
38
+ ->thenEvent(OrderPlaced({orderId: o1, customerId: c1, productIds: [p1]}))
38
39
  )
39
40
  })
@@ -1,10 +1,8 @@
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";
4
- import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
5
- import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
6
3
  import * as PlaceOrder$OrderingPlugin from "../../../src/Order/StateChange/PlaceOrder.res.mjs";
7
4
  import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
5
+ import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
8
6
  import * as PlaceOrder_Behavior$OrderingPlugin from "../../../src/Order/StateChange/PlaceOrder_Behavior.res.mjs";
9
7
 
10
8
  let include = Behavior_GWT$ReventlessGwt.Make({
@@ -34,76 +32,76 @@ let thenError = include.thenError;
34
32
  describe("PlaceOrder StateChangeSlice", () => {
35
33
  test("requires referenced products to be synced first", () => thenError(whenCmd(givenEvents([]), {
36
34
  TAG: "PlaceOrder",
37
- orderId: OrderId$OrderingPlugin.make("o1"),
38
- customerId: CustomerId$OrderingPlugin.make("c1"),
39
- productIds: [ProductId$CatalogSpec.make("p1")]
35
+ orderId: Ordering_Examples$OrderingPlugin.o1,
36
+ customerId: Ordering_Examples$OrderingPlugin.c1,
37
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
40
38
  }), {
41
39
  TAG: "ProductsNotAvailable",
42
- missing: [ProductId$CatalogSpec.make("p1")]
40
+ missing: [Ordering_Examples$OrderingPlugin.p1]
43
41
  }));
44
42
  test("placement succeeds when products are available", () => thenEvent(whenCmd(givenEvents([{
45
43
  TAG: "CatalogProductSynced",
46
- productId: ProductId$CatalogSpec.make("p1")
44
+ productId: Ordering_Examples$OrderingPlugin.p1
47
45
  }]), {
48
46
  TAG: "PlaceOrder",
49
- orderId: OrderId$OrderingPlugin.make("o1"),
50
- customerId: CustomerId$OrderingPlugin.make("c1"),
51
- productIds: [ProductId$CatalogSpec.make("p1")]
47
+ orderId: Ordering_Examples$OrderingPlugin.o1,
48
+ customerId: Ordering_Examples$OrderingPlugin.c1,
49
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
52
50
  }), {
53
51
  TAG: "OrderPlaced",
54
- orderId: OrderId$OrderingPlugin.make("o1"),
55
- customerId: CustomerId$OrderingPlugin.make("c1"),
56
- productIds: [ProductId$CatalogSpec.make("p1")]
52
+ orderId: Ordering_Examples$OrderingPlugin.o1,
53
+ customerId: Ordering_Examples$OrderingPlugin.c1,
54
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
57
55
  }));
58
56
  test("partial product availability returns ProductsNotAvailable with missing list", () => thenError(whenCmd(givenEvents([{
59
57
  TAG: "CatalogProductSynced",
60
- productId: ProductId$CatalogSpec.make("p1")
58
+ productId: Ordering_Examples$OrderingPlugin.p1
61
59
  }]), {
62
60
  TAG: "PlaceOrder",
63
- orderId: OrderId$OrderingPlugin.make("o1"),
64
- customerId: CustomerId$OrderingPlugin.make("c1"),
61
+ orderId: Ordering_Examples$OrderingPlugin.o1,
62
+ customerId: Ordering_Examples$OrderingPlugin.c1,
65
63
  productIds: [
66
- ProductId$CatalogSpec.make("p1"),
67
- ProductId$CatalogSpec.make("p2")
64
+ Ordering_Examples$OrderingPlugin.p1,
65
+ Ordering_Examples$OrderingPlugin.p2
68
66
  ]
69
67
  }), {
70
68
  TAG: "ProductsNotAvailable",
71
- missing: [ProductId$CatalogSpec.make("p2")]
69
+ missing: [Ordering_Examples$OrderingPlugin.p2]
72
70
  }));
73
71
  test("re-placing the same orderId returns OrderAlreadyPlaced", () => thenError(whenCmd(givenEvents([
74
72
  {
75
73
  TAG: "CatalogProductSynced",
76
- productId: ProductId$CatalogSpec.make("p1")
74
+ productId: Ordering_Examples$OrderingPlugin.p1
77
75
  },
78
76
  {
79
77
  TAG: "OrderPlaced",
80
- orderId: OrderId$OrderingPlugin.make("o1")
78
+ orderId: Ordering_Examples$OrderingPlugin.o1
81
79
  }
82
80
  ]), {
83
81
  TAG: "PlaceOrder",
84
- orderId: OrderId$OrderingPlugin.make("o1"),
85
- customerId: CustomerId$OrderingPlugin.make("c1"),
86
- productIds: [ProductId$CatalogSpec.make("p1")]
82
+ orderId: Ordering_Examples$OrderingPlugin.o1,
83
+ customerId: Ordering_Examples$OrderingPlugin.c1,
84
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
87
85
  }), "OrderAlreadyPlaced"));
88
86
  test("a sibling OrderPlaced for a different orderId does not block placement", () => thenEvent(whenCmd(givenEvents([
89
87
  {
90
88
  TAG: "CatalogProductSynced",
91
- productId: ProductId$CatalogSpec.make("p1")
89
+ productId: Ordering_Examples$OrderingPlugin.p1
92
90
  },
93
91
  {
94
92
  TAG: "OrderPlaced",
95
- orderId: OrderId$OrderingPlugin.make("o2")
93
+ orderId: Ordering_Examples$OrderingPlugin.o2
96
94
  }
97
95
  ]), {
98
96
  TAG: "PlaceOrder",
99
- orderId: OrderId$OrderingPlugin.make("o1"),
100
- customerId: CustomerId$OrderingPlugin.make("c1"),
101
- productIds: [ProductId$CatalogSpec.make("p1")]
97
+ orderId: Ordering_Examples$OrderingPlugin.o1,
98
+ customerId: Ordering_Examples$OrderingPlugin.c1,
99
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
102
100
  }), {
103
101
  TAG: "OrderPlaced",
104
- orderId: OrderId$OrderingPlugin.make("o1"),
105
- customerId: CustomerId$OrderingPlugin.make("c1"),
106
- productIds: [ProductId$CatalogSpec.make("p1")]
102
+ orderId: Ordering_Examples$OrderingPlugin.o1,
103
+ customerId: Ordering_Examples$OrderingPlugin.c1,
104
+ productIds: [Ordering_Examples$OrderingPlugin.p1]
107
105
  }));
108
106
  });
109
107
 
@@ -123,12 +121,6 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
123
121
 
124
122
  let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
125
123
 
126
- let cid = CustomerId$OrderingPlugin.make;
127
-
128
- let oid = OrderId$OrderingPlugin.make;
129
-
130
- let pid = ProductId$CatalogSpec.make;
131
-
132
124
  export {
133
125
  Spec,
134
126
  describe,
@@ -144,8 +136,5 @@ export {
144
136
  thenError,
145
137
  thenAppendsConditionedOn,
146
138
  thenAppendsConditionedOnExactly,
147
- cid,
148
- oid,
149
- pid,
150
139
  }
151
140
  /* include Not a pure module */
@@ -1,29 +1,33 @@
1
1
  @@reventless.gwt
2
2
 
3
- let oid = OrderId.make
3
+ open Ordering_Examples
4
4
 
5
5
  describe("ShipOrder StateChangeSlice", () => {
6
+ // scenario-id: 2146c7ce-d052-4b18-8d15-373916445f80
6
7
  test("non-existent order returns OrderNotFound", () =>
7
8
  givenEvents([])
8
- ->whenCmd(ShipOrder({orderId: oid("o1")}))
9
+ ->whenCmd(ShipOrder({orderId: o1}))
9
10
  ->thenError(OrderNotFound)
10
11
  )
11
12
 
13
+ // scenario-id: 76062151-57bb-468b-9fee-915e35e8d67e
12
14
  test("placed order produces OrderShipped", () =>
13
15
  givenEvents([OrderPlaced])
14
- ->whenCmd(ShipOrder({orderId: oid("o1")}))
15
- ->thenEvent(OrderShipped({orderId: oid("o1")}))
16
+ ->whenCmd(ShipOrder({orderId: o1}))
17
+ ->thenEvent(OrderShipped({orderId: o1}))
16
18
  )
17
19
 
20
+ // scenario-id: 3ffc1f1f-8611-4c99-90b3-435b441140d3
18
21
  test("already shipped order produces no events (idempotent)", () =>
19
22
  givenEvents([OrderPlaced, OrderShipped])
20
- ->whenCmd(ShipOrder({orderId: oid("o1")}))
23
+ ->whenCmd(ShipOrder({orderId: o1}))
21
24
  ->thenNoEvent
22
25
  )
23
26
 
27
+ // scenario-id: 23a22483-510c-458d-aa40-17c442470b22
24
28
  test("cancelled order returns OrderAlreadyCancelled", () =>
25
29
  givenEvents([OrderPlaced, OrderCancelled])
26
- ->whenCmd(ShipOrder({orderId: oid("o1")}))
30
+ ->whenCmd(ShipOrder({orderId: o1}))
27
31
  ->thenError(OrderAlreadyCancelled)
28
32
  )
29
33
  })
@@ -1,8 +1,8 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
4
3
  import * as ShipOrder$OrderingPlugin from "../../../src/Order/StateChange/ShipOrder.res.mjs";
5
4
  import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
5
+ import * as Ordering_Examples$OrderingPlugin from "../../Ordering_Examples.res.mjs";
6
6
  import * as ShipOrder_Behavior$OrderingPlugin from "../../../src/Order/StateChange/ShipOrder_Behavior.res.mjs";
7
7
 
8
8
  let include = Behavior_GWT$ReventlessGwt.Make({
@@ -34,28 +34,28 @@ let thenError = include.thenError;
34
34
  describe("ShipOrder StateChangeSlice", () => {
35
35
  test("non-existent order returns OrderNotFound", () => thenError(whenCmd(givenEvents([]), {
36
36
  TAG: "ShipOrder",
37
- orderId: OrderId$OrderingPlugin.make("o1")
37
+ orderId: Ordering_Examples$OrderingPlugin.o1
38
38
  }), "OrderNotFound"));
39
39
  test("placed order produces OrderShipped", () => thenEvent(whenCmd(givenEvents(["OrderPlaced"]), {
40
40
  TAG: "ShipOrder",
41
- orderId: OrderId$OrderingPlugin.make("o1")
41
+ orderId: Ordering_Examples$OrderingPlugin.o1
42
42
  }), {
43
43
  TAG: "OrderShipped",
44
- orderId: OrderId$OrderingPlugin.make("o1")
44
+ orderId: Ordering_Examples$OrderingPlugin.o1
45
45
  }));
46
46
  test("already shipped order produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([
47
47
  "OrderPlaced",
48
48
  "OrderShipped"
49
49
  ]), {
50
50
  TAG: "ShipOrder",
51
- orderId: OrderId$OrderingPlugin.make("o1")
51
+ orderId: Ordering_Examples$OrderingPlugin.o1
52
52
  })));
53
53
  test("cancelled order returns OrderAlreadyCancelled", () => thenError(whenCmd(givenEvents([
54
54
  "OrderPlaced",
55
55
  "OrderCancelled"
56
56
  ]), {
57
57
  TAG: "ShipOrder",
58
- orderId: OrderId$OrderingPlugin.make("o1")
58
+ orderId: Ordering_Examples$OrderingPlugin.o1
59
59
  }), "OrderAlreadyCancelled"));
60
60
  });
61
61
 
@@ -73,8 +73,6 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
73
73
 
74
74
  let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
75
75
 
76
- let oid = OrderId$OrderingPlugin.make;
77
-
78
76
  export {
79
77
  Spec,
80
78
  describe,
@@ -90,6 +88,5 @@ export {
90
88
  thenError,
91
89
  thenAppendsConditionedOn,
92
90
  thenAppendsConditionedOnExactly,
93
- oid,
94
91
  }
95
92
  /* include Not a pure module */