@dmptool/types 1.2.6 → 2.0.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 (97) hide show
  1. package/README.md +1 -1
  2. package/dist/answers/__tests__/defaults.spec.js +216 -0
  3. package/dist/answers/answer.d.ts +29 -14
  4. package/dist/answers/answer.js +11 -5
  5. package/dist/answers/dateAnswers.d.ts +20 -47
  6. package/dist/answers/dateAnswers.js +20 -10
  7. package/dist/answers/graphQLAnswers.d.ts +48 -120
  8. package/dist/answers/graphQLAnswers.js +46 -21
  9. package/dist/answers/index.d.ts +155 -1439
  10. package/dist/answers/index.js +26 -1
  11. package/dist/answers/numberAnswers.d.ts +38 -92
  12. package/dist/answers/numberAnswers.js +38 -19
  13. package/dist/answers/optionBasedAnswers.d.ts +42 -87
  14. package/dist/answers/optionBasedAnswers.js +37 -21
  15. package/dist/answers/tableAnswers.d.ts +348 -3032
  16. package/dist/answers/tableAnswers.js +25 -61
  17. package/dist/answers/textAnswers.d.ts +32 -68
  18. package/dist/answers/textAnswers.js +30 -17
  19. package/dist/questions/__tests__/dateQuestions.spec.js +3 -0
  20. package/dist/questions/__tests__/defaults.spec.d.ts +1 -0
  21. package/dist/questions/__tests__/defaults.spec.js +668 -0
  22. package/dist/questions/__tests__/optionBasedQuestions.spec.js +3 -2
  23. package/dist/questions/__tests__/tableQuestion.spec.js +22 -23
  24. package/dist/questions/__tests__/textQuestions.spec.js +32 -0
  25. package/dist/questions/dateQuestions.d.ts +45 -191
  26. package/dist/questions/dateQuestions.js +26 -23
  27. package/dist/questions/graphQLQuestions.d.ts +262 -556
  28. package/dist/questions/graphQLQuestions.js +225 -223
  29. package/dist/questions/index.d.ts +689 -7440
  30. package/dist/questions/index.js +26 -1
  31. package/dist/questions/numberQuestions.d.ts +85 -331
  32. package/dist/questions/numberQuestions.js +50 -36
  33. package/dist/questions/optionBasedQuestions.d.ts +83 -290
  34. package/dist/questions/optionBasedQuestions.js +58 -41
  35. package/dist/questions/question.d.ts +72 -35
  36. package/dist/questions/question.js +14 -5
  37. package/dist/questions/tableQuestions.d.ts +1977 -9646
  38. package/dist/questions/tableQuestions.js +184 -192
  39. package/dist/questions/textQuestions.d.ts +70 -226
  40. package/dist/questions/textQuestions.js +31 -31
  41. package/package.json +4 -5
  42. package/dist/answers/__tests__/usage.spec.js +0 -178
  43. package/dist/questions/__tests__/usage.spec.d.ts +0 -8
  44. package/dist/questions/__tests__/usage.spec.js +0 -473
  45. package/dist/schemas/affiliationSearchAnswer.schema.json +0 -45
  46. package/dist/schemas/affiliationSearchQuestion.schema.json +0 -140
  47. package/dist/schemas/anyAnswer.schema.json +0 -605
  48. package/dist/schemas/anyQuestion.schema.json +0 -2455
  49. package/dist/schemas/anyTableColumnAnswer.schema.json +0 -466
  50. package/dist/schemas/anyTableColumnQuestion.schema.json +0 -1092
  51. package/dist/schemas/booleanAnswer.schema.json +0 -34
  52. package/dist/schemas/booleanQuestion.schema.json +0 -56
  53. package/dist/schemas/checkboxesAnswer.schema.json +0 -39
  54. package/dist/schemas/checkboxesQuestion.schema.json +0 -76
  55. package/dist/schemas/currencyAnswer.schema.json +0 -34
  56. package/dist/schemas/currencyQuestion.schema.json +0 -67
  57. package/dist/schemas/dateAnswer.schema.json +0 -34
  58. package/dist/schemas/datePickerAnswer.schema.json +0 -37
  59. package/dist/schemas/datePickerQuestion.schema.json +0 -52
  60. package/dist/schemas/dateQuestion.schema.json +0 -62
  61. package/dist/schemas/dateRangeAnswer.schema.json +0 -45
  62. package/dist/schemas/dateRangeQuestion.schema.json +0 -112
  63. package/dist/schemas/emailAnswer.schema.json +0 -34
  64. package/dist/schemas/emailQuestion.schema.json +0 -66
  65. package/dist/schemas/filteredSearchAnswer.schema.json +0 -40
  66. package/dist/schemas/filteredSearchQuestion.schema.json +0 -130
  67. package/dist/schemas/licenseSearchAnswer.schema.json +0 -49
  68. package/dist/schemas/licenseSearchQuestion.schema.json +0 -164
  69. package/dist/schemas/metadataStandardSearchAnswer.schema.json +0 -49
  70. package/dist/schemas/metadataStandardSearchQuestion.schema.json +0 -174
  71. package/dist/schemas/multiselectBoxAnswer.schema.json +0 -39
  72. package/dist/schemas/multiselectBoxQuestion.schema.json +0 -85
  73. package/dist/schemas/numberAnswer.schema.json +0 -34
  74. package/dist/schemas/numberQuestion.schema.json +0 -63
  75. package/dist/schemas/numberRangeAnswer.schema.json +0 -45
  76. package/dist/schemas/numberRangeQuestion.schema.json +0 -94
  77. package/dist/schemas/numberWithContextAnswer.schema.json +0 -45
  78. package/dist/schemas/numberWithContextQuestion.schema.json +0 -84
  79. package/dist/schemas/radioButtonsAnswer.schema.json +0 -34
  80. package/dist/schemas/radioButtonsQuestion.schema.json +0 -76
  81. package/dist/schemas/repositorySearchAnswer.schema.json +0 -49
  82. package/dist/schemas/repositorySearchQuestion.schema.json +0 -180
  83. package/dist/schemas/researchOutputTableAnswer.schema.json +0 -519
  84. package/dist/schemas/researchOutputTableQuestion.schema.json +0 -1183
  85. package/dist/schemas/selectBoxAnswer.schema.json +0 -34
  86. package/dist/schemas/selectBoxQuestion.schema.json +0 -85
  87. package/dist/schemas/tableAnswer.schema.json +0 -519
  88. package/dist/schemas/tableQuestion.schema.json +0 -1183
  89. package/dist/schemas/textAnswer.schema.json +0 -34
  90. package/dist/schemas/textAreaAnswer.schema.json +0 -34
  91. package/dist/schemas/textAreaQuestion.schema.json +0 -70
  92. package/dist/schemas/textQuestion.schema.json +0 -62
  93. package/dist/schemas/typeaheadSearchAnswer.schema.json +0 -37
  94. package/dist/schemas/typeaheadSearchQuestion.schema.json +0 -120
  95. package/dist/schemas/urlAnswer.schema.json +0 -34
  96. package/dist/schemas/urlQuestion.schema.json +0 -62
  97. /package/dist/answers/__tests__/{usage.spec.d.ts → defaults.spec.d.ts} +0 -0
@@ -1,605 +0,0 @@
1
- {
2
- "$ref": "#/definitions/AnyAnswer",
3
- "definitions": {
4
- "AnyAnswer": {
5
- "anyOf": [
6
- {
7
- "type": "object",
8
- "properties": {
9
- "type": {
10
- "type": "string",
11
- "const": "affiliationSearch"
12
- },
13
- "meta": {
14
- "type": "object",
15
- "properties": {
16
- "schemaVersion": {
17
- "type": "string",
18
- "default": "1.0"
19
- }
20
- },
21
- "additionalProperties": false,
22
- "default": {}
23
- },
24
- "answer": {
25
- "type": "object",
26
- "properties": {
27
- "affiliationId": {
28
- "type": "string",
29
- "default": ""
30
- },
31
- "affiliationName": {
32
- "type": "string",
33
- "default": ""
34
- }
35
- },
36
- "additionalProperties": false,
37
- "default": {}
38
- }
39
- },
40
- "required": [
41
- "type"
42
- ],
43
- "additionalProperties": false
44
- },
45
- {
46
- "type": "object",
47
- "properties": {
48
- "type": {
49
- "type": "string",
50
- "const": "boolean"
51
- },
52
- "meta": {
53
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
54
- },
55
- "answer": {
56
- "type": "boolean",
57
- "default": false
58
- }
59
- },
60
- "required": [
61
- "type"
62
- ],
63
- "additionalProperties": false
64
- },
65
- {
66
- "type": "object",
67
- "properties": {
68
- "type": {
69
- "type": "string",
70
- "const": "checkBoxes"
71
- },
72
- "meta": {
73
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
74
- },
75
- "answer": {
76
- "type": "array",
77
- "items": {
78
- "type": "string"
79
- },
80
- "default": [
81
- ""
82
- ]
83
- }
84
- },
85
- "required": [
86
- "type"
87
- ],
88
- "additionalProperties": false
89
- },
90
- {
91
- "type": "object",
92
- "properties": {
93
- "type": {
94
- "type": "string",
95
- "const": "currency"
96
- },
97
- "meta": {
98
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
99
- },
100
- "answer": {
101
- "type": "number",
102
- "default": 0
103
- }
104
- },
105
- "required": [
106
- "type"
107
- ],
108
- "additionalProperties": false
109
- },
110
- {
111
- "type": "object",
112
- "properties": {
113
- "type": {
114
- "type": "string",
115
- "const": "date"
116
- },
117
- "meta": {
118
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
119
- },
120
- "answer": {
121
- "type": "string",
122
- "default": ""
123
- }
124
- },
125
- "required": [
126
- "type"
127
- ],
128
- "additionalProperties": false
129
- },
130
- {
131
- "type": "object",
132
- "properties": {
133
- "type": {
134
- "type": "string",
135
- "const": "dateRange"
136
- },
137
- "meta": {
138
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
139
- },
140
- "answer": {
141
- "type": "object",
142
- "properties": {
143
- "start": {
144
- "type": "string",
145
- "default": ""
146
- },
147
- "end": {
148
- "type": "string",
149
- "default": ""
150
- }
151
- },
152
- "additionalProperties": false,
153
- "default": {}
154
- }
155
- },
156
- "required": [
157
- "type"
158
- ],
159
- "additionalProperties": false
160
- },
161
- {
162
- "type": "object",
163
- "properties": {
164
- "type": {
165
- "type": "string",
166
- "const": "email"
167
- },
168
- "meta": {
169
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
170
- },
171
- "answer": {
172
- "type": "string",
173
- "default": ""
174
- }
175
- },
176
- "required": [
177
- "type"
178
- ],
179
- "additionalProperties": false
180
- },
181
- {
182
- "type": "object",
183
- "properties": {
184
- "type": {
185
- "type": "string",
186
- "const": "licenseSearch"
187
- },
188
- "meta": {
189
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
190
- },
191
- "answer": {
192
- "type": "array",
193
- "items": {
194
- "type": "object",
195
- "properties": {
196
- "licenseId": {
197
- "type": "string",
198
- "default": ""
199
- },
200
- "licenseName": {
201
- "type": "string",
202
- "default": ""
203
- }
204
- },
205
- "additionalProperties": false,
206
- "default": {}
207
- },
208
- "default": []
209
- }
210
- },
211
- "required": [
212
- "type"
213
- ],
214
- "additionalProperties": false
215
- },
216
- {
217
- "type": "object",
218
- "properties": {
219
- "type": {
220
- "type": "string",
221
- "const": "metadataStandardSearch"
222
- },
223
- "meta": {
224
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
225
- },
226
- "answer": {
227
- "type": "array",
228
- "items": {
229
- "type": "object",
230
- "properties": {
231
- "metadataStandardId": {
232
- "type": "string",
233
- "default": ""
234
- },
235
- "metadataStandardName": {
236
- "type": "string",
237
- "default": ""
238
- }
239
- },
240
- "additionalProperties": false,
241
- "default": {}
242
- },
243
- "default": []
244
- }
245
- },
246
- "required": [
247
- "type"
248
- ],
249
- "additionalProperties": false
250
- },
251
- {
252
- "type": "object",
253
- "properties": {
254
- "type": {
255
- "type": "string",
256
- "const": "multiselectBox"
257
- },
258
- "meta": {
259
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
260
- },
261
- "answer": {
262
- "type": "array",
263
- "items": {
264
- "type": "string"
265
- },
266
- "default": [
267
- ""
268
- ]
269
- }
270
- },
271
- "required": [
272
- "type"
273
- ],
274
- "additionalProperties": false
275
- },
276
- {
277
- "type": "object",
278
- "properties": {
279
- "type": {
280
- "type": "string",
281
- "const": "number"
282
- },
283
- "meta": {
284
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
285
- },
286
- "answer": {
287
- "type": "number",
288
- "default": 0
289
- }
290
- },
291
- "required": [
292
- "type"
293
- ],
294
- "additionalProperties": false
295
- },
296
- {
297
- "type": "object",
298
- "properties": {
299
- "type": {
300
- "type": "string",
301
- "const": "numberRange"
302
- },
303
- "meta": {
304
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
305
- },
306
- "answer": {
307
- "type": "object",
308
- "properties": {
309
- "start": {
310
- "type": "number",
311
- "default": 0
312
- },
313
- "end": {
314
- "type": "number",
315
- "default": 0
316
- }
317
- },
318
- "additionalProperties": false,
319
- "default": {}
320
- }
321
- },
322
- "required": [
323
- "type"
324
- ],
325
- "additionalProperties": false
326
- },
327
- {
328
- "type": "object",
329
- "properties": {
330
- "type": {
331
- "type": "string",
332
- "const": "radioButtons"
333
- },
334
- "meta": {
335
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
336
- },
337
- "answer": {
338
- "type": "string",
339
- "default": ""
340
- }
341
- },
342
- "required": [
343
- "type"
344
- ],
345
- "additionalProperties": false
346
- },
347
- {
348
- "type": "object",
349
- "properties": {
350
- "type": {
351
- "type": "string",
352
- "const": "repositorySearch"
353
- },
354
- "meta": {
355
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
356
- },
357
- "answer": {
358
- "type": "array",
359
- "items": {
360
- "type": "object",
361
- "properties": {
362
- "repositoryId": {
363
- "type": "string",
364
- "default": ""
365
- },
366
- "repositoryName": {
367
- "type": "string",
368
- "default": ""
369
- }
370
- },
371
- "additionalProperties": false,
372
- "default": {}
373
- },
374
- "default": []
375
- }
376
- },
377
- "required": [
378
- "type"
379
- ],
380
- "additionalProperties": false
381
- },
382
- {
383
- "type": "object",
384
- "properties": {
385
- "type": {
386
- "type": "string",
387
- "const": "selectBox"
388
- },
389
- "meta": {
390
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
391
- },
392
- "answer": {
393
- "type": "string",
394
- "default": ""
395
- }
396
- },
397
- "required": [
398
- "type"
399
- ],
400
- "additionalProperties": false
401
- },
402
- {
403
- "type": "object",
404
- "properties": {
405
- "type": {
406
- "type": "string",
407
- "const": "table"
408
- },
409
- "meta": {
410
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
411
- },
412
- "columnHeadings": {
413
- "type": "array",
414
- "items": {
415
- "type": "string"
416
- },
417
- "default": [
418
- "Column A"
419
- ]
420
- },
421
- "answer": {
422
- "type": "array",
423
- "items": {
424
- "type": "object",
425
- "properties": {
426
- "columns": {
427
- "type": "array",
428
- "items": {
429
- "anyOf": [
430
- {
431
- "$ref": "#/definitions/AnyAnswer/anyOf/0"
432
- },
433
- {
434
- "$ref": "#/definitions/AnyAnswer/anyOf/1"
435
- },
436
- {
437
- "$ref": "#/definitions/AnyAnswer/anyOf/2"
438
- },
439
- {
440
- "$ref": "#/definitions/AnyAnswer/anyOf/3"
441
- },
442
- {
443
- "$ref": "#/definitions/AnyAnswer/anyOf/4"
444
- },
445
- {
446
- "$ref": "#/definitions/AnyAnswer/anyOf/5"
447
- },
448
- {
449
- "$ref": "#/definitions/AnyAnswer/anyOf/6"
450
- },
451
- {
452
- "$ref": "#/definitions/AnyAnswer/anyOf/7"
453
- },
454
- {
455
- "$ref": "#/definitions/AnyAnswer/anyOf/8"
456
- },
457
- {
458
- "$ref": "#/definitions/AnyAnswer/anyOf/9"
459
- },
460
- {
461
- "$ref": "#/definitions/AnyAnswer/anyOf/10"
462
- },
463
- {
464
- "type": "object",
465
- "properties": {
466
- "type": {
467
- "type": "string",
468
- "const": "numberWithContext"
469
- },
470
- "meta": {
471
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
472
- },
473
- "answer": {
474
- "type": "object",
475
- "properties": {
476
- "value": {
477
- "type": "number",
478
- "default": 0
479
- },
480
- "context": {
481
- "type": "string",
482
- "default": ""
483
- }
484
- },
485
- "additionalProperties": false
486
- }
487
- },
488
- "required": [
489
- "type",
490
- "answer"
491
- ],
492
- "additionalProperties": false
493
- },
494
- {
495
- "$ref": "#/definitions/AnyAnswer/anyOf/12"
496
- },
497
- {
498
- "$ref": "#/definitions/AnyAnswer/anyOf/13"
499
- },
500
- {
501
- "$ref": "#/definitions/AnyAnswer/anyOf/14"
502
- },
503
- {
504
- "type": "object",
505
- "properties": {
506
- "type": {
507
- "type": "string",
508
- "const": "text"
509
- },
510
- "meta": {
511
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
512
- },
513
- "answer": {
514
- "type": "string",
515
- "default": ""
516
- }
517
- },
518
- "required": [
519
- "type"
520
- ],
521
- "additionalProperties": false
522
- },
523
- {
524
- "type": "object",
525
- "properties": {
526
- "type": {
527
- "type": "string",
528
- "const": "textArea"
529
- },
530
- "meta": {
531
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
532
- },
533
- "answer": {
534
- "type": "string",
535
- "default": ""
536
- }
537
- },
538
- "required": [
539
- "type"
540
- ],
541
- "additionalProperties": false
542
- },
543
- {
544
- "type": "object",
545
- "properties": {
546
- "type": {
547
- "type": "string",
548
- "const": "url"
549
- },
550
- "meta": {
551
- "$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
552
- },
553
- "answer": {
554
- "type": "string",
555
- "default": ""
556
- }
557
- },
558
- "required": [
559
- "type"
560
- ],
561
- "additionalProperties": false
562
- }
563
- ]
564
- }
565
- }
566
- },
567
- "required": [
568
- "columns"
569
- ],
570
- "additionalProperties": false
571
- },
572
- "default": [
573
- {
574
- "columns": [
575
- {
576
- "type": "textArea",
577
- "answer": "",
578
- "meta": {
579
- "schemaVersion": "1.0"
580
- }
581
- }
582
- ]
583
- }
584
- ]
585
- }
586
- },
587
- "required": [
588
- "type"
589
- ],
590
- "additionalProperties": false
591
- },
592
- {
593
- "$ref": "#/definitions/AnyAnswer/anyOf/15/properties/answer/items/properties/columns/items/anyOf/15"
594
- },
595
- {
596
- "$ref": "#/definitions/AnyAnswer/anyOf/15/properties/answer/items/properties/columns/items/anyOf/16"
597
- },
598
- {
599
- "$ref": "#/definitions/AnyAnswer/anyOf/15/properties/answer/items/properties/columns/items/anyOf/17"
600
- }
601
- ]
602
- }
603
- },
604
- "$schema": "http://json-schema.org/draft-07/schema#"
605
- }