@dmptool/types 1.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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -0
  3. package/dist/answers.d.ts +558 -0
  4. package/dist/answers.js +87 -0
  5. package/dist/dateQuestions.d.ts +244 -0
  6. package/dist/dateQuestions.js +30 -0
  7. package/dist/graphQLQuestions.d.ts +288 -0
  8. package/dist/graphQLQuestions.js +41 -0
  9. package/dist/optionBasedQuestions.d.ts +236 -0
  10. package/dist/optionBasedQuestions.js +44 -0
  11. package/dist/primitiveQuestions.d.ts +367 -0
  12. package/dist/primitiveQuestions.js +96 -0
  13. package/dist/schemas/anyAnswer.schema.json +267 -0
  14. package/dist/schemas/anyQuestion.schema.json +726 -0
  15. package/dist/schemas/booleanAnswer.schema.json +23 -0
  16. package/dist/schemas/booleanQuestion.schema.json +46 -0
  17. package/dist/schemas/checkboxesAnswer.schema.json +26 -0
  18. package/dist/schemas/checkboxesQuestion.schema.json +73 -0
  19. package/dist/schemas/currencyAnswer.schema.json +23 -0
  20. package/dist/schemas/currencyQuestion.schema.json +45 -0
  21. package/dist/schemas/datePickerAnswer.schema.json +23 -0
  22. package/dist/schemas/datePickerQuestion.schema.json +52 -0
  23. package/dist/schemas/dateRangeAnswer.schema.json +36 -0
  24. package/dist/schemas/dateRangeQuestion.schema.json +106 -0
  25. package/dist/schemas/emailAnswer.schema.json +23 -0
  26. package/dist/schemas/emailQuestion.schema.json +55 -0
  27. package/dist/schemas/filteredSearchAnswer.schema.json +26 -0
  28. package/dist/schemas/filteredSearchQuestion.schema.json +120 -0
  29. package/dist/schemas/numberAnswer.schema.json +23 -0
  30. package/dist/schemas/numberQuestion.schema.json +52 -0
  31. package/dist/schemas/radioButtonsAnswer.schema.json +23 -0
  32. package/dist/schemas/radioButtonsQuestion.schema.json +73 -0
  33. package/dist/schemas/selectBoxAnswer.schema.json +23 -0
  34. package/dist/schemas/selectBoxQuestion.schema.json +83 -0
  35. package/dist/schemas/tableAnswer.schema.json +284 -0
  36. package/dist/schemas/tableQuestion.schema.json +680 -0
  37. package/dist/schemas/textAnswer.schema.json +23 -0
  38. package/dist/schemas/textAreaAnswer.schema.json +23 -0
  39. package/dist/schemas/textAreaQuestion.schema.json +48 -0
  40. package/dist/schemas/textQuestion.schema.json +52 -0
  41. package/dist/schemas/typeaheadSearchAnswer.schema.json +23 -0
  42. package/dist/schemas/typeaheadSearchQuestion.schema.json +110 -0
  43. package/dist/schemas/urlAnswer.schema.json +23 -0
  44. package/dist/schemas/urlQuestion.schema.json +52 -0
  45. package/dist/tableQuestions.d.ts +4195 -0
  46. package/dist/tableQuestions.js +55 -0
  47. package/package.json +41 -0
@@ -0,0 +1,23 @@
1
+ {
2
+ "$ref": "#/definitions/BooleanAnswer",
3
+ "definitions": {
4
+ "BooleanAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "boolean"
10
+ },
11
+ "answer": {
12
+ "type": "boolean"
13
+ }
14
+ },
15
+ "required": [
16
+ "type",
17
+ "answer"
18
+ ],
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "$schema": "http://json-schema.org/draft-07/schema#"
23
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$ref": "#/definitions/BooleanQuestion",
3
+ "definitions": {
4
+ "BooleanQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "boolean"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "const": "1.0"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "attributes": {
28
+ "type": "object",
29
+ "properties": {
30
+ "checked": {
31
+ "type": "boolean"
32
+ }
33
+ },
34
+ "additionalProperties": false
35
+ }
36
+ },
37
+ "required": [
38
+ "type",
39
+ "meta",
40
+ "attributes"
41
+ ],
42
+ "additionalProperties": false
43
+ }
44
+ },
45
+ "$schema": "http://json-schema.org/draft-07/schema#"
46
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$ref": "#/definitions/CheckboxesAnswer",
3
+ "definitions": {
4
+ "CheckboxesAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "checkBoxes"
10
+ },
11
+ "answer": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ }
16
+ }
17
+ },
18
+ "required": [
19
+ "type",
20
+ "answer"
21
+ ],
22
+ "additionalProperties": false
23
+ }
24
+ },
25
+ "$schema": "http://json-schema.org/draft-07/schema#"
26
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$ref": "#/definitions/CheckboxesQuestion",
3
+ "definitions": {
4
+ "CheckboxesQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "checkBoxes"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "const": "1.0"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "options": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "object",
31
+ "properties": {
32
+ "type": {
33
+ "type": "string",
34
+ "const": "option"
35
+ },
36
+ "attributes": {
37
+ "type": "object",
38
+ "properties": {
39
+ "label": {
40
+ "type": "string"
41
+ },
42
+ "value": {
43
+ "type": "string"
44
+ },
45
+ "checked": {
46
+ "type": "boolean"
47
+ }
48
+ },
49
+ "required": [
50
+ "label",
51
+ "value"
52
+ ],
53
+ "additionalProperties": false
54
+ }
55
+ },
56
+ "required": [
57
+ "type",
58
+ "attributes"
59
+ ],
60
+ "additionalProperties": false
61
+ }
62
+ }
63
+ },
64
+ "required": [
65
+ "type",
66
+ "meta",
67
+ "options"
68
+ ],
69
+ "additionalProperties": false
70
+ }
71
+ },
72
+ "$schema": "http://json-schema.org/draft-07/schema#"
73
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$ref": "#/definitions/CurrencyAnswer",
3
+ "definitions": {
4
+ "CurrencyAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "currency"
10
+ },
11
+ "answer": {
12
+ "type": "number"
13
+ }
14
+ },
15
+ "required": [
16
+ "type",
17
+ "answer"
18
+ ],
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "$schema": "http://json-schema.org/draft-07/schema#"
23
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$ref": "#/definitions/CurrencyQuestion",
3
+ "definitions": {
4
+ "CurrencyQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "currency"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "denomination": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "attributes": {
21
+ "type": "object",
22
+ "properties": {
23
+ "max": {
24
+ "type": "number"
25
+ },
26
+ "min": {
27
+ "type": "number"
28
+ },
29
+ "step": {
30
+ "type": "number"
31
+ }
32
+ },
33
+ "additionalProperties": false
34
+ }
35
+ },
36
+ "required": [
37
+ "type",
38
+ "meta",
39
+ "attributes"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "$schema": "http://json-schema.org/draft-07/schema#"
45
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$ref": "#/definitions/DatePickerAnswer",
3
+ "definitions": {
4
+ "DatePickerAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "datePicker"
10
+ },
11
+ "answer": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": [
16
+ "type",
17
+ "answer"
18
+ ],
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "$schema": "http://json-schema.org/draft-07/schema#"
23
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$ref": "#/definitions/DatePickerQuestion",
3
+ "definitions": {
4
+ "DatePickerQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "datePicker"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "const": "1.0"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "attributes": {
28
+ "type": "object",
29
+ "properties": {
30
+ "max": {
31
+ "type": "string"
32
+ },
33
+ "min": {
34
+ "type": "string"
35
+ },
36
+ "step": {
37
+ "type": "number"
38
+ }
39
+ },
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "required": [
44
+ "type",
45
+ "meta",
46
+ "attributes"
47
+ ],
48
+ "additionalProperties": false
49
+ }
50
+ },
51
+ "$schema": "http://json-schema.org/draft-07/schema#"
52
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$ref": "#/definitions/DateRangeAnswer",
3
+ "definitions": {
4
+ "DateRangeAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "dateRange"
10
+ },
11
+ "answer": {
12
+ "type": "object",
13
+ "properties": {
14
+ "start": {
15
+ "type": "string"
16
+ },
17
+ "end": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "start",
23
+ "end"
24
+ ],
25
+ "additionalProperties": false
26
+ }
27
+ },
28
+ "required": [
29
+ "type",
30
+ "answer"
31
+ ],
32
+ "additionalProperties": false
33
+ }
34
+ },
35
+ "$schema": "http://json-schema.org/draft-07/schema#"
36
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$ref": "#/definitions/DateRangeQuestion",
3
+ "definitions": {
4
+ "DateRangeQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "dateRange"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "const": "1.0"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "columns": {
28
+ "type": "object",
29
+ "properties": {
30
+ "start": {
31
+ "type": "object",
32
+ "properties": {
33
+ "type": {
34
+ "type": "string",
35
+ "const": "datePicker"
36
+ },
37
+ "meta": {
38
+ "$ref": "#/definitions/DateRangeQuestion/properties/meta"
39
+ },
40
+ "attributes": {
41
+ "type": "object",
42
+ "properties": {
43
+ "label": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ "required": [
48
+ "label"
49
+ ],
50
+ "additionalProperties": false
51
+ }
52
+ },
53
+ "required": [
54
+ "type",
55
+ "meta",
56
+ "attributes"
57
+ ],
58
+ "additionalProperties": false
59
+ },
60
+ "end": {
61
+ "type": "object",
62
+ "properties": {
63
+ "type": {
64
+ "$ref": "#/definitions/DateRangeQuestion/properties/columns/properties/start/properties/type"
65
+ },
66
+ "meta": {
67
+ "$ref": "#/definitions/DateRangeQuestion/properties/meta"
68
+ },
69
+ "attributes": {
70
+ "type": "object",
71
+ "properties": {
72
+ "label": {
73
+ "type": "string"
74
+ }
75
+ },
76
+ "required": [
77
+ "label"
78
+ ],
79
+ "additionalProperties": false
80
+ }
81
+ },
82
+ "required": [
83
+ "type",
84
+ "meta",
85
+ "attributes"
86
+ ],
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "required": [
91
+ "start",
92
+ "end"
93
+ ],
94
+ "additionalProperties": false
95
+ }
96
+ },
97
+ "required": [
98
+ "type",
99
+ "meta",
100
+ "columns"
101
+ ],
102
+ "additionalProperties": false
103
+ }
104
+ },
105
+ "$schema": "http://json-schema.org/draft-07/schema#"
106
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$ref": "#/definitions/EmailAnswer",
3
+ "definitions": {
4
+ "EmailAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "email"
10
+ },
11
+ "answer": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": [
16
+ "type",
17
+ "answer"
18
+ ],
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "$schema": "http://json-schema.org/draft-07/schema#"
23
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$ref": "#/definitions/EmailQuestion",
3
+ "definitions": {
4
+ "EmailQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "email"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "const": "1.0"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "attributes": {
28
+ "type": "object",
29
+ "properties": {
30
+ "maxLength": {
31
+ "type": "number"
32
+ },
33
+ "minLength": {
34
+ "type": "number"
35
+ },
36
+ "multiple": {
37
+ "type": "boolean"
38
+ },
39
+ "pattern": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ },
46
+ "required": [
47
+ "type",
48
+ "meta",
49
+ "attributes"
50
+ ],
51
+ "additionalProperties": false
52
+ }
53
+ },
54
+ "$schema": "http://json-schema.org/draft-07/schema#"
55
+ }
@@ -0,0 +1,26 @@
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
+ },
18
+ "required": [
19
+ "type",
20
+ "answer"
21
+ ],
22
+ "additionalProperties": false
23
+ }
24
+ },
25
+ "$schema": "http://json-schema.org/draft-07/schema#"
26
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "$ref": "#/definitions/FilteredSearchQuestion",
3
+ "definitions": {
4
+ "FilteredSearchQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "filteredSearch"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "const": "1.0"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "graphQL": {
28
+ "type": "object",
29
+ "properties": {
30
+ "displayFields": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "properties": {
35
+ "propertyName": {
36
+ "type": "string"
37
+ },
38
+ "label": {
39
+ "type": "string"
40
+ },
41
+ "labelTranslationKey": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "propertyName",
47
+ "label"
48
+ ],
49
+ "additionalProperties": false
50
+ }
51
+ },
52
+ "localQueryId": {
53
+ "type": "string"
54
+ },
55
+ "query": {
56
+ "type": "string"
57
+ },
58
+ "responseField": {
59
+ "type": "string"
60
+ },
61
+ "variables": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "properties": {
66
+ "minLength": {
67
+ "type": "number"
68
+ },
69
+ "label": {
70
+ "type": "string"
71
+ },
72
+ "labelTranslationKey": {
73
+ "type": "string"
74
+ },
75
+ "name": {
76
+ "type": "string"
77
+ },
78
+ "type": {
79
+ "type": "string"
80
+ },
81
+ "defaultValue": {
82
+ "type": "string"
83
+ }
84
+ },
85
+ "required": [
86
+ "name",
87
+ "type"
88
+ ],
89
+ "additionalProperties": false
90
+ }
91
+ }
92
+ },
93
+ "required": [
94
+ "displayFields",
95
+ "responseField",
96
+ "variables"
97
+ ],
98
+ "additionalProperties": false
99
+ },
100
+ "attributes": {
101
+ "type": "object",
102
+ "properties": {
103
+ "multiple": {
104
+ "type": "boolean"
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ }
109
+ },
110
+ "required": [
111
+ "type",
112
+ "meta",
113
+ "graphQL",
114
+ "attributes"
115
+ ],
116
+ "additionalProperties": false
117
+ }
118
+ },
119
+ "$schema": "http://json-schema.org/draft-07/schema#"
120
+ }