@reventlessdev/reventless-core 3.0.0-alpha.180 → 3.0.0-alpha.182

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 (115) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +7 -7
  3. package/src/Message.res +2 -1
  4. package/src/Message.res.mjs +5 -1
  5. package/src/admin/Platform_Admin_Structure.res +2 -0
  6. package/src/admin/Platform_Admin_Structure.res.mjs +2 -0
  7. package/src/admin/Platform_ComponentDefinitionsApi.res +2 -1
  8. package/src/admin/Platform_ComponentDefinitionsApi.res.mjs +5 -1
  9. package/src/admin/UiFragmentRegistry/StateViewSlice/UiFragments_Projection.res +1 -1
  10. package/src/admin/UiFragmentRegistry/StateViewSlice/UiFragments_Projection.res.mjs +2 -1
  11. package/src/components/Api/ApiTargetStateHelpers.res +20 -0
  12. package/src/components/Api/ApiTargetStateHelpers.res.mjs +16 -0
  13. package/src/components/Api/GraphQL_FragmentGenerator.res +1 -0
  14. package/src/components/Api/GraphQL_FragmentGenerator.res.mjs +1 -0
  15. package/src/components/Api/SchemaType.res +6 -1
  16. package/src/components/Api/SchemaType.res.mjs +22 -4
  17. package/src/components/Api/SuryToJsonSchema.res +16 -0
  18. package/src/components/Api/SuryToJsonSchema.res.mjs +28 -0
  19. package/src/components/Dcb/Dcb_Builder.res +4 -5
  20. package/src/components/Dcb/Dcb_Builder.res.mjs +3 -5
  21. package/src/components/DcbEventLog/DcbEventLog_Operations.res +6 -1
  22. package/src/components/DcbEventLog/DcbEventLog_Operations.res.mjs +2 -1
  23. package/src/components/InboundTranslationSlice/InboundTranslationSlice.res +25 -0
  24. package/src/components/InboundTranslationSlice/InboundTranslationSlice.res.mjs +31 -0
  25. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res +8 -8
  26. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res.mjs +26 -6
  27. package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Builder.res +44 -37
  28. package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Builder.res.mjs +17 -25
  29. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +27 -2
  30. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res.mjs +4 -0
  31. package/src/components/StateViewSlice/StateViewSlice_Builder.res +20 -6
  32. package/src/components/StateViewSlice/StateViewSlice_Builder.res.mjs +23 -5
  33. package/src/components/StateViewSlice/StateViewSlice_Callback.res +1 -1
  34. package/src/components/StateViewSlice/StateViewSlice_Callback.res.mjs +5 -1
  35. package/src/plugin/component/Plugin_Helpers.res +4 -1
  36. package/src/plugin/component/Plugin_Structure.res +15 -1
  37. package/src/plugin/component/Plugin_Structure.res.mjs +4 -1
  38. package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +2 -0
  39. package/tests/IdentityTest.res.mjs +174 -0
  40. package/tests/ResourceAttributionTest.res.mjs +75 -0
  41. package/tests/adapter/MonitoringTest.res.mjs +116 -0
  42. package/tests/admin/Platform_ComponentDefinitionsApiTest.res +10 -0
  43. package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +365 -0
  44. package/tests/admin/Platform_UIFragmentsApiTest.res.mjs +101 -0
  45. package/tests/aggregate/AggregateCacheTest.res.mjs +433 -0
  46. package/tests/aggregate/AggregateCallbackTest.res.mjs +143 -0
  47. package/tests/aggregate/AggregateCausationTest.res.mjs +47 -0
  48. package/tests/aggregate/AggregateConflictTest.res.mjs +386 -0
  49. package/tests/aggregate/AggregateFixtures.res.mjs +308 -0
  50. package/tests/aggregate/AggregateRejectionTest.res.mjs +166 -0
  51. package/tests/aggregate/AggregateSnapshotTest.res.mjs +645 -0
  52. package/tests/api/ApiNoApiTest.res.mjs +90 -0
  53. package/tests/api/GraphQL_StitcherTest.res.mjs +112 -0
  54. package/tests/api/SimpleTest.res.mjs +10 -0
  55. package/tests/api/SuryToJsonSchemaTest.res +68 -0
  56. package/tests/api/SuryToJsonSchemaTest.res.mjs +843 -0
  57. package/tests/commandgenerator/CommandGeneratorCallbackTest.res.mjs +160 -0
  58. package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +197 -0
  59. package/tests/commandtopic/CommandTopicCallbackFixtures.res.mjs +152 -0
  60. package/tests/commandtopic/CommandTopicCallbackTest.res.mjs +106 -0
  61. package/tests/commandtopic/CommandTopicHelpersRejectionTest.res.mjs +109 -0
  62. package/tests/counter/CounterCallbackTest.res.mjs +140 -0
  63. package/tests/counter/CounterFixtures.res.mjs +67 -0
  64. package/tests/dcb/DcbDecodeTest.res.mjs +194 -0
  65. package/tests/dcb/DcbEventLogOperationsTest.res.mjs +268 -0
  66. package/tests/dcb/DcbFixtures.res.mjs +534 -0
  67. package/tests/dcb/DcbScopeInferenceTest.res.mjs +480 -0
  68. package/tests/dcb/DcbStateChangeSliceTest.res.mjs +540 -0
  69. package/tests/dcb/DcbTagTest.res.mjs +867 -0
  70. package/tests/dcb/DcbValidationTest.res.mjs +476 -0
  71. package/tests/eventlog/EventLogFixtures.res.mjs +196 -0
  72. package/tests/eventlog/EventLogOperationsTest.res.mjs +192 -0
  73. package/tests/eventlog/EventLogRetryTest.res.mjs +195 -0
  74. package/tests/eventmapper/EventMapperCallbackTest.res.mjs +141 -0
  75. package/tests/eventmapper/EventMapperFixtures.res.mjs +440 -0
  76. package/tests/eventmapper/EventMapperTest.res.mjs +83 -0
  77. package/tests/eventtopic/EventTopicFixtures.res.mjs +65 -0
  78. package/tests/eventtopic/EventTopicOperationsTest.res.mjs +71 -0
  79. package/tests/extensionpoint/ExtensionPointCallbackTest.res.mjs +94 -0
  80. package/tests/extensionpoint/ExtensionPointFixtures.res.mjs +205 -0
  81. package/tests/extensionpoint/ExtensionPointOperationsTest.res.mjs +304 -0
  82. package/tests/extensionpoint/PluginDisconnectScheduleTest.res.mjs +92 -0
  83. package/tests/ftp/FTPTest.res.mjs +88 -0
  84. package/tests/logger/LogFormatTest.res.mjs +329 -0
  85. package/tests/logger/LoggerLazyTest.res.mjs +40 -0
  86. package/tests/message/MessageTest.res.mjs +218 -0
  87. package/tests/message/MetaEnvelopeTest.res.mjs +188 -0
  88. package/tests/plugin/HeartbeatDisconnectGraceTest.res.mjs +91 -0
  89. package/tests/plugin/ManifestVisibilityTest.res.mjs +215 -0
  90. package/tests/plugin/PluginSpecExperiment.res.mjs +31 -0
  91. package/tests/plugin/PluginStructureTest.res +55 -0
  92. package/tests/plugin/PluginStructureTest.res.mjs +467 -0
  93. package/tests/plugin/PluginVersionTest.res.mjs +30 -0
  94. package/tests/plugin/SchemaWalkerTest.res.mjs +160 -0
  95. package/tests/plugin/StateChangeSlice/PsPlaceOrder.res.mjs +62 -0
  96. package/tests/plugin/StateChangeSlice/PsShipOrder.res +4 -1
  97. package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +77 -0
  98. package/tests/plugin/StateViewSlice/PsAnnotatedView.res +5 -4
  99. package/tests/plugin/StateViewSlice/PsAnnotatedView.res.mjs +110 -0
  100. package/tests/plugin/StateViewSlice/PsAvailableProductsView.res +1 -1
  101. package/tests/plugin/StateViewSlice/PsAvailableProductsView.res.mjs +70 -0
  102. package/tests/plugin/StateViewSlice/PsCustomersView.res +1 -1
  103. package/tests/plugin/StateViewSlice/PsCustomersView.res.mjs +70 -0
  104. package/tests/plugin/StateViewSlice/PsOrdersView.res +1 -1
  105. package/tests/plugin/StateViewSlice/PsOrdersView.res.mjs +82 -0
  106. package/tests/poc/StructuralSubtypingPoc.res.mjs +61 -0
  107. package/tests/projection/ProjectionOptimizeTest.res.mjs +75 -0
  108. package/tests/querydb/QueryDbFixtures.res.mjs +135 -0
  109. package/tests/querydb/QueryDbOperationsTest.res.mjs +168 -0
  110. package/tests/sideeffecthandler/SideEffectHandlerCallbackTest.res.mjs +77 -0
  111. package/tests/sideeffecthandler/SideEffectHandlerFixtures.res.mjs +139 -0
  112. package/tests/util/CommandPublisherTest.res.mjs +78 -0
  113. package/tests/util/CsvStreamTest.res.mjs +51 -0
  114. package/tests/util/LruTest.res.mjs +105 -0
  115. package/tests/util/MetricsTest.res.mjs +53 -0
@@ -0,0 +1,843 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as S from "sury/src/S.res.mjs";
4
+ import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
5
+ import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
6
+ import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
7
+ import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.js";
8
+ import * as DateTime$Reventless from "@reventlessdev/reventless-spec/src/types/DateTime.res.mjs";
9
+ import * as StateAnnotations$Reventless from "@reventlessdev/reventless-spec/src/components/StateAnnotations.res.mjs";
10
+ import * as SuryToJsonSchema$ReventlessCore from "../../src/components/Api/SuryToJsonSchema.res.mjs";
11
+
12
+ function getProperty(schema, key) {
13
+ let obj = Stdlib_JSON.Decode.object(schema);
14
+ if (obj !== undefined) {
15
+ return obj[key];
16
+ }
17
+ }
18
+
19
+ function getPropertyOf(schema, fieldName) {
20
+ let props = getProperty(schema, "properties");
21
+ if (props === undefined) {
22
+ return;
23
+ }
24
+ let obj = Stdlib_JSON.Decode.object(props);
25
+ if (obj !== undefined) {
26
+ return obj[fieldName];
27
+ }
28
+ }
29
+
30
+ let emptySpec_ids = [];
31
+
32
+ let emptySpec_compositeIds = [];
33
+
34
+ let emptySpec_subIds = [];
35
+
36
+ let emptySpec_compositeSubIds = [];
37
+
38
+ let emptySpec_indexes = [];
39
+
40
+ let emptySpec_hidden = [];
41
+
42
+ let emptySpec_summary = [];
43
+
44
+ let emptySpec_drillTargets = [];
45
+
46
+ let emptySpec_drillTargetKeys = [];
47
+
48
+ let emptySpec_collapsed = [];
49
+
50
+ let emptySpec_scan = [];
51
+
52
+ let emptySpec_scanSort = [];
53
+
54
+ let emptySpec_semantic = [];
55
+
56
+ let emptySpec_metric = [];
57
+
58
+ let emptySpec = {
59
+ ids: emptySpec_ids,
60
+ compositeIds: emptySpec_compositeIds,
61
+ subIds: emptySpec_subIds,
62
+ compositeSubIds: emptySpec_compositeSubIds,
63
+ indexes: emptySpec_indexes,
64
+ hidden: emptySpec_hidden,
65
+ summary: emptySpec_summary,
66
+ drillTargets: emptySpec_drillTargets,
67
+ drillTargetKeys: emptySpec_drillTargetKeys,
68
+ collapsed: emptySpec_collapsed,
69
+ scan: emptySpec_scan,
70
+ scanSort: emptySpec_scanSort,
71
+ semantic: emptySpec_semantic,
72
+ metric: emptySpec_metric,
73
+ status: undefined,
74
+ groupBy: undefined,
75
+ visibility: undefined
76
+ };
77
+
78
+ globalThis.describe("SuryToJsonSchema:", () => {
79
+ globalThis.describe("deriveObjectSchema with no annotations:", () => {
80
+ globalThis.test("emits plain JSON Schema when no metadata is attached", () => {
81
+ let schema = S.schema(s => ({
82
+ id: s.m(S.string),
83
+ name: s.m(S.string)
84
+ }));
85
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema);
86
+ let idSchema = getPropertyOf(json, "id");
87
+ globalThis.expect(Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-id"))).toBe(undefined);
88
+ });
89
+ globalThis.test("emits format:\"date-time\" for a DateTime-marked string field", () => {
90
+ let schema = S.schema(s => ({
91
+ placedAt: s.m(DateTime$Reventless.string),
92
+ name: s.m(S.string)
93
+ }));
94
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema);
95
+ globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(getPropertyOf(json, "placedAt"), s => getProperty(s, "format")), Stdlib_JSON.Decode.string)).toBe("date-time");
96
+ globalThis.expect(Stdlib_Option.flatMap(getPropertyOf(json, "name"), s => getProperty(s, "format"))).toBe(undefined);
97
+ });
98
+ });
99
+ globalThis.describe("deriveObjectSchema with stateAnnotations metadata:", () => {
100
+ let withSpec = (schema, spec) => S.Metadata.set(schema, StateAnnotations$Reventless.stateAnnotationsId, spec);
101
+ globalThis.test("emits x-reventless-id on field listed in ids", () => {
102
+ let schema = S.schema(s => ({
103
+ entityId: s.m(S.string),
104
+ name: s.m(S.string)
105
+ }));
106
+ let schema$p = withSpec(schema, {
107
+ ids: ["entityId"],
108
+ compositeIds: emptySpec_compositeIds,
109
+ subIds: emptySpec_subIds,
110
+ compositeSubIds: emptySpec_compositeSubIds,
111
+ indexes: emptySpec_indexes,
112
+ hidden: emptySpec_hidden,
113
+ summary: emptySpec_summary,
114
+ drillTargets: emptySpec_drillTargets,
115
+ drillTargetKeys: emptySpec_drillTargetKeys,
116
+ collapsed: emptySpec_collapsed,
117
+ scan: emptySpec_scan,
118
+ scanSort: emptySpec_scanSort,
119
+ semantic: emptySpec_semantic,
120
+ metric: emptySpec_metric,
121
+ status: undefined,
122
+ groupBy: undefined,
123
+ visibility: undefined
124
+ });
125
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
126
+ let entityIdSchema = getPropertyOf(json, "entityId");
127
+ globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(entityIdSchema, s => getProperty(s, "x-reventless-id")), Stdlib_JSON.Decode.bool)).toBe(true);
128
+ });
129
+ globalThis.test("emits x-reventless-compositeId on each compositeId field", () => {
130
+ let schema = S.schema(s => ({
131
+ environment: s.m(S.string),
132
+ platformName: s.m(S.string),
133
+ name: s.m(S.string)
134
+ }));
135
+ let schema$p = withSpec(schema, {
136
+ ids: emptySpec_ids,
137
+ compositeIds: [
138
+ "environment",
139
+ "platformName"
140
+ ],
141
+ subIds: emptySpec_subIds,
142
+ compositeSubIds: emptySpec_compositeSubIds,
143
+ indexes: emptySpec_indexes,
144
+ hidden: emptySpec_hidden,
145
+ summary: emptySpec_summary,
146
+ drillTargets: emptySpec_drillTargets,
147
+ drillTargetKeys: emptySpec_drillTargetKeys,
148
+ collapsed: emptySpec_collapsed,
149
+ scan: emptySpec_scan,
150
+ scanSort: emptySpec_scanSort,
151
+ semantic: emptySpec_semantic,
152
+ metric: emptySpec_metric,
153
+ status: undefined,
154
+ groupBy: undefined,
155
+ visibility: undefined
156
+ });
157
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
158
+ let envSchema = getPropertyOf(json, "environment");
159
+ let platformSchema = getPropertyOf(json, "platformName");
160
+ globalThis.expect([
161
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(envSchema, s => getProperty(s, "x-reventless-compositeId")), Stdlib_JSON.Decode.bool),
162
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(platformSchema, s => getProperty(s, "x-reventless-compositeId")), Stdlib_JSON.Decode.bool)
163
+ ]).toEqual([
164
+ true,
165
+ true
166
+ ]);
167
+ });
168
+ globalThis.test("emits x-reventless-subId on field listed in subIds", () => {
169
+ let schema = S.schema(s => ({
170
+ itemId: s.m(S.string),
171
+ version: s.m(S.string)
172
+ }));
173
+ let schema$p = withSpec(schema, {
174
+ ids: emptySpec_ids,
175
+ compositeIds: emptySpec_compositeIds,
176
+ subIds: ["version"],
177
+ compositeSubIds: emptySpec_compositeSubIds,
178
+ indexes: emptySpec_indexes,
179
+ hidden: emptySpec_hidden,
180
+ summary: emptySpec_summary,
181
+ drillTargets: emptySpec_drillTargets,
182
+ drillTargetKeys: emptySpec_drillTargetKeys,
183
+ collapsed: emptySpec_collapsed,
184
+ scan: emptySpec_scan,
185
+ scanSort: emptySpec_scanSort,
186
+ semantic: emptySpec_semantic,
187
+ metric: emptySpec_metric,
188
+ status: undefined,
189
+ groupBy: undefined,
190
+ visibility: undefined
191
+ });
192
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
193
+ let versionSchema = getPropertyOf(json, "version");
194
+ globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(versionSchema, s => getProperty(s, "x-reventless-subId")), Stdlib_JSON.Decode.bool)).toBe(true);
195
+ });
196
+ globalThis.test("emits x-reventless-index as the index name when named", () => {
197
+ let schema = S.schema(s => ({
198
+ id: s.m(S.string),
199
+ ownerId: s.m(S.string)
200
+ }));
201
+ let schema$p = withSpec(schema, {
202
+ ids: emptySpec_ids,
203
+ compositeIds: emptySpec_compositeIds,
204
+ subIds: emptySpec_subIds,
205
+ compositeSubIds: emptySpec_compositeSubIds,
206
+ indexes: [[
207
+ "ownerId",
208
+ "byOwner"
209
+ ]],
210
+ hidden: emptySpec_hidden,
211
+ summary: emptySpec_summary,
212
+ drillTargets: emptySpec_drillTargets,
213
+ drillTargetKeys: emptySpec_drillTargetKeys,
214
+ collapsed: emptySpec_collapsed,
215
+ scan: emptySpec_scan,
216
+ scanSort: emptySpec_scanSort,
217
+ semantic: emptySpec_semantic,
218
+ metric: emptySpec_metric,
219
+ status: undefined,
220
+ groupBy: undefined,
221
+ visibility: undefined
222
+ });
223
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
224
+ let ownerIdSchema = getPropertyOf(json, "ownerId");
225
+ globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(ownerIdSchema, s => getProperty(s, "x-reventless-index")), Stdlib_JSON.Decode.string)).toBe("byOwner");
226
+ });
227
+ globalThis.test("emits x-reventless-index as true for unnamed @index", () => {
228
+ let schema = S.schema(s => ({
229
+ id: s.m(S.string),
230
+ category: s.m(S.string)
231
+ }));
232
+ let schema$p = withSpec(schema, {
233
+ ids: emptySpec_ids,
234
+ compositeIds: emptySpec_compositeIds,
235
+ subIds: emptySpec_subIds,
236
+ compositeSubIds: emptySpec_compositeSubIds,
237
+ indexes: [[
238
+ "category",
239
+ ""
240
+ ]],
241
+ hidden: emptySpec_hidden,
242
+ summary: emptySpec_summary,
243
+ drillTargets: emptySpec_drillTargets,
244
+ drillTargetKeys: emptySpec_drillTargetKeys,
245
+ collapsed: emptySpec_collapsed,
246
+ scan: emptySpec_scan,
247
+ scanSort: emptySpec_scanSort,
248
+ semantic: emptySpec_semantic,
249
+ metric: emptySpec_metric,
250
+ status: undefined,
251
+ groupBy: undefined,
252
+ visibility: undefined
253
+ });
254
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
255
+ let categorySchema = getPropertyOf(json, "category");
256
+ globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(categorySchema, s => getProperty(s, "x-reventless-index")), Stdlib_JSON.Decode.bool)).toBe(true);
257
+ });
258
+ globalThis.test("does not emit x-reventless-* on unannotated fields", () => {
259
+ let schema = S.schema(s => ({
260
+ entityId: s.m(S.string),
261
+ name: s.m(S.string)
262
+ }));
263
+ let schema$p = withSpec(schema, {
264
+ ids: ["entityId"],
265
+ compositeIds: emptySpec_compositeIds,
266
+ subIds: emptySpec_subIds,
267
+ compositeSubIds: emptySpec_compositeSubIds,
268
+ indexes: emptySpec_indexes,
269
+ hidden: emptySpec_hidden,
270
+ summary: emptySpec_summary,
271
+ drillTargets: emptySpec_drillTargets,
272
+ drillTargetKeys: emptySpec_drillTargetKeys,
273
+ collapsed: emptySpec_collapsed,
274
+ scan: emptySpec_scan,
275
+ scanSort: emptySpec_scanSort,
276
+ semantic: emptySpec_semantic,
277
+ metric: emptySpec_metric,
278
+ status: undefined,
279
+ groupBy: undefined,
280
+ visibility: undefined
281
+ });
282
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
283
+ let nameSchema = getPropertyOf(json, "name");
284
+ globalThis.expect(Stdlib_Option.flatMap(nameSchema, s => getProperty(s, "x-reventless-id"))).toBe(undefined);
285
+ });
286
+ globalThis.test("emits x-reventless-hidden on field listed in hidden", () => {
287
+ let schema = S.schema(s => ({
288
+ id: s.m(S.string),
289
+ deploymentId: s.m(S.string)
290
+ }));
291
+ let schema$p = withSpec(schema, {
292
+ ids: emptySpec_ids,
293
+ compositeIds: emptySpec_compositeIds,
294
+ subIds: emptySpec_subIds,
295
+ compositeSubIds: emptySpec_compositeSubIds,
296
+ indexes: emptySpec_indexes,
297
+ hidden: ["deploymentId"],
298
+ summary: emptySpec_summary,
299
+ drillTargets: emptySpec_drillTargets,
300
+ drillTargetKeys: emptySpec_drillTargetKeys,
301
+ collapsed: emptySpec_collapsed,
302
+ scan: emptySpec_scan,
303
+ scanSort: emptySpec_scanSort,
304
+ semantic: emptySpec_semantic,
305
+ metric: emptySpec_metric,
306
+ status: undefined,
307
+ groupBy: undefined,
308
+ visibility: undefined
309
+ });
310
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
311
+ let deploymentIdSchema = getPropertyOf(json, "deploymentId");
312
+ let idSchema = getPropertyOf(json, "id");
313
+ globalThis.expect([
314
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(deploymentIdSchema, s => getProperty(s, "x-reventless-hidden")), Stdlib_JSON.Decode.bool),
315
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-hidden"))
316
+ ]).toEqual([
317
+ true,
318
+ undefined
319
+ ]);
320
+ });
321
+ globalThis.test("emits x-reventless-summary on field listed in summary", () => {
322
+ let schema = S.schema(s => ({
323
+ id: s.m(S.string),
324
+ pluginName: s.m(S.string)
325
+ }));
326
+ let schema$p = withSpec(schema, {
327
+ ids: emptySpec_ids,
328
+ compositeIds: emptySpec_compositeIds,
329
+ subIds: emptySpec_subIds,
330
+ compositeSubIds: emptySpec_compositeSubIds,
331
+ indexes: emptySpec_indexes,
332
+ hidden: emptySpec_hidden,
333
+ summary: ["pluginName"],
334
+ drillTargets: emptySpec_drillTargets,
335
+ drillTargetKeys: emptySpec_drillTargetKeys,
336
+ collapsed: emptySpec_collapsed,
337
+ scan: emptySpec_scan,
338
+ scanSort: emptySpec_scanSort,
339
+ semantic: emptySpec_semantic,
340
+ metric: emptySpec_metric,
341
+ status: undefined,
342
+ groupBy: undefined,
343
+ visibility: undefined
344
+ });
345
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
346
+ let pluginNameSchema = getPropertyOf(json, "pluginName");
347
+ let idSchema = getPropertyOf(json, "id");
348
+ globalThis.expect([
349
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(pluginNameSchema, s => getProperty(s, "x-reventless-summary")), Stdlib_JSON.Decode.bool),
350
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-summary"))
351
+ ]).toEqual([
352
+ true,
353
+ undefined
354
+ ]);
355
+ });
356
+ globalThis.test("emits x-reventless-drillTarget as the slice name", () => {
357
+ let schema = S.schema(s => ({
358
+ id: s.m(S.string),
359
+ components: s.m(S.string)
360
+ }));
361
+ let schema$p = withSpec(schema, {
362
+ ids: emptySpec_ids,
363
+ compositeIds: emptySpec_compositeIds,
364
+ subIds: emptySpec_subIds,
365
+ compositeSubIds: emptySpec_compositeSubIds,
366
+ indexes: emptySpec_indexes,
367
+ hidden: emptySpec_hidden,
368
+ summary: emptySpec_summary,
369
+ drillTargets: [[
370
+ "components",
371
+ "ResourceInventory"
372
+ ]],
373
+ drillTargetKeys: emptySpec_drillTargetKeys,
374
+ collapsed: emptySpec_collapsed,
375
+ scan: emptySpec_scan,
376
+ scanSort: emptySpec_scanSort,
377
+ semantic: emptySpec_semantic,
378
+ metric: emptySpec_metric,
379
+ status: undefined,
380
+ groupBy: undefined,
381
+ visibility: undefined
382
+ });
383
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
384
+ let componentsSchema = getPropertyOf(json, "components");
385
+ let idSchema = getPropertyOf(json, "id");
386
+ globalThis.expect([
387
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(componentsSchema, s => getProperty(s, "x-reventless-drillTarget")), Stdlib_JSON.Decode.string),
388
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-drillTarget"))
389
+ ]).toEqual([
390
+ "ResourceInventory",
391
+ undefined
392
+ ]);
393
+ });
394
+ globalThis.test("emits x-reventless-drillTargetKey as the key path", () => {
395
+ let schema = S.schema(s => ({
396
+ id: s.m(S.string),
397
+ components: s.m(S.string)
398
+ }));
399
+ let schema$p = withSpec(schema, {
400
+ ids: emptySpec_ids,
401
+ compositeIds: emptySpec_compositeIds,
402
+ subIds: emptySpec_subIds,
403
+ compositeSubIds: emptySpec_compositeSubIds,
404
+ indexes: emptySpec_indexes,
405
+ hidden: emptySpec_hidden,
406
+ summary: emptySpec_summary,
407
+ drillTargets: [[
408
+ "components",
409
+ "ResourceInventory"
410
+ ]],
411
+ drillTargetKeys: [[
412
+ "components",
413
+ "kind/name"
414
+ ]],
415
+ collapsed: emptySpec_collapsed,
416
+ scan: emptySpec_scan,
417
+ scanSort: emptySpec_scanSort,
418
+ semantic: emptySpec_semantic,
419
+ metric: emptySpec_metric,
420
+ status: undefined,
421
+ groupBy: undefined,
422
+ visibility: undefined
423
+ });
424
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
425
+ let componentsSchema = getPropertyOf(json, "components");
426
+ globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(componentsSchema, s => getProperty(s, "x-reventless-drillTargetKey")), Stdlib_JSON.Decode.string)).toBe("kind/name");
427
+ });
428
+ globalThis.test("does not emit x-reventless-drillTargetKey when no key was supplied", () => {
429
+ let schema = S.schema(s => ({
430
+ id: s.m(S.string),
431
+ components: s.m(S.string)
432
+ }));
433
+ let schema$p = withSpec(schema, {
434
+ ids: emptySpec_ids,
435
+ compositeIds: emptySpec_compositeIds,
436
+ subIds: emptySpec_subIds,
437
+ compositeSubIds: emptySpec_compositeSubIds,
438
+ indexes: emptySpec_indexes,
439
+ hidden: emptySpec_hidden,
440
+ summary: emptySpec_summary,
441
+ drillTargets: [[
442
+ "components",
443
+ "ResourceInventory"
444
+ ]],
445
+ drillTargetKeys: emptySpec_drillTargetKeys,
446
+ collapsed: emptySpec_collapsed,
447
+ scan: emptySpec_scan,
448
+ scanSort: emptySpec_scanSort,
449
+ semantic: emptySpec_semantic,
450
+ metric: emptySpec_metric,
451
+ status: undefined,
452
+ groupBy: undefined,
453
+ visibility: undefined
454
+ });
455
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
456
+ let componentsSchema = getPropertyOf(json, "components");
457
+ globalThis.expect(Stdlib_Option.flatMap(componentsSchema, s => getProperty(s, "x-reventless-drillTargetKey"))).toBe(undefined);
458
+ });
459
+ globalThis.test("emits x-reventless-scan on field listed in scan", () => {
460
+ let schema = S.schema(s => ({
461
+ id: s.m(S.string),
462
+ status: s.m(S.string)
463
+ }));
464
+ let schema$p = withSpec(schema, {
465
+ ids: emptySpec_ids,
466
+ compositeIds: emptySpec_compositeIds,
467
+ subIds: emptySpec_subIds,
468
+ compositeSubIds: emptySpec_compositeSubIds,
469
+ indexes: emptySpec_indexes,
470
+ hidden: emptySpec_hidden,
471
+ summary: emptySpec_summary,
472
+ drillTargets: emptySpec_drillTargets,
473
+ drillTargetKeys: emptySpec_drillTargetKeys,
474
+ collapsed: emptySpec_collapsed,
475
+ scan: ["status"],
476
+ scanSort: emptySpec_scanSort,
477
+ semantic: emptySpec_semantic,
478
+ metric: emptySpec_metric,
479
+ status: undefined,
480
+ groupBy: undefined,
481
+ visibility: undefined
482
+ });
483
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
484
+ let statusSchema = getPropertyOf(json, "status");
485
+ let idSchema = getPropertyOf(json, "id");
486
+ globalThis.expect([
487
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(statusSchema, s => getProperty(s, "x-reventless-scan")), Stdlib_JSON.Decode.bool),
488
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-scan"))
489
+ ]).toEqual([
490
+ true,
491
+ undefined
492
+ ]);
493
+ });
494
+ globalThis.test("emits x-reventless-scanSort on field listed in scanSort", () => {
495
+ let schema = S.schema(s => ({
496
+ id: s.m(S.string),
497
+ name: s.m(S.string)
498
+ }));
499
+ let schema$p = withSpec(schema, {
500
+ ids: emptySpec_ids,
501
+ compositeIds: emptySpec_compositeIds,
502
+ subIds: emptySpec_subIds,
503
+ compositeSubIds: emptySpec_compositeSubIds,
504
+ indexes: emptySpec_indexes,
505
+ hidden: emptySpec_hidden,
506
+ summary: emptySpec_summary,
507
+ drillTargets: emptySpec_drillTargets,
508
+ drillTargetKeys: emptySpec_drillTargetKeys,
509
+ collapsed: emptySpec_collapsed,
510
+ scan: emptySpec_scan,
511
+ scanSort: ["name"],
512
+ semantic: emptySpec_semantic,
513
+ metric: emptySpec_metric,
514
+ status: undefined,
515
+ groupBy: undefined,
516
+ visibility: undefined
517
+ });
518
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
519
+ let nameSchema = getPropertyOf(json, "name");
520
+ let idSchema = getPropertyOf(json, "id");
521
+ globalThis.expect([
522
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(nameSchema, s => getProperty(s, "x-reventless-scanSort")), Stdlib_JSON.Decode.bool),
523
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-scanSort"))
524
+ ]).toEqual([
525
+ true,
526
+ undefined
527
+ ]);
528
+ });
529
+ globalThis.test("emits x-reventless-semantic on the field listed in semantic", () => {
530
+ let schema = S.schema(s => ({
531
+ id: s.m(S.string),
532
+ total: s.m(S.float)
533
+ }));
534
+ let schema$p = withSpec(schema, {
535
+ ids: emptySpec_ids,
536
+ compositeIds: emptySpec_compositeIds,
537
+ subIds: emptySpec_subIds,
538
+ compositeSubIds: emptySpec_compositeSubIds,
539
+ indexes: emptySpec_indexes,
540
+ hidden: emptySpec_hidden,
541
+ summary: emptySpec_summary,
542
+ drillTargets: emptySpec_drillTargets,
543
+ drillTargetKeys: emptySpec_drillTargetKeys,
544
+ collapsed: emptySpec_collapsed,
545
+ scan: emptySpec_scan,
546
+ scanSort: emptySpec_scanSort,
547
+ semantic: [[
548
+ "total",
549
+ "currency"
550
+ ]],
551
+ metric: emptySpec_metric,
552
+ status: undefined,
553
+ groupBy: undefined,
554
+ visibility: undefined
555
+ });
556
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
557
+ let totalSchema = getPropertyOf(json, "total");
558
+ let idSchema = getPropertyOf(json, "id");
559
+ globalThis.expect([
560
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(totalSchema, s => getProperty(s, "x-reventless-semantic")), Stdlib_JSON.Decode.string),
561
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-semantic"))
562
+ ]).toEqual([
563
+ "currency",
564
+ undefined
565
+ ]);
566
+ });
567
+ globalThis.test("emits x-reventless-metric {aggregate,label} on the field listed in metric", () => {
568
+ let schema = S.schema(s => ({
569
+ id: s.m(S.string),
570
+ total: s.m(S.float)
571
+ }));
572
+ let schema$p = withSpec(schema, {
573
+ ids: emptySpec_ids,
574
+ compositeIds: emptySpec_compositeIds,
575
+ subIds: emptySpec_subIds,
576
+ compositeSubIds: emptySpec_compositeSubIds,
577
+ indexes: emptySpec_indexes,
578
+ hidden: emptySpec_hidden,
579
+ summary: emptySpec_summary,
580
+ drillTargets: emptySpec_drillTargets,
581
+ drillTargetKeys: emptySpec_drillTargetKeys,
582
+ collapsed: emptySpec_collapsed,
583
+ scan: emptySpec_scan,
584
+ scanSort: emptySpec_scanSort,
585
+ semantic: emptySpec_semantic,
586
+ metric: [[
587
+ "total",
588
+ {
589
+ aggregate: "sum",
590
+ label: "Revenue"
591
+ }
592
+ ]],
593
+ status: undefined,
594
+ groupBy: undefined,
595
+ visibility: undefined
596
+ });
597
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
598
+ let metricObj = Stdlib_Option.flatMap(getPropertyOf(json, "total"), s => getProperty(s, "x-reventless-metric"));
599
+ globalThis.expect([
600
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(metricObj, m => getProperty(m, "aggregate")), Stdlib_JSON.Decode.string),
601
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(metricObj, m => getProperty(m, "label")), Stdlib_JSON.Decode.string)
602
+ ]).toEqual([
603
+ "sum",
604
+ "Revenue"
605
+ ]);
606
+ });
607
+ globalThis.test("omits the metric label when empty (UI derives one from the field name)", () => {
608
+ let schema = S.schema(s => ({
609
+ total: s.m(S.float)
610
+ }));
611
+ let schema$p = withSpec(schema, {
612
+ ids: emptySpec_ids,
613
+ compositeIds: emptySpec_compositeIds,
614
+ subIds: emptySpec_subIds,
615
+ compositeSubIds: emptySpec_compositeSubIds,
616
+ indexes: emptySpec_indexes,
617
+ hidden: emptySpec_hidden,
618
+ summary: emptySpec_summary,
619
+ drillTargets: emptySpec_drillTargets,
620
+ drillTargetKeys: emptySpec_drillTargetKeys,
621
+ collapsed: emptySpec_collapsed,
622
+ scan: emptySpec_scan,
623
+ scanSort: emptySpec_scanSort,
624
+ semantic: emptySpec_semantic,
625
+ metric: [[
626
+ "total",
627
+ {
628
+ aggregate: "sum",
629
+ label: ""
630
+ }
631
+ ]],
632
+ status: undefined,
633
+ groupBy: undefined,
634
+ visibility: undefined
635
+ });
636
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
637
+ let metricObj = Stdlib_Option.flatMap(getPropertyOf(json, "total"), s => getProperty(s, "x-reventless-metric"));
638
+ globalThis.expect([
639
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(metricObj, m => getProperty(m, "aggregate")), Stdlib_JSON.Decode.string),
640
+ Stdlib_Option.flatMap(metricObj, m => getProperty(m, "label"))
641
+ ]).toEqual([
642
+ "sum",
643
+ undefined
644
+ ]);
645
+ });
646
+ globalThis.test("emits x-reventless-group-by on the field named by groupBy", () => {
647
+ let schema = S.schema(s => ({
648
+ id: s.m(S.string),
649
+ kind: s.m(S.string)
650
+ }));
651
+ let schema$p = withSpec(schema, {
652
+ ids: emptySpec_ids,
653
+ compositeIds: emptySpec_compositeIds,
654
+ subIds: emptySpec_subIds,
655
+ compositeSubIds: emptySpec_compositeSubIds,
656
+ indexes: emptySpec_indexes,
657
+ hidden: emptySpec_hidden,
658
+ summary: emptySpec_summary,
659
+ drillTargets: emptySpec_drillTargets,
660
+ drillTargetKeys: emptySpec_drillTargetKeys,
661
+ collapsed: emptySpec_collapsed,
662
+ scan: emptySpec_scan,
663
+ scanSort: emptySpec_scanSort,
664
+ semantic: emptySpec_semantic,
665
+ metric: emptySpec_metric,
666
+ status: undefined,
667
+ groupBy: "kind",
668
+ visibility: undefined
669
+ });
670
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
671
+ let kindSchema = getPropertyOf(json, "kind");
672
+ let idSchema = getPropertyOf(json, "id");
673
+ globalThis.expect([
674
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(kindSchema, s => getProperty(s, "x-reventless-group-by")), Stdlib_JSON.Decode.bool),
675
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-group-by"))
676
+ ]).toEqual([
677
+ true,
678
+ undefined
679
+ ]);
680
+ });
681
+ globalThis.test("emits x-reventless-collapsed on field listed in collapsed", () => {
682
+ let schema = S.schema(s => ({
683
+ id: s.m(S.string),
684
+ primaryResource: s.m(S.string)
685
+ }));
686
+ let schema$p = withSpec(schema, {
687
+ ids: emptySpec_ids,
688
+ compositeIds: emptySpec_compositeIds,
689
+ subIds: emptySpec_subIds,
690
+ compositeSubIds: emptySpec_compositeSubIds,
691
+ indexes: emptySpec_indexes,
692
+ hidden: emptySpec_hidden,
693
+ summary: emptySpec_summary,
694
+ drillTargets: emptySpec_drillTargets,
695
+ drillTargetKeys: emptySpec_drillTargetKeys,
696
+ collapsed: ["primaryResource"],
697
+ scan: emptySpec_scan,
698
+ scanSort: emptySpec_scanSort,
699
+ semantic: emptySpec_semantic,
700
+ metric: emptySpec_metric,
701
+ status: undefined,
702
+ groupBy: undefined,
703
+ visibility: undefined
704
+ });
705
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
706
+ let primarySchema = getPropertyOf(json, "primaryResource");
707
+ let idSchema = getPropertyOf(json, "id");
708
+ globalThis.expect([
709
+ Stdlib_Option.flatMap(Stdlib_Option.flatMap(primarySchema, s => getProperty(s, "x-reventless-collapsed")), Stdlib_JSON.Decode.bool),
710
+ Stdlib_Option.flatMap(idSchema, s => getProperty(s, "x-reventless-collapsed"))
711
+ ]).toEqual([
712
+ true,
713
+ undefined
714
+ ]);
715
+ });
716
+ globalThis.test("emits x-reventless-visibility at top level when visibility is Internal", () => {
717
+ let schema = S.schema(s => ({
718
+ id: s.m(S.string)
719
+ }));
720
+ let schema$p = withSpec(schema, {
721
+ ids: emptySpec_ids,
722
+ compositeIds: emptySpec_compositeIds,
723
+ subIds: emptySpec_subIds,
724
+ compositeSubIds: emptySpec_compositeSubIds,
725
+ indexes: emptySpec_indexes,
726
+ hidden: emptySpec_hidden,
727
+ summary: emptySpec_summary,
728
+ drillTargets: emptySpec_drillTargets,
729
+ drillTargetKeys: emptySpec_drillTargetKeys,
730
+ collapsed: emptySpec_collapsed,
731
+ scan: emptySpec_scan,
732
+ scanSort: emptySpec_scanSort,
733
+ semantic: emptySpec_semantic,
734
+ metric: emptySpec_metric,
735
+ status: undefined,
736
+ groupBy: undefined,
737
+ visibility: "Internal"
738
+ });
739
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
740
+ globalThis.expect(Stdlib_Option.flatMap(getProperty(json, "x-reventless-visibility"), Stdlib_JSON.Decode.string)).toBe("Internal");
741
+ });
742
+ globalThis.test("omits x-reventless-visibility when visibility is None (default Public)", () => {
743
+ let schema = S.schema(s => ({
744
+ id: s.m(S.string)
745
+ }));
746
+ let schema$p = withSpec(schema, {
747
+ ids: emptySpec_ids,
748
+ compositeIds: emptySpec_compositeIds,
749
+ subIds: emptySpec_subIds,
750
+ compositeSubIds: emptySpec_compositeSubIds,
751
+ indexes: emptySpec_indexes,
752
+ hidden: emptySpec_hidden,
753
+ summary: emptySpec_summary,
754
+ drillTargets: emptySpec_drillTargets,
755
+ drillTargetKeys: emptySpec_drillTargetKeys,
756
+ collapsed: emptySpec_collapsed,
757
+ scan: emptySpec_scan,
758
+ scanSort: emptySpec_scanSort,
759
+ semantic: emptySpec_semantic,
760
+ metric: emptySpec_metric,
761
+ status: undefined,
762
+ groupBy: undefined,
763
+ visibility: undefined
764
+ });
765
+ let json = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema$p);
766
+ globalThis.expect(getProperty(json, "x-reventless-visibility")).toBe(undefined);
767
+ });
768
+ });
769
+ globalThis.describe("parity with S.toJSONSchema for unannotated objects:", () => {
770
+ let getKeys = schema => {
771
+ let obj = Stdlib_Option.flatMap(getProperty(schema, "properties"), Stdlib_JSON.Decode.object);
772
+ if (obj !== undefined) {
773
+ return Object.keys(obj);
774
+ } else {
775
+ return [];
776
+ }
777
+ };
778
+ let getRequired = schema => {
779
+ let arr = Stdlib_Option.flatMap(getProperty(schema, "required"), Stdlib_JSON.Decode.array);
780
+ if (arr !== undefined) {
781
+ return Stdlib_Array.filterMap(arr, Stdlib_JSON.Decode.string);
782
+ } else {
783
+ return [];
784
+ }
785
+ };
786
+ let sortStrings = xs => xs.toSorted(Primitive_string.compare);
787
+ globalThis.test("properties keyset matches between deriveObjectSchema and S.toJSONSchema", () => {
788
+ let schema = S.schema(s => ({
789
+ id: s.m(S.string),
790
+ name: s.m(S.string),
791
+ count: s.m(S.int)
792
+ }));
793
+ let derived = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema);
794
+ let native = S.toJSONSchema(schema);
795
+ globalThis.expect(sortStrings(getKeys(derived))).toEqual(sortStrings(getKeys(native)));
796
+ });
797
+ globalThis.test("required array matches between deriveObjectSchema and S.toJSONSchema", () => {
798
+ let schema = S.schema(s => ({
799
+ id: s.m(S.string),
800
+ name: s.m(S.string)
801
+ }));
802
+ let derived = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema);
803
+ let native = S.toJSONSchema(schema);
804
+ globalThis.expect(sortStrings(getRequired(derived))).toEqual(sortStrings(getRequired(native)));
805
+ });
806
+ globalThis.test("S.toJSONSchema does NOT emit x-reventless-* keys even when metadata is set", () => {
807
+ let withSpec = (schema, spec) => S.Metadata.set(schema, StateAnnotations$Reventless.stateAnnotationsId, spec);
808
+ let schema = S.schema(s => ({
809
+ entityId: s.m(S.string),
810
+ name: s.m(S.string)
811
+ }));
812
+ let schema$p = withSpec(schema, {
813
+ ids: ["entityId"],
814
+ compositeIds: emptySpec_compositeIds,
815
+ subIds: emptySpec_subIds,
816
+ compositeSubIds: emptySpec_compositeSubIds,
817
+ indexes: emptySpec_indexes,
818
+ hidden: emptySpec_hidden,
819
+ summary: emptySpec_summary,
820
+ drillTargets: emptySpec_drillTargets,
821
+ drillTargetKeys: emptySpec_drillTargetKeys,
822
+ collapsed: emptySpec_collapsed,
823
+ scan: emptySpec_scan,
824
+ scanSort: emptySpec_scanSort,
825
+ semantic: emptySpec_semantic,
826
+ metric: emptySpec_metric,
827
+ status: undefined,
828
+ groupBy: undefined,
829
+ visibility: undefined
830
+ });
831
+ let native = S.toJSONSchema(schema$p);
832
+ let entityIdSchema = getPropertyOf(native, "entityId");
833
+ globalThis.expect(Stdlib_Option.flatMap(entityIdSchema, s => getProperty(s, "x-reventless-id"))).toBe(undefined);
834
+ });
835
+ });
836
+ });
837
+
838
+ export {
839
+ getProperty,
840
+ getPropertyOf,
841
+ emptySpec,
842
+ }
843
+ /* Not a pure module */