@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.
- package/CHANGELOG.md +24 -0
- package/lib/bs/.compiler.log +2 -2
- package/lib/bs/OrderingPlugin.cmi +0 -0
- package/lib/bs/OrderingPlugin.cmt +0 -0
- package/lib/bs/OrderingPlugin.mlmap +2 -0
- package/lib/bs/compiler-info.json +1 -1
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct.ast +0 -0
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct.res +4 -4
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct.res.mjs +5 -4
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts.ast +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts.res +6 -3
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts.res.mjs +7 -3
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/CustomerId-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/CustomerId-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/CustomerId-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/CustomerId.ast +0 -0
- package/lib/bs/src/Customer/CustomerId.res +4 -0
- package/lib/bs/src/Customer/CustomerId.res.mjs +29 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress.ast +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress.res +2 -2
- package/lib/bs/src/Customer/StateChange/ChangeAddress.res.mjs +3 -2
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail.ast +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail.res +2 -2
- package/lib/bs/src/Customer/StateChange/ChangeEmail.res.mjs +3 -2
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer.ast +0 -0
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer.res +2 -2
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer.res.mjs +3 -2
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer.ast +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer.res +2 -2
- package/lib/bs/src/Customer/StateChange/RegisterCustomer.res.mjs +3 -2
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateView/Customers-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateView/Customers-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateView/Customers.ast +0 -0
- package/lib/bs/src/Customer/StateView/Customers.res +8 -5
- package/lib/bs/src/Customer/StateView/Customers.res.mjs +9 -5
- package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.ast +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res +29 -10
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +32 -23
- package/lib/bs/src/LifecycleModel-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/LifecycleModel-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder.ast +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder.res +2 -2
- package/lib/bs/src/Order/Automation/AutoShipOrder.res.mjs +3 -2
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation.ast +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation.res +8 -5
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation.res.mjs +7 -6
- package/lib/bs/src/Order/OrderId-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/OrderId-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/OrderId-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/OrderId.ast +0 -0
- package/lib/bs/src/Order/OrderId.res +4 -0
- package/lib/bs/src/Order/OrderId.res.mjs +29 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation.ast +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation.res +2 -2
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation.res.mjs +6 -4
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.ast +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res +5 -2
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res.mjs +4 -2
- package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder.ast +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder.res +3 -3
- package/lib/bs/src/Order/StateChange/CancelOrder.res.mjs +6 -4
- package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder_Behavior.ast +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder_Behavior.res +6 -1
- package/lib/bs/src/Order/StateChange/PlaceOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder.ast +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder.res +12 -7
- package/lib/bs/src/Order/StateChange/PlaceOrder.res.mjs +12 -9
- package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior.ast +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder_Behavior.res +1 -1
- package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder.ast +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder.res +2 -2
- package/lib/bs/src/Order/StateChange/ShipOrder.res.mjs +3 -2
- package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateView/Orders-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateView/Orders-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateView/Orders.ast +0 -0
- package/lib/bs/src/Order/StateView/Orders.res +13 -6
- package/lib/bs/src/Order/StateView/Orders.res.mjs +14 -8
- package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateView/Orders_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Plugin.res.mjs +6 -8
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +8 -6
- package/lib/bs/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +10 -6
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +7 -5
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -5
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res +7 -5
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +9 -5
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res +7 -5
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +9 -5
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res +6 -4
- package/lib/bs/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +8 -4
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res +7 -3
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +7 -3
- package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateView/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateView/Customers_GWT.ast +0 -0
- package/lib/bs/tests/Customer/StateView/Customers_GWT.res +21 -11
- package/lib/bs/tests/Customer/StateView/Customers_GWT.res.mjs +16 -11
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT.ast +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT.res +8 -4
- package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +8 -4
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.ast +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +10 -2
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +19 -7
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res +9 -7
- package/lib/bs/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +11 -7
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.ast +0 -0
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -4
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +16 -8
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res +11 -8
- package/lib/bs/tests/Order/StateChange/CancelOrder_GWT.res.mjs +19 -11
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res +19 -13
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +42 -30
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res +7 -5
- package/lib/bs/tests/Order/StateChange/ShipOrder_GWT.res.mjs +9 -5
- package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateView/Orders_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateView/Orders_GWT.res +19 -8
- package/lib/bs/tests/Order/StateView/Orders_GWT.res.mjs +35 -22
- package/lib/ocaml/.compiler.log +2 -2
- package/lib/ocaml/AutoShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AutoShipOrder.ast +0 -0
- package/lib/ocaml/AutoShipOrder.res +2 -2
- package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AutoShipOrder_Automation.ast +0 -0
- package/lib/ocaml/AutoShipOrder_Automation.res +8 -5
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AutoShipOrder_GWT.ast +0 -0
- package/lib/ocaml/AutoShipOrder_GWT.res +9 -7
- package/lib/ocaml/AvailableProducts-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts.ast +0 -0
- package/lib/ocaml/AvailableProducts.res +6 -3
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts_GWT.ast +0 -0
- package/lib/ocaml/AvailableProducts_GWT.res +7 -5
- package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder.ast +0 -0
- package/lib/ocaml/CancelOrder.res +3 -3
- package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_Behavior.ast +0 -0
- package/lib/ocaml/CancelOrder_Behavior.res +6 -1
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_GWT.ast +0 -0
- package/lib/ocaml/CancelOrder_GWT.res +11 -8
- package/lib/ocaml/ChangeAddress-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeAddress-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeAddress.ast +0 -0
- package/lib/ocaml/ChangeAddress.res +2 -2
- package/lib/ocaml/ChangeAddress_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeAddress_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeAddress_GWT.ast +0 -0
- package/lib/ocaml/ChangeAddress_GWT.res +7 -5
- package/lib/ocaml/ChangeEmail-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeEmail-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeEmail.ast +0 -0
- package/lib/ocaml/ChangeEmail.res +2 -2
- package/lib/ocaml/ChangeEmail_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeEmail_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeEmail_GWT.ast +0 -0
- package/lib/ocaml/ChangeEmail_GWT.res +7 -5
- package/lib/ocaml/CustomerId-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CustomerId-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/CustomerId-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CustomerId.ast +0 -0
- package/lib/ocaml/CustomerId.res +4 -0
- package/lib/ocaml/Customers-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers.ast +0 -0
- package/lib/ocaml/Customers.res +8 -5
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers_GWT.ast +0 -0
- package/lib/ocaml/Customers_GWT.res +21 -11
- package/lib/ocaml/Customers_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/DeactivateCustomer-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer.ast +0 -0
- package/lib/ocaml/DeactivateCustomer.res +2 -2
- package/lib/ocaml/DeactivateCustomer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/DeactivateCustomer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT.ast +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT.res +6 -4
- package/lib/ocaml/LifecycleModel-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/LifecycleModel-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderId-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderId-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/OrderId-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderId.ast +0 -0
- package/lib/ocaml/OrderId.res +4 -0
- package/lib/ocaml/OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderingPlugin.mlmap +2 -0
- package/lib/ocaml/Orders-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders.ast +0 -0
- package/lib/ocaml/Orders.res +13 -6
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping.ast +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping.res +29 -10
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT.ast +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT.res +10 -2
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_GWT.ast +0 -0
- package/lib/ocaml/Orders_GWT.res +19 -8
- package/lib/ocaml/Orders_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder.ast +0 -0
- package/lib/ocaml/PlaceOrder.res +12 -7
- package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder_Behavior.ast +0 -0
- package/lib/ocaml/PlaceOrder_Behavior.res +1 -1
- package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder_GWT.ast +0 -0
- package/lib/ocaml/PlaceOrder_GWT.res +19 -13
- package/lib/ocaml/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension_GWT.ast +0 -0
- package/lib/ocaml/Products_Extension_GWT.res +8 -4
- package/lib/ocaml/RegisterCustomer-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/RegisterCustomer.ast +0 -0
- package/lib/ocaml/RegisterCustomer.res +2 -2
- package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/RegisterCustomer_GWT.ast +0 -0
- package/lib/ocaml/RegisterCustomer_GWT.res +7 -3
- package/lib/ocaml/SendOrderConfirmation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SendOrderConfirmation.ast +0 -0
- package/lib/ocaml/SendOrderConfirmation.res +2 -2
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT.ast +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT.res +7 -4
- package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SendOrderConfirmation_Translation.ast +0 -0
- package/lib/ocaml/SendOrderConfirmation_Translation.res +5 -2
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder.ast +0 -0
- package/lib/ocaml/ShipOrder.res +2 -2
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_GWT.ast +0 -0
- package/lib/ocaml/ShipOrder_GWT.res +7 -5
- package/lib/ocaml/SyncCatalogProduct-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct.ast +0 -0
- package/lib/ocaml/SyncCatalogProduct.res +4 -4
- package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT.ast +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT.res +8 -6
- package/package.json +8 -8
- package/src/CatalogProduct/StateChange/SyncCatalogProduct.res +4 -4
- package/src/CatalogProduct/StateChange/SyncCatalogProduct.res.mjs +5 -4
- package/src/CatalogProduct/StateView/AvailableProducts.res +6 -3
- package/src/CatalogProduct/StateView/AvailableProducts.res.mjs +7 -3
- package/src/Customer/CustomerId.res +4 -0
- package/src/Customer/CustomerId.res.mjs +29 -0
- package/src/Customer/StateChange/ChangeAddress.res +2 -2
- package/src/Customer/StateChange/ChangeAddress.res.mjs +3 -2
- package/src/Customer/StateChange/ChangeEmail.res +2 -2
- package/src/Customer/StateChange/ChangeEmail.res.mjs +3 -2
- package/src/Customer/StateChange/DeactivateCustomer.res +2 -2
- package/src/Customer/StateChange/DeactivateCustomer.res.mjs +3 -2
- package/src/Customer/StateChange/RegisterCustomer.res +2 -2
- package/src/Customer/StateChange/RegisterCustomer.res.mjs +3 -2
- package/src/Customer/StateView/Customers.res +8 -5
- package/src/Customer/StateView/Customers.res.mjs +9 -5
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res +29 -10
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +32 -23
- package/src/Order/Automation/AutoShipOrder.res +2 -2
- package/src/Order/Automation/AutoShipOrder.res.mjs +3 -2
- package/src/Order/Automation/AutoShipOrder_Automation.res +8 -5
- package/src/Order/Automation/AutoShipOrder_Automation.res.mjs +7 -6
- package/src/Order/OrderId.res +4 -0
- package/src/Order/OrderId.res.mjs +29 -0
- package/src/Order/OutboundTranslation/SendOrderConfirmation.res +2 -2
- package/src/Order/OutboundTranslation/SendOrderConfirmation.res.mjs +6 -4
- package/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res +5 -2
- package/src/Order/OutboundTranslation/SendOrderConfirmation_Translation.res.mjs +4 -2
- package/src/Order/StateChange/CancelOrder.res +3 -3
- package/src/Order/StateChange/CancelOrder.res.mjs +6 -4
- package/src/Order/StateChange/CancelOrder_Behavior.res +6 -1
- package/src/Order/StateChange/PlaceOrder.res +12 -7
- package/src/Order/StateChange/PlaceOrder.res.mjs +12 -9
- package/src/Order/StateChange/PlaceOrder_Behavior.res +1 -1
- package/src/Order/StateChange/ShipOrder.res +2 -2
- package/src/Order/StateChange/ShipOrder.res.mjs +3 -2
- package/src/Order/StateView/Orders.res +13 -6
- package/src/Order/StateView/Orders.res.mjs +14 -8
- package/src/Plugin.res.mjs +6 -8
- package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res +8 -6
- package/tests/CatalogProduct/StateChange/SyncCatalogProduct_GWT.res.mjs +10 -6
- package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res +7 -5
- package/tests/CatalogProduct/StateView/AvailableProducts_GWT.res.mjs +10 -5
- package/tests/Customer/StateChange/ChangeAddress_GWT.res +7 -5
- package/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +9 -5
- package/tests/Customer/StateChange/ChangeEmail_GWT.res +7 -5
- package/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +9 -5
- package/tests/Customer/StateChange/DeactivateCustomer_GWT.res +6 -4
- package/tests/Customer/StateChange/DeactivateCustomer_GWT.res.mjs +8 -4
- package/tests/Customer/StateChange/RegisterCustomer_GWT.res +7 -3
- package/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +7 -3
- package/tests/Customer/StateView/Customers_GWT.res +21 -11
- package/tests/Customer/StateView/Customers_GWT.res.mjs +16 -11
- package/tests/Extension/Products_Extension_GWT.res +8 -4
- package/tests/Extension/Products_Extension_GWT.res.mjs +8 -4
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +10 -2
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +19 -7
- package/tests/Order/Automation/AutoShipOrder_GWT.res +9 -7
- package/tests/Order/Automation/AutoShipOrder_GWT.res.mjs +11 -7
- package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res +7 -4
- package/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT.res.mjs +16 -8
- package/tests/Order/StateChange/CancelOrder_GWT.res +11 -8
- package/tests/Order/StateChange/CancelOrder_GWT.res.mjs +19 -11
- package/tests/Order/StateChange/PlaceOrder_GWT.res +19 -13
- package/tests/Order/StateChange/PlaceOrder_GWT.res.mjs +42 -30
- package/tests/Order/StateChange/ShipOrder_GWT.res +7 -5
- package/tests/Order/StateChange/ShipOrder_GWT.res.mjs +9 -5
- package/tests/Order/StateView/Orders_GWT.res +19 -8
- package/tests/Order/StateView/Orders_GWT.res.mjs +35 -22
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
let cid = CustomerId.make
|
|
4
|
+
|
|
3
5
|
describe("DeactivateCustomer StateChangeSlice", () => {
|
|
4
6
|
test("non-existent customer returns CustomerNotFound", () =>
|
|
5
7
|
givenEvents([])
|
|
6
|
-
->whenCmd(DeactivateCustomer({customerId: "c1"}))
|
|
8
|
+
->whenCmd(DeactivateCustomer({customerId: cid("c1")}))
|
|
7
9
|
->thenError(CustomerNotFound)
|
|
8
10
|
)
|
|
9
11
|
|
|
10
12
|
test("existing customer produces CustomerDeactivated", () =>
|
|
11
13
|
givenEvents([CustomerRegistered])
|
|
12
|
-
->whenCmd(DeactivateCustomer({customerId: "c1"}))
|
|
13
|
-
->thenEvent(CustomerDeactivated({customerId: "c1"}))
|
|
14
|
+
->whenCmd(DeactivateCustomer({customerId: cid("c1")}))
|
|
15
|
+
->thenEvent(CustomerDeactivated({customerId: cid("c1")}))
|
|
14
16
|
)
|
|
15
17
|
|
|
16
18
|
test("already deactivated customer produces no events (idempotent)", () =>
|
|
17
19
|
givenEvents([CustomerRegistered, CustomerDeactivated])
|
|
18
|
-
->whenCmd(DeactivateCustomer({customerId: "c1"}))
|
|
20
|
+
->whenCmd(DeactivateCustomer({customerId: cid("c1")}))
|
|
19
21
|
->thenNoEvent
|
|
20
22
|
)
|
|
21
23
|
})
|
|
@@ -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 DeactivateCustomer$OrderingPlugin from "../../../src/Customer/StateChange/DeactivateCustomer.res.mjs";
|
|
5
6
|
import * as DeactivateCustomer_Behavior$OrderingPlugin from "../../../src/Customer/StateChange/DeactivateCustomer_Behavior.res.mjs";
|
|
@@ -33,21 +34,21 @@ let thenError = include.thenError;
|
|
|
33
34
|
describe("DeactivateCustomer StateChangeSlice", () => {
|
|
34
35
|
test("non-existent customer returns CustomerNotFound", () => thenError(whenCmd(givenEvents([]), {
|
|
35
36
|
TAG: "DeactivateCustomer",
|
|
36
|
-
customerId: "c1"
|
|
37
|
+
customerId: CustomerId$OrderingPlugin.make("c1")
|
|
37
38
|
}), "CustomerNotFound"));
|
|
38
39
|
test("existing customer produces CustomerDeactivated", () => thenEvent(whenCmd(givenEvents(["CustomerRegistered"]), {
|
|
39
40
|
TAG: "DeactivateCustomer",
|
|
40
|
-
customerId: "c1"
|
|
41
|
+
customerId: CustomerId$OrderingPlugin.make("c1")
|
|
41
42
|
}), {
|
|
42
43
|
TAG: "CustomerDeactivated",
|
|
43
|
-
customerId: "c1"
|
|
44
|
+
customerId: CustomerId$OrderingPlugin.make("c1")
|
|
44
45
|
}));
|
|
45
46
|
test("already deactivated customer produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([
|
|
46
47
|
"CustomerRegistered",
|
|
47
48
|
"CustomerDeactivated"
|
|
48
49
|
]), {
|
|
49
50
|
TAG: "DeactivateCustomer",
|
|
50
|
-
customerId: "c1"
|
|
51
|
+
customerId: CustomerId$OrderingPlugin.make("c1")
|
|
51
52
|
})));
|
|
52
53
|
});
|
|
53
54
|
|
|
@@ -65,6 +66,8 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
|
|
|
65
66
|
|
|
66
67
|
let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
|
|
67
68
|
|
|
69
|
+
let cid = CustomerId$OrderingPlugin.make;
|
|
70
|
+
|
|
68
71
|
export {
|
|
69
72
|
Spec,
|
|
70
73
|
describe,
|
|
@@ -80,5 +83,6 @@ export {
|
|
|
80
83
|
thenError,
|
|
81
84
|
thenAppendsConditionedOn,
|
|
82
85
|
thenAppendsConditionedOnExactly,
|
|
86
|
+
cid,
|
|
83
87
|
}
|
|
84
88
|
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
let cid = CustomerId.make
|
|
4
|
+
|
|
3
5
|
describe("RegisterCustomer StateChangeSlice", () => {
|
|
4
6
|
test("empty event log produces CustomerRegistered", () =>
|
|
5
7
|
givenEvents([])
|
|
6
|
-
->whenCmd(RegisterCustomer({customerId: "c1", email: "alice@x.y", address: "123 Main"}))
|
|
7
|
-
->thenEvent(
|
|
8
|
+
->whenCmd(RegisterCustomer({customerId: cid("c1"), email: "alice@x.y", address: "123 Main"}))
|
|
9
|
+
->thenEvent(
|
|
10
|
+
CustomerRegistered({customerId: cid("c1"), email: "alice@x.y", address: "123 Main"}),
|
|
11
|
+
)
|
|
8
12
|
)
|
|
9
13
|
|
|
10
14
|
test("existing customer returns CustomerAlreadyRegistered", () =>
|
|
11
15
|
givenEvents([CustomerRegistered])
|
|
12
|
-
->whenCmd(RegisterCustomer({customerId: "c1", email: "bob@x.y", address: "456 Oak"}))
|
|
16
|
+
->whenCmd(RegisterCustomer({customerId: cid("c1"), email: "bob@x.y", address: "456 Oak"}))
|
|
13
17
|
->thenError(CustomerAlreadyRegistered)
|
|
14
18
|
)
|
|
15
19
|
})
|
|
@@ -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 RegisterCustomer$OrderingPlugin from "../../../src/Customer/StateChange/RegisterCustomer.res.mjs";
|
|
5
6
|
import * as RegisterCustomer_Behavior$OrderingPlugin from "../../../src/Customer/StateChange/RegisterCustomer_Behavior.res.mjs";
|
|
@@ -31,18 +32,18 @@ let thenError = include.thenError;
|
|
|
31
32
|
describe("RegisterCustomer StateChangeSlice", () => {
|
|
32
33
|
test("empty event log produces CustomerRegistered", () => thenEvent(whenCmd(givenEvents([]), {
|
|
33
34
|
TAG: "RegisterCustomer",
|
|
34
|
-
customerId: "c1",
|
|
35
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
35
36
|
email: "alice@x.y",
|
|
36
37
|
address: "123 Main"
|
|
37
38
|
}), {
|
|
38
39
|
TAG: "CustomerRegistered",
|
|
39
|
-
customerId: "c1",
|
|
40
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
40
41
|
email: "alice@x.y",
|
|
41
42
|
address: "123 Main"
|
|
42
43
|
}));
|
|
43
44
|
test("existing customer returns CustomerAlreadyRegistered", () => thenError(whenCmd(givenEvents(["CustomerRegistered"]), {
|
|
44
45
|
TAG: "RegisterCustomer",
|
|
45
|
-
customerId: "c1",
|
|
46
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
46
47
|
email: "bob@x.y",
|
|
47
48
|
address: "456 Oak"
|
|
48
49
|
}), "CustomerAlreadyRegistered"));
|
|
@@ -64,6 +65,8 @@ let thenAppendsConditionedOn = include.thenAppendsConditionedOn;
|
|
|
64
65
|
|
|
65
66
|
let thenAppendsConditionedOnExactly = include.thenAppendsConditionedOnExactly;
|
|
66
67
|
|
|
68
|
+
let cid = CustomerId$OrderingPlugin.make;
|
|
69
|
+
|
|
67
70
|
export {
|
|
68
71
|
Spec,
|
|
69
72
|
describe,
|
|
@@ -79,5 +82,6 @@ export {
|
|
|
79
82
|
thenError,
|
|
80
83
|
thenAppendsConditionedOn,
|
|
81
84
|
thenAppendsConditionedOnExactly,
|
|
85
|
+
cid,
|
|
82
86
|
}
|
|
83
87
|
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,39 +1,49 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
let cid = CustomerId.make
|
|
4
|
+
|
|
3
5
|
describe("Customers StateViewSlice", () => {
|
|
4
6
|
test("CustomerRegistered creates a row", () =>
|
|
5
7
|
givenEvents([])
|
|
6
|
-
->whenEvent(
|
|
8
|
+
->whenEvent(
|
|
9
|
+
CustomerRegistered({customerId: cid("c1"), email: "alice@x.y", address: "123 Main"}),
|
|
10
|
+
)
|
|
7
11
|
->thenStateWithId(
|
|
8
12
|
"c1",
|
|
9
|
-
{customerId: "c1", email: "alice@x.y", address: "123 Main", deactivated: false},
|
|
13
|
+
{customerId: cid("c1"), email: "alice@x.y", address: "123 Main", deactivated: false},
|
|
10
14
|
)
|
|
11
15
|
)
|
|
12
16
|
|
|
13
17
|
test("EmailChanged updates the email", () =>
|
|
14
|
-
givenEvents([
|
|
15
|
-
|
|
18
|
+
givenEvents([
|
|
19
|
+
CustomerRegistered({customerId: cid("c1"), email: "alice@x.y", address: "123 Main"}),
|
|
20
|
+
])
|
|
21
|
+
->whenEvent(EmailChanged({customerId: cid("c1"), email: "alice2@x.y"}))
|
|
16
22
|
->thenStateWithId(
|
|
17
23
|
"c1",
|
|
18
|
-
{customerId: "c1", email: "alice2@x.y", address: "123 Main", deactivated: false},
|
|
24
|
+
{customerId: cid("c1"), email: "alice2@x.y", address: "123 Main", deactivated: false},
|
|
19
25
|
)
|
|
20
26
|
)
|
|
21
27
|
|
|
22
28
|
test("AddressChanged updates the address", () =>
|
|
23
|
-
givenEvents([
|
|
24
|
-
|
|
29
|
+
givenEvents([
|
|
30
|
+
CustomerRegistered({customerId: cid("c1"), email: "alice@x.y", address: "123 Main"}),
|
|
31
|
+
])
|
|
32
|
+
->whenEvent(AddressChanged({customerId: cid("c1"), address: "789 Pine"}))
|
|
25
33
|
->thenStateWithId(
|
|
26
34
|
"c1",
|
|
27
|
-
{customerId: "c1", email: "alice@x.y", address: "789 Pine", deactivated: false},
|
|
35
|
+
{customerId: cid("c1"), email: "alice@x.y", address: "789 Pine", deactivated: false},
|
|
28
36
|
)
|
|
29
37
|
)
|
|
30
38
|
|
|
31
39
|
test("CustomerDeactivated sets deactivated flag", () =>
|
|
32
|
-
givenEvents([
|
|
33
|
-
|
|
40
|
+
givenEvents([
|
|
41
|
+
CustomerRegistered({customerId: cid("c1"), email: "alice@x.y", address: "123 Main"}),
|
|
42
|
+
])
|
|
43
|
+
->whenEvent(CustomerDeactivated({customerId: cid("c1")}))
|
|
34
44
|
->thenStateWithId(
|
|
35
45
|
"c1",
|
|
36
|
-
{customerId: "c1", email: "alice@x.y", address: "123 Main", deactivated: true},
|
|
46
|
+
{customerId: cid("c1"), email: "alice@x.y", address: "123 Main", deactivated: true},
|
|
37
47
|
)
|
|
38
48
|
)
|
|
39
49
|
})
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Customers$OrderingPlugin from "../../../src/Customer/StateView/Customers.res.mjs";
|
|
4
|
+
import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
|
|
4
5
|
import * as Projection_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Projection_GWT.res.mjs";
|
|
5
6
|
import * as Customers_Projection$OrderingPlugin from "../../../src/Customer/StateView/Customers_Projection.res.mjs";
|
|
6
7
|
|
|
7
8
|
let include = Projection_GWT$ReventlessGwt.Make({
|
|
8
9
|
name: Customers$OrderingPlugin.name,
|
|
9
10
|
stateSchema: Customers$OrderingPlugin.stateSchema,
|
|
11
|
+
Key: CustomerId$OrderingPlugin,
|
|
10
12
|
consumedEventSchema: Customers$OrderingPlugin.consumedEventSchema,
|
|
11
13
|
subIdConfig: undefined
|
|
12
14
|
})({
|
|
@@ -26,55 +28,55 @@ let thenStateWithId = include.thenStateWithId;
|
|
|
26
28
|
describe("Customers StateViewSlice", () => {
|
|
27
29
|
test("CustomerRegistered creates a row", undefined, () => thenStateWithId(whenEvent(givenEvents([]), {
|
|
28
30
|
TAG: "CustomerRegistered",
|
|
29
|
-
customerId: "c1",
|
|
31
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
30
32
|
email: "alice@x.y",
|
|
31
33
|
address: "123 Main"
|
|
32
34
|
}), "c1", {
|
|
33
|
-
customerId: "c1",
|
|
35
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
34
36
|
email: "alice@x.y",
|
|
35
37
|
address: "123 Main",
|
|
36
38
|
deactivated: false
|
|
37
39
|
}));
|
|
38
40
|
test("EmailChanged updates the email", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
39
41
|
TAG: "CustomerRegistered",
|
|
40
|
-
customerId: "c1",
|
|
42
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
41
43
|
email: "alice@x.y",
|
|
42
44
|
address: "123 Main"
|
|
43
45
|
}]), {
|
|
44
46
|
TAG: "EmailChanged",
|
|
45
|
-
customerId: "c1",
|
|
47
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
46
48
|
email: "alice2@x.y"
|
|
47
49
|
}), "c1", {
|
|
48
|
-
customerId: "c1",
|
|
50
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
49
51
|
email: "alice2@x.y",
|
|
50
52
|
address: "123 Main",
|
|
51
53
|
deactivated: false
|
|
52
54
|
}));
|
|
53
55
|
test("AddressChanged updates the address", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
54
56
|
TAG: "CustomerRegistered",
|
|
55
|
-
customerId: "c1",
|
|
57
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
56
58
|
email: "alice@x.y",
|
|
57
59
|
address: "123 Main"
|
|
58
60
|
}]), {
|
|
59
61
|
TAG: "AddressChanged",
|
|
60
|
-
customerId: "c1",
|
|
62
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
61
63
|
address: "789 Pine"
|
|
62
64
|
}), "c1", {
|
|
63
|
-
customerId: "c1",
|
|
65
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
64
66
|
email: "alice@x.y",
|
|
65
67
|
address: "789 Pine",
|
|
66
68
|
deactivated: false
|
|
67
69
|
}));
|
|
68
70
|
test("CustomerDeactivated sets deactivated flag", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
69
71
|
TAG: "CustomerRegistered",
|
|
70
|
-
customerId: "c1",
|
|
72
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
71
73
|
email: "alice@x.y",
|
|
72
74
|
address: "123 Main"
|
|
73
75
|
}]), {
|
|
74
76
|
TAG: "CustomerDeactivated",
|
|
75
|
-
customerId: "c1"
|
|
77
|
+
customerId: CustomerId$OrderingPlugin.make("c1")
|
|
76
78
|
}), "c1", {
|
|
77
|
-
customerId: "c1",
|
|
79
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
78
80
|
email: "alice@x.y",
|
|
79
81
|
address: "123 Main",
|
|
80
82
|
deactivated: true
|
|
@@ -103,6 +105,8 @@ let thenThrow = include.thenThrow;
|
|
|
103
105
|
|
|
104
106
|
let thenFail = include.thenFail;
|
|
105
107
|
|
|
108
|
+
let cid = CustomerId$OrderingPlugin.make;
|
|
109
|
+
|
|
106
110
|
export {
|
|
107
111
|
Spec,
|
|
108
112
|
describe,
|
|
@@ -120,5 +124,6 @@ export {
|
|
|
120
124
|
thenNoState,
|
|
121
125
|
thenThrow,
|
|
122
126
|
thenFail,
|
|
127
|
+
cid,
|
|
123
128
|
}
|
|
124
129
|
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// SyncCatalogProduct commands on Ordering's local shadow slice.
|
|
3
3
|
@@reventless.gwt
|
|
4
4
|
|
|
5
|
+
let pid = CatalogSpec.ProductId.make
|
|
6
|
+
|
|
5
7
|
// `Mapping` is brought into scope by the PPX `open Products_Extension`; opening
|
|
6
8
|
// it surfaces the extension point's events and the delegate's commands.
|
|
7
9
|
open Mapping
|
|
@@ -9,13 +11,15 @@ open Mapping
|
|
|
9
11
|
describe("Products Extension delegate", () => {
|
|
10
12
|
test("ProductBecameAvailable issues SyncNewProduct", () =>
|
|
11
13
|
whenIncomingEvent(
|
|
12
|
-
ExtensionPoint.ProductBecameAvailable({productId: "p1", name: "Book", price: 9.99}),
|
|
13
|
-
)->thenPublishesCommand(
|
|
14
|
+
ExtensionPoint.ProductBecameAvailable({productId: pid("p1"), name: "Book", price: 9.99}),
|
|
15
|
+
)->thenPublishesCommand(
|
|
16
|
+
Delegate.SyncNewProduct({productId: pid("p1"), name: "Book", price: 9.99}),
|
|
17
|
+
)
|
|
14
18
|
)
|
|
15
19
|
|
|
16
20
|
test("ProductPriceChanged issues ChangeSyncedPrice", () =>
|
|
17
21
|
whenIncomingEvent(
|
|
18
|
-
ExtensionPoint.ProductPriceChanged({productId: "p1", price: 7.5}),
|
|
19
|
-
)->thenPublishesCommand(Delegate.ChangeSyncedPrice({productId: "p1", price: 7.5}))
|
|
22
|
+
ExtensionPoint.ProductPriceChanged({productId: pid("p1"), price: 7.5}),
|
|
23
|
+
)->thenPublishesCommand(Delegate.ChangeSyncedPrice({productId: pid("p1"), price: 7.5}))
|
|
20
24
|
)
|
|
21
25
|
})
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
|
|
4
5
|
import * as Delegate_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Delegate_GWT.res.mjs";
|
|
5
6
|
import * as Products_Extension$OrderingPlugin from "../../src/Extension/Products_Extension.res.mjs";
|
|
6
7
|
import * as SyncCatalogProduct$OrderingPlugin from "../../src/CatalogProduct/StateChange/SyncCatalogProduct.res.mjs";
|
|
@@ -44,22 +45,22 @@ let thenPublishesCommand = include.thenPublishesCommand;
|
|
|
44
45
|
describe("Products Extension delegate", () => {
|
|
45
46
|
test("ProductBecameAvailable issues SyncNewProduct", undefined, () => thenPublishesCommand(whenIncomingEvent({
|
|
46
47
|
TAG: "ProductBecameAvailable",
|
|
47
|
-
productId: "p1",
|
|
48
|
+
productId: ProductId$CatalogSpec.make("p1"),
|
|
48
49
|
name: "Book",
|
|
49
50
|
price: 9.99
|
|
50
51
|
}), {
|
|
51
52
|
TAG: "SyncNewProduct",
|
|
52
|
-
productId: "p1",
|
|
53
|
+
productId: ProductId$CatalogSpec.make("p1"),
|
|
53
54
|
name: "Book",
|
|
54
55
|
price: 9.99
|
|
55
56
|
}));
|
|
56
57
|
test("ProductPriceChanged issues ChangeSyncedPrice", undefined, () => thenPublishesCommand(whenIncomingEvent({
|
|
57
58
|
TAG: "ProductPriceChanged",
|
|
58
|
-
productId: "p1",
|
|
59
|
+
productId: ProductId$CatalogSpec.make("p1"),
|
|
59
60
|
price: 7.5
|
|
60
61
|
}), {
|
|
61
62
|
TAG: "ChangeSyncedPrice",
|
|
62
|
-
productId: "p1",
|
|
63
|
+
productId: ProductId$CatalogSpec.make("p1"),
|
|
63
64
|
price: 7.5
|
|
64
65
|
}));
|
|
65
66
|
});
|
|
@@ -90,6 +91,8 @@ let thenHandlesDirectives = include.thenHandlesDirectives;
|
|
|
90
91
|
|
|
91
92
|
let thenHandlesNoDirective = include.thenHandlesNoDirective;
|
|
92
93
|
|
|
94
|
+
let pid = ProductId$CatalogSpec.make;
|
|
95
|
+
|
|
93
96
|
export {
|
|
94
97
|
encCmd,
|
|
95
98
|
encEpCmd,
|
|
@@ -108,5 +111,6 @@ export {
|
|
|
108
111
|
thenHandlesDirective,
|
|
109
112
|
thenHandlesDirectives,
|
|
110
113
|
thenHandlesNoDirective,
|
|
114
|
+
pid,
|
|
111
115
|
}
|
|
112
116
|
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
// into one public per-product event each (one-to-many fan-out).
|
|
3
3
|
@@reventless.gwt
|
|
4
4
|
|
|
5
|
+
let cid = CustomerId.make
|
|
6
|
+
let oid = OrderId.make
|
|
7
|
+
let pid = CatalogSpec.ProductId.make
|
|
8
|
+
|
|
5
9
|
describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
6
10
|
test("OrderPlaced fans out to one ItemOrdered per product", () =>
|
|
7
11
|
whenDelegateEvent(
|
|
8
|
-
Delegate.OrderPlaced({
|
|
12
|
+
Delegate.OrderPlaced({
|
|
13
|
+
orderId: oid("o1"),
|
|
14
|
+
customerId: cid("c1"),
|
|
15
|
+
productIds: [pid("p1"), pid("p2")],
|
|
16
|
+
}),
|
|
9
17
|
)->thenPublishesEvents([
|
|
10
18
|
("p1", ExtensionPoint.ItemOrdered({productId: "p1", orderId: "o1", customerId: "c1"})),
|
|
11
19
|
("p2", ExtensionPoint.ItemOrdered({productId: "p2", orderId: "o1", customerId: "c1"})),
|
|
@@ -14,7 +22,7 @@ describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
|
14
22
|
|
|
15
23
|
test("OrderCancelled fans out to one ItemOrderCancelled per product", () =>
|
|
16
24
|
whenDelegateEvent(
|
|
17
|
-
Delegate.OrderCancelled({orderId: "o1", productIds: ["p1", "p2"]}),
|
|
25
|
+
Delegate.OrderCancelled({orderId: oid("o1"), productIds: [pid("p1"), pid("p2")]}),
|
|
18
26
|
)->thenPublishesEvents([
|
|
19
27
|
("p1", ExtensionPoint.ItemOrderCancelled({productId: "p1", orderId: "o1"})),
|
|
20
28
|
("p2", ExtensionPoint.ItemOrderCancelled({productId: "p2", orderId: "o1"})),
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
|
|
5
|
+
import * as OrderId$OrderingPlugin from "../../src/Order/OrderId.res.mjs";
|
|
6
|
+
import * as CustomerId$OrderingPlugin from "../../src/Customer/CustomerId.res.mjs";
|
|
4
7
|
import * as Delegate_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Delegate_GWT.res.mjs";
|
|
5
8
|
import * as Orders_ExtensionPoint$OrderingSpec from "@reventlessdev/online-shop-dcb-ordering-spec/src/Orders_ExtensionPoint.res.mjs";
|
|
6
9
|
import * as Orders_ExtensionPointMapping$OrderingPlugin from "../../src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs";
|
|
@@ -42,11 +45,11 @@ let thenPublishesEvents = include.thenPublishesEvents;
|
|
|
42
45
|
describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
43
46
|
test("OrderPlaced fans out to one ItemOrdered per product", undefined, () => thenPublishesEvents(whenDelegateEvent({
|
|
44
47
|
TAG: "OrderPlaced",
|
|
45
|
-
orderId: "o1",
|
|
46
|
-
customerId: "c1",
|
|
48
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
49
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
47
50
|
productIds: [
|
|
48
|
-
"p1",
|
|
49
|
-
"p2"
|
|
51
|
+
ProductId$CatalogSpec.make("p1"),
|
|
52
|
+
ProductId$CatalogSpec.make("p2")
|
|
50
53
|
]
|
|
51
54
|
}), [
|
|
52
55
|
[
|
|
@@ -70,10 +73,10 @@ describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
|
70
73
|
]));
|
|
71
74
|
test("OrderCancelled fans out to one ItemOrderCancelled per product", undefined, () => thenPublishesEvents(whenDelegateEvent({
|
|
72
75
|
TAG: "OrderCancelled",
|
|
73
|
-
orderId: "o1",
|
|
76
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
74
77
|
productIds: [
|
|
75
|
-
"p1",
|
|
76
|
-
"p2"
|
|
78
|
+
ProductId$CatalogSpec.make("p1"),
|
|
79
|
+
ProductId$CatalogSpec.make("p2")
|
|
77
80
|
]
|
|
78
81
|
}), [
|
|
79
82
|
[
|
|
@@ -121,6 +124,12 @@ let thenHandlesDirectives = include.thenHandlesDirectives;
|
|
|
121
124
|
|
|
122
125
|
let thenHandlesNoDirective = include.thenHandlesNoDirective;
|
|
123
126
|
|
|
127
|
+
let cid = CustomerId$OrderingPlugin.make;
|
|
128
|
+
|
|
129
|
+
let oid = OrderId$OrderingPlugin.make;
|
|
130
|
+
|
|
131
|
+
let pid = ProductId$CatalogSpec.make;
|
|
132
|
+
|
|
124
133
|
export {
|
|
125
134
|
encEvent,
|
|
126
135
|
encCommand,
|
|
@@ -139,5 +148,8 @@ export {
|
|
|
139
148
|
thenHandlesDirective,
|
|
140
149
|
thenHandlesDirectives,
|
|
141
150
|
thenHandlesNoDirective,
|
|
151
|
+
cid,
|
|
152
|
+
oid,
|
|
153
|
+
pid,
|
|
142
154
|
}
|
|
143
155
|
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -22,34 +22,36 @@ module AutoShipOrderSlice = {
|
|
|
22
22
|
|
|
23
23
|
@@reventless.gwt
|
|
24
24
|
|
|
25
|
+
let oid = OrderId.make
|
|
26
|
+
|
|
25
27
|
describe("AutoShipOrder AutomationSlice", () => {
|
|
26
28
|
test("collect: OrderPlaced creates a pending TODO", () =>
|
|
27
|
-
givenEvent(OrderPlaced({orderId: "o1"}))
|
|
29
|
+
givenEvent(OrderPlaced({orderId: oid("o1")}))
|
|
28
30
|
->whenCollect
|
|
29
|
-
->thenTodos([("o1", {orderId: "o1"})])
|
|
31
|
+
->thenTodos([("o1", {orderId: oid("o1")})])
|
|
30
32
|
)
|
|
31
33
|
|
|
32
34
|
test("collect: OrderShipped is ignored (no TODO)", () =>
|
|
33
|
-
givenEvent(OrderShipped({orderId: "o1"}))
|
|
35
|
+
givenEvent(OrderShipped({orderId: oid("o1")}))
|
|
34
36
|
->whenCollect
|
|
35
37
|
->thenTodos([])
|
|
36
38
|
)
|
|
37
39
|
|
|
38
40
|
test("resolve: OrderShipped marks the TODO done", () =>
|
|
39
|
-
givenEvent(OrderShipped({orderId: "o1"}))
|
|
41
|
+
givenEvent(OrderShipped({orderId: oid("o1")}))
|
|
40
42
|
->whenResolve
|
|
41
43
|
->thenResolved(Some("o1"))
|
|
42
44
|
)
|
|
43
45
|
|
|
44
46
|
test("resolve: OrderPlaced does not mark anything done", () =>
|
|
45
|
-
givenEvent(OrderPlaced({orderId: "o1"}))
|
|
47
|
+
givenEvent(OrderPlaced({orderId: oid("o1")}))
|
|
46
48
|
->whenResolve
|
|
47
49
|
->thenResolved(None)
|
|
48
50
|
)
|
|
49
51
|
|
|
50
52
|
test("process: pending TODO emits ShipOrder for the same id", () =>
|
|
51
|
-
givenTodo("o1", {orderId: "o1"})
|
|
53
|
+
givenTodo("o1", {orderId: oid("o1")})
|
|
52
54
|
->whenProcess
|
|
53
|
-
->thenCommand("o1", ShipOrder({orderId: "o1"}))
|
|
55
|
+
->thenCommand("o1", ShipOrder({orderId: oid("o1")}))
|
|
54
56
|
)
|
|
55
57
|
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
+
import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
|
|
3
4
|
import * as AutoShipOrder$OrderingPlugin from "../../../src/Order/Automation/AutoShipOrder.res.mjs";
|
|
4
5
|
import * as Automation_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Automation_GWT.res.mjs";
|
|
5
6
|
import * as AutoShipOrder_Automation$OrderingPlugin from "../../../src/Order/Automation/AutoShipOrder_Automation.res.mjs";
|
|
@@ -70,30 +71,30 @@ let thenCommand = include.thenCommand;
|
|
|
70
71
|
describe("AutoShipOrder AutomationSlice", () => {
|
|
71
72
|
test("collect: OrderPlaced creates a pending TODO", () => thenTodos(whenCollect(givenEvent({
|
|
72
73
|
TAG: "OrderPlaced",
|
|
73
|
-
orderId: "o1"
|
|
74
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
74
75
|
})), [[
|
|
75
76
|
"o1",
|
|
76
77
|
{
|
|
77
|
-
orderId: "o1"
|
|
78
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
78
79
|
}
|
|
79
80
|
]]));
|
|
80
81
|
test("collect: OrderShipped is ignored (no TODO)", () => thenTodos(whenCollect(givenEvent({
|
|
81
82
|
TAG: "OrderShipped",
|
|
82
|
-
orderId: "o1"
|
|
83
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
83
84
|
})), []));
|
|
84
85
|
test("resolve: OrderShipped marks the TODO done", () => thenResolved(whenResolve(givenEvent({
|
|
85
86
|
TAG: "OrderShipped",
|
|
86
|
-
orderId: "o1"
|
|
87
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
87
88
|
})), "o1"));
|
|
88
89
|
test("resolve: OrderPlaced does not mark anything done", () => thenResolved(whenResolve(givenEvent({
|
|
89
90
|
TAG: "OrderPlaced",
|
|
90
|
-
orderId: "o1"
|
|
91
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
91
92
|
})), undefined));
|
|
92
93
|
test("process: pending TODO emits ShipOrder for the same id", () => thenCommand(whenProcess(givenTodo("o1", {
|
|
93
|
-
orderId: "o1"
|
|
94
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
94
95
|
})), "o1", {
|
|
95
96
|
TAG: "ShipOrder",
|
|
96
|
-
orderId: "o1"
|
|
97
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
97
98
|
}));
|
|
98
99
|
});
|
|
99
100
|
|
|
@@ -111,6 +112,8 @@ let andThenEvents = include.andThenEvents;
|
|
|
111
112
|
|
|
112
113
|
let thenScenarioTodos = include.thenScenarioTodos;
|
|
113
114
|
|
|
115
|
+
let oid = OrderId$OrderingPlugin.make;
|
|
116
|
+
|
|
114
117
|
export {
|
|
115
118
|
testContext,
|
|
116
119
|
AutoShipOrderSlice,
|
|
@@ -131,5 +134,6 @@ export {
|
|
|
131
134
|
thenCommands,
|
|
132
135
|
andThenEvents,
|
|
133
136
|
thenScenarioTodos,
|
|
137
|
+
oid,
|
|
134
138
|
}
|
|
135
139
|
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|