@reventlessdev/online-shop-hybrid-ordering 1.0.0-alpha.273 → 1.0.0-alpha.274

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 CHANGED
@@ -3,6 +3,18 @@
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.274 (2026-10-15)
7
+
8
+ * feat!: an automation's process takes ~now, and collect the event's recorded time ([8c8f3f5](https://github.com/ReventlessDev/reventless-core/commit/8c8f3f570474b1658b605b726077debc7d6a1dc7))
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * a process the PPX does not see — in an Automation module
13
+ written by hand, or a SliceSpec given to the deprecated Automation_GWT.Make
14
+ or Flow_GWT.AutomationStep — must take ~now.
15
+
16
+
17
+
6
18
  # 1.0.0-alpha.273 (2026-10-14)
7
19
 
8
20
  **Note:** Version bump only for package @reventlessdev/online-shop-hybrid-ordering
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/online-shop-hybrid-ordering",
3
- "version": "1.0.0-alpha.273",
3
+ "version": "1.0.0-alpha.274",
4
4
  "description": "Online Shop Hybrid example — Ordering plugin (Customer aggregate + Order/CatalogProduct DCB)",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -21,15 +21,15 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "sury": "11.0.0",
24
- "@reventlessdev/online-shop-hybrid-catalog-spec": "1.0.0-alpha.160",
24
+ "@reventlessdev/online-shop-hybrid-catalog-spec": "1.0.0-alpha.161",
25
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.192",
25
26
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.23",
26
- "@reventlessdev/reventless-infra": "3.0.0-alpha.191",
27
- "@reventlessdev/online-shop-hybrid-ordering-spec": "1.0.0-alpha.159",
28
- "@reventlessdev/reventless-gwt": "1.0.0-alpha.242",
29
- "@reventlessdev/reventless-local": "3.0.0-alpha.285",
30
- "@reventlessdev/trait-address-geocoding": "1.0.0-alpha.44",
31
- "@reventlessdev/reventless-spec": "3.0.0-alpha.163",
32
- "@reventlessdev/trait-notification": "1.0.0-alpha.44"
27
+ "@reventlessdev/reventless-gwt": "1.0.0-alpha.243",
28
+ "@reventlessdev/online-shop-hybrid-ordering-spec": "1.0.0-alpha.160",
29
+ "@reventlessdev/reventless-local": "3.0.0-alpha.286",
30
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.164",
31
+ "@reventlessdev/trait-address-geocoding": "1.0.0-alpha.45",
32
+ "@reventlessdev/trait-notification": "1.0.0-alpha.45"
33
33
  },
34
34
  "devDependencies": {
35
35
  "rescript": "12.3.1",
@@ -151,7 +151,7 @@ let FromOrderingDcb = AutomationSlice$Reventless.Mapping.Make({
151
151
 
152
152
  let mappings = [FromOrderingDcb];
153
153
 
154
- function process(id, item) {
154
+ function process(id, item, param) {
155
155
  let rule = Stdlib_Option.filter(Notification_Rule$TraitNotification.byId(defaultRules, item.ruleId), Notification_Rule$TraitNotification.isImmediate);
156
156
  if (rule === undefined) {
157
157
  return;
@@ -90,7 +90,7 @@ let FromOrderingDcb = AutomationSlice$Reventless.Mapping.Make({
90
90
 
91
91
  let mappings = [FromOrderingDcb];
92
92
 
93
- function process(id, item) {
93
+ function process(id, item, param) {
94
94
  return [
95
95
  id,
96
96
  {
@@ -118,7 +118,7 @@ describe("NotificationIntake AutomationSlice", () => {
118
118
  TAG: "OrderPlaced",
119
119
  orderId: Ordering_Examples$OrderingPlugin.o1,
120
120
  customerId: Ordering_Examples$OrderingPlugin.c1
121
- }), undefined, undefined), [[
121
+ }), undefined, undefined, undefined), [[
122
122
  "confirm:o1",
123
123
  {
124
124
  ruleId: "confirm",
@@ -130,7 +130,7 @@ describe("NotificationIntake AutomationSlice", () => {
130
130
  TAG: "OrderShipped",
131
131
  orderId: Ordering_Examples$OrderingPlugin.o1,
132
132
  customerId: Ordering_Examples$OrderingPlugin.c1
133
- }), undefined, undefined), [[
133
+ }), undefined, undefined, undefined), [[
134
134
  "ship:o1",
135
135
  {
136
136
  ruleId: "ship",
@@ -141,7 +141,7 @@ describe("NotificationIntake AutomationSlice", () => {
141
141
  test("collect: an outcome is not an occurrence", () => thenTodos(whenCollect(givenEvent({
142
142
  TAG: "NotificationRequested",
143
143
  reference: "confirm:o1"
144
- }), undefined, undefined), []));
144
+ }), undefined, undefined, undefined), []));
145
145
  test("resolve: a deferred request closes its row like any other outcome", () => thenResolved(whenResolve(givenEvent({
146
146
  TAG: "NotificationDeferred",
147
147
  reference: "confirm:o1"
@@ -150,7 +150,7 @@ describe("NotificationIntake AutomationSlice", () => {
150
150
  ruleId: "confirm",
151
151
  recipientId: Ordering_Examples$OrderingPlugin.customerRef,
152
152
  orderId: Ordering_Examples$OrderingPlugin.o1
153
- })), "c1", {
153
+ }), undefined), "c1", {
154
154
  TAG: "RequestNotification",
155
155
  recipientId: Ordering_Examples$OrderingPlugin.customerRef,
156
156
  category: "OrderConfirmation",
@@ -166,7 +166,7 @@ describe("NotificationIntake AutomationSlice", () => {
166
166
  ruleId: "ship",
167
167
  recipientId: Ordering_Examples$OrderingPlugin.customerRef,
168
168
  orderId: Ordering_Examples$OrderingPlugin.o1
169
- })), "c1", {
169
+ }), undefined), "c1", {
170
170
  TAG: "RequestNotification",
171
171
  recipientId: Ordering_Examples$OrderingPlugin.customerRef,
172
172
  category: "ShippingUpdate",
@@ -182,13 +182,15 @@ describe("NotificationIntake AutomationSlice", () => {
182
182
  ruleId: "gone",
183
183
  recipientId: Ordering_Examples$OrderingPlugin.customerRef,
184
184
  orderId: Ordering_Examples$OrderingPlugin.o1
185
- }))));
185
+ }), undefined)));
186
186
  });
187
187
 
188
188
  let Route = include.Route;
189
189
 
190
190
  let testContext = include.testContext;
191
191
 
192
+ let withRecordedAt = include.withRecordedAt;
193
+
192
194
  let encTodos = include.encTodos;
193
195
 
194
196
  let encPair = include.encPair;
@@ -197,6 +199,10 @@ let whenExhausted = include.whenExhausted;
197
199
 
198
200
  let givenEvents = include.givenEvents;
199
201
 
202
+ let atTime = include.atTime;
203
+
204
+ let latestRecorded = include.latestRecorded;
205
+
200
206
  let routeAll = include.routeAll;
201
207
 
202
208
  let sweep = include.sweep;
@@ -218,6 +224,7 @@ export {
218
224
  describe,
219
225
  test,
220
226
  testContext,
227
+ withRecordedAt,
221
228
  encTodos,
222
229
  encPair,
223
230
  thenTodos,
@@ -229,6 +236,8 @@ export {
229
236
  thenCommand,
230
237
  thenNoCommand,
231
238
  givenEvents,
239
+ atTime,
240
+ latestRecorded,
232
241
  routeAll,
233
242
  sweep,
234
243
  whenSweep,
@@ -61,7 +61,7 @@ describe("AutoShipOrder AutomationSlice", () => {
61
61
  TAG: "OrderPlaced",
62
62
  orderId: Ordering_Examples$OrderingPlugin.o1,
63
63
  shippingMethod: "Express"
64
- }), undefined, undefined), [[
64
+ }), undefined, undefined, undefined), [[
65
65
  "o1",
66
66
  {
67
67
  orderId: Ordering_Examples$OrderingPlugin.o1
@@ -71,16 +71,16 @@ describe("AutoShipOrder AutomationSlice", () => {
71
71
  TAG: "OrderPlaced",
72
72
  orderId: Ordering_Examples$OrderingPlugin.o1,
73
73
  shippingMethod: "Standard"
74
- }), undefined, undefined), []));
74
+ }), undefined, undefined, undefined), []));
75
75
  test("collect: a Pickup OrderPlaced is never shipped (no TODO)", () => thenTodos(whenCollect(givenEvent({
76
76
  TAG: "OrderPlaced",
77
77
  orderId: Ordering_Examples$OrderingPlugin.o1,
78
78
  shippingMethod: "Pickup"
79
- }), undefined, undefined), []));
79
+ }), undefined, undefined, undefined), []));
80
80
  test("collect: OrderShipped is ignored (no TODO)", () => thenTodos(whenCollect(givenEvent({
81
81
  TAG: "OrderShipped",
82
82
  orderId: Ordering_Examples$OrderingPlugin.o1
83
- }), undefined, undefined), []));
83
+ }), undefined, undefined, undefined), []));
84
84
  test("resolve: OrderShipped marks the TODO done", () => thenResolved(whenResolve(givenEvent({
85
85
  TAG: "OrderShipped",
86
86
  orderId: Ordering_Examples$OrderingPlugin.o1
@@ -92,7 +92,7 @@ describe("AutoShipOrder AutomationSlice", () => {
92
92
  })), undefined));
93
93
  test("process: pending TODO emits ShipOrder for the same id", () => thenCommand(whenProcess(givenTodo("o1", {
94
94
  orderId: Ordering_Examples$OrderingPlugin.o1
95
- })), "o1", {
95
+ }), undefined), "o1", {
96
96
  TAG: "ShipOrder",
97
97
  orderId: Ordering_Examples$OrderingPlugin.o1
98
98
  }));
@@ -104,17 +104,17 @@ describe("AutoShipOrder AutomationSlice", () => {
104
104
  TAG: "OrderPlaced",
105
105
  orderId: Ordering_Examples$OrderingPlugin.o1,
106
106
  shippingMethod: "Express"
107
- }, undefined),
107
+ }, undefined, undefined),
108
108
  event({
109
109
  TAG: "OrderPlaced",
110
110
  orderId: Ordering_Examples$OrderingPlugin.o2,
111
111
  shippingMethod: "Express"
112
- }, undefined),
112
+ }, undefined, undefined),
113
113
  event({
114
114
  TAG: "OrderShipped",
115
115
  orderId: Ordering_Examples$OrderingPlugin.o2
116
- }, undefined)
117
- ]), undefined), [[
116
+ }, undefined, undefined)
117
+ ]), undefined, undefined), [[
118
118
  "o1",
119
119
  {
120
120
  TAG: "ShipOrder",
@@ -127,10 +127,16 @@ let Route = include.Route;
127
127
 
128
128
  let testContext = include.testContext;
129
129
 
130
+ let withRecordedAt = include.withRecordedAt;
131
+
130
132
  let encTodos = include.encTodos;
131
133
 
132
134
  let encPair = include.encPair;
133
135
 
136
+ let atTime = include.atTime;
137
+
138
+ let latestRecorded = include.latestRecorded;
139
+
134
140
  let routeAll = include.routeAll;
135
141
 
136
142
  let sweep = include.sweep;
@@ -144,6 +150,7 @@ export {
144
150
  describe,
145
151
  test,
146
152
  testContext,
153
+ withRecordedAt,
147
154
  encTodos,
148
155
  encPair,
149
156
  thenTodos,
@@ -155,6 +162,8 @@ export {
155
162
  thenCommand,
156
163
  thenNoCommand,
157
164
  givenEvents,
165
+ atTime,
166
+ latestRecorded,
158
167
  routeAll,
159
168
  sweep,
160
169
  whenSweep,