@reventlessdev/online-shop-aggregates-ordering 3.0.0-alpha.101
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 +846 -0
- package/LICENSE +202 -0
- package/__mocks__/emptyModule.js +1 -0
- package/lib/bs/.compiler.log +2 -0
- package/lib/bs/OrderingPlugin.cmi +0 -0
- package/lib/bs/OrderingPlugin.cmj +0 -0
- package/lib/bs/OrderingPlugin.cmt +0 -0
- package/lib/bs/OrderingPlugin.mlmap +31 -0
- package/lib/bs/build.ninja +0 -0
- package/lib/bs/compiler-info.json +8 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct.ast +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct.res +18 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct.res.mjs +50 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior.ast +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior.res +27 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior.res.mjs +87 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts.ast +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts.res +13 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts.res.mjs +53 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections.ast +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections.res +20 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections.res.mjs +65 -0
- package/lib/bs/src/Customer/Aggregate/Customer-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer.ast +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer.res +24 -0
- package/lib/bs/src/Customer/Aggregate/Customer.res.mjs +64 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior.ast +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior.res +41 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior.res.mjs +143 -0
- package/lib/bs/src/Customer/ReadModel/Customers-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers.ast +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers.res +12 -0
- package/lib/bs/src/Customer/ReadModel/Customers.res.mjs +36 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections.ast +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections.res +21 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections.res.mjs +91 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Extension/Products_Extension.ast +0 -0
- package/lib/bs/src/Extension/Products_Extension.res +23 -0
- package/lib/bs/src/Extension/Products_Extension.res.mjs +43 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmj +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 +28 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +59 -0
- package/lib/bs/src/Order/Aggregate/Order-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Aggregate/Order-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/Aggregate/Order-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order.ast +0 -0
- package/lib/bs/src/Order/Aggregate/Order.res +27 -0
- package/lib/bs/src/Order/Aggregate/Order.res.mjs +81 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior.ast +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior.res +52 -0
- package/lib/bs/src/Order/Aggregate/Order_Behavior.res.mjs +193 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings.ast +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings.res +15 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings.res.mjs +55 -0
- package/lib/bs/src/Order/ReadModel/Orders-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/ReadModel/Orders-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/ReadModel/Orders-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/ReadModel/Orders.ast +0 -0
- package/lib/bs/src/Order/ReadModel/Orders.res +19 -0
- package/lib/bs/src/Order/ReadModel/Orders.res.mjs +62 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections.ast +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections.res +31 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections.res.mjs +89 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification.ast +0 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification.res +18 -0
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification.res.mjs +34 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Plugin.ast +0 -0
- package/lib/bs/src/Plugin.res +65 -0
- package/lib/bs/src/Plugin.res.mjs +223 -0
- package/lib/bs/src/Service/EmailService-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Service/EmailService-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Service/EmailService-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Service/EmailService.ast +0 -0
- package/lib/bs/src/Service/EmailService.res +22 -0
- package/lib/bs/src/Service/EmailService.res.mjs +23 -0
- package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Task/OrderNotifications.ast +0 -0
- package/lib/bs/src/Task/OrderNotifications.res +8 -0
- package/lib/bs/src/Task/OrderNotifications.res.mjs +29 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res +27 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res.mjs +102 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.ast +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.res +15 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.res.mjs +83 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT.ast +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT.res +90 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT.res.mjs +170 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT.ast +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT.res +27 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT.res.mjs +106 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmj +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 +21 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +106 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmj +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 +33 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +143 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT.ast +0 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT.res +52 -0
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT.res.mjs +162 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT.ast +0 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT.res +121 -0
- package/lib/bs/tests/Order/Aggregate/Order_GWT.res.mjs +231 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT.ast +0 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT.res +46 -0
- package/lib/bs/tests/Order/ReadModel/Orders_GWT.res.mjs +118 -0
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock.ast +0 -0
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock.res +31 -0
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock.res.mjs +56 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmj +0 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT.ast +0 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT.res +37 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT.res.mjs +76 -0
- package/lib/ocaml/.compiler.log +2 -0
- package/lib/ocaml/AvailableProducts-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/AvailableProducts-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts.ast +0 -0
- package/lib/ocaml/AvailableProducts.res +13 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmj +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 +15 -0
- package/lib/ocaml/AvailableProducts_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_Projections-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/AvailableProducts_Projections-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts_Projections.ast +0 -0
- package/lib/ocaml/AvailableProducts_Projections.res +20 -0
- package/lib/ocaml/CatalogProduct-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/CatalogProduct-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct.ast +0 -0
- package/lib/ocaml/CatalogProduct.res +18 -0
- package/lib/ocaml/CatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct_Behavior-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/CatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct_Behavior.ast +0 -0
- package/lib/ocaml/CatalogProduct_Behavior.res +27 -0
- package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct_GWT.ast +0 -0
- package/lib/ocaml/CatalogProduct_GWT.res +27 -0
- package/lib/ocaml/Customer-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Customer-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer.ast +0 -0
- package/lib/ocaml/Customer.res +24 -0
- package/lib/ocaml/Customer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer_Behavior-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Customer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer_Behavior.ast +0 -0
- package/lib/ocaml/Customer_Behavior.res +41 -0
- package/lib/ocaml/Customer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer_GWT-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Customer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer_GWT.ast +0 -0
- package/lib/ocaml/Customer_GWT.res +90 -0
- package/lib/ocaml/Customers-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Customers-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers.ast +0 -0
- package/lib/ocaml/Customers.res +12 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmj +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 +27 -0
- package/lib/ocaml/Customers_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_Projections-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Customers_Projections-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers_Projections.ast +0 -0
- package/lib/ocaml/Customers_Projections.res +21 -0
- package/lib/ocaml/EmailService-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/EmailService-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/EmailService-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/EmailService.ast +0 -0
- package/lib/ocaml/EmailService.res +22 -0
- package/lib/ocaml/EmailService_Mock-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/EmailService_Mock-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/EmailService_Mock-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/EmailService_Mock.ast +0 -0
- package/lib/ocaml/EmailService_Mock.res +31 -0
- package/lib/ocaml/Order-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Order-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order.ast +0 -0
- package/lib/ocaml/Order.res +27 -0
- package/lib/ocaml/OrderMappings_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderMappings_GWT-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/OrderMappings_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderMappings_GWT.ast +0 -0
- package/lib/ocaml/OrderMappings_GWT.res +52 -0
- package/lib/ocaml/OrderNotifications-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderNotifications-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/OrderNotifications-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderNotifications.ast +0 -0
- package/lib/ocaml/OrderNotifications.res +8 -0
- package/lib/ocaml/Order_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_Behavior-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Order_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_Behavior.ast +0 -0
- package/lib/ocaml/Order_Behavior.res +52 -0
- package/lib/ocaml/Order_EmailNotification-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_EmailNotification-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Order_EmailNotification-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_EmailNotification.ast +0 -0
- package/lib/ocaml/Order_EmailNotification.res +18 -0
- package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_EmailNotification_GWT.ast +0 -0
- package/lib/ocaml/Order_EmailNotification_GWT.res +37 -0
- package/lib/ocaml/Order_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_GWT-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Order_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_GWT.ast +0 -0
- package/lib/ocaml/Order_GWT.res +121 -0
- package/lib/ocaml/Order_Mappings-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_Mappings-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Order_Mappings-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_Mappings.ast +0 -0
- package/lib/ocaml/Order_Mappings.res +15 -0
- package/lib/ocaml/OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderingPlugin.cmj +0 -0
- package/lib/ocaml/OrderingPlugin.cmt +0 -0
- package/lib/ocaml/OrderingPlugin.mlmap +31 -0
- package/lib/ocaml/Orders-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Orders-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders.ast +0 -0
- package/lib/ocaml/Orders.res +19 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmj +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 +28 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmj +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 +33 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmj +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 +46 -0
- package/lib/ocaml/Orders_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Projections-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Orders_Projections-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_Projections.ast +0 -0
- package/lib/ocaml/Orders_Projections.res +31 -0
- package/lib/ocaml/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Plugin-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Plugin.ast +0 -0
- package/lib/ocaml/Plugin.res +65 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension.ast +0 -0
- package/lib/ocaml/Products_Extension.res +23 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmj +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 +21 -0
- package/package.json +52 -0
- package/rescript.json +39 -0
- package/src/CatalogProduct/Aggregate/CatalogProduct.res +18 -0
- package/src/CatalogProduct/Aggregate/CatalogProduct.res.mjs +50 -0
- package/src/CatalogProduct/Aggregate/CatalogProduct_Behavior.res +27 -0
- package/src/CatalogProduct/Aggregate/CatalogProduct_Behavior.res.mjs +87 -0
- package/src/CatalogProduct/ReadModel/AvailableProducts.res +13 -0
- package/src/CatalogProduct/ReadModel/AvailableProducts.res.mjs +53 -0
- package/src/CatalogProduct/ReadModel/AvailableProducts_Projections.res +20 -0
- package/src/CatalogProduct/ReadModel/AvailableProducts_Projections.res.mjs +65 -0
- package/src/Customer/Aggregate/Customer.res +24 -0
- package/src/Customer/Aggregate/Customer.res.mjs +64 -0
- package/src/Customer/Aggregate/Customer_Behavior.res +41 -0
- package/src/Customer/Aggregate/Customer_Behavior.res.mjs +143 -0
- package/src/Customer/ReadModel/Customers.res +12 -0
- package/src/Customer/ReadModel/Customers.res.mjs +36 -0
- package/src/Customer/ReadModel/Customers_Projections.res +21 -0
- package/src/Customer/ReadModel/Customers_Projections.res.mjs +91 -0
- package/src/Extension/Products_Extension.res +23 -0
- package/src/Extension/Products_Extension.res.mjs +43 -0
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res +28 -0
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +59 -0
- package/src/Order/Aggregate/Order.res +27 -0
- package/src/Order/Aggregate/Order.res.mjs +81 -0
- package/src/Order/Aggregate/Order_Behavior.res +52 -0
- package/src/Order/Aggregate/Order_Behavior.res.mjs +193 -0
- package/src/Order/Aggregate/Order_Mappings.res +15 -0
- package/src/Order/Aggregate/Order_Mappings.res.mjs +55 -0
- package/src/Order/ReadModel/Orders.res +19 -0
- package/src/Order/ReadModel/Orders.res.mjs +62 -0
- package/src/Order/ReadModel/Orders_Projections.res +31 -0
- package/src/Order/ReadModel/Orders_Projections.res.mjs +89 -0
- package/src/Order/SideEffect/Order_EmailNotification.res +18 -0
- package/src/Order/SideEffect/Order_EmailNotification.res.mjs +34 -0
- package/src/Plugin.res +65 -0
- package/src/Plugin.res.mjs +223 -0
- package/src/Service/EmailService.res +22 -0
- package/src/Service/EmailService.res.mjs +23 -0
- package/src/Task/OrderNotifications.res +8 -0
- package/src/Task/OrderNotifications.res.mjs +29 -0
- package/src/plugin.json +1 -0
- package/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res +27 -0
- package/tests/CatalogProduct/Aggregate/CatalogProduct_GWT.res.mjs +102 -0
- package/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.res +15 -0
- package/tests/CatalogProduct/ReadModel/AvailableProducts_GWT.res.mjs +83 -0
- package/tests/Customer/Aggregate/Customer_GWT.res +90 -0
- package/tests/Customer/Aggregate/Customer_GWT.res.mjs +170 -0
- package/tests/Customer/ReadModel/Customers_GWT.res +27 -0
- package/tests/Customer/ReadModel/Customers_GWT.res.mjs +106 -0
- package/tests/Extension/Products_Extension_GWT.res +21 -0
- package/tests/Extension/Products_Extension_GWT.res.mjs +106 -0
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +33 -0
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +143 -0
- package/tests/Order/Aggregate/OrderMappings_GWT.res +52 -0
- package/tests/Order/Aggregate/OrderMappings_GWT.res.mjs +162 -0
- package/tests/Order/Aggregate/Order_GWT.res +121 -0
- package/tests/Order/Aggregate/Order_GWT.res.mjs +231 -0
- package/tests/Order/ReadModel/Orders_GWT.res +46 -0
- package/tests/Order/ReadModel/Orders_GWT.res.mjs +118 -0
- package/tests/Order/SideEffect/EmailService_Mock.res +31 -0
- package/tests/Order/SideEffect/EmailService_Mock.res.mjs +56 -0
- package/tests/Order/SideEffect/Order_EmailNotification_GWT.res +37 -0
- package/tests/Order/SideEffect/Order_EmailNotification_GWT.res.mjs +76 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
+
import * as Order$OrderingPlugin from "../Aggregate/Order.res.mjs";
|
|
5
|
+
import * as EmailService$OrderingPlugin from "../../Service/EmailService.res.mjs";
|
|
6
|
+
|
|
7
|
+
let Source = {
|
|
8
|
+
name: Order$OrderingPlugin.name,
|
|
9
|
+
Id: undefined,
|
|
10
|
+
eventSchema: Order$OrderingPlugin.eventSchema
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
async function execute(orderId, _meta, event, _queryEngine) {
|
|
14
|
+
if (typeof event !== "object" || event.TAG !== "Placed") {
|
|
15
|
+
return;
|
|
16
|
+
} else {
|
|
17
|
+
return await EmailService$OrderingPlugin.sendOrderConfirmation(event.customerId, Id$Reventless.$$String.toString(orderId));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let name = "Order_EmailNotification";
|
|
22
|
+
|
|
23
|
+
let Id;
|
|
24
|
+
|
|
25
|
+
let moduleUrl = "@reventlessdev/online-shop-aggregates-ordering/src/Order/SideEffect/Order_EmailNotification.res.mjs";
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
name,
|
|
29
|
+
Id,
|
|
30
|
+
Source,
|
|
31
|
+
execute,
|
|
32
|
+
moduleUrl,
|
|
33
|
+
}
|
|
34
|
+
/* Id-Reventless Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// AUTO-GENERATED — do not edit. Run `npm run generate` to update.
|
|
2
|
+
|
|
3
|
+
@val external uiBundleUrl: option<string> = "process.env.ORDERING_UI_BUNDLE_URL"
|
|
4
|
+
|
|
5
|
+
module Make = (Platform: ReventlessInfra.Platform.T) => {
|
|
6
|
+
// Aggregates
|
|
7
|
+
module CatalogProductAggregate = Platform.Aggregate.Make(
|
|
8
|
+
CatalogProduct,
|
|
9
|
+
CatalogProduct_Behavior,
|
|
10
|
+
ReventlessInfra.NoEventMappings.Make(CatalogProduct),
|
|
11
|
+
)
|
|
12
|
+
module CustomerAggregate = Platform.Aggregate.Make(
|
|
13
|
+
Customer,
|
|
14
|
+
Customer_Behavior,
|
|
15
|
+
ReventlessInfra.NoEventMappings.Make(Customer),
|
|
16
|
+
)
|
|
17
|
+
module OrderAggregate = Platform.Aggregate.Make(
|
|
18
|
+
Order,
|
|
19
|
+
Order_Behavior,
|
|
20
|
+
Order_Mappings,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
// ReadModels
|
|
24
|
+
module AvailableProductsReadModel = Platform.ReadModel.Make(AvailableProducts, AvailableProducts_Projections)
|
|
25
|
+
module CustomersReadModel = Platform.ReadModel.Make(Customers, Customers_Projections)
|
|
26
|
+
module OrdersReadModel = Platform.ReadModel.Make(Orders, Orders_Projections)
|
|
27
|
+
|
|
28
|
+
// Tasks
|
|
29
|
+
module OrderNotificationsTask = Platform.Task.Make(OrderNotifications)
|
|
30
|
+
|
|
31
|
+
// ExtensionPoints
|
|
32
|
+
module Orders_ExtensionPoint = Platform.ExtensionPoint.Make(Orders_ExtensionPointMapping)
|
|
33
|
+
|
|
34
|
+
// Extensions
|
|
35
|
+
module Products_Extension = Platform.Extension.Make(Products_Extension.Mapping)
|
|
36
|
+
|
|
37
|
+
let pluginStructure = Platform.Plugin.makePluginDefinition(
|
|
38
|
+
~name="Ordering",
|
|
39
|
+
~aggregates=[module(CatalogProductAggregate), module(CustomerAggregate), module(OrderAggregate)],
|
|
40
|
+
~readModels=[module(AvailableProductsReadModel), module(CustomersReadModel), module(OrdersReadModel)],
|
|
41
|
+
~extensions=[module(Products_Extension)],
|
|
42
|
+
~extensionPoints=[module(Orders_ExtensionPointMapping)],
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
let make = () =>
|
|
46
|
+
Platform.Plugin.make(
|
|
47
|
+
~name="Ordering",
|
|
48
|
+
~heartbeatInterval=5,
|
|
49
|
+
~extensionPoints=[module(Orders_ExtensionPoint)],
|
|
50
|
+
~extensions=[module(Products_Extension)],
|
|
51
|
+
~aggregates=[module(CatalogProductAggregate), module(CustomerAggregate), module(OrderAggregate)],
|
|
52
|
+
~readModels=[module(AvailableProductsReadModel), module(CustomersReadModel), module(OrdersReadModel)],
|
|
53
|
+
~tasks=[module(OrderNotificationsTask)],
|
|
54
|
+
~pluginStructure=pluginStructure,
|
|
55
|
+
~uiFragments=?uiBundleUrl->Option.map(url =>
|
|
56
|
+
Platform.Plugin.makeAutoUIManifest(
|
|
57
|
+
~remoteEntryUrl=url,
|
|
58
|
+
~name="Ordering",
|
|
59
|
+
~pluginStructure,
|
|
60
|
+
~readModelPositions=["platform-summary"],
|
|
61
|
+
~aggregatePositions=["resource-detail"],
|
|
62
|
+
)
|
|
63
|
+
),
|
|
64
|
+
)
|
|
65
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
5
|
+
import * as Order$OrderingPlugin from "./Order/Aggregate/Order.res.mjs";
|
|
6
|
+
import * as Orders$OrderingPlugin from "./Order/ReadModel/Orders.res.mjs";
|
|
7
|
+
import * as Customer$OrderingPlugin from "./Customer/Aggregate/Customer.res.mjs";
|
|
8
|
+
import * as Customers$OrderingPlugin from "./Customer/ReadModel/Customers.res.mjs";
|
|
9
|
+
import * as CatalogProduct$OrderingPlugin from "./CatalogProduct/Aggregate/CatalogProduct.res.mjs";
|
|
10
|
+
import * as Order_Behavior$OrderingPlugin from "./Order/Aggregate/Order_Behavior.res.mjs";
|
|
11
|
+
import * as Order_Mappings$OrderingPlugin from "./Order/Aggregate/Order_Mappings.res.mjs";
|
|
12
|
+
import * as NoEventMappings$ReventlessInfra from "@reventlessdev/reventless-infra/src/types/NoEventMappings.res.mjs";
|
|
13
|
+
import * as AvailableProducts$OrderingPlugin from "./CatalogProduct/ReadModel/AvailableProducts.res.mjs";
|
|
14
|
+
import * as Customer_Behavior$OrderingPlugin from "./Customer/Aggregate/Customer_Behavior.res.mjs";
|
|
15
|
+
import * as OrderNotifications$OrderingPlugin from "./Task/OrderNotifications.res.mjs";
|
|
16
|
+
import * as Orders_Projections$OrderingPlugin from "./Order/ReadModel/Orders_Projections.res.mjs";
|
|
17
|
+
import * as Products_Extension$OrderingPlugin from "./Extension/Products_Extension.res.mjs";
|
|
18
|
+
import * as Orders_ExtensionPoint$OrderingSpec from "@reventlessdev/online-shop-aggregates-ordering-spec/src/Orders_ExtensionPoint.res.mjs";
|
|
19
|
+
import * as Products_ExtensionPoint$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/Products_ExtensionPoint.res.mjs";
|
|
20
|
+
import * as Customers_Projections$OrderingPlugin from "./Customer/ReadModel/Customers_Projections.res.mjs";
|
|
21
|
+
import * as CatalogProduct_Behavior$OrderingPlugin from "./CatalogProduct/Aggregate/CatalogProduct_Behavior.res.mjs";
|
|
22
|
+
import * as Orders_ExtensionPointMapping$OrderingPlugin from "./ExtensionPoint/Orders_ExtensionPointMapping.res.mjs";
|
|
23
|
+
import * as AvailableProducts_Projections$OrderingPlugin from "./CatalogProduct/ReadModel/AvailableProducts_Projections.res.mjs";
|
|
24
|
+
|
|
25
|
+
function Make(Platform) {
|
|
26
|
+
let CatalogProductAggregate = Platform.Aggregate.Make({
|
|
27
|
+
Id: Id$Reventless.$$String,
|
|
28
|
+
name: CatalogProduct$OrderingPlugin.name,
|
|
29
|
+
eventSchema: CatalogProduct$OrderingPlugin.eventSchema,
|
|
30
|
+
errorSchema: CatalogProduct$OrderingPlugin.errorSchema,
|
|
31
|
+
commandSchema: CatalogProduct$OrderingPlugin.commandSchema,
|
|
32
|
+
moduleUrl: CatalogProduct$OrderingPlugin.moduleUrl,
|
|
33
|
+
commandAuthorization: CatalogProduct$OrderingPlugin.commandAuthorization
|
|
34
|
+
})({
|
|
35
|
+
initialState: CatalogProduct_Behavior$OrderingPlugin.initialState,
|
|
36
|
+
evolve: CatalogProduct_Behavior$OrderingPlugin.evolve,
|
|
37
|
+
decide: CatalogProduct_Behavior$OrderingPlugin.decide,
|
|
38
|
+
moduleUrl: CatalogProduct_Behavior$OrderingPlugin.moduleUrl
|
|
39
|
+
})(NoEventMappings$ReventlessInfra.Make({
|
|
40
|
+
name: CatalogProduct$OrderingPlugin.name,
|
|
41
|
+
Id: Id$Reventless.$$String,
|
|
42
|
+
commandSchema: CatalogProduct$OrderingPlugin.commandSchema
|
|
43
|
+
}));
|
|
44
|
+
let CustomerAggregate = Platform.Aggregate.Make({
|
|
45
|
+
Id: Id$Reventless.$$String,
|
|
46
|
+
name: Customer$OrderingPlugin.name,
|
|
47
|
+
eventSchema: Customer$OrderingPlugin.eventSchema,
|
|
48
|
+
errorSchema: Customer$OrderingPlugin.errorSchema,
|
|
49
|
+
commandSchema: Customer$OrderingPlugin.commandSchema,
|
|
50
|
+
moduleUrl: Customer$OrderingPlugin.moduleUrl,
|
|
51
|
+
commandAuthorization: Customer$OrderingPlugin.commandAuthorization
|
|
52
|
+
})({
|
|
53
|
+
initialState: Customer_Behavior$OrderingPlugin.initialState,
|
|
54
|
+
evolve: Customer_Behavior$OrderingPlugin.evolve,
|
|
55
|
+
decide: Customer_Behavior$OrderingPlugin.decide,
|
|
56
|
+
moduleUrl: Customer_Behavior$OrderingPlugin.moduleUrl
|
|
57
|
+
})(NoEventMappings$ReventlessInfra.Make({
|
|
58
|
+
name: Customer$OrderingPlugin.name,
|
|
59
|
+
Id: Id$Reventless.$$String,
|
|
60
|
+
commandSchema: Customer$OrderingPlugin.commandSchema
|
|
61
|
+
}));
|
|
62
|
+
let OrderAggregate = Platform.Aggregate.Make({
|
|
63
|
+
Id: Id$Reventless.$$String,
|
|
64
|
+
name: Order$OrderingPlugin.name,
|
|
65
|
+
eventSchema: Order$OrderingPlugin.eventSchema,
|
|
66
|
+
errorSchema: Order$OrderingPlugin.errorSchema,
|
|
67
|
+
commandSchema: Order$OrderingPlugin.commandSchema,
|
|
68
|
+
moduleUrl: Order$OrderingPlugin.moduleUrl,
|
|
69
|
+
commandAuthorization: Order$OrderingPlugin.commandAuthorization
|
|
70
|
+
})({
|
|
71
|
+
initialState: Order_Behavior$OrderingPlugin.initialState,
|
|
72
|
+
evolve: Order_Behavior$OrderingPlugin.evolve,
|
|
73
|
+
decide: Order_Behavior$OrderingPlugin.decide,
|
|
74
|
+
moduleUrl: Order_Behavior$OrderingPlugin.moduleUrl
|
|
75
|
+
})({
|
|
76
|
+
moduleUrl: Order_Mappings$OrderingPlugin.moduleUrl,
|
|
77
|
+
mappings: Order_Mappings$OrderingPlugin.mappings,
|
|
78
|
+
counter: undefined
|
|
79
|
+
});
|
|
80
|
+
let AvailableProductsReadModel = Platform.ReadModel.Make({
|
|
81
|
+
Id: Id$Reventless.$$String,
|
|
82
|
+
name: AvailableProducts$OrderingPlugin.name,
|
|
83
|
+
moduleUrl: AvailableProducts$OrderingPlugin.moduleUrl,
|
|
84
|
+
stateSchema: AvailableProducts$OrderingPlugin.stateSchema,
|
|
85
|
+
config: AvailableProducts$OrderingPlugin.config,
|
|
86
|
+
subIdConfig: undefined,
|
|
87
|
+
authorization: AvailableProducts$OrderingPlugin.authorization,
|
|
88
|
+
visibility: AvailableProducts$OrderingPlugin.visibility
|
|
89
|
+
})({
|
|
90
|
+
moduleUrl: AvailableProducts_Projections$OrderingPlugin.moduleUrl,
|
|
91
|
+
mappings: AvailableProducts_Projections$OrderingPlugin.mappings
|
|
92
|
+
});
|
|
93
|
+
let CustomersReadModel = Platform.ReadModel.Make({
|
|
94
|
+
Id: Id$Reventless.$$String,
|
|
95
|
+
name: Customers$OrderingPlugin.name,
|
|
96
|
+
moduleUrl: Customers$OrderingPlugin.moduleUrl,
|
|
97
|
+
stateSchema: Customers$OrderingPlugin.stateSchema,
|
|
98
|
+
config: Customers$OrderingPlugin.config,
|
|
99
|
+
subIdConfig: undefined,
|
|
100
|
+
authorization: Customers$OrderingPlugin.authorization,
|
|
101
|
+
visibility: Customers$OrderingPlugin.visibility
|
|
102
|
+
})({
|
|
103
|
+
moduleUrl: Customers_Projections$OrderingPlugin.moduleUrl,
|
|
104
|
+
mappings: Customers_Projections$OrderingPlugin.mappings
|
|
105
|
+
});
|
|
106
|
+
let OrdersReadModel = Platform.ReadModel.Make({
|
|
107
|
+
Id: Id$Reventless.$$String,
|
|
108
|
+
name: Orders$OrderingPlugin.name,
|
|
109
|
+
moduleUrl: Orders$OrderingPlugin.moduleUrl,
|
|
110
|
+
stateSchema: Orders$OrderingPlugin.stateSchema,
|
|
111
|
+
config: Orders$OrderingPlugin.config,
|
|
112
|
+
subIdConfig: undefined,
|
|
113
|
+
authorization: Orders$OrderingPlugin.authorization,
|
|
114
|
+
visibility: Orders$OrderingPlugin.visibility
|
|
115
|
+
})({
|
|
116
|
+
moduleUrl: Orders_Projections$OrderingPlugin.moduleUrl,
|
|
117
|
+
mappings: Orders_Projections$OrderingPlugin.mappings
|
|
118
|
+
});
|
|
119
|
+
let OrderNotificationsTask = Platform.Task.Make({
|
|
120
|
+
name: OrderNotifications$OrderingPlugin.name,
|
|
121
|
+
moduleUrl: OrderNotifications$OrderingPlugin.moduleUrl,
|
|
122
|
+
setup: OrderNotifications$OrderingPlugin.setup
|
|
123
|
+
});
|
|
124
|
+
let Orders_ExtensionPoint = Platform.ExtensionPoint.Make({
|
|
125
|
+
ExtensionPoint: {
|
|
126
|
+
name: Orders_ExtensionPoint$OrderingSpec.name,
|
|
127
|
+
moduleUrl: Orders_ExtensionPoint$OrderingSpec.moduleUrl,
|
|
128
|
+
commandSchema: Orders_ExtensionPoint$OrderingSpec.commandSchema,
|
|
129
|
+
eventSchema: Orders_ExtensionPoint$OrderingSpec.eventSchema,
|
|
130
|
+
directiveSchema: Orders_ExtensionPoint$OrderingSpec.directiveSchema
|
|
131
|
+
},
|
|
132
|
+
Delegate: {
|
|
133
|
+
Id: Id$Reventless.$$String,
|
|
134
|
+
name: Order$OrderingPlugin.name,
|
|
135
|
+
eventSchema: Order$OrderingPlugin.eventSchema,
|
|
136
|
+
errorSchema: Order$OrderingPlugin.errorSchema,
|
|
137
|
+
commandSchema: Order$OrderingPlugin.commandSchema,
|
|
138
|
+
moduleUrl: Order$OrderingPlugin.moduleUrl,
|
|
139
|
+
commandAuthorization: Order$OrderingPlugin.commandAuthorization
|
|
140
|
+
},
|
|
141
|
+
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
142
|
+
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
143
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
144
|
+
});
|
|
145
|
+
let Products_Extension = Platform.Extension.Make({
|
|
146
|
+
ExtensionPoint: {
|
|
147
|
+
name: Products_ExtensionPoint$CatalogSpec.name,
|
|
148
|
+
moduleUrl: Products_ExtensionPoint$CatalogSpec.moduleUrl,
|
|
149
|
+
commandSchema: Products_ExtensionPoint$CatalogSpec.commandSchema,
|
|
150
|
+
eventSchema: Products_ExtensionPoint$CatalogSpec.eventSchema,
|
|
151
|
+
directiveSchema: Products_ExtensionPoint$CatalogSpec.directiveSchema
|
|
152
|
+
},
|
|
153
|
+
Delegate: {
|
|
154
|
+
Id: Id$Reventless.$$String,
|
|
155
|
+
name: CatalogProduct$OrderingPlugin.name,
|
|
156
|
+
eventSchema: CatalogProduct$OrderingPlugin.eventSchema,
|
|
157
|
+
errorSchema: CatalogProduct$OrderingPlugin.errorSchema,
|
|
158
|
+
commandSchema: CatalogProduct$OrderingPlugin.commandSchema,
|
|
159
|
+
moduleUrl: CatalogProduct$OrderingPlugin.moduleUrl,
|
|
160
|
+
commandAuthorization: CatalogProduct$OrderingPlugin.commandAuthorization
|
|
161
|
+
},
|
|
162
|
+
moduleUrl: Products_Extension$OrderingPlugin.Mapping.moduleUrl,
|
|
163
|
+
delegateModuleUrl: Products_Extension$OrderingPlugin.Mapping.delegateModuleUrl,
|
|
164
|
+
mapIncomingEvent: Products_Extension$OrderingPlugin.Mapping.mapIncomingEvent,
|
|
165
|
+
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent
|
|
166
|
+
});
|
|
167
|
+
let pluginStructure = Platform.Plugin.makePluginDefinition("Ordering", [
|
|
168
|
+
CatalogProductAggregate,
|
|
169
|
+
CustomerAggregate,
|
|
170
|
+
OrderAggregate
|
|
171
|
+
], [
|
|
172
|
+
AvailableProductsReadModel,
|
|
173
|
+
CustomersReadModel,
|
|
174
|
+
OrdersReadModel
|
|
175
|
+
], undefined, undefined, undefined, undefined, undefined, [Products_Extension], [{
|
|
176
|
+
ExtensionPoint: {
|
|
177
|
+
name: Orders_ExtensionPoint$OrderingSpec.name,
|
|
178
|
+
moduleUrl: Orders_ExtensionPoint$OrderingSpec.moduleUrl,
|
|
179
|
+
commandSchema: Orders_ExtensionPoint$OrderingSpec.commandSchema,
|
|
180
|
+
eventSchema: Orders_ExtensionPoint$OrderingSpec.eventSchema,
|
|
181
|
+
directiveSchema: Orders_ExtensionPoint$OrderingSpec.directiveSchema
|
|
182
|
+
},
|
|
183
|
+
Delegate: {
|
|
184
|
+
Id: Id$Reventless.$$String,
|
|
185
|
+
name: Order$OrderingPlugin.name,
|
|
186
|
+
eventSchema: Order$OrderingPlugin.eventSchema,
|
|
187
|
+
errorSchema: Order$OrderingPlugin.errorSchema,
|
|
188
|
+
commandSchema: Order$OrderingPlugin.commandSchema,
|
|
189
|
+
moduleUrl: Order$OrderingPlugin.moduleUrl,
|
|
190
|
+
commandAuthorization: Order$OrderingPlugin.commandAuthorization
|
|
191
|
+
},
|
|
192
|
+
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
193
|
+
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
194
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
195
|
+
}]);
|
|
196
|
+
let make = () => Platform.Plugin.make("Ordering", 5, [Orders_ExtensionPoint], [Products_Extension], [
|
|
197
|
+
CatalogProductAggregate,
|
|
198
|
+
CustomerAggregate,
|
|
199
|
+
OrderAggregate
|
|
200
|
+
], [
|
|
201
|
+
AvailableProductsReadModel,
|
|
202
|
+
CustomersReadModel,
|
|
203
|
+
OrdersReadModel
|
|
204
|
+
], [OrderNotificationsTask], undefined, undefined, undefined, undefined, undefined, Stdlib_Option.map(process.env.ORDERING_UI_BUNDLE_URL, url => Platform.Plugin.makeAutoUIManifest(url, "Ordering", pluginStructure, ["platform-summary"], ["resource-detail"])), pluginStructure, undefined);
|
|
205
|
+
return {
|
|
206
|
+
CatalogProductAggregate: CatalogProductAggregate,
|
|
207
|
+
CustomerAggregate: CustomerAggregate,
|
|
208
|
+
OrderAggregate: OrderAggregate,
|
|
209
|
+
AvailableProductsReadModel: AvailableProductsReadModel,
|
|
210
|
+
CustomersReadModel: CustomersReadModel,
|
|
211
|
+
OrdersReadModel: OrdersReadModel,
|
|
212
|
+
OrderNotificationsTask: OrderNotificationsTask,
|
|
213
|
+
Orders_ExtensionPoint: Orders_ExtensionPoint,
|
|
214
|
+
Products_Extension: Products_Extension,
|
|
215
|
+
pluginStructure: pluginStructure,
|
|
216
|
+
make: make
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export {
|
|
221
|
+
Make,
|
|
222
|
+
}
|
|
223
|
+
/* Id-Reventless Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Stub email service for the example.
|
|
2
|
+
//
|
|
3
|
+
// The implementation goes through a `ref`-held `backend` so that tests can
|
|
4
|
+
// install a recording mock (see `EmailService_Mock.res` next to the GWT files
|
|
5
|
+
// — Option C of the `sideeffect-gwt` plan). Production code still calls
|
|
6
|
+
// `EmailService.sendOrderConfirmation(...)` directly; the indirection is
|
|
7
|
+
// invisible at the call site.
|
|
8
|
+
|
|
9
|
+
type backend = {
|
|
10
|
+
sendOrderConfirmation: (~email: string, ~orderId: string) => promise<unit>,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let liveBackend: backend = {
|
|
14
|
+
sendOrderConfirmation: async (~email as _, ~orderId as _) => {
|
|
15
|
+
Console.log("[EmailService] Order confirmation sent")
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let current = ref(liveBackend)
|
|
20
|
+
|
|
21
|
+
let sendOrderConfirmation = (~email, ~orderId) =>
|
|
22
|
+
current.contents.sendOrderConfirmation(~email, ~orderId)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
let liveBackend = {
|
|
5
|
+
sendOrderConfirmation: async (param, param$1) => {
|
|
6
|
+
console.log("[EmailService] Order confirmation sent");
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let current = {
|
|
11
|
+
contents: liveBackend
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function sendOrderConfirmation(email, orderId) {
|
|
15
|
+
return current.contents.sendOrderConfirmation(email, orderId);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
liveBackend,
|
|
20
|
+
current,
|
|
21
|
+
sendOrderConfirmation,
|
|
22
|
+
}
|
|
23
|
+
/* No side effect */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Order notification task — hosts side effects for the Order aggregate.
|
|
2
|
+
// Sends email confirmations when orders are placed.
|
|
3
|
+
|
|
4
|
+
@@reventless.task
|
|
5
|
+
|
|
6
|
+
let setup = (_queryEngine, _queryBucketName, _opts) => {
|
|
7
|
+
Task.sideEffects: [module(Order_EmailNotification): module(SideEffect.T)],
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
+
import * as Order_EmailNotification$OrderingPlugin from "../Order/SideEffect/Order_EmailNotification.res.mjs";
|
|
5
|
+
|
|
6
|
+
function setup(_queryEngine, _queryBucketName, _opts) {
|
|
7
|
+
return {
|
|
8
|
+
sideEffects: [{
|
|
9
|
+
Source: {
|
|
10
|
+
name: Order_EmailNotification$OrderingPlugin.Source.name,
|
|
11
|
+
Id: Id$Reventless.$$String,
|
|
12
|
+
eventSchema: Order_EmailNotification$OrderingPlugin.Source.eventSchema
|
|
13
|
+
},
|
|
14
|
+
moduleUrl: Order_EmailNotification$OrderingPlugin.moduleUrl,
|
|
15
|
+
execute: Order_EmailNotification$OrderingPlugin.execute
|
|
16
|
+
}]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let name = "OrderNotifications";
|
|
21
|
+
|
|
22
|
+
let moduleUrl = "@reventlessdev/online-shop-aggregates-ordering/src/Task/OrderNotifications.res.mjs";
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
name,
|
|
26
|
+
setup,
|
|
27
|
+
moduleUrl,
|
|
28
|
+
}
|
|
29
|
+
/* Id-Reventless Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@@reventless.gwt
|
|
2
|
+
|
|
3
|
+
describe("CatalogProduct Behavior", () => {
|
|
4
|
+
test("Sync on new aggregate produces Synced", () =>
|
|
5
|
+
givenEvents([])
|
|
6
|
+
->whenCmd(Sync({name: "Laptop", price: 999.99}))
|
|
7
|
+
->thenEvent(Synced({name: "Laptop", price: 999.99}))
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
test("Sync on already-synced aggregate produces no events (idempotent)", () =>
|
|
11
|
+
givenEvents([Synced({name: "Laptop", price: 999.99})])
|
|
12
|
+
->whenCmd(Sync({name: "Laptop", price: 999.99}))
|
|
13
|
+
->thenNoEvent
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
test("UpdatePrice on never-synced aggregate produces no events (idempotent)", () =>
|
|
17
|
+
givenEvents([])
|
|
18
|
+
->whenCmd(UpdatePrice({price: 1.0}))
|
|
19
|
+
->thenNoEvent
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
test("UpdatePrice on synced aggregate produces PriceUpdated", () =>
|
|
23
|
+
givenEvents([Synced({name: "Laptop", price: 999.99})])
|
|
24
|
+
->whenCmd(UpdatePrice({price: 899.99}))
|
|
25
|
+
->thenEvent(PriceUpdated({price: 899.99}))
|
|
26
|
+
)
|
|
27
|
+
})
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
|
|
4
|
+
import * as CatalogProduct$OrderingPlugin from "../../../src/CatalogProduct/Aggregate/CatalogProduct.res.mjs";
|
|
5
|
+
import * as CatalogProduct_Behavior$OrderingPlugin from "../../../src/CatalogProduct/Aggregate/CatalogProduct_Behavior.res.mjs";
|
|
6
|
+
|
|
7
|
+
let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
8
|
+
name: CatalogProduct$OrderingPlugin.name,
|
|
9
|
+
commandSchema: CatalogProduct$OrderingPlugin.commandSchema,
|
|
10
|
+
eventSchema: CatalogProduct$OrderingPlugin.eventSchema,
|
|
11
|
+
errorSchema: CatalogProduct$OrderingPlugin.errorSchema
|
|
12
|
+
})({
|
|
13
|
+
Spec: {
|
|
14
|
+
name: CatalogProduct$OrderingPlugin.name,
|
|
15
|
+
commandSchema: CatalogProduct$OrderingPlugin.commandSchema,
|
|
16
|
+
eventSchema: CatalogProduct$OrderingPlugin.eventSchema,
|
|
17
|
+
errorSchema: CatalogProduct$OrderingPlugin.errorSchema
|
|
18
|
+
},
|
|
19
|
+
initialState: CatalogProduct_Behavior$OrderingPlugin.initialState,
|
|
20
|
+
evolve: CatalogProduct_Behavior$OrderingPlugin.evolve,
|
|
21
|
+
decide: CatalogProduct_Behavior$OrderingPlugin.decide,
|
|
22
|
+
moduleUrl: CatalogProduct_Behavior$OrderingPlugin.moduleUrl
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
let describe = include.describe;
|
|
26
|
+
|
|
27
|
+
let test = include.test;
|
|
28
|
+
|
|
29
|
+
let givenEvents = include.givenEvents;
|
|
30
|
+
|
|
31
|
+
let whenCmd = include.whenCmd;
|
|
32
|
+
|
|
33
|
+
let thenEvent = include.thenEvent;
|
|
34
|
+
|
|
35
|
+
let thenNoEvent = include.thenNoEvent;
|
|
36
|
+
|
|
37
|
+
describe("CatalogProduct Behavior", () => {
|
|
38
|
+
test("Sync on new aggregate produces Synced", () => thenEvent(whenCmd(givenEvents([]), {
|
|
39
|
+
TAG: "Sync",
|
|
40
|
+
name: "Laptop",
|
|
41
|
+
price: 999.99
|
|
42
|
+
}), {
|
|
43
|
+
TAG: "Synced",
|
|
44
|
+
name: "Laptop",
|
|
45
|
+
price: 999.99
|
|
46
|
+
}));
|
|
47
|
+
test("Sync on already-synced aggregate produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([{
|
|
48
|
+
TAG: "Synced",
|
|
49
|
+
name: "Laptop",
|
|
50
|
+
price: 999.99
|
|
51
|
+
}]), {
|
|
52
|
+
TAG: "Sync",
|
|
53
|
+
name: "Laptop",
|
|
54
|
+
price: 999.99
|
|
55
|
+
})));
|
|
56
|
+
test("UpdatePrice on never-synced aggregate produces no events (idempotent)", () => thenNoEvent(whenCmd(givenEvents([]), {
|
|
57
|
+
TAG: "UpdatePrice",
|
|
58
|
+
price: 1.0
|
|
59
|
+
})));
|
|
60
|
+
test("UpdatePrice on synced aggregate produces PriceUpdated", () => thenEvent(whenCmd(givenEvents([{
|
|
61
|
+
TAG: "Synced",
|
|
62
|
+
name: "Laptop",
|
|
63
|
+
price: 999.99
|
|
64
|
+
}]), {
|
|
65
|
+
TAG: "UpdatePrice",
|
|
66
|
+
price: 899.99
|
|
67
|
+
}), {
|
|
68
|
+
TAG: "PriceUpdated",
|
|
69
|
+
price: 899.99
|
|
70
|
+
}));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
let Spec = include.Spec;
|
|
74
|
+
|
|
75
|
+
let thenCompareEvent = include.thenCompareEvent;
|
|
76
|
+
|
|
77
|
+
let thenEventWithError = include.thenEventWithError;
|
|
78
|
+
|
|
79
|
+
let thenEvents = include.thenEvents;
|
|
80
|
+
|
|
81
|
+
let thenCompareEvents = include.thenCompareEvents;
|
|
82
|
+
|
|
83
|
+
let thenEventsWithError = include.thenEventsWithError;
|
|
84
|
+
|
|
85
|
+
let thenError = include.thenError;
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
Spec,
|
|
89
|
+
describe,
|
|
90
|
+
test,
|
|
91
|
+
givenEvents,
|
|
92
|
+
whenCmd,
|
|
93
|
+
thenEvent,
|
|
94
|
+
thenCompareEvent,
|
|
95
|
+
thenNoEvent,
|
|
96
|
+
thenEventWithError,
|
|
97
|
+
thenEvents,
|
|
98
|
+
thenCompareEvents,
|
|
99
|
+
thenEventsWithError,
|
|
100
|
+
thenError,
|
|
101
|
+
}
|
|
102
|
+
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@@reventless.gwt(AvailableProducts_Projections.CatalogProductMapping)
|
|
2
|
+
|
|
3
|
+
describe("AvailableProducts ReadModel ← CatalogProduct", () => {
|
|
4
|
+
test("Synced sets initial read model state", () =>
|
|
5
|
+
givenEvents([])
|
|
6
|
+
->whenEvent(CatalogProduct.Synced({name: "Laptop", price: 999.99}))
|
|
7
|
+
->thenState({AvailableProducts.name: "Laptop", price: 999.99})
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
test("PriceUpdated updates the price", () =>
|
|
11
|
+
givenEvents([CatalogProduct.Synced({name: "Laptop", price: 999.99})])
|
|
12
|
+
->whenEvent(CatalogProduct.PriceUpdated({price: 899.99}))
|
|
13
|
+
->thenState({AvailableProducts.name: "Laptop", price: 899.99})
|
|
14
|
+
)
|
|
15
|
+
})
|