@reventlessdev/reventless-gwt 1.0.0-alpha.186 → 1.0.0-alpha.187

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 (49) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +7 -7
  3. package/src/Automation_GWT.res +0 -1
  4. package/src/Automation_GWT.res.mjs +1 -3
  5. package/src/Behavior_GWT.res +0 -2
  6. package/src/Behavior_GWT.res.mjs +1 -4
  7. package/src/Delegate_GWT.res +0 -1
  8. package/src/Delegate_GWT.res.mjs +1 -7
  9. package/src/Flow_GWT.res +0 -1
  10. package/src/Flow_GWT.res.mjs +1 -4
  11. package/src/InboundTranslation_GWT.res +0 -1
  12. package/src/InboundTranslation_GWT.res.mjs +1 -3
  13. package/src/Mapping_GWT.res +0 -1
  14. package/src/Mapping_GWT.res.mjs +1 -3
  15. package/src/MultiSourceProjection_GWT.res +0 -1
  16. package/src/MultiSourceProjection_GWT.res.mjs +1 -3
  17. package/src/OutboundTranslation_GWT.res +0 -1
  18. package/src/OutboundTranslation_GWT.res.mjs +1 -3
  19. package/src/Projection_GWT.res +0 -1
  20. package/src/Projection_GWT.res.mjs +1 -3
  21. package/src/Query_GWT.res +4 -6
  22. package/src/Query_GWT.res.mjs +10 -12
  23. package/src/SideEffect_GWT.res +0 -1
  24. package/src/SideEffect_GWT.res.mjs +1 -3
  25. package/src/StateChange/ExternalAddCategorySlice.res.mjs +9 -9
  26. package/src/StateChange/WithFixtures.res.mjs +7 -7
  27. package/src/StateChange/WithManualOpen.res.mjs +7 -7
  28. package/tests/AutomationGwtTest.res.mjs +13 -13
  29. package/tests/DelegateGwtTest.res +0 -1
  30. package/tests/DelegateGwtTest.res.mjs +77 -79
  31. package/tests/FlowAggregateGwtTest.res +0 -1
  32. package/tests/FlowAggregateGwtTest.res.mjs +22 -24
  33. package/tests/FlowCrossPluginGwtTest.res +0 -1
  34. package/tests/FlowCrossPluginGwtTest.res.mjs +58 -60
  35. package/tests/FlowGwtTest.res +0 -1
  36. package/tests/FlowGwtTest.res.mjs +40 -40
  37. package/tests/InboundTranslationGwtTest.res.mjs +8 -8
  38. package/tests/MappingGwtTest.res +0 -1
  39. package/tests/MappingGwtTest.res.mjs +30 -32
  40. package/tests/OutboundTranslationGwtTest.res.mjs +8 -8
  41. package/tests/QueryGwtTest.res +0 -1
  42. package/tests/QueryGwtTest.res.mjs +14 -16
  43. package/tests/QueryResolverGwtTest.res +0 -1
  44. package/tests/QueryResolverGwtTest.res.mjs +10 -12
  45. package/tests/SideEffect/FakeOrderNotification.res.mjs +5 -5
  46. package/tests/SideEffect/MockEmail.res +1 -1
  47. package/tests/SideEffect/MockEmail.res.mjs +6 -5
  48. package/tests/StateChangeSliceGwtTest.res.mjs +15 -15
  49. package/tests/StateViewSliceGwtTest.res.mjs +14 -14
@@ -8,7 +8,6 @@
8
8
  // filters the log by its command's tags.
9
9
  // See `docs/plans/done/gwt-flow-and-extension-test-kinds.md` Phase 2.
10
10
 
11
- S.enableJson()
12
11
 
13
12
  open Flow_GWT
14
13
 
@@ -1,28 +1,26 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
5
5
  import * as Flow_GWT$ReventlessGwt from "../src/Flow_GWT.res.mjs";
6
6
 
7
- S.enableJson();
8
-
9
- let consumedEventSchema = S.schema(s => ({
7
+ let consumedEventSchema = Sury.$schema(s => ({
10
8
  TAG: "OrderPlaced",
11
9
  orderId: s.m(DcbTag$Reventless.string)
12
10
  }));
13
11
 
14
- let commandSchema = S.schema(s => ({
12
+ let commandSchema = Sury.$schema(s => ({
15
13
  TAG: "PlaceOrder",
16
14
  orderId: s.m(DcbTag$Reventless.string),
17
- item: s.m(S.string)
15
+ item: s.m(Sury.string)
18
16
  }));
19
17
 
20
- let errorSchema = S.literal("AlreadyPlaced");
18
+ let errorSchema = Sury.literal("AlreadyPlaced");
21
19
 
22
- let eventSchema = S.schema(s => ({
20
+ let eventSchema = Sury.$schema(s => ({
23
21
  TAG: "OrderPlaced",
24
22
  orderId: s.m(DcbTag$Reventless.string),
25
- item: s.m(S.string)
23
+ item: s.m(Sury.string)
26
24
  }));
27
25
 
28
26
  function commandAuthorization(param) {
@@ -74,24 +72,24 @@ let PlaceOrderBehavior = {
74
72
  decide: decide
75
73
  };
76
74
 
77
- let consumedEventSchema$1 = S.union([
78
- S.schema(s => ({
75
+ let consumedEventSchema$1 = Sury.union([
76
+ Sury.$schema(s => ({
79
77
  TAG: "OrderPlaced",
80
- orderId: s.m(S.string)
78
+ orderId: s.m(Sury.string)
81
79
  })),
82
- S.schema(s => ({
80
+ Sury.$schema(s => ({
83
81
  TAG: "OrderShipped",
84
- orderId: s.m(S.string)
82
+ orderId: s.m(Sury.string)
85
83
  }))
86
84
  ]);
87
85
 
88
- let todoItemSchema = S.schema(s => ({
89
- orderId: s.m(S.string)
86
+ let todoItemSchema = Sury.$schema(s => ({
87
+ orderId: s.m(Sury.string)
90
88
  }));
91
89
 
92
- let commandSchema$1 = S.schema(s => ({
90
+ let commandSchema$1 = Sury.$schema(s => ({
93
91
  TAG: "ShipOrder",
94
- orderId: s.m(S.string)
92
+ orderId: s.m(Sury.string)
95
93
  }));
96
94
 
97
95
  function collect(event) {
@@ -140,25 +138,25 @@ let AutoShipSlice = {
140
138
  commandAuthorization: commandAuthorization$1
141
139
  };
142
140
 
143
- let consumedEventSchema$2 = S.union([
144
- S.schema(s => ({
141
+ let consumedEventSchema$2 = Sury.union([
142
+ Sury.$schema(s => ({
145
143
  TAG: "OrderPlaced",
146
144
  orderId: s.m(DcbTag$Reventless.string)
147
145
  })),
148
- S.schema(s => ({
146
+ Sury.$schema(s => ({
149
147
  TAG: "OrderShipped",
150
148
  orderId: s.m(DcbTag$Reventless.string)
151
149
  }))
152
150
  ]);
153
151
 
154
- let commandSchema$2 = S.schema(s => ({
152
+ let commandSchema$2 = Sury.$schema(s => ({
155
153
  TAG: "ShipOrder",
156
154
  orderId: s.m(DcbTag$Reventless.string)
157
155
  }));
158
156
 
159
- let errorSchema$1 = S.literal("NotPlaced");
157
+ let errorSchema$1 = Sury.literal("NotPlaced");
160
158
 
161
- let eventSchema$1 = S.schema(s => ({
159
+ let eventSchema$1 = Sury.$schema(s => ({
162
160
  TAG: "OrderShipped",
163
161
  orderId: s.m(DcbTag$Reventless.string)
164
162
  }));
@@ -227,21 +225,21 @@ let ShipOrderBehavior = {
227
225
  decide: decide$1
228
226
  };
229
227
 
230
- let stateSchema = S.schema(s => ({
231
- orderId: s.m(S.string),
232
- item: s.m(S.string),
233
- status: s.m(S.string)
228
+ let stateSchema = Sury.$schema(s => ({
229
+ orderId: s.m(Sury.string),
230
+ item: s.m(Sury.string),
231
+ status: s.m(Sury.string)
234
232
  }));
235
233
 
236
- let consumedEventSchema$3 = S.union([
237
- S.schema(s => ({
234
+ let consumedEventSchema$3 = Sury.union([
235
+ Sury.$schema(s => ({
238
236
  TAG: "OrderPlaced",
239
- orderId: s.m(S.string),
240
- item: s.m(S.string)
237
+ orderId: s.m(Sury.string),
238
+ item: s.m(Sury.string)
241
239
  })),
242
- S.schema(s => ({
240
+ Sury.$schema(s => ({
243
241
  TAG: "OrderShipped",
244
- orderId: s.m(S.string)
242
+ orderId: s.m(Sury.string)
245
243
  }))
246
244
  ]);
247
245
 
@@ -284,15 +282,17 @@ let OrdersViewProjection = {
284
282
  project: project
285
283
  };
286
284
 
287
- let consumedEventSchema$4 = S.schema(s => ({
285
+ let consumedEventSchema$4 = Sury.$schema(s => ({
288
286
  TAG: "OrderPlaced",
289
- orderId: s.m(S.string)
287
+ orderId: s.m(Sury.string)
290
288
  }));
291
289
 
292
- let outboundItemSchema = S.schema(s => ({
293
- orderId: s.m(S.string)
290
+ let outboundItemSchema = Sury.$schema(s => ({
291
+ orderId: s.m(Sury.string)
294
292
  }));
295
293
 
294
+ let inboundCommandSchema = Sury.$unit;
295
+
296
296
  function collect$1(event, param) {
297
297
  let orderId = event.orderId;
298
298
  return [[
@@ -307,7 +307,7 @@ let ConfirmSlice = {
307
307
  name: "Confirm",
308
308
  consumedEventSchema: consumedEventSchema$4,
309
309
  outboundItemSchema: outboundItemSchema,
310
- inboundCommandSchema: S.unit,
310
+ inboundCommandSchema: inboundCommandSchema,
311
311
  collect: collect$1,
312
312
  externalSystem: undefined
313
313
  };
@@ -431,4 +431,4 @@ export {
431
431
  View,
432
432
  Confirm,
433
433
  }
434
- /* Not a pure module */
434
+ /* consumedEventSchema Not a pure module */
@@ -1,18 +1,18 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as InboundTranslation_GWT$ReventlessGwt from "../src/InboundTranslation_GWT.res.mjs";
5
5
 
6
- let externalInputSchema = S.schema(s => ({
7
- paymentId: s.m(S.string),
8
- orderId: s.m(S.string),
9
- status: s.m(S.string)
6
+ let externalInputSchema = Sury.$schema(s => ({
7
+ paymentId: s.m(Sury.string),
8
+ orderId: s.m(Sury.string),
9
+ status: s.m(Sury.string)
10
10
  }));
11
11
 
12
- let commandSchema = S.schema(s => ({
12
+ let commandSchema = Sury.$schema(s => ({
13
13
  TAG: "ConfirmPayment",
14
- orderId: s.m(S.string),
15
- paymentId: s.m(S.string)
14
+ orderId: s.m(Sury.string),
15
+ paymentId: s.m(Sury.string)
16
16
  }));
17
17
 
18
18
  function translate(input) {
@@ -6,7 +6,6 @@
6
6
  // target-decide pipeline end-to-end against the unified `GwtSource`/`GwtTarget`
7
7
  // module types.
8
8
 
9
- S.enableJson()
10
9
 
11
10
  // ---------------------------------------------------------------------------
12
11
  // Shared Aggregate specs + behaviours used by the Aggr→* cases below.
@@ -1,27 +1,25 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
5
5
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
6
6
  import * as Mapping_GWT$ReventlessGwt from "../src/Mapping_GWT.res.mjs";
7
7
 
8
- S.enableJson();
9
-
10
8
  let name = "Category";
11
9
 
12
- let commandSchema = S.schema(s => ({
10
+ let commandSchema = Sury.$schema(s => ({
13
11
  TAG: "AddCategory",
14
- categoryId: s.m(S.string),
15
- name: s.m(S.string)
12
+ categoryId: s.m(Sury.string),
13
+ name: s.m(Sury.string)
16
14
  }));
17
15
 
18
- let eventSchema = S.schema(s => ({
16
+ let eventSchema = Sury.$schema(s => ({
19
17
  TAG: "CategoryAdded",
20
- categoryId: s.m(S.string),
21
- name: s.m(S.string)
18
+ categoryId: s.m(Sury.string),
19
+ name: s.m(Sury.string)
22
20
  }));
23
21
 
24
- let errorSchema = S.literal("CategoryAlreadyExists");
22
+ let errorSchema = Sury.literal("CategoryAlreadyExists");
25
23
 
26
24
  let moduleUrl = "";
27
25
 
@@ -74,21 +72,21 @@ let CategoryBehavior = {
74
72
 
75
73
  let name$1 = "Product";
76
74
 
77
- let commandSchema$1 = S.schema(s => ({
75
+ let commandSchema$1 = Sury.$schema(s => ({
78
76
  TAG: "MirrorCategory",
79
- productId: s.m(S.string),
80
- categoryId: s.m(S.string),
81
- name: s.m(S.string)
77
+ productId: s.m(Sury.string),
78
+ categoryId: s.m(Sury.string),
79
+ name: s.m(Sury.string)
82
80
  }));
83
81
 
84
- let eventSchema$1 = S.schema(s => ({
82
+ let eventSchema$1 = Sury.$schema(s => ({
85
83
  TAG: "ProductCategoryMirrored",
86
- productId: s.m(S.string),
87
- categoryId: s.m(S.string),
88
- name: s.m(S.string)
84
+ productId: s.m(Sury.string),
85
+ categoryId: s.m(Sury.string),
86
+ name: s.m(Sury.string)
89
87
  }));
90
88
 
91
- let errorSchema$1 = S.literal("ProductAlreadyMirrored");
89
+ let errorSchema$1 = Sury.literal("ProductAlreadyMirrored");
92
90
 
93
91
  let moduleUrl$2 = "";
94
92
 
@@ -140,7 +138,7 @@ let ProductBehavior = {
140
138
  moduleUrl: moduleUrl$3
141
139
  };
142
140
 
143
- let consumedEventSchema = S.schema(s => ({
141
+ let consumedEventSchema = Sury.$schema(s => ({
144
142
  TAG: "NotificationSent",
145
143
  notificationId: s.m(DcbTag$Reventless.string)
146
144
  }));
@@ -151,18 +149,18 @@ function evolve$2(_state, event) {
151
149
  };
152
150
  }
153
151
 
154
- let commandSchema$2 = S.schema(s => ({
152
+ let commandSchema$2 = Sury.$schema(s => ({
155
153
  TAG: "SendNotification",
156
154
  notificationId: s.m(DcbTag$Reventless.string),
157
- message: s.m(S.string)
155
+ message: s.m(Sury.string)
158
156
  }));
159
157
 
160
- let errorSchema$2 = S.literal("NotificationAlreadySent");
158
+ let errorSchema$2 = Sury.literal("NotificationAlreadySent");
161
159
 
162
- let eventSchema$2 = S.schema(s => ({
160
+ let eventSchema$2 = Sury.$schema(s => ({
163
161
  TAG: "NotificationSent",
164
162
  notificationId: s.m(DcbTag$Reventless.string),
165
- message: s.m(S.string)
163
+ message: s.m(Sury.string)
166
164
  }));
167
165
 
168
166
  function decide$2(state, command) {
@@ -204,7 +202,7 @@ let NotificationSlice = {
204
202
  readConsistency: "EscalateOnRetry"
205
203
  };
206
204
 
207
- let consumedEventSchema$1 = S.schema(s => ({
205
+ let consumedEventSchema$1 = Sury.$schema(s => ({
208
206
  TAG: "StockReserved",
209
207
  itemId: s.m(DcbTag$Reventless.string)
210
208
  }));
@@ -215,18 +213,18 @@ function evolve$3(_state, event) {
215
213
  };
216
214
  }
217
215
 
218
- let commandSchema$3 = S.schema(s => ({
216
+ let commandSchema$3 = Sury.$schema(s => ({
219
217
  TAG: "ReserveStock",
220
218
  itemId: s.m(DcbTag$Reventless.string),
221
- quantity: s.m(S.int)
219
+ quantity: s.m(Sury.int)
222
220
  }));
223
221
 
224
- let errorSchema$3 = S.literal("OutOfStock");
222
+ let errorSchema$3 = Sury.literal("OutOfStock");
225
223
 
226
- let eventSchema$3 = S.schema(s => ({
224
+ let eventSchema$3 = Sury.$schema(s => ({
227
225
  TAG: "StockReserved",
228
226
  itemId: s.m(DcbTag$Reventless.string),
229
- quantity: s.m(S.int)
227
+ quantity: s.m(Sury.int)
230
228
  }));
231
229
 
232
230
  function decide$3(state, command) {
@@ -593,4 +591,4 @@ export {
593
591
  DcbToDcbMapping,
594
592
  DcbToDcbGwt,
595
593
  }
596
- /* Not a pure module */
594
+ /* commandSchema Not a pure module */
@@ -1,20 +1,20 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as OutboundTranslation_GWT$ReventlessGwt from "../src/OutboundTranslation_GWT.res.mjs";
5
5
 
6
- let consumedEventSchema = S.schema(s => ({
6
+ let consumedEventSchema = Sury.$schema(s => ({
7
7
  TAG: "OrderShipped",
8
- orderId: s.m(S.string),
9
- email: s.m(S.string)
8
+ orderId: s.m(Sury.string),
9
+ email: s.m(Sury.string)
10
10
  }));
11
11
 
12
- let outboundItemSchema = S.schema(s => ({
13
- orderId: s.m(S.string),
14
- email: s.m(S.string)
12
+ let outboundItemSchema = Sury.$schema(s => ({
13
+ orderId: s.m(Sury.string),
14
+ email: s.m(Sury.string)
15
15
  }));
16
16
 
17
- let inboundCommandSchema = S.literal("NoOp");
17
+ let inboundCommandSchema = Sury.literal("NoOp");
18
18
 
19
19
  function collect(event, param) {
20
20
  let orderId = event.orderId;
@@ -2,7 +2,6 @@
2
2
  // to prove the unified DSL works for either consumer type. Stage 6 of
3
3
  // `docs/plans/done/reventless-gwt.md`.
4
4
 
5
- S.enableJson()
6
5
 
7
6
  // ---------------------------------------------------------------------------
8
7
  // Case 1 — ReadModel: Categories.
@@ -1,22 +1,20 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
5
5
  import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
6
6
  import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
7
7
  import * as Outcome$ReventlessGwt from "../src/Outcome.res.mjs";
8
8
  import * as Query_GWT$ReventlessGwt from "../src/Query_GWT.res.mjs";
9
9
 
10
- S.enableJson();
11
-
12
10
  let name = "Categories";
13
11
 
14
12
  let moduleUrl = "";
15
13
 
16
- let stateSchema = S.schema(s => ({
17
- categoryId: s.m(S.string),
18
- name: s.m(S.string),
19
- archived: s.m(S.bool)
14
+ let stateSchema = Sury.$schema(s => ({
15
+ categoryId: s.m(Sury.string),
16
+ name: s.m(Sury.string),
17
+ archived: s.m(Sury.bool)
20
18
  }));
21
19
 
22
20
  let config = ReadModel$Reventless.config(undefined, undefined, [{
@@ -207,17 +205,17 @@ let name$1 = "OrdersView";
207
205
 
208
206
  let moduleUrl$1 = "";
209
207
 
210
- let stateSchema$1 = S.schema(s => ({
211
- orderId: s.m(S.string),
212
- customerId: s.m(S.string),
213
- total: s.m(S.int)
208
+ let stateSchema$1 = Sury.$schema(s => ({
209
+ orderId: s.m(Sury.string),
210
+ customerId: s.m(Sury.string),
211
+ total: s.m(Sury.int)
214
212
  }));
215
213
 
216
- let consumedEventSchema = S.schema(s => ({
214
+ let consumedEventSchema = Sury.$schema(s => ({
217
215
  TAG: "OrderPlaced",
218
- orderId: s.m(S.string),
219
- customerId: s.m(S.string),
220
- total: s.m(S.int)
216
+ orderId: s.m(Sury.string),
217
+ customerId: s.m(Sury.string),
218
+ total: s.m(Sury.int)
221
219
  }));
222
220
 
223
221
  function project(param) {
@@ -312,4 +310,4 @@ export {
312
310
  OrdersView,
313
311
  OrdersQuery,
314
312
  }
315
- /* Not a pure module */
313
+ /* stateSchema Not a pure module */
@@ -3,7 +3,6 @@
3
3
  // productId (and a productIds array) that resolve into a Products read model;
4
4
  // the resolver DSL follows those keys across the spec boundary.
5
5
 
6
- S.enableJson()
7
6
 
8
7
  module RM = Reventless.ReadModel
9
8
 
@@ -1,15 +1,13 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
5
5
  import * as Query_GWT$ReventlessGwt from "../src/Query_GWT.res.mjs";
6
6
 
7
- S.enableJson();
8
-
9
- let stateSchema = S.schema(s => ({
10
- productId: s.m(S.string),
11
- name: s.m(S.string),
12
- price: s.m(S.float)
7
+ let stateSchema = Sury.$schema(s => ({
8
+ productId: s.m(Sury.string),
9
+ name: s.m(Sury.string),
10
+ price: s.m(Sury.float)
13
11
  }));
14
12
 
15
13
  let config = ReadModel$Reventless.config(undefined, undefined, undefined);
@@ -23,10 +21,10 @@ let ProductRow = {
23
21
  visibility: "Public"
24
22
  };
25
23
 
26
- let stateSchema$1 = S.schema(s => ({
27
- orderId: s.m(S.string),
28
- productId: s.m(S.string),
29
- productIds: s.m(S.array(S.string))
24
+ let stateSchema$1 = Sury.$schema(s => ({
25
+ orderId: s.m(Sury.string),
26
+ productId: s.m(Sury.string),
27
+ productIds: s.m(Sury.array(Sury.string))
30
28
  }));
31
29
 
32
30
  let config$1 = ReadModel$Reventless.config([{
@@ -133,4 +131,4 @@ export {
133
131
  order,
134
132
  stores,
135
133
  }
136
- /* Not a pure module */
134
+ /* stateSchema Not a pure module */
@@ -1,15 +1,15 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
5
5
  import * as MockEmail$ReventlessGwt from "./MockEmail.res.mjs";
6
6
 
7
- let eventSchema = S.union([
8
- S.schema(s => ({
7
+ let eventSchema = Sury.union([
8
+ Sury.$schema(s => ({
9
9
  TAG: "Placed",
10
- email: s.m(S.string)
10
+ email: s.m(Sury.string)
11
11
  })),
12
- S.literal("Shipped")
12
+ Sury.literal("Shipped")
13
13
  ]);
14
14
 
15
15
  let Source = {
@@ -14,5 +14,5 @@ let recordSend = (~email, ~orderId) =>
14
14
 
15
15
  let mock: SideEffect_GWT.mock<call> = {
16
16
  snapshot: () => calls.contents,
17
- encode: c => c->S.reverseConvertToJsonOrThrow(callSchema),
17
+ encode: c => c->Reventless.Util_Sury.toJson(callSchema),
18
18
  }
@@ -1,11 +1,12 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
+ import * as Util_Sury$Reventless from "@reventlessdev/reventless-spec/src/util/Util_Sury.res.mjs";
4
5
 
5
- let callSchema = S.schema(s => ({
6
+ let callSchema = Sury.$schema(s => ({
6
7
  TAG: "SendConfirmation",
7
- email: s.m(S.string),
8
- orderId: s.m(S.string)
8
+ email: s.m(Sury.string),
9
+ orderId: s.m(Sury.string)
9
10
  }));
10
11
 
11
12
  let calls = {
@@ -29,7 +30,7 @@ function mock_snapshot() {
29
30
  }
30
31
 
31
32
  function mock_encode(c) {
32
- return S.reverseConvertToJsonOrThrow(c, callSchema);
33
+ return Util_Sury$Reventless.toJson(c, callSchema);
33
34
  }
34
35
 
35
36
  let mock = {
@@ -1,27 +1,27 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
5
5
  import * as Outcome$ReventlessGwt from "../src/Outcome.res.mjs";
6
6
  import * as Behavior_GWT$ReventlessGwt from "../src/Behavior_GWT.res.mjs";
7
7
 
8
- let consumedEventSchema = S.union([
9
- S.literal("CategoryAdded"),
10
- S.literal("CategoryArchived")
8
+ let consumedEventSchema = Sury.union([
9
+ Sury.literal("CategoryAdded"),
10
+ Sury.literal("CategoryArchived")
11
11
  ]);
12
12
 
13
- let commandSchema = S.schema(s => ({
13
+ let commandSchema = Sury.$schema(s => ({
14
14
  TAG: "AddCategory",
15
15
  categoryId: s.m(DcbTag$Reventless.string),
16
- name: s.m(S.string)
16
+ name: s.m(Sury.string)
17
17
  }));
18
18
 
19
- let errorSchema = S.literal("CategoryAlreadyExists");
19
+ let errorSchema = Sury.literal("CategoryAlreadyExists");
20
20
 
21
- let eventSchema = S.schema(s => ({
21
+ let eventSchema = Sury.$schema(s => ({
22
22
  TAG: "CategoryAdded",
23
23
  categoryId: s.m(DcbTag$Reventless.string),
24
- name: s.m(S.string)
24
+ name: s.m(Sury.string)
25
25
  }));
26
26
 
27
27
  function commandAuthorization(param) {
@@ -151,18 +151,18 @@ describe("AddCategory StateChangeSlice", () => {
151
151
  }));
152
152
  });
153
153
 
154
- let consumedEventSchema$1 = S.literal("Noop");
154
+ let consumedEventSchema$1 = Sury.literal("Noop");
155
155
 
156
- let commandSchema$1 = S.schema(s => ({
156
+ let commandSchema$1 = Sury.$schema(s => ({
157
157
  TAG: "Do",
158
- id: s.m(S.string)
158
+ id: s.m(Sury.string)
159
159
  }));
160
160
 
161
- let errorSchema$1 = S.literal("Rejected");
161
+ let errorSchema$1 = Sury.literal("Rejected");
162
162
 
163
- let eventSchema$1 = S.schema(s => ({
163
+ let eventSchema$1 = Sury.$schema(s => ({
164
164
  TAG: "Done",
165
- id: s.m(S.string)
165
+ id: s.m(Sury.string)
166
166
  }));
167
167
 
168
168
  function commandAuthorization$1(param) {
@@ -1,28 +1,28 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as Projection_GWT$ReventlessGwt from "../src/Projection_GWT.res.mjs";
5
5
 
6
- let stateSchema = S.schema(s => ({
7
- categoryId: s.m(S.string),
8
- name: s.m(S.string),
9
- archived: s.m(S.bool)
6
+ let stateSchema = Sury.$schema(s => ({
7
+ categoryId: s.m(Sury.string),
8
+ name: s.m(Sury.string),
9
+ archived: s.m(Sury.bool)
10
10
  }));
11
11
 
12
- let consumedEventSchema = S.union([
13
- S.schema(s => ({
12
+ let consumedEventSchema = Sury.union([
13
+ Sury.$schema(s => ({
14
14
  TAG: "CategoryAdded",
15
- categoryId: s.m(S.string),
16
- name: s.m(S.string)
15
+ categoryId: s.m(Sury.string),
16
+ name: s.m(Sury.string)
17
17
  })),
18
- S.schema(s => ({
18
+ Sury.$schema(s => ({
19
19
  TAG: "CategoryRenamed",
20
- categoryId: s.m(S.string),
21
- name: s.m(S.string)
20
+ categoryId: s.m(Sury.string),
21
+ name: s.m(Sury.string)
22
22
  })),
23
- S.schema(s => ({
23
+ Sury.$schema(s => ({
24
24
  TAG: "CategoryArchived",
25
- categoryId: s.m(S.string)
25
+ categoryId: s.m(Sury.string)
26
26
  }))
27
27
  ]);
28
28