@metalcloud/dashboard-schema 0.0.0-stage → 0.3.0

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.
@@ -0,0 +1,965 @@
1
+ {
2
+ "$id": "https://metalcloud.dev/dashboard.schema.v1.json",
3
+ "$ref": "#/definitions/DashboardSchema",
4
+ "definitions": {
5
+ "DashboardSchema": {
6
+ "type": "object",
7
+ "properties": {
8
+ "schemaVersion": {
9
+ "type": "number",
10
+ "const": 1
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$"
15
+ },
16
+ "title": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "description": {
21
+ "type": "string"
22
+ },
23
+ "layout": {
24
+ "type": "object",
25
+ "properties": {
26
+ "columns": {
27
+ "type": "number",
28
+ "const": 12
29
+ },
30
+ "rowHeight": {
31
+ "type": "integer",
32
+ "minimum": 20,
33
+ "maximum": 200
34
+ },
35
+ "breakpoints": {
36
+ "type": "object",
37
+ "properties": {
38
+ "lg": {
39
+ "type": "integer",
40
+ "minimum": 0
41
+ },
42
+ "md": {
43
+ "type": "integer",
44
+ "minimum": 0
45
+ },
46
+ "sm": {
47
+ "type": "integer",
48
+ "minimum": 0
49
+ },
50
+ "xs": {
51
+ "type": "integer",
52
+ "minimum": 0
53
+ }
54
+ },
55
+ "additionalProperties": false
56
+ },
57
+ "gapX": {
58
+ "type": "integer",
59
+ "minimum": 0,
60
+ "maximum": 48
61
+ },
62
+ "gapY": {
63
+ "type": "integer",
64
+ "minimum": 0,
65
+ "maximum": 48
66
+ },
67
+ "fit": {
68
+ "type": "string",
69
+ "enum": [
70
+ "grid",
71
+ "content"
72
+ ]
73
+ },
74
+ "showHeader": {
75
+ "type": "boolean"
76
+ }
77
+ },
78
+ "required": [
79
+ "columns",
80
+ "rowHeight"
81
+ ],
82
+ "additionalProperties": true
83
+ },
84
+ "filters": {
85
+ "type": "array",
86
+ "items": {
87
+ "anyOf": [
88
+ {
89
+ "type": "object",
90
+ "properties": {
91
+ "id": {
92
+ "$ref": "#/definitions/DashboardSchema/properties/id"
93
+ },
94
+ "label": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "hidden": {
99
+ "type": "boolean"
100
+ },
101
+ "type": {
102
+ "type": "string",
103
+ "const": "dateRange"
104
+ },
105
+ "default": {
106
+ "anyOf": [
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "preset": {
111
+ "type": "string",
112
+ "enum": [
113
+ "today",
114
+ "yesterday",
115
+ "last7d",
116
+ "last30d",
117
+ "last90d",
118
+ "thisWeek",
119
+ "thisMonth",
120
+ "lastMonth",
121
+ "thisYear"
122
+ ]
123
+ }
124
+ },
125
+ "required": [
126
+ "preset"
127
+ ],
128
+ "additionalProperties": false
129
+ },
130
+ {
131
+ "type": "object",
132
+ "properties": {
133
+ "from": {
134
+ "type": "string",
135
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}(T[\\d:.]+(Z|[+-]\\d{2}:\\d{2})?)?$"
136
+ },
137
+ "to": {
138
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/default/anyOf/1/properties/from"
139
+ }
140
+ },
141
+ "required": [
142
+ "from",
143
+ "to"
144
+ ],
145
+ "additionalProperties": false
146
+ }
147
+ ]
148
+ },
149
+ "presets": {
150
+ "type": "array",
151
+ "items": {
152
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/default/anyOf/0/properties/preset"
153
+ }
154
+ }
155
+ },
156
+ "required": [
157
+ "id",
158
+ "label",
159
+ "type"
160
+ ],
161
+ "additionalProperties": true
162
+ },
163
+ {
164
+ "type": "object",
165
+ "properties": {
166
+ "id": {
167
+ "$ref": "#/definitions/DashboardSchema/properties/id"
168
+ },
169
+ "label": {
170
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/label"
171
+ },
172
+ "hidden": {
173
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/hidden"
174
+ },
175
+ "type": {
176
+ "type": "string",
177
+ "const": "select"
178
+ },
179
+ "default": {
180
+ "type": [
181
+ "string",
182
+ "number",
183
+ "boolean",
184
+ "null"
185
+ ]
186
+ },
187
+ "options": {
188
+ "type": "object",
189
+ "properties": {
190
+ "static": {
191
+ "type": "array",
192
+ "items": {
193
+ "type": "object",
194
+ "properties": {
195
+ "label": {
196
+ "type": "string"
197
+ },
198
+ "value": {
199
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/default"
200
+ }
201
+ },
202
+ "required": [
203
+ "label",
204
+ "value"
205
+ ],
206
+ "additionalProperties": false
207
+ }
208
+ },
209
+ "dataSource": {
210
+ "$ref": "#/definitions/DashboardSchema/properties/id"
211
+ },
212
+ "labelKey": {
213
+ "type": "string",
214
+ "minLength": 1,
215
+ "pattern": "^[^\\s()[\\]{};'\"`]+$"
216
+ },
217
+ "valueKey": {
218
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/options/properties/labelKey"
219
+ }
220
+ },
221
+ "additionalProperties": true
222
+ },
223
+ "clearable": {
224
+ "type": "boolean"
225
+ },
226
+ "allLabel": {
227
+ "type": "string"
228
+ },
229
+ "stepper": {
230
+ "type": "boolean"
231
+ }
232
+ },
233
+ "required": [
234
+ "id",
235
+ "label",
236
+ "type",
237
+ "options"
238
+ ],
239
+ "additionalProperties": true
240
+ },
241
+ {
242
+ "type": "object",
243
+ "properties": {
244
+ "id": {
245
+ "$ref": "#/definitions/DashboardSchema/properties/id"
246
+ },
247
+ "label": {
248
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/label"
249
+ },
250
+ "hidden": {
251
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/hidden"
252
+ },
253
+ "type": {
254
+ "type": "string",
255
+ "const": "multiSelect"
256
+ },
257
+ "default": {
258
+ "type": "array",
259
+ "items": {
260
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/default"
261
+ }
262
+ },
263
+ "options": {
264
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/options"
265
+ },
266
+ "allLabel": {
267
+ "type": "string"
268
+ }
269
+ },
270
+ "required": [
271
+ "id",
272
+ "label",
273
+ "type",
274
+ "options"
275
+ ],
276
+ "additionalProperties": true
277
+ },
278
+ {
279
+ "type": "object",
280
+ "properties": {
281
+ "id": {
282
+ "$ref": "#/definitions/DashboardSchema/properties/id"
283
+ },
284
+ "label": {
285
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/label"
286
+ },
287
+ "hidden": {
288
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/hidden"
289
+ },
290
+ "type": {
291
+ "type": "string",
292
+ "const": "search"
293
+ },
294
+ "default": {
295
+ "type": "string"
296
+ },
297
+ "debounceMs": {
298
+ "type": "integer",
299
+ "minimum": 0,
300
+ "maximum": 5000
301
+ }
302
+ },
303
+ "required": [
304
+ "id",
305
+ "label",
306
+ "type"
307
+ ],
308
+ "additionalProperties": true
309
+ },
310
+ {
311
+ "type": "object",
312
+ "properties": {
313
+ "id": {
314
+ "$ref": "#/definitions/DashboardSchema/properties/id"
315
+ },
316
+ "label": {
317
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/label"
318
+ },
319
+ "hidden": {
320
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/0/properties/hidden"
321
+ },
322
+ "type": {
323
+ "type": "string",
324
+ "const": "toggle"
325
+ },
326
+ "default": {
327
+ "type": "boolean"
328
+ }
329
+ },
330
+ "required": [
331
+ "id",
332
+ "label",
333
+ "type"
334
+ ],
335
+ "additionalProperties": true
336
+ }
337
+ ]
338
+ },
339
+ "default": []
340
+ },
341
+ "dataSources": {
342
+ "type": "array",
343
+ "items": {
344
+ "anyOf": [
345
+ {
346
+ "type": "object",
347
+ "properties": {
348
+ "id": {
349
+ "$ref": "#/definitions/DashboardSchema/properties/id"
350
+ },
351
+ "kind": {
352
+ "type": "string",
353
+ "const": "http"
354
+ },
355
+ "request": {
356
+ "type": "object",
357
+ "properties": {
358
+ "url": {
359
+ "type": "string",
360
+ "minLength": 1
361
+ },
362
+ "method": {
363
+ "type": "string",
364
+ "enum": [
365
+ "GET",
366
+ "POST"
367
+ ]
368
+ },
369
+ "params": {
370
+ "type": "object",
371
+ "additionalProperties": {
372
+ "anyOf": [
373
+ {
374
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/default"
375
+ },
376
+ {
377
+ "type": "object",
378
+ "properties": {
379
+ "$filter": {
380
+ "type": "string",
381
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*$"
382
+ }
383
+ },
384
+ "required": [
385
+ "$filter"
386
+ ],
387
+ "additionalProperties": false
388
+ },
389
+ {
390
+ "type": "object",
391
+ "properties": {
392
+ "$var": {
393
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties/anyOf/1/properties/$filter"
394
+ }
395
+ },
396
+ "required": [
397
+ "$var"
398
+ ],
399
+ "additionalProperties": false
400
+ },
401
+ {
402
+ "type": "array",
403
+ "items": {
404
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties"
405
+ }
406
+ },
407
+ {
408
+ "type": "object",
409
+ "additionalProperties": {
410
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties"
411
+ }
412
+ }
413
+ ]
414
+ }
415
+ },
416
+ "body": {
417
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties"
418
+ }
419
+ },
420
+ "required": [
421
+ "url"
422
+ ],
423
+ "additionalProperties": true
424
+ },
425
+ "transform": {
426
+ "type": "array",
427
+ "items": {
428
+ "anyOf": [
429
+ {
430
+ "type": "string",
431
+ "minLength": 1
432
+ },
433
+ {
434
+ "type": "object",
435
+ "properties": {
436
+ "name": {
437
+ "type": "string",
438
+ "minLength": 1
439
+ },
440
+ "args": {
441
+ "type": "object",
442
+ "additionalProperties": {
443
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties"
444
+ }
445
+ }
446
+ },
447
+ "required": [
448
+ "name"
449
+ ],
450
+ "additionalProperties": false
451
+ }
452
+ ]
453
+ }
454
+ },
455
+ "refreshIntervalSec": {
456
+ "type": "integer",
457
+ "minimum": 5
458
+ }
459
+ },
460
+ "required": [
461
+ "id",
462
+ "kind",
463
+ "request"
464
+ ],
465
+ "additionalProperties": true
466
+ },
467
+ {
468
+ "type": "object",
469
+ "properties": {
470
+ "id": {
471
+ "$ref": "#/definitions/DashboardSchema/properties/id"
472
+ },
473
+ "kind": {
474
+ "type": "string",
475
+ "const": "static"
476
+ },
477
+ "static": {},
478
+ "transform": {
479
+ "type": "array",
480
+ "items": {
481
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/transform/items"
482
+ }
483
+ }
484
+ },
485
+ "required": [
486
+ "id",
487
+ "kind"
488
+ ],
489
+ "additionalProperties": true
490
+ }
491
+ ]
492
+ },
493
+ "default": []
494
+ },
495
+ "widgets": {
496
+ "type": "array",
497
+ "items": {
498
+ "type": "object",
499
+ "properties": {
500
+ "id": {
501
+ "$ref": "#/definitions/DashboardSchema/properties/id"
502
+ },
503
+ "type": {
504
+ "type": "string",
505
+ "minLength": 1
506
+ },
507
+ "title": {
508
+ "type": "string"
509
+ },
510
+ "subtitle": {
511
+ "type": "string"
512
+ },
513
+ "info": {
514
+ "type": "string",
515
+ "maxLength": 2000
516
+ },
517
+ "meta": {
518
+ "type": "string",
519
+ "maxLength": 200
520
+ },
521
+ "live": {
522
+ "type": "boolean"
523
+ },
524
+ "layout": {
525
+ "type": "object",
526
+ "properties": {
527
+ "x": {
528
+ "type": "integer",
529
+ "minimum": 0,
530
+ "maximum": 11
531
+ },
532
+ "y": {
533
+ "type": "integer",
534
+ "minimum": 0
535
+ },
536
+ "w": {
537
+ "type": "integer",
538
+ "minimum": 1,
539
+ "maximum": 12
540
+ },
541
+ "h": {
542
+ "type": "integer",
543
+ "minimum": 1
544
+ },
545
+ "minW": {
546
+ "type": "integer",
547
+ "minimum": 1,
548
+ "maximum": 12
549
+ },
550
+ "minH": {
551
+ "type": "integer",
552
+ "minimum": 1
553
+ },
554
+ "responsive": {
555
+ "type": "object",
556
+ "properties": {
557
+ "md": {
558
+ "type": "object",
559
+ "properties": {
560
+ "x": {
561
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/x"
562
+ },
563
+ "y": {
564
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/y"
565
+ },
566
+ "w": {
567
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/w"
568
+ },
569
+ "h": {
570
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/h"
571
+ },
572
+ "minW": {
573
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/minW"
574
+ },
575
+ "minH": {
576
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/minH"
577
+ }
578
+ },
579
+ "required": [
580
+ "x",
581
+ "y",
582
+ "w",
583
+ "h"
584
+ ],
585
+ "additionalProperties": true
586
+ },
587
+ "sm": {
588
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/responsive/properties/md"
589
+ },
590
+ "xs": {
591
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/layout/properties/responsive/properties/md"
592
+ }
593
+ },
594
+ "additionalProperties": false
595
+ }
596
+ },
597
+ "required": [
598
+ "x",
599
+ "y",
600
+ "w",
601
+ "h"
602
+ ],
603
+ "additionalProperties": true
604
+ },
605
+ "dataSource": {
606
+ "$ref": "#/definitions/DashboardSchema/properties/id"
607
+ },
608
+ "mapping": {
609
+ "type": "object",
610
+ "additionalProperties": {
611
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/options/properties/labelKey"
612
+ }
613
+ },
614
+ "options": {
615
+ "type": "object",
616
+ "additionalProperties": {}
617
+ },
618
+ "listensTo": {
619
+ "type": "array",
620
+ "items": {
621
+ "$ref": "#/definitions/DashboardSchema/properties/id"
622
+ }
623
+ },
624
+ "actions": {
625
+ "type": "array",
626
+ "items": {
627
+ "anyOf": [
628
+ {
629
+ "type": "object",
630
+ "properties": {
631
+ "on": {
632
+ "type": "string",
633
+ "enum": [
634
+ "click",
635
+ "rowClick"
636
+ ]
637
+ },
638
+ "type": {
639
+ "type": "string",
640
+ "const": "navigate"
641
+ },
642
+ "params": {
643
+ "type": "object",
644
+ "properties": {
645
+ "to": {
646
+ "type": "string",
647
+ "minLength": 1
648
+ },
649
+ "query": {
650
+ "type": "object",
651
+ "additionalProperties": {
652
+ "anyOf": [
653
+ {
654
+ "type": "object",
655
+ "properties": {
656
+ "$row": {
657
+ "type": "string",
658
+ "minLength": 1
659
+ }
660
+ },
661
+ "required": [
662
+ "$row"
663
+ ],
664
+ "additionalProperties": false
665
+ },
666
+ {
667
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties"
668
+ }
669
+ ]
670
+ }
671
+ }
672
+ },
673
+ "required": [
674
+ "to"
675
+ ],
676
+ "additionalProperties": true
677
+ }
678
+ },
679
+ "required": [
680
+ "on",
681
+ "type",
682
+ "params"
683
+ ],
684
+ "additionalProperties": true
685
+ },
686
+ {
687
+ "type": "object",
688
+ "properties": {
689
+ "on": {
690
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/actions/items/anyOf/0/properties/on"
691
+ },
692
+ "type": {
693
+ "type": "string",
694
+ "const": "setFilter"
695
+ },
696
+ "params": {
697
+ "type": "object",
698
+ "properties": {
699
+ "filter": {
700
+ "$ref": "#/definitions/DashboardSchema/properties/id"
701
+ },
702
+ "value": {
703
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/actions/items/anyOf/0/properties/params/properties/query/additionalProperties"
704
+ }
705
+ },
706
+ "required": [
707
+ "filter",
708
+ "value"
709
+ ],
710
+ "additionalProperties": true
711
+ }
712
+ },
713
+ "required": [
714
+ "on",
715
+ "type",
716
+ "params"
717
+ ],
718
+ "additionalProperties": true
719
+ },
720
+ {
721
+ "type": "object",
722
+ "properties": {
723
+ "on": {
724
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/actions/items/anyOf/0/properties/on"
725
+ },
726
+ "type": {
727
+ "type": "string",
728
+ "const": "drilldown"
729
+ },
730
+ "params": {
731
+ "type": "object",
732
+ "properties": {
733
+ "dashboardId": {
734
+ "$ref": "#/definitions/DashboardSchema/properties/id"
735
+ },
736
+ "variables": {
737
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/actions/items/anyOf/0/properties/params/properties/query"
738
+ }
739
+ },
740
+ "required": [
741
+ "dashboardId"
742
+ ],
743
+ "additionalProperties": true
744
+ }
745
+ },
746
+ "required": [
747
+ "on",
748
+ "type",
749
+ "params"
750
+ ],
751
+ "additionalProperties": true
752
+ },
753
+ {
754
+ "type": "object",
755
+ "properties": {
756
+ "on": {
757
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/actions/items/anyOf/0/properties/on"
758
+ },
759
+ "type": {
760
+ "type": "string",
761
+ "const": "openModal"
762
+ },
763
+ "params": {
764
+ "type": "object",
765
+ "properties": {
766
+ "widget": {
767
+ "$ref": "#/definitions/DashboardSchema/properties/id"
768
+ },
769
+ "title": {
770
+ "type": "string"
771
+ },
772
+ "variables": {
773
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/actions/items/anyOf/0/properties/params/properties/query"
774
+ }
775
+ },
776
+ "required": [
777
+ "widget"
778
+ ],
779
+ "additionalProperties": true
780
+ }
781
+ },
782
+ "required": [
783
+ "on",
784
+ "type",
785
+ "params"
786
+ ],
787
+ "additionalProperties": true
788
+ }
789
+ ]
790
+ }
791
+ },
792
+ "visibleWhen": {
793
+ "anyOf": [
794
+ {
795
+ "type": "object",
796
+ "properties": {
797
+ "op": {
798
+ "type": "string",
799
+ "enum": [
800
+ "eq",
801
+ "neq",
802
+ "gt",
803
+ "gte",
804
+ "lt",
805
+ "lte"
806
+ ]
807
+ },
808
+ "left": {
809
+ "anyOf": [
810
+ {
811
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties/anyOf/1"
812
+ },
813
+ {
814
+ "$ref": "#/definitions/DashboardSchema/properties/dataSources/items/anyOf/0/properties/request/properties/params/additionalProperties/anyOf/2"
815
+ }
816
+ ]
817
+ },
818
+ "right": {
819
+ "anyOf": [
820
+ {
821
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/visibleWhen/anyOf/0/properties/left"
822
+ },
823
+ {
824
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/default"
825
+ }
826
+ ]
827
+ }
828
+ },
829
+ "required": [
830
+ "op",
831
+ "left",
832
+ "right"
833
+ ],
834
+ "additionalProperties": false
835
+ },
836
+ {
837
+ "type": "object",
838
+ "properties": {
839
+ "op": {
840
+ "type": "string",
841
+ "enum": [
842
+ "in",
843
+ "nin"
844
+ ]
845
+ },
846
+ "left": {
847
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/visibleWhen/anyOf/0/properties/left"
848
+ },
849
+ "right": {
850
+ "type": "array",
851
+ "items": {
852
+ "$ref": "#/definitions/DashboardSchema/properties/filters/items/anyOf/1/properties/default"
853
+ }
854
+ }
855
+ },
856
+ "required": [
857
+ "op",
858
+ "left",
859
+ "right"
860
+ ],
861
+ "additionalProperties": false
862
+ },
863
+ {
864
+ "type": "object",
865
+ "properties": {
866
+ "op": {
867
+ "type": "string",
868
+ "enum": [
869
+ "empty",
870
+ "notEmpty"
871
+ ]
872
+ },
873
+ "left": {
874
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/visibleWhen/anyOf/0/properties/left"
875
+ }
876
+ },
877
+ "required": [
878
+ "op",
879
+ "left"
880
+ ],
881
+ "additionalProperties": false
882
+ },
883
+ {
884
+ "type": "object",
885
+ "properties": {
886
+ "op": {
887
+ "type": "string",
888
+ "enum": [
889
+ "and",
890
+ "or"
891
+ ]
892
+ },
893
+ "conditions": {
894
+ "type": "array",
895
+ "items": {
896
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/visibleWhen"
897
+ },
898
+ "minItems": 1
899
+ }
900
+ },
901
+ "required": [
902
+ "op",
903
+ "conditions"
904
+ ],
905
+ "additionalProperties": false
906
+ },
907
+ {
908
+ "type": "object",
909
+ "properties": {
910
+ "op": {
911
+ "type": "string",
912
+ "const": "not"
913
+ },
914
+ "condition": {
915
+ "$ref": "#/definitions/DashboardSchema/properties/widgets/items/properties/visibleWhen"
916
+ }
917
+ },
918
+ "required": [
919
+ "op",
920
+ "condition"
921
+ ],
922
+ "additionalProperties": false
923
+ }
924
+ ]
925
+ }
926
+ },
927
+ "required": [
928
+ "id",
929
+ "type",
930
+ "layout"
931
+ ],
932
+ "additionalProperties": true
933
+ },
934
+ "default": []
935
+ },
936
+ "meta": {
937
+ "type": "object",
938
+ "properties": {
939
+ "createdBy": {
940
+ "type": "string"
941
+ },
942
+ "updatedAt": {
943
+ "type": "string"
944
+ },
945
+ "tags": {
946
+ "type": "array",
947
+ "items": {
948
+ "type": "string"
949
+ }
950
+ }
951
+ },
952
+ "additionalProperties": true
953
+ }
954
+ },
955
+ "required": [
956
+ "schemaVersion",
957
+ "id",
958
+ "title",
959
+ "layout"
960
+ ],
961
+ "additionalProperties": true
962
+ }
963
+ },
964
+ "$schema": "http://json-schema.org/draft-07/schema#"
965
+ }