@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
@@ -0,0 +1,541 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "contract": {
6
+ "type": "string",
7
+ "const": "MenuRuntimeBundle"
8
+ },
9
+ "version": {
10
+ "type": "number",
11
+ "const": 1
12
+ },
13
+ "applicationId": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 256
17
+ },
18
+ "sourceVersion": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 256
22
+ },
23
+ "contentHash": {
24
+ "type": "string",
25
+ "pattern": "^[a-f0-9]{64}$"
26
+ },
27
+ "menus": {
28
+ "maxItems": 128,
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "properties": {
33
+ "applicationId": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 256
37
+ },
38
+ "surface": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 256
42
+ },
43
+ "menuId": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "maxLength": 256
47
+ },
48
+ "nodes": {
49
+ "maxItems": 1024,
50
+ "type": "array",
51
+ "items": {
52
+ "anyOf": [
53
+ {
54
+ "type": "object",
55
+ "properties": {
56
+ "nodeId": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 256
60
+ },
61
+ "parentNodeId": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 256
65
+ },
66
+ "order": {
67
+ "type": "integer",
68
+ "minimum": -1000000,
69
+ "maximum": 1000000
70
+ },
71
+ "kind": {
72
+ "type": "string",
73
+ "const": "group"
74
+ },
75
+ "label": {
76
+ "anyOf": [
77
+ {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ {
82
+ "type": "object",
83
+ "propertyNames": {
84
+ "type": "string",
85
+ "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
86
+ },
87
+ "additionalProperties": {
88
+ "type": "string",
89
+ "minLength": 1
90
+ }
91
+ }
92
+ ]
93
+ },
94
+ "iconRef": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "maxLength": 256
98
+ }
99
+ },
100
+ "required": [
101
+ "nodeId",
102
+ "order",
103
+ "kind"
104
+ ],
105
+ "additionalProperties": false
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "nodeId": {
111
+ "type": "string",
112
+ "minLength": 1,
113
+ "maxLength": 256
114
+ },
115
+ "parentNodeId": {
116
+ "type": "string",
117
+ "minLength": 1,
118
+ "maxLength": 256
119
+ },
120
+ "order": {
121
+ "type": "integer",
122
+ "minimum": -1000000,
123
+ "maximum": 1000000
124
+ },
125
+ "kind": {
126
+ "type": "string",
127
+ "const": "divider"
128
+ }
129
+ },
130
+ "required": [
131
+ "nodeId",
132
+ "order",
133
+ "kind"
134
+ ],
135
+ "additionalProperties": false
136
+ },
137
+ {
138
+ "type": "object",
139
+ "properties": {
140
+ "nodeId": {
141
+ "type": "string",
142
+ "minLength": 1,
143
+ "maxLength": 256
144
+ },
145
+ "parentNodeId": {
146
+ "type": "string",
147
+ "minLength": 1,
148
+ "maxLength": 256
149
+ },
150
+ "order": {
151
+ "type": "integer",
152
+ "minimum": -1000000,
153
+ "maximum": 1000000
154
+ },
155
+ "kind": {
156
+ "type": "string",
157
+ "const": "item"
158
+ },
159
+ "label": {
160
+ "anyOf": [
161
+ {
162
+ "type": "string",
163
+ "minLength": 1
164
+ },
165
+ {
166
+ "type": "object",
167
+ "propertyNames": {
168
+ "type": "string",
169
+ "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
170
+ },
171
+ "additionalProperties": {
172
+ "type": "string",
173
+ "minLength": 1
174
+ }
175
+ }
176
+ ]
177
+ },
178
+ "iconRef": {
179
+ "type": "string",
180
+ "minLength": 1,
181
+ "maxLength": 256
182
+ },
183
+ "tone": {
184
+ "type": "string",
185
+ "enum": [
186
+ "default",
187
+ "danger"
188
+ ]
189
+ },
190
+ "behavior": {
191
+ "anyOf": [
192
+ {
193
+ "type": "object",
194
+ "properties": {
195
+ "kind": {
196
+ "type": "string",
197
+ "const": "navigate"
198
+ },
199
+ "page": {
200
+ "type": "object",
201
+ "properties": {
202
+ "applicationId": {
203
+ "type": "string",
204
+ "minLength": 1,
205
+ "maxLength": 256
206
+ },
207
+ "pageId": {
208
+ "type": "string",
209
+ "minLength": 1,
210
+ "maxLength": 256
211
+ }
212
+ },
213
+ "required": [
214
+ "applicationId",
215
+ "pageId"
216
+ ],
217
+ "additionalProperties": false
218
+ },
219
+ "activationId": {
220
+ "type": "string",
221
+ "minLength": 1,
222
+ "maxLength": 256
223
+ },
224
+ "input": {
225
+ "anyOf": [
226
+ {
227
+ "type": "object",
228
+ "properties": {
229
+ "exposure": {
230
+ "type": "string",
231
+ "const": "client"
232
+ },
233
+ "value": {
234
+ "type": "object",
235
+ "propertyNames": {
236
+ "type": "string"
237
+ },
238
+ "additionalProperties": {
239
+ "$ref": "#/$defs/__schema0"
240
+ }
241
+ }
242
+ },
243
+ "required": [
244
+ "exposure",
245
+ "value"
246
+ ],
247
+ "additionalProperties": false
248
+ },
249
+ {
250
+ "type": "object",
251
+ "properties": {
252
+ "exposure": {
253
+ "type": "string",
254
+ "const": "server"
255
+ }
256
+ },
257
+ "required": [
258
+ "exposure"
259
+ ],
260
+ "additionalProperties": false
261
+ }
262
+ ]
263
+ }
264
+ },
265
+ "required": [
266
+ "kind",
267
+ "page",
268
+ "activationId"
269
+ ],
270
+ "additionalProperties": false
271
+ },
272
+ {
273
+ "type": "object",
274
+ "properties": {
275
+ "kind": {
276
+ "type": "string",
277
+ "const": "action"
278
+ },
279
+ "actionRef": {
280
+ "type": "string",
281
+ "minLength": 1,
282
+ "maxLength": 256
283
+ },
284
+ "input": {
285
+ "type": "object",
286
+ "propertyNames": {
287
+ "type": "string"
288
+ },
289
+ "additionalProperties": {
290
+ "$ref": "#/$defs/__schema0"
291
+ }
292
+ }
293
+ },
294
+ "required": [
295
+ "kind",
296
+ "actionRef"
297
+ ],
298
+ "additionalProperties": false
299
+ }
300
+ ]
301
+ },
302
+ "access": {
303
+ "type": "object",
304
+ "properties": {
305
+ "authenticated": {
306
+ "default": true,
307
+ "type": "boolean"
308
+ },
309
+ "permissionAllOf": {
310
+ "default": [],
311
+ "type": "array",
312
+ "items": {
313
+ "type": "string",
314
+ "minLength": 1,
315
+ "maxLength": 256
316
+ }
317
+ },
318
+ "permissionAnyOf": {
319
+ "default": [],
320
+ "type": "array",
321
+ "items": {
322
+ "type": "string",
323
+ "minLength": 1,
324
+ "maxLength": 256
325
+ }
326
+ },
327
+ "featureFlags": {
328
+ "default": [],
329
+ "type": "array",
330
+ "items": {
331
+ "type": "string",
332
+ "minLength": 1,
333
+ "maxLength": 256
334
+ }
335
+ },
336
+ "requiredPermission": {
337
+ "type": "string",
338
+ "minLength": 1,
339
+ "maxLength": 256
340
+ }
341
+ },
342
+ "required": [
343
+ "authenticated",
344
+ "permissionAllOf",
345
+ "permissionAnyOf",
346
+ "featureFlags"
347
+ ],
348
+ "additionalProperties": false
349
+ }
350
+ },
351
+ "required": [
352
+ "nodeId",
353
+ "order",
354
+ "kind",
355
+ "label",
356
+ "behavior",
357
+ "access"
358
+ ],
359
+ "additionalProperties": false
360
+ }
361
+ ]
362
+ }
363
+ },
364
+ "contributions": {
365
+ "maxItems": 1024,
366
+ "type": "array",
367
+ "items": {
368
+ "type": "object",
369
+ "properties": {
370
+ "providerId": {
371
+ "type": "string",
372
+ "minLength": 1,
373
+ "maxLength": 256
374
+ },
375
+ "parentNodeId": {
376
+ "type": "string",
377
+ "minLength": 1,
378
+ "maxLength": 256
379
+ },
380
+ "order": {
381
+ "type": "integer",
382
+ "minimum": -1000000,
383
+ "maximum": 1000000
384
+ }
385
+ },
386
+ "required": [
387
+ "providerId",
388
+ "order"
389
+ ],
390
+ "additionalProperties": false
391
+ }
392
+ }
393
+ },
394
+ "required": [
395
+ "applicationId",
396
+ "surface",
397
+ "menuId",
398
+ "nodes",
399
+ "contributions"
400
+ ],
401
+ "additionalProperties": false
402
+ }
403
+ },
404
+ "navigationTargets": {
405
+ "type": "array",
406
+ "items": {
407
+ "type": "object",
408
+ "properties": {
409
+ "page": {
410
+ "type": "object",
411
+ "properties": {
412
+ "applicationId": {
413
+ "type": "string",
414
+ "minLength": 1,
415
+ "maxLength": 256
416
+ },
417
+ "pageId": {
418
+ "type": "string",
419
+ "minLength": 1,
420
+ "maxLength": 256
421
+ }
422
+ },
423
+ "required": [
424
+ "applicationId",
425
+ "pageId"
426
+ ],
427
+ "additionalProperties": false
428
+ },
429
+ "activationId": {
430
+ "type": "string",
431
+ "minLength": 1,
432
+ "maxLength": 256
433
+ },
434
+ "input": {
435
+ "anyOf": [
436
+ {
437
+ "type": "object",
438
+ "properties": {
439
+ "exposure": {
440
+ "type": "string",
441
+ "const": "client"
442
+ },
443
+ "value": {
444
+ "type": "object",
445
+ "propertyNames": {
446
+ "type": "string"
447
+ },
448
+ "additionalProperties": {
449
+ "$ref": "#/$defs/__schema0"
450
+ }
451
+ }
452
+ },
453
+ "required": [
454
+ "exposure",
455
+ "value"
456
+ ],
457
+ "additionalProperties": false
458
+ },
459
+ {
460
+ "type": "object",
461
+ "properties": {
462
+ "exposure": {
463
+ "type": "string",
464
+ "const": "server"
465
+ }
466
+ },
467
+ "required": [
468
+ "exposure"
469
+ ],
470
+ "additionalProperties": false
471
+ }
472
+ ]
473
+ }
474
+ },
475
+ "required": [
476
+ "page",
477
+ "activationId"
478
+ ],
479
+ "additionalProperties": false
480
+ }
481
+ },
482
+ "sourceMap": {
483
+ "default": {},
484
+ "type": "object",
485
+ "propertyNames": {
486
+ "type": "string"
487
+ },
488
+ "additionalProperties": {
489
+ "type": "string",
490
+ "minLength": 1,
491
+ "maxLength": 256
492
+ }
493
+ }
494
+ },
495
+ "required": [
496
+ "contract",
497
+ "version",
498
+ "applicationId",
499
+ "sourceVersion",
500
+ "contentHash",
501
+ "menus",
502
+ "navigationTargets",
503
+ "sourceMap"
504
+ ],
505
+ "additionalProperties": false,
506
+ "$defs": {
507
+ "__schema0": {
508
+ "anyOf": [
509
+ {
510
+ "type": "string"
511
+ },
512
+ {
513
+ "type": "number"
514
+ },
515
+ {
516
+ "type": "boolean"
517
+ },
518
+ {
519
+ "type": "null"
520
+ },
521
+ {
522
+ "type": "array",
523
+ "items": {
524
+ "$ref": "#/$defs/__schema0"
525
+ }
526
+ },
527
+ {
528
+ "type": "object",
529
+ "propertyNames": {
530
+ "type": "string"
531
+ },
532
+ "additionalProperties": {
533
+ "$ref": "#/$defs/__schema0"
534
+ }
535
+ }
536
+ ]
537
+ }
538
+ },
539
+ "$id": "https://schemas.infmonkeys.com/contracts/menu-runtime-bundle.schema.json",
540
+ "title": "menu-runtime-bundle"
541
+ }
@@ -334,6 +334,20 @@
334
334
  ],
335
335
  "additionalProperties": false
336
336
  },
337
+ "input": {
338
+ "type": "object",
339
+ "properties": {
340
+ "schemaRef": {
341
+ "type": "string",
342
+ "minLength": 1,
343
+ "maxLength": 256
344
+ }
345
+ },
346
+ "required": [
347
+ "schemaRef"
348
+ ],
349
+ "additionalProperties": false
350
+ },
337
351
  "rendererConfig": {
338
352
  "type": "object",
339
353
  "properties": {
@@ -341,6 +341,20 @@
341
341
  ],
342
342
  "additionalProperties": false
343
343
  },
344
+ "input": {
345
+ "type": "object",
346
+ "properties": {
347
+ "schemaRef": {
348
+ "type": "string",
349
+ "minLength": 1,
350
+ "maxLength": 256
351
+ }
352
+ },
353
+ "required": [
354
+ "schemaRef"
355
+ ],
356
+ "additionalProperties": false
357
+ },
344
358
  "rendererConfig": {
345
359
  "type": "object",
346
360
  "properties": {