@reventlessdev/online-shop-dcb-ordering 1.0.0-alpha.213 → 1.0.0-alpha.215
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/StateViewSlice/AvailableProducts-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateViewSlice/AvailableProducts-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/CatalogProduct/StateViewSlice/AvailableProducts.ast +0 -0
- package/lib/bs/src/CatalogProduct/StateViewSlice/AvailableProducts.res.mjs +3 -2
- package/lib/bs/src/CatalogProduct/StateViewSlice/AvailableProducts_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/CatalogProduct/StateViewSlice/AvailableProducts_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders.ast +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders.res +4 -2
- package/lib/bs/src/Order/StateViewSlice/Orders.res.mjs +5 -27
- package/lib/bs/src/Order/StateViewSlice/Orders_Projection-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders_Projection-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders_Projection.ast +0 -0
- package/lib/bs/src/Order/StateViewSlice/Orders_Projection.res +3 -3
- package/lib/bs/src/Order/StateViewSlice/Orders_Projection.res.mjs +3 -3
- package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateViewSlice/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateViewSlice/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateViewSlice/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateViewSlice/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/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/AutomationSlice/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/AutomationSlice/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateViewSlice/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateViewSlice/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateViewSlice/Orders_GWT.ast +0 -0
- package/lib/bs/tests/Order/StateViewSlice/Orders_GWT.res +3 -3
- package/lib/bs/tests/Order/StateViewSlice/Orders_GWT.res.mjs +3 -3
- package/lib/ocaml/.compiler.log +2 -2
- 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.ast +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_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_Behavior-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_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_GWT-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/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 +4 -2
- 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_GWT.ast +0 -0
- package/lib/ocaml/Orders_GWT.res +3 -3
- package/lib/ocaml/Orders_Projection-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Projection-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_Projection.ast +0 -0
- package/lib/ocaml/Orders_Projection.res +3 -3
- 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_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer_GWT-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/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/package.json +8 -8
- package/src/CatalogProduct/StateViewSlice/AvailableProducts.res.mjs +3 -2
- package/src/Order/StateViewSlice/Orders.res +4 -2
- package/src/Order/StateViewSlice/Orders.res.mjs +5 -27
- package/src/Order/StateViewSlice/Orders_Projection.res +3 -3
- package/src/Order/StateViewSlice/Orders_Projection.res.mjs +3 -3
- package/tests/Order/StateViewSlice/Orders_GWT.res +3 -3
- package/tests/Order/StateViewSlice/Orders_GWT.res.mjs +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 1.0.0-alpha.215 (2026-08-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **spec:** [@retired](https://github.com/retired) state-field annotation and its schema emission ([2d8234b](https://github.com/ReventlessDev/reventless-core/commit/2d8234b6b3dd8f479031a67eb5b4b47b5c0c2ff9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# 1.0.0-alpha.214 (2026-08-15)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @reventlessdev/online-shop-dcb-ordering
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 1.0.0-alpha.213 (2026-08-15)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @reventlessdev/online-shop-dcb-ordering
|
package/lib/bs/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1786876612829)
|
|
2
|
+
#Done(1786876617931)
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"bsc_hash": "75e3a59c95cc953608fd3dd6ea6ed68141bba4414a20a52f114261b8a48385fa",
|
|
5
5
|
"rescript_config_hash": "2b45634c4ef9d26c69e2cd8282eb5d077ce9cf087ded0065001d0f0d889e241c",
|
|
6
6
|
"runtime_path": "/home/runner/work/reventless-core/reventless-core/node_modules/@rescript/runtime",
|
|
7
|
-
"generated_at": "
|
|
7
|
+
"generated_at": "1786876617944"
|
|
8
8
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -42,10 +42,11 @@ let stateSchema$1 = S.Metadata.set(stateSchema, StateAnnotations$Reventless.stat
|
|
|
42
42
|
scanSort: [],
|
|
43
43
|
semantic: [],
|
|
44
44
|
metric: [],
|
|
45
|
-
|
|
45
|
+
lifecycle: undefined,
|
|
46
46
|
groupBy: undefined,
|
|
47
47
|
visibility: "Internal",
|
|
48
|
-
live: undefined
|
|
48
|
+
live: undefined,
|
|
49
|
+
retired: undefined
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
let name = "AvailableProducts";
|
package/lib/bs/src/CatalogProduct/StateViewSlice/AvailableProducts_Projection-OrderingPlugin.cmi
CHANGED
|
Binary file
|
package/lib/bs/src/CatalogProduct/StateViewSlice/AvailableProducts_Projection-OrderingPlugin.cmt
CHANGED
|
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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@@reventless.spec
|
|
4
4
|
|
|
5
5
|
@schema
|
|
6
|
-
type
|
|
6
|
+
type lifecycle =
|
|
7
7
|
| Placed
|
|
8
8
|
| Shipped
|
|
9
9
|
| Cancelled
|
|
@@ -13,7 +13,9 @@ type state = {
|
|
|
13
13
|
orderId: string,
|
|
14
14
|
customerId: string,
|
|
15
15
|
productIds: array<string>,
|
|
16
|
-
|
|
16
|
+
// No annotation: the field name is the declaration. `@lifecycle` exists for
|
|
17
|
+
// records whose lifecycle field is honestly called something else.
|
|
18
|
+
lifecycle: lifecycle,
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
@schema
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import * as S from "sury/src/S.res.mjs";
|
|
4
4
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
5
5
|
import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
|
|
6
|
-
import * as StateAnnotations$Reventless from "@reventlessdev/reventless-spec/src/components/StateAnnotations.res.mjs";
|
|
7
6
|
|
|
8
|
-
let
|
|
7
|
+
let lifecycleSchema = S.union([
|
|
9
8
|
S.literal("Placed"),
|
|
10
9
|
S.literal("Shipped"),
|
|
11
10
|
S.literal("Cancelled")
|
|
@@ -15,7 +14,7 @@ let stateSchema = S.schema(s => ({
|
|
|
15
14
|
orderId: s.m(S.string),
|
|
16
15
|
customerId: s.m(S.string),
|
|
17
16
|
productIds: s.m(S.array(S.string)),
|
|
18
|
-
|
|
17
|
+
lifecycle: s.m(lifecycleSchema)
|
|
19
18
|
}));
|
|
20
19
|
|
|
21
20
|
let consumedEventSchema = S.union([
|
|
@@ -37,27 +36,6 @@ let consumedEventSchema = S.union([
|
|
|
37
36
|
|
|
38
37
|
let config = ReadModel$Reventless.config(undefined, undefined, undefined);
|
|
39
38
|
|
|
40
|
-
let stateSchema$1 = S.Metadata.set(stateSchema, StateAnnotations$Reventless.stateAnnotationsId, {
|
|
41
|
-
ids: [],
|
|
42
|
-
compositeIds: [],
|
|
43
|
-
subIds: [],
|
|
44
|
-
compositeSubIds: [],
|
|
45
|
-
indexes: [],
|
|
46
|
-
hidden: [],
|
|
47
|
-
summary: [],
|
|
48
|
-
drillTargets: [],
|
|
49
|
-
drillTargetKeys: [],
|
|
50
|
-
collapsed: [],
|
|
51
|
-
scan: [],
|
|
52
|
-
scanSort: [],
|
|
53
|
-
semantic: [],
|
|
54
|
-
metric: [],
|
|
55
|
-
status: "status",
|
|
56
|
-
groupBy: undefined,
|
|
57
|
-
visibility: undefined,
|
|
58
|
-
live: undefined
|
|
59
|
-
});
|
|
60
|
-
|
|
61
39
|
let name = "Orders";
|
|
62
40
|
|
|
63
41
|
let Id;
|
|
@@ -73,13 +51,13 @@ let visibility = "Public";
|
|
|
73
51
|
export {
|
|
74
52
|
name,
|
|
75
53
|
Id,
|
|
76
|
-
|
|
54
|
+
lifecycleSchema,
|
|
55
|
+
stateSchema,
|
|
77
56
|
consumedEventSchema,
|
|
78
57
|
config,
|
|
79
58
|
subIdConfig,
|
|
80
|
-
stateSchema$1 as stateSchema,
|
|
81
59
|
moduleUrl,
|
|
82
60
|
authorization,
|
|
83
61
|
visibility,
|
|
84
62
|
}
|
|
85
|
-
/*
|
|
63
|
+
/* lifecycleSchema Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
let project = ({event}) =>
|
|
4
4
|
switch event {
|
|
5
5
|
| OrderPlaced({orderId, customerId, productIds}) => [
|
|
6
|
-
Set(orderId, {orderId, customerId, productIds,
|
|
6
|
+
Set(orderId, {orderId, customerId, productIds, lifecycle: Placed}),
|
|
7
7
|
]
|
|
8
|
-
| OrderShipped({orderId}) => [Update(orderId, state => {...state,
|
|
9
|
-
| OrderCancelled({orderId}) => [Update(orderId, state => {...state,
|
|
8
|
+
| OrderShipped({orderId}) => [Update(orderId, state => {...state, lifecycle: Shipped})]
|
|
9
|
+
| OrderCancelled({orderId}) => [Update(orderId, state => {...state, lifecycle: Cancelled})]
|
|
10
10
|
}
|
|
@@ -13,7 +13,7 @@ function project(param) {
|
|
|
13
13
|
orderId: orderId,
|
|
14
14
|
customerId: event.customerId,
|
|
15
15
|
productIds: event.productIds,
|
|
16
|
-
|
|
16
|
+
lifecycle: "Placed"
|
|
17
17
|
}
|
|
18
18
|
}];
|
|
19
19
|
case "OrderShipped" :
|
|
@@ -24,7 +24,7 @@ function project(param) {
|
|
|
24
24
|
orderId: state.orderId,
|
|
25
25
|
customerId: state.customerId,
|
|
26
26
|
productIds: state.productIds,
|
|
27
|
-
|
|
27
|
+
lifecycle: "Shipped"
|
|
28
28
|
})
|
|
29
29
|
}];
|
|
30
30
|
case "OrderCancelled" :
|
|
@@ -35,7 +35,7 @@ function project(param) {
|
|
|
35
35
|
orderId: state.orderId,
|
|
36
36
|
customerId: state.customerId,
|
|
37
37
|
productIds: state.productIds,
|
|
38
|
-
|
|
38
|
+
lifecycle: "Cancelled"
|
|
39
39
|
})
|
|
40
40
|
}];
|
|
41
41
|
}
|
|
Binary file
|
|
Binary file
|
package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmi
CHANGED
|
Binary file
|
package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmt
CHANGED
|
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
|
package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmi
CHANGED
|
Binary file
|
package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmt
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -8,7 +8,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
8
8
|
)
|
|
9
9
|
->thenStateWithId(
|
|
10
10
|
"o1",
|
|
11
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1", "p2"],
|
|
11
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1", "p2"], lifecycle: Placed},
|
|
12
12
|
)
|
|
13
13
|
)
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
19
19
|
->whenEvent(OrderShipped({orderId: "o1"}))
|
|
20
20
|
->thenStateWithId(
|
|
21
21
|
"o1",
|
|
22
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1"],
|
|
22
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1"], lifecycle: Shipped},
|
|
23
23
|
)
|
|
24
24
|
)
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
30
30
|
->whenEvent(OrderCancelled({orderId: "o1"}))
|
|
31
31
|
->thenStateWithId(
|
|
32
32
|
"o1",
|
|
33
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1"],
|
|
33
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1"], lifecycle: Cancelled},
|
|
34
34
|
)
|
|
35
35
|
)
|
|
36
36
|
})
|
|
@@ -39,7 +39,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
39
39
|
"p1",
|
|
40
40
|
"p2"
|
|
41
41
|
],
|
|
42
|
-
|
|
42
|
+
lifecycle: "Placed"
|
|
43
43
|
}));
|
|
44
44
|
test("OrderShipped updates status to Shipped", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
45
45
|
TAG: "OrderPlaced",
|
|
@@ -53,7 +53,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
53
53
|
orderId: "o1",
|
|
54
54
|
customerId: "c1",
|
|
55
55
|
productIds: ["p1"],
|
|
56
|
-
|
|
56
|
+
lifecycle: "Shipped"
|
|
57
57
|
}));
|
|
58
58
|
test("OrderCancelled updates status to Cancelled", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
59
59
|
TAG: "OrderPlaced",
|
|
@@ -67,7 +67,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
67
67
|
orderId: "o1",
|
|
68
68
|
customerId: "c1",
|
|
69
69
|
productIds: ["p1"],
|
|
70
|
-
|
|
70
|
+
lifecycle: "Cancelled"
|
|
71
71
|
}));
|
|
72
72
|
});
|
|
73
73
|
|
package/lib/ocaml/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1786876612829)
|
|
2
|
+
#Done(1786876617931)
|
|
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
|
package/lib/ocaml/Orders.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Orders.res
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@@reventless.spec
|
|
4
4
|
|
|
5
5
|
@schema
|
|
6
|
-
type
|
|
6
|
+
type lifecycle =
|
|
7
7
|
| Placed
|
|
8
8
|
| Shipped
|
|
9
9
|
| Cancelled
|
|
@@ -13,7 +13,9 @@ type state = {
|
|
|
13
13
|
orderId: string,
|
|
14
14
|
customerId: string,
|
|
15
15
|
productIds: array<string>,
|
|
16
|
-
|
|
16
|
+
// No annotation: the field name is the declaration. `@lifecycle` exists for
|
|
17
|
+
// records whose lifecycle field is honestly called something else.
|
|
18
|
+
lifecycle: lifecycle,
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
@schema
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/Orders_GWT.ast
CHANGED
|
Binary file
|
package/lib/ocaml/Orders_GWT.res
CHANGED
|
@@ -8,7 +8,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
8
8
|
)
|
|
9
9
|
->thenStateWithId(
|
|
10
10
|
"o1",
|
|
11
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1", "p2"],
|
|
11
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1", "p2"], lifecycle: Placed},
|
|
12
12
|
)
|
|
13
13
|
)
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
19
19
|
->whenEvent(OrderShipped({orderId: "o1"}))
|
|
20
20
|
->thenStateWithId(
|
|
21
21
|
"o1",
|
|
22
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1"],
|
|
22
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1"], lifecycle: Shipped},
|
|
23
23
|
)
|
|
24
24
|
)
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
30
30
|
->whenEvent(OrderCancelled({orderId: "o1"}))
|
|
31
31
|
->thenStateWithId(
|
|
32
32
|
"o1",
|
|
33
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1"],
|
|
33
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1"], lifecycle: Cancelled},
|
|
34
34
|
)
|
|
35
35
|
)
|
|
36
36
|
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
let project = ({event}) =>
|
|
4
4
|
switch event {
|
|
5
5
|
| OrderPlaced({orderId, customerId, productIds}) => [
|
|
6
|
-
Set(orderId, {orderId, customerId, productIds,
|
|
6
|
+
Set(orderId, {orderId, customerId, productIds, lifecycle: Placed}),
|
|
7
7
|
]
|
|
8
|
-
| OrderShipped({orderId}) => [Update(orderId, state => {...state,
|
|
9
|
-
| OrderCancelled({orderId}) => [Update(orderId, state => {...state,
|
|
8
|
+
| OrderShipped({orderId}) => [Update(orderId, state => {...state, lifecycle: Shipped})]
|
|
9
|
+
| OrderCancelled({orderId}) => [Update(orderId, state => {...state, lifecycle: Cancelled})]
|
|
10
10
|
}
|
|
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
|
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.215",
|
|
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,18 +21,18 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"sury": "^11.0.0-alpha.4",
|
|
24
|
-
"@reventlessdev/online-shop-dcb-
|
|
25
|
-
"@reventlessdev/online-shop-dcb-ordering-spec": "1.0.0-alpha.114",
|
|
24
|
+
"@reventlessdev/online-shop-dcb-ordering-spec": "1.0.0-alpha.115",
|
|
26
25
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
|
|
27
|
-
"@reventlessdev/reventless-gwt": "1.0.0-alpha.
|
|
28
|
-
"@reventlessdev/reventless-infra": "3.0.0-alpha.
|
|
29
|
-
"@reventlessdev/
|
|
30
|
-
"@reventlessdev/reventless-
|
|
26
|
+
"@reventlessdev/reventless-gwt": "1.0.0-alpha.184",
|
|
27
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.143",
|
|
28
|
+
"@reventlessdev/online-shop-dcb-catalog-spec": "1.0.0-alpha.115",
|
|
29
|
+
"@reventlessdev/reventless-local": "3.0.0-alpha.225",
|
|
30
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.115"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"rescript": "12.3.0",
|
|
34
34
|
"sury-ppx": "11.0.0-alpha.2",
|
|
35
|
-
"@reventlessdev/reventless-ppx": "1.0.0-alpha.
|
|
35
|
+
"@reventlessdev/reventless-ppx": "1.0.0-alpha.67"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"rescript": "12.3.0"
|
|
@@ -42,10 +42,11 @@ let stateSchema$1 = S.Metadata.set(stateSchema, StateAnnotations$Reventless.stat
|
|
|
42
42
|
scanSort: [],
|
|
43
43
|
semantic: [],
|
|
44
44
|
metric: [],
|
|
45
|
-
|
|
45
|
+
lifecycle: undefined,
|
|
46
46
|
groupBy: undefined,
|
|
47
47
|
visibility: "Internal",
|
|
48
|
-
live: undefined
|
|
48
|
+
live: undefined,
|
|
49
|
+
retired: undefined
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
let name = "AvailableProducts";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@@reventless.spec
|
|
4
4
|
|
|
5
5
|
@schema
|
|
6
|
-
type
|
|
6
|
+
type lifecycle =
|
|
7
7
|
| Placed
|
|
8
8
|
| Shipped
|
|
9
9
|
| Cancelled
|
|
@@ -13,7 +13,9 @@ type state = {
|
|
|
13
13
|
orderId: string,
|
|
14
14
|
customerId: string,
|
|
15
15
|
productIds: array<string>,
|
|
16
|
-
|
|
16
|
+
// No annotation: the field name is the declaration. `@lifecycle` exists for
|
|
17
|
+
// records whose lifecycle field is honestly called something else.
|
|
18
|
+
lifecycle: lifecycle,
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
@schema
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import * as S from "sury/src/S.res.mjs";
|
|
4
4
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
5
5
|
import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
|
|
6
|
-
import * as StateAnnotations$Reventless from "@reventlessdev/reventless-spec/src/components/StateAnnotations.res.mjs";
|
|
7
6
|
|
|
8
|
-
let
|
|
7
|
+
let lifecycleSchema = S.union([
|
|
9
8
|
S.literal("Placed"),
|
|
10
9
|
S.literal("Shipped"),
|
|
11
10
|
S.literal("Cancelled")
|
|
@@ -15,7 +14,7 @@ let stateSchema = S.schema(s => ({
|
|
|
15
14
|
orderId: s.m(S.string),
|
|
16
15
|
customerId: s.m(S.string),
|
|
17
16
|
productIds: s.m(S.array(S.string)),
|
|
18
|
-
|
|
17
|
+
lifecycle: s.m(lifecycleSchema)
|
|
19
18
|
}));
|
|
20
19
|
|
|
21
20
|
let consumedEventSchema = S.union([
|
|
@@ -37,27 +36,6 @@ let consumedEventSchema = S.union([
|
|
|
37
36
|
|
|
38
37
|
let config = ReadModel$Reventless.config(undefined, undefined, undefined);
|
|
39
38
|
|
|
40
|
-
let stateSchema$1 = S.Metadata.set(stateSchema, StateAnnotations$Reventless.stateAnnotationsId, {
|
|
41
|
-
ids: [],
|
|
42
|
-
compositeIds: [],
|
|
43
|
-
subIds: [],
|
|
44
|
-
compositeSubIds: [],
|
|
45
|
-
indexes: [],
|
|
46
|
-
hidden: [],
|
|
47
|
-
summary: [],
|
|
48
|
-
drillTargets: [],
|
|
49
|
-
drillTargetKeys: [],
|
|
50
|
-
collapsed: [],
|
|
51
|
-
scan: [],
|
|
52
|
-
scanSort: [],
|
|
53
|
-
semantic: [],
|
|
54
|
-
metric: [],
|
|
55
|
-
status: "status",
|
|
56
|
-
groupBy: undefined,
|
|
57
|
-
visibility: undefined,
|
|
58
|
-
live: undefined
|
|
59
|
-
});
|
|
60
|
-
|
|
61
39
|
let name = "Orders";
|
|
62
40
|
|
|
63
41
|
let Id;
|
|
@@ -73,13 +51,13 @@ let visibility = "Public";
|
|
|
73
51
|
export {
|
|
74
52
|
name,
|
|
75
53
|
Id,
|
|
76
|
-
|
|
54
|
+
lifecycleSchema,
|
|
55
|
+
stateSchema,
|
|
77
56
|
consumedEventSchema,
|
|
78
57
|
config,
|
|
79
58
|
subIdConfig,
|
|
80
|
-
stateSchema$1 as stateSchema,
|
|
81
59
|
moduleUrl,
|
|
82
60
|
authorization,
|
|
83
61
|
visibility,
|
|
84
62
|
}
|
|
85
|
-
/*
|
|
63
|
+
/* lifecycleSchema Not a pure module */
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
let project = ({event}) =>
|
|
4
4
|
switch event {
|
|
5
5
|
| OrderPlaced({orderId, customerId, productIds}) => [
|
|
6
|
-
Set(orderId, {orderId, customerId, productIds,
|
|
6
|
+
Set(orderId, {orderId, customerId, productIds, lifecycle: Placed}),
|
|
7
7
|
]
|
|
8
|
-
| OrderShipped({orderId}) => [Update(orderId, state => {...state,
|
|
9
|
-
| OrderCancelled({orderId}) => [Update(orderId, state => {...state,
|
|
8
|
+
| OrderShipped({orderId}) => [Update(orderId, state => {...state, lifecycle: Shipped})]
|
|
9
|
+
| OrderCancelled({orderId}) => [Update(orderId, state => {...state, lifecycle: Cancelled})]
|
|
10
10
|
}
|
|
@@ -13,7 +13,7 @@ function project(param) {
|
|
|
13
13
|
orderId: orderId,
|
|
14
14
|
customerId: event.customerId,
|
|
15
15
|
productIds: event.productIds,
|
|
16
|
-
|
|
16
|
+
lifecycle: "Placed"
|
|
17
17
|
}
|
|
18
18
|
}];
|
|
19
19
|
case "OrderShipped" :
|
|
@@ -24,7 +24,7 @@ function project(param) {
|
|
|
24
24
|
orderId: state.orderId,
|
|
25
25
|
customerId: state.customerId,
|
|
26
26
|
productIds: state.productIds,
|
|
27
|
-
|
|
27
|
+
lifecycle: "Shipped"
|
|
28
28
|
})
|
|
29
29
|
}];
|
|
30
30
|
case "OrderCancelled" :
|
|
@@ -35,7 +35,7 @@ function project(param) {
|
|
|
35
35
|
orderId: state.orderId,
|
|
36
36
|
customerId: state.customerId,
|
|
37
37
|
productIds: state.productIds,
|
|
38
|
-
|
|
38
|
+
lifecycle: "Cancelled"
|
|
39
39
|
})
|
|
40
40
|
}];
|
|
41
41
|
}
|
|
@@ -8,7 +8,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
8
8
|
)
|
|
9
9
|
->thenStateWithId(
|
|
10
10
|
"o1",
|
|
11
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1", "p2"],
|
|
11
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1", "p2"], lifecycle: Placed},
|
|
12
12
|
)
|
|
13
13
|
)
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
19
19
|
->whenEvent(OrderShipped({orderId: "o1"}))
|
|
20
20
|
->thenStateWithId(
|
|
21
21
|
"o1",
|
|
22
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1"],
|
|
22
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1"], lifecycle: Shipped},
|
|
23
23
|
)
|
|
24
24
|
)
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
30
30
|
->whenEvent(OrderCancelled({orderId: "o1"}))
|
|
31
31
|
->thenStateWithId(
|
|
32
32
|
"o1",
|
|
33
|
-
{orderId: "o1", customerId: "c1", productIds: ["p1"],
|
|
33
|
+
{orderId: "o1", customerId: "c1", productIds: ["p1"], lifecycle: Cancelled},
|
|
34
34
|
)
|
|
35
35
|
)
|
|
36
36
|
})
|
|
@@ -39,7 +39,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
39
39
|
"p1",
|
|
40
40
|
"p2"
|
|
41
41
|
],
|
|
42
|
-
|
|
42
|
+
lifecycle: "Placed"
|
|
43
43
|
}));
|
|
44
44
|
test("OrderShipped updates status to Shipped", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
45
45
|
TAG: "OrderPlaced",
|
|
@@ -53,7 +53,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
53
53
|
orderId: "o1",
|
|
54
54
|
customerId: "c1",
|
|
55
55
|
productIds: ["p1"],
|
|
56
|
-
|
|
56
|
+
lifecycle: "Shipped"
|
|
57
57
|
}));
|
|
58
58
|
test("OrderCancelled updates status to Cancelled", undefined, () => thenStateWithId(whenEvent(givenEvents([{
|
|
59
59
|
TAG: "OrderPlaced",
|
|
@@ -67,7 +67,7 @@ describe("Orders StateViewSlice", () => {
|
|
|
67
67
|
orderId: "o1",
|
|
68
68
|
customerId: "c1",
|
|
69
69
|
productIds: ["p1"],
|
|
70
|
-
|
|
70
|
+
lifecycle: "Cancelled"
|
|
71
71
|
}));
|
|
72
72
|
});
|
|
73
73
|
|