@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.
- package/dist/dmp/__tests__/commonStandard.spec.d.ts +1 -0
- package/dist/dmp/__tests__/commonStandard.spec.js +210 -0
- package/dist/dmp/__tests__/extensions.spec.d.ts +1 -0
- package/dist/dmp/__tests__/extensions.spec.js +99 -0
- package/dist/dmp/extension.d.ts +1006 -0
- package/dist/dmp/extension.js +234 -0
- package/dist/dmp/index.d.ts +9 -0
- package/dist/dmp/index.js +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/questions/index.d.ts +2 -22
- package/dist/questions/tableQuestions.d.ts +323 -25
- package/dist/questions/tableQuestions.js +3 -2
- package/dist/schemas/affiliationSearchAnswer.schema.json +47 -0
- package/dist/schemas/affiliationSearchQuestion.schema.json +142 -0
- package/dist/schemas/anyAnswer.schema.json +1426 -0
- package/dist/schemas/anyQuestion.schema.json +4744 -0
- package/dist/schemas/anyTableColumnAnswer.schema.json +687 -0
- package/dist/schemas/anyTableColumnQuestion.schema.json +1527 -0
- package/dist/schemas/booleanAnswer.schema.json +33 -0
- package/dist/schemas/booleanQuestion.schema.json +52 -0
- package/dist/schemas/checkboxesAnswer.schema.json +38 -0
- package/dist/schemas/checkboxesQuestion.schema.json +77 -0
- package/dist/schemas/currencyAnswer.schema.json +33 -0
- package/dist/schemas/currencyQuestion.schema.json +70 -0
- package/dist/schemas/dateAnswer.schema.json +33 -0
- package/dist/schemas/datePickerAnswer.schema.json +37 -0
- package/dist/schemas/datePickerQuestion.schema.json +52 -0
- package/dist/schemas/dateQuestion.schema.json +63 -0
- package/dist/schemas/dateRangeAnswer.schema.json +47 -0
- package/dist/schemas/dateRangeQuestion.schema.json +121 -0
- package/dist/schemas/dmp.schema.json +2070 -0
- package/dist/schemas/dmpExtension.schema.json +1874 -0
- package/dist/schemas/emailAnswer.schema.json +33 -0
- package/dist/schemas/emailQuestion.schema.json +68 -0
- package/dist/schemas/filteredSearchAnswer.schema.json +40 -0
- package/dist/schemas/filteredSearchQuestion.schema.json +130 -0
- package/dist/schemas/licenseSearchAnswer.schema.json +51 -0
- package/dist/schemas/licenseSearchQuestion.schema.json +140 -0
- package/dist/schemas/metadataStandardSearchAnswer.schema.json +51 -0
- package/dist/schemas/metadataStandardSearchQuestion.schema.json +141 -0
- package/dist/schemas/multiselectBoxAnswer.schema.json +38 -0
- package/dist/schemas/multiselectBoxQuestion.schema.json +84 -0
- package/dist/schemas/numberAnswer.schema.json +33 -0
- package/dist/schemas/numberQuestion.schema.json +65 -0
- package/dist/schemas/numberRangeAnswer.schema.json +47 -0
- package/dist/schemas/numberRangeQuestion.schema.json +125 -0
- package/dist/schemas/numberWithContextAnswer.schema.json +47 -0
- package/dist/schemas/numberWithContextQuestion.schema.json +95 -0
- package/dist/schemas/radioButtonsAnswer.schema.json +33 -0
- package/dist/schemas/radioButtonsQuestion.schema.json +77 -0
- package/dist/schemas/repositorySearchAnswer.schema.json +51 -0
- package/dist/schemas/repositorySearchQuestion.schema.json +140 -0
- package/dist/schemas/researchOutputTableAnswer.schema.json +16730 -0
- package/dist/schemas/researchOutputTableQuestion.schema.json +140 -0
- package/dist/schemas/selectBoxAnswer.schema.json +33 -0
- package/dist/schemas/selectBoxQuestion.schema.json +84 -0
- package/dist/schemas/tableAnswer.schema.json +740 -0
- package/dist/schemas/tableQuestion.schema.json +1629 -0
- package/dist/schemas/textAnswer.schema.json +33 -0
- package/dist/schemas/textAreaAnswer.schema.json +33 -0
- package/dist/schemas/textAreaQuestion.schema.json +78 -0
- package/dist/schemas/textQuestion.schema.json +63 -0
- package/dist/schemas/typeaheadSearchAnswer.schema.json +37 -0
- package/dist/schemas/typeaheadSearchQuestion.schema.json +120 -0
- package/dist/schemas/urlAnswer.schema.json +33 -0
- package/dist/schemas/urlQuestion.schema.json +63 -0
- 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": "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
|
+
"answer": {
|
|
23
|
+
"default": "",
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"type",
|
|
29
|
+
"meta",
|
|
30
|
+
"answer"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -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": "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
|
+
"answer": {
|
|
23
|
+
"default": "",
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"type",
|
|
29
|
+
"meta",
|
|
30
|
+
"answer"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -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,33 @@
|
|
|
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
|
+
"answer": {
|
|
23
|
+
"default": "",
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"type",
|
|
29
|
+
"meta",
|
|
30
|
+
"answer"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -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": "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
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"type",
|
|
59
|
+
"attributes",
|
|
60
|
+
"meta"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dmptool/types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "TypeScript types for DMPTool",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "npm run clean && tsc",
|
|
22
|
+
"build": "npm run clean && npm run generate && tsc && npm run copy:schemas",
|
|
23
23
|
"clean": "rm -rf dist",
|
|
24
24
|
"copy:schemas": "node scripts/copySchemas.mjs",
|
|
25
25
|
"generate": "ts-node scripts/generateSchemas.ts",
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
"eslint": "^9.26.0",
|
|
43
43
|
"husky": "^9.1.7",
|
|
44
44
|
"jest": "^29.7.0",
|
|
45
|
+
"jest-expect-message": "^1.1.3",
|
|
46
|
+
"json-schema-to-ts": "^3.1.1",
|
|
47
|
+
"jsonschema": "^1.5.0",
|
|
45
48
|
"ts-jest": "^29.3.3",
|
|
46
49
|
"ts-node": "^10.9.2",
|
|
47
50
|
"ts-node-dev": "^2.0.0",
|