@reventlessdev/reventless-core 3.0.0-alpha.239 → 3.0.0-alpha.241

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 (172) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/package.json +11 -11
  3. package/src/Message.res +11 -11
  4. package/src/Message.res.mjs +15 -14
  5. package/src/Projection.res +2 -2
  6. package/src/Projection.res.mjs +5 -4
  7. package/src/adapter/Monitoring/Monitoring.res +24 -2
  8. package/src/adapter/Monitoring/Monitoring.res.mjs +3 -3
  9. package/src/admin/Platform_Admin.res +1 -16
  10. package/src/admin/Platform_Admin.res.mjs +2 -30
  11. package/src/admin/Platform_AdminApi.res.mjs +3 -3
  12. package/src/admin/Platform_Admin_Structure.res +58 -113
  13. package/src/admin/Platform_Admin_Structure.res.mjs +24 -139
  14. package/src/admin/UiFragmentRegistry/StateChangeSlice/UiFragmentRegistry.res.mjs +12 -12
  15. package/src/admin/UiFragmentRegistry/StateViewSlice/UiFragments.res.mjs +14 -14
  16. package/src/components/Aggregate/Aggregate_Callback.res +2 -2
  17. package/src/components/Aggregate/Aggregate_Callback.res.mjs +4 -4
  18. package/src/components/Api/ApiAllowedStatesHelpers.res.mjs +3 -3
  19. package/src/components/Api/ApiNoApiHelpers.res.mjs +5 -5
  20. package/src/components/Api/ApiTargetStateHelpers.res.mjs +3 -3
  21. package/src/components/Api/GraphQL_FragmentGenerator.res +18 -12
  22. package/src/components/Api/GraphQL_FragmentGenerator.res.mjs +7 -13
  23. package/src/components/Api/GraphQL_SchemaInspector.res +1 -1
  24. package/src/components/Api/GraphQL_SchemaInspector.res.mjs +1 -1
  25. package/src/components/Api/MCP_SchemaGenerator.res +1 -1
  26. package/src/components/Api/MCP_SchemaGenerator.res.mjs +1 -1
  27. package/src/components/Api/SchemaType.res +6 -10
  28. package/src/components/Api/SchemaType.res.mjs +4 -4
  29. package/src/components/Api/StorageRefFields.res +1 -1
  30. package/src/components/Api/StorageRefFields.res.mjs +1 -1
  31. package/src/components/Api/SuryToJsonSchema.res +11 -0
  32. package/src/components/Api/SuryToJsonSchema.res.mjs +2 -1
  33. package/src/components/AutomationSlice/AutomationSlice_Callback.res +3 -4
  34. package/src/components/AutomationSlice/AutomationSlice_Callback.res.mjs +22 -23
  35. package/src/components/CommandTopic/CommandTopic_Callback.res +1 -2
  36. package/src/components/CommandTopic/CommandTopic_Callback.res.mjs +3 -4
  37. package/src/components/CommandTopic/CommandTopic_Helpers.res +1 -1
  38. package/src/components/CommandTopic/CommandTopic_Helpers.res.mjs +3 -3
  39. package/src/components/Counter/Counter.res.mjs +2 -2
  40. package/src/components/Counter/Counter_Callback.res.mjs +4 -4
  41. package/src/components/Counter/Counter_Operations.res.mjs +4 -4
  42. package/src/components/Dcb/Dcb_Builder.res +1 -1
  43. package/src/components/Dcb/Dcb_Builder.res.mjs +8 -6
  44. package/src/components/DcbEventLog/DcbEventLog_Builder.res.mjs +4 -3
  45. package/src/components/EventCollector/EventCollector_Builder.res +1 -1
  46. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res +1 -2
  47. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res.mjs +11 -12
  48. package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Callback.res +3 -4
  49. package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Callback.res.mjs +24 -25
  50. package/src/components/SideEffectHandler/SideEffectHandler_Callback.res +1 -1
  51. package/src/components/SideEffectHandler/SideEffectHandler_Callback.res.mjs +3 -3
  52. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +2 -2
  53. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res.mjs +4 -4
  54. package/src/components/StateViewSlice/StateViewSlice_Builder.res +1 -1
  55. package/src/components/StateViewSlice/StateViewSlice_Builder.res.mjs +3 -3
  56. package/src/plugin/api/PluginBaseFragment.res +12 -29
  57. package/src/plugin/api/PluginBaseFragment.res.mjs +3 -22
  58. package/src/plugin/component/Capability_Inference.res +118 -1
  59. package/src/plugin/component/Capability_Inference.res.mjs +128 -1
  60. package/src/plugin/component/Plugin_Builder.res +2 -2
  61. package/src/plugin/component/Plugin_Builder.res.mjs +2 -1
  62. package/src/plugin/component/Plugin_Helpers.res +11 -11
  63. package/src/plugin/component/Plugin_Helpers.res.mjs +11 -10
  64. package/src/plugin/component/Plugin_Structure.res +349 -274
  65. package/src/plugin/component/Plugin_Structure.res.mjs +212 -175
  66. package/src/plugin/component/Plugin_SubscriptionSchema.res +1 -1
  67. package/src/plugin/component/Plugin_SubscriptionSchema.res.mjs +1 -1
  68. package/src/plugin/component/SchemaWalker.res +11 -11
  69. package/src/plugin/component/SchemaWalker.res.mjs +8 -9
  70. package/src/plugin/connect/PluginExtensionPoint_Plugin.res.mjs +15 -15
  71. package/src/plugin/lifecycle/PluginBehavior.res.mjs +55 -55
  72. package/src/plugin/lifecycle/PluginSpec.res +22 -7
  73. package/src/plugin/lifecycle/PluginSpec.res.mjs +91 -36
  74. package/src/plugin/lifecycle/PluginsReadModelSpec.res +36 -9
  75. package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +33 -22
  76. package/src/util/Interstack.res +3 -3
  77. package/src/util/LogFormat.res +1 -2
  78. package/src/util/LogFormat.res.mjs +2 -2
  79. package/tests/IdentityTest.res +6 -7
  80. package/tests/IdentityTest.res.mjs +7 -9
  81. package/tests/adapter/MonitoringTest.res +30 -3
  82. package/tests/adapter/MonitoringTest.res.mjs +31 -12
  83. package/tests/adapter/RuntimeExtensionHookReachTest.res +0 -1
  84. package/tests/adapter/RuntimeExtensionHookReachTest.res.mjs +5 -7
  85. package/tests/admin/Platform_Admin_StructureTest.res +254 -0
  86. package/tests/admin/Platform_Admin_StructureTest.res.mjs +219 -0
  87. package/tests/aggregate/AggregateCacheTest.res +0 -1
  88. package/tests/aggregate/AggregateCacheTest.res.mjs +13 -15
  89. package/tests/aggregate/AggregateConflictTest.res +0 -1
  90. package/tests/aggregate/AggregateConflictTest.res.mjs +7 -9
  91. package/tests/aggregate/AggregateFixtures.res +0 -1
  92. package/tests/aggregate/AggregateFixtures.res.mjs +19 -21
  93. package/tests/aggregate/AggregateSnapshotTest.res +1 -2
  94. package/tests/aggregate/AggregateSnapshotTest.res.mjs +15 -16
  95. package/tests/api/ApiNoApiTest.res.mjs +17 -9
  96. package/tests/api/GraphQL_FragmentGeneratorTest.res +62 -1
  97. package/tests/api/GraphQL_FragmentGeneratorTest.res.mjs +102 -58
  98. package/tests/api/PsInternalFieldsReadModel.res +21 -0
  99. package/tests/api/PsInternalFieldsReadModel.res.mjs +74 -0
  100. package/tests/api/StorageRefFieldsTest.res.mjs +13 -13
  101. package/tests/api/SuryToJsonSchemaTest.res +43 -0
  102. package/tests/api/SuryToJsonSchemaTest.res.mjs +352 -849
  103. package/tests/commandgenerator/CommandGeneratorFixtures.res +0 -1
  104. package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +19 -21
  105. package/tests/commandgenerator/OwnerStampingTest.res +0 -1
  106. package/tests/commandgenerator/OwnerStampingTest.res.mjs +9 -11
  107. package/tests/commandtopic/CommandTopicCallbackFixtures.res +0 -1
  108. package/tests/commandtopic/CommandTopicCallbackFixtures.res.mjs +7 -9
  109. package/tests/counter/CounterFixtures.res +0 -1
  110. package/tests/counter/CounterFixtures.res.mjs +1 -4
  111. package/tests/dcb/DcbDecodeTest.res.mjs +24 -24
  112. package/tests/dcb/DcbEventLogOperationsTest.res +2 -2
  113. package/tests/dcb/DcbEventLogOperationsTest.res.mjs +3 -3
  114. package/tests/dcb/DcbEventLogSchemaTest.res.mjs +7 -7
  115. package/tests/dcb/DcbFixtures.res +0 -1
  116. package/tests/dcb/DcbFixtures.res.mjs +87 -89
  117. package/tests/dcb/DcbTagTest.res.mjs +6 -6
  118. package/tests/dcb/DcbValidationTest.res.mjs +52 -52
  119. package/tests/eventlog/EventLogFixtures.res +0 -1
  120. package/tests/eventlog/EventLogFixtures.res.mjs +7 -9
  121. package/tests/eventmapper/EventMapperFixtures.res +0 -1
  122. package/tests/eventmapper/EventMapperFixtures.res.mjs +24 -26
  123. package/tests/eventtopic/EventTopicFixtures.res +0 -1
  124. package/tests/eventtopic/EventTopicFixtures.res.mjs +7 -9
  125. package/tests/extensionpoint/ExtensionPointFixtures.res +0 -1
  126. package/tests/extensionpoint/ExtensionPointFixtures.res.mjs +10 -12
  127. package/tests/extensionpoint/ExtensionPointOperationsTest.res +1 -2
  128. package/tests/extensionpoint/ExtensionPointOperationsTest.res.mjs +9 -10
  129. package/tests/logger/LogFormatTest.res +3 -2
  130. package/tests/logger/LogFormatTest.res.mjs +7 -9
  131. package/tests/message/MessageTest.res +2 -2
  132. package/tests/message/MessageTest.res.mjs +8 -7
  133. package/tests/message/MetaEnvelopeTest.res +5 -5
  134. package/tests/message/MetaEnvelopeTest.res.mjs +12 -11
  135. package/tests/plugin/ManifestVisibilityTest.res.mjs +7 -7
  136. package/tests/plugin/PluginDefinitionScalars.res +5 -3
  137. package/tests/plugin/PluginDefinitionScalars.res.mjs +2 -2
  138. package/tests/plugin/PluginLifecycleCorpusTest.res +4 -3
  139. package/tests/plugin/PluginLifecycleCorpusTest.res.mjs +3 -6
  140. package/tests/plugin/PluginSpecExperiment.res +0 -1
  141. package/tests/plugin/PluginSpecExperiment.res.mjs +12 -14
  142. package/tests/plugin/PluginStructureTest.res +188 -1
  143. package/tests/plugin/PluginStructureTest.res.mjs +293 -102
  144. package/tests/plugin/Plugin_EventQuerySchemaTest.res.mjs +3 -3
  145. package/tests/plugin/SchemaWalkerTest.res +0 -1
  146. package/tests/plugin/SchemaWalkerTest.res.mjs +17 -19
  147. package/tests/plugin/StateChangeSlice/PsAttachInvoice.res.mjs +5 -5
  148. package/tests/plugin/StateChangeSlice/PsChangePhoto.res.mjs +8 -8
  149. package/tests/plugin/StateChangeSlice/PsDispatchShipment.res.mjs +5 -5
  150. package/tests/plugin/StateChangeSlice/PsGatedCommands.res.mjs +9 -9
  151. package/tests/plugin/StateChangeSlice/PsPlaceOrder.res.mjs +5 -5
  152. package/tests/plugin/StateChangeSlice/PsReserveStock.res.mjs +8 -8
  153. package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +15 -15
  154. package/tests/plugin/StateChangeSlice/PsTypoStore.res +31 -0
  155. package/tests/plugin/StateChangeSlice/PsTypoStore.res.mjs +62 -0
  156. package/tests/plugin/StateChangeSlice/PsUploadAvatar.res.mjs +8 -8
  157. package/tests/plugin/StateChangeSlice/PsUploadImages.res +40 -0
  158. package/tests/plugin/StateChangeSlice/PsUploadImages.res.mjs +66 -0
  159. package/tests/plugin/StateViewSlice/PsAnnotatedView.res.mjs +13 -12
  160. package/tests/plugin/StateViewSlice/PsAvailableProductsView.res.mjs +8 -8
  161. package/tests/plugin/StateViewSlice/PsCategoriesView.res.mjs +6 -6
  162. package/tests/plugin/StateViewSlice/PsCustomersView.res.mjs +10 -10
  163. package/tests/plugin/StateViewSlice/PsGatedView.res.mjs +6 -6
  164. package/tests/plugin/StateViewSlice/PsOrdersView.res.mjs +9 -9
  165. package/tests/plugin/StateViewSlice/PsShipmentsView.res.mjs +11 -10
  166. package/tests/plugin/pluginDefinitionRequiredScalars.txt +15 -0
  167. package/tests/querydb/QueryDbFixtures.res +0 -1
  168. package/tests/querydb/QueryDbFixtures.res.mjs +5 -7
  169. package/tests/sideeffecthandler/SideEffectHandlerFixtures.res +0 -1
  170. package/tests/sideeffecthandler/SideEffectHandlerFixtures.res.mjs +4 -6
  171. package/tests/util/CommandPublisherTest.res +0 -1
  172. package/tests/util/CommandPublisherTest.res.mjs +4 -6
@@ -1,6 +1,6 @@
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_Int from "@rescript/runtime/lib/es6/Stdlib_Int.js";
5
5
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
6
  import * as Effect from "effect/Effect";
@@ -8,27 +8,25 @@ import * as Stream from "effect/Stream";
8
8
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
9
9
  import * as Message$ReventlessCore from "../../src/Message.res.mjs";
10
10
 
11
- S.enableJson();
12
-
13
11
  let moduleUrl = import.meta.url;
14
12
 
15
- let eventSchema = S.union([
16
- S.schema(s => ({
13
+ let eventSchema = Sury.union([
14
+ Sury.$schema(s => ({
17
15
  TAG: "ItemCreated",
18
16
  itemId: s.m(DcbTag$Reventless.string),
19
- name: s.m(S.string)
17
+ name: s.m(Sury.string)
20
18
  })),
21
- S.schema(s => ({
19
+ Sury.$schema(s => ({
22
20
  TAG: "ItemRenamed",
23
21
  itemId: s.m(DcbTag$Reventless.string),
24
- newName: s.m(S.string)
22
+ newName: s.m(Sury.string)
25
23
  })),
26
- S.schema(s => ({
24
+ Sury.$schema(s => ({
27
25
  TAG: "CountUpdated",
28
26
  category: s.m(DcbTag$Reventless.string),
29
27
  amount: s.m(DcbTag$Reventless.int)
30
28
  })),
31
- S.literal("SimpleEvent")
29
+ Sury.literal("SimpleEvent")
32
30
  ]);
33
31
 
34
32
  let TestEventLogSpec = {
@@ -36,69 +34,69 @@ let TestEventLogSpec = {
36
34
  eventSchema: eventSchema
37
35
  };
38
36
 
39
- let eventSchema$1 = S.union([
40
- S.schema(s => ({
37
+ let eventSchema$1 = Sury.union([
38
+ Sury.$schema(s => ({
41
39
  TAG: "PlainEvent",
42
- name: s.m(S.string),
43
- value: s.m(S.int)
40
+ name: s.m(Sury.string),
41
+ value: s.m(Sury.int)
44
42
  })),
45
- S.literal("EmptyEvent")
43
+ Sury.literal("EmptyEvent")
46
44
  ]);
47
45
 
48
46
  let UntaggedEventSpec = {
49
47
  eventSchema: eventSchema$1
50
48
  };
51
49
 
52
- let objectEventSchema = S.schema(s => ({
50
+ let objectEventSchema = Sury.$schema(s => ({
53
51
  tenantId: s.m(DcbTag$Reventless.string),
54
- data: s.m(S.string)
52
+ data: s.m(Sury.string)
55
53
  }));
56
54
 
57
55
  let moduleUrl$1 = import.meta.url;
58
56
 
59
- let eventSchema$2 = S.union([
60
- S.schema(s => ({
57
+ let eventSchema$2 = Sury.union([
58
+ Sury.$schema(s => ({
61
59
  TAG: "ItemCreated",
62
60
  itemId: s.m(DcbTag$Reventless.string),
63
- name: s.m(S.string)
61
+ name: s.m(Sury.string)
64
62
  })),
65
- S.schema(s => ({
63
+ Sury.$schema(s => ({
66
64
  TAG: "ItemRenamed",
67
65
  itemId: s.m(DcbTag$Reventless.string),
68
- newName: s.m(S.string)
66
+ newName: s.m(Sury.string)
69
67
  }))
70
68
  ]);
71
69
 
72
- let consumedEventSchema = S.union([
73
- S.schema(s => ({
70
+ let consumedEventSchema = Sury.union([
71
+ Sury.$schema(s => ({
74
72
  TAG: "ItemCreated",
75
73
  itemId: s.m(DcbTag$Reventless.string),
76
- name: s.m(S.string)
74
+ name: s.m(Sury.string)
77
75
  })),
78
- S.schema(s => ({
76
+ Sury.$schema(s => ({
79
77
  TAG: "ItemRenamed",
80
78
  itemId: s.m(DcbTag$Reventless.string),
81
- newName: s.m(S.string)
79
+ newName: s.m(Sury.string)
82
80
  }))
83
81
  ]);
84
82
 
85
- let commandSchema = S.union([
86
- S.schema(s => ({
83
+ let commandSchema = Sury.union([
84
+ Sury.$schema(s => ({
87
85
  TAG: "CreateItem",
88
86
  itemId: s.m(DcbTag$Reventless.string),
89
- name: s.m(S.string)
87
+ name: s.m(Sury.string)
90
88
  })),
91
- S.schema(s => ({
89
+ Sury.$schema(s => ({
92
90
  TAG: "RenameItem",
93
91
  itemId: s.m(DcbTag$Reventless.string),
94
- newName: s.m(S.string)
92
+ newName: s.m(Sury.string)
95
93
  })),
96
- S.literal("NoOp")
94
+ Sury.literal("NoOp")
97
95
  ]);
98
96
 
99
- let errorSchema = S.union([
100
- S.literal("ItemAlreadyExists"),
101
- S.literal("ItemNotFound")
97
+ let errorSchema = Sury.union([
98
+ Sury.literal("ItemAlreadyExists"),
99
+ Sury.literal("ItemNotFound")
102
100
  ]);
103
101
 
104
102
  function evolve(state, event) {
@@ -317,176 +315,176 @@ function makeMockStorage() {
317
315
  };
318
316
  }
319
317
 
320
- let plainRecordSchema = S.schema(s => ({
321
- name: s.m(S.string),
322
- value: s.m(S.int)
318
+ let plainRecordSchema = Sury.$schema(s => ({
319
+ name: s.m(Sury.string),
320
+ value: s.m(Sury.int)
323
321
  }));
324
322
 
325
- let multiTagRecordSchema = S.schema(s => ({
323
+ let multiTagRecordSchema = Sury.$schema(s => ({
326
324
  userId: s.m(DcbTag$Reventless.string),
327
325
  tenantId: s.m(DcbTag$Reventless.string),
328
- data: s.m(S.string)
326
+ data: s.m(Sury.string)
329
327
  }));
330
328
 
331
- let emptyVariantSchema = S.literal("Empty");
329
+ let emptyVariantSchema = Sury.literal("Empty");
332
330
 
333
- let intTagEventSchema = S.schema(s => ({
331
+ let intTagEventSchema = Sury.$schema(s => ({
334
332
  TAG: "CountEvent",
335
333
  count: s.m(DcbTag$Reventless.int)
336
334
  }));
337
335
 
338
- let mixedEventSchema = S.union([
339
- S.schema(s => ({
336
+ let mixedEventSchema = Sury.union([
337
+ Sury.$schema(s => ({
340
338
  TAG: "EventA",
341
339
  id: s.m(DcbTag$Reventless.string),
342
- name: s.m(S.string)
340
+ name: s.m(Sury.string)
343
341
  })),
344
- S.schema(s => ({
342
+ Sury.$schema(s => ({
345
343
  TAG: "EventB",
346
344
  id: s.m(DcbTag$Reventless.string),
347
- count: s.m(S.int)
345
+ count: s.m(Sury.int)
348
346
  })),
349
- S.schema(s => ({
347
+ Sury.$schema(s => ({
350
348
  TAG: "EventC",
351
- untaggedField: s.m(S.string)
349
+ untaggedField: s.m(Sury.string)
352
350
  }))
353
351
  ]);
354
352
 
355
- let complexEventSchema = S.union([
356
- S.schema(s => ({
353
+ let complexEventSchema = Sury.union([
354
+ Sury.$schema(s => ({
357
355
  TAG: "UserCreated",
358
356
  userId: s.m(DcbTag$Reventless.string),
359
- name: s.m(S.string)
357
+ name: s.m(Sury.string)
360
358
  })),
361
- S.schema(s => ({
359
+ Sury.$schema(s => ({
362
360
  TAG: "UserUpdated",
363
361
  userId: s.m(DcbTag$Reventless.string),
364
- email: s.m(S.string)
362
+ email: s.m(Sury.string)
365
363
  })),
366
- S.schema(s => ({
364
+ Sury.$schema(s => ({
367
365
  TAG: "OrderPlaced",
368
366
  orderId: s.m(DcbTag$Reventless.string),
369
367
  userId: s.m(DcbTag$Reventless.string),
370
- amount: s.m(S.float)
368
+ amount: s.m(Sury.float)
371
369
  })),
372
- S.schema(s => ({
370
+ Sury.$schema(s => ({
373
371
  TAG: "OrderShipped",
374
372
  orderId: s.m(DcbTag$Reventless.string),
375
373
  trackingId: s.m(DcbTag$Reventless.string)
376
374
  })),
377
- S.schema(s => ({
375
+ Sury.$schema(s => ({
378
376
  TAG: "PaymentProcessed",
379
377
  paymentId: s.m(DcbTag$Reventless.string),
380
- amount: s.m(S.float)
378
+ amount: s.m(Sury.float)
381
379
  }))
382
380
  ]);
383
381
 
384
- let multiFieldEventSchema = S.schema(s => ({
382
+ let multiFieldEventSchema = Sury.$schema(s => ({
385
383
  TAG: "EventWithMultipleTags",
386
384
  userId: s.m(DcbTag$Reventless.string),
387
385
  tenantId: s.m(DcbTag$Reventless.string),
388
386
  sessionId: s.m(DcbTag$Reventless.string)
389
387
  }));
390
388
 
391
- let crossEntityCommandSchema = S.schema(s => ({
389
+ let crossEntityCommandSchema = Sury.$schema(s => ({
392
390
  TAG: "PlaceOrder",
393
391
  orderId: s.m(DcbTag$Reventless.string),
394
- customerId: s.m(S.string),
395
- productId: s.m(S.array(DcbTag$Reventless.string))
392
+ customerId: s.m(Sury.string),
393
+ productId: s.m(Sury.array(DcbTag$Reventless.string))
396
394
  }));
397
395
 
398
- let singleTagCommandSchema = S.schema(s => ({
396
+ let singleTagCommandSchema = Sury.$schema(s => ({
399
397
  TAG: "CreateItem",
400
398
  itemId: s.m(DcbTag$Reventless.string),
401
- name: s.m(S.string)
399
+ name: s.m(Sury.string)
402
400
  }));
403
401
 
404
- let orderEventLogSchema = S.union([
405
- S.schema(s => ({
402
+ let orderEventLogSchema = Sury.union([
403
+ Sury.$schema(s => ({
406
404
  TAG: "OrderPlaced",
407
405
  orderId: s.m(DcbTag$Reventless.string),
408
406
  customerId: s.m(DcbTag$Reventless.string),
409
407
  productId: s.m(DcbTag$Reventless.string)
410
408
  })),
411
- S.schema(s => ({
409
+ Sury.$schema(s => ({
412
410
  TAG: "CatalogProductSynced",
413
411
  productId: s.m(DcbTag$Reventless.string)
414
412
  }))
415
413
  ]);
416
414
 
417
- let singleProductEventSchema = S.schema(s => ({
415
+ let singleProductEventSchema = Sury.$schema(s => ({
418
416
  TAG: "CatalogProductSynced",
419
417
  productId: s.m(DcbTag$Reventless.string)
420
418
  }));
421
419
 
422
- let multiProductCommandSchema = S.schema(s => ({
420
+ let multiProductCommandSchema = Sury.$schema(s => ({
423
421
  TAG: "PlaceOrderWithMany",
424
422
  orderId: s.m(DcbTag$Reventless.string),
425
- productIds: s.m(S.array(DcbTag$Reventless.stringForKey("productId")))
423
+ productIds: s.m(Sury.array(DcbTag$Reventless.stringForKey("productId")))
426
424
  }));
427
425
 
428
- let customKeyEventSchema = S.schema(s => ({
426
+ let customKeyEventSchema = Sury.$schema(s => ({
429
427
  TAG: "ProductLabelled",
430
428
  sku: s.m(DcbTag$Reventless.stringForKey("productSku"))
431
429
  }));
432
430
 
433
- let compositeEventSchema = S.schema(s => ({
431
+ let compositeEventSchema = Sury.$schema(s => ({
434
432
  TAG: "SyncPlugin",
435
433
  environment: s.m(DcbTag$Reventless.compositePartitionMember(0, undefined)),
436
434
  platformName: s.m(DcbTag$Reventless.compositePartitionMember(1, undefined)),
437
435
  pluginName: s.m(DcbTag$Reventless.compositePartitionMember(2, undefined)),
438
- version: s.m(S.string)
436
+ version: s.m(Sury.string)
439
437
  }));
440
438
 
441
- let compositeEventCustomSepSchema = S.schema(s => ({
439
+ let compositeEventCustomSepSchema = Sury.$schema(s => ({
442
440
  TAG: "ConfigUpdated",
443
441
  tenantId: s.m(DcbTag$Reventless.compositePartitionMember(0, ":")),
444
442
  region: s.m(DcbTag$Reventless.compositePartitionMember(1, "/")),
445
443
  service: s.m(DcbTag$Reventless.compositePartitionMember(2, undefined)),
446
- value: s.m(S.string)
444
+ value: s.m(Sury.string)
447
445
  }));
448
446
 
449
- let compositeMultiVariantSchema = S.union([
450
- S.schema(s => ({
447
+ let compositeMultiVariantSchema = Sury.union([
448
+ Sury.$schema(s => ({
451
449
  TAG: "VariantA",
452
450
  env: s.m(DcbTag$Reventless.compositePartitionMember(0, undefined)),
453
451
  name: s.m(DcbTag$Reventless.compositePartitionMember(1, undefined)),
454
- data: s.m(S.string)
452
+ data: s.m(Sury.string)
455
453
  })),
456
- S.schema(s => ({
454
+ Sury.$schema(s => ({
457
455
  TAG: "VariantB",
458
456
  env: s.m(DcbTag$Reventless.compositePartitionMember(0, undefined)),
459
457
  name: s.m(DcbTag$Reventless.compositePartitionMember(1, undefined)),
460
- count: s.m(S.int)
458
+ count: s.m(Sury.int)
461
459
  }))
462
460
  ]);
463
461
 
464
- let simplePartitionEventSchema = S.schema(s => ({
462
+ let simplePartitionEventSchema = Sury.$schema(s => ({
465
463
  TAG: "OrderPlaced",
466
464
  orderId: s.m(DcbTag$Reventless.partition),
467
465
  customerId: s.m(DcbTag$Reventless.string)
468
466
  }));
469
467
 
470
- let mixedStrategyEventSchema = S.schema(s => ({
468
+ let mixedStrategyEventSchema = Sury.$schema(s => ({
471
469
  TAG: "BadEvent",
472
470
  env: s.m(DcbTag$Reventless.compositePartitionMember(0, undefined)),
473
471
  name: s.m(DcbTag$Reventless.compositePartitionMember(1, undefined)),
474
472
  orderId: s.m(DcbTag$Reventless.partition)
475
473
  }));
476
474
 
477
- let singleCompositeEventSchema = S.schema(s => ({
475
+ let singleCompositeEventSchema = Sury.$schema(s => ({
478
476
  TAG: "OnlyOne",
479
477
  env: s.m(DcbTag$Reventless.compositePartitionMember(0, undefined)),
480
- data: s.m(S.string)
478
+ data: s.m(Sury.string)
481
479
  }));
482
480
 
483
- let subscriptionEventSchema = S.schema(s => ({
481
+ let subscriptionEventSchema = Sury.$schema(s => ({
484
482
  TAG: "StudentSubscribed",
485
483
  courseId: s.m(DcbTag$Reventless.partition),
486
484
  studentId: s.m(DcbTag$Reventless.crossPartition)
487
485
  }));
488
486
 
489
- let subscribeCommandSchema = S.schema(s => ({
487
+ let subscribeCommandSchema = Sury.$schema(s => ({
490
488
  TAG: "SubscribeStudent",
491
489
  courseId: s.m(DcbTag$Reventless.partition),
492
490
  studentId: s.m(DcbTag$Reventless.crossPartition)
@@ -531,4 +529,4 @@ export {
531
529
  subscriptionEventSchema,
532
530
  subscribeCommandSchema,
533
531
  }
534
- /* Not a pure module */
532
+ /* moduleUrl Not a pure module */
@@ -1,6 +1,6 @@
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 JestGlobals from "@reventlessdev/rescript-jest/src/JestGlobals.res.mjs";
5
5
  import * as Stdlib_JsExn from "@rescript/runtime/lib/es6/Stdlib_JsExn.js";
6
6
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
@@ -44,7 +44,7 @@ globalThis.describe("DcbTag:", () => {
44
44
  globalThis.expect(DcbTag$Reventless.isTagged(DcbTag$Reventless.int)).toBe(true);
45
45
  });
46
46
  globalThis.test("returns false for plain S.string schema", () => {
47
- globalThis.expect(DcbTag$Reventless.isTagged(S.string)).toBe(false);
47
+ globalThis.expect(DcbTag$Reventless.isTagged(Sury.string)).toBe(false);
48
48
  });
49
49
  });
50
50
  globalThis.describe("extractTags from variant (Union) schema", () => {
@@ -191,18 +191,18 @@ globalThis.describe("DcbTag:", () => {
191
191
  });
192
192
  globalThis.describe("isTaggedArray", () => {
193
193
  globalThis.test("returns true for array of tagged strings", () => {
194
- let schema = S.array(DcbTag$Reventless.string);
194
+ let schema = Sury.array(DcbTag$Reventless.string);
195
195
  globalThis.expect(DcbTag$Reventless.isTaggedArray(schema)).toBe(true);
196
196
  });
197
197
  globalThis.test("returns false for array of plain strings", () => {
198
- let schema = S.array(S.string);
198
+ let schema = Sury.array(Sury.string);
199
199
  globalThis.expect(DcbTag$Reventless.isTaggedArray(schema)).toBe(false);
200
200
  });
201
201
  globalThis.test("returns false for tagged scalar", () => {
202
202
  globalThis.expect(DcbTag$Reventless.isTaggedArray(DcbTag$Reventless.string)).toBe(false);
203
203
  });
204
204
  globalThis.test("returns false for plain string", () => {
205
- globalThis.expect(DcbTag$Reventless.isTaggedArray(S.string)).toBe(false);
205
+ globalThis.expect(DcbTag$Reventless.isTaggedArray(Sury.string)).toBe(false);
206
206
  });
207
207
  });
208
208
  globalThis.describe("Complex schemas", () => {
@@ -528,7 +528,7 @@ globalThis.describe("DcbTag:", () => {
528
528
  globalThis.expect(DcbTag$Reventless.isCompositePartitionMember(DcbTag$Reventless.string)).toBe(false);
529
529
  });
530
530
  globalThis.test("returns false for plain S.string", () => {
531
- globalThis.expect(DcbTag$Reventless.isCompositePartitionMember(S.string)).toBe(false);
531
+ globalThis.expect(DcbTag$Reventless.isCompositePartitionMember(Sury.string)).toBe(false);
532
532
  });
533
533
  });
534
534
  globalThis.describe("buildQueryFromCommand", () => {
@@ -1,128 +1,128 @@
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 JestGlobals from "@reventlessdev/rescript-jest/src/JestGlobals.res.mjs";
5
5
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
6
6
  import * as DcbValidation$Reventless from "@reventlessdev/reventless-spec/src/components/DcbValidation.res.mjs";
7
7
 
8
- let producedASchema = S.union([
9
- S.schema(s => ({
8
+ let producedASchema = Sury.union([
9
+ Sury.$schema(s => ({
10
10
  TAG: "ItemCreated",
11
11
  itemId: s.m(DcbTag$Reventless.string),
12
- name: s.m(S.string)
12
+ name: s.m(Sury.string)
13
13
  })),
14
- S.schema(s => ({
14
+ Sury.$schema(s => ({
15
15
  TAG: "ItemRenamed",
16
16
  itemId: s.m(DcbTag$Reventless.string),
17
- newName: s.m(S.string)
17
+ newName: s.m(Sury.string)
18
18
  }))
19
19
  ]);
20
20
 
21
- let producedBSchema = S.schema(s => ({
21
+ let producedBSchema = Sury.$schema(s => ({
22
22
  TAG: "ItemArchived",
23
23
  itemId: s.m(DcbTag$Reventless.string)
24
24
  }));
25
25
 
26
- let producedADuplicateSchema = S.schema(s => ({
26
+ let producedADuplicateSchema = Sury.$schema(s => ({
27
27
  TAG: "ItemCreated",
28
28
  itemId: s.m(DcbTag$Reventless.string),
29
- name: s.m(S.string)
29
+ name: s.m(Sury.string)
30
30
  }));
31
31
 
32
- let producedAMismatchFieldsSchema = S.schema(s => ({
32
+ let producedAMismatchFieldsSchema = Sury.$schema(s => ({
33
33
  TAG: "ItemCreated",
34
34
  itemId: s.m(DcbTag$Reventless.string)
35
35
  }));
36
36
 
37
- let producedAMismatchTagsSchema = S.schema(s => ({
37
+ let producedAMismatchTagsSchema = Sury.$schema(s => ({
38
38
  TAG: "ItemCreated",
39
- itemId: s.m(S.string),
40
- name: s.m(S.string)
39
+ itemId: s.m(Sury.string),
40
+ name: s.m(Sury.string)
41
41
  }));
42
42
 
43
- let producedAMismatchTypeSchema = S.schema(s => ({
43
+ let producedAMismatchTypeSchema = Sury.$schema(s => ({
44
44
  TAG: "ItemCreated",
45
45
  itemId: s.m(DcbTag$Reventless.string),
46
- name: s.m(S.float)
46
+ name: s.m(Sury.float)
47
47
  }));
48
48
 
49
- let consumedFullSchema = S.union([
50
- S.schema(s => ({
49
+ let consumedFullSchema = Sury.union([
50
+ Sury.$schema(s => ({
51
51
  TAG: "ItemCreated",
52
- itemId: s.m(S.string),
53
- name: s.m(S.string)
52
+ itemId: s.m(Sury.string),
53
+ name: s.m(Sury.string)
54
54
  })),
55
- S.schema(s => ({
55
+ Sury.$schema(s => ({
56
56
  TAG: "ItemRenamed",
57
- itemId: s.m(S.string),
58
- newName: s.m(S.string)
57
+ itemId: s.m(Sury.string),
58
+ newName: s.m(Sury.string)
59
59
  }))
60
60
  ]);
61
61
 
62
- let consumedPartialSchema = S.schema(s => ({
62
+ let consumedPartialSchema = Sury.$schema(s => ({
63
63
  TAG: "ItemCreated",
64
- itemId: s.m(S.string)
64
+ itemId: s.m(Sury.string)
65
65
  }));
66
66
 
67
- let consumedPayloadLessSchema = S.union([
68
- S.literal("ItemCreated"),
69
- S.literal("ItemArchived")
67
+ let consumedPayloadLessSchema = Sury.union([
68
+ Sury.literal("ItemCreated"),
69
+ Sury.literal("ItemArchived")
70
70
  ]);
71
71
 
72
- let consumedDanglingSchema = S.schema(s => ({
72
+ let consumedDanglingSchema = Sury.$schema(s => ({
73
73
  TAG: "ItemDeleted",
74
- itemId: s.m(S.string)
74
+ itemId: s.m(Sury.string)
75
75
  }));
76
76
 
77
- let consumedBadFieldSchema = S.schema(s => ({
77
+ let consumedBadFieldSchema = Sury.$schema(s => ({
78
78
  TAG: "ItemCreated",
79
- itemId: s.m(S.string),
80
- rating: s.m(S.float)
79
+ itemId: s.m(Sury.string),
80
+ rating: s.m(Sury.float)
81
81
  }));
82
82
 
83
- let consumedBadTypeSchema = S.schema(s => ({
83
+ let consumedBadTypeSchema = Sury.$schema(s => ({
84
84
  TAG: "ItemCreated",
85
- itemId: s.m(S.string),
86
- name: s.m(S.float)
85
+ itemId: s.m(Sury.string),
86
+ name: s.m(Sury.float)
87
87
  }));
88
88
 
89
- let recordDemandCommandSchema = S.schema(s => ({
89
+ let recordDemandCommandSchema = Sury.$schema(s => ({
90
90
  TAG: "RecordDemand",
91
91
  productId: s.m(DcbTag$Reventless.string),
92
92
  orderId: s.m(DcbTag$Reventless.string)
93
93
  }));
94
94
 
95
- let touchDemandCommandSchema = S.schema(s => ({
95
+ let touchDemandCommandSchema = Sury.$schema(s => ({
96
96
  TAG: "TouchDemand",
97
97
  productId: s.m(DcbTag$Reventless.string)
98
98
  }));
99
99
 
100
- let placeOrderCommandSchema = S.schema(s => ({
100
+ let placeOrderCommandSchema = Sury.$schema(s => ({
101
101
  TAG: "PlaceOrder",
102
102
  orderId: s.m(DcbTag$Reventless.string),
103
- productIds: s.m(S.array(DcbTag$Reventless.stringForKey("productId")))
103
+ productIds: s.m(Sury.array(DcbTag$Reventless.stringForKey("productId")))
104
104
  }));
105
105
 
106
- let demandConsumedSchema = S.union([
107
- S.schema(s => ({
106
+ let demandConsumedSchema = Sury.union([
107
+ Sury.$schema(s => ({
108
108
  TAG: "ProductDemandRecorded",
109
- productId: s.m(S.string),
110
- orderId: s.m(S.string)
109
+ productId: s.m(Sury.string),
110
+ orderId: s.m(Sury.string)
111
111
  })),
112
- S.schema(s => ({
112
+ Sury.$schema(s => ({
113
113
  TAG: "ProductDemandRevoked",
114
- productId: s.m(S.string),
115
- orderId: s.m(S.string)
114
+ productId: s.m(Sury.string),
115
+ orderId: s.m(Sury.string)
116
116
  }))
117
117
  ]);
118
118
 
119
- let demandProducedSchema = S.union([
120
- S.schema(s => ({
119
+ let demandProducedSchema = Sury.union([
120
+ Sury.$schema(s => ({
121
121
  TAG: "ProductDemandRecorded",
122
122
  productId: s.m(DcbTag$Reventless.string),
123
123
  orderId: s.m(DcbTag$Reventless.string)
124
124
  })),
125
- S.schema(s => ({
125
+ Sury.$schema(s => ({
126
126
  TAG: "ProductDemandRevoked",
127
127
  productId: s.m(DcbTag$Reventless.string),
128
128
  orderId: s.m(DcbTag$Reventless.string),
@@ -136,19 +136,19 @@ function u(prim) {
136
136
 
137
137
  let producedTagKeys = DcbTag$Reventless.extractTagKeysByEventType(demandProducedSchema);
138
138
 
139
- let subscribedCrossPartitionSchema = S.schema(s => ({
139
+ let subscribedCrossPartitionSchema = Sury.$schema(s => ({
140
140
  TAG: "StudentSubscribed",
141
141
  courseId: s.m(DcbTag$Reventless.partition),
142
142
  studentId: s.m(DcbTag$Reventless.crossPartition)
143
143
  }));
144
144
 
145
- let unsubscribedCrossPartitionSchema = S.schema(s => ({
145
+ let unsubscribedCrossPartitionSchema = Sury.$schema(s => ({
146
146
  TAG: "StudentUnsubscribed",
147
147
  courseId: s.m(DcbTag$Reventless.partition),
148
148
  studentId: s.m(DcbTag$Reventless.crossPartition)
149
149
  }));
150
150
 
151
- let flaggedPartitionScopedSchema = S.schema(s => ({
151
+ let flaggedPartitionScopedSchema = Sury.$schema(s => ({
152
152
  TAG: "StudentFlagged",
153
153
  studentId: s.m(DcbTag$Reventless.partition),
154
154
  courseId: s.m(DcbTag$Reventless.string)
@@ -1,4 +1,3 @@
1
- S.enableJson()
2
1
 
3
2
  // ─────────────────────────────────────────────────────────────
4
3
  // Test event spec
@@ -1,21 +1,19 @@
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 Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
6
  import * as Effect from "effect/Effect";
7
7
  import * as Stream from "effect/Stream";
8
8
 
9
- S.enableJson();
10
-
11
- let eventSchema = S.union([
12
- S.schema(s => ({
9
+ let eventSchema = Sury.union([
10
+ Sury.$schema(s => ({
13
11
  TAG: "ItemCreated",
14
- name: s.m(S.string)
12
+ name: s.m(Sury.string)
15
13
  })),
16
- S.schema(s => ({
14
+ Sury.$schema(s => ({
17
15
  TAG: "ItemDeleted",
18
- id: s.m(S.string)
16
+ id: s.m(Sury.string)
19
17
  }))
20
18
  ]);
21
19
 
@@ -193,4 +191,4 @@ export {
193
191
  makeEvent$p,
194
192
  reset,
195
193
  }
196
- /* Not a pure module */
194
+ /* eventSchema Not a pure module */
@@ -1,6 +1,5 @@
1
1
  open Reventless.Projection
2
2
 
3
- S.enableJson()
4
3
 
5
4
  // ─────────────────────────────────────────────────────────────
6
5
  // Source event spec (aggregate events)