@inf-monkeys-tech/monkeys 1.0.35 → 1.0.37

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 (63) hide show
  1. package/lib/contracts/common.d.ts +2 -1
  2. package/lib/contracts/common.d.ts.map +1 -1
  3. package/lib/contracts/common.js.map +1 -1
  4. package/lib/contracts/index.d.ts +1 -0
  5. package/lib/contracts/index.d.ts.map +1 -1
  6. package/lib/contracts/index.js +1 -0
  7. package/lib/contracts/index.js.map +1 -1
  8. package/lib/contracts/menu.d.ts +790 -0
  9. package/lib/contracts/menu.d.ts.map +1 -0
  10. package/lib/contracts/menu.js +319 -0
  11. package/lib/contracts/menu.js.map +1 -0
  12. package/lib/contracts/page.d.ts +6 -0
  13. package/lib/contracts/page.d.ts.map +1 -1
  14. package/lib/contracts/page.js +6 -0
  15. package/lib/contracts/page.js.map +1 -1
  16. package/lib/contracts/semantic.d.ts +59 -0
  17. package/lib/contracts/semantic.d.ts.map +1 -1
  18. package/lib/contracts/semantic.js +2 -0
  19. package/lib/contracts/semantic.js.map +1 -1
  20. package/lib/contracts/tenant.d.ts +445 -4
  21. package/lib/contracts/tenant.d.ts.map +1 -1
  22. package/lib/contracts/tenant.js +113 -2
  23. package/lib/contracts/tenant.js.map +1 -1
  24. package/lib/esm/contracts/index.mjs +1166 -746
  25. package/lib/esm/contracts/index.mjs.map +1 -1
  26. package/lib/esm/index.mjs +1692 -749
  27. package/lib/esm/index.mjs.map +1 -1
  28. package/lib/esm/runtime/index.mjs +1234 -342
  29. package/lib/esm/runtime/index.mjs.map +1 -1
  30. package/lib/esm/schemas/index.mjs +1158 -746
  31. package/lib/esm/schemas/index.mjs.map +1 -1
  32. package/lib/json-schema/index.json +3 -0
  33. package/lib/json-schema/menu-definition-set.schema.json +411 -0
  34. package/lib/json-schema/menu-definition.schema.json +385 -0
  35. package/lib/json-schema/menu-runtime-bundle.schema.json +541 -0
  36. package/lib/json-schema/page-definition.schema.json +14 -0
  37. package/lib/json-schema/page-runtime-descriptor.schema.json +14 -0
  38. package/lib/json-schema/product-declaration.schema.json +369 -1
  39. package/lib/json-schema/tenant-product-config.schema.json +537 -2
  40. package/lib/json-schema/tenant-runtime-config.schema.json +667 -2
  41. package/lib/runtime/declaration-compiler.d.ts +2 -0
  42. package/lib/runtime/declaration-compiler.d.ts.map +1 -1
  43. package/lib/runtime/declaration-compiler.js +4 -0
  44. package/lib/runtime/declaration-compiler.js.map +1 -1
  45. package/lib/runtime/index.d.ts +1 -0
  46. package/lib/runtime/index.d.ts.map +1 -1
  47. package/lib/runtime/index.js +1 -0
  48. package/lib/runtime/index.js.map +1 -1
  49. package/lib/runtime/menu-compiler.d.ts +58 -0
  50. package/lib/runtime/menu-compiler.d.ts.map +1 -0
  51. package/lib/runtime/menu-compiler.js +436 -0
  52. package/lib/runtime/menu-compiler.js.map +1 -0
  53. package/lib/runtime/tenant-config.d.ts +2 -0
  54. package/lib/runtime/tenant-config.d.ts.map +1 -1
  55. package/lib/runtime/tenant-config.js +1 -0
  56. package/lib/runtime/tenant-config.js.map +1 -1
  57. package/lib/schemas/index.d.ts +477 -3
  58. package/lib/schemas/index.d.ts.map +1 -1
  59. package/lib/schemas/index.js +46 -2
  60. package/lib/schemas/index.js.map +1 -1
  61. package/package.json +1 -1
  62. package/test/fixtures/current-user-menu-profile.v1.json +22 -0
  63. package/test/fixtures/menu-definition.v1.json +41 -0
@@ -166,6 +166,511 @@
166
166
  "type": "string"
167
167
  }
168
168
  },
169
+ "menuBundle": {
170
+ "type": "object",
171
+ "properties": {
172
+ "contract": {
173
+ "type": "string",
174
+ "const": "MenuRuntimeBundle"
175
+ },
176
+ "version": {
177
+ "type": "number",
178
+ "const": 1
179
+ },
180
+ "applicationId": {
181
+ "type": "string",
182
+ "minLength": 1,
183
+ "maxLength": 256
184
+ },
185
+ "sourceVersion": {
186
+ "type": "string",
187
+ "minLength": 1,
188
+ "maxLength": 256
189
+ },
190
+ "contentHash": {
191
+ "type": "string",
192
+ "pattern": "^[a-f0-9]{64}$"
193
+ },
194
+ "menus": {
195
+ "maxItems": 128,
196
+ "type": "array",
197
+ "items": {
198
+ "type": "object",
199
+ "properties": {
200
+ "applicationId": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 256
204
+ },
205
+ "surface": {
206
+ "type": "string",
207
+ "minLength": 1,
208
+ "maxLength": 256
209
+ },
210
+ "menuId": {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "maxLength": 256
214
+ },
215
+ "nodes": {
216
+ "maxItems": 1024,
217
+ "type": "array",
218
+ "items": {
219
+ "anyOf": [
220
+ {
221
+ "type": "object",
222
+ "properties": {
223
+ "nodeId": {
224
+ "type": "string",
225
+ "minLength": 1,
226
+ "maxLength": 256
227
+ },
228
+ "parentNodeId": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "maxLength": 256
232
+ },
233
+ "order": {
234
+ "type": "integer",
235
+ "minimum": -1000000,
236
+ "maximum": 1000000
237
+ },
238
+ "kind": {
239
+ "type": "string",
240
+ "const": "group"
241
+ },
242
+ "label": {
243
+ "anyOf": [
244
+ {
245
+ "type": "string",
246
+ "minLength": 1
247
+ },
248
+ {
249
+ "type": "object",
250
+ "propertyNames": {
251
+ "type": "string",
252
+ "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
253
+ },
254
+ "additionalProperties": {
255
+ "type": "string",
256
+ "minLength": 1
257
+ }
258
+ }
259
+ ]
260
+ },
261
+ "iconRef": {
262
+ "type": "string",
263
+ "minLength": 1,
264
+ "maxLength": 256
265
+ }
266
+ },
267
+ "required": [
268
+ "nodeId",
269
+ "order",
270
+ "kind"
271
+ ],
272
+ "additionalProperties": false
273
+ },
274
+ {
275
+ "type": "object",
276
+ "properties": {
277
+ "nodeId": {
278
+ "type": "string",
279
+ "minLength": 1,
280
+ "maxLength": 256
281
+ },
282
+ "parentNodeId": {
283
+ "type": "string",
284
+ "minLength": 1,
285
+ "maxLength": 256
286
+ },
287
+ "order": {
288
+ "type": "integer",
289
+ "minimum": -1000000,
290
+ "maximum": 1000000
291
+ },
292
+ "kind": {
293
+ "type": "string",
294
+ "const": "divider"
295
+ }
296
+ },
297
+ "required": [
298
+ "nodeId",
299
+ "order",
300
+ "kind"
301
+ ],
302
+ "additionalProperties": false
303
+ },
304
+ {
305
+ "type": "object",
306
+ "properties": {
307
+ "nodeId": {
308
+ "type": "string",
309
+ "minLength": 1,
310
+ "maxLength": 256
311
+ },
312
+ "parentNodeId": {
313
+ "type": "string",
314
+ "minLength": 1,
315
+ "maxLength": 256
316
+ },
317
+ "order": {
318
+ "type": "integer",
319
+ "minimum": -1000000,
320
+ "maximum": 1000000
321
+ },
322
+ "kind": {
323
+ "type": "string",
324
+ "const": "item"
325
+ },
326
+ "label": {
327
+ "anyOf": [
328
+ {
329
+ "type": "string",
330
+ "minLength": 1
331
+ },
332
+ {
333
+ "type": "object",
334
+ "propertyNames": {
335
+ "type": "string",
336
+ "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
337
+ },
338
+ "additionalProperties": {
339
+ "type": "string",
340
+ "minLength": 1
341
+ }
342
+ }
343
+ ]
344
+ },
345
+ "iconRef": {
346
+ "type": "string",
347
+ "minLength": 1,
348
+ "maxLength": 256
349
+ },
350
+ "tone": {
351
+ "type": "string",
352
+ "enum": [
353
+ "default",
354
+ "danger"
355
+ ]
356
+ },
357
+ "behavior": {
358
+ "anyOf": [
359
+ {
360
+ "type": "object",
361
+ "properties": {
362
+ "kind": {
363
+ "type": "string",
364
+ "const": "navigate"
365
+ },
366
+ "page": {
367
+ "type": "object",
368
+ "properties": {
369
+ "applicationId": {
370
+ "type": "string",
371
+ "minLength": 1,
372
+ "maxLength": 256
373
+ },
374
+ "pageId": {
375
+ "type": "string",
376
+ "minLength": 1,
377
+ "maxLength": 256
378
+ }
379
+ },
380
+ "required": [
381
+ "applicationId",
382
+ "pageId"
383
+ ],
384
+ "additionalProperties": false
385
+ },
386
+ "activationId": {
387
+ "type": "string",
388
+ "minLength": 1,
389
+ "maxLength": 256
390
+ },
391
+ "input": {
392
+ "anyOf": [
393
+ {
394
+ "type": "object",
395
+ "properties": {
396
+ "exposure": {
397
+ "type": "string",
398
+ "const": "client"
399
+ },
400
+ "value": {
401
+ "type": "object",
402
+ "propertyNames": {
403
+ "type": "string"
404
+ },
405
+ "additionalProperties": {
406
+ "$ref": "#/$defs/__schema0"
407
+ }
408
+ }
409
+ },
410
+ "required": [
411
+ "exposure",
412
+ "value"
413
+ ],
414
+ "additionalProperties": false
415
+ },
416
+ {
417
+ "type": "object",
418
+ "properties": {
419
+ "exposure": {
420
+ "type": "string",
421
+ "const": "server"
422
+ }
423
+ },
424
+ "required": [
425
+ "exposure"
426
+ ],
427
+ "additionalProperties": false
428
+ }
429
+ ]
430
+ }
431
+ },
432
+ "required": [
433
+ "kind",
434
+ "page",
435
+ "activationId"
436
+ ],
437
+ "additionalProperties": false
438
+ },
439
+ {
440
+ "type": "object",
441
+ "properties": {
442
+ "kind": {
443
+ "type": "string",
444
+ "const": "action"
445
+ },
446
+ "actionRef": {
447
+ "type": "string",
448
+ "minLength": 1,
449
+ "maxLength": 256
450
+ },
451
+ "input": {
452
+ "type": "object",
453
+ "propertyNames": {
454
+ "type": "string"
455
+ },
456
+ "additionalProperties": {
457
+ "$ref": "#/$defs/__schema0"
458
+ }
459
+ }
460
+ },
461
+ "required": [
462
+ "kind",
463
+ "actionRef"
464
+ ],
465
+ "additionalProperties": false
466
+ }
467
+ ]
468
+ },
469
+ "access": {
470
+ "type": "object",
471
+ "properties": {
472
+ "authenticated": {
473
+ "default": true,
474
+ "type": "boolean"
475
+ },
476
+ "permissionAllOf": {
477
+ "default": [],
478
+ "type": "array",
479
+ "items": {
480
+ "type": "string",
481
+ "minLength": 1,
482
+ "maxLength": 256
483
+ }
484
+ },
485
+ "permissionAnyOf": {
486
+ "default": [],
487
+ "type": "array",
488
+ "items": {
489
+ "type": "string",
490
+ "minLength": 1,
491
+ "maxLength": 256
492
+ }
493
+ },
494
+ "featureFlags": {
495
+ "default": [],
496
+ "type": "array",
497
+ "items": {
498
+ "type": "string",
499
+ "minLength": 1,
500
+ "maxLength": 256
501
+ }
502
+ },
503
+ "requiredPermission": {
504
+ "type": "string",
505
+ "minLength": 1,
506
+ "maxLength": 256
507
+ }
508
+ },
509
+ "required": [
510
+ "authenticated",
511
+ "permissionAllOf",
512
+ "permissionAnyOf",
513
+ "featureFlags"
514
+ ],
515
+ "additionalProperties": false
516
+ }
517
+ },
518
+ "required": [
519
+ "nodeId",
520
+ "order",
521
+ "kind",
522
+ "label",
523
+ "behavior",
524
+ "access"
525
+ ],
526
+ "additionalProperties": false
527
+ }
528
+ ]
529
+ }
530
+ },
531
+ "contributions": {
532
+ "maxItems": 1024,
533
+ "type": "array",
534
+ "items": {
535
+ "type": "object",
536
+ "properties": {
537
+ "providerId": {
538
+ "type": "string",
539
+ "minLength": 1,
540
+ "maxLength": 256
541
+ },
542
+ "parentNodeId": {
543
+ "type": "string",
544
+ "minLength": 1,
545
+ "maxLength": 256
546
+ },
547
+ "order": {
548
+ "type": "integer",
549
+ "minimum": -1000000,
550
+ "maximum": 1000000
551
+ }
552
+ },
553
+ "required": [
554
+ "providerId",
555
+ "order"
556
+ ],
557
+ "additionalProperties": false
558
+ }
559
+ }
560
+ },
561
+ "required": [
562
+ "applicationId",
563
+ "surface",
564
+ "menuId",
565
+ "nodes",
566
+ "contributions"
567
+ ],
568
+ "additionalProperties": false
569
+ }
570
+ },
571
+ "navigationTargets": {
572
+ "type": "array",
573
+ "items": {
574
+ "type": "object",
575
+ "properties": {
576
+ "page": {
577
+ "type": "object",
578
+ "properties": {
579
+ "applicationId": {
580
+ "type": "string",
581
+ "minLength": 1,
582
+ "maxLength": 256
583
+ },
584
+ "pageId": {
585
+ "type": "string",
586
+ "minLength": 1,
587
+ "maxLength": 256
588
+ }
589
+ },
590
+ "required": [
591
+ "applicationId",
592
+ "pageId"
593
+ ],
594
+ "additionalProperties": false
595
+ },
596
+ "activationId": {
597
+ "type": "string",
598
+ "minLength": 1,
599
+ "maxLength": 256
600
+ },
601
+ "input": {
602
+ "anyOf": [
603
+ {
604
+ "type": "object",
605
+ "properties": {
606
+ "exposure": {
607
+ "type": "string",
608
+ "const": "client"
609
+ },
610
+ "value": {
611
+ "type": "object",
612
+ "propertyNames": {
613
+ "type": "string"
614
+ },
615
+ "additionalProperties": {
616
+ "$ref": "#/$defs/__schema0"
617
+ }
618
+ }
619
+ },
620
+ "required": [
621
+ "exposure",
622
+ "value"
623
+ ],
624
+ "additionalProperties": false
625
+ },
626
+ {
627
+ "type": "object",
628
+ "properties": {
629
+ "exposure": {
630
+ "type": "string",
631
+ "const": "server"
632
+ }
633
+ },
634
+ "required": [
635
+ "exposure"
636
+ ],
637
+ "additionalProperties": false
638
+ }
639
+ ]
640
+ }
641
+ },
642
+ "required": [
643
+ "page",
644
+ "activationId"
645
+ ],
646
+ "additionalProperties": false
647
+ }
648
+ },
649
+ "sourceMap": {
650
+ "default": {},
651
+ "type": "object",
652
+ "propertyNames": {
653
+ "type": "string"
654
+ },
655
+ "additionalProperties": {
656
+ "type": "string",
657
+ "minLength": 1,
658
+ "maxLength": 256
659
+ }
660
+ }
661
+ },
662
+ "required": [
663
+ "contract",
664
+ "version",
665
+ "applicationId",
666
+ "sourceVersion",
667
+ "contentHash",
668
+ "menus",
669
+ "navigationTargets",
670
+ "sourceMap"
671
+ ],
672
+ "additionalProperties": false
673
+ },
169
674
  "applicationConfig": {
170
675
  "type": "object",
171
676
  "properties": {
@@ -663,9 +1168,155 @@
663
1168
  "type": "array",
664
1169
  "items": {
665
1170
  "type": "string",
666
- "minLength": 1,
667
- "maxLength": 256
1171
+ "enum": [
1172
+ "dark-mode",
1173
+ "language",
1174
+ "settings",
1175
+ "logout"
1176
+ ]
668
1177
  }
1178
+ },
1179
+ {
1180
+ "type": "object",
1181
+ "properties": {
1182
+ "version": {
1183
+ "type": "number",
1184
+ "const": 1
1185
+ },
1186
+ "sections": {
1187
+ "maxItems": 20,
1188
+ "type": "array",
1189
+ "items": {
1190
+ "type": "object",
1191
+ "properties": {
1192
+ "id": {
1193
+ "type": "string",
1194
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1195
+ },
1196
+ "label": {
1197
+ "anyOf": [
1198
+ {
1199
+ "type": "string",
1200
+ "minLength": 1
1201
+ },
1202
+ {
1203
+ "type": "object",
1204
+ "propertyNames": {
1205
+ "type": "string",
1206
+ "minLength": 1
1207
+ },
1208
+ "additionalProperties": {
1209
+ "type": "string",
1210
+ "minLength": 1
1211
+ }
1212
+ }
1213
+ ]
1214
+ },
1215
+ "dividerBefore": {
1216
+ "type": "boolean"
1217
+ },
1218
+ "items": {
1219
+ "type": "array",
1220
+ "items": {
1221
+ "anyOf": [
1222
+ {
1223
+ "type": "object",
1224
+ "properties": {
1225
+ "id": {
1226
+ "type": "string",
1227
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1228
+ },
1229
+ "kind": {
1230
+ "type": "string",
1231
+ "const": "navigation"
1232
+ },
1233
+ "ref": {
1234
+ "type": "string",
1235
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1236
+ }
1237
+ },
1238
+ "required": [
1239
+ "id",
1240
+ "kind",
1241
+ "ref"
1242
+ ],
1243
+ "additionalProperties": false
1244
+ },
1245
+ {
1246
+ "type": "object",
1247
+ "properties": {
1248
+ "id": {
1249
+ "type": "string",
1250
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1251
+ },
1252
+ "kind": {
1253
+ "type": "string",
1254
+ "const": "control"
1255
+ },
1256
+ "ref": {
1257
+ "type": "string",
1258
+ "enum": [
1259
+ "dark-mode",
1260
+ "language"
1261
+ ]
1262
+ }
1263
+ },
1264
+ "required": [
1265
+ "id",
1266
+ "kind",
1267
+ "ref"
1268
+ ],
1269
+ "additionalProperties": false
1270
+ },
1271
+ {
1272
+ "type": "object",
1273
+ "properties": {
1274
+ "id": {
1275
+ "type": "string",
1276
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1277
+ },
1278
+ "kind": {
1279
+ "type": "string",
1280
+ "const": "action"
1281
+ },
1282
+ "ref": {
1283
+ "type": "string",
1284
+ "enum": [
1285
+ "logout"
1286
+ ]
1287
+ },
1288
+ "tone": {
1289
+ "type": "string",
1290
+ "enum": [
1291
+ "default",
1292
+ "danger"
1293
+ ]
1294
+ }
1295
+ },
1296
+ "required": [
1297
+ "id",
1298
+ "kind",
1299
+ "ref"
1300
+ ],
1301
+ "additionalProperties": false
1302
+ }
1303
+ ]
1304
+ }
1305
+ }
1306
+ },
1307
+ "required": [
1308
+ "id",
1309
+ "items"
1310
+ ],
1311
+ "additionalProperties": false
1312
+ }
1313
+ }
1314
+ },
1315
+ "required": [
1316
+ "version",
1317
+ "sections"
1318
+ ],
1319
+ "additionalProperties": false
669
1320
  }
670
1321
  ]
671
1322
  },
@@ -1346,6 +1997,20 @@
1346
1997
  ],
1347
1998
  "additionalProperties": false
1348
1999
  },
2000
+ "input": {
2001
+ "type": "object",
2002
+ "properties": {
2003
+ "schemaRef": {
2004
+ "type": "string",
2005
+ "minLength": 1,
2006
+ "maxLength": 256
2007
+ }
2008
+ },
2009
+ "required": [
2010
+ "schemaRef"
2011
+ ],
2012
+ "additionalProperties": false
2013
+ },
1349
2014
  "rendererConfig": {
1350
2015
  "type": "object",
1351
2016
  "properties": {