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