@dmptool/types 2.0.0 → 2.1.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 (68) hide show
  1. package/dist/dmp/__tests__/commonStandard.spec.d.ts +1 -0
  2. package/dist/dmp/__tests__/commonStandard.spec.js +210 -0
  3. package/dist/dmp/__tests__/extensions.spec.d.ts +1 -0
  4. package/dist/dmp/__tests__/extensions.spec.js +99 -0
  5. package/dist/dmp/extension.d.ts +1006 -0
  6. package/dist/dmp/extension.js +234 -0
  7. package/dist/dmp/index.d.ts +9 -0
  8. package/dist/dmp/index.js +23 -0
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.js +1 -0
  11. package/dist/questions/index.d.ts +2 -22
  12. package/dist/questions/tableQuestions.d.ts +323 -25
  13. package/dist/questions/tableQuestions.js +3 -2
  14. package/dist/schemas/affiliationSearchAnswer.schema.json +47 -0
  15. package/dist/schemas/affiliationSearchQuestion.schema.json +142 -0
  16. package/dist/schemas/anyAnswer.schema.json +1426 -0
  17. package/dist/schemas/anyQuestion.schema.json +4744 -0
  18. package/dist/schemas/anyTableColumnAnswer.schema.json +687 -0
  19. package/dist/schemas/anyTableColumnQuestion.schema.json +1527 -0
  20. package/dist/schemas/booleanAnswer.schema.json +33 -0
  21. package/dist/schemas/booleanQuestion.schema.json +52 -0
  22. package/dist/schemas/checkboxesAnswer.schema.json +38 -0
  23. package/dist/schemas/checkboxesQuestion.schema.json +77 -0
  24. package/dist/schemas/currencyAnswer.schema.json +33 -0
  25. package/dist/schemas/currencyQuestion.schema.json +70 -0
  26. package/dist/schemas/dateAnswer.schema.json +33 -0
  27. package/dist/schemas/datePickerAnswer.schema.json +37 -0
  28. package/dist/schemas/datePickerQuestion.schema.json +52 -0
  29. package/dist/schemas/dateQuestion.schema.json +63 -0
  30. package/dist/schemas/dateRangeAnswer.schema.json +47 -0
  31. package/dist/schemas/dateRangeQuestion.schema.json +121 -0
  32. package/dist/schemas/dmp.schema.json +2070 -0
  33. package/dist/schemas/dmpExtension.schema.json +1874 -0
  34. package/dist/schemas/emailAnswer.schema.json +33 -0
  35. package/dist/schemas/emailQuestion.schema.json +68 -0
  36. package/dist/schemas/filteredSearchAnswer.schema.json +40 -0
  37. package/dist/schemas/filteredSearchQuestion.schema.json +130 -0
  38. package/dist/schemas/licenseSearchAnswer.schema.json +51 -0
  39. package/dist/schemas/licenseSearchQuestion.schema.json +140 -0
  40. package/dist/schemas/metadataStandardSearchAnswer.schema.json +51 -0
  41. package/dist/schemas/metadataStandardSearchQuestion.schema.json +141 -0
  42. package/dist/schemas/multiselectBoxAnswer.schema.json +38 -0
  43. package/dist/schemas/multiselectBoxQuestion.schema.json +84 -0
  44. package/dist/schemas/numberAnswer.schema.json +33 -0
  45. package/dist/schemas/numberQuestion.schema.json +65 -0
  46. package/dist/schemas/numberRangeAnswer.schema.json +47 -0
  47. package/dist/schemas/numberRangeQuestion.schema.json +125 -0
  48. package/dist/schemas/numberWithContextAnswer.schema.json +47 -0
  49. package/dist/schemas/numberWithContextQuestion.schema.json +95 -0
  50. package/dist/schemas/radioButtonsAnswer.schema.json +33 -0
  51. package/dist/schemas/radioButtonsQuestion.schema.json +77 -0
  52. package/dist/schemas/repositorySearchAnswer.schema.json +51 -0
  53. package/dist/schemas/repositorySearchQuestion.schema.json +140 -0
  54. package/dist/schemas/researchOutputTableAnswer.schema.json +16730 -0
  55. package/dist/schemas/researchOutputTableQuestion.schema.json +140 -0
  56. package/dist/schemas/selectBoxAnswer.schema.json +33 -0
  57. package/dist/schemas/selectBoxQuestion.schema.json +84 -0
  58. package/dist/schemas/tableAnswer.schema.json +740 -0
  59. package/dist/schemas/tableQuestion.schema.json +1629 -0
  60. package/dist/schemas/textAnswer.schema.json +33 -0
  61. package/dist/schemas/textAreaAnswer.schema.json +33 -0
  62. package/dist/schemas/textAreaQuestion.schema.json +78 -0
  63. package/dist/schemas/textQuestion.schema.json +63 -0
  64. package/dist/schemas/typeaheadSearchAnswer.schema.json +37 -0
  65. package/dist/schemas/typeaheadSearchQuestion.schema.json +120 -0
  66. package/dist/schemas/urlAnswer.schema.json +33 -0
  67. package/dist/schemas/urlQuestion.schema.json +63 -0
  68. package/package.json +5 -2
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "email"
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
+ "answer": {
23
+ "default": "",
24
+ "type": "string"
25
+ }
26
+ },
27
+ "required": [
28
+ "type",
29
+ "meta",
30
+ "answer"
31
+ ],
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "email"
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
+ "multiple": {
32
+ "default": false,
33
+ "type": "boolean"
34
+ }
35
+ },
36
+ "required": [
37
+ "maxLength",
38
+ "multiple"
39
+ ],
40
+ "additionalProperties": false
41
+ },
42
+ "meta": {
43
+ "type": "object",
44
+ "properties": {
45
+ "schemaVersion": {
46
+ "default": "1.0",
47
+ "type": "string"
48
+ },
49
+ "title": {
50
+ "type": "string"
51
+ },
52
+ "usageDescription": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "required": [
57
+ "schemaVersion"
58
+ ],
59
+ "additionalProperties": false
60
+ }
61
+ },
62
+ "required": [
63
+ "type",
64
+ "attributes",
65
+ "meta"
66
+ ],
67
+ "additionalProperties": false
68
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$ref": "#/definitions/FilteredSearchAnswer",
3
+ "definitions": {
4
+ "FilteredSearchAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "filteredSearch"
10
+ },
11
+ "answer": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "meta": {
18
+ "type": "object",
19
+ "properties": {
20
+ "schemaVersion": {
21
+ "type": "string",
22
+ "const": "1.0"
23
+ }
24
+ },
25
+ "required": [
26
+ "schemaVersion"
27
+ ],
28
+ "additionalProperties": false
29
+ }
30
+ },
31
+ "required": [
32
+ "type",
33
+ "answer",
34
+ "meta"
35
+ ],
36
+ "additionalProperties": false
37
+ }
38
+ },
39
+ "$schema": "http://json-schema.org/draft-07/schema#"
40
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "$ref": "#/definitions/FilteredSearchQuestion",
3
+ "definitions": {
4
+ "FilteredSearchQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "filteredSearch"
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
+ "multiple": {
24
+ "type": "boolean"
25
+ }
26
+ },
27
+ "additionalProperties": false
28
+ },
29
+ "meta": {
30
+ "type": "object",
31
+ "properties": {
32
+ "schemaVersion": {
33
+ "type": "string",
34
+ "const": "1.0"
35
+ },
36
+ "title": {
37
+ "type": "string",
38
+ "const": "Not yet implemented"
39
+ },
40
+ "usageDescription": {
41
+ "type": "string"
42
+ }
43
+ },
44
+ "required": [
45
+ "schemaVersion"
46
+ ],
47
+ "additionalProperties": false
48
+ },
49
+ "graphQL": {
50
+ "type": "object",
51
+ "properties": {
52
+ "displayFields": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "object",
56
+ "properties": {
57
+ "propertyName": {
58
+ "type": "string"
59
+ },
60
+ "label": {
61
+ "type": "string"
62
+ },
63
+ "labelTranslationKey": {
64
+ "type": "string"
65
+ }
66
+ },
67
+ "required": [
68
+ "propertyName",
69
+ "label"
70
+ ],
71
+ "additionalProperties": false
72
+ }
73
+ },
74
+ "localQueryId": {
75
+ "type": "string"
76
+ },
77
+ "query": {
78
+ "type": "string"
79
+ },
80
+ "responseField": {
81
+ "type": "string"
82
+ },
83
+ "variables": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "object",
87
+ "properties": {
88
+ "minLength": {
89
+ "type": "number"
90
+ },
91
+ "label": {
92
+ "type": "string"
93
+ },
94
+ "labelTranslationKey": {
95
+ "type": "string"
96
+ },
97
+ "name": {
98
+ "type": "string"
99
+ },
100
+ "type": {
101
+ "type": "string"
102
+ },
103
+ "defaultValue": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "required": [
108
+ "name",
109
+ "type"
110
+ ],
111
+ "additionalProperties": false
112
+ }
113
+ }
114
+ },
115
+ "required": [
116
+ "displayFields",
117
+ "responseField"
118
+ ],
119
+ "additionalProperties": false
120
+ }
121
+ },
122
+ "required": [
123
+ "type",
124
+ "graphQL"
125
+ ],
126
+ "additionalProperties": false
127
+ }
128
+ },
129
+ "$schema": "http://json-schema.org/draft-07/schema#"
130
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "licenseSearch"
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
+ "answer": {
23
+ "default": [],
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "properties": {
28
+ "licenseId": {
29
+ "default": "",
30
+ "type": "string"
31
+ },
32
+ "licenseName": {
33
+ "default": "",
34
+ "type": "string"
35
+ }
36
+ },
37
+ "required": [
38
+ "licenseId",
39
+ "licenseName"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ }
44
+ },
45
+ "required": [
46
+ "type",
47
+ "meta",
48
+ "answer"
49
+ ],
50
+ "additionalProperties": false
51
+ }
@@ -0,0 +1,140 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "licenseSearch"
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
+ },
22
+ "additionalProperties": false
23
+ },
24
+ "meta": {
25
+ "type": "object",
26
+ "properties": {
27
+ "schemaVersion": {
28
+ "default": "1.0",
29
+ "type": "string"
30
+ },
31
+ "title": {
32
+ "type": "string"
33
+ },
34
+ "usageDescription": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "required": [
39
+ "schemaVersion"
40
+ ],
41
+ "additionalProperties": false
42
+ },
43
+ "graphQL": {
44
+ "type": "object",
45
+ "properties": {
46
+ "displayFields": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "properties": {
51
+ "propertyName": {
52
+ "default": "id",
53
+ "type": "string"
54
+ },
55
+ "label": {
56
+ "default": "Id",
57
+ "type": "string"
58
+ },
59
+ "labelTranslationKey": {
60
+ "type": "string"
61
+ }
62
+ },
63
+ "required": [
64
+ "propertyName",
65
+ "label"
66
+ ],
67
+ "additionalProperties": false
68
+ }
69
+ },
70
+ "localQueryId": {
71
+ "type": "string"
72
+ },
73
+ "query": {
74
+ "type": "string",
75
+ "const": "query Licenses($term: String, $paginationOptions: PaginationOptions){ license(term: $term, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description } } }"
76
+ },
77
+ "responseField": {
78
+ "type": "string",
79
+ "const": "licenses.items"
80
+ },
81
+ "variables": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "object",
85
+ "properties": {
86
+ "minLength": {
87
+ "type": "number"
88
+ },
89
+ "label": {
90
+ "type": "string"
91
+ },
92
+ "labelTranslationKey": {
93
+ "type": "string"
94
+ },
95
+ "name": {
96
+ "default": "search",
97
+ "type": "string"
98
+ },
99
+ "type": {
100
+ "default": "string",
101
+ "type": "string"
102
+ },
103
+ "defaultValue": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "required": [
108
+ "name",
109
+ "type"
110
+ ],
111
+ "additionalProperties": false
112
+ }
113
+ },
114
+ "queryId": {
115
+ "default": "useLicensesQuery",
116
+ "type": "string"
117
+ },
118
+ "answerField": {
119
+ "type": "string",
120
+ "const": "uri"
121
+ }
122
+ },
123
+ "required": [
124
+ "displayFields",
125
+ "query",
126
+ "responseField",
127
+ "variables",
128
+ "answerField"
129
+ ],
130
+ "additionalProperties": false
131
+ }
132
+ },
133
+ "required": [
134
+ "type",
135
+ "attributes",
136
+ "meta",
137
+ "graphQL"
138
+ ],
139
+ "additionalProperties": false
140
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "metadataStandardSearch"
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
+ "answer": {
23
+ "default": [],
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "properties": {
28
+ "metadataStandardId": {
29
+ "default": "",
30
+ "type": "string"
31
+ },
32
+ "metadataStandardName": {
33
+ "default": "",
34
+ "type": "string"
35
+ }
36
+ },
37
+ "required": [
38
+ "metadataStandardId",
39
+ "metadataStandardName"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ }
44
+ },
45
+ "required": [
46
+ "type",
47
+ "meta",
48
+ "answer"
49
+ ],
50
+ "additionalProperties": false
51
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "metadataStandardSearch"
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
+ },
22
+ "additionalProperties": false
23
+ },
24
+ "meta": {
25
+ "type": "object",
26
+ "properties": {
27
+ "schemaVersion": {
28
+ "default": "1.0",
29
+ "type": "string"
30
+ },
31
+ "title": {
32
+ "type": "string"
33
+ },
34
+ "usageDescription": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "required": [
39
+ "schemaVersion"
40
+ ],
41
+ "additionalProperties": false
42
+ },
43
+ "graphQL": {
44
+ "type": "object",
45
+ "properties": {
46
+ "displayFields": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "properties": {
51
+ "propertyName": {
52
+ "default": "id",
53
+ "type": "string"
54
+ },
55
+ "label": {
56
+ "default": "Id",
57
+ "type": "string"
58
+ },
59
+ "labelTranslationKey": {
60
+ "type": "string"
61
+ }
62
+ },
63
+ "required": [
64
+ "propertyName",
65
+ "label"
66
+ ],
67
+ "additionalProperties": false
68
+ }
69
+ },
70
+ "localQueryId": {
71
+ "type": "string"
72
+ },
73
+ "query": {
74
+ "type": "string",
75
+ "const": "query MetadataStandards($term: String, $keywords: [String!], $paginationOptions: PaginationOptions){ metadataStandards(term: $term, keywords: $keywords, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description keywords } } }"
76
+ },
77
+ "responseField": {
78
+ "type": "string",
79
+ "const": "metadataStandards.items"
80
+ },
81
+ "variables": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "object",
85
+ "properties": {
86
+ "minLength": {
87
+ "type": "number"
88
+ },
89
+ "label": {
90
+ "type": "string"
91
+ },
92
+ "labelTranslationKey": {
93
+ "type": "string"
94
+ },
95
+ "name": {
96
+ "default": "search",
97
+ "type": "string"
98
+ },
99
+ "type": {
100
+ "default": "string",
101
+ "type": "string"
102
+ },
103
+ "defaultValue": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "required": [
108
+ "name",
109
+ "type"
110
+ ],
111
+ "additionalProperties": false
112
+ }
113
+ },
114
+ "queryId": {
115
+ "default": "useMetadataStandardsQuery",
116
+ "type": "string"
117
+ },
118
+ "answerField": {
119
+ "default": "uri",
120
+ "type": "string",
121
+ "const": "uri"
122
+ }
123
+ },
124
+ "required": [
125
+ "displayFields",
126
+ "query",
127
+ "responseField",
128
+ "variables",
129
+ "answerField"
130
+ ],
131
+ "additionalProperties": false
132
+ }
133
+ },
134
+ "required": [
135
+ "type",
136
+ "attributes",
137
+ "meta",
138
+ "graphQL"
139
+ ],
140
+ "additionalProperties": false
141
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "multiselectBox"
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
+ "answer": {
23
+ "default": [
24
+ ""
25
+ ],
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string"
29
+ }
30
+ }
31
+ },
32
+ "required": [
33
+ "type",
34
+ "meta",
35
+ "answer"
36
+ ],
37
+ "additionalProperties": false
38
+ }