@dmptool/types 1.1.3 → 1.2.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.
Files changed (76) hide show
  1. package/README.md +119 -47
  2. package/dist/answers/__tests__/answers.spec.js +20 -28
  3. package/dist/answers/__tests__/usage.spec.d.ts +1 -0
  4. package/dist/answers/__tests__/usage.spec.js +175 -0
  5. package/dist/answers/answer.d.ts +12 -15
  6. package/dist/answers/answer.js +3 -4
  7. package/dist/answers/dateAnswers.d.ts +30 -30
  8. package/dist/answers/dateAnswers.js +6 -5
  9. package/dist/answers/graphQLAnswers.d.ts +25 -25
  10. package/dist/answers/graphQLAnswers.js +4 -4
  11. package/dist/answers/index.d.ts +860 -1088
  12. package/dist/answers/index.js +2 -2
  13. package/dist/answers/numberAnswers.d.ts +41 -41
  14. package/dist/answers/numberAnswers.js +8 -8
  15. package/dist/answers/optionBasedAnswers.d.ts +55 -55
  16. package/dist/answers/optionBasedAnswers.js +10 -10
  17. package/dist/answers/tableAnswers.d.ts +811 -1772
  18. package/dist/answers/tableAnswers.js +12 -8
  19. package/dist/answers/textAnswers.d.ts +44 -44
  20. package/dist/answers/textAnswers.js +8 -8
  21. package/dist/questions/__tests__/graphQLQuestions.spec.js +1 -1
  22. package/dist/questions/__tests__/usage.spec.d.ts +8 -0
  23. package/dist/questions/__tests__/usage.spec.js +312 -0
  24. package/dist/questions/dateQuestions.d.ts +81 -82
  25. package/dist/questions/dateQuestions.js +12 -16
  26. package/dist/questions/graphQLQuestions.d.ts +142 -142
  27. package/dist/questions/graphQLQuestions.js +35 -30
  28. package/dist/questions/index.d.ts +1494 -1674
  29. package/dist/questions/index.js +2 -2
  30. package/dist/questions/numberQuestions.d.ts +97 -98
  31. package/dist/questions/numberQuestions.js +7 -19
  32. package/dist/questions/optionBasedQuestions.d.ts +163 -166
  33. package/dist/questions/optionBasedQuestions.js +20 -36
  34. package/dist/questions/question.d.ts +24 -48
  35. package/dist/questions/question.js +78 -17
  36. package/dist/questions/tableQuestions.d.ts +2219 -2231
  37. package/dist/questions/tableQuestions.js +6 -11
  38. package/dist/questions/textQuestions.d.ts +104 -104
  39. package/dist/questions/textQuestions.js +6 -23
  40. package/dist/schemas/affiliationSearchAnswer.schema.json +9 -12
  41. package/dist/schemas/affiliationSearchQuestion.schema.json +30 -36
  42. package/dist/schemas/anyAnswer.schema.json +228 -237
  43. package/dist/schemas/anyQuestion.schema.json +292 -493
  44. package/dist/schemas/anyTableColumnAnswer.schema.json +93 -106
  45. package/dist/schemas/anyTableColumnQuestion.schema.json +164 -325
  46. package/dist/schemas/booleanAnswer.schema.json +8 -11
  47. package/dist/schemas/booleanQuestion.schema.json +7 -10
  48. package/dist/schemas/checkboxesAnswer.schema.json +13 -14
  49. package/dist/schemas/checkboxesQuestion.schema.json +12 -13
  50. package/dist/schemas/currencyAnswer.schema.json +8 -11
  51. package/dist/schemas/currencyQuestion.schema.json +7 -10
  52. package/dist/schemas/dateAnswer.schema.json +8 -11
  53. package/dist/schemas/dateQuestion.schema.json +7 -10
  54. package/dist/schemas/dateRangeAnswer.schema.json +16 -21
  55. package/dist/schemas/dateRangeQuestion.schema.json +38 -20
  56. package/dist/schemas/emailAnswer.schema.json +8 -11
  57. package/dist/schemas/emailQuestion.schema.json +7 -10
  58. package/dist/schemas/multiselectBoxAnswer.schema.json +13 -14
  59. package/dist/schemas/multiselectBoxQuestion.schema.json +14 -14
  60. package/dist/schemas/numberAnswer.schema.json +8 -11
  61. package/dist/schemas/numberQuestion.schema.json +7 -10
  62. package/dist/schemas/numberRangeAnswer.schema.json +17 -22
  63. package/dist/schemas/numberRangeQuestion.schema.json +18 -19
  64. package/dist/schemas/radioButtonsAnswer.schema.json +8 -11
  65. package/dist/schemas/radioButtonsQuestion.schema.json +12 -13
  66. package/dist/schemas/selectBoxAnswer.schema.json +8 -11
  67. package/dist/schemas/selectBoxQuestion.schema.json +18 -15
  68. package/dist/schemas/tableAnswer.schema.json +337 -343
  69. package/dist/schemas/tableQuestion.schema.json +178 -352
  70. package/dist/schemas/textAnswer.schema.json +8 -11
  71. package/dist/schemas/textAreaAnswer.schema.json +8 -11
  72. package/dist/schemas/textAreaQuestion.schema.json +7 -10
  73. package/dist/schemas/textQuestion.schema.json +7 -10
  74. package/dist/schemas/urlAnswer.schema.json +8 -11
  75. package/dist/schemas/urlQuestion.schema.json +7 -10
  76. package/package.json +1 -1
@@ -23,28 +23,25 @@
23
23
  "type": "string"
24
24
  }
25
25
  },
26
- "additionalProperties": false
26
+ "additionalProperties": false,
27
+ "default": {}
27
28
  },
28
29
  "meta": {
29
30
  "type": "object",
30
31
  "properties": {
31
32
  "schemaVersion": {
32
33
  "type": "string",
33
- "const": "1.0"
34
+ "default": "1.0"
34
35
  },
35
36
  "title": {
36
- "type": "string",
37
- "const": "Affiliation Search"
37
+ "type": "string"
38
38
  },
39
39
  "usageDescription": {
40
- "type": "string",
41
- "const": "For questions that require the user to select from a controlled list of institutions."
40
+ "type": "string"
42
41
  }
43
42
  },
44
- "required": [
45
- "schemaVersion"
46
- ],
47
- "additionalProperties": false
43
+ "additionalProperties": false,
44
+ "default": {}
48
45
  },
49
46
  "graphQL": {
50
47
  "type": "object",
@@ -56,7 +53,8 @@
56
53
  "properties": {
57
54
  "propertyName": {
58
55
  "type": "string",
59
- "const": "displayName"
56
+ "const": "displayName",
57
+ "default": "displayName"
60
58
  },
61
59
  "label": {
62
60
  "type": "string",
@@ -67,22 +65,24 @@
67
65
  "default": "SignupPage.institution"
68
66
  }
69
67
  },
70
- "required": [
71
- "propertyName"
72
- ],
73
68
  "additionalProperties": false
74
- }
69
+ },
70
+ "default": [
71
+ {}
72
+ ]
75
73
  },
76
74
  "localQueryId": {
77
75
  "type": "string"
78
76
  },
79
77
  "query": {
80
78
  "type": "string",
81
- "const": "query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}"
79
+ "const": "\nquery Affiliations($name: String!){\n affiliations(name: $name) {\n totalCount\n nextCursor\n items {\n id\n displayName\n uri\n }\n }\n}",
80
+ "default": "\nquery Affiliations($name: String!){\n affiliations(name: $name) {\n totalCount\n nextCursor\n items {\n id\n displayName\n uri\n }\n }\n}"
82
81
  },
83
82
  "responseField": {
84
83
  "type": "string",
85
- "const": "affiliations.items"
84
+ "const": "affiliations.items",
85
+ "default": "affiliations.items"
86
86
  },
87
87
  "variables": {
88
88
  "type": "array",
@@ -91,7 +91,8 @@
91
91
  "properties": {
92
92
  "name": {
93
93
  "type": "string",
94
- "const": "name"
94
+ "const": "name",
95
+ "default": "name"
95
96
  },
96
97
  "type": {
97
98
  "type": "string",
@@ -103,19 +104,19 @@
103
104
  },
104
105
  "minLength": {
105
106
  "type": "number",
106
- "const": 3
107
+ "const": 3,
108
+ "default": 3
107
109
  },
108
110
  "labelTranslationKey": {
109
111
  "type": "string",
110
112
  "default": "SignupPage.institutionHelp"
111
113
  }
112
114
  },
113
- "required": [
114
- "name",
115
- "minLength"
116
- ],
117
115
  "additionalProperties": false
118
- }
116
+ },
117
+ "default": [
118
+ {}
119
+ ]
119
120
  },
120
121
  "queryId": {
121
122
  "type": "string",
@@ -123,23 +124,16 @@
123
124
  },
124
125
  "answerField": {
125
126
  "type": "string",
126
- "const": "uri"
127
+ "const": "uri",
128
+ "default": "uri"
127
129
  }
128
130
  },
129
- "required": [
130
- "displayFields",
131
- "query",
132
- "responseField",
133
- "variables",
134
- "answerField"
135
- ],
136
- "additionalProperties": false
131
+ "additionalProperties": false,
132
+ "default": {}
137
133
  }
138
134
  },
139
135
  "required": [
140
- "type",
141
- "meta",
142
- "graphQL"
136
+ "type"
143
137
  ],
144
138
  "additionalProperties": false
145
139
  },
@@ -167,27 +161,11 @@
167
161
  "default": false
168
162
  }
169
163
  },
170
- "additionalProperties": false
164
+ "additionalProperties": false,
165
+ "default": {}
171
166
  },
172
167
  "meta": {
173
- "type": "object",
174
- "properties": {
175
- "schemaVersion": {
176
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
177
- },
178
- "title": {
179
- "type": "string",
180
- "const": "Yes/No Field"
181
- },
182
- "usageDescription": {
183
- "type": "string",
184
- "const": "For questions that require a simple Yes/No response."
185
- }
186
- },
187
- "required": [
188
- "schemaVersion"
189
- ],
190
- "additionalProperties": false
168
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
191
169
  }
192
170
  },
193
171
  "required": [
@@ -203,27 +181,11 @@
203
181
  "const": "checkBoxes"
204
182
  },
205
183
  "attributes": {
206
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
184
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes",
185
+ "default": {}
207
186
  },
208
187
  "meta": {
209
- "type": "object",
210
- "properties": {
211
- "schemaVersion": {
212
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
213
- },
214
- "title": {
215
- "type": "string",
216
- "const": "Check Boxes"
217
- },
218
- "usageDescription": {
219
- "type": "string",
220
- "const": "For multiple choice questions where users can select multiple options."
221
- }
222
- },
223
- "required": [
224
- "schemaVersion"
225
- ],
226
- "additionalProperties": false
188
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
227
189
  },
228
190
  "options": {
229
191
  "type": "array",
@@ -244,12 +206,14 @@
244
206
  }
245
207
  },
246
208
  "additionalProperties": false
247
- }
209
+ },
210
+ "default": [
211
+ {}
212
+ ]
248
213
  }
249
214
  },
250
215
  "required": [
251
- "type",
252
- "options"
216
+ "type"
253
217
  ],
254
218
  "additionalProperties": false
255
219
  },
@@ -288,27 +252,11 @@
288
252
  "default": "USD"
289
253
  }
290
254
  },
291
- "additionalProperties": false
255
+ "additionalProperties": false,
256
+ "default": {}
292
257
  },
293
258
  "meta": {
294
- "type": "object",
295
- "properties": {
296
- "schemaVersion": {
297
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
298
- },
299
- "title": {
300
- "type": "string",
301
- "const": "Currency Field"
302
- },
303
- "usageDescription": {
304
- "type": "string",
305
- "const": "For questions that require a monetary amount (e.g. Cost or Budget)."
306
- }
307
- },
308
- "required": [
309
- "schemaVersion"
310
- ],
311
- "additionalProperties": false
259
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
312
260
  }
313
261
  },
314
262
  "required": [
@@ -346,27 +294,11 @@
346
294
  "default": 1
347
295
  }
348
296
  },
349
- "additionalProperties": false
297
+ "additionalProperties": false,
298
+ "default": {}
350
299
  },
351
300
  "meta": {
352
- "type": "object",
353
- "properties": {
354
- "schemaVersion": {
355
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
356
- },
357
- "title": {
358
- "type": "string",
359
- "const": "Date Field"
360
- },
361
- "usageDescription": {
362
- "type": "string",
363
- "const": "For questions that require a date."
364
- }
365
- },
366
- "required": [
367
- "schemaVersion"
368
- ],
369
- "additionalProperties": false
301
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
370
302
  }
371
303
  },
372
304
  "required": [
@@ -382,48 +314,74 @@
382
314
  "const": "dateRange"
383
315
  },
384
316
  "attributes": {
385
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
317
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes",
318
+ "default": {}
386
319
  },
387
320
  "meta": {
388
- "type": "object",
389
- "properties": {
390
- "schemaVersion": {
391
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
392
- },
393
- "title": {
394
- "type": "string",
395
- "const": "Date Range"
396
- },
397
- "usageDescription": {
398
- "type": "string",
399
- "const": "For questions that require a date range (e.g. From/To, Start/End)"
400
- }
401
- },
402
- "required": [
403
- "schemaVersion"
404
- ],
405
- "additionalProperties": false
321
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
406
322
  },
407
323
  "columns": {
408
324
  "type": "object",
409
325
  "properties": {
410
326
  "start": {
411
- "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes"
327
+ "type": "object",
328
+ "properties": {
329
+ "label": {
330
+ "type": "string",
331
+ "default": "From"
332
+ },
333
+ "help": {
334
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/help"
335
+ },
336
+ "labelTranslationKey": {
337
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
338
+ },
339
+ "max": {
340
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes/properties/max"
341
+ },
342
+ "min": {
343
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes/properties/min"
344
+ },
345
+ "step": {
346
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes/properties/step"
347
+ }
348
+ },
349
+ "additionalProperties": false,
350
+ "default": {}
412
351
  },
413
352
  "end": {
414
- "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes"
353
+ "type": "object",
354
+ "properties": {
355
+ "label": {
356
+ "type": "string",
357
+ "default": "To"
358
+ },
359
+ "help": {
360
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/help"
361
+ },
362
+ "labelTranslationKey": {
363
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
364
+ },
365
+ "max": {
366
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes/properties/max"
367
+ },
368
+ "min": {
369
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes/properties/min"
370
+ },
371
+ "step": {
372
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes/properties/step"
373
+ }
374
+ },
375
+ "additionalProperties": false,
376
+ "default": {}
415
377
  }
416
378
  },
417
- "required": [
418
- "start",
419
- "end"
420
- ],
421
- "additionalProperties": false
379
+ "additionalProperties": false,
380
+ "default": {}
422
381
  }
423
382
  },
424
383
  "required": [
425
- "type",
426
- "columns"
384
+ "type"
427
385
  ],
428
386
  "additionalProperties": false
429
387
  },
@@ -461,27 +419,11 @@
461
419
  "default": false
462
420
  }
463
421
  },
464
- "additionalProperties": false
422
+ "additionalProperties": false,
423
+ "default": {}
465
424
  },
466
425
  "meta": {
467
- "type": "object",
468
- "properties": {
469
- "schemaVersion": {
470
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
471
- },
472
- "title": {
473
- "type": "string",
474
- "const": "Email Field"
475
- },
476
- "usageDescription": {
477
- "type": "string",
478
- "const": "For questions that require require email address(es)."
479
- }
480
- },
481
- "required": [
482
- "schemaVersion"
483
- ],
484
- "additionalProperties": false
426
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
485
427
  }
486
428
  },
487
429
  "required": [
@@ -489,129 +431,6 @@
489
431
  ],
490
432
  "additionalProperties": false
491
433
  },
492
- {
493
- "type": "object",
494
- "properties": {
495
- "type": {
496
- "type": "string",
497
- "const": "filteredSearch"
498
- },
499
- "attributes": {
500
- "type": "object",
501
- "properties": {
502
- "label": {
503
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/label"
504
- },
505
- "help": {
506
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/help"
507
- },
508
- "labelTranslationKey": {
509
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
510
- },
511
- "multiple": {
512
- "type": "boolean"
513
- }
514
- },
515
- "additionalProperties": false
516
- },
517
- "meta": {
518
- "type": "object",
519
- "properties": {
520
- "schemaVersion": {
521
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
522
- },
523
- "title": {
524
- "type": "string",
525
- "const": "Not yet implemented"
526
- },
527
- "usageDescription": {
528
- "type": "string"
529
- }
530
- },
531
- "required": [
532
- "schemaVersion"
533
- ],
534
- "additionalProperties": false
535
- },
536
- "graphQL": {
537
- "type": "object",
538
- "properties": {
539
- "displayFields": {
540
- "type": "array",
541
- "items": {
542
- "type": "object",
543
- "properties": {
544
- "propertyName": {
545
- "type": "string"
546
- },
547
- "label": {
548
- "type": "string"
549
- },
550
- "labelTranslationKey": {
551
- "type": "string"
552
- }
553
- },
554
- "required": [
555
- "propertyName",
556
- "label"
557
- ],
558
- "additionalProperties": false
559
- }
560
- },
561
- "localQueryId": {
562
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/graphQL/properties/localQueryId"
563
- },
564
- "query": {
565
- "type": "string"
566
- },
567
- "responseField": {
568
- "type": "string"
569
- },
570
- "variables": {
571
- "type": "array",
572
- "items": {
573
- "type": "object",
574
- "properties": {
575
- "minLength": {
576
- "type": "number"
577
- },
578
- "label": {
579
- "type": "string"
580
- },
581
- "labelTranslationKey": {
582
- "type": "string"
583
- },
584
- "name": {
585
- "type": "string"
586
- },
587
- "type": {
588
- "type": "string"
589
- },
590
- "defaultValue": {
591
- "type": "string"
592
- }
593
- },
594
- "required": [
595
- "name",
596
- "type"
597
- ],
598
- "additionalProperties": false
599
- }
600
- }
601
- },
602
- "required": [
603
- "displayFields",
604
- "responseField"
605
- ],
606
- "additionalProperties": false
607
- }
608
- },
609
- "required": [
610
- "type",
611
- "graphQL"
612
- ],
613
- "additionalProperties": false
614
- },
615
434
  {
616
435
  "type": "object",
617
436
  "properties": {
@@ -639,27 +458,13 @@
639
458
  "required": [
640
459
  "multiple"
641
460
  ],
642
- "additionalProperties": false
461
+ "additionalProperties": false,
462
+ "default": {
463
+ "multiple": true
464
+ }
643
465
  },
644
466
  "meta": {
645
- "type": "object",
646
- "properties": {
647
- "schemaVersion": {
648
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
649
- },
650
- "title": {
651
- "type": "string",
652
- "const": "Multi-select Box"
653
- },
654
- "usageDescription": {
655
- "type": "string",
656
- "const": "For questions where multiple answers are valid. Allows users to select several options from a predefined list, providing flexibility in responses."
657
- }
658
- },
659
- "required": [
660
- "schemaVersion"
661
- ],
662
- "additionalProperties": false
467
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
663
468
  },
664
469
  "options": {
665
470
  "type": "array",
@@ -678,13 +483,14 @@
678
483
  }
679
484
  },
680
485
  "additionalProperties": false
681
- }
486
+ },
487
+ "default": [
488
+ {}
489
+ ]
682
490
  }
683
491
  },
684
492
  "required": [
685
- "type",
686
- "attributes",
687
- "options"
493
+ "type"
688
494
  ],
689
495
  "additionalProperties": false
690
496
  },
@@ -717,27 +523,11 @@
717
523
  "$ref": "#/definitions/AnyQuestion/anyOf/3/properties/attributes/properties/step"
718
524
  }
719
525
  },
720
- "additionalProperties": false
526
+ "additionalProperties": false,
527
+ "default": {}
721
528
  },
722
529
  "meta": {
723
- "type": "object",
724
- "properties": {
725
- "schemaVersion": {
726
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
727
- },
728
- "title": {
729
- "type": "string",
730
- "const": "Number Field"
731
- },
732
- "usageDescription": {
733
- "type": "string",
734
- "const": "For questions that require a single numeric value."
735
- }
736
- },
737
- "required": [
738
- "schemaVersion"
739
- ],
740
- "additionalProperties": false
530
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
741
531
  }
742
532
  },
743
533
  "required": [
@@ -753,48 +543,34 @@
753
543
  "const": "numberRange"
754
544
  },
755
545
  "attributes": {
756
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
546
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes",
547
+ "default": {}
757
548
  },
758
549
  "meta": {
759
- "type": "object",
760
- "properties": {
761
- "schemaVersion": {
762
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
763
- },
764
- "title": {
765
- "type": "string",
766
- "const": "Number Range"
767
- },
768
- "usageDescription": {
769
- "type": "string",
770
- "const": "For questions that require a numerical range (e.g. From/To, Min/Max)."
771
- }
772
- },
773
- "required": [
774
- "schemaVersion"
775
- ],
776
- "additionalProperties": false
550
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
777
551
  },
778
552
  "columns": {
779
553
  "type": "object",
780
554
  "properties": {
781
555
  "start": {
782
- "$ref": "#/definitions/AnyQuestion/anyOf/9/properties/attributes"
556
+ "$ref": "#/definitions/AnyQuestion/anyOf/8/properties/attributes",
557
+ "default": {
558
+ "label": "From"
559
+ }
783
560
  },
784
561
  "end": {
785
- "$ref": "#/definitions/AnyQuestion/anyOf/9/properties/attributes"
562
+ "$ref": "#/definitions/AnyQuestion/anyOf/8/properties/attributes",
563
+ "default": {
564
+ "label": "To"
565
+ }
786
566
  }
787
567
  },
788
- "required": [
789
- "start",
790
- "end"
791
- ],
792
- "additionalProperties": false
568
+ "additionalProperties": false,
569
+ "default": {}
793
570
  }
794
571
  },
795
572
  "required": [
796
- "type",
797
- "columns"
573
+ "type"
798
574
  ],
799
575
  "additionalProperties": false
800
576
  },
@@ -806,38 +582,24 @@
806
582
  "const": "radioButtons"
807
583
  },
808
584
  "attributes": {
809
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
585
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes",
586
+ "default": {}
810
587
  },
811
588
  "meta": {
812
- "type": "object",
813
- "properties": {
814
- "schemaVersion": {
815
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
816
- },
817
- "title": {
818
- "type": "string",
819
- "const": "Radio Buttons"
820
- },
821
- "usageDescription": {
822
- "type": "string",
823
- "const": "For multiple choice questions where users select just one option."
824
- }
825
- },
826
- "required": [
827
- "schemaVersion"
828
- ],
829
- "additionalProperties": false
589
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
830
590
  },
831
591
  "options": {
832
592
  "type": "array",
833
593
  "items": {
834
- "$ref": "#/definitions/AnyQuestion/anyOf/8/properties/options/items"
835
- }
594
+ "$ref": "#/definitions/AnyQuestion/anyOf/7/properties/options/items"
595
+ },
596
+ "default": [
597
+ {}
598
+ ]
836
599
  }
837
600
  },
838
601
  "required": [
839
- "type",
840
- "options"
602
+ "type"
841
603
  ],
842
604
  "additionalProperties": false
843
605
  },
@@ -862,39 +624,32 @@
862
624
  },
863
625
  "multiple": {
864
626
  "type": "boolean",
865
- "default": false
866
- }
867
- },
868
- "additionalProperties": false
869
- },
870
- "meta": {
871
- "type": "object",
872
- "properties": {
873
- "schemaVersion": {
874
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
875
- },
876
- "title": {
877
- "type": "string",
878
- "const": "Select Box"
879
- },
880
- "usageDescription": {
881
- "type": "string",
882
- "const": "For questions where users select one option from a list."
627
+ "const": false
883
628
  }
884
629
  },
885
630
  "required": [
886
- "schemaVersion"
631
+ "multiple"
887
632
  ],
888
- "additionalProperties": false
633
+ "additionalProperties": false,
634
+ "default": {
635
+ "multiple": false
636
+ }
637
+ },
638
+ "meta": {
639
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
889
640
  },
890
641
  "options": {
891
- "$ref": "#/definitions/AnyQuestion/anyOf/8/properties/options"
642
+ "type": "array",
643
+ "items": {
644
+ "$ref": "#/definitions/AnyQuestion/anyOf/7/properties/options/items"
645
+ },
646
+ "default": [
647
+ {}
648
+ ]
892
649
  }
893
650
  },
894
651
  "required": [
895
- "type",
896
- "attributes",
897
- "options"
652
+ "type"
898
653
  ],
899
654
  "additionalProperties": false
900
655
  },
@@ -936,27 +691,11 @@
936
691
  "type": "number"
937
692
  }
938
693
  },
939
- "additionalProperties": false
694
+ "additionalProperties": false,
695
+ "default": {}
940
696
  },
941
697
  "meta": {
942
- "type": "object",
943
- "properties": {
944
- "schemaVersion": {
945
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
946
- },
947
- "title": {
948
- "type": "string",
949
- "const": "Table"
950
- },
951
- "usageDescription": {
952
- "type": "string",
953
- "const": "For questions that require a tabular format."
954
- }
955
- },
956
- "required": [
957
- "schemaVersion"
958
- ],
959
- "additionalProperties": false
698
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
960
699
  },
961
700
  "columns": {
962
701
  "type": "array",
@@ -964,7 +703,8 @@
964
703
  "type": "object",
965
704
  "properties": {
966
705
  "heading": {
967
- "type": "string"
706
+ "type": "string",
707
+ "default": "Column A"
968
708
  },
969
709
  "content": {
970
710
  "anyOf": [
@@ -990,16 +730,121 @@
990
730
  "$ref": "#/definitions/AnyQuestion/anyOf/6"
991
731
  },
992
732
  {
993
- "$ref": "#/definitions/AnyQuestion/anyOf/7"
733
+ "type": "object",
734
+ "properties": {
735
+ "type": {
736
+ "type": "string",
737
+ "const": "filteredSearch"
738
+ },
739
+ "attributes": {
740
+ "type": "object",
741
+ "properties": {
742
+ "label": {
743
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/label"
744
+ },
745
+ "help": {
746
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/help"
747
+ },
748
+ "labelTranslationKey": {
749
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
750
+ },
751
+ "multiple": {
752
+ "type": "boolean",
753
+ "default": true
754
+ }
755
+ },
756
+ "additionalProperties": false,
757
+ "default": {}
758
+ },
759
+ "meta": {
760
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
761
+ },
762
+ "graphQL": {
763
+ "type": "object",
764
+ "properties": {
765
+ "displayFields": {
766
+ "type": "array",
767
+ "items": {
768
+ "type": "object",
769
+ "properties": {
770
+ "propertyName": {
771
+ "type": "string",
772
+ "default": "id"
773
+ },
774
+ "label": {
775
+ "type": "string",
776
+ "default": "Id"
777
+ },
778
+ "labelTranslationKey": {
779
+ "type": "string"
780
+ }
781
+ },
782
+ "additionalProperties": false
783
+ },
784
+ "default": [
785
+ {}
786
+ ]
787
+ },
788
+ "localQueryId": {
789
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/graphQL/properties/localQueryId"
790
+ },
791
+ "query": {
792
+ "type": "string"
793
+ },
794
+ "responseField": {
795
+ "type": "string",
796
+ "default": "query.items"
797
+ },
798
+ "variables": {
799
+ "type": "array",
800
+ "items": {
801
+ "type": "object",
802
+ "properties": {
803
+ "minLength": {
804
+ "type": "number"
805
+ },
806
+ "label": {
807
+ "type": "string"
808
+ },
809
+ "labelTranslationKey": {
810
+ "type": "string"
811
+ },
812
+ "name": {
813
+ "type": "string",
814
+ "default": "search"
815
+ },
816
+ "type": {
817
+ "type": "string",
818
+ "default": "string"
819
+ },
820
+ "defaultValue": {
821
+ "type": "string"
822
+ }
823
+ },
824
+ "additionalProperties": false
825
+ },
826
+ "default": [
827
+ {}
828
+ ]
829
+ }
830
+ },
831
+ "additionalProperties": false,
832
+ "default": {}
833
+ }
834
+ },
835
+ "required": [
836
+ "type"
837
+ ],
838
+ "additionalProperties": false
994
839
  },
995
840
  {
996
- "$ref": "#/definitions/AnyQuestion/anyOf/9"
841
+ "$ref": "#/definitions/AnyQuestion/anyOf/8"
997
842
  },
998
843
  {
999
- "$ref": "#/definitions/AnyQuestion/anyOf/11"
844
+ "$ref": "#/definitions/AnyQuestion/anyOf/10"
1000
845
  },
1001
846
  {
1002
- "$ref": "#/definitions/AnyQuestion/anyOf/12"
847
+ "$ref": "#/definitions/AnyQuestion/anyOf/11"
1003
848
  },
1004
849
  {
1005
850
  "type": "object",
@@ -1039,27 +884,11 @@
1039
884
  "default": true
1040
885
  }
1041
886
  },
1042
- "additionalProperties": false
887
+ "additionalProperties": false,
888
+ "default": {}
1043
889
  },
1044
890
  "meta": {
1045
- "type": "object",
1046
- "properties": {
1047
- "schemaVersion": {
1048
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
1049
- },
1050
- "title": {
1051
- "type": "string",
1052
- "const": "Text Area"
1053
- },
1054
- "usageDescription": {
1055
- "type": "string",
1056
- "const": "For questions that require longer answers, you can select formatting options too."
1057
- }
1058
- },
1059
- "required": [
1060
- "schemaVersion"
1061
- ],
1062
- "additionalProperties": false
891
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
1063
892
  }
1064
893
  },
1065
894
  "required": [
@@ -1096,27 +925,11 @@
1096
925
  "$ref": "#/definitions/AnyQuestion/anyOf/6/properties/attributes/properties/pattern"
1097
926
  }
1098
927
  },
1099
- "additionalProperties": false
928
+ "additionalProperties": false,
929
+ "default": {}
1100
930
  },
1101
931
  "meta": {
1102
- "type": "object",
1103
- "properties": {
1104
- "schemaVersion": {
1105
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
1106
- },
1107
- "title": {
1108
- "type": "string",
1109
- "const": "Text Field"
1110
- },
1111
- "usageDescription": {
1112
- "type": "string",
1113
- "const": "For questions that require short, simple answers."
1114
- }
1115
- },
1116
- "required": [
1117
- "schemaVersion"
1118
- ],
1119
- "additionalProperties": false
932
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
1120
933
  }
1121
934
  },
1122
935
  "required": [
@@ -1132,27 +945,11 @@
1132
945
  "const": "url"
1133
946
  },
1134
947
  "attributes": {
1135
- "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/12/properties/attributes"
948
+ "$ref": "#/definitions/AnyQuestion/anyOf/12/properties/columns/items/properties/content/anyOf/12/properties/attributes",
949
+ "default": {}
1136
950
  },
1137
951
  "meta": {
1138
- "type": "object",
1139
- "properties": {
1140
- "schemaVersion": {
1141
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
1142
- },
1143
- "title": {
1144
- "type": "string",
1145
- "const": "URL Field"
1146
- },
1147
- "usageDescription": {
1148
- "type": "string",
1149
- "const": "For questions that require a website, DOI or other URL."
1150
- }
1151
- },
1152
- "required": [
1153
- "schemaVersion"
1154
- ],
1155
- "additionalProperties": false
952
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
1156
953
  }
1157
954
  },
1158
955
  "required": [
@@ -1160,30 +957,32 @@
1160
957
  ],
1161
958
  "additionalProperties": false
1162
959
  }
1163
- ]
960
+ ],
961
+ "default": {
962
+ "type": "textArea"
963
+ }
1164
964
  }
1165
965
  },
1166
- "required": [
1167
- "content"
1168
- ],
1169
966
  "additionalProperties": false
1170
- }
967
+ },
968
+ "default": [
969
+ {}
970
+ ]
1171
971
  }
1172
972
  },
1173
973
  "required": [
1174
- "type",
1175
- "columns"
974
+ "type"
1176
975
  ],
1177
976
  "additionalProperties": false
1178
977
  },
1179
978
  {
1180
- "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/11"
979
+ "$ref": "#/definitions/AnyQuestion/anyOf/12/properties/columns/items/properties/content/anyOf/11"
1181
980
  },
1182
981
  {
1183
- "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/12"
982
+ "$ref": "#/definitions/AnyQuestion/anyOf/12/properties/columns/items/properties/content/anyOf/12"
1184
983
  },
1185
984
  {
1186
- "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/13"
985
+ "$ref": "#/definitions/AnyQuestion/anyOf/12/properties/columns/items/properties/content/anyOf/13"
1187
986
  }
1188
987
  ]
1189
988
  }