@reventlessdev/online-shop-aggregates-ordering 3.0.0-alpha.301 → 3.0.0-alpha.303

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.
Files changed (124) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/bs/.compiler.log +2 -2
  3. package/lib/bs/compiler-info.json +1 -1
  4. package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections-OrderingPlugin.cmi +0 -0
  5. package/lib/bs/src/CatalogProduct/ReadModel/AvailableProducts_Projections-OrderingPlugin.cmt +0 -0
  6. package/lib/bs/src/Customer/Aggregate/Customer-OrderingPlugin.cmi +0 -0
  7. package/lib/bs/src/Customer/Aggregate/Customer-OrderingPlugin.cmt +0 -0
  8. package/lib/bs/src/Customer/Aggregate/Customer.ast +0 -0
  9. package/lib/bs/src/Customer/Aggregate/Customer.res +6 -6
  10. package/lib/bs/src/Customer/Aggregate/Customer.res.mjs +9 -8
  11. package/lib/bs/src/Customer/Aggregate/Customer_Decision-OrderingPlugin.cmi +0 -0
  12. package/lib/bs/src/Customer/Aggregate/Customer_Decision-OrderingPlugin.cmt +0 -0
  13. package/lib/bs/src/Customer/Aggregate/Customer_Decision.ast +0 -0
  14. package/lib/bs/src/Customer/Aggregate/Customer_Decision.res +11 -7
  15. package/lib/bs/src/Customer/Aggregate/Customer_Decision.res.mjs +46 -33
  16. package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmi +0 -0
  17. package/lib/bs/src/Customer/ReadModel/Customers_Projections-OrderingPlugin.cmt +0 -0
  18. package/lib/bs/src/Customer/ReadModel/Customers_Projections.ast +0 -0
  19. package/lib/bs/src/Customer/ReadModel/Customers_Projections.res +15 -3
  20. package/lib/bs/src/Customer/ReadModel/Customers_Projections.res.mjs +5 -4
  21. package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
  22. package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
  23. package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
  24. package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
  25. package/lib/bs/src/LifecycleModel-OrderingPlugin.cmi +0 -0
  26. package/lib/bs/src/LifecycleModel-OrderingPlugin.cmt +0 -0
  27. package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmi +0 -0
  28. package/lib/bs/src/Order/ReadModel/Orders_Projections-OrderingPlugin.cmt +0 -0
  29. package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
  30. package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
  31. package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmi +0 -0
  32. package/lib/bs/src/Task/OrderNotifications-OrderingPlugin.cmt +0 -0
  33. package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
  34. package/lib/bs/tests/CatalogProduct/Aggregate/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
  35. package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
  36. package/lib/bs/tests/CatalogProduct/ReadModel/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
  37. package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmi +0 -0
  38. package/lib/bs/tests/Customer/Aggregate/Customer_GWT-OrderingPlugin.cmt +0 -0
  39. package/lib/bs/tests/Customer/Aggregate/Customer_GWT.ast +0 -0
  40. package/lib/bs/tests/Customer/Aggregate/Customer_GWT.res +12 -12
  41. package/lib/bs/tests/Customer/Aggregate/Customer_GWT.res.mjs +88 -22
  42. package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmi +0 -0
  43. package/lib/bs/tests/Customer/ReadModel/Customers_GWT-OrderingPlugin.cmt +0 -0
  44. package/lib/bs/tests/Customer/ReadModel/Customers_GWT.ast +0 -0
  45. package/lib/bs/tests/Customer/ReadModel/Customers_GWT.res +14 -6
  46. package/lib/bs/tests/Customer/ReadModel/Customers_GWT.res.mjs +40 -10
  47. package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
  48. package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
  49. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
  50. package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
  51. package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT-OrderingPlugin.cmi +0 -0
  52. package/lib/bs/tests/Order/Aggregate/OrderMappings_GWT-OrderingPlugin.cmt +0 -0
  53. package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmi +0 -0
  54. package/lib/bs/tests/Order/Aggregate/Order_GWT-OrderingPlugin.cmt +0 -0
  55. package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmi +0 -0
  56. package/lib/bs/tests/Order/ReadModel/Orders_GWT-OrderingPlugin.cmt +0 -0
  57. package/lib/bs/tests/Order/SideEffect/EmailService_Mock-OrderingPlugin.cmi +0 -0
  58. package/lib/bs/tests/Order/SideEffect/EmailService_Mock-OrderingPlugin.cmt +0 -0
  59. package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmi +0 -0
  60. package/lib/bs/tests/Order/SideEffect/Order_EmailNotification_GWT-OrderingPlugin.cmt +0 -0
  61. package/lib/ocaml/.compiler.log +2 -2
  62. package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
  63. package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
  64. package/lib/ocaml/AvailableProducts_Projections-OrderingPlugin.cmi +0 -0
  65. package/lib/ocaml/AvailableProducts_Projections-OrderingPlugin.cmt +0 -0
  66. package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmi +0 -0
  67. package/lib/ocaml/CatalogProduct_GWT-OrderingPlugin.cmt +0 -0
  68. package/lib/ocaml/Customer-OrderingPlugin.cmi +0 -0
  69. package/lib/ocaml/Customer-OrderingPlugin.cmt +0 -0
  70. package/lib/ocaml/Customer.ast +0 -0
  71. package/lib/ocaml/Customer.res +6 -6
  72. package/lib/ocaml/Customer_Decision-OrderingPlugin.cmi +0 -0
  73. package/lib/ocaml/Customer_Decision-OrderingPlugin.cmt +0 -0
  74. package/lib/ocaml/Customer_Decision.ast +0 -0
  75. package/lib/ocaml/Customer_Decision.res +11 -7
  76. package/lib/ocaml/Customer_GWT-OrderingPlugin.cmi +0 -0
  77. package/lib/ocaml/Customer_GWT-OrderingPlugin.cmt +0 -0
  78. package/lib/ocaml/Customer_GWT.ast +0 -0
  79. package/lib/ocaml/Customer_GWT.res +12 -12
  80. package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
  81. package/lib/ocaml/Customers_GWT-OrderingPlugin.cmt +0 -0
  82. package/lib/ocaml/Customers_GWT.ast +0 -0
  83. package/lib/ocaml/Customers_GWT.res +14 -6
  84. package/lib/ocaml/Customers_Projections-OrderingPlugin.cmi +0 -0
  85. package/lib/ocaml/Customers_Projections-OrderingPlugin.cmt +0 -0
  86. package/lib/ocaml/Customers_Projections.ast +0 -0
  87. package/lib/ocaml/Customers_Projections.res +15 -3
  88. package/lib/ocaml/EmailService_Mock-OrderingPlugin.cmi +0 -0
  89. package/lib/ocaml/EmailService_Mock-OrderingPlugin.cmt +0 -0
  90. package/lib/ocaml/LifecycleModel-OrderingPlugin.cmi +0 -0
  91. package/lib/ocaml/LifecycleModel-OrderingPlugin.cmt +0 -0
  92. package/lib/ocaml/OrderMappings_GWT-OrderingPlugin.cmi +0 -0
  93. package/lib/ocaml/OrderMappings_GWT-OrderingPlugin.cmt +0 -0
  94. package/lib/ocaml/OrderNotifications-OrderingPlugin.cmi +0 -0
  95. package/lib/ocaml/OrderNotifications-OrderingPlugin.cmt +0 -0
  96. package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmi +0 -0
  97. package/lib/ocaml/Order_EmailNotification_GWT-OrderingPlugin.cmt +0 -0
  98. package/lib/ocaml/Order_GWT-OrderingPlugin.cmi +0 -0
  99. package/lib/ocaml/Order_GWT-OrderingPlugin.cmt +0 -0
  100. package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
  101. package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
  102. package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
  103. package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
  104. package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
  105. package/lib/ocaml/Orders_GWT-OrderingPlugin.cmt +0 -0
  106. package/lib/ocaml/Orders_Projections-OrderingPlugin.cmi +0 -0
  107. package/lib/ocaml/Orders_Projections-OrderingPlugin.cmt +0 -0
  108. package/lib/ocaml/Plugin-OrderingPlugin.cmi +0 -0
  109. package/lib/ocaml/Plugin-OrderingPlugin.cmt +0 -0
  110. package/lib/ocaml/Products_Extension-OrderingPlugin.cmi +0 -0
  111. package/lib/ocaml/Products_Extension-OrderingPlugin.cmt +0 -0
  112. package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
  113. package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
  114. package/package.json +7 -7
  115. package/src/Customer/Aggregate/Customer.res +6 -6
  116. package/src/Customer/Aggregate/Customer.res.mjs +9 -8
  117. package/src/Customer/Aggregate/Customer_Decision.res +11 -7
  118. package/src/Customer/Aggregate/Customer_Decision.res.mjs +46 -33
  119. package/src/Customer/ReadModel/Customers_Projections.res +15 -3
  120. package/src/Customer/ReadModel/Customers_Projections.res.mjs +5 -4
  121. package/tests/Customer/Aggregate/Customer_GWT.res +12 -12
  122. package/tests/Customer/Aggregate/Customer_GWT.res.mjs +88 -22
  123. package/tests/Customer/ReadModel/Customers_GWT.res +14 -6
  124. package/tests/Customer/ReadModel/Customers_GWT.res.mjs +40 -10
@@ -4,27 +4,35 @@ describe("Customers ReadModel ← Customer", () => {
4
4
  // scenario-id: d64df451-1238-400b-b146-4bd84dfb232b
5
5
  test("Registered sets initial read model state", () =>
6
6
  givenEvents([])
7
- ->whenEvent(Customer.Registered({email: "alice@example.com", address: "123 Main St"}))
7
+ ->whenEvent(
8
+ Customer.Registered({email: Value("alice@example.com"), address: Value("123 Main St")}),
9
+ )
8
10
  ->thenState({Customers.email: "alice@example.com", address: "123 Main St", deactivated: false})
9
11
  )
10
12
 
11
13
  // scenario-id: 80d62196-a14f-4da6-9993-384996b0be93
12
14
  test("EmailUpdated updates the email", () =>
13
- givenEvents([Customer.Registered({email: "alice@example.com", address: "123 Main St"})])
14
- ->whenEvent(Customer.EmailUpdated({email: "alice2@example.com"}))
15
+ givenEvents([
16
+ Customer.Registered({email: Value("alice@example.com"), address: Value("123 Main St")}),
17
+ ])
18
+ ->whenEvent(Customer.EmailUpdated({email: Value("alice2@example.com")}))
15
19
  ->thenState({Customers.email: "alice2@example.com", address: "123 Main St", deactivated: false})
16
20
  )
17
21
 
18
22
  // scenario-id: 55ce1763-d498-440d-8c19-2dc8adfa69e2
19
23
  test("AddressUpdated updates the address", () =>
20
- givenEvents([Customer.Registered({email: "alice@example.com", address: "123 Main St"})])
21
- ->whenEvent(Customer.AddressUpdated({address: "789 Pine Rd"}))
24
+ givenEvents([
25
+ Customer.Registered({email: Value("alice@example.com"), address: Value("123 Main St")}),
26
+ ])
27
+ ->whenEvent(Customer.AddressUpdated({address: Value("789 Pine Rd")}))
22
28
  ->thenState({Customers.email: "alice@example.com", address: "789 Pine Rd", deactivated: false})
23
29
  )
24
30
 
25
31
  // scenario-id: 9885a011-7448-431f-ae96-629aae5f9823
26
32
  test("Deactivated sets deactivated flag", () =>
27
- givenEvents([Customer.Registered({email: "alice@example.com", address: "123 Main St"})])
33
+ givenEvents([
34
+ Customer.Registered({email: Value("alice@example.com"), address: Value("123 Main St")}),
35
+ ])
28
36
  ->whenEvent(Customer.Deactivated)
29
37
  ->thenState({Customers.email: "alice@example.com", address: "123 Main St", deactivated: true})
30
38
  )
@@ -18,8 +18,14 @@ let thenState = include.thenState;
18
18
  describe("Customers ReadModel ← Customer", () => {
19
19
  test("Registered sets initial read model state", undefined, () => thenState(whenEvent(givenEvents([]), {
20
20
  TAG: "Registered",
21
- email: "alice@example.com",
22
- address: "123 Main St"
21
+ email: {
22
+ TAG: "Value",
23
+ _0: "alice@example.com"
24
+ },
25
+ address: {
26
+ TAG: "Value",
27
+ _0: "123 Main St"
28
+ }
23
29
  }), {
24
30
  email: "alice@example.com",
25
31
  address: "123 Main St",
@@ -27,11 +33,20 @@ describe("Customers ReadModel ← Customer", () => {
27
33
  }));
28
34
  test("EmailUpdated updates the email", undefined, () => thenState(whenEvent(givenEvents([{
29
35
  TAG: "Registered",
30
- email: "alice@example.com",
31
- address: "123 Main St"
36
+ email: {
37
+ TAG: "Value",
38
+ _0: "alice@example.com"
39
+ },
40
+ address: {
41
+ TAG: "Value",
42
+ _0: "123 Main St"
43
+ }
32
44
  }]), {
33
45
  TAG: "EmailUpdated",
34
- email: "alice2@example.com"
46
+ email: {
47
+ TAG: "Value",
48
+ _0: "alice2@example.com"
49
+ }
35
50
  }), {
36
51
  email: "alice2@example.com",
37
52
  address: "123 Main St",
@@ -39,11 +54,20 @@ describe("Customers ReadModel ← Customer", () => {
39
54
  }));
40
55
  test("AddressUpdated updates the address", undefined, () => thenState(whenEvent(givenEvents([{
41
56
  TAG: "Registered",
42
- email: "alice@example.com",
43
- address: "123 Main St"
57
+ email: {
58
+ TAG: "Value",
59
+ _0: "alice@example.com"
60
+ },
61
+ address: {
62
+ TAG: "Value",
63
+ _0: "123 Main St"
64
+ }
44
65
  }]), {
45
66
  TAG: "AddressUpdated",
46
- address: "789 Pine Rd"
67
+ address: {
68
+ TAG: "Value",
69
+ _0: "789 Pine Rd"
70
+ }
47
71
  }), {
48
72
  email: "alice@example.com",
49
73
  address: "789 Pine Rd",
@@ -51,8 +75,14 @@ describe("Customers ReadModel ← Customer", () => {
51
75
  }));
52
76
  test("Deactivated sets deactivated flag", undefined, () => thenState(whenEvent(givenEvents([{
53
77
  TAG: "Registered",
54
- email: "alice@example.com",
55
- address: "123 Main St"
78
+ email: {
79
+ TAG: "Value",
80
+ _0: "alice@example.com"
81
+ },
82
+ address: {
83
+ TAG: "Value",
84
+ _0: "123 Main St"
85
+ }
56
86
  }]), "Deactivated"), {
57
87
  email: "alice@example.com",
58
88
  address: "123 Main St",