@reventlessdev/reventless-core 3.0.0-alpha.236 → 3.0.0-alpha.238

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 (53) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/package.json +6 -6
  3. package/src/Message.res +1 -1
  4. package/src/adapter/Monitoring/Monitoring.res +1 -1
  5. package/src/admin/Platform_Admin_Structure.res +5 -1
  6. package/src/admin/Platform_Admin_Structure.res.mjs +4 -2
  7. package/src/admin/Platform_ComponentDefinitionsApi.res +4 -2
  8. package/src/admin/Platform_ComponentDefinitionsApi.res.mjs +11 -3
  9. package/src/admin/UiFragmentRegistry/StateChangeSlice/UiFragmentRegistry.res +1 -1
  10. package/src/components/Aggregate/Aggregate_Callback.res +2 -2
  11. package/src/components/Api/ApiAllowedStatesHelpers.res +2 -3
  12. package/src/components/Api/ApiTargetStateHelpers.res +4 -3
  13. package/src/components/Api/GraphQL_FragmentGenerator.res +14 -1
  14. package/src/components/Api/GraphQL_FragmentGenerator.res.mjs +1 -1
  15. package/src/components/Api/QueryDbListQuery.res +25 -1
  16. package/src/components/Api/QueryDbListQuery.res.mjs +11 -4
  17. package/src/components/Api/SuryToJsonSchema.res +39 -0
  18. package/src/components/Api/SuryToJsonSchema.res.mjs +34 -3
  19. package/src/components/Dcb/Dcb_Builder.res +79 -16
  20. package/src/components/Dcb/Dcb_Builder.res.mjs +41 -5
  21. package/src/components/EventLog/EventLog.res +1 -1
  22. package/src/plugin/component/Plugin_Structure.res +377 -18
  23. package/src/plugin/component/Plugin_Structure.res.mjs +204 -9
  24. package/src/plugin/connect/PluginExtensionPoint_UiFragment.res +1 -1
  25. package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +3 -2
  26. package/tests/admin/Platform_Admin_StructureTest.res +49 -0
  27. package/tests/admin/Platform_Admin_StructureTest.res.mjs +24 -0
  28. package/tests/admin/Platform_BakedManifestTest.res +3 -1
  29. package/tests/admin/Platform_BakedManifestTest.res.mjs +3 -1
  30. package/tests/admin/Platform_ComponentDefinitionsApiTest.res +14 -8
  31. package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +24 -12
  32. package/tests/admin/Platform_PluginStructuresApiTest.res +3 -1
  33. package/tests/admin/Platform_PluginStructuresApiTest.res.mjs +6 -2
  34. package/tests/aggregate/AggregateCacheTest.res +1 -1
  35. package/tests/aggregate/AggregateSnapshotTest.res +1 -1
  36. package/tests/api/Api_IdsTest.res.mjs +1 -1
  37. package/tests/api/SuryToJsonSchemaTest.res +141 -1
  38. package/tests/api/SuryToJsonSchemaTest.res.mjs +269 -54
  39. package/tests/commandgenerator/OwnerStampingTest.res +57 -0
  40. package/tests/commandgenerator/OwnerStampingTest.res.mjs +19 -0
  41. package/tests/message/MessageTest.res +1 -1
  42. package/tests/plugin/HeartbeatDisconnectGraceTest.res +1 -1
  43. package/tests/plugin/PluginStructureTest.res +332 -15
  44. package/tests/plugin/PluginStructureTest.res.mjs +316 -10
  45. package/tests/plugin/StateChangeSlice/PsDispatchShipment.res +31 -0
  46. package/tests/plugin/StateChangeSlice/PsDispatchShipment.res.mjs +73 -0
  47. package/tests/plugin/StateChangeSlice/PsShipOrder.res +16 -1
  48. package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +7 -2
  49. package/tests/plugin/StateViewSlice/PsAnnotatedView.res.mjs +3 -2
  50. package/tests/plugin/StateViewSlice/PsShipmentsView.res +26 -0
  51. package/tests/plugin/StateViewSlice/PsShipmentsView.res.mjs +101 -0
  52. package/tests/plugin/pluginDefinitionRequiredScalars.txt +2 -0
  53. package/tests/util/CsvStreamTest.res +1 -1
@@ -0,0 +1,101 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as S from "sury/src/S.res.mjs";
4
+ import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
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
+
8
+ let consumedEventSchema = S.union([
9
+ S.schema(s => ({
10
+ TAG: "ShipmentBooked",
11
+ shipmentId: s.m(DcbTag$Reventless.string)
12
+ })),
13
+ S.schema(s => ({
14
+ TAG: "ShipmentDispatched",
15
+ shipmentId: s.m(DcbTag$Reventless.string)
16
+ }))
17
+ ]);
18
+
19
+ let shipmentStatusSchema = S.union([
20
+ S.literal("Booked"),
21
+ S.literal("Dispatched")
22
+ ]);
23
+
24
+ let stateSchema = S.schema(s => ({
25
+ shipmentId: s.m(S.string),
26
+ shipmentStatus: s.m(shipmentStatusSchema)
27
+ }));
28
+
29
+ function project(param) {
30
+ let event = param.event;
31
+ if (event.TAG !== "ShipmentBooked") {
32
+ return [{
33
+ TAG: "Update",
34
+ _0: event.shipmentId,
35
+ _1: s => ({
36
+ shipmentId: s.shipmentId,
37
+ shipmentStatus: "Dispatched"
38
+ })
39
+ }];
40
+ }
41
+ let shipmentId = event.shipmentId;
42
+ return [{
43
+ TAG: "Set",
44
+ _0: shipmentId,
45
+ _1: {
46
+ shipmentId: shipmentId,
47
+ shipmentStatus: "Booked"
48
+ }
49
+ }];
50
+ }
51
+
52
+ let config = ReadModel$Reventless.config(undefined, undefined, undefined);
53
+
54
+ let stateSchema$1 = S.Metadata.set(stateSchema, StateAnnotations$Reventless.stateAnnotationsId, {
55
+ ids: [],
56
+ compositeIds: [],
57
+ subIds: [],
58
+ compositeSubIds: [],
59
+ indexes: [],
60
+ hidden: [],
61
+ summary: [],
62
+ drillTargets: [],
63
+ drillTargetKeys: [],
64
+ collapsed: [],
65
+ scan: [],
66
+ scanSort: [],
67
+ semantic: [],
68
+ metric: [],
69
+ lifecycle: "shipmentStatus",
70
+ groupBy: undefined,
71
+ visibility: undefined,
72
+ live: undefined,
73
+ retired: undefined
74
+ });
75
+
76
+ let name = "Shipments";
77
+
78
+ let Id;
79
+
80
+ let subIdConfig;
81
+
82
+ let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateViewSlice/PsShipmentsView.res.mjs";
83
+
84
+ let authorization = "AllowAuthenticated";
85
+
86
+ let visibility = "Public";
87
+
88
+ export {
89
+ name,
90
+ Id,
91
+ consumedEventSchema,
92
+ shipmentStatusSchema,
93
+ project,
94
+ config,
95
+ subIdConfig,
96
+ stateSchema$1 as stateSchema,
97
+ moduleUrl,
98
+ authorization,
99
+ visibility,
100
+ }
101
+ /* consumedEventSchema Not a pure module */
@@ -79,6 +79,7 @@
79
79
  .structure.readModels[].name: string
80
80
  .structure.readModels[].queryField: string
81
81
  .structure.readModels[].requiredAccess[]: string
82
+ .structure.readModels[].retiredValues[]: string
82
83
  .structure.readModels[].schema: string
83
84
  .structure.readModels[].searchableFields[]: string
84
85
  .structure.requiredStoreDeclarations[].component: string
@@ -110,6 +111,7 @@
110
111
  .structure.stateViewSlices[].name: string
111
112
  .structure.stateViewSlices[].queryField: string
112
113
  .structure.stateViewSlices[].requiredAccess[]: string
114
+ .structure.stateViewSlices[].retiredValues[]: string
113
115
  .structure.stateViewSlices[].schema: string
114
116
  .structure.stateViewSlices[].searchableFields[]: string
115
117
  .version: string
@@ -1,6 +1,6 @@
1
1
  // CsvStreamTest.res
2
2
  // Tests for CsvStream.parseRows — Effect Stream bridge for FastCSV.
3
- // See docs/plans/effect-stream-integration.md Phase E.
3
+ // See docs/plans/done/effect-stream-integration.md Phase E.
4
4
 
5
5
  open JestGlobals
6
6