@dmptool/types 1.1.1 → 1.1.2

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 (54) hide show
  1. package/dist/answers/__tests__/answers.spec.js +11 -5
  2. package/dist/answers/answer.d.ts +3 -3
  3. package/dist/answers/graphQLAnswers.d.ts +2 -2
  4. package/dist/answers/graphQLAnswers.js +2 -2
  5. package/dist/answers/index.d.ts +92 -55
  6. package/dist/answers/index.js +2 -2
  7. package/dist/answers/optionBasedAnswers.d.ts +27 -2
  8. package/dist/answers/optionBasedAnswers.js +5 -1
  9. package/dist/answers/tableAnswers.d.ts +268 -104
  10. package/dist/answers/tableAnswers.js +2 -1
  11. package/dist/questions/__tests__/graphQLQuestions.spec.js +7 -7
  12. package/dist/questions/__tests__/optionBasedQuestions.spec.js +48 -1
  13. package/dist/questions/dateQuestions.d.ts +47 -16
  14. package/dist/questions/dateQuestions.js +25 -1
  15. package/dist/questions/graphQLQuestions.d.ts +59 -28
  16. package/dist/questions/graphQLQuestions.js +40 -3
  17. package/dist/questions/index.d.ts +1363 -646
  18. package/dist/questions/index.js +4 -2
  19. package/dist/questions/numberQuestions.d.ts +71 -25
  20. package/dist/questions/numberQuestions.js +36 -1
  21. package/dist/questions/optionBasedQuestions.d.ts +197 -44
  22. package/dist/questions/optionBasedQuestions.js +84 -6
  23. package/dist/questions/question.d.ts +51 -4
  24. package/dist/questions/question.js +14 -2
  25. package/dist/questions/tableQuestions.d.ts +1841 -932
  26. package/dist/questions/tableQuestions.js +13 -1
  27. package/dist/questions/textQuestions.d.ts +100 -40
  28. package/dist/questions/textQuestions.js +45 -7
  29. package/dist/schemas/affiliationSearchAnswer.schema.json +37 -0
  30. package/dist/schemas/affiliationSearchQuestion.schema.json +133 -0
  31. package/dist/schemas/anyAnswer.schema.json +41 -23
  32. package/dist/schemas/anyQuestion.schema.json +533 -149
  33. package/dist/schemas/anyTableColumnAnswer.schema.json +35 -14
  34. package/dist/schemas/anyTableColumnQuestion.schema.json +397 -119
  35. package/dist/schemas/booleanQuestion.schema.json +13 -2
  36. package/dist/schemas/checkboxesQuestion.schema.json +12 -0
  37. package/dist/schemas/currencyQuestion.schema.json +12 -0
  38. package/dist/schemas/dateQuestion.schema.json +12 -0
  39. package/dist/schemas/dateRangeQuestion.schema.json +12 -0
  40. package/dist/schemas/emailQuestion.schema.json +12 -0
  41. package/dist/schemas/filteredSearchQuestion.schema.json +10 -0
  42. package/dist/schemas/multiselectBoxAnswer.schema.json +40 -0
  43. package/dist/schemas/multiselectBoxQuestion.schema.json +90 -0
  44. package/dist/schemas/numberQuestion.schema.json +12 -0
  45. package/dist/schemas/numberRangeQuestion.schema.json +12 -0
  46. package/dist/schemas/radioButtonsQuestion.schema.json +12 -0
  47. package/dist/schemas/selectBoxAnswer.schema.json +1 -4
  48. package/dist/schemas/selectBoxQuestion.schema.json +18 -1
  49. package/dist/schemas/tableAnswer.schema.json +35 -14
  50. package/dist/schemas/tableQuestion.schema.json +419 -120
  51. package/dist/schemas/textAreaQuestion.schema.json +15 -4
  52. package/dist/schemas/textQuestion.schema.json +12 -0
  53. package/dist/schemas/urlQuestion.schema.json +12 -0
  54. package/package.json +1 -1
@@ -8,7 +8,7 @@
8
8
  "properties": {
9
9
  "type": {
10
10
  "type": "string",
11
- "const": "boolean"
11
+ "const": "affiliationSearch"
12
12
  },
13
13
  "attributes": {
14
14
  "type": "object",
@@ -21,9 +21,6 @@
21
21
  },
22
22
  "labelTranslationKey": {
23
23
  "type": "string"
24
- },
25
- "checked": {
26
- "type": "boolean"
27
24
  }
28
25
  },
29
26
  "additionalProperties": false
@@ -34,17 +31,102 @@
34
31
  "schemaVersion": {
35
32
  "type": "string",
36
33
  "const": "1.0"
34
+ },
35
+ "title": {
36
+ "type": "string",
37
+ "const": "Affiliation Search"
38
+ },
39
+ "usageDescription": {
40
+ "type": "string",
41
+ "const": "For questions that require the user to select from a controlled list of institutions."
42
+ },
43
+ "defaultJSON": {
44
+ "type": "string",
45
+ "const": "{\"type\":\"affiliationSearch\",\"attributes\":{},\"meta\":{\"schemaVersion\":\"1.0\"},\"graphQL\":{\"query\":\"query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}\",\"queryId\":\"useAffiliationsQuery\",\"variables\":[{\"name\":\"term\",\"type\":\"string\",\"label\":\"Search for your institution\",\"minLength\":3,\"labelTranslationKey\":\"SignupPage.institutionHelp\"}],\"answerField\":\"uri\",\"displayFields\":[{\"label\":\"Institution\",\"propertyName\":\"displayName\",\"labelTranslationKey\":\"SignupPage.institution\"}],\"responseField\":\"affiliations.items\"}}"
37
46
  }
38
47
  },
39
48
  "required": [
40
49
  "schemaVersion"
41
50
  ],
42
51
  "additionalProperties": false
52
+ },
53
+ "graphQL": {
54
+ "type": "object",
55
+ "properties": {
56
+ "displayFields": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "object",
60
+ "properties": {
61
+ "propertyName": {
62
+ "type": "string"
63
+ },
64
+ "label": {
65
+ "type": "string"
66
+ },
67
+ "labelTranslationKey": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "required": [
72
+ "propertyName",
73
+ "label"
74
+ ],
75
+ "additionalProperties": false
76
+ }
77
+ },
78
+ "localQueryId": {
79
+ "type": "string"
80
+ },
81
+ "query": {
82
+ "type": "string"
83
+ },
84
+ "responseField": {
85
+ "type": "string"
86
+ },
87
+ "variables": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "properties": {
92
+ "minLength": {
93
+ "type": "number"
94
+ },
95
+ "label": {
96
+ "type": "string"
97
+ },
98
+ "labelTranslationKey": {
99
+ "type": "string"
100
+ },
101
+ "name": {
102
+ "type": "string"
103
+ },
104
+ "type": {
105
+ "type": "string"
106
+ },
107
+ "defaultValue": {
108
+ "type": "string"
109
+ }
110
+ },
111
+ "required": [
112
+ "name",
113
+ "type"
114
+ ],
115
+ "additionalProperties": false
116
+ }
117
+ }
118
+ },
119
+ "required": [
120
+ "displayFields",
121
+ "responseField"
122
+ ],
123
+ "additionalProperties": false
43
124
  }
44
125
  },
45
126
  "required": [
46
127
  "type",
47
- "attributes"
128
+ "meta",
129
+ "graphQL"
48
130
  ],
49
131
  "additionalProperties": false
50
132
  },
@@ -53,7 +135,7 @@
53
135
  "properties": {
54
136
  "type": {
55
137
  "type": "string",
56
- "const": "checkBoxes"
138
+ "const": "boolean"
57
139
  },
58
140
  "attributes": {
59
141
  "type": "object",
@@ -66,12 +148,76 @@
66
148
  },
67
149
  "labelTranslationKey": {
68
150
  "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
151
+ },
152
+ "checked": {
153
+ "type": "boolean"
154
+ }
155
+ },
156
+ "additionalProperties": false
157
+ },
158
+ "meta": {
159
+ "type": "object",
160
+ "properties": {
161
+ "schemaVersion": {
162
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
163
+ },
164
+ "title": {
165
+ "type": "string",
166
+ "const": "Yes/No Field"
167
+ },
168
+ "usageDescription": {
169
+ "type": "string",
170
+ "const": "For questions that require a simple Yes/No response."
171
+ },
172
+ "defaultJSON": {
173
+ "type": "string",
174
+ "const": "{\n \"attributes\": {\n \"checked\": false\n },\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
69
175
  }
70
176
  },
177
+ "required": [
178
+ "schemaVersion"
179
+ ],
71
180
  "additionalProperties": false
181
+ }
182
+ },
183
+ "required": [
184
+ "type"
185
+ ],
186
+ "additionalProperties": false
187
+ },
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "type": {
192
+ "type": "string",
193
+ "const": "checkBoxes"
194
+ },
195
+ "attributes": {
196
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
72
197
  },
73
198
  "meta": {
74
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
199
+ "type": "object",
200
+ "properties": {
201
+ "schemaVersion": {
202
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
203
+ },
204
+ "title": {
205
+ "type": "string",
206
+ "const": "Check Boxes"
207
+ },
208
+ "usageDescription": {
209
+ "type": "string",
210
+ "const": "For multiple choice questions where users can select multiple options."
211
+ },
212
+ "defaultJSON": {
213
+ "type": "string",
214
+ "const": "{\n \"type\": \"checkBoxes\",\n \"attributes\": {},\n \"options\": [\n {\n \"label\": \"Option 1\",\n \"value\": \"1\",\n \"checked\": false\n }\n ],\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
215
+ }
216
+ },
217
+ "required": [
218
+ "schemaVersion"
219
+ ],
220
+ "additionalProperties": false
75
221
  },
76
222
  "options": {
77
223
  "type": "array",
@@ -137,7 +283,28 @@
137
283
  "additionalProperties": false
138
284
  },
139
285
  "meta": {
140
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
286
+ "type": "object",
287
+ "properties": {
288
+ "schemaVersion": {
289
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
290
+ },
291
+ "title": {
292
+ "type": "string",
293
+ "const": "Currency Field"
294
+ },
295
+ "usageDescription": {
296
+ "type": "string",
297
+ "const": "For questions that require a monetary amount (e.g. Cost or Budget)."
298
+ },
299
+ "defaultJSON": {
300
+ "type": "string",
301
+ "const": "{\n \"type\": \"currency\",\n \"attributes\": {\n \"denomination\": \"USD\",\n \"min\": 0,\n \"step\": 1\n },\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
302
+ }
303
+ },
304
+ "required": [
305
+ "schemaVersion"
306
+ ],
307
+ "additionalProperties": false
141
308
  }
142
309
  },
143
310
  "required": [
@@ -177,7 +344,28 @@
177
344
  "additionalProperties": false
178
345
  },
179
346
  "meta": {
180
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
347
+ "type": "object",
348
+ "properties": {
349
+ "schemaVersion": {
350
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
351
+ },
352
+ "title": {
353
+ "type": "string",
354
+ "const": "Date Field"
355
+ },
356
+ "usageDescription": {
357
+ "type": "string",
358
+ "const": "For questions that require a date."
359
+ },
360
+ "defaultJSON": {
361
+ "type": "string",
362
+ "const": "{\"type\":\"date\",\"attributes\":{\"step\":1},\"meta\":{\"schemaVersion\":\"1.0\"}}"
363
+ }
364
+ },
365
+ "required": [
366
+ "schemaVersion"
367
+ ],
368
+ "additionalProperties": false
181
369
  }
182
370
  },
183
371
  "required": [
@@ -193,19 +381,40 @@
193
381
  "const": "dateRange"
194
382
  },
195
383
  "attributes": {
196
- "$ref": "#/definitions/AnyQuestion/anyOf/1/properties/attributes"
384
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
197
385
  },
198
386
  "meta": {
199
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
387
+ "type": "object",
388
+ "properties": {
389
+ "schemaVersion": {
390
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
391
+ },
392
+ "title": {
393
+ "type": "string",
394
+ "const": "Date Range"
395
+ },
396
+ "usageDescription": {
397
+ "type": "string",
398
+ "const": "For questions that require a date range (e.g. From/To, Start/End)"
399
+ },
400
+ "defaultJSON": {
401
+ "type": "string",
402
+ "const": "{\"type\":\"dateRange\",\"attributes\":{},\"columns\":{\"start\":{\"label\":\"Start\",\"step\":1},\"end\":{\"label\":\"End\",\"step\":1}}}"
403
+ }
404
+ },
405
+ "required": [
406
+ "schemaVersion"
407
+ ],
408
+ "additionalProperties": false
200
409
  },
201
410
  "columns": {
202
411
  "type": "object",
203
412
  "properties": {
204
413
  "start": {
205
- "$ref": "#/definitions/AnyQuestion/anyOf/3/properties/attributes"
414
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes"
206
415
  },
207
416
  "end": {
208
- "$ref": "#/definitions/AnyQuestion/anyOf/3/properties/attributes"
417
+ "$ref": "#/definitions/AnyQuestion/anyOf/4/properties/attributes"
209
418
  }
210
419
  },
211
420
  "additionalProperties": false
@@ -252,7 +461,28 @@
252
461
  "additionalProperties": false
253
462
  },
254
463
  "meta": {
255
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
464
+ "type": "object",
465
+ "properties": {
466
+ "schemaVersion": {
467
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
468
+ },
469
+ "title": {
470
+ "type": "string",
471
+ "const": "Email Field"
472
+ },
473
+ "usageDescription": {
474
+ "type": "string",
475
+ "const": "For questions that require require email address(es)."
476
+ },
477
+ "defaultJSON": {
478
+ "type": "string",
479
+ "const": "{\"type\":\"email\",\"attributes\":{\"maxLength\":255,\"minLength\":1,\"multiple\":false},\"meta\":{\"schemaVersion\":\"1.0\"}}"
480
+ }
481
+ },
482
+ "required": [
483
+ "schemaVersion"
484
+ ],
485
+ "additionalProperties": false
256
486
  }
257
487
  },
258
488
  "required": [
@@ -286,79 +516,29 @@
286
516
  "additionalProperties": false
287
517
  },
288
518
  "meta": {
289
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
290
- },
291
- "graphQL": {
292
519
  "type": "object",
293
520
  "properties": {
294
- "displayFields": {
295
- "type": "array",
296
- "items": {
297
- "type": "object",
298
- "properties": {
299
- "propertyName": {
300
- "type": "string"
301
- },
302
- "label": {
303
- "type": "string"
304
- },
305
- "labelTranslationKey": {
306
- "type": "string"
307
- }
308
- },
309
- "required": [
310
- "propertyName",
311
- "label"
312
- ],
313
- "additionalProperties": false
314
- }
521
+ "schemaVersion": {
522
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
315
523
  },
316
- "localQueryId": {
317
- "type": "string"
524
+ "title": {
525
+ "type": "string",
526
+ "const": "Not yet implemented"
318
527
  },
319
- "query": {
528
+ "usageDescription": {
320
529
  "type": "string"
321
530
  },
322
- "responseField": {
531
+ "defaultJSON": {
323
532
  "type": "string"
324
- },
325
- "variables": {
326
- "type": "array",
327
- "items": {
328
- "type": "object",
329
- "properties": {
330
- "minLength": {
331
- "type": "number"
332
- },
333
- "label": {
334
- "type": "string"
335
- },
336
- "labelTranslationKey": {
337
- "type": "string"
338
- },
339
- "name": {
340
- "type": "string"
341
- },
342
- "type": {
343
- "type": "string"
344
- },
345
- "defaultValue": {
346
- "type": "string"
347
- }
348
- },
349
- "required": [
350
- "name",
351
- "type"
352
- ],
353
- "additionalProperties": false
354
- }
355
533
  }
356
534
  },
357
535
  "required": [
358
- "displayFields",
359
- "responseField"
536
+ "schemaVersion"
360
537
  ],
361
538
  "additionalProperties": false
539
+ },
540
+ "graphQL": {
541
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/graphQL"
362
542
  }
363
543
  },
364
544
  "required": [
@@ -367,6 +547,89 @@
367
547
  ],
368
548
  "additionalProperties": false
369
549
  },
550
+ {
551
+ "type": "object",
552
+ "properties": {
553
+ "type": {
554
+ "type": "string",
555
+ "const": "multiselectBox"
556
+ },
557
+ "attributes": {
558
+ "type": "object",
559
+ "properties": {
560
+ "label": {
561
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/label"
562
+ },
563
+ "help": {
564
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/help"
565
+ },
566
+ "labelTranslationKey": {
567
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
568
+ },
569
+ "multiple": {
570
+ "type": "boolean",
571
+ "const": true
572
+ }
573
+ },
574
+ "required": [
575
+ "multiple"
576
+ ],
577
+ "additionalProperties": false
578
+ },
579
+ "meta": {
580
+ "type": "object",
581
+ "properties": {
582
+ "schemaVersion": {
583
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
584
+ },
585
+ "title": {
586
+ "type": "string",
587
+ "const": "Multi-select Box"
588
+ },
589
+ "usageDescription": {
590
+ "type": "string",
591
+ "const": "For questions where multiple answers are valid. Allows users to select several options from a predefined list, providing flexibility in responses."
592
+ },
593
+ "defaultJSON": {
594
+ "type": "string",
595
+ "const": "{\n \"type\": \"selectBox\",\n \"attributes\": {\n \"multiple\": true\n },\n \"options\": [\n {\n \"label\": \"Option 1\",\n \"value\": \"option1\"\n }\n ],\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
596
+ }
597
+ },
598
+ "required": [
599
+ "schemaVersion"
600
+ ],
601
+ "additionalProperties": false
602
+ },
603
+ "options": {
604
+ "type": "array",
605
+ "items": {
606
+ "type": "object",
607
+ "properties": {
608
+ "label": {
609
+ "$ref": "#/definitions/AnyQuestion/anyOf/2/properties/options/items/properties/label"
610
+ },
611
+ "value": {
612
+ "$ref": "#/definitions/AnyQuestion/anyOf/2/properties/options/items/properties/value"
613
+ },
614
+ "selected": {
615
+ "type": "boolean"
616
+ }
617
+ },
618
+ "required": [
619
+ "label",
620
+ "value"
621
+ ],
622
+ "additionalProperties": false
623
+ }
624
+ }
625
+ },
626
+ "required": [
627
+ "type",
628
+ "attributes",
629
+ "options"
630
+ ],
631
+ "additionalProperties": false
632
+ },
370
633
  {
371
634
  "type": "object",
372
635
  "properties": {
@@ -387,19 +650,40 @@
387
650
  "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
388
651
  },
389
652
  "max": {
390
- "$ref": "#/definitions/AnyQuestion/anyOf/2/properties/attributes/properties/max"
653
+ "$ref": "#/definitions/AnyQuestion/anyOf/3/properties/attributes/properties/max"
391
654
  },
392
655
  "min": {
393
- "$ref": "#/definitions/AnyQuestion/anyOf/2/properties/attributes/properties/min"
656
+ "$ref": "#/definitions/AnyQuestion/anyOf/3/properties/attributes/properties/min"
394
657
  },
395
658
  "step": {
396
- "$ref": "#/definitions/AnyQuestion/anyOf/2/properties/attributes/properties/step"
659
+ "$ref": "#/definitions/AnyQuestion/anyOf/3/properties/attributes/properties/step"
397
660
  }
398
661
  },
399
662
  "additionalProperties": false
400
663
  },
401
664
  "meta": {
402
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
665
+ "type": "object",
666
+ "properties": {
667
+ "schemaVersion": {
668
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
669
+ },
670
+ "title": {
671
+ "type": "string",
672
+ "const": "Number Field"
673
+ },
674
+ "usageDescription": {
675
+ "type": "string",
676
+ "const": "For questions that require a single numeric value."
677
+ },
678
+ "defaultJSON": {
679
+ "type": "string",
680
+ "const": "{\n \"type\": \"number\",\n \"attributes\": {\n \"min\": 0,\n \"step\": 1\n },\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
681
+ }
682
+ },
683
+ "required": [
684
+ "schemaVersion"
685
+ ],
686
+ "additionalProperties": false
403
687
  }
404
688
  },
405
689
  "required": [
@@ -415,19 +699,40 @@
415
699
  "const": "numberRange"
416
700
  },
417
701
  "attributes": {
418
- "$ref": "#/definitions/AnyQuestion/anyOf/1/properties/attributes"
702
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
419
703
  },
420
704
  "meta": {
421
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
705
+ "type": "object",
706
+ "properties": {
707
+ "schemaVersion": {
708
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
709
+ },
710
+ "title": {
711
+ "type": "string",
712
+ "const": "Number Range"
713
+ },
714
+ "usageDescription": {
715
+ "type": "string",
716
+ "const": "For questions that require a numerical range (e.g. From/To, Min/Max)."
717
+ },
718
+ "defaultJSON": {
719
+ "type": "string",
720
+ "const": "{\n \"type\": \"numberRange\",\n \"attributes\": {},\n \"columns\": {\n \"start\": {\n \"label\": \"From\",\n \"min\": 0,\n \"step\": 1\n },\n \"end\": {\n \"label\": \"To\",\n \"min\": 0,\n \"step\": 1\n }\n },\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
721
+ }
722
+ },
723
+ "required": [
724
+ "schemaVersion"
725
+ ],
726
+ "additionalProperties": false
422
727
  },
423
728
  "columns": {
424
729
  "type": "object",
425
730
  "properties": {
426
731
  "start": {
427
- "$ref": "#/definitions/AnyQuestion/anyOf/7/properties/attributes"
732
+ "$ref": "#/definitions/AnyQuestion/anyOf/9/properties/attributes"
428
733
  },
429
734
  "end": {
430
- "$ref": "#/definitions/AnyQuestion/anyOf/7/properties/attributes"
735
+ "$ref": "#/definitions/AnyQuestion/anyOf/9/properties/attributes"
431
736
  }
432
737
  },
433
738
  "additionalProperties": false
@@ -447,31 +752,36 @@
447
752
  "const": "radioButtons"
448
753
  },
449
754
  "attributes": {
450
- "$ref": "#/definitions/AnyQuestion/anyOf/1/properties/attributes"
755
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes"
451
756
  },
452
757
  "meta": {
453
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
758
+ "type": "object",
759
+ "properties": {
760
+ "schemaVersion": {
761
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
762
+ },
763
+ "title": {
764
+ "type": "string",
765
+ "const": "Radio Buttons"
766
+ },
767
+ "usageDescription": {
768
+ "type": "string",
769
+ "const": "For multiple choice questions where users select just one option."
770
+ },
771
+ "defaultJSON": {
772
+ "type": "string",
773
+ "const": "{\n \"type\": \"radioButtons\",\n \"attributes\": {},\n \"options\": [\n {\n \"label\": \"Option 1\",\n \"value\": \"option1\",\n \"selected\": false\n }\n ],\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
774
+ }
775
+ },
776
+ "required": [
777
+ "schemaVersion"
778
+ ],
779
+ "additionalProperties": false
454
780
  },
455
781
  "options": {
456
782
  "type": "array",
457
783
  "items": {
458
- "type": "object",
459
- "properties": {
460
- "label": {
461
- "$ref": "#/definitions/AnyQuestion/anyOf/1/properties/options/items/properties/label"
462
- },
463
- "value": {
464
- "$ref": "#/definitions/AnyQuestion/anyOf/1/properties/options/items/properties/value"
465
- },
466
- "selected": {
467
- "type": "boolean"
468
- }
469
- },
470
- "required": [
471
- "label",
472
- "value"
473
- ],
474
- "additionalProperties": false
784
+ "$ref": "#/definitions/AnyQuestion/anyOf/8/properties/options/items"
475
785
  }
476
786
  }
477
787
  },
@@ -501,23 +811,46 @@
501
811
  "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
502
812
  },
503
813
  "multiple": {
504
- "type": "boolean"
814
+ "type": "boolean",
815
+ "const": false
505
816
  }
506
817
  },
818
+ "required": [
819
+ "multiple"
820
+ ],
507
821
  "additionalProperties": false
508
822
  },
509
823
  "meta": {
510
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
824
+ "type": "object",
825
+ "properties": {
826
+ "schemaVersion": {
827
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
828
+ },
829
+ "title": {
830
+ "type": "string",
831
+ "const": "Select Box"
832
+ },
833
+ "usageDescription": {
834
+ "type": "string",
835
+ "const": "For questions where users select one option from a list."
836
+ },
837
+ "defaultJSON": {
838
+ "type": "string",
839
+ "const": "{\n \"type\": \"selectBox\",\n \"attributes\": {\n \"multiple\": false\n },\n \"options\": [\n {\n \"label\": \"Option 1\",\n \"value\": \"option1\"\n }\n ],\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
840
+ }
841
+ },
842
+ "required": [
843
+ "schemaVersion"
844
+ ],
845
+ "additionalProperties": false
511
846
  },
512
847
  "options": {
513
- "type": "array",
514
- "items": {
515
- "$ref": "#/definitions/AnyQuestion/anyOf/9/properties/options/items"
516
- }
848
+ "$ref": "#/definitions/AnyQuestion/anyOf/8/properties/options"
517
849
  }
518
850
  },
519
851
  "required": [
520
852
  "type",
853
+ "attributes",
521
854
  "options"
522
855
  ],
523
856
  "additionalProperties": false
@@ -560,7 +893,28 @@
560
893
  "additionalProperties": false
561
894
  },
562
895
  "meta": {
563
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
896
+ "type": "object",
897
+ "properties": {
898
+ "schemaVersion": {
899
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
900
+ },
901
+ "title": {
902
+ "type": "string",
903
+ "const": "Table"
904
+ },
905
+ "usageDescription": {
906
+ "type": "string",
907
+ "const": "For questions that require a tabular format."
908
+ },
909
+ "defaultJSON": {
910
+ "type": "string",
911
+ "const": "{\"type\":\"table\",\"columns\":[],\"attributes\":{\"canAddRows\":true,\"canRemoveRows\":true,\"initialRows\":1},\"meta\":{\"schemaVersion\":\"1.0\"}}"
912
+ }
913
+ },
914
+ "required": [
915
+ "schemaVersion"
916
+ ],
917
+ "additionalProperties": false
564
918
  },
565
919
  "columns": {
566
920
  "type": "array",
@@ -600,7 +954,10 @@
600
954
  "$ref": "#/definitions/AnyQuestion/anyOf/9"
601
955
  },
602
956
  {
603
- "$ref": "#/definitions/AnyQuestion/anyOf/10"
957
+ "$ref": "#/definitions/AnyQuestion/anyOf/11"
958
+ },
959
+ {
960
+ "$ref": "#/definitions/AnyQuestion/anyOf/12"
604
961
  },
605
962
  {
606
963
  "type": "object",
@@ -632,6 +989,9 @@
632
989
  },
633
990
  "rows": {
634
991
  "type": "number"
992
+ },
993
+ "asRichText": {
994
+ "type": "boolean"
635
995
  }
636
996
  },
637
997
  "additionalProperties": false
@@ -642,8 +1002,17 @@
642
1002
  "schemaVersion": {
643
1003
  "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
644
1004
  },
645
- "asRichText": {
646
- "type": "boolean"
1005
+ "title": {
1006
+ "type": "string",
1007
+ "const": "Text Area"
1008
+ },
1009
+ "usageDescription": {
1010
+ "type": "string",
1011
+ "const": "For questions that require longer answers, you can select formatting options too."
1012
+ },
1013
+ "defaultJSON": {
1014
+ "type": "string",
1015
+ "const": "{\"type\":\"textArea\",\"attributes\":{\"cols\":20,\"rows\":2,\"asRichText\":true},\"meta\":{\"schemaVersion\":\"1.0\"}}"
647
1016
  }
648
1017
  },
649
1018
  "required": [
@@ -653,8 +1022,7 @@
653
1022
  }
654
1023
  },
655
1024
  "required": [
656
- "type",
657
- "meta"
1025
+ "type"
658
1026
  ],
659
1027
  "additionalProperties": false
660
1028
  },
@@ -678,19 +1046,40 @@
678
1046
  "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/attributes/properties/labelTranslationKey"
679
1047
  },
680
1048
  "maxLength": {
681
- "$ref": "#/definitions/AnyQuestion/anyOf/5/properties/attributes/properties/maxLength"
1049
+ "$ref": "#/definitions/AnyQuestion/anyOf/6/properties/attributes/properties/maxLength"
682
1050
  },
683
1051
  "minLength": {
684
- "$ref": "#/definitions/AnyQuestion/anyOf/5/properties/attributes/properties/minLength"
1052
+ "$ref": "#/definitions/AnyQuestion/anyOf/6/properties/attributes/properties/minLength"
685
1053
  },
686
1054
  "pattern": {
687
- "$ref": "#/definitions/AnyQuestion/anyOf/5/properties/attributes/properties/pattern"
1055
+ "$ref": "#/definitions/AnyQuestion/anyOf/6/properties/attributes/properties/pattern"
688
1056
  }
689
1057
  },
690
1058
  "additionalProperties": false
691
1059
  },
692
1060
  "meta": {
693
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
1061
+ "type": "object",
1062
+ "properties": {
1063
+ "schemaVersion": {
1064
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
1065
+ },
1066
+ "title": {
1067
+ "type": "string",
1068
+ "const": "Text Field"
1069
+ },
1070
+ "usageDescription": {
1071
+ "type": "string",
1072
+ "const": "For questions that require short, simple answers."
1073
+ },
1074
+ "defaultJSON": {
1075
+ "type": "string",
1076
+ "const": "{\"type\":\"text\",\"attributes\":{\"maxLength\":255},\"meta\":{\"schemaVersion\":\"1.0\"}}"
1077
+ }
1078
+ },
1079
+ "required": [
1080
+ "schemaVersion"
1081
+ ],
1082
+ "additionalProperties": false
694
1083
  }
695
1084
  },
696
1085
  "required": [
@@ -698,29 +1087,6 @@
698
1087
  ],
699
1088
  "additionalProperties": false
700
1089
  },
701
- {
702
- "type": "object",
703
- "properties": {
704
- "type": {
705
- "type": "string",
706
- "const": "typeaheadSearch"
707
- },
708
- "attributes": {
709
- "$ref": "#/definitions/AnyQuestion/anyOf/1/properties/attributes"
710
- },
711
- "meta": {
712
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
713
- },
714
- "graphQL": {
715
- "$ref": "#/definitions/AnyQuestion/anyOf/6/properties/graphQL"
716
- }
717
- },
718
- "required": [
719
- "type",
720
- "graphQL"
721
- ],
722
- "additionalProperties": false
723
- },
724
1090
  {
725
1091
  "type": "object",
726
1092
  "properties": {
@@ -729,10 +1095,31 @@
729
1095
  "const": "url"
730
1096
  },
731
1097
  "attributes": {
732
- "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/11/properties/attributes"
1098
+ "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/12/properties/attributes"
733
1099
  },
734
1100
  "meta": {
735
- "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
1101
+ "type": "object",
1102
+ "properties": {
1103
+ "schemaVersion": {
1104
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta/properties/schemaVersion"
1105
+ },
1106
+ "title": {
1107
+ "type": "string",
1108
+ "const": "URL Field"
1109
+ },
1110
+ "usageDescription": {
1111
+ "type": "string",
1112
+ "const": "For questions that require a website, DOI or other URL."
1113
+ },
1114
+ "defaultJSON": {
1115
+ "type": "string",
1116
+ "const": "{\"type\":\"url\",\"attributes\":{\"maxLength\":255},\"meta\":{\"schemaVersion\":\"1.0\"}}"
1117
+ }
1118
+ },
1119
+ "required": [
1120
+ "schemaVersion"
1121
+ ],
1122
+ "additionalProperties": false
736
1123
  }
737
1124
  },
738
1125
  "required": [
@@ -757,16 +1144,13 @@
757
1144
  "additionalProperties": false
758
1145
  },
759
1146
  {
760
- "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/10"
761
- },
762
- {
763
- "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/11"
1147
+ "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/11"
764
1148
  },
765
1149
  {
766
- "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/12"
1150
+ "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/12"
767
1151
  },
768
1152
  {
769
- "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/13"
1153
+ "$ref": "#/definitions/AnyQuestion/anyOf/13/properties/columns/items/properties/content/anyOf/13"
770
1154
  }
771
1155
  ]
772
1156
  }