@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.
- package/CHANGELOG.md +23 -0
- package/package.json +6 -6
- package/src/Message.res +1 -1
- package/src/adapter/Monitoring/Monitoring.res +1 -1
- package/src/admin/Platform_Admin_Structure.res +5 -1
- package/src/admin/Platform_Admin_Structure.res.mjs +4 -2
- package/src/admin/Platform_ComponentDefinitionsApi.res +4 -2
- package/src/admin/Platform_ComponentDefinitionsApi.res.mjs +11 -3
- package/src/admin/UiFragmentRegistry/StateChangeSlice/UiFragmentRegistry.res +1 -1
- package/src/components/Aggregate/Aggregate_Callback.res +2 -2
- package/src/components/Api/ApiAllowedStatesHelpers.res +2 -3
- package/src/components/Api/ApiTargetStateHelpers.res +4 -3
- package/src/components/Api/GraphQL_FragmentGenerator.res +14 -1
- package/src/components/Api/GraphQL_FragmentGenerator.res.mjs +1 -1
- package/src/components/Api/QueryDbListQuery.res +25 -1
- package/src/components/Api/QueryDbListQuery.res.mjs +11 -4
- package/src/components/Api/SuryToJsonSchema.res +39 -0
- package/src/components/Api/SuryToJsonSchema.res.mjs +34 -3
- package/src/components/Dcb/Dcb_Builder.res +79 -16
- package/src/components/Dcb/Dcb_Builder.res.mjs +41 -5
- package/src/components/EventLog/EventLog.res +1 -1
- package/src/plugin/component/Plugin_Structure.res +377 -18
- package/src/plugin/component/Plugin_Structure.res.mjs +204 -9
- package/src/plugin/connect/PluginExtensionPoint_UiFragment.res +1 -1
- package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +3 -2
- package/tests/admin/Platform_Admin_StructureTest.res +49 -0
- package/tests/admin/Platform_Admin_StructureTest.res.mjs +24 -0
- package/tests/admin/Platform_BakedManifestTest.res +3 -1
- package/tests/admin/Platform_BakedManifestTest.res.mjs +3 -1
- package/tests/admin/Platform_ComponentDefinitionsApiTest.res +14 -8
- package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +24 -12
- package/tests/admin/Platform_PluginStructuresApiTest.res +3 -1
- package/tests/admin/Platform_PluginStructuresApiTest.res.mjs +6 -2
- package/tests/aggregate/AggregateCacheTest.res +1 -1
- package/tests/aggregate/AggregateSnapshotTest.res +1 -1
- package/tests/api/Api_IdsTest.res.mjs +1 -1
- package/tests/api/SuryToJsonSchemaTest.res +141 -1
- package/tests/api/SuryToJsonSchemaTest.res.mjs +269 -54
- package/tests/commandgenerator/OwnerStampingTest.res +57 -0
- package/tests/commandgenerator/OwnerStampingTest.res.mjs +19 -0
- package/tests/message/MessageTest.res +1 -1
- package/tests/plugin/HeartbeatDisconnectGraceTest.res +1 -1
- package/tests/plugin/PluginStructureTest.res +332 -15
- package/tests/plugin/PluginStructureTest.res.mjs +316 -10
- package/tests/plugin/StateChangeSlice/PsDispatchShipment.res +31 -0
- package/tests/plugin/StateChangeSlice/PsDispatchShipment.res.mjs +73 -0
- package/tests/plugin/StateChangeSlice/PsShipOrder.res +16 -1
- package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +7 -2
- package/tests/plugin/StateViewSlice/PsAnnotatedView.res.mjs +3 -2
- package/tests/plugin/StateViewSlice/PsShipmentsView.res +26 -0
- package/tests/plugin/StateViewSlice/PsShipmentsView.res.mjs +101 -0
- package/tests/plugin/pluginDefinitionRequiredScalars.txt +2 -0
- 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
|