@reventlessdev/reventless-core 3.0.0-alpha.284 → 3.0.0-alpha.286

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 (58) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/package.json +7 -7
  3. package/src/Message.res.mjs +3 -0
  4. package/src/Roles.res +3 -0
  5. package/src/Roles.res.mjs +2 -0
  6. package/src/admin/Platform_AdminGroup.res +12 -0
  7. package/src/admin/Platform_AdminGroup.res.mjs +23 -0
  8. package/src/admin/Platform_Admin_Structure.res +14 -10
  9. package/src/admin/Platform_Admin_Structure.res.mjs +22 -33
  10. package/src/components/Aggregate/Aggregate_Callback.res +116 -39
  11. package/src/components/Aggregate/Aggregate_Callback.res.mjs +96 -37
  12. package/src/components/AutomationSlice/AutomationSlice_Builder.res +2 -1
  13. package/src/components/CommandGenerator/CommandGenerator_Callback.res +9 -8
  14. package/src/components/CommandGenerator/CommandGenerator_Callback.res.mjs +10 -8
  15. package/src/components/CommandTopic/CommandTopic.res.mjs +3 -0
  16. package/src/components/CommandTopic/CommandTopic_Helpers.res +37 -1
  17. package/src/components/CommandTopic/CommandTopic_Helpers.res.mjs +29 -0
  18. package/src/components/Counter/Counter_Builder.res +4 -2
  19. package/src/components/Dcb/Dcb_Builder.res +9 -6
  20. package/src/components/Dcb/Dcb_Builder.res.mjs +6 -6
  21. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Builder.res +2 -1
  22. package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Builder.res +2 -1
  23. package/src/components/QueryDb/QueryDb_Builder.res +1 -1
  24. package/src/components/QueryDb/QueryDb_Builder.res.mjs +3 -2
  25. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +191 -141
  26. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res.mjs +66 -12
  27. package/src/components/StateViewSlice/StateViewSlice_Builder.res +1 -0
  28. package/src/plugin/api/PluginBaseFragment.res +1 -1
  29. package/src/plugin/api/PluginBaseFragment.res.mjs +2 -1
  30. package/src/plugin/component/Plugin_Builder.res +7 -3
  31. package/src/plugin/component/Plugin_Builder.res.mjs +6 -3
  32. package/src/plugin/component/Plugin_Helpers.res +35 -6
  33. package/src/plugin/component/Plugin_Helpers.res.mjs +47 -5
  34. package/src/plugin/component/Plugin_Structure.res +52 -19
  35. package/src/plugin/component/Plugin_Structure.res.mjs +40 -15
  36. package/src/plugin/lifecycle/PluginsReadModelSpec.res +1 -1
  37. package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +1 -1
  38. package/tests/admin/AdminApiSchemaDriftTest.res +9 -3
  39. package/tests/admin/AdminApiSchemaDriftTest.res.mjs +3 -3
  40. package/tests/admin/Platform_Admin_StructureTest.res +17 -14
  41. package/tests/admin/Platform_Admin_StructureTest.res.mjs +31 -19
  42. package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +8 -72
  43. package/tests/admin/Platform_PluginStructuresApiTest.res.mjs +9 -39
  44. package/tests/api/GraphQL_FragmentGeneratorTest.res +1 -1
  45. package/tests/api/GraphQL_FragmentGeneratorTest.res.mjs +1 -1
  46. package/tests/commandgenerator/OwnerActingTest.res +601 -0
  47. package/tests/commandgenerator/OwnerActingTest.res.mjs +1018 -0
  48. package/tests/commandgenerator/OwnerStampingTest.res +90 -0
  49. package/tests/commandgenerator/OwnerStampingTest.res.mjs +87 -0
  50. package/tests/commandtopic/CommandOutcomeHookTest.res +1 -0
  51. package/tests/commandtopic/CommandOutcomeHookTest.res.mjs +11 -1
  52. package/tests/plugin/PluginStructureAccessTest.res +30 -1
  53. package/tests/plugin/PluginStructureAccessTest.res.mjs +28 -1
  54. package/tests/plugin/StateChange/PsGatedCommands.res +9 -1
  55. package/tests/plugin/StateChange/PsGatedCommands.res.mjs +4 -1
  56. package/tests/plugin/StateView/PsGatedView.res +1 -1
  57. package/tests/plugin/StateView/PsGatedView.res.mjs +1 -1
  58. package/tests/plugin/pluginDefinitionRequiredScalars.txt +5 -0
@@ -27,7 +27,7 @@ let commandNamed = (name: string): commandDef =>
27
27
  let activate = () => commandNamed("Activate")
28
28
 
29
29
  describe("the Plugins read model declares its lifecycle", () => {
30
- let rm: queryableDef = Platform_Admin_Structure.pluginReadModel
30
+ let rm: queryableDef = Platform_Admin_Structure.pluginReadModel()
31
31
 
32
32
  testSync("names the field commands branch on", () =>
33
33
  expect(rm.lifecycleField)->toEqual(Some("status"))
@@ -206,25 +206,28 @@ describe("the internal commands declare the edges they move rows along", () => {
206
206
  // was open to everyone and the server refused anyone outside `Admin`. The
207
207
  // mismatch is invisible until a non-admin clicks the page.
208
208
  describe("the Plugins view publishes the rule the server enforces", () => {
209
- // 🚨 **This is also the only check `Reventless.AdminGroup.name` can carry.** A
210
- // PPX annotation takes a literal, so `@@reventless.authorize(AllowGroups(
211
- // ["Admin"]))` above cannot reference the constant — the constant's job is to
212
- // make everything *else* agree with the annotation, and nothing in the compiler
213
- // spans that gap. The actual side here comes from the expanded annotation and
214
- // the expected side from the constant, so the two are compared rather than
215
- // restated. Writing the literal on both sides would pass while they diverged.
216
- testSync("the spec declares the group, and it is the one the constant names", () =>
209
+ // The annotation names the role, so a renamed administrator group follows it
210
+ // without anyone editing the spec.
211
+ testSync("the spec declares the administrator role", () =>
217
212
  expect(PluginsReadModelSpec.authorization)->toEqual(
218
- Reventless.Authorization.AllowGroups([Reventless.AdminGroup.name]),
213
+ Reventless.Authorization.AllowRoles([Reventless.Role.admin]),
219
214
  )
220
215
  )
221
216
 
222
- testSync("and the published access keys are derived from it", () =>
223
- expect(Platform_Admin_Structure.pluginReadModel.requiredAccess)->toEqual(
224
- Some([Reventless.AdminGroup.name]),
217
+ testSync("and the published access keys are the group it maps to", () =>
218
+ expect(Platform_Admin_Structure.pluginReadModel().requiredAccess)->toEqual(
219
+ Some([Reventless.Role.adminGroup()]),
225
220
  )
226
221
  )
227
222
 
223
+ testSync("a renamed administrator group reaches the access keys", () => {
224
+ Reventless.Role.clearGroups()
225
+ Reventless.Role.setGroups([(Reventless.Role.admin, "ops")])
226
+ let keys = Platform_Admin_Structure.pluginReadModel().requiredAccess
227
+ Reventless.Role.clearGroups()
228
+ expect(keys)->toEqual(Some(["ops"]))
229
+ })
230
+
228
231
  // The API entry reads the same binding rather than restating it, so the two
229
232
  // cannot be edited apart.
230
233
  testSync("the query entry carries the spec's rule and no hand-written pair", () => {
@@ -243,7 +246,7 @@ describe("the Plugins view publishes the rule the server enforces", () => {
243
246
  // looked special. Asserted rather than assumed — the whole case for deriving
244
247
  // rests on the generic helpers reaching the same answers.
245
248
  describe("the Plugins queryableDef is what the generic helpers produce", () => {
246
- let rm: queryableDef = Platform_Admin_Structure.pluginReadModel
249
+ let rm: queryableDef = Platform_Admin_Structure.pluginReadModel()
247
250
 
248
251
  testSync("the field names are the generic ones", () =>
249
252
  expect((rm.queryField, rm.singleQueryField))->toEqual((
@@ -2,8 +2,8 @@
2
2
 
3
3
  import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
4
4
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
5
+ import * as Role$Reventless from "@reventlessdev/reventless-spec/src/types/Role.res.mjs";
5
6
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
6
- import * as AdminGroup$Reventless from "@reventlessdev/reventless-spec/src/types/AdminGroup.res.mjs";
7
7
  import * as Plugin_Structure$ReventlessCore from "../../src/plugin/component/Plugin_Structure.res.mjs";
8
8
  import * as PluginBaseFragment$ReventlessCore from "../../src/plugin/api/PluginBaseFragment.res.mjs";
9
9
  import * as PluginsReadModelSpec$ReventlessCore from "../../src/plugin/lifecycle/PluginsReadModelSpec.res.mjs";
@@ -19,19 +19,20 @@ function activate() {
19
19
  }
20
20
 
21
21
  globalThis.describe("the Plugins read model declares its lifecycle", () => {
22
+ let rm = Platform_Admin_Structure$ReventlessCore.pluginReadModel();
22
23
  globalThis.test("names the field commands branch on", () => {
23
- globalThis.expect(Platform_Admin_Structure$ReventlessCore.pluginReadModel.lifecycleField).toEqual("status");
24
+ globalThis.expect(rm.lifecycleField).toEqual("status");
24
25
  });
25
26
  globalThis.test("and the published wire name is unchanged by the rename", () => {
26
- let sdlDeclaresStatus = Stdlib_Option.mapOr(Platform_Admin_Structure$ReventlessCore.pluginReadModel.lifecycleField, false, f => f === "status") && Platform_Admin_Structure$ReventlessCore.pluginReadModel.queryField.startsWith("Platform_");
27
+ let sdlDeclaresStatus = Stdlib_Option.mapOr(rm.lifecycleField, false, f => f === "status") && rm.queryField.startsWith("Platform_");
27
28
  globalThis.expect(sdlDeclaresStatus).toEqual(true);
28
29
  });
29
30
  globalThis.test("is served on the encoded def under the new key", () => {
30
- let json = JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodeQueryableDef(Platform_Admin_Structure$ReventlessCore.pluginReadModel));
31
+ let json = JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodeQueryableDef(rm));
31
32
  globalThis.expect(json.includes(`"lifecycleField":"status"`)).toEqual(true);
32
33
  });
33
34
  globalThis.test("and never under the old one", () => {
34
- globalThis.expect(JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodeQueryableDef(Platform_Admin_Structure$ReventlessCore.pluginReadModel)).includes(`"statusField"`)).toEqual(false);
35
+ globalThis.expect(JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodeQueryableDef(rm)).includes(`"statusField"`)).toEqual(false);
35
36
  });
36
37
  });
37
38
 
@@ -155,14 +156,24 @@ globalThis.describe("the internal commands declare the edges they move rows alon
155
156
  });
156
157
 
157
158
  globalThis.describe("the Plugins view publishes the rule the server enforces", () => {
158
- globalThis.test("the spec declares the group, and it is the one the constant names", () => {
159
+ globalThis.test("the spec declares the administrator role", () => {
159
160
  globalThis.expect(PluginsReadModelSpec$ReventlessCore.authorization).toEqual({
160
- TAG: "AllowGroups",
161
- _0: [AdminGroup$Reventless.name]
161
+ TAG: "AllowRoles",
162
+ _0: [Role$Reventless.admin]
162
163
  });
163
164
  });
164
- globalThis.test("and the published access keys are derived from it", () => {
165
- globalThis.expect(Platform_Admin_Structure$ReventlessCore.pluginReadModel.requiredAccess).toEqual([AdminGroup$Reventless.name]);
165
+ globalThis.test("and the published access keys are the group it maps to", () => {
166
+ globalThis.expect(Platform_Admin_Structure$ReventlessCore.pluginReadModel().requiredAccess).toEqual([Role$Reventless.adminGroup()]);
167
+ });
168
+ globalThis.test("a renamed administrator group reaches the access keys", () => {
169
+ Role$Reventless.clearGroups();
170
+ Role$Reventless.setGroups([[
171
+ Role$Reventless.admin,
172
+ "ops"
173
+ ]]);
174
+ let keys = Platform_Admin_Structure$ReventlessCore.pluginReadModel().requiredAccess;
175
+ Role$Reventless.clearGroups();
176
+ globalThis.expect(keys).toEqual(["ops"]);
166
177
  });
167
178
  globalThis.test("the query entry carries the spec's rule and no hand-written pair", () => {
168
179
  let entry = PluginBaseFragment$ReventlessCore.queryEntries[0];
@@ -177,10 +188,11 @@ globalThis.describe("the Plugins view publishes the rule the server enforces", (
177
188
  });
178
189
 
179
190
  globalThis.describe("the Plugins queryableDef is what the generic helpers produce", () => {
191
+ let rm = Platform_Admin_Structure$ReventlessCore.pluginReadModel();
180
192
  globalThis.test("the field names are the generic ones", () => {
181
193
  globalThis.expect([
182
- Platform_Admin_Structure$ReventlessCore.pluginReadModel.queryField,
183
- Platform_Admin_Structure$ReventlessCore.pluginReadModel.singleQueryField
194
+ rm.queryField,
195
+ rm.singleQueryField
184
196
  ]).toEqual([
185
197
  "Platform_Plugins",
186
198
  "Platform_Plugin"
@@ -188,9 +200,9 @@ globalThis.describe("the Plugins queryableDef is what the generic helpers produc
188
200
  });
189
201
  globalThis.test("the label ladder reaches the same field, by convention", () => {
190
202
  globalThis.expect([
191
- Platform_Admin_Structure$ReventlessCore.pluginReadModel.labelField,
192
- Platform_Admin_Structure$ReventlessCore.pluginReadModel.labelFieldSource,
193
- Platform_Admin_Structure$ReventlessCore.pluginReadModel.searchableFields
203
+ rm.labelField,
204
+ rm.labelFieldSource,
205
+ rm.searchableFields
194
206
  ]).toEqual([
195
207
  "name",
196
208
  "convention",
@@ -199,15 +211,15 @@ globalThis.describe("the Plugins queryableDef is what the generic helpers produc
199
211
  });
200
212
  globalThis.test("the key ladder finds no id field, as the hand-written def claimed", () => {
201
213
  globalThis.expect([
202
- Platform_Admin_Structure$ReventlessCore.pluginReadModel.idField,
203
- Platform_Admin_Structure$ReventlessCore.pluginReadModel.idFieldSource
214
+ rm.idField,
215
+ rm.idFieldSource
204
216
  ]).toEqual([
205
217
  undefined,
206
218
  undefined
207
219
  ]);
208
220
  });
209
221
  globalThis.test("the blob fields are published, and marked hidden", () => {
210
- let props = Stdlib_Option.getOr(Stdlib_Option.flatMap(Stdlib_Option.flatMap(Stdlib_JSON.Decode.object(JSON.parse(Platform_Admin_Structure$ReventlessCore.pluginReadModel.schema)), o => o["properties"]), Stdlib_JSON.Decode.object), {});
222
+ let props = Stdlib_Option.getOr(Stdlib_Option.flatMap(Stdlib_Option.flatMap(Stdlib_JSON.Decode.object(JSON.parse(rm.schema)), o => o["properties"]), Stdlib_JSON.Decode.object), {});
211
223
  let isHidden = key => Stdlib_Option.flatMap(Stdlib_Option.flatMap(Stdlib_Option.flatMap(props[key], Stdlib_JSON.Decode.object), o => o["x-reventless-hidden"]), Stdlib_JSON.Decode.bool);
212
224
  globalThis.expect([
213
225
  isHidden("apiSchemaFragment"),
@@ -218,7 +230,7 @@ globalThis.describe("the Plugins queryableDef is what the generic helpers produc
218
230
  ]);
219
231
  });
220
232
  globalThis.test("while the internal fields are not published at all", () => {
221
- let props = Stdlib_Option.mapOr(Stdlib_Option.flatMap(Stdlib_Option.flatMap(Stdlib_JSON.Decode.object(JSON.parse(Platform_Admin_Structure$ReventlessCore.pluginReadModel.schema)), o => o["properties"]), Stdlib_JSON.Decode.object), [], prim => Object.keys(prim));
233
+ let props = Stdlib_Option.mapOr(Stdlib_Option.flatMap(Stdlib_Option.flatMap(Stdlib_JSON.Decode.object(JSON.parse(rm.schema)), o => o["properties"]), Stdlib_JSON.Decode.object), [], prim => Object.keys(prim));
222
234
  globalThis.expect([
223
235
  props.includes("eventCollector"),
224
236
  props.includes("extensionNames"),
@@ -311,40 +311,14 @@ globalThis.describe("visibility filtering (deployed AutoUI hides Internal)", ()
311
311
  idFieldSource: internalQbl_idFieldSource,
312
312
  requiredAccess: undefined
313
313
  };
314
- let internalSlice_consumedEventTypes = internalQbl_consumedEventTypes;
315
- let internalSlice_linkedWriteSide = internalQbl_linkedWriteSide;
316
- let internalSlice_searchableFields = internalQbl_searchableFields;
317
- let internalSlice_labelFieldSource = "convention";
318
- let internalSlice_visibility = "Internal";
319
- let internalSlice_singleQueryField = "Ordering_AvailableProduct";
320
- let internalSlice_idField = "productId";
321
- let internalSlice_idFieldSource = "sole";
322
- let internalSlice = {
323
- name: "PendingShipments",
324
- queryField: "Ordering_PendingShipments",
325
- schema: "{}",
326
- consumedEventTypes: internalSlice_consumedEventTypes,
327
- linkedWriteSide: internalSlice_linkedWriteSide,
328
- labelField: "name",
329
- searchableFields: internalSlice_searchableFields,
330
- labelFieldSource: internalSlice_labelFieldSource,
331
- lifecycleField: undefined,
332
- ownerField: undefined,
333
- retiredField: undefined,
334
- retiredValues: undefined,
335
- namedWhenRetired: undefined,
336
- visibility: internalSlice_visibility,
337
- chapter: undefined,
338
- singleQueryField: internalSlice_singleQueryField,
339
- idField: internalSlice_idField,
340
- idFieldSource: internalSlice_idFieldSource,
341
- requiredAccess: undefined
342
- };
314
+ let newrecord = {...internalQbl};
315
+ newrecord.queryField = "Ordering_PendingShipments";
316
+ newrecord.name = "PendingShipments";
343
317
  let mixed_readModels = [
344
318
  qbl,
345
319
  internalQbl
346
320
  ];
347
- let mixed_stateViewSlices = [internalSlice];
321
+ let mixed_stateViewSlices = [newrecord];
348
322
  let mixed_stateChangeSlices = structure_stateChangeSlices;
349
323
  let mixed_aggregates = structure_aggregates;
350
324
  let mixed_automationSlices = structure_automationSlices;
@@ -515,28 +489,9 @@ globalThis.describe("singleQueryField reaches the caller", () => {
515
489
  globalThis.expect(json.includes("\"singleQueryField\":\"Catalog_Product\"")).toEqual(true);
516
490
  });
517
491
  globalThis.test("encodes an unstated singular as null", () => {
492
+ let newrecord = {...qbl};
518
493
  let unstated = JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry("Catalog", undefined, {
519
- readModels: [{
520
- name: "Products",
521
- queryField: "Catalog_Products",
522
- schema: "{}",
523
- consumedEventTypes: qbl_consumedEventTypes,
524
- linkedWriteSide: qbl_linkedWriteSide,
525
- labelField: "displayName",
526
- searchableFields: qbl_searchableFields,
527
- labelFieldSource: "annotation",
528
- lifecycleField: undefined,
529
- ownerField: undefined,
530
- retiredField: undefined,
531
- retiredValues: undefined,
532
- namedWhenRetired: undefined,
533
- visibility: undefined,
534
- chapter: undefined,
535
- singleQueryField: undefined,
536
- idField: "productId",
537
- idFieldSource: "convention",
538
- requiredAccess: undefined
539
- }],
494
+ readModels: [(newrecord.singleQueryField = undefined, newrecord)],
540
495
  stateViewSlices: structure_stateViewSlices,
541
496
  stateChangeSlices: structure_stateChangeSlices,
542
497
  aggregates: structure_aggregates,
@@ -565,28 +520,9 @@ globalThis.describe("idField / idFieldSource reach the caller", () => {
565
520
  globalThis.expect(json.includes("\"idFieldSource\":\"convention\"")).toEqual(true);
566
521
  });
567
522
  globalThis.test("encodes an unresolved key as null on both fields", () => {
523
+ let newrecord = {...qbl};
568
524
  let unresolved = JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry("Catalog", undefined, {
569
- readModels: [{
570
- name: "Products",
571
- queryField: "Catalog_Products",
572
- schema: "{}",
573
- consumedEventTypes: qbl_consumedEventTypes,
574
- linkedWriteSide: qbl_linkedWriteSide,
575
- labelField: "displayName",
576
- searchableFields: qbl_searchableFields,
577
- labelFieldSource: "annotation",
578
- lifecycleField: undefined,
579
- ownerField: undefined,
580
- retiredField: undefined,
581
- retiredValues: undefined,
582
- namedWhenRetired: undefined,
583
- visibility: undefined,
584
- chapter: undefined,
585
- singleQueryField: "Catalog_Product",
586
- idField: undefined,
587
- idFieldSource: undefined,
588
- requiredAccess: undefined
589
- }],
525
+ readModels: [(newrecord.idFieldSource = undefined, newrecord.idField = undefined, newrecord)],
590
526
  stateViewSlices: structure_stateViewSlices,
591
527
  stateChangeSlices: structure_stateChangeSlices,
592
528
  aggregates: structure_aggregates,
@@ -47,52 +47,20 @@ let publicRm = {
47
47
  requiredAccess: undefined
48
48
  };
49
49
 
50
- let internalRm_consumedEventTypes = publicRm_consumedEventTypes;
50
+ let newrecord = {...publicRm};
51
51
 
52
- let internalRm_linkedWriteSide = publicRm_linkedWriteSide;
52
+ newrecord.visibility = "Internal";
53
53
 
54
- let internalRm_searchableFields = publicRm_searchableFields;
54
+ newrecord.queryField = "Catalog_ProductAudit";
55
55
 
56
- let internalRm_labelFieldSource = "annotation";
57
-
58
- let internalRm_visibility = "Internal";
59
-
60
- let internalRm_chapter = "Inventory";
61
-
62
- let internalRm_singleQueryField = "Catalog_Product";
63
-
64
- let internalRm_idField = "productId";
65
-
66
- let internalRm_idFieldSource = "convention";
67
-
68
- let internalRm = {
69
- name: "ProductAudit",
70
- queryField: "Catalog_ProductAudit",
71
- schema: "{}",
72
- consumedEventTypes: internalRm_consumedEventTypes,
73
- linkedWriteSide: internalRm_linkedWriteSide,
74
- labelField: "displayName",
75
- searchableFields: internalRm_searchableFields,
76
- labelFieldSource: internalRm_labelFieldSource,
77
- lifecycleField: undefined,
78
- ownerField: undefined,
79
- retiredField: undefined,
80
- retiredValues: undefined,
81
- namedWhenRetired: undefined,
82
- visibility: internalRm_visibility,
83
- chapter: internalRm_chapter,
84
- singleQueryField: internalRm_singleQueryField,
85
- idField: internalRm_idField,
86
- idFieldSource: internalRm_idFieldSource,
87
- requiredAccess: undefined
88
- };
56
+ newrecord.name = "ProductAudit";
89
57
 
90
58
  let structure_readModels = [
91
59
  publicRm,
92
- internalRm
60
+ newrecord
93
61
  ];
94
62
 
95
- let structure_stateViewSlices = [internalRm];
63
+ let structure_stateViewSlices = [newrecord];
96
64
 
97
65
  let structure_stateChangeSlices = [];
98
66
 
@@ -248,6 +216,8 @@ globalThis.describe("absent optional collections", () => {
248
216
  });
249
217
  });
250
218
 
219
+ let internalRm = newrecord;
220
+
251
221
  export {
252
222
  publicRm,
253
223
  internalRm,
@@ -256,4 +226,4 @@ export {
256
226
  json,
257
227
  namesOf,
258
228
  }
259
- /* encoded Not a pure module */
229
+ /* Not a pure module */
@@ -853,7 +853,7 @@ describe("@resolves / @resolvesMany reach the SDL", () => {
853
853
  () =>
854
854
  orderType(
855
855
  ~resolvedFields=Some(ResolvedFields.bothFields),
856
- ~targetPermission=AllowGroups(["Admin"]),
856
+ ~targetPermission=AllowRoles([Reventless.Role.make("Admin")]),
857
857
  ),
858
858
  ),
859
859
  )->toBe(true)
@@ -710,7 +710,7 @@ globalThis.describe("@resolves / @resolvesMany reach the SDL", () => {
710
710
  });
711
711
  globalThis.test("a target guarded differently from the parent is refused", () => {
712
712
  globalThis.expect(refused(() => orderType(bothFields, {
713
- TAG: "AllowGroups",
713
+ TAG: "AllowRoles",
714
714
  _0: ["Admin"]
715
715
  }))).toBe(true);
716
716
  });