@zveltio/sdk 3.0.0-beta.110 → 3.0.0-beta.115

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,2047 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://zveltio.com/schemas/view-2.schema.json",
4
+ "title": "zveltio.view/2",
5
+ "description": "An extension's view (ADR 0042): what a screen shows, bound by name to the extension's collections and actions. Each front end draws it in its own way.",
6
+ "anyOf": [
7
+ {
8
+ "type": "object",
9
+ "description": "Rows of a collection.",
10
+ "properties": {
11
+ "spec": {
12
+ "const": "zveltio.view/2"
13
+ },
14
+ "type": {
15
+ "const": "list"
16
+ },
17
+ "id": {
18
+ "$ref": "#/$defs/ViewId",
19
+ "description": "Names this file for `navigate` and `open`."
20
+ },
21
+ "title": {
22
+ "$ref": "#/$defs/Text"
23
+ },
24
+ "actions": {
25
+ "$ref": "#/$defs/Buttons",
26
+ "description": "Toolbar actions of this view."
27
+ },
28
+ "fallback": {
29
+ "$ref": "#/$defs/View",
30
+ "description": "What a front end that does not know this view kind draws instead."
31
+ },
32
+ "collection": {
33
+ "$ref": "#/$defs/Name"
34
+ },
35
+ "fields": {
36
+ "$ref": "#/$defs/Fields"
37
+ },
38
+ "filter": {
39
+ "$ref": "#/$defs/Conditions"
40
+ },
41
+ "sort": {
42
+ "$ref": "#/$defs/Sort"
43
+ },
44
+ "search": {
45
+ "type": "boolean"
46
+ },
47
+ "present": {
48
+ "enum": [
49
+ "table",
50
+ "cards",
51
+ "feed"
52
+ ]
53
+ },
54
+ "pageSize": {
55
+ "type": "integer",
56
+ "minimum": 1,
57
+ "maximum": 500
58
+ },
59
+ "emphasisWhen": {
60
+ "$ref": "#/$defs/Conditions"
61
+ },
62
+ "selectable": {
63
+ "type": "boolean"
64
+ },
65
+ "rowActions": {
66
+ "$ref": "#/$defs/Buttons"
67
+ },
68
+ "bulkActions": {
69
+ "$ref": "#/$defs/Buttons"
70
+ },
71
+ "open": {
72
+ "$ref": "#/$defs/ViewId",
73
+ "description": "The view a row opens."
74
+ },
75
+ "create": {
76
+ "type": "boolean",
77
+ "description": "Offer a form to add a record."
78
+ },
79
+ "edit": {
80
+ "type": "boolean",
81
+ "description": "Offer each row's form, to change it."
82
+ },
83
+ "delete": {
84
+ "type": "boolean",
85
+ "description": "Offer to delete each row, after a confirm."
86
+ },
87
+ "realtime": {
88
+ "type": "boolean"
89
+ }
90
+ },
91
+ "required": [
92
+ "spec",
93
+ "type",
94
+ "collection"
95
+ ],
96
+ "additionalProperties": false
97
+ },
98
+ {
99
+ "description": "A form binds a collection or an action, never both.",
100
+ "anyOf": [
101
+ {
102
+ "type": "object",
103
+ "description": "Create or edit a record of a collection.",
104
+ "properties": {
105
+ "spec": {
106
+ "const": "zveltio.view/2"
107
+ },
108
+ "type": {
109
+ "const": "form"
110
+ },
111
+ "id": {
112
+ "$ref": "#/$defs/ViewId",
113
+ "description": "Names this file for `navigate` and `open`."
114
+ },
115
+ "title": {
116
+ "$ref": "#/$defs/Text"
117
+ },
118
+ "actions": {
119
+ "$ref": "#/$defs/Buttons",
120
+ "description": "Toolbar actions of this view."
121
+ },
122
+ "fallback": {
123
+ "$ref": "#/$defs/View",
124
+ "description": "What a front end that does not know this view kind draws instead."
125
+ },
126
+ "collection": {
127
+ "$ref": "#/$defs/Name"
128
+ },
129
+ "record": {
130
+ "description": "The record to edit; `singleton` for a one-row collection.",
131
+ "anyOf": [
132
+ {
133
+ "$ref": "#/$defs/Ref"
134
+ },
135
+ {
136
+ "const": "singleton"
137
+ }
138
+ ]
139
+ },
140
+ "fields": {
141
+ "$ref": "#/$defs/Fields"
142
+ },
143
+ "sections": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "object",
147
+ "description": "A titled group of fields.",
148
+ "properties": {
149
+ "title": {
150
+ "$ref": "#/$defs/Text"
151
+ },
152
+ "fields": {
153
+ "$ref": "#/$defs/Fields"
154
+ }
155
+ },
156
+ "required": [
157
+ "fields"
158
+ ],
159
+ "additionalProperties": false
160
+ },
161
+ "minItems": 1
162
+ },
163
+ "lines": {
164
+ "type": "object",
165
+ "description": "Line items: records of another collection pointing at this one.",
166
+ "properties": {
167
+ "collection": {
168
+ "$ref": "#/$defs/Name"
169
+ },
170
+ "fk": {
171
+ "$ref": "#/$defs/Name"
172
+ },
173
+ "fields": {
174
+ "$ref": "#/$defs/Fields"
175
+ },
176
+ "order": {
177
+ "$ref": "#/$defs/Name"
178
+ }
179
+ },
180
+ "required": [
181
+ "collection",
182
+ "fk"
183
+ ],
184
+ "additionalProperties": false
185
+ },
186
+ "submit": {
187
+ "$ref": "#/$defs/Buttons"
188
+ },
189
+ "recalc": {
190
+ "$ref": "#/$defs/ActionCall",
191
+ "description": "Recomputes values on the server."
192
+ },
193
+ "autosave": {
194
+ "type": "boolean"
195
+ }
196
+ },
197
+ "required": [
198
+ "spec",
199
+ "type",
200
+ "collection"
201
+ ],
202
+ "additionalProperties": false
203
+ },
204
+ {
205
+ "type": "object",
206
+ "description": "Fill an action's input; submitting runs the action.",
207
+ "properties": {
208
+ "spec": {
209
+ "const": "zveltio.view/2"
210
+ },
211
+ "type": {
212
+ "const": "form"
213
+ },
214
+ "id": {
215
+ "$ref": "#/$defs/ViewId",
216
+ "description": "Names this file for `navigate` and `open`."
217
+ },
218
+ "title": {
219
+ "$ref": "#/$defs/Text"
220
+ },
221
+ "actions": {
222
+ "$ref": "#/$defs/Buttons",
223
+ "description": "Toolbar actions of this view."
224
+ },
225
+ "fallback": {
226
+ "$ref": "#/$defs/View",
227
+ "description": "What a front end that does not know this view kind draws instead."
228
+ },
229
+ "action": {
230
+ "$ref": "#/$defs/ActionName"
231
+ },
232
+ "fields": {
233
+ "$ref": "#/$defs/Fields"
234
+ },
235
+ "sections": {
236
+ "type": "array",
237
+ "items": {
238
+ "type": "object",
239
+ "description": "A titled group of fields.",
240
+ "properties": {
241
+ "title": {
242
+ "$ref": "#/$defs/Text"
243
+ },
244
+ "fields": {
245
+ "$ref": "#/$defs/Fields"
246
+ }
247
+ },
248
+ "required": [
249
+ "fields"
250
+ ],
251
+ "additionalProperties": false
252
+ },
253
+ "minItems": 1
254
+ },
255
+ "lines": {
256
+ "type": "object",
257
+ "description": "Line items: records of another collection pointing at this one.",
258
+ "properties": {
259
+ "collection": {
260
+ "$ref": "#/$defs/Name"
261
+ },
262
+ "fk": {
263
+ "$ref": "#/$defs/Name"
264
+ },
265
+ "fields": {
266
+ "$ref": "#/$defs/Fields"
267
+ },
268
+ "order": {
269
+ "$ref": "#/$defs/Name"
270
+ }
271
+ },
272
+ "required": [
273
+ "collection",
274
+ "fk"
275
+ ],
276
+ "additionalProperties": false
277
+ },
278
+ "submit": {
279
+ "$ref": "#/$defs/Buttons"
280
+ },
281
+ "recalc": {
282
+ "$ref": "#/$defs/ActionCall",
283
+ "description": "Recomputes values on the server."
284
+ },
285
+ "autosave": {
286
+ "type": "boolean"
287
+ }
288
+ },
289
+ "required": [
290
+ "spec",
291
+ "type",
292
+ "action"
293
+ ],
294
+ "additionalProperties": false
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ "type": "object",
300
+ "description": "One record, in panels.",
301
+ "properties": {
302
+ "spec": {
303
+ "const": "zveltio.view/2"
304
+ },
305
+ "type": {
306
+ "const": "detail"
307
+ },
308
+ "id": {
309
+ "$ref": "#/$defs/ViewId",
310
+ "description": "Names this file for `navigate` and `open`."
311
+ },
312
+ "title": {
313
+ "$ref": "#/$defs/Text"
314
+ },
315
+ "actions": {
316
+ "$ref": "#/$defs/Buttons",
317
+ "description": "Toolbar actions of this view."
318
+ },
319
+ "fallback": {
320
+ "$ref": "#/$defs/View",
321
+ "description": "What a front end that does not know this view kind draws instead."
322
+ },
323
+ "collection": {
324
+ "$ref": "#/$defs/Name"
325
+ },
326
+ "record": {
327
+ "$ref": "#/$defs/Ref"
328
+ },
329
+ "fields": {
330
+ "$ref": "#/$defs/Fields"
331
+ },
332
+ "panels": {
333
+ "type": "array",
334
+ "items": {
335
+ "$ref": "#/$defs/View"
336
+ },
337
+ "minItems": 1
338
+ }
339
+ },
340
+ "required": [
341
+ "spec",
342
+ "type",
343
+ "collection",
344
+ "record"
345
+ ],
346
+ "additionalProperties": false
347
+ },
348
+ {
349
+ "type": "object",
350
+ "description": "Records grouped by a field (kanban).",
351
+ "properties": {
352
+ "spec": {
353
+ "const": "zveltio.view/2"
354
+ },
355
+ "type": {
356
+ "const": "board"
357
+ },
358
+ "id": {
359
+ "$ref": "#/$defs/ViewId",
360
+ "description": "Names this file for `navigate` and `open`."
361
+ },
362
+ "title": {
363
+ "$ref": "#/$defs/Text"
364
+ },
365
+ "actions": {
366
+ "$ref": "#/$defs/Buttons",
367
+ "description": "Toolbar actions of this view."
368
+ },
369
+ "fallback": {
370
+ "$ref": "#/$defs/View",
371
+ "description": "What a front end that does not know this view kind draws instead."
372
+ },
373
+ "collection": {
374
+ "$ref": "#/$defs/Name"
375
+ },
376
+ "groupBy": {
377
+ "$ref": "#/$defs/Name"
378
+ },
379
+ "card": {
380
+ "$ref": "#/$defs/Fields"
381
+ },
382
+ "filter": {
383
+ "$ref": "#/$defs/Conditions"
384
+ },
385
+ "move": {
386
+ "$ref": "#/$defs/Change"
387
+ }
388
+ },
389
+ "required": [
390
+ "spec",
391
+ "type",
392
+ "collection",
393
+ "groupBy"
394
+ ],
395
+ "additionalProperties": false
396
+ },
397
+ {
398
+ "type": "object",
399
+ "description": "Records on a time axis (calendar, Gantt).",
400
+ "properties": {
401
+ "spec": {
402
+ "const": "zveltio.view/2"
403
+ },
404
+ "type": {
405
+ "const": "timeline"
406
+ },
407
+ "id": {
408
+ "$ref": "#/$defs/ViewId",
409
+ "description": "Names this file for `navigate` and `open`."
410
+ },
411
+ "title": {
412
+ "$ref": "#/$defs/Text"
413
+ },
414
+ "actions": {
415
+ "$ref": "#/$defs/Buttons",
416
+ "description": "Toolbar actions of this view."
417
+ },
418
+ "fallback": {
419
+ "$ref": "#/$defs/View",
420
+ "description": "What a front end that does not know this view kind draws instead."
421
+ },
422
+ "collection": {
423
+ "$ref": "#/$defs/Name"
424
+ },
425
+ "start": {
426
+ "$ref": "#/$defs/Name"
427
+ },
428
+ "end": {
429
+ "$ref": "#/$defs/Name"
430
+ },
431
+ "groupBy": {
432
+ "$ref": "#/$defs/Name"
433
+ },
434
+ "scale": {
435
+ "enum": [
436
+ "day",
437
+ "week",
438
+ "month",
439
+ "gantt"
440
+ ]
441
+ },
442
+ "filter": {
443
+ "$ref": "#/$defs/Conditions"
444
+ },
445
+ "move": {
446
+ "$ref": "#/$defs/Change"
447
+ }
448
+ },
449
+ "required": [
450
+ "spec",
451
+ "type",
452
+ "collection",
453
+ "start"
454
+ ],
455
+ "additionalProperties": false
456
+ },
457
+ {
458
+ "type": "object",
459
+ "description": "Records linked to a parent.",
460
+ "properties": {
461
+ "spec": {
462
+ "const": "zveltio.view/2"
463
+ },
464
+ "type": {
465
+ "const": "tree"
466
+ },
467
+ "id": {
468
+ "$ref": "#/$defs/ViewId",
469
+ "description": "Names this file for `navigate` and `open`."
470
+ },
471
+ "title": {
472
+ "$ref": "#/$defs/Text"
473
+ },
474
+ "actions": {
475
+ "$ref": "#/$defs/Buttons",
476
+ "description": "Toolbar actions of this view."
477
+ },
478
+ "fallback": {
479
+ "$ref": "#/$defs/View",
480
+ "description": "What a front end that does not know this view kind draws instead."
481
+ },
482
+ "collection": {
483
+ "$ref": "#/$defs/Name"
484
+ },
485
+ "parent": {
486
+ "$ref": "#/$defs/Name"
487
+ },
488
+ "label": {
489
+ "$ref": "#/$defs/Name"
490
+ },
491
+ "order": {
492
+ "$ref": "#/$defs/Name"
493
+ },
494
+ "move": {
495
+ "$ref": "#/$defs/Change"
496
+ }
497
+ },
498
+ "required": [
499
+ "spec",
500
+ "type",
501
+ "collection",
502
+ "parent",
503
+ "label"
504
+ ],
505
+ "additionalProperties": false
506
+ },
507
+ {
508
+ "type": "object",
509
+ "description": "Rows by columns of a relation (checklists, grants).",
510
+ "properties": {
511
+ "spec": {
512
+ "const": "zveltio.view/2"
513
+ },
514
+ "type": {
515
+ "const": "matrix"
516
+ },
517
+ "id": {
518
+ "$ref": "#/$defs/ViewId",
519
+ "description": "Names this file for `navigate` and `open`."
520
+ },
521
+ "title": {
522
+ "$ref": "#/$defs/Text"
523
+ },
524
+ "actions": {
525
+ "$ref": "#/$defs/Buttons",
526
+ "description": "Toolbar actions of this view."
527
+ },
528
+ "fallback": {
529
+ "$ref": "#/$defs/View",
530
+ "description": "What a front end that does not know this view kind draws instead."
531
+ },
532
+ "collection": {
533
+ "$ref": "#/$defs/Name"
534
+ },
535
+ "row": {
536
+ "$ref": "#/$defs/Name"
537
+ },
538
+ "column": {
539
+ "$ref": "#/$defs/Name"
540
+ },
541
+ "value": {
542
+ "$ref": "#/$defs/Name"
543
+ },
544
+ "edit": {
545
+ "$ref": "#/$defs/Change"
546
+ }
547
+ },
548
+ "required": [
549
+ "spec",
550
+ "type",
551
+ "collection",
552
+ "row",
553
+ "column",
554
+ "value"
555
+ ],
556
+ "additionalProperties": false
557
+ },
558
+ {
559
+ "type": "object",
560
+ "description": "Records with a location.",
561
+ "properties": {
562
+ "spec": {
563
+ "const": "zveltio.view/2"
564
+ },
565
+ "type": {
566
+ "const": "map"
567
+ },
568
+ "id": {
569
+ "$ref": "#/$defs/ViewId",
570
+ "description": "Names this file for `navigate` and `open`."
571
+ },
572
+ "title": {
573
+ "$ref": "#/$defs/Text"
574
+ },
575
+ "actions": {
576
+ "$ref": "#/$defs/Buttons",
577
+ "description": "Toolbar actions of this view."
578
+ },
579
+ "fallback": {
580
+ "$ref": "#/$defs/View",
581
+ "description": "What a front end that does not know this view kind draws instead."
582
+ },
583
+ "collection": {
584
+ "$ref": "#/$defs/Name"
585
+ },
586
+ "location": {
587
+ "$ref": "#/$defs/Name"
588
+ },
589
+ "label": {
590
+ "$ref": "#/$defs/Name"
591
+ },
592
+ "filter": {
593
+ "$ref": "#/$defs/Conditions"
594
+ }
595
+ },
596
+ "required": [
597
+ "spec",
598
+ "type",
599
+ "collection",
600
+ "location"
601
+ ],
602
+ "additionalProperties": false
603
+ },
604
+ {
605
+ "type": "object",
606
+ "description": "A number.",
607
+ "properties": {
608
+ "spec": {
609
+ "const": "zveltio.view/2"
610
+ },
611
+ "type": {
612
+ "const": "stat"
613
+ },
614
+ "id": {
615
+ "$ref": "#/$defs/ViewId",
616
+ "description": "Names this file for `navigate` and `open`."
617
+ },
618
+ "title": {
619
+ "$ref": "#/$defs/Text"
620
+ },
621
+ "actions": {
622
+ "$ref": "#/$defs/Buttons",
623
+ "description": "Toolbar actions of this view."
624
+ },
625
+ "fallback": {
626
+ "$ref": "#/$defs/View",
627
+ "description": "What a front end that does not know this view kind draws instead."
628
+ },
629
+ "source": {
630
+ "anyOf": [
631
+ {
632
+ "type": "object",
633
+ "description": "An aggregate over a collection.",
634
+ "properties": {
635
+ "collection": {
636
+ "$ref": "#/$defs/Name"
637
+ },
638
+ "aggregate": {
639
+ "enum": [
640
+ "count",
641
+ "sum",
642
+ "avg",
643
+ "min",
644
+ "max"
645
+ ]
646
+ },
647
+ "field": {
648
+ "$ref": "#/$defs/Name"
649
+ },
650
+ "filter": {
651
+ "$ref": "#/$defs/Conditions"
652
+ }
653
+ },
654
+ "required": [
655
+ "collection",
656
+ "aggregate"
657
+ ],
658
+ "additionalProperties": false
659
+ },
660
+ {
661
+ "$ref": "#/$defs/ActionCall"
662
+ }
663
+ ]
664
+ },
665
+ "format": {
666
+ "enum": [
667
+ "number",
668
+ "money",
669
+ "progress",
670
+ "elapsed"
671
+ ]
672
+ },
673
+ "tone": {
674
+ "$ref": "#/$defs/Tone"
675
+ }
676
+ },
677
+ "required": [
678
+ "spec",
679
+ "type",
680
+ "source"
681
+ ],
682
+ "additionalProperties": false
683
+ },
684
+ {
685
+ "type": "object",
686
+ "description": "Panes side by side; a later pane filters on `$selected` of an earlier one.",
687
+ "properties": {
688
+ "spec": {
689
+ "const": "zveltio.view/2"
690
+ },
691
+ "type": {
692
+ "const": "split"
693
+ },
694
+ "id": {
695
+ "$ref": "#/$defs/ViewId",
696
+ "description": "Names this file for `navigate` and `open`."
697
+ },
698
+ "title": {
699
+ "$ref": "#/$defs/Text"
700
+ },
701
+ "actions": {
702
+ "$ref": "#/$defs/Buttons",
703
+ "description": "Toolbar actions of this view."
704
+ },
705
+ "fallback": {
706
+ "$ref": "#/$defs/View",
707
+ "description": "What a front end that does not know this view kind draws instead."
708
+ },
709
+ "panes": {
710
+ "type": "array",
711
+ "items": {
712
+ "$ref": "#/$defs/View"
713
+ },
714
+ "minItems": 2
715
+ }
716
+ },
717
+ "required": [
718
+ "spec",
719
+ "type",
720
+ "panes"
721
+ ],
722
+ "additionalProperties": false
723
+ },
724
+ {
725
+ "type": "object",
726
+ "description": "Views as tabs.",
727
+ "properties": {
728
+ "spec": {
729
+ "const": "zveltio.view/2"
730
+ },
731
+ "type": {
732
+ "const": "tabs"
733
+ },
734
+ "id": {
735
+ "$ref": "#/$defs/ViewId",
736
+ "description": "Names this file for `navigate` and `open`."
737
+ },
738
+ "title": {
739
+ "$ref": "#/$defs/Text"
740
+ },
741
+ "actions": {
742
+ "$ref": "#/$defs/Buttons",
743
+ "description": "Toolbar actions of this view."
744
+ },
745
+ "fallback": {
746
+ "$ref": "#/$defs/View",
747
+ "description": "What a front end that does not know this view kind draws instead."
748
+ },
749
+ "items": {
750
+ "type": "array",
751
+ "items": {
752
+ "$ref": "#/$defs/View"
753
+ },
754
+ "minItems": 1
755
+ }
756
+ },
757
+ "required": [
758
+ "spec",
759
+ "type",
760
+ "items"
761
+ ],
762
+ "additionalProperties": false
763
+ }
764
+ ],
765
+ "$defs": {
766
+ "Name": {
767
+ "type": "string",
768
+ "pattern": "^[a-z][a-z0-9_]*$",
769
+ "maxLength": 63,
770
+ "description": "A collection or field name."
771
+ },
772
+ "ActionName": {
773
+ "type": "string",
774
+ "pattern": "^([a-z][a-z0-9-]*(/[a-z][a-z0-9-]*)*\\.)?[a-z][a-zA-Z0-9]*$",
775
+ "description": "One of this extension's actions, or `<dependency>.<action>` for a dependency's (ADR 0014)."
776
+ },
777
+ "ViewId": {
778
+ "type": "string",
779
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-zA-Z0-9-]*)*$",
780
+ "description": "The id of a view, e.g. `mail.compose`."
781
+ },
782
+ "PaneId": {
783
+ "type": "string",
784
+ "pattern": "^[a-z][a-zA-Z0-9_]*$",
785
+ "description": "The id of a view inside a container; `$selected` names it."
786
+ },
787
+ "Text": {
788
+ "type": "string",
789
+ "minLength": 1,
790
+ "maxLength": 200,
791
+ "description": "A message key of the extension, or literal text."
792
+ },
793
+ "Tone": {
794
+ "enum": [
795
+ "neutral",
796
+ "info",
797
+ "success",
798
+ "warning",
799
+ "danger",
800
+ "muted"
801
+ ],
802
+ "description": "A semantic tone; each front end picks its colours."
803
+ },
804
+ "Ref": {
805
+ "description": "A value the front end fills in. Nothing else is computed in a view.",
806
+ "anyOf": [
807
+ {
808
+ "type": "object",
809
+ "description": "A field of the current record.",
810
+ "properties": {
811
+ "$record": {
812
+ "$ref": "#/$defs/Name"
813
+ }
814
+ },
815
+ "required": [
816
+ "$record"
817
+ ],
818
+ "additionalProperties": false
819
+ },
820
+ {
821
+ "type": "object",
822
+ "description": "The id of the record selected in a pane.",
823
+ "properties": {
824
+ "$selected": {
825
+ "$ref": "#/$defs/PaneId"
826
+ }
827
+ },
828
+ "required": [
829
+ "$selected"
830
+ ],
831
+ "additionalProperties": false
832
+ },
833
+ {
834
+ "type": "object",
835
+ "description": "A field of every selected record (bulk actions).",
836
+ "properties": {
837
+ "$selection": {
838
+ "$ref": "#/$defs/Name"
839
+ }
840
+ },
841
+ "required": [
842
+ "$selection"
843
+ ],
844
+ "additionalProperties": false
845
+ },
846
+ {
847
+ "type": "object",
848
+ "description": "A parameter the view was opened with.",
849
+ "properties": {
850
+ "$param": {
851
+ "$ref": "#/$defs/Name"
852
+ }
853
+ },
854
+ "required": [
855
+ "$param"
856
+ ],
857
+ "additionalProperties": false
858
+ },
859
+ {
860
+ "type": "object",
861
+ "description": "The signed-in user's id.",
862
+ "properties": {
863
+ "$user": {
864
+ "const": "id"
865
+ }
866
+ },
867
+ "required": [
868
+ "$user"
869
+ ],
870
+ "additionalProperties": false
871
+ },
872
+ {
873
+ "type": "object",
874
+ "description": "Today's date.",
875
+ "properties": {
876
+ "$today": {
877
+ "const": true
878
+ }
879
+ },
880
+ "required": [
881
+ "$today"
882
+ ],
883
+ "additionalProperties": false
884
+ }
885
+ ]
886
+ },
887
+ "Literal": {
888
+ "type": [
889
+ "string",
890
+ "number",
891
+ "boolean",
892
+ "null"
893
+ ]
894
+ },
895
+ "Value": {
896
+ "anyOf": [
897
+ {
898
+ "$ref": "#/$defs/Literal"
899
+ },
900
+ {
901
+ "$ref": "#/$defs/Ref"
902
+ },
903
+ {
904
+ "type": "array",
905
+ "items": {
906
+ "anyOf": [
907
+ {
908
+ "$ref": "#/$defs/Literal"
909
+ },
910
+ {
911
+ "$ref": "#/$defs/Ref"
912
+ }
913
+ ]
914
+ }
915
+ }
916
+ ]
917
+ },
918
+ "Input": {
919
+ "type": "object",
920
+ "description": "An action's input, or a view's parameters, by name.",
921
+ "additionalProperties": {
922
+ "$ref": "#/$defs/Value"
923
+ }
924
+ },
925
+ "Condition": {
926
+ "description": "A data API condition on one field; its value is shaped by the operator.",
927
+ "anyOf": [
928
+ {
929
+ "type": "object",
930
+ "description": "Compares the field with a value.",
931
+ "properties": {
932
+ "field": {
933
+ "$ref": "#/$defs/Name"
934
+ },
935
+ "op": {
936
+ "enum": [
937
+ "eq",
938
+ "neq",
939
+ "lt",
940
+ "lte",
941
+ "gt",
942
+ "gte",
943
+ "like",
944
+ "ilike",
945
+ "not_contains",
946
+ "starts_with",
947
+ "ends_with",
948
+ "near",
949
+ "within"
950
+ ]
951
+ },
952
+ "value": {
953
+ "$ref": "#/$defs/Value"
954
+ }
955
+ },
956
+ "required": [
957
+ "field",
958
+ "op",
959
+ "value"
960
+ ],
961
+ "additionalProperties": false
962
+ },
963
+ {
964
+ "type": "object",
965
+ "description": "The field is (not) one of a list.",
966
+ "properties": {
967
+ "field": {
968
+ "$ref": "#/$defs/Name"
969
+ },
970
+ "op": {
971
+ "enum": [
972
+ "in",
973
+ "not_in"
974
+ ]
975
+ },
976
+ "value": {
977
+ "anyOf": [
978
+ {
979
+ "type": "array",
980
+ "items": {
981
+ "anyOf": [
982
+ {
983
+ "$ref": "#/$defs/Literal"
984
+ },
985
+ {
986
+ "$ref": "#/$defs/Ref"
987
+ }
988
+ ]
989
+ }
990
+ },
991
+ {
992
+ "$ref": "#/$defs/Ref"
993
+ }
994
+ ]
995
+ }
996
+ },
997
+ "required": [
998
+ "field",
999
+ "op",
1000
+ "value"
1001
+ ],
1002
+ "additionalProperties": false
1003
+ },
1004
+ {
1005
+ "type": "object",
1006
+ "description": "The field is (not) empty.",
1007
+ "properties": {
1008
+ "field": {
1009
+ "$ref": "#/$defs/Name"
1010
+ },
1011
+ "op": {
1012
+ "enum": [
1013
+ "null",
1014
+ "not_null"
1015
+ ]
1016
+ }
1017
+ },
1018
+ "required": [
1019
+ "field",
1020
+ "op"
1021
+ ],
1022
+ "additionalProperties": false
1023
+ }
1024
+ ]
1025
+ },
1026
+ "Conditions": {
1027
+ "type": "array",
1028
+ "items": {
1029
+ "$ref": "#/$defs/Condition"
1030
+ },
1031
+ "minItems": 1,
1032
+ "description": "All must hold."
1033
+ },
1034
+ "Sort": {
1035
+ "description": "A field, or several; `-field` sorts descending.",
1036
+ "anyOf": [
1037
+ {
1038
+ "type": "string",
1039
+ "pattern": "^-?[a-z][a-z0-9_]*$"
1040
+ },
1041
+ {
1042
+ "type": "array",
1043
+ "items": {
1044
+ "type": "string",
1045
+ "pattern": "^-?[a-z][a-z0-9_]*$"
1046
+ },
1047
+ "minItems": 1
1048
+ }
1049
+ ]
1050
+ },
1051
+ "Field": {
1052
+ "description": "A field by name; its type, label and editor come from the collection.",
1053
+ "anyOf": [
1054
+ {
1055
+ "$ref": "#/$defs/Name"
1056
+ },
1057
+ {
1058
+ "type": "object",
1059
+ "description": "A field with presentation hints.",
1060
+ "properties": {
1061
+ "field": {
1062
+ "$ref": "#/$defs/Name"
1063
+ },
1064
+ "label": {
1065
+ "$ref": "#/$defs/Text"
1066
+ },
1067
+ "display": {
1068
+ "enum": [
1069
+ "badge",
1070
+ "flag",
1071
+ "mono",
1072
+ "elapsed"
1073
+ ]
1074
+ },
1075
+ "tones": {
1076
+ "type": "object",
1077
+ "description": "A tone per value (enum fields).",
1078
+ "additionalProperties": {
1079
+ "$ref": "#/$defs/Tone"
1080
+ }
1081
+ },
1082
+ "readOnly": {
1083
+ "type": "boolean"
1084
+ }
1085
+ },
1086
+ "required": [
1087
+ "field"
1088
+ ],
1089
+ "additionalProperties": false
1090
+ }
1091
+ ]
1092
+ },
1093
+ "Fields": {
1094
+ "type": "array",
1095
+ "items": {
1096
+ "$ref": "#/$defs/Field"
1097
+ },
1098
+ "minItems": 1
1099
+ },
1100
+ "ActionCall": {
1101
+ "type": "object",
1102
+ "description": "Runs an action.",
1103
+ "properties": {
1104
+ "action": {
1105
+ "$ref": "#/$defs/ActionName"
1106
+ },
1107
+ "input": {
1108
+ "$ref": "#/$defs/Input"
1109
+ }
1110
+ },
1111
+ "required": [
1112
+ "action"
1113
+ ],
1114
+ "additionalProperties": false
1115
+ },
1116
+ "Change": {
1117
+ "description": "`patch` writes the record through the data API; or an action does it.",
1118
+ "anyOf": [
1119
+ {
1120
+ "const": "patch"
1121
+ },
1122
+ {
1123
+ "$ref": "#/$defs/ActionCall"
1124
+ }
1125
+ ]
1126
+ },
1127
+ "Button": {
1128
+ "anyOf": [
1129
+ {
1130
+ "type": "object",
1131
+ "description": "Runs an action.",
1132
+ "properties": {
1133
+ "action": {
1134
+ "$ref": "#/$defs/ActionName"
1135
+ },
1136
+ "label": {
1137
+ "$ref": "#/$defs/Text"
1138
+ },
1139
+ "tone": {
1140
+ "$ref": "#/$defs/Tone"
1141
+ },
1142
+ "input": {
1143
+ "$ref": "#/$defs/Input"
1144
+ },
1145
+ "prompt": {
1146
+ "type": "array",
1147
+ "items": {
1148
+ "$ref": "#/$defs/Name"
1149
+ },
1150
+ "minItems": 1,
1151
+ "description": "Input fields to ask for."
1152
+ },
1153
+ "confirm": {
1154
+ "$ref": "#/$defs/Text"
1155
+ },
1156
+ "when": {
1157
+ "$ref": "#/$defs/Conditions"
1158
+ }
1159
+ },
1160
+ "required": [
1161
+ "action"
1162
+ ],
1163
+ "additionalProperties": false
1164
+ },
1165
+ {
1166
+ "type": "object",
1167
+ "description": "Opens another view.",
1168
+ "properties": {
1169
+ "navigate": {
1170
+ "$ref": "#/$defs/ViewId"
1171
+ },
1172
+ "params": {
1173
+ "$ref": "#/$defs/Input"
1174
+ },
1175
+ "label": {
1176
+ "$ref": "#/$defs/Text"
1177
+ },
1178
+ "when": {
1179
+ "$ref": "#/$defs/Conditions"
1180
+ }
1181
+ },
1182
+ "required": [
1183
+ "navigate"
1184
+ ],
1185
+ "additionalProperties": false
1186
+ },
1187
+ {
1188
+ "type": "object",
1189
+ "description": "Saves the form.",
1190
+ "properties": {
1191
+ "save": {
1192
+ "const": true
1193
+ },
1194
+ "label": {
1195
+ "$ref": "#/$defs/Text"
1196
+ }
1197
+ },
1198
+ "required": [
1199
+ "save"
1200
+ ],
1201
+ "additionalProperties": false
1202
+ }
1203
+ ]
1204
+ },
1205
+ "Buttons": {
1206
+ "type": "array",
1207
+ "items": {
1208
+ "$ref": "#/$defs/Button"
1209
+ },
1210
+ "minItems": 1
1211
+ },
1212
+ "ListView": {
1213
+ "type": "object",
1214
+ "description": "Rows of a collection.",
1215
+ "properties": {
1216
+ "type": {
1217
+ "const": "list"
1218
+ },
1219
+ "id": {
1220
+ "$ref": "#/$defs/PaneId"
1221
+ },
1222
+ "title": {
1223
+ "$ref": "#/$defs/Text"
1224
+ },
1225
+ "actions": {
1226
+ "$ref": "#/$defs/Buttons",
1227
+ "description": "Toolbar actions of this view."
1228
+ },
1229
+ "fallback": {
1230
+ "$ref": "#/$defs/View",
1231
+ "description": "What a front end that does not know this view kind draws instead."
1232
+ },
1233
+ "collection": {
1234
+ "$ref": "#/$defs/Name"
1235
+ },
1236
+ "fields": {
1237
+ "$ref": "#/$defs/Fields"
1238
+ },
1239
+ "filter": {
1240
+ "$ref": "#/$defs/Conditions"
1241
+ },
1242
+ "sort": {
1243
+ "$ref": "#/$defs/Sort"
1244
+ },
1245
+ "search": {
1246
+ "type": "boolean"
1247
+ },
1248
+ "present": {
1249
+ "enum": [
1250
+ "table",
1251
+ "cards",
1252
+ "feed"
1253
+ ]
1254
+ },
1255
+ "pageSize": {
1256
+ "type": "integer",
1257
+ "minimum": 1,
1258
+ "maximum": 500
1259
+ },
1260
+ "emphasisWhen": {
1261
+ "$ref": "#/$defs/Conditions"
1262
+ },
1263
+ "selectable": {
1264
+ "type": "boolean"
1265
+ },
1266
+ "rowActions": {
1267
+ "$ref": "#/$defs/Buttons"
1268
+ },
1269
+ "bulkActions": {
1270
+ "$ref": "#/$defs/Buttons"
1271
+ },
1272
+ "open": {
1273
+ "$ref": "#/$defs/ViewId",
1274
+ "description": "The view a row opens."
1275
+ },
1276
+ "create": {
1277
+ "type": "boolean",
1278
+ "description": "Offer a form to add a record."
1279
+ },
1280
+ "edit": {
1281
+ "type": "boolean",
1282
+ "description": "Offer each row's form, to change it."
1283
+ },
1284
+ "delete": {
1285
+ "type": "boolean",
1286
+ "description": "Offer to delete each row, after a confirm."
1287
+ },
1288
+ "realtime": {
1289
+ "type": "boolean"
1290
+ }
1291
+ },
1292
+ "required": [
1293
+ "type",
1294
+ "collection"
1295
+ ],
1296
+ "additionalProperties": false
1297
+ },
1298
+ "FormView": {
1299
+ "description": "A form binds a collection or an action, never both.",
1300
+ "anyOf": [
1301
+ {
1302
+ "type": "object",
1303
+ "description": "Create or edit a record of a collection.",
1304
+ "properties": {
1305
+ "type": {
1306
+ "const": "form"
1307
+ },
1308
+ "id": {
1309
+ "$ref": "#/$defs/PaneId"
1310
+ },
1311
+ "title": {
1312
+ "$ref": "#/$defs/Text"
1313
+ },
1314
+ "actions": {
1315
+ "$ref": "#/$defs/Buttons",
1316
+ "description": "Toolbar actions of this view."
1317
+ },
1318
+ "fallback": {
1319
+ "$ref": "#/$defs/View",
1320
+ "description": "What a front end that does not know this view kind draws instead."
1321
+ },
1322
+ "collection": {
1323
+ "$ref": "#/$defs/Name"
1324
+ },
1325
+ "record": {
1326
+ "description": "The record to edit; `singleton` for a one-row collection.",
1327
+ "anyOf": [
1328
+ {
1329
+ "$ref": "#/$defs/Ref"
1330
+ },
1331
+ {
1332
+ "const": "singleton"
1333
+ }
1334
+ ]
1335
+ },
1336
+ "fields": {
1337
+ "$ref": "#/$defs/Fields"
1338
+ },
1339
+ "sections": {
1340
+ "type": "array",
1341
+ "items": {
1342
+ "type": "object",
1343
+ "description": "A titled group of fields.",
1344
+ "properties": {
1345
+ "title": {
1346
+ "$ref": "#/$defs/Text"
1347
+ },
1348
+ "fields": {
1349
+ "$ref": "#/$defs/Fields"
1350
+ }
1351
+ },
1352
+ "required": [
1353
+ "fields"
1354
+ ],
1355
+ "additionalProperties": false
1356
+ },
1357
+ "minItems": 1
1358
+ },
1359
+ "lines": {
1360
+ "type": "object",
1361
+ "description": "Line items: records of another collection pointing at this one.",
1362
+ "properties": {
1363
+ "collection": {
1364
+ "$ref": "#/$defs/Name"
1365
+ },
1366
+ "fk": {
1367
+ "$ref": "#/$defs/Name"
1368
+ },
1369
+ "fields": {
1370
+ "$ref": "#/$defs/Fields"
1371
+ },
1372
+ "order": {
1373
+ "$ref": "#/$defs/Name"
1374
+ }
1375
+ },
1376
+ "required": [
1377
+ "collection",
1378
+ "fk"
1379
+ ],
1380
+ "additionalProperties": false
1381
+ },
1382
+ "submit": {
1383
+ "$ref": "#/$defs/Buttons"
1384
+ },
1385
+ "recalc": {
1386
+ "$ref": "#/$defs/ActionCall",
1387
+ "description": "Recomputes values on the server."
1388
+ },
1389
+ "autosave": {
1390
+ "type": "boolean"
1391
+ }
1392
+ },
1393
+ "required": [
1394
+ "type",
1395
+ "collection"
1396
+ ],
1397
+ "additionalProperties": false
1398
+ },
1399
+ {
1400
+ "type": "object",
1401
+ "description": "Fill an action's input; submitting runs the action.",
1402
+ "properties": {
1403
+ "type": {
1404
+ "const": "form"
1405
+ },
1406
+ "id": {
1407
+ "$ref": "#/$defs/PaneId"
1408
+ },
1409
+ "title": {
1410
+ "$ref": "#/$defs/Text"
1411
+ },
1412
+ "actions": {
1413
+ "$ref": "#/$defs/Buttons",
1414
+ "description": "Toolbar actions of this view."
1415
+ },
1416
+ "fallback": {
1417
+ "$ref": "#/$defs/View",
1418
+ "description": "What a front end that does not know this view kind draws instead."
1419
+ },
1420
+ "action": {
1421
+ "$ref": "#/$defs/ActionName"
1422
+ },
1423
+ "fields": {
1424
+ "$ref": "#/$defs/Fields"
1425
+ },
1426
+ "sections": {
1427
+ "type": "array",
1428
+ "items": {
1429
+ "type": "object",
1430
+ "description": "A titled group of fields.",
1431
+ "properties": {
1432
+ "title": {
1433
+ "$ref": "#/$defs/Text"
1434
+ },
1435
+ "fields": {
1436
+ "$ref": "#/$defs/Fields"
1437
+ }
1438
+ },
1439
+ "required": [
1440
+ "fields"
1441
+ ],
1442
+ "additionalProperties": false
1443
+ },
1444
+ "minItems": 1
1445
+ },
1446
+ "lines": {
1447
+ "type": "object",
1448
+ "description": "Line items: records of another collection pointing at this one.",
1449
+ "properties": {
1450
+ "collection": {
1451
+ "$ref": "#/$defs/Name"
1452
+ },
1453
+ "fk": {
1454
+ "$ref": "#/$defs/Name"
1455
+ },
1456
+ "fields": {
1457
+ "$ref": "#/$defs/Fields"
1458
+ },
1459
+ "order": {
1460
+ "$ref": "#/$defs/Name"
1461
+ }
1462
+ },
1463
+ "required": [
1464
+ "collection",
1465
+ "fk"
1466
+ ],
1467
+ "additionalProperties": false
1468
+ },
1469
+ "submit": {
1470
+ "$ref": "#/$defs/Buttons"
1471
+ },
1472
+ "recalc": {
1473
+ "$ref": "#/$defs/ActionCall",
1474
+ "description": "Recomputes values on the server."
1475
+ },
1476
+ "autosave": {
1477
+ "type": "boolean"
1478
+ }
1479
+ },
1480
+ "required": [
1481
+ "type",
1482
+ "action"
1483
+ ],
1484
+ "additionalProperties": false
1485
+ }
1486
+ ]
1487
+ },
1488
+ "DetailView": {
1489
+ "type": "object",
1490
+ "description": "One record, in panels.",
1491
+ "properties": {
1492
+ "type": {
1493
+ "const": "detail"
1494
+ },
1495
+ "id": {
1496
+ "$ref": "#/$defs/PaneId"
1497
+ },
1498
+ "title": {
1499
+ "$ref": "#/$defs/Text"
1500
+ },
1501
+ "actions": {
1502
+ "$ref": "#/$defs/Buttons",
1503
+ "description": "Toolbar actions of this view."
1504
+ },
1505
+ "fallback": {
1506
+ "$ref": "#/$defs/View",
1507
+ "description": "What a front end that does not know this view kind draws instead."
1508
+ },
1509
+ "collection": {
1510
+ "$ref": "#/$defs/Name"
1511
+ },
1512
+ "record": {
1513
+ "$ref": "#/$defs/Ref"
1514
+ },
1515
+ "fields": {
1516
+ "$ref": "#/$defs/Fields"
1517
+ },
1518
+ "panels": {
1519
+ "type": "array",
1520
+ "items": {
1521
+ "$ref": "#/$defs/View"
1522
+ },
1523
+ "minItems": 1
1524
+ }
1525
+ },
1526
+ "required": [
1527
+ "type",
1528
+ "collection",
1529
+ "record"
1530
+ ],
1531
+ "additionalProperties": false
1532
+ },
1533
+ "BoardView": {
1534
+ "type": "object",
1535
+ "description": "Records grouped by a field (kanban).",
1536
+ "properties": {
1537
+ "type": {
1538
+ "const": "board"
1539
+ },
1540
+ "id": {
1541
+ "$ref": "#/$defs/PaneId"
1542
+ },
1543
+ "title": {
1544
+ "$ref": "#/$defs/Text"
1545
+ },
1546
+ "actions": {
1547
+ "$ref": "#/$defs/Buttons",
1548
+ "description": "Toolbar actions of this view."
1549
+ },
1550
+ "fallback": {
1551
+ "$ref": "#/$defs/View",
1552
+ "description": "What a front end that does not know this view kind draws instead."
1553
+ },
1554
+ "collection": {
1555
+ "$ref": "#/$defs/Name"
1556
+ },
1557
+ "groupBy": {
1558
+ "$ref": "#/$defs/Name"
1559
+ },
1560
+ "card": {
1561
+ "$ref": "#/$defs/Fields"
1562
+ },
1563
+ "filter": {
1564
+ "$ref": "#/$defs/Conditions"
1565
+ },
1566
+ "move": {
1567
+ "$ref": "#/$defs/Change"
1568
+ }
1569
+ },
1570
+ "required": [
1571
+ "type",
1572
+ "collection",
1573
+ "groupBy"
1574
+ ],
1575
+ "additionalProperties": false
1576
+ },
1577
+ "TimelineView": {
1578
+ "type": "object",
1579
+ "description": "Records on a time axis (calendar, Gantt).",
1580
+ "properties": {
1581
+ "type": {
1582
+ "const": "timeline"
1583
+ },
1584
+ "id": {
1585
+ "$ref": "#/$defs/PaneId"
1586
+ },
1587
+ "title": {
1588
+ "$ref": "#/$defs/Text"
1589
+ },
1590
+ "actions": {
1591
+ "$ref": "#/$defs/Buttons",
1592
+ "description": "Toolbar actions of this view."
1593
+ },
1594
+ "fallback": {
1595
+ "$ref": "#/$defs/View",
1596
+ "description": "What a front end that does not know this view kind draws instead."
1597
+ },
1598
+ "collection": {
1599
+ "$ref": "#/$defs/Name"
1600
+ },
1601
+ "start": {
1602
+ "$ref": "#/$defs/Name"
1603
+ },
1604
+ "end": {
1605
+ "$ref": "#/$defs/Name"
1606
+ },
1607
+ "groupBy": {
1608
+ "$ref": "#/$defs/Name"
1609
+ },
1610
+ "scale": {
1611
+ "enum": [
1612
+ "day",
1613
+ "week",
1614
+ "month",
1615
+ "gantt"
1616
+ ]
1617
+ },
1618
+ "filter": {
1619
+ "$ref": "#/$defs/Conditions"
1620
+ },
1621
+ "move": {
1622
+ "$ref": "#/$defs/Change"
1623
+ }
1624
+ },
1625
+ "required": [
1626
+ "type",
1627
+ "collection",
1628
+ "start"
1629
+ ],
1630
+ "additionalProperties": false
1631
+ },
1632
+ "TreeView": {
1633
+ "type": "object",
1634
+ "description": "Records linked to a parent.",
1635
+ "properties": {
1636
+ "type": {
1637
+ "const": "tree"
1638
+ },
1639
+ "id": {
1640
+ "$ref": "#/$defs/PaneId"
1641
+ },
1642
+ "title": {
1643
+ "$ref": "#/$defs/Text"
1644
+ },
1645
+ "actions": {
1646
+ "$ref": "#/$defs/Buttons",
1647
+ "description": "Toolbar actions of this view."
1648
+ },
1649
+ "fallback": {
1650
+ "$ref": "#/$defs/View",
1651
+ "description": "What a front end that does not know this view kind draws instead."
1652
+ },
1653
+ "collection": {
1654
+ "$ref": "#/$defs/Name"
1655
+ },
1656
+ "parent": {
1657
+ "$ref": "#/$defs/Name"
1658
+ },
1659
+ "label": {
1660
+ "$ref": "#/$defs/Name"
1661
+ },
1662
+ "order": {
1663
+ "$ref": "#/$defs/Name"
1664
+ },
1665
+ "move": {
1666
+ "$ref": "#/$defs/Change"
1667
+ }
1668
+ },
1669
+ "required": [
1670
+ "type",
1671
+ "collection",
1672
+ "parent",
1673
+ "label"
1674
+ ],
1675
+ "additionalProperties": false
1676
+ },
1677
+ "MatrixView": {
1678
+ "type": "object",
1679
+ "description": "Rows by columns of a relation (checklists, grants).",
1680
+ "properties": {
1681
+ "type": {
1682
+ "const": "matrix"
1683
+ },
1684
+ "id": {
1685
+ "$ref": "#/$defs/PaneId"
1686
+ },
1687
+ "title": {
1688
+ "$ref": "#/$defs/Text"
1689
+ },
1690
+ "actions": {
1691
+ "$ref": "#/$defs/Buttons",
1692
+ "description": "Toolbar actions of this view."
1693
+ },
1694
+ "fallback": {
1695
+ "$ref": "#/$defs/View",
1696
+ "description": "What a front end that does not know this view kind draws instead."
1697
+ },
1698
+ "collection": {
1699
+ "$ref": "#/$defs/Name"
1700
+ },
1701
+ "row": {
1702
+ "$ref": "#/$defs/Name"
1703
+ },
1704
+ "column": {
1705
+ "$ref": "#/$defs/Name"
1706
+ },
1707
+ "value": {
1708
+ "$ref": "#/$defs/Name"
1709
+ },
1710
+ "edit": {
1711
+ "$ref": "#/$defs/Change"
1712
+ }
1713
+ },
1714
+ "required": [
1715
+ "type",
1716
+ "collection",
1717
+ "row",
1718
+ "column",
1719
+ "value"
1720
+ ],
1721
+ "additionalProperties": false
1722
+ },
1723
+ "MapView": {
1724
+ "type": "object",
1725
+ "description": "Records with a location.",
1726
+ "properties": {
1727
+ "type": {
1728
+ "const": "map"
1729
+ },
1730
+ "id": {
1731
+ "$ref": "#/$defs/PaneId"
1732
+ },
1733
+ "title": {
1734
+ "$ref": "#/$defs/Text"
1735
+ },
1736
+ "actions": {
1737
+ "$ref": "#/$defs/Buttons",
1738
+ "description": "Toolbar actions of this view."
1739
+ },
1740
+ "fallback": {
1741
+ "$ref": "#/$defs/View",
1742
+ "description": "What a front end that does not know this view kind draws instead."
1743
+ },
1744
+ "collection": {
1745
+ "$ref": "#/$defs/Name"
1746
+ },
1747
+ "location": {
1748
+ "$ref": "#/$defs/Name"
1749
+ },
1750
+ "label": {
1751
+ "$ref": "#/$defs/Name"
1752
+ },
1753
+ "filter": {
1754
+ "$ref": "#/$defs/Conditions"
1755
+ }
1756
+ },
1757
+ "required": [
1758
+ "type",
1759
+ "collection",
1760
+ "location"
1761
+ ],
1762
+ "additionalProperties": false
1763
+ },
1764
+ "StatView": {
1765
+ "type": "object",
1766
+ "description": "A number.",
1767
+ "properties": {
1768
+ "type": {
1769
+ "const": "stat"
1770
+ },
1771
+ "id": {
1772
+ "$ref": "#/$defs/PaneId"
1773
+ },
1774
+ "title": {
1775
+ "$ref": "#/$defs/Text"
1776
+ },
1777
+ "actions": {
1778
+ "$ref": "#/$defs/Buttons",
1779
+ "description": "Toolbar actions of this view."
1780
+ },
1781
+ "fallback": {
1782
+ "$ref": "#/$defs/View",
1783
+ "description": "What a front end that does not know this view kind draws instead."
1784
+ },
1785
+ "source": {
1786
+ "anyOf": [
1787
+ {
1788
+ "type": "object",
1789
+ "description": "An aggregate over a collection.",
1790
+ "properties": {
1791
+ "collection": {
1792
+ "$ref": "#/$defs/Name"
1793
+ },
1794
+ "aggregate": {
1795
+ "enum": [
1796
+ "count",
1797
+ "sum",
1798
+ "avg",
1799
+ "min",
1800
+ "max"
1801
+ ]
1802
+ },
1803
+ "field": {
1804
+ "$ref": "#/$defs/Name"
1805
+ },
1806
+ "filter": {
1807
+ "$ref": "#/$defs/Conditions"
1808
+ }
1809
+ },
1810
+ "required": [
1811
+ "collection",
1812
+ "aggregate"
1813
+ ],
1814
+ "additionalProperties": false
1815
+ },
1816
+ {
1817
+ "$ref": "#/$defs/ActionCall"
1818
+ }
1819
+ ]
1820
+ },
1821
+ "format": {
1822
+ "enum": [
1823
+ "number",
1824
+ "money",
1825
+ "progress",
1826
+ "elapsed"
1827
+ ]
1828
+ },
1829
+ "tone": {
1830
+ "$ref": "#/$defs/Tone"
1831
+ }
1832
+ },
1833
+ "required": [
1834
+ "type",
1835
+ "source"
1836
+ ],
1837
+ "additionalProperties": false
1838
+ },
1839
+ "SplitView": {
1840
+ "type": "object",
1841
+ "description": "Panes side by side; a later pane filters on `$selected` of an earlier one.",
1842
+ "properties": {
1843
+ "type": {
1844
+ "const": "split"
1845
+ },
1846
+ "id": {
1847
+ "$ref": "#/$defs/PaneId"
1848
+ },
1849
+ "title": {
1850
+ "$ref": "#/$defs/Text"
1851
+ },
1852
+ "actions": {
1853
+ "$ref": "#/$defs/Buttons",
1854
+ "description": "Toolbar actions of this view."
1855
+ },
1856
+ "fallback": {
1857
+ "$ref": "#/$defs/View",
1858
+ "description": "What a front end that does not know this view kind draws instead."
1859
+ },
1860
+ "panes": {
1861
+ "type": "array",
1862
+ "items": {
1863
+ "$ref": "#/$defs/View"
1864
+ },
1865
+ "minItems": 2
1866
+ }
1867
+ },
1868
+ "required": [
1869
+ "type",
1870
+ "panes"
1871
+ ],
1872
+ "additionalProperties": false
1873
+ },
1874
+ "TabsView": {
1875
+ "type": "object",
1876
+ "description": "Views as tabs.",
1877
+ "properties": {
1878
+ "type": {
1879
+ "const": "tabs"
1880
+ },
1881
+ "id": {
1882
+ "$ref": "#/$defs/PaneId"
1883
+ },
1884
+ "title": {
1885
+ "$ref": "#/$defs/Text"
1886
+ },
1887
+ "actions": {
1888
+ "$ref": "#/$defs/Buttons",
1889
+ "description": "Toolbar actions of this view."
1890
+ },
1891
+ "fallback": {
1892
+ "$ref": "#/$defs/View",
1893
+ "description": "What a front end that does not know this view kind draws instead."
1894
+ },
1895
+ "items": {
1896
+ "type": "array",
1897
+ "items": {
1898
+ "$ref": "#/$defs/View"
1899
+ },
1900
+ "minItems": 1
1901
+ }
1902
+ },
1903
+ "required": [
1904
+ "type",
1905
+ "items"
1906
+ ],
1907
+ "additionalProperties": false
1908
+ },
1909
+ "View": {
1910
+ "anyOf": [
1911
+ {
1912
+ "$ref": "#/$defs/ListView"
1913
+ },
1914
+ {
1915
+ "$ref": "#/$defs/FormView"
1916
+ },
1917
+ {
1918
+ "$ref": "#/$defs/DetailView"
1919
+ },
1920
+ {
1921
+ "$ref": "#/$defs/BoardView"
1922
+ },
1923
+ {
1924
+ "$ref": "#/$defs/TimelineView"
1925
+ },
1926
+ {
1927
+ "$ref": "#/$defs/TreeView"
1928
+ },
1929
+ {
1930
+ "$ref": "#/$defs/MatrixView"
1931
+ },
1932
+ {
1933
+ "$ref": "#/$defs/MapView"
1934
+ },
1935
+ {
1936
+ "$ref": "#/$defs/StatView"
1937
+ },
1938
+ {
1939
+ "$ref": "#/$defs/SplitView"
1940
+ },
1941
+ {
1942
+ "$ref": "#/$defs/TabsView"
1943
+ }
1944
+ ]
1945
+ },
1946
+ "ActionResult": {
1947
+ "description": "What an action returns, as a front end reads it (ADR 0042 decision 4). An object with `view`, `file` or `reveal` is one of the closed forms; anything else is values.",
1948
+ "anyOf": [
1949
+ {
1950
+ "type": "object",
1951
+ "description": "Opens a view (a navigation).",
1952
+ "properties": {
1953
+ "view": {
1954
+ "$ref": "#/$defs/ViewId"
1955
+ },
1956
+ "params": {
1957
+ "type": "object",
1958
+ "description": "The parameters it is opened with (`$param`).",
1959
+ "additionalProperties": {
1960
+ "$ref": "#/$defs/Literal"
1961
+ }
1962
+ }
1963
+ },
1964
+ "required": [
1965
+ "view"
1966
+ ],
1967
+ "additionalProperties": false
1968
+ },
1969
+ {
1970
+ "type": "object",
1971
+ "description": "Draws this view (wizards, computed screens).",
1972
+ "properties": {
1973
+ "view": {
1974
+ "$ref": "#/$defs/View"
1975
+ }
1976
+ },
1977
+ "required": [
1978
+ "view"
1979
+ ],
1980
+ "additionalProperties": false
1981
+ },
1982
+ {
1983
+ "type": "object",
1984
+ "description": "Hands the caller a stored file.",
1985
+ "properties": {
1986
+ "file": {
1987
+ "type": "string",
1988
+ "minLength": 1
1989
+ }
1990
+ },
1991
+ "required": [
1992
+ "file"
1993
+ ],
1994
+ "additionalProperties": false
1995
+ },
1996
+ {
1997
+ "type": "object",
1998
+ "description": "Shows a value once (a key, a secret).",
1999
+ "properties": {
2000
+ "reveal": {
2001
+ "type": "string",
2002
+ "minLength": 1
2003
+ }
2004
+ },
2005
+ "required": [
2006
+ "reveal"
2007
+ ],
2008
+ "additionalProperties": false
2009
+ },
2010
+ {
2011
+ "$ref": "#/$defs/ActionValues"
2012
+ }
2013
+ ]
2014
+ },
2015
+ "ActionValues": {
2016
+ "description": "Values: a scalar, a list, or an object without `view`, `file` or `reveal` (a form `recalc` merges an object of them).",
2017
+ "anyOf": [
2018
+ {
2019
+ "type": [
2020
+ "string",
2021
+ "number",
2022
+ "boolean",
2023
+ "null"
2024
+ ]
2025
+ },
2026
+ {
2027
+ "type": "array",
2028
+ "items": {}
2029
+ },
2030
+ {
2031
+ "type": "object",
2032
+ "properties": {
2033
+ "view": {
2034
+ "not": {}
2035
+ },
2036
+ "file": {
2037
+ "not": {}
2038
+ },
2039
+ "reveal": {
2040
+ "not": {}
2041
+ }
2042
+ }
2043
+ }
2044
+ ]
2045
+ }
2046
+ }
2047
+ }