@reventlessdev/online-shop-dcb-ordering 1.0.0-alpha.302 → 1.0.0-alpha.304
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/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_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateChange/SyncCatalogProduct_Decision-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_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateView/AvailableProducts_Projection-OrderingPlugin.cmt +0 -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 +4 -4
- package/lib/bs/src/Customer/StateChange/ChangeAddress.res.mjs +5 -4
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Decision-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Decision-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Decision.ast +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Decision.res +4 -3
- package/lib/bs/src/Customer/StateChange/ChangeAddress_Decision.res.mjs +8 -4
- 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 +4 -4
- package/lib/bs/src/Customer/StateChange/ChangeEmail.res.mjs +5 -4
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Decision-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Decision-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Decision.ast +0 -0
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Decision.res +8 -3
- package/lib/bs/src/Customer/StateChange/ChangeEmail_Decision.res.mjs +8 -4
- 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_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/DeactivateCustomer_Decision-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 +12 -2
- package/lib/bs/src/Customer/StateChange/RegisterCustomer.res.mjs +5 -4
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Decision-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Decision.ast +0 -0
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Decision.res +1 -1
- package/lib/bs/src/Customer/StateChange/RegisterCustomer_Decision.res.mjs +8 -2
- 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 +3 -3
- package/lib/bs/src/Customer/StateView/Customers.res.mjs +5 -4
- package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Customer/StateView/Customers_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Customer/StateView/Customers_Projection.ast +0 -0
- package/lib/bs/src/Customer/StateView/Customers_Projection.res +17 -3
- package/lib/bs/src/Customer/StateView/Customers_Projection.res.mjs +6 -5
- 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/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_Automation-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/Automation/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -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_Translation-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/OutboundTranslation/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
- 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_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/CancelOrder_Decision-OrderingPlugin.cmt +0 -0
- 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_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/PlaceOrder_Decision-OrderingPlugin.cmt +0 -0
- 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_Decision-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChange/ShipOrder_Decision-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_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/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/StateView/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateView/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- 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 +4 -4
- package/lib/bs/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +16 -4
- 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 +4 -4
- package/lib/bs/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +16 -4
- 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/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 +3 -1
- package/lib/bs/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +8 -2
- 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 +14 -6
- package/lib/bs/tests/Customer/StateView/Customers_GWT.res.mjs +40 -10
- 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/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- 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/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/OutboundTranslation/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- 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/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChange/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- 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/StateView/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateView/Orders_GWT-OrderingPlugin.cmt +0 -0
- 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_Automation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder_Automation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- 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_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_Decision-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- 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 +4 -4
- package/lib/ocaml/ChangeAddress_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeAddress_Decision-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/ChangeAddress_Decision-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeAddress_Decision.ast +0 -0
- package/lib/ocaml/ChangeAddress_Decision.res +4 -3
- 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 +4 -4
- 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 +4 -4
- package/lib/ocaml/ChangeEmail_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeEmail_Decision-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/ChangeEmail_Decision-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeEmail_Decision.ast +0 -0
- package/lib/ocaml/ChangeEmail_Decision.res +8 -3
- 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 +4 -4
- 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 +3 -3
- 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 +14 -6
- package/lib/ocaml/Customers_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_Projection-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Customers_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers_Projection.ast +0 -0
- package/lib/ocaml/Customers_Projection.res +17 -3
- package/lib/ocaml/DeactivateCustomer-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/DeactivateCustomer-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/DeactivateCustomer_Decision-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/LifecycleModel-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/LifecycleModel-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmt +0 -0
- 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_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder_Decision-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder_GWT-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_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
- 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 +12 -2
- package/lib/ocaml/RegisterCustomer_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer_Decision-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/RegisterCustomer_Decision.ast +0 -0
- package/lib/ocaml/RegisterCustomer_Decision.res +1 -1
- 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 +3 -1
- package/lib/ocaml/SendOrderConfirmation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation_Translation-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_Decision-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/SyncCatalogProduct-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_Decision-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_Decision-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/package.json +7 -7
- package/src/Customer/StateChange/ChangeAddress.res +4 -4
- package/src/Customer/StateChange/ChangeAddress.res.mjs +5 -4
- package/src/Customer/StateChange/ChangeAddress_Decision.res +4 -3
- package/src/Customer/StateChange/ChangeAddress_Decision.res.mjs +8 -4
- package/src/Customer/StateChange/ChangeEmail.res +4 -4
- package/src/Customer/StateChange/ChangeEmail.res.mjs +5 -4
- package/src/Customer/StateChange/ChangeEmail_Decision.res +8 -3
- package/src/Customer/StateChange/ChangeEmail_Decision.res.mjs +8 -4
- package/src/Customer/StateChange/RegisterCustomer.res +12 -2
- package/src/Customer/StateChange/RegisterCustomer.res.mjs +5 -4
- package/src/Customer/StateChange/RegisterCustomer_Decision.res +1 -1
- package/src/Customer/StateChange/RegisterCustomer_Decision.res.mjs +8 -2
- package/src/Customer/StateView/Customers.res +3 -3
- package/src/Customer/StateView/Customers.res.mjs +5 -4
- package/src/Customer/StateView/Customers_Projection.res +17 -3
- package/src/Customer/StateView/Customers_Projection.res.mjs +6 -5
- package/tests/Customer/StateChange/ChangeAddress_GWT.res +4 -4
- package/tests/Customer/StateChange/ChangeAddress_GWT.res.mjs +16 -4
- package/tests/Customer/StateChange/ChangeEmail_GWT.res +4 -4
- package/tests/Customer/StateChange/ChangeEmail_GWT.res.mjs +16 -4
- package/tests/Customer/StateChange/RegisterCustomer_GWT.res +3 -1
- package/tests/Customer/StateChange/RegisterCustomer_GWT.res.mjs +8 -2
- package/tests/Customer/StateView/Customers_GWT.res +14 -6
- package/tests/Customer/StateView/Customers_GWT.res.mjs +40 -10
|
@@ -6,8 +6,13 @@ let initialState = {exists: false, deactivated: false, currentEmail: ""}
|
|
|
6
6
|
|
|
7
7
|
let evolve = (state, event) =>
|
|
8
8
|
switch event {
|
|
9
|
-
|
|
10
|
-
|
|
|
9
|
+
// An erased address matches no address presented later.
|
|
10
|
+
| CustomerRegistered({email}) => {
|
|
11
|
+
exists: true,
|
|
12
|
+
deactivated: false,
|
|
13
|
+
currentEmail: email->Reventless.Pii.getOr(""),
|
|
14
|
+
}
|
|
15
|
+
| EmailChanged({email}) => {...state, currentEmail: email->Reventless.Pii.getOr("")}
|
|
11
16
|
| CustomerDeactivated => {...state, deactivated: true}
|
|
12
17
|
}
|
|
13
18
|
|
|
@@ -21,6 +26,6 @@ let decide = (state, command) =>
|
|
|
21
26
|
} else if email == state.currentEmail {
|
|
22
27
|
Ok([]) // idempotent — email unchanged
|
|
23
28
|
} else {
|
|
24
|
-
Ok([EmailChanged({customerId, email})])
|
|
29
|
+
Ok([EmailChanged({customerId, email: Value(email)})])
|
|
25
30
|
}
|
|
26
31
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -12,21 +12,21 @@ describe("ChangeEmail StateChangeSlice", () => {
|
|
|
12
12
|
|
|
13
13
|
// scenario-id: c772aca9-7aa7-4ee0-bb3e-be1a2dc46967
|
|
14
14
|
test("active customer produces EmailChanged", () =>
|
|
15
|
-
givenEvents([CustomerRegistered({email: aliceEmail})])
|
|
15
|
+
givenEvents([CustomerRegistered({email: Value(aliceEmail)})])
|
|
16
16
|
->whenCmd(ChangeEmail({customerId: c1, email: aliceNewEmail}))
|
|
17
|
-
->thenEvent(EmailChanged({customerId: c1, email: aliceNewEmail}))
|
|
17
|
+
->thenEvent(EmailChanged({customerId: c1, email: Value(aliceNewEmail)}))
|
|
18
18
|
)
|
|
19
19
|
|
|
20
20
|
// scenario-id: 659398db-0145-4e2f-8087-905a1ff03af3
|
|
21
21
|
test("same email produces no events (idempotent)", () =>
|
|
22
|
-
givenEvents([CustomerRegistered({email: aliceEmail})])
|
|
22
|
+
givenEvents([CustomerRegistered({email: Value(aliceEmail)})])
|
|
23
23
|
->whenCmd(ChangeEmail({customerId: c1, email: aliceEmail}))
|
|
24
24
|
->thenNoEvent
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
// scenario-id: c868f35b-ea20-438e-947d-58568db6adbd
|
|
28
28
|
test("deactivated customer returns CustomerAlreadyDeactivated", () =>
|
|
29
|
-
givenEvents([CustomerRegistered({email: aliceEmail}), CustomerDeactivated])
|
|
29
|
+
givenEvents([CustomerRegistered({email: Value(aliceEmail)}), CustomerDeactivated])
|
|
30
30
|
->whenCmd(ChangeEmail({customerId: c1, email: aliceNewEmail}))
|
|
31
31
|
->thenError(CustomerAlreadyDeactivated)
|
|
32
32
|
)
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Customers.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Customers.res
CHANGED
|
@@ -15,7 +15,7 @@ type state = {
|
|
|
15
15
|
|
|
16
16
|
@schema
|
|
17
17
|
type consumedEvent =
|
|
18
|
-
| CustomerRegistered({customerId: CustomerId.t, email: string, address: string})
|
|
19
|
-
| EmailChanged({customerId: CustomerId.t, email: string})
|
|
20
|
-
| AddressChanged({customerId: CustomerId.t, address: string})
|
|
18
|
+
| CustomerRegistered({customerId: CustomerId.t, @pii email: string, @pii address: string})
|
|
19
|
+
| EmailChanged({customerId: CustomerId.t, @pii email: string})
|
|
20
|
+
| AddressChanged({customerId: CustomerId.t, @pii address: string})
|
|
21
21
|
| CustomerDeactivated({customerId: CustomerId.t})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,9 @@ describe("Customers StateViewSlice", () => {
|
|
|
6
6
|
// scenario-id: 56a23bc7-31ce-4e9c-a7f1-d523e75aefba
|
|
7
7
|
test("CustomerRegistered creates a row", () =>
|
|
8
8
|
givenEvents([])
|
|
9
|
-
->whenEvent(
|
|
9
|
+
->whenEvent(
|
|
10
|
+
CustomerRegistered({customerId: c1, email: Value(aliceEmail), address: Value(mainStreet)}),
|
|
11
|
+
)
|
|
10
12
|
->thenStateWithId(
|
|
11
13
|
"c1",
|
|
12
14
|
{customerId: c1, email: aliceEmail, address: mainStreet, deactivated: false},
|
|
@@ -15,8 +17,10 @@ describe("Customers StateViewSlice", () => {
|
|
|
15
17
|
|
|
16
18
|
// scenario-id: 941f8ba9-3740-49f7-bb3a-e3aca90f10bf
|
|
17
19
|
test("EmailChanged updates the email", () =>
|
|
18
|
-
givenEvents([
|
|
19
|
-
|
|
20
|
+
givenEvents([
|
|
21
|
+
CustomerRegistered({customerId: c1, email: Value(aliceEmail), address: Value(mainStreet)}),
|
|
22
|
+
])
|
|
23
|
+
->whenEvent(EmailChanged({customerId: c1, email: Value(aliceNewEmail)}))
|
|
20
24
|
->thenStateWithId(
|
|
21
25
|
"c1",
|
|
22
26
|
{customerId: c1, email: aliceNewEmail, address: mainStreet, deactivated: false},
|
|
@@ -25,8 +29,10 @@ describe("Customers StateViewSlice", () => {
|
|
|
25
29
|
|
|
26
30
|
// scenario-id: 778d3e61-2b9b-4f55-a4ca-57f5e476a09b
|
|
27
31
|
test("AddressChanged updates the address", () =>
|
|
28
|
-
givenEvents([
|
|
29
|
-
|
|
32
|
+
givenEvents([
|
|
33
|
+
CustomerRegistered({customerId: c1, email: Value(aliceEmail), address: Value(mainStreet)}),
|
|
34
|
+
])
|
|
35
|
+
->whenEvent(AddressChanged({customerId: c1, address: Value(pineStreet)}))
|
|
30
36
|
->thenStateWithId(
|
|
31
37
|
"c1",
|
|
32
38
|
{customerId: c1, email: aliceEmail, address: pineStreet, deactivated: false},
|
|
@@ -35,7 +41,9 @@ describe("Customers StateViewSlice", () => {
|
|
|
35
41
|
|
|
36
42
|
// scenario-id: 783d84a5-3b4d-41df-bf3c-abaa9c717bd7
|
|
37
43
|
test("CustomerDeactivated sets deactivated flag", () =>
|
|
38
|
-
givenEvents([
|
|
44
|
+
givenEvents([
|
|
45
|
+
CustomerRegistered({customerId: c1, email: Value(aliceEmail), address: Value(mainStreet)}),
|
|
46
|
+
])
|
|
39
47
|
->whenEvent(CustomerDeactivated({customerId: c1}))
|
|
40
48
|
->thenStateWithId(
|
|
41
49
|
"c1",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -3,10 +3,24 @@
|
|
|
3
3
|
let project = ({event}) =>
|
|
4
4
|
switch event {
|
|
5
5
|
| CustomerRegistered({customerId, email, address}) => [
|
|
6
|
-
|
|
6
|
+
// The view holds plaintext; an erased customer's row is cleared by the app's
|
|
7
|
+
// erasure, and a rebuild after it writes nothing in its place.
|
|
8
|
+
Set(
|
|
9
|
+
customerId,
|
|
10
|
+
{
|
|
11
|
+
customerId,
|
|
12
|
+
email: email->Reventless.Pii.getOr(""),
|
|
13
|
+
address: address->Reventless.Pii.getOr(""),
|
|
14
|
+
deactivated: false,
|
|
15
|
+
},
|
|
16
|
+
),
|
|
17
|
+
]
|
|
18
|
+
| EmailChanged({customerId, email}) => [
|
|
19
|
+
Update(customerId, state => {...state, email: email->Reventless.Pii.getOr("")}),
|
|
20
|
+
]
|
|
21
|
+
| AddressChanged({customerId, address}) => [
|
|
22
|
+
Update(customerId, state => {...state, address: address->Reventless.Pii.getOr("")}),
|
|
7
23
|
]
|
|
8
|
-
| EmailChanged({customerId, email}) => [Update(customerId, state => {...state, email})]
|
|
9
|
-
| AddressChanged({customerId, address}) => [Update(customerId, state => {...state, address})]
|
|
10
24
|
| CustomerDeactivated({customerId}) => [
|
|
11
25
|
Update(customerId, state => {...state, deactivated: true}),
|
|
12
26
|
]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,10 +6,20 @@
|
|
|
6
6
|
type consumedEvent = CustomerRegistered
|
|
7
7
|
|
|
8
8
|
@schema
|
|
9
|
-
type command =
|
|
9
|
+
type command =
|
|
10
|
+
| RegisterCustomer({
|
|
11
|
+
customerId: CustomerId.t,
|
|
12
|
+
@pii("customerId") email: string,
|
|
13
|
+
@pii("customerId") address: string,
|
|
14
|
+
})
|
|
10
15
|
|
|
11
16
|
@schema
|
|
12
17
|
type error = CustomerAlreadyRegistered
|
|
13
18
|
|
|
14
19
|
@schema
|
|
15
|
-
type event =
|
|
20
|
+
type event =
|
|
21
|
+
| CustomerRegistered({
|
|
22
|
+
customerId: CustomerId.t,
|
|
23
|
+
@pii("customerId") email: string,
|
|
24
|
+
@pii("customerId") address: string,
|
|
25
|
+
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -7,7 +7,9 @@ describe("RegisterCustomer StateChangeSlice", () => {
|
|
|
7
7
|
test("empty event log produces CustomerRegistered", () =>
|
|
8
8
|
givenEvents([])
|
|
9
9
|
->whenCmd(RegisterCustomer({customerId: c1, email: aliceEmail, address: mainStreet}))
|
|
10
|
-
->thenEvent(
|
|
10
|
+
->thenEvent(
|
|
11
|
+
CustomerRegistered({customerId: c1, email: Value(aliceEmail), address: Value(mainStreet)}),
|
|
12
|
+
)
|
|
11
13
|
)
|
|
12
14
|
|
|
13
15
|
// scenario-id: d99db741-d659-456e-b84f-9af30a7d8a41
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/online-shop-dcb-ordering",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.304",
|
|
4
4
|
"description": "Online Shop example — Ordering bounded context (Customer & Order) using the DCB pattern",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"sury": "11.0.0",
|
|
24
|
-
"@reventlessdev/online-shop-dcb-
|
|
24
|
+
"@reventlessdev/online-shop-dcb-catalog-spec": "1.0.0-alpha.190",
|
|
25
|
+
"@reventlessdev/reventless-gwt": "1.0.0-alpha.270",
|
|
25
26
|
"@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
|
|
26
|
-
"@reventlessdev/reventless-
|
|
27
|
-
"@reventlessdev/online-shop-dcb-
|
|
28
|
-
"@reventlessdev/reventless-
|
|
29
|
-
"@reventlessdev/reventless-local": "3.0.0-alpha.
|
|
30
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.188"
|
|
27
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.219",
|
|
28
|
+
"@reventlessdev/online-shop-dcb-ordering-spec": "1.0.0-alpha.190",
|
|
29
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.190",
|
|
30
|
+
"@reventlessdev/reventless-local": "3.0.0-alpha.313"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"rescript": "12.3.1",
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
@schema
|
|
6
6
|
type consumedEvent =
|
|
7
|
-
| CustomerRegistered({address: string})
|
|
8
|
-
| AddressChanged({address: string})
|
|
7
|
+
| CustomerRegistered({@pii address: string})
|
|
8
|
+
| AddressChanged({@pii address: string})
|
|
9
9
|
| CustomerDeactivated
|
|
10
10
|
|
|
11
11
|
@schema
|
|
12
|
-
type command = ChangeAddress({customerId: CustomerId.t, address: string})
|
|
12
|
+
type command = ChangeAddress({customerId: CustomerId.t, @pii("customerId") 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: CustomerId.t, address: string})
|
|
20
|
+
type event = AddressChanged({customerId: CustomerId.t, @pii("customerId") address: string})
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Sury from "sury";
|
|
4
|
+
import * as Pii$Reventless from "@reventlessdev/reventless-spec/src/components/Pii.res.mjs";
|
|
4
5
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
5
6
|
import * as CustomerId$OrderingPlugin from "../CustomerId.res.mjs";
|
|
6
7
|
|
|
7
8
|
let consumedEventSchema = Sury.union([
|
|
8
9
|
Sury.$schema(s => ({
|
|
9
10
|
TAG: "CustomerRegistered",
|
|
10
|
-
address: s.m(Sury.string)
|
|
11
|
+
address: s.m(Pii$Reventless.marked("$stream", undefined, Sury.string))
|
|
11
12
|
})),
|
|
12
13
|
Sury.$schema(s => ({
|
|
13
14
|
TAG: "AddressChanged",
|
|
14
|
-
address: s.m(Sury.string)
|
|
15
|
+
address: s.m(Pii$Reventless.marked("$stream", undefined, Sury.string))
|
|
15
16
|
})),
|
|
16
17
|
Sury.literal("CustomerDeactivated")
|
|
17
18
|
]);
|
|
@@ -19,7 +20,7 @@ let consumedEventSchema = Sury.union([
|
|
|
19
20
|
let commandSchema = Sury.$schema(s => ({
|
|
20
21
|
TAG: "ChangeAddress",
|
|
21
22
|
customerId: s.m(DcbTag$Reventless.mark(CustomerId$OrderingPlugin.schema)),
|
|
22
|
-
address: s.m(Sury.string)
|
|
23
|
+
address: s.m(Pii$Reventless.mark("customerId", undefined, Sury.string))
|
|
23
24
|
}));
|
|
24
25
|
|
|
25
26
|
let errorSchema = Sury.union([
|
|
@@ -30,7 +31,7 @@ let errorSchema = Sury.union([
|
|
|
30
31
|
let eventSchema = Sury.$schema(s => ({
|
|
31
32
|
TAG: "AddressChanged",
|
|
32
33
|
customerId: s.m(DcbTag$Reventless.mark(CustomerId$OrderingPlugin.schema)),
|
|
33
|
-
address: s.m(Sury.string)
|
|
34
|
+
address: s.m(Pii$Reventless.marked("customerId", undefined, Sury.string))
|
|
34
35
|
}));
|
|
35
36
|
|
|
36
37
|
function authorizationOf(param) {
|
|
@@ -9,9 +9,10 @@ let evolve = (state, event) =>
|
|
|
9
9
|
| CustomerRegistered({address}) => {
|
|
10
10
|
exists: true,
|
|
11
11
|
deactivated: false,
|
|
12
|
-
|
|
12
|
+
// An erased address matches no address presented later.
|
|
13
|
+
currentAddress: address->Reventless.Pii.getOr(""),
|
|
13
14
|
}
|
|
14
|
-
| AddressChanged({address}) => {...state, currentAddress: address}
|
|
15
|
+
| AddressChanged({address}) => {...state, currentAddress: address->Reventless.Pii.getOr("")}
|
|
15
16
|
| CustomerDeactivated => {...state, deactivated: true}
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -25,6 +26,6 @@ let decide = (state, command) =>
|
|
|
25
26
|
} else if address == state.currentAddress {
|
|
26
27
|
Ok([]) // idempotent — address unchanged
|
|
27
28
|
} else {
|
|
28
|
-
Ok([AddressChanged({customerId, address})])
|
|
29
|
+
Ok([AddressChanged({customerId, address: Value(address)})])
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
+
import * as Pii$Reventless from "@reventlessdev/reventless-spec/src/components/Pii.res.mjs";
|
|
3
4
|
|
|
4
5
|
function evolve(state, event) {
|
|
5
6
|
if (typeof event !== "object") {
|
|
@@ -12,13 +13,13 @@ function evolve(state, event) {
|
|
|
12
13
|
return {
|
|
13
14
|
exists: true,
|
|
14
15
|
deactivated: false,
|
|
15
|
-
currentAddress: event.address
|
|
16
|
+
currentAddress: Pii$Reventless.getOr(event.address, "")
|
|
16
17
|
};
|
|
17
18
|
} else {
|
|
18
19
|
return {
|
|
19
20
|
exists: state.exists,
|
|
20
21
|
deactivated: state.deactivated,
|
|
21
|
-
currentAddress: event.address
|
|
22
|
+
currentAddress: Pii$Reventless.getOr(event.address, "")
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -48,7 +49,10 @@ function decide(state, command) {
|
|
|
48
49
|
_0: [{
|
|
49
50
|
TAG: "AddressChanged",
|
|
50
51
|
customerId: command.customerId,
|
|
51
|
-
address:
|
|
52
|
+
address: {
|
|
53
|
+
TAG: "Value",
|
|
54
|
+
_0: address
|
|
55
|
+
}
|
|
52
56
|
}]
|
|
53
57
|
};
|
|
54
58
|
}
|
|
@@ -71,4 +75,4 @@ export {
|
|
|
71
75
|
decide,
|
|
72
76
|
moduleUrl,
|
|
73
77
|
}
|
|
74
|
-
/*
|
|
78
|
+
/* Pii-Reventless Not a pure module */
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
@schema
|
|
6
6
|
type consumedEvent =
|
|
7
|
-
| CustomerRegistered({email: string})
|
|
8
|
-
| EmailChanged({email: string})
|
|
7
|
+
| CustomerRegistered({@pii email: string})
|
|
8
|
+
| EmailChanged({@pii email: string})
|
|
9
9
|
| CustomerDeactivated
|
|
10
10
|
|
|
11
11
|
@schema
|
|
12
|
-
type command = ChangeEmail({customerId: CustomerId.t, email: string})
|
|
12
|
+
type command = ChangeEmail({customerId: CustomerId.t, @pii("customerId") 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: CustomerId.t, email: string})
|
|
20
|
+
type event = EmailChanged({customerId: CustomerId.t, @pii("customerId") email: string})
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as Sury from "sury";
|
|
4
|
+
import * as Pii$Reventless from "@reventlessdev/reventless-spec/src/components/Pii.res.mjs";
|
|
4
5
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
5
6
|
import * as CustomerId$OrderingPlugin from "../CustomerId.res.mjs";
|
|
6
7
|
|
|
7
8
|
let consumedEventSchema = Sury.union([
|
|
8
9
|
Sury.$schema(s => ({
|
|
9
10
|
TAG: "CustomerRegistered",
|
|
10
|
-
email: s.m(Sury.string)
|
|
11
|
+
email: s.m(Pii$Reventless.marked("$stream", undefined, Sury.string))
|
|
11
12
|
})),
|
|
12
13
|
Sury.$schema(s => ({
|
|
13
14
|
TAG: "EmailChanged",
|
|
14
|
-
email: s.m(Sury.string)
|
|
15
|
+
email: s.m(Pii$Reventless.marked("$stream", undefined, Sury.string))
|
|
15
16
|
})),
|
|
16
17
|
Sury.literal("CustomerDeactivated")
|
|
17
18
|
]);
|
|
@@ -19,7 +20,7 @@ let consumedEventSchema = Sury.union([
|
|
|
19
20
|
let commandSchema = Sury.$schema(s => ({
|
|
20
21
|
TAG: "ChangeEmail",
|
|
21
22
|
customerId: s.m(DcbTag$Reventless.mark(CustomerId$OrderingPlugin.schema)),
|
|
22
|
-
email: s.m(Sury.string)
|
|
23
|
+
email: s.m(Pii$Reventless.mark("customerId", undefined, Sury.string))
|
|
23
24
|
}));
|
|
24
25
|
|
|
25
26
|
let errorSchema = Sury.union([
|
|
@@ -30,7 +31,7 @@ let errorSchema = Sury.union([
|
|
|
30
31
|
let eventSchema = Sury.$schema(s => ({
|
|
31
32
|
TAG: "EmailChanged",
|
|
32
33
|
customerId: s.m(DcbTag$Reventless.mark(CustomerId$OrderingPlugin.schema)),
|
|
33
|
-
email: s.m(Sury.string)
|
|
34
|
+
email: s.m(Pii$Reventless.marked("customerId", undefined, Sury.string))
|
|
34
35
|
}));
|
|
35
36
|
|
|
36
37
|
function authorizationOf(param) {
|
|
@@ -6,8 +6,13 @@ let initialState = {exists: false, deactivated: false, currentEmail: ""}
|
|
|
6
6
|
|
|
7
7
|
let evolve = (state, event) =>
|
|
8
8
|
switch event {
|
|
9
|
-
|
|
10
|
-
|
|
|
9
|
+
// An erased address matches no address presented later.
|
|
10
|
+
| CustomerRegistered({email}) => {
|
|
11
|
+
exists: true,
|
|
12
|
+
deactivated: false,
|
|
13
|
+
currentEmail: email->Reventless.Pii.getOr(""),
|
|
14
|
+
}
|
|
15
|
+
| EmailChanged({email}) => {...state, currentEmail: email->Reventless.Pii.getOr("")}
|
|
11
16
|
| CustomerDeactivated => {...state, deactivated: true}
|
|
12
17
|
}
|
|
13
18
|
|
|
@@ -21,6 +26,6 @@ let decide = (state, command) =>
|
|
|
21
26
|
} else if email == state.currentEmail {
|
|
22
27
|
Ok([]) // idempotent — email unchanged
|
|
23
28
|
} else {
|
|
24
|
-
Ok([EmailChanged({customerId, email})])
|
|
29
|
+
Ok([EmailChanged({customerId, email: Value(email)})])
|
|
25
30
|
}
|
|
26
31
|
}
|