@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,12 +1,16 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Orders$OrderingPlugin from "../../../src/Order/StateView/Orders.res.mjs";
|
|
4
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-dcb-catalog-spec/src/ProductId.res.mjs";
|
|
5
|
+
import * as OrderId$OrderingPlugin from "../../../src/Order/OrderId.res.mjs";
|
|
6
|
+
import * as CustomerId$OrderingPlugin from "../../../src/Customer/CustomerId.res.mjs";
|
|
4
7
|
import * as Projection_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Projection_GWT.res.mjs";
|
|
5
8
|
import * as Orders_Projection$OrderingPlugin from "../../../src/Order/StateView/Orders_Projection.res.mjs";
|
|
6
9
|
|
|
7
10
|
let include = Projection_GWT$ReventlessGwt.Make({
|
|
8
11
|
name: Orders$OrderingPlugin.name,
|
|
9
12
|
stateSchema: Orders$OrderingPlugin.stateSchema,
|
|
13
|
+
Key: OrderId$OrderingPlugin,
|
|
10
14
|
consumedEventSchema: Orders$OrderingPlugin.consumedEventSchema,
|
|
11
15
|
subIdConfig: undefined
|
|
12
16
|
})({
|
|
@@ -26,47 +30,47 @@ let thenStateWithId = include.thenStateWithId;
|
|
|
26
30
|
describe("Orders StateViewSlice", () => {
|
|
27
31
|
test("OrderPlaced creates a row with status Placed", undefined, () => thenStateWithId(whenEvent(givenEvents([]), {
|
|
28
32
|
TAG: "OrderPlaced",
|
|
29
|
-
orderId: "o1",
|
|
30
|
-
customerId: "c1",
|
|
33
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
34
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
31
35
|
productIds: [
|
|
32
|
-
"p1",
|
|
33
|
-
"p2"
|
|
36
|
+
ProductId$CatalogSpec.make("p1"),
|
|
37
|
+
ProductId$CatalogSpec.make("p2")
|
|
34
38
|
]
|
|
35
39
|
}), "o1", {
|
|
36
|
-
orderId: "o1",
|
|
37
|
-
customerId: "c1",
|
|
40
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
41
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
38
42
|
productIds: [
|
|
39
|
-
"p1",
|
|
40
|
-
"p2"
|
|
43
|
+
ProductId$CatalogSpec.make("p1"),
|
|
44
|
+
ProductId$CatalogSpec.make("p2")
|
|
41
45
|
],
|
|
42
46
|
lifecycle: "Placed"
|
|
43
47
|
}));
|
|
44
48
|
test("OrderShipped updates status to Shipped", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
45
49
|
TAG: "OrderPlaced",
|
|
46
|
-
orderId: "o1",
|
|
47
|
-
customerId: "c1",
|
|
48
|
-
productIds: ["p1"]
|
|
50
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
51
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
52
|
+
productIds: [ProductId$CatalogSpec.make("p1")]
|
|
49
53
|
}]), {
|
|
50
54
|
TAG: "OrderShipped",
|
|
51
|
-
orderId: "o1"
|
|
55
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
52
56
|
}), "o1", {
|
|
53
|
-
orderId: "o1",
|
|
54
|
-
customerId: "c1",
|
|
55
|
-
productIds: ["p1"],
|
|
57
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
58
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
59
|
+
productIds: [ProductId$CatalogSpec.make("p1")],
|
|
56
60
|
lifecycle: "Shipped"
|
|
57
61
|
}));
|
|
58
62
|
test("OrderCancelled updates status to Cancelled", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
59
63
|
TAG: "OrderPlaced",
|
|
60
|
-
orderId: "o1",
|
|
61
|
-
customerId: "c1",
|
|
62
|
-
productIds: ["p1"]
|
|
64
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
65
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
66
|
+
productIds: [ProductId$CatalogSpec.make("p1")]
|
|
63
67
|
}]), {
|
|
64
68
|
TAG: "OrderCancelled",
|
|
65
|
-
orderId: "o1"
|
|
69
|
+
orderId: OrderId$OrderingPlugin.make("o1")
|
|
66
70
|
}), "o1", {
|
|
67
|
-
orderId: "o1",
|
|
68
|
-
customerId: "c1",
|
|
69
|
-
productIds: ["p1"],
|
|
71
|
+
orderId: OrderId$OrderingPlugin.make("o1"),
|
|
72
|
+
customerId: CustomerId$OrderingPlugin.make("c1"),
|
|
73
|
+
productIds: [ProductId$CatalogSpec.make("p1")],
|
|
70
74
|
lifecycle: "Cancelled"
|
|
71
75
|
}));
|
|
72
76
|
});
|
|
@@ -93,6 +97,12 @@ let thenThrow = include.thenThrow;
|
|
|
93
97
|
|
|
94
98
|
let thenFail = include.thenFail;
|
|
95
99
|
|
|
100
|
+
let cid = CustomerId$OrderingPlugin.make;
|
|
101
|
+
|
|
102
|
+
let oid = OrderId$OrderingPlugin.make;
|
|
103
|
+
|
|
104
|
+
let pid = ProductId$CatalogSpec.make;
|
|
105
|
+
|
|
96
106
|
export {
|
|
97
107
|
Spec,
|
|
98
108
|
describe,
|
|
@@ -110,5 +120,8 @@ export {
|
|
|
110
120
|
thenNoState,
|
|
111
121
|
thenThrow,
|
|
112
122
|
thenFail,
|
|
123
|
+
cid,
|
|
124
|
+
oid,
|
|
125
|
+
pid,
|
|
113
126
|
}
|
|
114
127
|
/* include Not a pure module */
|
package/lib/ocaml/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1789997169658)
|
|
2
|
+
#Done(1789997172500)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
@@reventless.spec
|
|
10
10
|
|
|
11
11
|
@schema
|
|
12
|
-
type todoItem = {orderId:
|
|
12
|
+
type todoItem = {orderId: OrderId.t}
|
|
13
13
|
|
|
14
14
|
@schema
|
|
15
|
-
type command = ShipOrder({orderId:
|
|
15
|
+
type command = ShipOrder({orderId: OrderId.t})
|
|
16
16
|
|
|
17
17
|
let maxRetries = 3
|
|
18
18
|
let heartbeatInterval = 60
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,8 +5,8 @@ module OrderingDcbSource = {
|
|
|
5
5
|
let name = "OrderingDcbEventLog"
|
|
6
6
|
@schema
|
|
7
7
|
type event =
|
|
8
|
-
| OrderPlaced({orderId:
|
|
9
|
-
| OrderShipped({orderId:
|
|
8
|
+
| OrderPlaced({orderId: OrderId.t})
|
|
9
|
+
| OrderShipped({orderId: OrderId.t})
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
module FromOrderingDcb = Mapping.Make(
|
|
@@ -17,13 +17,16 @@ module FromOrderingDcb = Mapping.Make(
|
|
|
17
17
|
|
|
18
18
|
let collect = (event, ~sourceId as _, _ctx) =>
|
|
19
19
|
switch event {
|
|
20
|
-
|
|
20
|
+
// To-do rows are keyed by string; the item keeps the typed id.
|
|
21
|
+
| OrderPlaced({orderId}) => [
|
|
22
|
+
(orderId->OrderId.toString, ({orderId: orderId}: AutoShipOrder.todoItem)),
|
|
23
|
+
]
|
|
21
24
|
| OrderShipped(_) => []
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
let resolve = event =>
|
|
25
28
|
switch event {
|
|
26
|
-
| OrderShipped({orderId}) => Some(orderId)
|
|
29
|
+
| OrderShipped({orderId}) => Some(orderId->OrderId.toString)
|
|
27
30
|
| OrderPlaced(_) => None
|
|
28
31
|
}
|
|
29
32
|
},
|
|
@@ -31,7 +34,7 @@ module FromOrderingDcb = Mapping.Make(
|
|
|
31
34
|
|
|
32
35
|
let mappings: array<module(Mapping)> = [module(FromOrderingDcb)]
|
|
33
36
|
|
|
34
|
-
let process = (id,
|
|
37
|
+
let process = (id, item: AutoShipOrder.todoItem) => Some((id, ShipOrder({orderId: item.orderId})))
|
|
35
38
|
|
|
36
39
|
// Nothing to say: an order the shipping automation gave up on is a Placed order
|
|
37
40
|
// that never shipped, which the Orders view already shows. A command here would
|
|
Binary file
|
|
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
|
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
@@reventless.spec
|
|
5
5
|
@@reventless.visibility(Internal)
|
|
6
6
|
|
|
7
|
+
// Rows are keyed by this identity.
|
|
8
|
+
module Key = CatalogSpec.ProductId
|
|
9
|
+
|
|
7
10
|
@schema
|
|
8
|
-
type state = {productId:
|
|
11
|
+
type state = {productId: CatalogSpec.ProductId.t, name: string, price: float}
|
|
9
12
|
|
|
10
13
|
@schema
|
|
11
14
|
type consumedEvent =
|
|
12
|
-
| CatalogProductSynced({productId:
|
|
13
|
-
| CatalogProductPriceChanged({productId:
|
|
15
|
+
| CatalogProductSynced({productId: CatalogSpec.ProductId.t, name: string, price: float})
|
|
16
|
+
| CatalogProductPriceChanged({productId: CatalogSpec.ProductId.t, price: float})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
let pid = CatalogSpec.ProductId.make
|
|
4
|
+
|
|
3
5
|
describe("AvailableProducts StateViewSlice", () => {
|
|
4
6
|
test("CatalogProductSynced creates a row", () =>
|
|
5
7
|
givenEvents([])
|
|
6
|
-
->whenEvent(CatalogProductSynced({productId: "p1", name: "Laptop", price: 999.99}))
|
|
7
|
-
->thenStateWithId("p1", {productId: "p1", name: "Laptop", price: 999.99})
|
|
8
|
+
->whenEvent(CatalogProductSynced({productId: pid("p1"), name: "Laptop", price: 999.99}))
|
|
9
|
+
->thenStateWithId("p1", {productId: pid("p1"), name: "Laptop", price: 999.99})
|
|
8
10
|
)
|
|
9
11
|
|
|
10
12
|
test("CatalogProductPriceChanged updates the price", () =>
|
|
11
|
-
givenEvents([CatalogProductSynced({productId: "p1", name: "Laptop", price: 999.99})])
|
|
12
|
-
->whenEvent(CatalogProductPriceChanged({productId: "p1", price: 899.99}))
|
|
13
|
-
->thenStateWithId("p1", {productId: "p1", name: "Laptop", price: 899.99})
|
|
13
|
+
givenEvents([CatalogProductSynced({productId: pid("p1"), name: "Laptop", price: 999.99})])
|
|
14
|
+
->whenEvent(CatalogProductPriceChanged({productId: pid("p1"), price: 899.99}))
|
|
15
|
+
->thenStateWithId("p1", {productId: pid("p1"), name: "Laptop", price: 899.99})
|
|
14
16
|
)
|
|
15
17
|
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
@schema
|
|
6
6
|
type consumedEvent =
|
|
7
|
-
| OrderPlaced({productIds: array<
|
|
7
|
+
| OrderPlaced({productIds: array<CatalogSpec.ProductId.t>})
|
|
8
8
|
| OrderShipped
|
|
9
9
|
| OrderCancelled
|
|
10
10
|
|
|
11
11
|
@schema
|
|
12
|
-
type command = CancelOrder({orderId:
|
|
12
|
+
type command = CancelOrder({orderId: OrderId.t})
|
|
13
13
|
|
|
14
14
|
@schema
|
|
15
15
|
type error =
|
|
@@ -17,7 +17,7 @@ type error =
|
|
|
17
17
|
| OrderAlreadyShipped
|
|
18
18
|
|
|
19
19
|
@schema
|
|
20
|
-
type event = OrderCancelled({orderId:
|
|
20
|
+
type event = OrderCancelled({orderId: OrderId.t, productIds: array<CatalogSpec.ProductId.t>})
|
|
21
21
|
|
|
22
22
|
type lifecycleState = Orders.lifecycle
|
|
23
23
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
@@reventless.behavior
|
|
2
2
|
|
|
3
|
-
type state = {
|
|
3
|
+
type state = {
|
|
4
|
+
exists: bool,
|
|
5
|
+
shipped: bool,
|
|
6
|
+
cancelled: bool,
|
|
7
|
+
productIds: array<CatalogSpec.ProductId.t>,
|
|
8
|
+
}
|
|
4
9
|
|
|
5
10
|
let initialState = {exists: false, shipped: false, cancelled: false, productIds: []}
|
|
6
11
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
let oid = OrderId.make
|
|
4
|
+
let pid = CatalogSpec.ProductId.make
|
|
5
|
+
|
|
3
6
|
describe("CancelOrder StateChangeSlice", () => {
|
|
4
7
|
test("non-existent order returns OrderNotFound", () =>
|
|
5
8
|
givenEvents([])
|
|
6
|
-
->whenCmd(CancelOrder({orderId: "o1"}))
|
|
9
|
+
->whenCmd(CancelOrder({orderId: oid("o1")}))
|
|
7
10
|
->thenError(OrderNotFound)
|
|
8
11
|
)
|
|
9
12
|
|
|
10
13
|
test("placed order produces OrderCancelled with productIds carried over", () =>
|
|
11
|
-
givenEvents([OrderPlaced({productIds: ["p1", "p2"]})])
|
|
12
|
-
->whenCmd(CancelOrder({orderId: "o1"}))
|
|
13
|
-
->thenEvent(OrderCancelled({orderId: "o1", productIds: ["p1", "p2"]}))
|
|
14
|
+
givenEvents([OrderPlaced({productIds: [pid("p1"), pid("p2")]})])
|
|
15
|
+
->whenCmd(CancelOrder({orderId: oid("o1")}))
|
|
16
|
+
->thenEvent(OrderCancelled({orderId: oid("o1"), productIds: [pid("p1"), pid("p2")]}))
|
|
14
17
|
)
|
|
15
18
|
|
|
16
19
|
test("already cancelled order produces no events (idempotent)", () =>
|
|
17
|
-
givenEvents([OrderPlaced({productIds: ["p1"]}), OrderCancelled])
|
|
18
|
-
->whenCmd(CancelOrder({orderId: "o1"}))
|
|
20
|
+
givenEvents([OrderPlaced({productIds: [pid("p1")]}), OrderCancelled])
|
|
21
|
+
->whenCmd(CancelOrder({orderId: oid("o1")}))
|
|
19
22
|
->thenNoEvent
|
|
20
23
|
)
|
|
21
24
|
|
|
22
25
|
test("shipped order returns OrderAlreadyShipped", () =>
|
|
23
|
-
givenEvents([OrderPlaced({productIds: ["p1"]}), OrderShipped])
|
|
24
|
-
->whenCmd(CancelOrder({orderId: "o1"}))
|
|
26
|
+
givenEvents([OrderPlaced({productIds: [pid("p1")]}), OrderShipped])
|
|
27
|
+
->whenCmd(CancelOrder({orderId: oid("o1")}))
|
|
25
28
|
->thenError(OrderAlreadyShipped)
|
|
26
29
|
)
|
|
27
30
|
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -9,7 +9,7 @@ type consumedEvent =
|
|
|
9
9
|
| CustomerDeactivated
|
|
10
10
|
|
|
11
11
|
@schema
|
|
12
|
-
type command = ChangeAddress({customerId:
|
|
12
|
+
type command = ChangeAddress({customerId: CustomerId.t, address: string})
|
|
13
13
|
|
|
14
14
|
@schema
|
|
15
15
|
type error =
|
|
@@ -17,4 +17,4 @@ type error =
|
|
|
17
17
|
| CustomerAlreadyDeactivated
|
|
18
18
|
|
|
19
19
|
@schema
|
|
20
|
-
type event = AddressChanged({customerId:
|
|
20
|
+
type event = AddressChanged({customerId: CustomerId.t, address: string})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
let cid = CustomerId.make
|
|
4
|
+
|
|
3
5
|
describe("ChangeAddress StateChangeSlice", () => {
|
|
4
6
|
test("non-existent customer returns CustomerNotFound", () =>
|
|
5
7
|
givenEvents([])
|
|
6
|
-
->whenCmd(ChangeAddress({customerId: "c1", address: "789 Pine"}))
|
|
8
|
+
->whenCmd(ChangeAddress({customerId: cid("c1"), address: "789 Pine"}))
|
|
7
9
|
->thenError(CustomerNotFound)
|
|
8
10
|
)
|
|
9
11
|
|
|
10
12
|
test("active customer produces AddressChanged", () =>
|
|
11
13
|
givenEvents([CustomerRegistered({address: "123 Main"})])
|
|
12
|
-
->whenCmd(ChangeAddress({customerId: "c1", address: "789 Pine"}))
|
|
13
|
-
->thenEvent(AddressChanged({customerId: "c1", address: "789 Pine"}))
|
|
14
|
+
->whenCmd(ChangeAddress({customerId: cid("c1"), address: "789 Pine"}))
|
|
15
|
+
->thenEvent(AddressChanged({customerId: cid("c1"), address: "789 Pine"}))
|
|
14
16
|
)
|
|
15
17
|
|
|
16
18
|
test("same address produces no events (idempotent)", () =>
|
|
17
19
|
givenEvents([CustomerRegistered({address: "123 Main"})])
|
|
18
|
-
->whenCmd(ChangeAddress({customerId: "c1", address: "123 Main"}))
|
|
20
|
+
->whenCmd(ChangeAddress({customerId: cid("c1"), address: "123 Main"}))
|
|
19
21
|
->thenNoEvent
|
|
20
22
|
)
|
|
21
23
|
|
|
22
24
|
test("deactivated customer returns CustomerAlreadyDeactivated", () =>
|
|
23
25
|
givenEvents([CustomerRegistered({address: "123 Main"}), CustomerDeactivated])
|
|
24
|
-
->whenCmd(ChangeAddress({customerId: "c1", address: "789 Pine"}))
|
|
26
|
+
->whenCmd(ChangeAddress({customerId: cid("c1"), address: "789 Pine"}))
|
|
25
27
|
->thenError(CustomerAlreadyDeactivated)
|
|
26
28
|
)
|
|
27
29
|
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -9,7 +9,7 @@ type consumedEvent =
|
|
|
9
9
|
| CustomerDeactivated
|
|
10
10
|
|
|
11
11
|
@schema
|
|
12
|
-
type command = ChangeEmail({customerId:
|
|
12
|
+
type command = ChangeEmail({customerId: CustomerId.t, email: string})
|
|
13
13
|
|
|
14
14
|
@schema
|
|
15
15
|
type error =
|
|
@@ -17,4 +17,4 @@ type error =
|
|
|
17
17
|
| CustomerAlreadyDeactivated
|
|
18
18
|
|
|
19
19
|
@schema
|
|
20
|
-
type event = EmailChanged({customerId:
|
|
20
|
+
type event = EmailChanged({customerId: CustomerId.t, email: string})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
let cid = CustomerId.make
|
|
4
|
+
|
|
3
5
|
describe("ChangeEmail StateChangeSlice", () => {
|
|
4
6
|
test("non-existent customer returns CustomerNotFound", () =>
|
|
5
7
|
givenEvents([])
|
|
6
|
-
->whenCmd(ChangeEmail({customerId: "c1", email: "alice2@x.y"}))
|
|
8
|
+
->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice2@x.y"}))
|
|
7
9
|
->thenError(CustomerNotFound)
|
|
8
10
|
)
|
|
9
11
|
|
|
10
12
|
test("active customer produces EmailChanged", () =>
|
|
11
13
|
givenEvents([CustomerRegistered({email: "alice@x.y"})])
|
|
12
|
-
->whenCmd(ChangeEmail({customerId: "c1", email: "alice2@x.y"}))
|
|
13
|
-
->thenEvent(EmailChanged({customerId: "c1", email: "alice2@x.y"}))
|
|
14
|
+
->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice2@x.y"}))
|
|
15
|
+
->thenEvent(EmailChanged({customerId: cid("c1"), email: "alice2@x.y"}))
|
|
14
16
|
)
|
|
15
17
|
|
|
16
18
|
test("same email produces no events (idempotent)", () =>
|
|
17
19
|
givenEvents([CustomerRegistered({email: "alice@x.y"})])
|
|
18
|
-
->whenCmd(ChangeEmail({customerId: "c1", email: "alice@x.y"}))
|
|
20
|
+
->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice@x.y"}))
|
|
19
21
|
->thenNoEvent
|
|
20
22
|
)
|
|
21
23
|
|
|
22
24
|
test("deactivated customer returns CustomerAlreadyDeactivated", () =>
|
|
23
25
|
givenEvents([CustomerRegistered({email: "alice@x.y"}), CustomerDeactivated])
|
|
24
|
-
->whenCmd(ChangeEmail({customerId: "c1", email: "alice2@x.y"}))
|
|
26
|
+
->whenCmd(ChangeEmail({customerId: cid("c1"), email: "alice2@x.y"}))
|
|
25
27
|
->thenError(CustomerAlreadyDeactivated)
|
|
26
28
|
)
|
|
27
29
|
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Customers.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Customers.res
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
// Projects customer events from the shared ordering event log into a Customers read model.
|
|
3
3
|
@@reventless.spec
|
|
4
4
|
|
|
5
|
+
// Rows are keyed by this identity.
|
|
6
|
+
module Key = CustomerId
|
|
7
|
+
|
|
5
8
|
@schema
|
|
6
9
|
type state = {
|
|
7
|
-
customerId:
|
|
10
|
+
customerId: CustomerId.t,
|
|
8
11
|
@displayName email: string,
|
|
9
12
|
address: string,
|
|
10
13
|
deactivated: bool,
|
|
@@ -12,7 +15,7 @@ type state = {
|
|
|
12
15
|
|
|
13
16
|
@schema
|
|
14
17
|
type consumedEvent =
|
|
15
|
-
| CustomerRegistered({customerId:
|
|
16
|
-
| EmailChanged({customerId:
|
|
17
|
-
| AddressChanged({customerId:
|
|
18
|
-
| CustomerDeactivated({customerId:
|
|
18
|
+
| CustomerRegistered({customerId: CustomerId.t, email: string, address: string})
|
|
19
|
+
| EmailChanged({customerId: CustomerId.t, email: string})
|
|
20
|
+
| AddressChanged({customerId: CustomerId.t, address: string})
|
|
21
|
+
| CustomerDeactivated({customerId: CustomerId.t})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|