@dmptool/types 2.1.0 → 2.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 (121) hide show
  1. package/README.md +70 -1
  2. package/dist/answers/__tests__/defaults.spec.js +80 -21
  3. package/dist/answers/answer.d.ts +2 -0
  4. package/dist/answers/answer.js +4 -2
  5. package/dist/answers/dateAnswers.d.ts +4 -0
  6. package/dist/answers/graphQLAnswers.d.ts +8 -0
  7. package/dist/answers/index.d.ts +37 -0
  8. package/dist/answers/numberAnswers.d.ts +8 -0
  9. package/dist/answers/optionBasedAnswers.d.ts +10 -0
  10. package/dist/answers/tableAnswers.d.ts +94 -0
  11. package/dist/answers/textAnswers.d.ts +8 -0
  12. package/dist/dmp/extension.d.ts +111 -0
  13. package/dist/dmp/index.js +48 -2
  14. package/dist/questions/__tests__/defaults.spec.js +2 -2
  15. package/dist/questions/__tests__/optionBasedQuestions.spec.js +8 -4
  16. package/dist/questions/dateQuestions.d.ts +4 -0
  17. package/dist/questions/dateQuestions.js +2 -2
  18. package/dist/questions/index.d.ts +28 -0
  19. package/dist/questions/numberQuestions.d.ts +8 -0
  20. package/dist/questions/numberQuestions.js +4 -4
  21. package/dist/questions/optionBasedQuestions.d.ts +10 -0
  22. package/dist/questions/optionBasedQuestions.js +5 -5
  23. package/dist/questions/tableQuestions.d.ts +70 -0
  24. package/dist/questions/textQuestions.d.ts +4 -0
  25. package/dist/questions/textQuestions.js +2 -2
  26. package/dist/schemas/affiliationSearchAnswer.schema.json +3 -0
  27. package/dist/schemas/anyAnswer.schema.json +111 -0
  28. package/dist/schemas/anyQuestion.schema.json +84 -0
  29. package/dist/schemas/anyTableColumnAnswer.schema.json +54 -0
  30. package/dist/schemas/anyTableColumnQuestion.schema.json +33 -0
  31. package/dist/schemas/booleanAnswer.schema.json +3 -0
  32. package/dist/schemas/booleanQuestion.schema.json +3 -0
  33. package/dist/schemas/checkboxesAnswer.schema.json +3 -0
  34. package/dist/schemas/checkboxesQuestion.schema.json +3 -0
  35. package/dist/schemas/currencyAnswer.schema.json +3 -0
  36. package/dist/schemas/currencyQuestion.schema.json +3 -0
  37. package/dist/schemas/dateAnswer.schema.json +3 -0
  38. package/dist/schemas/dateQuestion.schema.json +3 -0
  39. package/dist/schemas/dateRangeAnswer.schema.json +3 -0
  40. package/dist/schemas/dateRangeQuestion.schema.json +3 -0
  41. package/dist/schemas/dmpExtension.schema.json +111 -0
  42. package/dist/schemas/emailAnswer.schema.json +3 -0
  43. package/dist/schemas/emailQuestion.schema.json +3 -0
  44. package/dist/schemas/licenseSearchAnswer.schema.json +3 -0
  45. package/dist/schemas/metadataStandardSearchAnswer.schema.json +3 -0
  46. package/dist/schemas/multiselectBoxAnswer.schema.json +3 -0
  47. package/dist/schemas/multiselectBoxQuestion.schema.json +3 -0
  48. package/dist/schemas/numberAnswer.schema.json +3 -0
  49. package/dist/schemas/numberQuestion.schema.json +3 -0
  50. package/dist/schemas/numberRangeAnswer.schema.json +3 -0
  51. package/dist/schemas/numberRangeQuestion.schema.json +3 -0
  52. package/dist/schemas/numberWithContextAnswer.schema.json +3 -0
  53. package/dist/schemas/numberWithContextQuestion.schema.json +3 -0
  54. package/dist/schemas/radioButtonsAnswer.schema.json +3 -0
  55. package/dist/schemas/radioButtonsQuestion.schema.json +3 -0
  56. package/dist/schemas/repositorySearchAnswer.schema.json +3 -0
  57. package/dist/schemas/researchOutputTableAnswer.schema.json +3344 -9
  58. package/dist/schemas/selectBoxAnswer.schema.json +3 -0
  59. package/dist/schemas/selectBoxQuestion.schema.json +3 -0
  60. package/dist/schemas/tableAnswer.schema.json +57 -0
  61. package/dist/schemas/tableQuestion.schema.json +33 -0
  62. package/dist/schemas/textAnswer.schema.json +3 -0
  63. package/dist/schemas/textAreaAnswer.schema.json +3 -0
  64. package/dist/schemas/urlAnswer.schema.json +3 -0
  65. package/dist/schemas/urlQuestion.schema.json +3 -0
  66. package/package.json +9 -4
  67. package/schemas/.placeholder +0 -0
  68. package/schemas/affiliationSearchAnswer.schema.json +50 -0
  69. package/schemas/affiliationSearchQuestion.schema.json +142 -0
  70. package/schemas/anyAnswer.schema.json +1537 -0
  71. package/schemas/anyQuestion.schema.json +4828 -0
  72. package/schemas/anyTableColumnAnswer.schema.json +741 -0
  73. package/schemas/anyTableColumnQuestion.schema.json +1560 -0
  74. package/schemas/booleanAnswer.schema.json +36 -0
  75. package/schemas/booleanQuestion.schema.json +55 -0
  76. package/schemas/checkboxesAnswer.schema.json +41 -0
  77. package/schemas/checkboxesQuestion.schema.json +80 -0
  78. package/schemas/currencyAnswer.schema.json +36 -0
  79. package/schemas/currencyQuestion.schema.json +73 -0
  80. package/schemas/dateAnswer.schema.json +36 -0
  81. package/schemas/datePickerAnswer.schema.json +37 -0
  82. package/schemas/datePickerQuestion.schema.json +52 -0
  83. package/schemas/dateQuestion.schema.json +66 -0
  84. package/schemas/dateRangeAnswer.schema.json +50 -0
  85. package/schemas/dateRangeQuestion.schema.json +124 -0
  86. package/schemas/dmp.schema.json +2070 -0
  87. package/schemas/dmpExtension.schema.json +1985 -0
  88. package/schemas/emailAnswer.schema.json +36 -0
  89. package/schemas/emailQuestion.schema.json +71 -0
  90. package/schemas/filteredSearchAnswer.schema.json +40 -0
  91. package/schemas/filteredSearchQuestion.schema.json +130 -0
  92. package/schemas/licenseSearchAnswer.schema.json +54 -0
  93. package/schemas/licenseSearchQuestion.schema.json +140 -0
  94. package/schemas/metadataStandardSearchAnswer.schema.json +54 -0
  95. package/schemas/metadataStandardSearchQuestion.schema.json +141 -0
  96. package/schemas/multiselectBoxAnswer.schema.json +41 -0
  97. package/schemas/multiselectBoxQuestion.schema.json +87 -0
  98. package/schemas/numberAnswer.schema.json +36 -0
  99. package/schemas/numberQuestion.schema.json +68 -0
  100. package/schemas/numberRangeAnswer.schema.json +50 -0
  101. package/schemas/numberRangeQuestion.schema.json +128 -0
  102. package/schemas/numberWithContextAnswer.schema.json +50 -0
  103. package/schemas/numberWithContextQuestion.schema.json +98 -0
  104. package/schemas/radioButtonsAnswer.schema.json +36 -0
  105. package/schemas/radioButtonsQuestion.schema.json +80 -0
  106. package/schemas/repositorySearchAnswer.schema.json +54 -0
  107. package/schemas/repositorySearchQuestion.schema.json +140 -0
  108. package/schemas/researchOutputTableAnswer.schema.json +20065 -0
  109. package/schemas/researchOutputTableQuestion.schema.json +140 -0
  110. package/schemas/selectBoxAnswer.schema.json +36 -0
  111. package/schemas/selectBoxQuestion.schema.json +87 -0
  112. package/schemas/tableAnswer.schema.json +797 -0
  113. package/schemas/tableQuestion.schema.json +1662 -0
  114. package/schemas/textAnswer.schema.json +36 -0
  115. package/schemas/textAreaAnswer.schema.json +36 -0
  116. package/schemas/textAreaQuestion.schema.json +78 -0
  117. package/schemas/textQuestion.schema.json +63 -0
  118. package/schemas/typeaheadSearchAnswer.schema.json +37 -0
  119. package/schemas/typeaheadSearchQuestion.schema.json +120 -0
  120. package/schemas/urlAnswer.schema.json +36 -0
  121. package/schemas/urlQuestion.schema.json +66 -0
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "text"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "comment": {
23
+ "type": "string"
24
+ },
25
+ "answer": {
26
+ "default": "",
27
+ "type": "string"
28
+ }
29
+ },
30
+ "required": [
31
+ "type",
32
+ "meta",
33
+ "answer"
34
+ ],
35
+ "additionalProperties": false
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "textArea"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "comment": {
23
+ "type": "string"
24
+ },
25
+ "answer": {
26
+ "default": "",
27
+ "type": "string"
28
+ }
29
+ },
30
+ "required": [
31
+ "type",
32
+ "meta",
33
+ "answer"
34
+ ],
35
+ "additionalProperties": false
36
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "textArea"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ },
21
+ "maxLength": {
22
+ "default": 10000,
23
+ "type": "number"
24
+ },
25
+ "minLength": {
26
+ "type": "number"
27
+ },
28
+ "pattern": {
29
+ "type": "string"
30
+ },
31
+ "cols": {
32
+ "default": 20,
33
+ "type": "number"
34
+ },
35
+ "rows": {
36
+ "default": 2,
37
+ "type": "number"
38
+ },
39
+ "asRichText": {
40
+ "default": true,
41
+ "type": "boolean"
42
+ }
43
+ },
44
+ "required": [
45
+ "maxLength",
46
+ "cols",
47
+ "rows",
48
+ "asRichText"
49
+ ],
50
+ "additionalProperties": false
51
+ },
52
+ "meta": {
53
+ "type": "object",
54
+ "properties": {
55
+ "schemaVersion": {
56
+ "default": "1.0",
57
+ "type": "string"
58
+ },
59
+ "title": {
60
+ "type": "string"
61
+ },
62
+ "usageDescription": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "required": [
67
+ "schemaVersion"
68
+ ],
69
+ "additionalProperties": false
70
+ }
71
+ },
72
+ "required": [
73
+ "type",
74
+ "attributes",
75
+ "meta"
76
+ ],
77
+ "additionalProperties": false
78
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "text"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ },
21
+ "maxLength": {
22
+ "default": 255,
23
+ "type": "number"
24
+ },
25
+ "minLength": {
26
+ "type": "number"
27
+ },
28
+ "pattern": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ "required": [
33
+ "maxLength"
34
+ ],
35
+ "additionalProperties": false
36
+ },
37
+ "meta": {
38
+ "type": "object",
39
+ "properties": {
40
+ "schemaVersion": {
41
+ "default": "1.0",
42
+ "type": "string"
43
+ },
44
+ "title": {
45
+ "type": "string"
46
+ },
47
+ "usageDescription": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ "required": [
52
+ "schemaVersion"
53
+ ],
54
+ "additionalProperties": false
55
+ }
56
+ },
57
+ "required": [
58
+ "type",
59
+ "attributes",
60
+ "meta"
61
+ ],
62
+ "additionalProperties": false
63
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$ref": "#/definitions/TypeaheadSearchAnswer",
3
+ "definitions": {
4
+ "TypeaheadSearchAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "typeaheadSearch"
10
+ },
11
+ "answer": {
12
+ "type": "string"
13
+ },
14
+ "meta": {
15
+ "type": "object",
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "type": "string",
19
+ "const": "1.0"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ }
27
+ },
28
+ "required": [
29
+ "type",
30
+ "answer",
31
+ "meta"
32
+ ],
33
+ "additionalProperties": false
34
+ }
35
+ },
36
+ "$schema": "http://json-schema.org/draft-07/schema#"
37
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "$ref": "#/definitions/TypeaheadSearchQuestion",
3
+ "definitions": {
4
+ "TypeaheadSearchQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "typeaheadSearch"
10
+ },
11
+ "attributes": {
12
+ "type": "object",
13
+ "properties": {
14
+ "label": {
15
+ "type": "string"
16
+ },
17
+ "help": {
18
+ "type": "string"
19
+ },
20
+ "labelTranslationKey": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ "additionalProperties": false
25
+ },
26
+ "meta": {
27
+ "type": "object",
28
+ "properties": {
29
+ "schemaVersion": {
30
+ "type": "string",
31
+ "const": "1.0"
32
+ }
33
+ },
34
+ "required": [
35
+ "schemaVersion"
36
+ ],
37
+ "additionalProperties": false
38
+ },
39
+ "graphQL": {
40
+ "type": "object",
41
+ "properties": {
42
+ "displayFields": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "object",
46
+ "properties": {
47
+ "propertyName": {
48
+ "type": "string"
49
+ },
50
+ "label": {
51
+ "type": "string"
52
+ },
53
+ "labelTranslationKey": {
54
+ "type": "string"
55
+ }
56
+ },
57
+ "required": [
58
+ "propertyName",
59
+ "label"
60
+ ],
61
+ "additionalProperties": false
62
+ }
63
+ },
64
+ "localQueryId": {
65
+ "type": "string"
66
+ },
67
+ "query": {
68
+ "type": "string"
69
+ },
70
+ "responseField": {
71
+ "type": "string"
72
+ },
73
+ "variables": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "properties": {
78
+ "minLength": {
79
+ "type": "number"
80
+ },
81
+ "label": {
82
+ "type": "string"
83
+ },
84
+ "labelTranslationKey": {
85
+ "type": "string"
86
+ },
87
+ "name": {
88
+ "type": "string"
89
+ },
90
+ "type": {
91
+ "type": "string"
92
+ },
93
+ "defaultValue": {
94
+ "type": "string"
95
+ }
96
+ },
97
+ "required": [
98
+ "name",
99
+ "type"
100
+ ],
101
+ "additionalProperties": false
102
+ }
103
+ }
104
+ },
105
+ "required": [
106
+ "displayFields",
107
+ "responseField"
108
+ ],
109
+ "additionalProperties": false
110
+ }
111
+ },
112
+ "required": [
113
+ "type",
114
+ "graphQL"
115
+ ],
116
+ "additionalProperties": false
117
+ }
118
+ },
119
+ "$schema": "http://json-schema.org/draft-07/schema#"
120
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "url"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "comment": {
23
+ "type": "string"
24
+ },
25
+ "answer": {
26
+ "default": "",
27
+ "type": "string"
28
+ }
29
+ },
30
+ "required": [
31
+ "type",
32
+ "meta",
33
+ "answer"
34
+ ],
35
+ "additionalProperties": false
36
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "url"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ },
21
+ "maxLength": {
22
+ "default": 255,
23
+ "type": "number"
24
+ },
25
+ "minLength": {
26
+ "type": "number"
27
+ },
28
+ "pattern": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ "required": [
33
+ "maxLength"
34
+ ],
35
+ "additionalProperties": false
36
+ },
37
+ "meta": {
38
+ "type": "object",
39
+ "properties": {
40
+ "schemaVersion": {
41
+ "default": "1.0",
42
+ "type": "string"
43
+ },
44
+ "title": {
45
+ "type": "string"
46
+ },
47
+ "usageDescription": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ "required": [
52
+ "schemaVersion"
53
+ ],
54
+ "additionalProperties": false
55
+ },
56
+ "showCommentField": {
57
+ "type": "boolean"
58
+ }
59
+ },
60
+ "required": [
61
+ "type",
62
+ "attributes",
63
+ "meta"
64
+ ],
65
+ "additionalProperties": false
66
+ }