@reventlessdev/online-shop-aggregates-ordering 3.0.0-alpha.244 → 3.0.0-alpha.246
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 +15 -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/Aggregate/CatalogProduct-OrderingPlugin.cmi +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 +2 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/Aggregate/CatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts-OrderingPlugin.cmi +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 +2 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections.res.mjs +4 -4
- package/lib/bs/src/Customer/Aggregate/Customer-OrderingPlugin.cmi +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 +2 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/Aggregate/Customer_Behavior-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/ReadModel/Customers-OrderingPlugin.cmi +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 +2 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/ReadModel/Customers_Projections.res.mjs +4 -4
- 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/Extension/Products_Extension.ast +0 -0
- package/lib/bs/src/Extension/Products_Extension.res +6 -2
- package/lib/bs/src/Extension/Products_Extension.res.mjs +4 -3
- 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 +23 -8
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +28 -20
- package/lib/bs/src/LifecycleModel-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/LifecycleModel-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order-OrderingPlugin.cmi +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 +7 -3
- package/lib/bs/src/Order/Aggregate/Order.res.mjs +7 -6
- package/lib/bs/src/Order/Aggregate/Order_Behavior-OrderingPlugin.cmi +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 +1 -1
- package/lib/bs/src/Order/Aggregate/Order_Behavior.res.mjs +4 -2
- package/lib/bs/src/Order/Aggregate/Order_Mappings-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/Aggregate/Order_Mappings.res.mjs +3 -3
- 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/ReadModel/Orders-OrderingPlugin.cmi +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 +4 -2
- package/lib/bs/src/Order/ReadModel/Orders.res.mjs +4 -2
- package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/ReadModel/Orders_Projections.res.mjs +4 -4
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification-OrderingPlugin.cmi +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 +4 -1
- package/lib/bs/src/Order/SideEffect/Order_EmailNotification.res.mjs +4 -3
- 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 +15 -13
- package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Task/OrderNotifications.res.mjs +3 -3
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmt +0 -0
- 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 +4 -2
- package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +7 -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 +6 -2
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +18 -7
- 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 +6 -4
- package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT.res.mjs +19 -11
- package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmi +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 +29 -24
- package/lib/bs/tests/Order/Aggregate/Order_GWT.res.mjs +55 -44
- package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmi +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 +19 -14
- package/lib/bs/tests/Order/ReadModel/Orders_GWT.res.mjs +31 -20
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/SideEffect/EmailService_Mock-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmi +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 +5 -2
- package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT.res.mjs +8 -6
- package/lib/ocaml/.compiler.log +2 -2
- 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 +2 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_Projections-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct.ast +0 -0
- package/lib/ocaml/CatalogProduct.res +2 -0
- package/lib/ocaml/CatalogProduct_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer.ast +0 -0
- package/lib/ocaml/Customer.res +2 -0
- 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/Customer_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customer_GWT-OrderingPlugin.cmt +0 -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 +2 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_Projections-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/EmailService_Mock-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/EmailService_Mock-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/LifecycleModel-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/LifecycleModel-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order.ast +0 -0
- package/lib/ocaml/Order.res +7 -3
- 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/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 +6 -4
- package/lib/ocaml/OrderNotifications-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/OrderNotifications-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Order_Behavior-OrderingPlugin.cmi +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 +1 -1
- package/lib/ocaml/Order_EmailNotification-OrderingPlugin.cmi +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 +4 -1
- package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmi +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 +5 -2
- package/lib/ocaml/Order_GWT-OrderingPlugin.cmi +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 +29 -24
- package/lib/ocaml/Order_Mappings-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Order_Mappings-OrderingPlugin.cmt +0 -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 +4 -2
- 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 +23 -8
- 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 +6 -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 -14
- package/lib/ocaml/Orders_Projections-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Projections-OrderingPlugin.cmt +0 -0
- 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.ast +0 -0
- package/lib/ocaml/Products_Extension.res +6 -2
- 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 +4 -2
- package/package.json +8 -8
- package/src/CatalogProduct/Aggregate/CatalogProduct.res +2 -0
- package/src/CatalogProduct/ReadModel/AvailableProducts.res +2 -0
- package/src/CatalogProduct/ReadModel/AvailableProducts_Projections.res.mjs +4 -4
- package/src/Customer/Aggregate/Customer.res +2 -0
- package/src/Customer/CustomerId.res +4 -0
- package/src/Customer/CustomerId.res.mjs +29 -0
- package/src/Customer/ReadModel/Customers.res +2 -0
- package/src/Customer/ReadModel/Customers_Projections.res.mjs +4 -4
- package/src/Extension/Products_Extension.res +6 -2
- package/src/Extension/Products_Extension.res.mjs +4 -3
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res +23 -8
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +28 -20
- package/src/Order/Aggregate/Order.res +7 -3
- package/src/Order/Aggregate/Order.res.mjs +7 -6
- package/src/Order/Aggregate/Order_Behavior.res +1 -1
- package/src/Order/Aggregate/Order_Behavior.res.mjs +4 -2
- package/src/Order/Aggregate/Order_Mappings.res.mjs +3 -3
- package/src/Order/OrderId.res +4 -0
- package/src/Order/OrderId.res.mjs +29 -0
- package/src/Order/ReadModel/Orders.res +4 -2
- package/src/Order/ReadModel/Orders.res.mjs +4 -2
- package/src/Order/ReadModel/Orders_Projections.res.mjs +4 -4
- package/src/Order/SideEffect/Order_EmailNotification.res +4 -1
- package/src/Order/SideEffect/Order_EmailNotification.res.mjs +4 -3
- package/src/Plugin.res.mjs +15 -13
- package/src/Task/OrderNotifications.res.mjs +3 -3
- package/tests/Extension/Products_Extension_GWT.res +4 -2
- package/tests/Extension/Products_Extension_GWT.res.mjs +7 -4
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res +6 -2
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +18 -7
- package/tests/Order/Aggregate/OrderMappings_GWT.res +6 -4
- package/tests/Order/Aggregate/OrderMappings_GWT.res.mjs +19 -11
- package/tests/Order/Aggregate/Order_GWT.res +29 -24
- package/tests/Order/Aggregate/Order_GWT.res.mjs +55 -44
- package/tests/Order/ReadModel/Orders_GWT.res +19 -14
- package/tests/Order/ReadModel/Orders_GWT.res.mjs +31 -20
- package/tests/Order/SideEffect/Order_EmailNotification_GWT.res +5 -2
- package/tests/Order/SideEffect/Order_EmailNotification_GWT.res.mjs +8 -6
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Customer.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Customer.res
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
@@reventless.spec
|
|
5
5
|
|
|
6
|
+
module Id = CustomerId
|
|
7
|
+
|
|
6
8
|
// The command is where an address is first accepted, so it is where the type
|
|
7
9
|
// belongs — a value that reaches the log is already permanent. The events below
|
|
8
10
|
// stay plain `string`: they record what was accepted, and re-validating history
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Order.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Order.res
CHANGED
|
@@ -3,18 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
@@reventless.spec
|
|
5
5
|
|
|
6
|
+
module Id = OrderId
|
|
7
|
+
|
|
6
8
|
@schema
|
|
7
9
|
type command =
|
|
8
|
-
|
|
10
|
+
// Both references are derived from the types: AvailableProducts is the one view
|
|
11
|
+
// here keyed by ProductId, and Customers the one keyed by CustomerId.
|
|
12
|
+
| Place({customerId: CustomerId.t, productIds: array<CatalogSpec.ProductId.t>})
|
|
9
13
|
| Ship
|
|
10
14
|
| Cancel
|
|
11
15
|
| Refund({reason: string})
|
|
12
16
|
|
|
13
17
|
@schema
|
|
14
18
|
type event =
|
|
15
|
-
| Placed({customerId:
|
|
19
|
+
| Placed({customerId: CustomerId.t, productIds: array<CatalogSpec.ProductId.t>})
|
|
16
20
|
| Shipped
|
|
17
|
-
| Cancelled({productIds: array<
|
|
21
|
+
| Cancelled({productIds: array<CatalogSpec.ProductId.t>})
|
|
18
22
|
| Refunded({reason: string})
|
|
19
23
|
|
|
20
24
|
@schema
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -17,13 +17,15 @@ module AutoShipGwtMapping = {
|
|
|
17
17
|
|
|
18
18
|
include ReventlessGwt.Mapping_GWT.Make(AutoShipGwtMapping)
|
|
19
19
|
|
|
20
|
-
let
|
|
20
|
+
let cust1 = CustomerId.make("cust-1")
|
|
21
|
+
let prod1 = CatalogSpec.ProductId.make("prod-1")
|
|
22
|
+
let placedEvent = Order.Placed({customerId: cust1, productIds: [prod1]})
|
|
21
23
|
|
|
22
24
|
describe("Order auto-ship mapping (Placed → Ship)", () => {
|
|
23
25
|
test("Place → AutoShipMapping issues Ship → target emits Shipped", () =>
|
|
24
26
|
givenSourceEvents([])
|
|
25
27
|
->andTargetEvents([("order-1", [placedEvent])])
|
|
26
|
-
->whenSourceCmd("order-1", Place({customerId:
|
|
28
|
+
->whenSourceCmd("order-1", Place({customerId: cust1, productIds: [prod1]}))
|
|
27
29
|
->thenTargetEvent("order-1", Order.Shipped)
|
|
28
30
|
)
|
|
29
31
|
|
|
@@ -42,8 +44,8 @@ describe("Order auto-ship mapping (Placed → Ship)", () => {
|
|
|
42
44
|
)
|
|
43
45
|
|
|
44
46
|
test("Refund command does not fire the mapping (only Placed events do)", () =>
|
|
45
|
-
givenSourceEvents([placedEvent, Order.Cancelled({productIds: [
|
|
46
|
-
->andTargetEvents([("order-1", [placedEvent, Order.Cancelled({productIds: [
|
|
47
|
+
givenSourceEvents([placedEvent, Order.Cancelled({productIds: [prod1]})])
|
|
48
|
+
->andTargetEvents([("order-1", [placedEvent, Order.Cancelled({productIds: [prod1]})])])
|
|
47
49
|
->whenSourceCmd("order-1", Refund({reason: "customer-changed-mind"}))
|
|
48
50
|
->thenNoTargetEvent
|
|
49
51
|
)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,6 +10,9 @@ module Source = {
|
|
|
10
10
|
let execute = async (orderId, _meta, event, _queryEngine) =>
|
|
11
11
|
switch event {
|
|
12
12
|
| Order.Placed({customerId}) =>
|
|
13
|
-
await EmailService.sendOrderConfirmation(
|
|
13
|
+
await EmailService.sendOrderConfirmation(
|
|
14
|
+
~email=customerId->CustomerId.toString,
|
|
15
|
+
~orderId=orderId->Order.Id.toString,
|
|
16
|
+
)
|
|
14
17
|
| _ => ()
|
|
15
18
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -16,7 +16,10 @@ describe(name ++ " SideEffect", () => {
|
|
|
16
16
|
EmailService_Mock.install()
|
|
17
17
|
givenEventForId(
|
|
18
18
|
Order.Id.makeFromString("o1"),
|
|
19
|
-
Order.Placed({
|
|
19
|
+
Order.Placed({
|
|
20
|
+
customerId: CustomerId.make("alice@example.com"),
|
|
21
|
+
productIds: [CatalogSpec.ProductId.make("p1")],
|
|
22
|
+
}),
|
|
20
23
|
)
|
|
21
24
|
->whenExecuted(EmailService_Mock.mock)
|
|
22
25
|
->thenExternalCalls([
|
|
@@ -33,7 +36,7 @@ describe(name ++ " SideEffect", () => {
|
|
|
33
36
|
|
|
34
37
|
test("Cancelled is a no-op", () => {
|
|
35
38
|
EmailService_Mock.install()
|
|
36
|
-
givenEvent(Order.Cancelled({productIds: ["p1"]}))
|
|
39
|
+
givenEvent(Order.Cancelled({productIds: [CatalogSpec.ProductId.make("p1")]}))
|
|
37
40
|
->whenExecuted(EmailService_Mock.mock)
|
|
38
41
|
->thenNoExternalCalls
|
|
39
42
|
})
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Order_GWT.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Order_GWT.res
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
@@reventless.gwt
|
|
2
2
|
|
|
3
|
+
// Ids are typed; the literals are made once, here.
|
|
4
|
+
let cust1 = CustomerId.make("cust-1")
|
|
5
|
+
let prod1 = CatalogSpec.ProductId.make("prod-1")
|
|
6
|
+
let prod2 = CatalogSpec.ProductId.make("prod-2")
|
|
7
|
+
|
|
3
8
|
describe("Order Behavior", () => {
|
|
4
9
|
test("Place on new aggregate produces Placed", () =>
|
|
5
10
|
givenEvents([])
|
|
6
|
-
->whenCmd(Place({customerId:
|
|
7
|
-
->thenEvent(Placed({customerId:
|
|
11
|
+
->whenCmd(Place({customerId: cust1, productIds: [prod1, prod2]}))
|
|
12
|
+
->thenEvent(Placed({customerId: cust1, productIds: [prod1, prod2]}))
|
|
8
13
|
)
|
|
9
14
|
|
|
10
15
|
test("Place on existing order returns OrderAlreadyPlaced", () =>
|
|
11
|
-
givenEvents([Placed({customerId:
|
|
12
|
-
->whenCmd(Place({customerId:
|
|
16
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]})])
|
|
17
|
+
->whenCmd(Place({customerId: cust1, productIds: [prod1]}))
|
|
13
18
|
->thenError(OrderAlreadyPlaced)
|
|
14
19
|
)
|
|
15
20
|
|
|
16
21
|
test("Place on shipped order returns OrderAlreadyShipped", () =>
|
|
17
|
-
givenEvents([Placed({customerId:
|
|
18
|
-
->whenCmd(Place({customerId:
|
|
22
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]}), Shipped])
|
|
23
|
+
->whenCmd(Place({customerId: cust1, productIds: [prod1]}))
|
|
19
24
|
->thenError(OrderAlreadyShipped)
|
|
20
25
|
)
|
|
21
26
|
|
|
22
27
|
test("Place on cancelled order returns OrderAlreadyCancelled", () =>
|
|
23
28
|
givenEvents([
|
|
24
|
-
Placed({customerId:
|
|
25
|
-
Cancelled({productIds: [
|
|
29
|
+
Placed({customerId: cust1, productIds: [prod1]}),
|
|
30
|
+
Cancelled({productIds: [prod1]}),
|
|
26
31
|
])
|
|
27
|
-
->whenCmd(Place({customerId:
|
|
32
|
+
->whenCmd(Place({customerId: cust1, productIds: [prod1]}))
|
|
28
33
|
->thenError(OrderAlreadyCancelled)
|
|
29
34
|
)
|
|
30
35
|
|
|
@@ -35,21 +40,21 @@ describe("Order Behavior", () => {
|
|
|
35
40
|
)
|
|
36
41
|
|
|
37
42
|
test("Ship on placed order produces Shipped", () =>
|
|
38
|
-
givenEvents([Placed({customerId:
|
|
43
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]})])
|
|
39
44
|
->whenCmd(Ship)
|
|
40
45
|
->thenEvent(Shipped)
|
|
41
46
|
)
|
|
42
47
|
|
|
43
48
|
test("Ship on shipped order produces no events (idempotent)", () =>
|
|
44
|
-
givenEvents([Placed({customerId:
|
|
49
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]}), Shipped])
|
|
45
50
|
->whenCmd(Ship)
|
|
46
51
|
->thenNoEvent
|
|
47
52
|
)
|
|
48
53
|
|
|
49
54
|
test("Ship on cancelled order returns OrderAlreadyCancelled", () =>
|
|
50
55
|
givenEvents([
|
|
51
|
-
Placed({customerId:
|
|
52
|
-
Cancelled({productIds: [
|
|
56
|
+
Placed({customerId: cust1, productIds: [prod1]}),
|
|
57
|
+
Cancelled({productIds: [prod1]}),
|
|
53
58
|
])
|
|
54
59
|
->whenCmd(Ship)
|
|
55
60
|
->thenError(OrderAlreadyCancelled)
|
|
@@ -62,21 +67,21 @@ describe("Order Behavior", () => {
|
|
|
62
67
|
)
|
|
63
68
|
|
|
64
69
|
test("Cancel on placed order produces Cancelled", () =>
|
|
65
|
-
givenEvents([Placed({customerId:
|
|
70
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]})])
|
|
66
71
|
->whenCmd(Cancel)
|
|
67
|
-
->thenEvent(Cancelled({productIds: [
|
|
72
|
+
->thenEvent(Cancelled({productIds: [prod1]}))
|
|
68
73
|
)
|
|
69
74
|
|
|
70
75
|
test("Cancel on shipped order returns OrderAlreadyShipped", () =>
|
|
71
|
-
givenEvents([Placed({customerId:
|
|
76
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]}), Shipped])
|
|
72
77
|
->whenCmd(Cancel)
|
|
73
78
|
->thenError(OrderAlreadyShipped)
|
|
74
79
|
)
|
|
75
80
|
|
|
76
81
|
test("Cancel on cancelled order produces no events (idempotent)", () =>
|
|
77
82
|
givenEvents([
|
|
78
|
-
Placed({customerId:
|
|
79
|
-
Cancelled({productIds: [
|
|
83
|
+
Placed({customerId: cust1, productIds: [prod1]}),
|
|
84
|
+
Cancelled({productIds: [prod1]}),
|
|
80
85
|
])
|
|
81
86
|
->whenCmd(Cancel)
|
|
82
87
|
->thenNoEvent
|
|
@@ -89,21 +94,21 @@ describe("Order Behavior", () => {
|
|
|
89
94
|
)
|
|
90
95
|
|
|
91
96
|
test("Refund on placed order returns OrderNotCancelled", () =>
|
|
92
|
-
givenEvents([Placed({customerId:
|
|
97
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]})])
|
|
93
98
|
->whenCmd(Refund({reason: "customer-changed-mind"}))
|
|
94
99
|
->thenError(OrderNotCancelled)
|
|
95
100
|
)
|
|
96
101
|
|
|
97
102
|
test("Refund on shipped order returns OrderNotCancelled", () =>
|
|
98
|
-
givenEvents([Placed({customerId:
|
|
103
|
+
givenEvents([Placed({customerId: cust1, productIds: [prod1]}), Shipped])
|
|
99
104
|
->whenCmd(Refund({reason: "delivered-damaged"}))
|
|
100
105
|
->thenError(OrderNotCancelled)
|
|
101
106
|
)
|
|
102
107
|
|
|
103
108
|
test("Refund on cancelled order produces Refunded", () =>
|
|
104
109
|
givenEvents([
|
|
105
|
-
Placed({customerId:
|
|
106
|
-
Cancelled({productIds: [
|
|
110
|
+
Placed({customerId: cust1, productIds: [prod1]}),
|
|
111
|
+
Cancelled({productIds: [prod1]}),
|
|
107
112
|
])
|
|
108
113
|
->whenCmd(Refund({reason: "customer-changed-mind"}))
|
|
109
114
|
->thenEvent(Refunded({reason: "customer-changed-mind"}))
|
|
@@ -111,8 +116,8 @@ describe("Order Behavior", () => {
|
|
|
111
116
|
|
|
112
117
|
test("Refund on already-refunded order produces no events (idempotent)", () =>
|
|
113
118
|
givenEvents([
|
|
114
|
-
Placed({customerId:
|
|
115
|
-
Cancelled({productIds: [
|
|
119
|
+
Placed({customerId: cust1, productIds: [prod1]}),
|
|
120
|
+
Cancelled({productIds: [prod1]}),
|
|
116
121
|
Refunded({reason: "customer-changed-mind"}),
|
|
117
122
|
])
|
|
118
123
|
->whenCmd(Refund({reason: "customer-changed-mind"}))
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,6 +6,7 @@ CatalogProduct
|
|
|
6
6
|
CatalogProduct_Behavior
|
|
7
7
|
CatalogProduct_GWT
|
|
8
8
|
Customer
|
|
9
|
+
CustomerId
|
|
9
10
|
Customer_Behavior
|
|
10
11
|
Customer_GWT
|
|
11
12
|
Customers
|
|
@@ -15,6 +16,7 @@ EmailService
|
|
|
15
16
|
EmailService_Mock
|
|
16
17
|
LifecycleModel
|
|
17
18
|
Order
|
|
19
|
+
OrderId
|
|
18
20
|
OrderMappings_GWT
|
|
19
21
|
OrderNotifications
|
|
20
22
|
Order_Behavior
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Orders.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Orders.res
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
@@reventless.spec
|
|
5
5
|
|
|
6
|
+
module Id = OrderId
|
|
7
|
+
|
|
6
8
|
@schema
|
|
7
9
|
type lifecycle =
|
|
8
10
|
| Placed
|
|
@@ -12,8 +14,8 @@ type lifecycle =
|
|
|
12
14
|
|
|
13
15
|
@schema
|
|
14
16
|
type state = {
|
|
15
|
-
customerId:
|
|
16
|
-
productIds: array<
|
|
17
|
+
customerId: CustomerId.t,
|
|
18
|
+
productIds: array<CatalogSpec.ProductId.t>,
|
|
17
19
|
// No annotation: the field name is the declaration. `@lifecycle` exists for
|
|
18
20
|
// records whose lifecycle field is honestly called something else.
|
|
19
21
|
lifecycle: lifecycle,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,16 +10,31 @@ let mapIncomingCommand = (_id, _command, _meta) => []
|
|
|
10
10
|
let mapOutgoingEvent = Some(
|
|
11
11
|
(_id, event, _meta, _queryEngine) =>
|
|
12
12
|
switch event {
|
|
13
|
+
// The published contract carries plain strings: a consumer outside this
|
|
14
|
+
// plugin has no OrderId or CustomerId type to hold them in.
|
|
13
15
|
| Order.Placed({customerId, productIds}) =>
|
|
14
|
-
productIds->Array.map(productId =>
|
|
15
|
-
productId
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
productIds->Array.map(productId => {
|
|
17
|
+
let productId = productId->CatalogSpec.ProductId.toString
|
|
18
|
+
PublishEvent(
|
|
19
|
+
productId,
|
|
20
|
+
OrderingSpec.Orders_ExtensionPoint.ItemOrdered({
|
|
21
|
+
productId,
|
|
22
|
+
orderId: _id,
|
|
23
|
+
customerId: customerId->CustomerId.toString,
|
|
24
|
+
}),
|
|
25
|
+
)
|
|
26
|
+
})
|
|
18
27
|
| Order.Cancelled({productIds}) =>
|
|
19
|
-
productIds->Array.map(productId =>
|
|
20
|
-
productId
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
productIds->Array.map(productId => {
|
|
29
|
+
let productId = productId->CatalogSpec.ProductId.toString
|
|
30
|
+
PublishEvent(
|
|
31
|
+
productId,
|
|
32
|
+
OrderingSpec.Orders_ExtensionPoint.ItemOrderCancelled({
|
|
33
|
+
productId,
|
|
34
|
+
orderId: _id,
|
|
35
|
+
}),
|
|
36
|
+
)
|
|
37
|
+
})
|
|
23
38
|
| _ => []
|
|
24
39
|
},
|
|
25
40
|
)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
// into one public per-product event each (one-to-many fan-out).
|
|
3
3
|
@@reventless.gwt
|
|
4
4
|
|
|
5
|
+
let c1 = CustomerId.make("c1")
|
|
6
|
+
let p1 = CatalogSpec.ProductId.make("p1")
|
|
7
|
+
let p2 = CatalogSpec.ProductId.make("p2")
|
|
8
|
+
|
|
5
9
|
describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
6
10
|
test("Placed fans out to one ItemOrdered per product", () =>
|
|
7
11
|
whenDelegateEvent(
|
|
8
|
-
Delegate.Placed({customerId:
|
|
12
|
+
Delegate.Placed({customerId: c1, productIds: [p1, p2]}),
|
|
9
13
|
)->thenPublishesEvents([
|
|
10
14
|
("p1", ExtensionPoint.ItemOrdered({productId: "p1", orderId: "gwt-id", customerId: "c1"})),
|
|
11
15
|
("p2", ExtensionPoint.ItemOrdered({productId: "p2", orderId: "gwt-id", customerId: "c1"})),
|
|
@@ -13,7 +17,7 @@ describe("Orders ExtensionPoint mapping — per-product fan-out", () => {
|
|
|
13
17
|
)
|
|
14
18
|
|
|
15
19
|
test("Cancelled fans out to one ItemOrderCancelled per product", () =>
|
|
16
|
-
whenDelegateEvent(Delegate.Cancelled({productIds: [
|
|
20
|
+
whenDelegateEvent(Delegate.Cancelled({productIds: [p1, p2]}))->thenPublishesEvents([
|
|
17
21
|
("p1", ExtensionPoint.ItemOrderCancelled({productId: "p1", orderId: "gwt-id"})),
|
|
18
22
|
("p2", ExtensionPoint.ItemOrderCancelled({productId: "p2", orderId: "gwt-id"})),
|
|
19
23
|
])
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Orders_GWT.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Orders_GWT.res
CHANGED
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
@@reventless.gwt(Orders_Projections.OrderMapping)
|
|
2
2
|
|
|
3
|
+
// Ids are typed; the literals are made once, here.
|
|
4
|
+
let cust1 = CustomerId.make("cust-1")
|
|
5
|
+
let prod1 = CatalogSpec.ProductId.make("prod-1")
|
|
6
|
+
let prod2 = CatalogSpec.ProductId.make("prod-2")
|
|
7
|
+
|
|
3
8
|
describe("Orders ReadModel ← Order", () => {
|
|
4
9
|
test("Placed sets initial read model state", () =>
|
|
5
10
|
givenEvents([])
|
|
6
|
-
->whenEvent(Order.Placed({customerId:
|
|
11
|
+
->whenEvent(Order.Placed({customerId: cust1, productIds: [prod1, prod2]}))
|
|
7
12
|
->thenState({
|
|
8
|
-
Orders.customerId:
|
|
9
|
-
productIds: [
|
|
13
|
+
Orders.customerId: cust1,
|
|
14
|
+
productIds: [prod1, prod2],
|
|
10
15
|
lifecycle: Placed,
|
|
11
16
|
})
|
|
12
17
|
)
|
|
13
18
|
|
|
14
19
|
test("Shipped updates status", () =>
|
|
15
|
-
givenEvents([Order.Placed({customerId:
|
|
20
|
+
givenEvents([Order.Placed({customerId: cust1, productIds: [prod1]})])
|
|
16
21
|
->whenEvent(Order.Shipped)
|
|
17
22
|
->thenState({
|
|
18
|
-
Orders.customerId:
|
|
19
|
-
productIds: [
|
|
23
|
+
Orders.customerId: cust1,
|
|
24
|
+
productIds: [prod1],
|
|
20
25
|
lifecycle: Shipped,
|
|
21
26
|
})
|
|
22
27
|
)
|
|
23
28
|
|
|
24
29
|
test("Cancelled updates status", () =>
|
|
25
|
-
givenEvents([Order.Placed({customerId:
|
|
26
|
-
->whenEvent(Order.Cancelled({productIds: [
|
|
30
|
+
givenEvents([Order.Placed({customerId: cust1, productIds: [prod1]})])
|
|
31
|
+
->whenEvent(Order.Cancelled({productIds: [prod1]}))
|
|
27
32
|
->thenState({
|
|
28
|
-
Orders.customerId:
|
|
29
|
-
productIds: [
|
|
33
|
+
Orders.customerId: cust1,
|
|
34
|
+
productIds: [prod1],
|
|
30
35
|
lifecycle: Cancelled,
|
|
31
36
|
})
|
|
32
37
|
)
|
|
33
38
|
|
|
34
39
|
test("Refunded updates status", () =>
|
|
35
40
|
givenEvents([
|
|
36
|
-
Order.Placed({customerId:
|
|
37
|
-
Order.Cancelled({productIds: [
|
|
41
|
+
Order.Placed({customerId: cust1, productIds: [prod1]}),
|
|
42
|
+
Order.Cancelled({productIds: [prod1]}),
|
|
38
43
|
])
|
|
39
44
|
->whenEvent(Order.Refunded({reason: "customer-changed-mind"}))
|
|
40
45
|
->thenState({
|
|
41
|
-
Orders.customerId:
|
|
42
|
-
productIds: [
|
|
46
|
+
Orders.customerId: cust1,
|
|
47
|
+
productIds: [prod1],
|
|
43
48
|
lifecycle: Refunded,
|
|
44
49
|
})
|
|
45
50
|
)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|