@reventlessdev/reventless-core 3.0.0-alpha.307 → 3.0.0-alpha.309

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 (74) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/package.json +7 -7
  3. package/src/Projection.res +4 -4
  4. package/src/Projection.res.mjs +11 -9
  5. package/src/ResourceAttribution.res +3 -3
  6. package/src/ResourceAttribution.res.mjs +1 -4
  7. package/src/adapter/Auth/Auth_ActiveRole.res +13 -18
  8. package/src/adapter/Auth/Auth_ActiveRole.res.mjs +4 -9
  9. package/src/adapter/EventLogProvisioning/EventLogProvisioning.res +1 -1
  10. package/src/adapter/Monitoring/Monitoring.res +5 -5
  11. package/src/adapter/Stash/Stash_Memory_Backend.res +35 -0
  12. package/src/adapter/Stash/Stash_Memory_Backend.res.mjs +44 -0
  13. package/src/adapter/Throttle/AnonymousLimiter.res +37 -0
  14. package/src/adapter/Throttle/AnonymousLimiter.res.mjs +43 -0
  15. package/src/admin/Platform_Admin.res +2 -2
  16. package/src/admin/Platform_Admin_Structure.res +0 -9
  17. package/src/admin/Platform_Admin_Structure.res.mjs +3 -12
  18. package/src/admin/Platform_BakedManifest.res +6 -6
  19. package/src/admin/Platform_BakedManifest.res.mjs +11 -26
  20. package/src/admin/Platform_PluginStructuresApi.res +36 -2
  21. package/src/admin/Platform_PluginStructuresApi.res.mjs +43 -1
  22. package/src/admin/Platform_SelfRegistration.res +79 -0
  23. package/src/admin/Platform_SelfRegistration.res.mjs +95 -0
  24. package/src/components/Api/GraphQL_SchemaInspector.res +3 -3
  25. package/src/components/Api/SuryToJsonSchema.res +3 -3
  26. package/src/components/Dcb/Dcb_Builder.res +6 -9
  27. package/src/components/Dcb/Dcb_Builder.res.mjs +0 -3
  28. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Builder.res +14 -1
  29. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Builder.res.mjs +3 -3
  30. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res +73 -8
  31. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res.mjs +60 -12
  32. package/src/plugin/component/Plugin.res +2 -0
  33. package/src/plugin/component/Plugin_Builder.res +9 -8
  34. package/src/plugin/component/Plugin_Builder.res.mjs +6 -10
  35. package/src/plugin/component/Plugin_Helpers.res +4 -4
  36. package/src/plugin/component/Plugin_Structure.res +179 -115
  37. package/src/plugin/component/Plugin_Structure.res.mjs +83 -17
  38. package/src/plugin/lifecycle/PluginsProjection.res +10 -6
  39. package/src/plugin/lifecycle/PluginsReadModelSpec.res +8 -8
  40. package/src/util/FTPHandler.res +3 -3
  41. package/src/util/ScheduleTime.res +5 -8
  42. package/src/util/ScheduleTime.res.mjs +0 -3
  43. package/src/util/Util_Promise.res +1 -1
  44. package/tests/AnonymousLimiterTest.res +66 -0
  45. package/tests/AnonymousLimiterTest.res.mjs +89 -0
  46. package/tests/ResourceAttributionTest.res +1 -1
  47. package/tests/ResourceAttributionTest.res.mjs +1 -4
  48. package/tests/Stash_Memory_BackendTest.res +63 -0
  49. package/tests/Stash_Memory_BackendTest.res.mjs +98 -0
  50. package/tests/admin/AdminApiSchemaDriftTest.res +72 -44
  51. package/tests/admin/AdminApiSchemaDriftTest.res.mjs +41 -3
  52. package/tests/admin/Platform_Admin_StructureTest.res +1 -1
  53. package/tests/admin/Platform_Admin_StructureTest.res.mjs +4 -22
  54. package/tests/admin/Platform_BakedManifestTest.res +11 -29
  55. package/tests/admin/Platform_BakedManifestTest.res.mjs +8 -39
  56. package/tests/admin/Platform_ComponentDefinitionsApiTest.res +24 -84
  57. package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +36 -169
  58. package/tests/admin/Platform_PluginStructuresApiTest.res +46 -31
  59. package/tests/admin/Platform_PluginStructuresApiTest.res.mjs +37 -34
  60. package/tests/admin/Platform_SelfRegistrationTest.res +91 -0
  61. package/tests/admin/Platform_SelfRegistrationTest.res.mjs +112 -0
  62. package/tests/admin/Platform_UIFragmentsApiTest.res +1 -4
  63. package/tests/admin/Platform_UIFragmentsApiTest.res.mjs +1 -4
  64. package/tests/api/GeocodingTest.res +1 -1
  65. package/tests/logger/LogFormatTest.res +0 -2
  66. package/tests/logger/LogFormatTest.res.mjs +0 -2
  67. package/tests/message/MessageTest.res +0 -13
  68. package/tests/message/MessageTest.res.mjs +2 -15
  69. package/tests/plugin/ManifestVisibilityTest.res.mjs +1 -1
  70. package/tests/plugin/PluginStructureAccessTest.res +6 -1
  71. package/tests/plugin/PluginStructureAccessTest.res.mjs +9 -5
  72. package/tests/plugin/PluginStructureTest.res +99 -23
  73. package/tests/plugin/PluginStructureTest.res.mjs +123 -79
  74. package/tests/plugin/pluginDefinitionRequiredScalars.txt +10 -0
@@ -15,18 +15,11 @@ let publicRm: readSideDef = {
15
15
  linkedWriteSide: ["Product"],
16
16
  labelField: "displayName",
17
17
  searchableFields: ["displayName"],
18
- labelFieldSource: Some("annotation"),
19
- lifecycleField: None,
20
- visibility: None,
21
- chapter: Some("Inventory"),
22
- singleQueryField: Some("Catalog_Product"),
23
- idField: Some("productId"),
24
- idFieldSource: Some("convention"),
25
- requiredAccess: None,
26
- ownerField: None,
27
- retiredField: None,
28
- retiredValues: None,
29
- namedWhenRetired: None,
18
+ labelFieldSource: "annotation",
19
+ chapter: "Inventory",
20
+ singleQueryField: "Catalog_Product",
21
+ idField: "productId",
22
+ idFieldSource: "convention",
30
23
  }
31
24
 
32
25
  // The component `Platform_ComponentDefinitions` drops and this query must keep.
@@ -34,7 +27,7 @@ let internalRm: readSideDef = {
34
27
  ...publicRm,
35
28
  name: "ProductAudit",
36
29
  queryField: "Catalog_ProductAudit",
37
- visibility: Some("Internal"),
30
+ visibility: "Internal",
38
31
  }
39
32
 
40
33
  let structure: pluginStructure = {
@@ -46,29 +39,32 @@ let structure: pluginStructure = {
46
39
  outboundTranslationSlices: [],
47
40
  inboundTranslationSlices: [],
48
41
  extensions: [],
49
- extensionPoints: Some([
42
+ extensionPoints: [
50
43
  {
51
44
  name: "Catalog.Products",
52
45
  delegateNames: ["onAdded"],
53
46
  sourceEventTypes: ["Catalog.ProductAdded"],
54
- commandTypes: None,
55
- publishedEvents: Some([
47
+ publishedEvents: [
56
48
  {
57
49
  name: "Catalog.Products.ProductBecameAvailable",
58
50
  fromEventTypes: ["Catalog.ProductAdded"],
59
51
  },
60
- ]),
61
- acceptedCommands: Some([
52
+ ],
53
+ acceptedCommands: [
62
54
  {name: "Catalog.Products.Reserve", toCommandTypes: ["Catalog.ReserveStock"]},
63
- ]),
55
+ ],
64
56
  },
65
- ]),
66
- requiredStores: Some(["Catalog.images"]),
67
- requiredStoreDeclarations: Some([
68
- {store: "Catalog.images", component: "Product", field: "image", annotation: Some("images")},
69
- ]),
70
- requiredCapabilities: Some([{capability: "Geocoding", component: "GeocodeAddress"}]),
71
- traitDeclarations: None,
57
+ ],
58
+ requiredStores: ["Catalog.images"],
59
+ requiredStoreDeclarations: [
60
+ {store: "Catalog.images", component: "Product", field: "image", annotation: "images"},
61
+ ],
62
+ requiredCapabilities: [{capability: "Geocoding", component: "GeocodeAddress"}],
63
+ admission: [
64
+ {role: "Shopper", strategy: "SelfService"},
65
+ {role: "Clerk", strategy: "Invitation", invitedBy: ["Admin"]},
66
+ ],
67
+ admissionDoors: [{component: "SignUp", part: "start"}],
72
68
  }
73
69
 
74
70
  let encoded = Platform_PluginStructuresApi.encodePluginStructureEntry(
@@ -95,6 +91,8 @@ describe("Platform_PluginStructures entry", () => {
95
91
  let dict = encoded->JSON.Decode.object->Option.getOr(Dict.make())
96
92
  let keys = dict->Dict.keysToArray->Array.toSorted(String.compare)
97
93
  expect(keys)->toEqual([
94
+ "admission",
95
+ "admissionDoors",
98
96
  "aggregates",
99
97
  "automationSlices",
100
98
  "extensionPoints",
@@ -158,6 +156,17 @@ describe("Platform_PluginStructures entry", () => {
158
156
  ),
159
157
  )->toEqual(true)
160
158
  )
159
+
160
+ // `invitedBy` is null rather than absent where the strategy names no inviter, so a
161
+ // reader selecting it gets an answer for every row.
162
+ testSync("encodes admission per role, and the doors with their part", () =>
163
+ expect(
164
+ json->String.includes(
165
+ "\"admission\":[{\"role\":\"Shopper\",\"strategy\":\"SelfService\",\"invitedBy\":null}," ++
166
+ "{\"role\":\"Clerk\",\"strategy\":\"Invitation\",\"invitedBy\":[\"Admin\"]}]," ++ "\"admissionDoors\":[{\"component\":\"SignUp\",\"part\":\"start\"}]",
167
+ ),
168
+ )->toEqual(true)
169
+ )
161
170
  })
162
171
 
163
172
  // A structure persisted before these fields existed decodes as None, and null is the
@@ -166,11 +175,13 @@ describe("Platform_PluginStructures entry", () => {
166
175
  describe("absent optional collections", () => {
167
176
  let bare: pluginStructure = {
168
177
  ...structure,
169
- extensionPoints: None,
170
- requiredStores: None,
171
- requiredStoreDeclarations: None,
172
- requiredCapabilities: None,
173
- traitDeclarations: None,
178
+ extensionPoints: ?None,
179
+ requiredStores: ?None,
180
+ requiredStoreDeclarations: ?None,
181
+ requiredCapabilities: ?None,
182
+ traitDeclarations: ?None,
183
+ admission: ?None,
184
+ admissionDoors: ?None,
174
185
  }
175
186
  let bareJson =
176
187
  Platform_PluginStructuresApi.encodePluginStructureEntry(
@@ -182,6 +193,10 @@ describe("absent optional collections", () => {
182
193
  expect(bareJson->String.includes("\"extensionPoints\":null"))->toEqual(true)
183
194
  )
184
195
 
196
+ testSync("encodes absent admission and admissionDoors as null", () =>
197
+ expect(bareJson->String.includes("\"admission\":null,\"admissionDoors\":null"))->toEqual(true)
198
+ )
199
+
185
200
  testSync("encodes absent requiredStores as null", () =>
186
201
  expect(bareJson->String.includes("\"requiredStores\":null"))->toEqual(true)
187
202
  )
@@ -34,17 +34,10 @@ let publicRm = {
34
34
  labelField: "displayName",
35
35
  searchableFields: publicRm_searchableFields,
36
36
  labelFieldSource: publicRm_labelFieldSource,
37
- lifecycleField: undefined,
38
- ownerField: undefined,
39
- retiredField: undefined,
40
- retiredValues: undefined,
41
- namedWhenRetired: undefined,
42
- visibility: undefined,
43
37
  chapter: publicRm_chapter,
44
38
  singleQueryField: publicRm_singleQueryField,
45
39
  idField: publicRm_idField,
46
- idFieldSource: publicRm_idFieldSource,
47
- requiredAccess: undefined
40
+ idFieldSource: publicRm_idFieldSource
48
41
  };
49
42
 
50
43
  let newrecord = {...publicRm};
@@ -78,7 +71,6 @@ let structure_extensionPoints = [{
78
71
  name: "Catalog.Products",
79
72
  delegateNames: ["onAdded"],
80
73
  sourceEventTypes: ["Catalog.ProductAdded"],
81
- commandTypes: undefined,
82
74
  publishedEvents: [{
83
75
  name: "Catalog.Products.ProductBecameAvailable",
84
76
  fromEventTypes: ["Catalog.ProductAdded"]
@@ -103,6 +95,23 @@ let structure_requiredCapabilities = [{
103
95
  component: "GeocodeAddress"
104
96
  }];
105
97
 
98
+ let structure_admission = [
99
+ {
100
+ role: "Shopper",
101
+ strategy: "SelfService"
102
+ },
103
+ {
104
+ role: "Clerk",
105
+ strategy: "Invitation",
106
+ invitedBy: ["Admin"]
107
+ }
108
+ ];
109
+
110
+ let structure_admissionDoors = [{
111
+ component: "SignUp",
112
+ part: "start"
113
+ }];
114
+
106
115
  let structure = {
107
116
  readModels: structure_readModels,
108
117
  stateViewSlices: structure_stateViewSlices,
@@ -116,7 +125,8 @@ let structure = {
116
125
  requiredStores: structure_requiredStores,
117
126
  requiredStoreDeclarations: structure_requiredStoreDeclarations,
118
127
  requiredCapabilities: structure_requiredCapabilities,
119
- traitDeclarations: undefined
128
+ admission: structure_admission,
129
+ admissionDoors: structure_admissionDoors
120
130
  };
121
131
 
122
132
  let encoded = Platform_PluginStructuresApi$ReventlessCore.encodePluginStructureEntry("Catalog", structure);
@@ -132,6 +142,8 @@ globalThis.describe("Platform_PluginStructures entry", () => {
132
142
  let dict = Stdlib_Option.getOr(Stdlib_JSON.Decode.object(encoded), {});
133
143
  let keys = Object.keys(dict).toSorted(Primitive_string.compare);
134
144
  globalThis.expect(keys).toEqual([
145
+ "admission",
146
+ "admissionDoors",
135
147
  "aggregates",
136
148
  "automationSlices",
137
149
  "extensionPoints",
@@ -175,36 +187,27 @@ globalThis.describe("Platform_PluginStructures entry", () => {
175
187
  globalThis.test("encodes required capabilities with their declaring component", () => {
176
188
  globalThis.expect(json.includes("\"requiredCapabilities\":[{\"capability\":\"Geocoding\",\"component\":\"GeocodeAddress\"}]")).toEqual(true);
177
189
  });
190
+ globalThis.test("encodes admission per role, and the doors with their part", () => {
191
+ globalThis.expect(json.includes("\"admission\":[{\"role\":\"Shopper\",\"strategy\":\"SelfService\",\"invitedBy\":null},{\"role\":\"Clerk\",\"strategy\":\"Invitation\",\"invitedBy\":[\"Admin\"]}],\"admissionDoors\":[{\"component\":\"SignUp\",\"part\":\"start\"}]")).toEqual(true);
192
+ });
178
193
  });
179
194
 
180
195
  globalThis.describe("absent optional collections", () => {
181
- let bare_readModels = structure_readModels;
182
- let bare_stateViewSlices = structure_stateViewSlices;
183
- let bare_stateChangeSlices = structure_stateChangeSlices;
184
- let bare_aggregates = structure_aggregates;
185
- let bare_automationSlices = structure_automationSlices;
186
- let bare_outboundTranslationSlices = structure_outboundTranslationSlices;
187
- let bare_inboundTranslationSlices = structure_inboundTranslationSlices;
188
- let bare_extensions = structure_extensions;
189
- let bare = {
190
- readModels: bare_readModels,
191
- stateViewSlices: bare_stateViewSlices,
192
- stateChangeSlices: bare_stateChangeSlices,
193
- aggregates: bare_aggregates,
194
- automationSlices: bare_automationSlices,
195
- outboundTranslationSlices: bare_outboundTranslationSlices,
196
- inboundTranslationSlices: bare_inboundTranslationSlices,
197
- extensions: bare_extensions,
198
- extensionPoints: undefined,
199
- requiredStores: undefined,
200
- requiredStoreDeclarations: undefined,
201
- requiredCapabilities: undefined,
202
- traitDeclarations: undefined
203
- };
204
- let bareJson = JSON.stringify(Platform_PluginStructuresApi$ReventlessCore.encodePluginStructureEntry("Catalog", bare));
196
+ let newrecord = {...structure};
197
+ newrecord.admissionDoors = undefined;
198
+ newrecord.admission = undefined;
199
+ newrecord.traitDeclarations = undefined;
200
+ newrecord.requiredCapabilities = undefined;
201
+ newrecord.requiredStoreDeclarations = undefined;
202
+ newrecord.requiredStores = undefined;
203
+ newrecord.extensionPoints = undefined;
204
+ let bareJson = JSON.stringify(Platform_PluginStructuresApi$ReventlessCore.encodePluginStructureEntry("Catalog", newrecord));
205
205
  globalThis.test("encodes absent extensionPoints as null", () => {
206
206
  globalThis.expect(bareJson.includes("\"extensionPoints\":null")).toEqual(true);
207
207
  });
208
+ globalThis.test("encodes absent admission and admissionDoors as null", () => {
209
+ globalThis.expect(bareJson.includes("\"admission\":null,\"admissionDoors\":null")).toEqual(true);
210
+ });
208
211
  globalThis.test("encodes absent requiredStores as null", () => {
209
212
  globalThis.expect(bareJson.includes("\"requiredStores\":null")).toEqual(true);
210
213
  });
@@ -0,0 +1,91 @@
1
+ open JestGlobals
2
+
3
+ // The shell's self-registration key, read off the plugin structures: the two
4
+ // doors by their mutation names and the groups a visitor may sign up for.
5
+
6
+ let empty: Reventless.Plugin.pluginStructure = {
7
+ readModels: [],
8
+ stateViewSlices: [],
9
+ stateChangeSlices: [],
10
+ aggregates: [],
11
+ automationSlices: [],
12
+ outboundTranslationSlices: [],
13
+ inboundTranslationSlices: [],
14
+ extensions: [],
15
+ }
16
+
17
+ let registration: Reventless.Plugin.pluginStructure = {
18
+ ...empty,
19
+ admission: [
20
+ {Reventless.Admission.role: "Shopper", strategy: "SelfService"},
21
+ {Reventless.Admission.role: "Admin", strategy: "Provisioned"},
22
+ ],
23
+ admissionDoors: [
24
+ {Reventless.Admission.component: "SignUp", part: "start"},
25
+ {Reventless.Admission.component: "CompleteRegistration", part: "complete"},
26
+ {Reventless.Admission.component: "RegistrationWindows", part: "openRoles"},
27
+ ],
28
+ }
29
+
30
+ describe("Platform_SelfRegistration", () => {
31
+ testSync(
32
+ "names the two doors by their mutation fields, the self-service groups, and the open-roles query",
33
+ () =>
34
+ expect(
35
+ Platform_SelfRegistration.fromStructures([
36
+ ("Catalog", empty),
37
+ ("Registration", registration),
38
+ ]),
39
+ )->toEqual(
40
+ Some({
41
+ Platform_SelfRegistration.start: "Registration_SignUp",
42
+ complete: "Registration_CompleteRegistration",
43
+ roles: ["Shopper"],
44
+ openRoles: "Registration_RegistrationWindows",
45
+ }),
46
+ ),
47
+ )
48
+
49
+ testSync("the open-roles query is left out where no view is marked", () =>
50
+ expect(
51
+ Platform_SelfRegistration.fromStructures([
52
+ (
53
+ "Registration",
54
+ {
55
+ ...registration,
56
+ admissionDoors: registration.admissionDoors
57
+ ->Option.getOr([])
58
+ ->Array.filter(d => d.part != "openRoles"),
59
+ },
60
+ ),
61
+ ])->Option.flatMap(c => c.openRoles),
62
+ )->toEqual(None)
63
+ )
64
+
65
+ testSync("absent without both doors", () =>
66
+ expect(
67
+ Platform_SelfRegistration.fromStructures([
68
+ (
69
+ "Registration",
70
+ {
71
+ ...registration,
72
+ admissionDoors: [{Reventless.Admission.component: "SignUp", part: "start"}],
73
+ },
74
+ ),
75
+ ]),
76
+ )->toEqual(None)
77
+ )
78
+
79
+ testSync("writes the key the shell reads", () =>
80
+ expect(
81
+ Platform_SelfRegistration.configEntry({
82
+ start: "Registration_SignUp",
83
+ complete: "Registration_CompleteRegistration",
84
+ roles: ["Shopper"],
85
+ openRoles: "Registration_RegistrationWindows",
86
+ })
87
+ ->Pair.second
88
+ ->JSON.stringify,
89
+ )->toEqual(`{"start":"Registration_SignUp","complete":"Registration_CompleteRegistration","roles":["Shopper"],"openRoles":"Registration_RegistrationWindows"}`)
90
+ )
91
+ })
@@ -0,0 +1,112 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
4
+ import * as Platform_SelfRegistration$ReventlessCore from "../../src/admin/Platform_SelfRegistration.res.mjs";
5
+
6
+ let empty_readModels = [];
7
+
8
+ let empty_stateViewSlices = [];
9
+
10
+ let empty_stateChangeSlices = [];
11
+
12
+ let empty_aggregates = [];
13
+
14
+ let empty_automationSlices = [];
15
+
16
+ let empty_outboundTranslationSlices = [];
17
+
18
+ let empty_inboundTranslationSlices = [];
19
+
20
+ let empty_extensions = [];
21
+
22
+ let empty = {
23
+ readModels: empty_readModels,
24
+ stateViewSlices: empty_stateViewSlices,
25
+ stateChangeSlices: empty_stateChangeSlices,
26
+ aggregates: empty_aggregates,
27
+ automationSlices: empty_automationSlices,
28
+ outboundTranslationSlices: empty_outboundTranslationSlices,
29
+ inboundTranslationSlices: empty_inboundTranslationSlices,
30
+ extensions: empty_extensions
31
+ };
32
+
33
+ let newrecord = {...empty};
34
+
35
+ newrecord.admissionDoors = [
36
+ {
37
+ component: "SignUp",
38
+ part: "start"
39
+ },
40
+ {
41
+ component: "CompleteRegistration",
42
+ part: "complete"
43
+ },
44
+ {
45
+ component: "RegistrationWindows",
46
+ part: "openRoles"
47
+ }
48
+ ];
49
+
50
+ newrecord.admission = [
51
+ {
52
+ role: "Shopper",
53
+ strategy: "SelfService"
54
+ },
55
+ {
56
+ role: "Admin",
57
+ strategy: "Provisioned"
58
+ }
59
+ ];
60
+
61
+ globalThis.describe("Platform_SelfRegistration", () => {
62
+ globalThis.test("names the two doors by their mutation fields, the self-service groups, and the open-roles query", () => {
63
+ globalThis.expect(Platform_SelfRegistration$ReventlessCore.fromStructures([
64
+ [
65
+ "Catalog",
66
+ empty
67
+ ],
68
+ [
69
+ "Registration",
70
+ newrecord
71
+ ]
72
+ ])).toEqual({
73
+ start: "Registration_SignUp",
74
+ complete: "Registration_CompleteRegistration",
75
+ roles: ["Shopper"],
76
+ openRoles: "Registration_RegistrationWindows"
77
+ });
78
+ });
79
+ globalThis.test("the open-roles query is left out where no view is marked", () => {
80
+ let newrecord$1 = {...newrecord};
81
+ globalThis.expect(Stdlib_Option.flatMap(Platform_SelfRegistration$ReventlessCore.fromStructures([[
82
+ "Registration",
83
+ (newrecord$1.admissionDoors = Stdlib_Option.getOr(newrecord.admissionDoors, []).filter(d => d.part !== "openRoles"), newrecord$1)
84
+ ]]), c => c.openRoles)).toEqual(undefined);
85
+ });
86
+ globalThis.test("absent without both doors", () => {
87
+ let newrecord$1 = {...newrecord};
88
+ globalThis.expect(Platform_SelfRegistration$ReventlessCore.fromStructures([[
89
+ "Registration",
90
+ (newrecord$1.admissionDoors = [{
91
+ component: "SignUp",
92
+ part: "start"
93
+ }], newrecord$1)
94
+ ]])).toEqual(undefined);
95
+ });
96
+ globalThis.test("writes the key the shell reads", () => {
97
+ globalThis.expect(JSON.stringify(Platform_SelfRegistration$ReventlessCore.configEntry({
98
+ start: "Registration_SignUp",
99
+ complete: "Registration_CompleteRegistration",
100
+ roles: ["Shopper"],
101
+ openRoles: "Registration_RegistrationWindows"
102
+ })[1])).toEqual(`{"start":"Registration_SignUp","complete":"Registration_CompleteRegistration","roles":["Shopper"],"openRoles":"Registration_RegistrationWindows"}`);
103
+ });
104
+ });
105
+
106
+ let registration = newrecord;
107
+
108
+ export {
109
+ empty,
110
+ registration,
111
+ }
112
+ /* Not a pure module */
@@ -10,7 +10,6 @@ let panel: panelManifestEntry = {
10
10
  title: "Categories",
11
11
  description: "",
12
12
  positions: ["platform-summary"],
13
- requiredAccess: None,
14
13
  }
15
14
 
16
15
  let page: pageManifestEntry = {
@@ -18,11 +17,9 @@ let page: pageManifestEntry = {
18
17
  title: "Categories",
19
18
  menuEntry: {
20
19
  label: "Categories",
21
- icon: None,
22
- group: None,
23
20
  sortOrder: 0,
24
21
  },
25
- requiredAccess: Some("admin"),
22
+ requiredAccess: "admin",
26
23
  }
27
24
 
28
25
  let state: UiFragments.state = {
@@ -11,8 +11,7 @@ let panel = {
11
11
  fragmentId: "Catalog.Categories.list",
12
12
  title: "Categories",
13
13
  description: "",
14
- positions: panel_positions,
15
- requiredAccess: undefined
14
+ positions: panel_positions
16
15
  };
17
16
 
18
17
  let page = {
@@ -20,8 +19,6 @@ let page = {
20
19
  title: "Categories",
21
20
  menuEntry: {
22
21
  label: "Categories",
23
- icon: undefined,
24
- group: undefined,
25
22
  sortOrder: 0
26
23
  },
27
24
  requiredAccess: "admin"
@@ -19,7 +19,7 @@ let point = (~lat, ~lng) =>
19
19
  let candidate = (~label, ~relevance=?): Geocoding.candidate => {
20
20
  label,
21
21
  point: point(~lat=48.2082, ~lng=16.3738),
22
- relevance,
22
+ ?relevance,
23
23
  }
24
24
 
25
25
  describe("Geocoder_AwsLocation_Geocoding.confidentMatch", () => {
@@ -69,9 +69,7 @@ describe("LogFormat", () => {
69
69
  eventCollector: "testEventCollector",
70
70
  extensionProtocols: [],
71
71
  apiSchemaFragment: None,
72
- apiTarget: None,
73
72
  structure: None,
74
- dcbEventLog: None,
75
73
  kind: Domain,
76
74
  }),
77
75
  ]
@@ -72,9 +72,7 @@ globalThis.describe("LogFormat", () => {
72
72
  eventCollector: "testEventCollector",
73
73
  extensionProtocols: [],
74
74
  apiSchemaFragment: undefined,
75
- apiTarget: undefined,
76
75
  structure: undefined,
77
- dcbEventLog: undefined,
78
76
  kind: "Domain"
79
77
  }
80
78
  }
@@ -40,9 +40,7 @@ describe("Message should", () => {
40
40
  eventCollector: "testEventCollector",
41
41
  extensionProtocols: [],
42
42
  apiSchemaFragment: None,
43
- apiTarget: None,
44
43
  structure: None,
45
- dcbEventLog: None,
46
44
  kind: Domain,
47
45
  })
48
46
  let variantJson = variant->Message.encode(PluginSpec.commandSchema)
@@ -110,7 +108,6 @@ describe("Message should", () => {
110
108
  eventCollector: "arn",
111
109
  extensionProtocols: [],
112
110
  apiSchemaFragment: None,
113
- apiTarget: None,
114
111
  structure: Some(
115
112
  Reventless.Offload.Inline({
116
113
  readModels: [],
@@ -123,24 +120,16 @@ describe("Message should", () => {
123
120
  producedEventTypes: [],
124
121
  consumedEventTypes: [],
125
122
  linkedViews: [],
126
- consistencyRead: None,
127
123
  events: [],
128
124
  errors: [],
129
- chapter: None,
130
125
  },
131
126
  ],
132
127
  automationSlices: [],
133
128
  outboundTranslationSlices: [],
134
129
  inboundTranslationSlices: [],
135
130
  extensions: [],
136
- extensionPoints: None,
137
- requiredStores: None,
138
- requiredStoreDeclarations: None,
139
- requiredCapabilities: None,
140
- traitDeclarations: None,
141
131
  }),
142
132
  ),
143
- dcbEventLog: None,
144
133
  kind: Domain,
145
134
  }
146
135
  let event' = {
@@ -216,9 +205,7 @@ describe("Message should", () => {
216
205
  eventCollector: "arn",
217
206
  extensionProtocols: [],
218
207
  apiSchemaFragment: None,
219
- apiTarget: None,
220
208
  structure: None,
221
- dcbEventLog: None,
222
209
  kind: Domain,
223
210
  }
224
211
  let variantJson = VersionConnected(def)->Message.encode(PluginSpec.eventSchema)
@@ -42,9 +42,7 @@ globalThis.describe("Message should", () => {
42
42
  eventCollector: "testEventCollector",
43
43
  extensionProtocols: [],
44
44
  apiSchemaFragment: undefined,
45
- apiTarget: undefined,
46
45
  structure: undefined,
47
- dcbEventLog: undefined,
48
46
  kind: "Domain"
49
47
  }
50
48
  };
@@ -100,7 +98,6 @@ globalThis.describe("Message should", () => {
100
98
  eventCollector: "arn",
101
99
  extensionProtocols: [],
102
100
  apiSchemaFragment: undefined,
103
- apiTarget: undefined,
104
101
  structure: {
105
102
  TAG: "Inline",
106
103
  _0: {
@@ -113,23 +110,15 @@ globalThis.describe("Message should", () => {
113
110
  producedEventTypes: [],
114
111
  consumedEventTypes: [],
115
112
  linkedViews: [],
116
- consistencyRead: undefined,
117
113
  events: [],
118
- errors: [],
119
- chapter: undefined
114
+ errors: []
120
115
  }],
121
116
  automationSlices: [],
122
117
  outboundTranslationSlices: [],
123
118
  inboundTranslationSlices: [],
124
- extensions: [],
125
- extensionPoints: undefined,
126
- requiredStores: undefined,
127
- requiredStoreDeclarations: undefined,
128
- requiredCapabilities: undefined,
129
- traitDeclarations: undefined
119
+ extensions: []
130
120
  }
131
121
  },
132
- dcbEventLog: undefined,
133
122
  kind: "Domain"
134
123
  };
135
124
  let event$p_meta = {
@@ -195,9 +184,7 @@ globalThis.describe("Message should", () => {
195
184
  eventCollector: "arn",
196
185
  extensionProtocols: [],
197
186
  apiSchemaFragment: undefined,
198
- apiTarget: undefined,
199
187
  structure: undefined,
200
- dcbEventLog: undefined,
201
188
  kind: "Domain"
202
189
  };
203
190
  let variantJson = Message$ReventlessCore.encode({
@@ -177,7 +177,7 @@ globalThis.describe("ReadModel visibility filter", () => {
177
177
  });
178
178
 
179
179
  globalThis.describe("Plugin_Structure.make — visibility tagging", () => {
180
- let structure = Plugin_Structure$ReventlessCore.make("VisibilityPlugin", undefined, readModels, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
180
+ let structure = Plugin_Structure$ReventlessCore.make("VisibilityPlugin", undefined, readModels, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
181
181
  globalThis.test("readModels carries both Public and Internal entries", () => {
182
182
  globalThis.expect(structure.readModels.length).toBe(2);
183
183
  });
@@ -154,12 +154,17 @@ module PsTwoRuleFeed = {
154
154
  | "AddCategory" => AllowRoles([Reventless.Role.make("Admin")])
155
155
  | _ => DenyAll
156
156
  }
157
+ let capabilityNeeds: array<Reventless.CapabilityNeed.t> = []
157
158
  }
158
159
 
159
160
  module PsTwoRuleFeedSlice: ReventlessInfra.InboundTranslationSlice.T = {
160
161
  module Spec = PsTwoRuleFeed
161
162
  module Translation = {
162
- let translate = (_: PsTwoRuleFeed.externalInput) => Ok([])
163
+ let translate = async (
164
+ _: PsTwoRuleFeed.externalInput,
165
+ ~capabilities as _: Reventless.Capabilities.t,
166
+ ~caller as _: option<Reventless.Identity.t>,
167
+ ) => Ok([])
163
168
  let moduleUrl = PsTwoRuleFeed.moduleUrl
164
169
  }
165
170
  type component = Component.t<