@dmptool/types 1.2.5 → 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 +680 -8090
  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 +2029 -10357
  38. package/dist/questions/tableQuestions.js +197 -190
  39. package/dist/questions/textQuestions.d.ts +70 -226
  40. package/dist/questions/textQuestions.js +31 -31
  41. package/package.json +3 -4
  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 -1737
  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,466 +0,0 @@
1
- {
2
- "$ref": "#/definitions/AnyTableColumnAnswer",
3
- "definitions": {
4
- "AnyTableColumnAnswer": {
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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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": "numberWithContext"
302
- },
303
- "meta": {
304
- "$ref": "#/definitions/AnyTableColumnAnswer/anyOf/0/properties/meta"
305
- },
306
- "answer": {
307
- "type": "object",
308
- "properties": {
309
- "value": {
310
- "type": "number",
311
- "default": 0
312
- },
313
- "context": {
314
- "type": "string",
315
- "default": ""
316
- }
317
- },
318
- "additionalProperties": false
319
- }
320
- },
321
- "required": [
322
- "type",
323
- "answer"
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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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/AnyTableColumnAnswer/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": "text"
408
- },
409
- "meta": {
410
- "$ref": "#/definitions/AnyTableColumnAnswer/anyOf/0/properties/meta"
411
- },
412
- "answer": {
413
- "type": "string",
414
- "default": ""
415
- }
416
- },
417
- "required": [
418
- "type"
419
- ],
420
- "additionalProperties": false
421
- },
422
- {
423
- "type": "object",
424
- "properties": {
425
- "type": {
426
- "type": "string",
427
- "const": "textArea"
428
- },
429
- "meta": {
430
- "$ref": "#/definitions/AnyTableColumnAnswer/anyOf/0/properties/meta"
431
- },
432
- "answer": {
433
- "type": "string",
434
- "default": ""
435
- }
436
- },
437
- "required": [
438
- "type"
439
- ],
440
- "additionalProperties": false
441
- },
442
- {
443
- "type": "object",
444
- "properties": {
445
- "type": {
446
- "type": "string",
447
- "const": "url"
448
- },
449
- "meta": {
450
- "$ref": "#/definitions/AnyTableColumnAnswer/anyOf/0/properties/meta"
451
- },
452
- "answer": {
453
- "type": "string",
454
- "default": ""
455
- }
456
- },
457
- "required": [
458
- "type"
459
- ],
460
- "additionalProperties": false
461
- }
462
- ]
463
- }
464
- },
465
- "$schema": "http://json-schema.org/draft-07/schema#"
466
- }