@dmptool/types 1.0.1 → 1.0.2
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/README.md +96 -29
- package/dist/answers/__tests__/answers.spec.js +33 -28
- package/dist/answers/answer.d.ts +13 -0
- package/dist/answers/answer.js +3 -0
- package/dist/answers/dateAnswers.d.ts +28 -1
- package/dist/answers/graphQLAnswers.d.ts +30 -2
- package/dist/answers/index.d.ts +523 -35
- package/dist/answers/optionBasedAnswers.d.ts +48 -6
- package/dist/answers/optionBasedAnswers.js +1 -1
- package/dist/answers/primitiveAnswers.d.ts +105 -7
- package/dist/answers/tableAnswers.d.ts +523 -35
- package/dist/schemas/anyAnswer.schema.json +89 -16
- package/dist/schemas/anyTableColumnAnswer.schema.json +84 -15
- package/dist/schemas/booleanAnswer.schema.json +15 -1
- package/dist/schemas/checkboxesAnswer.schema.json +15 -1
- package/dist/schemas/currencyAnswer.schema.json +15 -1
- package/dist/schemas/datePickerAnswer.schema.json +15 -1
- package/dist/schemas/dateRangeAnswer.schema.json +15 -1
- package/dist/schemas/emailAnswer.schema.json +15 -1
- package/dist/schemas/filteredSearchAnswer.schema.json +15 -1
- package/dist/schemas/numberAnswer.schema.json +15 -1
- package/dist/schemas/radioButtonsAnswer.schema.json +15 -1
- package/dist/schemas/selectBoxAnswer.schema.json +19 -2
- package/dist/schemas/tableAnswer.schema.json +89 -16
- package/dist/schemas/textAnswer.schema.json +15 -1
- package/dist/schemas/textAreaAnswer.schema.json +15 -1
- package/dist/schemas/typeaheadSearchAnswer.schema.json +15 -1
- package/dist/schemas/urlAnswer.schema.json +15 -1
- package/package.json +1 -1
|
@@ -1,33 +1,75 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const CheckboxesAnswer: z.ZodObject<{
|
|
2
|
+
export declare const CheckboxesAnswer: z.ZodObject<{
|
|
3
|
+
meta: z.ZodObject<{
|
|
4
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
schemaVersion: "1.0";
|
|
7
|
+
}, {
|
|
8
|
+
schemaVersion: "1.0";
|
|
9
|
+
}>;
|
|
10
|
+
} & {
|
|
3
11
|
type: z.ZodLiteral<"checkBoxes">;
|
|
4
12
|
answer: z.ZodArray<z.ZodString, "many">;
|
|
5
13
|
}, "strip", z.ZodTypeAny, {
|
|
6
14
|
type: "checkBoxes";
|
|
15
|
+
meta: {
|
|
16
|
+
schemaVersion: "1.0";
|
|
17
|
+
};
|
|
7
18
|
answer: string[];
|
|
8
19
|
}, {
|
|
9
20
|
type: "checkBoxes";
|
|
21
|
+
meta: {
|
|
22
|
+
schemaVersion: "1.0";
|
|
23
|
+
};
|
|
10
24
|
answer: string[];
|
|
11
25
|
}>;
|
|
12
|
-
export declare const RadioButtonsAnswer: z.ZodObject<{
|
|
26
|
+
export declare const RadioButtonsAnswer: z.ZodObject<{
|
|
27
|
+
meta: z.ZodObject<{
|
|
28
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
schemaVersion: "1.0";
|
|
31
|
+
}, {
|
|
32
|
+
schemaVersion: "1.0";
|
|
33
|
+
}>;
|
|
34
|
+
} & {
|
|
13
35
|
type: z.ZodLiteral<"radioButtons">;
|
|
14
36
|
answer: z.ZodString;
|
|
15
37
|
}, "strip", z.ZodTypeAny, {
|
|
16
38
|
type: "radioButtons";
|
|
39
|
+
meta: {
|
|
40
|
+
schemaVersion: "1.0";
|
|
41
|
+
};
|
|
17
42
|
answer: string;
|
|
18
43
|
}, {
|
|
19
44
|
type: "radioButtons";
|
|
45
|
+
meta: {
|
|
46
|
+
schemaVersion: "1.0";
|
|
47
|
+
};
|
|
20
48
|
answer: string;
|
|
21
49
|
}>;
|
|
22
|
-
export declare const SelectBoxAnswer: z.ZodObject<{
|
|
50
|
+
export declare const SelectBoxAnswer: z.ZodObject<{
|
|
51
|
+
meta: z.ZodObject<{
|
|
52
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
schemaVersion: "1.0";
|
|
55
|
+
}, {
|
|
56
|
+
schemaVersion: "1.0";
|
|
57
|
+
}>;
|
|
58
|
+
} & {
|
|
23
59
|
type: z.ZodLiteral<"selectBox">;
|
|
24
|
-
answer: z.ZodString
|
|
60
|
+
answer: z.ZodArray<z.ZodString, "many">;
|
|
25
61
|
}, "strip", z.ZodTypeAny, {
|
|
26
62
|
type: "selectBox";
|
|
27
|
-
|
|
63
|
+
meta: {
|
|
64
|
+
schemaVersion: "1.0";
|
|
65
|
+
};
|
|
66
|
+
answer: string[];
|
|
28
67
|
}, {
|
|
29
68
|
type: "selectBox";
|
|
30
|
-
|
|
69
|
+
meta: {
|
|
70
|
+
schemaVersion: "1.0";
|
|
71
|
+
};
|
|
72
|
+
answer: string[];
|
|
31
73
|
}>;
|
|
32
74
|
export type CheckboxesAnswerType = z.infer<typeof CheckboxesAnswer>;
|
|
33
75
|
export type RadioButtonsAnswerType = z.infer<typeof RadioButtonsAnswer>;
|
|
@@ -14,5 +14,5 @@ exports.RadioButtonsAnswer = answer_1.Answer.merge(zod_1.z.object({
|
|
|
14
14
|
}));
|
|
15
15
|
exports.SelectBoxAnswer = answer_1.Answer.merge(zod_1.z.object({
|
|
16
16
|
type: zod_1.z.literal('selectBox'), // The type of answer
|
|
17
|
-
answer: zod_1.z.string() // The answer to the question (
|
|
17
|
+
answer: zod_1.z.array(zod_1.z.string()) // The answer to the question (array of strings)
|
|
18
18
|
}));
|
|
@@ -1,72 +1,170 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const BooleanAnswer: z.ZodObject<{
|
|
2
|
+
export declare const BooleanAnswer: z.ZodObject<{
|
|
3
|
+
meta: z.ZodObject<{
|
|
4
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
schemaVersion: "1.0";
|
|
7
|
+
}, {
|
|
8
|
+
schemaVersion: "1.0";
|
|
9
|
+
}>;
|
|
10
|
+
} & {
|
|
3
11
|
type: z.ZodLiteral<"boolean">;
|
|
4
12
|
answer: z.ZodBoolean;
|
|
5
13
|
}, "strip", z.ZodTypeAny, {
|
|
6
14
|
type: "boolean";
|
|
15
|
+
meta: {
|
|
16
|
+
schemaVersion: "1.0";
|
|
17
|
+
};
|
|
7
18
|
answer: boolean;
|
|
8
19
|
}, {
|
|
9
20
|
type: "boolean";
|
|
21
|
+
meta: {
|
|
22
|
+
schemaVersion: "1.0";
|
|
23
|
+
};
|
|
10
24
|
answer: boolean;
|
|
11
25
|
}>;
|
|
12
|
-
export declare const CurrencyAnswer: z.ZodObject<{
|
|
26
|
+
export declare const CurrencyAnswer: z.ZodObject<{
|
|
27
|
+
meta: z.ZodObject<{
|
|
28
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
schemaVersion: "1.0";
|
|
31
|
+
}, {
|
|
32
|
+
schemaVersion: "1.0";
|
|
33
|
+
}>;
|
|
34
|
+
} & {
|
|
13
35
|
type: z.ZodLiteral<"currency">;
|
|
14
36
|
answer: z.ZodNumber;
|
|
15
37
|
}, "strip", z.ZodTypeAny, {
|
|
16
38
|
type: "currency";
|
|
39
|
+
meta: {
|
|
40
|
+
schemaVersion: "1.0";
|
|
41
|
+
};
|
|
17
42
|
answer: number;
|
|
18
43
|
}, {
|
|
19
44
|
type: "currency";
|
|
45
|
+
meta: {
|
|
46
|
+
schemaVersion: "1.0";
|
|
47
|
+
};
|
|
20
48
|
answer: number;
|
|
21
49
|
}>;
|
|
22
|
-
export declare const EmailAnswer: z.ZodObject<{
|
|
50
|
+
export declare const EmailAnswer: z.ZodObject<{
|
|
51
|
+
meta: z.ZodObject<{
|
|
52
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
schemaVersion: "1.0";
|
|
55
|
+
}, {
|
|
56
|
+
schemaVersion: "1.0";
|
|
57
|
+
}>;
|
|
58
|
+
} & {
|
|
23
59
|
type: z.ZodLiteral<"email">;
|
|
24
60
|
answer: z.ZodString;
|
|
25
61
|
}, "strip", z.ZodTypeAny, {
|
|
26
62
|
type: "email";
|
|
63
|
+
meta: {
|
|
64
|
+
schemaVersion: "1.0";
|
|
65
|
+
};
|
|
27
66
|
answer: string;
|
|
28
67
|
}, {
|
|
29
68
|
type: "email";
|
|
69
|
+
meta: {
|
|
70
|
+
schemaVersion: "1.0";
|
|
71
|
+
};
|
|
30
72
|
answer: string;
|
|
31
73
|
}>;
|
|
32
|
-
export declare const NumberAnswer: z.ZodObject<{
|
|
74
|
+
export declare const NumberAnswer: z.ZodObject<{
|
|
75
|
+
meta: z.ZodObject<{
|
|
76
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
schemaVersion: "1.0";
|
|
79
|
+
}, {
|
|
80
|
+
schemaVersion: "1.0";
|
|
81
|
+
}>;
|
|
82
|
+
} & {
|
|
33
83
|
type: z.ZodLiteral<"number">;
|
|
34
84
|
answer: z.ZodNumber;
|
|
35
85
|
}, "strip", z.ZodTypeAny, {
|
|
36
86
|
type: "number";
|
|
87
|
+
meta: {
|
|
88
|
+
schemaVersion: "1.0";
|
|
89
|
+
};
|
|
37
90
|
answer: number;
|
|
38
91
|
}, {
|
|
39
92
|
type: "number";
|
|
93
|
+
meta: {
|
|
94
|
+
schemaVersion: "1.0";
|
|
95
|
+
};
|
|
40
96
|
answer: number;
|
|
41
97
|
}>;
|
|
42
|
-
export declare const TextAnswer: z.ZodObject<{
|
|
98
|
+
export declare const TextAnswer: z.ZodObject<{
|
|
99
|
+
meta: z.ZodObject<{
|
|
100
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
schemaVersion: "1.0";
|
|
103
|
+
}, {
|
|
104
|
+
schemaVersion: "1.0";
|
|
105
|
+
}>;
|
|
106
|
+
} & {
|
|
43
107
|
type: z.ZodLiteral<"text">;
|
|
44
108
|
answer: z.ZodString;
|
|
45
109
|
}, "strip", z.ZodTypeAny, {
|
|
46
110
|
type: "text";
|
|
111
|
+
meta: {
|
|
112
|
+
schemaVersion: "1.0";
|
|
113
|
+
};
|
|
47
114
|
answer: string;
|
|
48
115
|
}, {
|
|
49
116
|
type: "text";
|
|
117
|
+
meta: {
|
|
118
|
+
schemaVersion: "1.0";
|
|
119
|
+
};
|
|
50
120
|
answer: string;
|
|
51
121
|
}>;
|
|
52
|
-
export declare const TextAreaAnswer: z.ZodObject<{
|
|
122
|
+
export declare const TextAreaAnswer: z.ZodObject<{
|
|
123
|
+
meta: z.ZodObject<{
|
|
124
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
schemaVersion: "1.0";
|
|
127
|
+
}, {
|
|
128
|
+
schemaVersion: "1.0";
|
|
129
|
+
}>;
|
|
130
|
+
} & {
|
|
53
131
|
type: z.ZodLiteral<"textArea">;
|
|
54
132
|
answer: z.ZodString;
|
|
55
133
|
}, "strip", z.ZodTypeAny, {
|
|
56
134
|
type: "textArea";
|
|
135
|
+
meta: {
|
|
136
|
+
schemaVersion: "1.0";
|
|
137
|
+
};
|
|
57
138
|
answer: string;
|
|
58
139
|
}, {
|
|
59
140
|
type: "textArea";
|
|
141
|
+
meta: {
|
|
142
|
+
schemaVersion: "1.0";
|
|
143
|
+
};
|
|
60
144
|
answer: string;
|
|
61
145
|
}>;
|
|
62
|
-
export declare const URLAnswer: z.ZodObject<{
|
|
146
|
+
export declare const URLAnswer: z.ZodObject<{
|
|
147
|
+
meta: z.ZodObject<{
|
|
148
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
schemaVersion: "1.0";
|
|
151
|
+
}, {
|
|
152
|
+
schemaVersion: "1.0";
|
|
153
|
+
}>;
|
|
154
|
+
} & {
|
|
63
155
|
type: z.ZodLiteral<"url">;
|
|
64
156
|
answer: z.ZodString;
|
|
65
157
|
}, "strip", z.ZodTypeAny, {
|
|
66
158
|
type: "url";
|
|
159
|
+
meta: {
|
|
160
|
+
schemaVersion: "1.0";
|
|
161
|
+
};
|
|
67
162
|
answer: string;
|
|
68
163
|
}, {
|
|
69
164
|
type: "url";
|
|
165
|
+
meta: {
|
|
166
|
+
schemaVersion: "1.0";
|
|
167
|
+
};
|
|
70
168
|
answer: string;
|
|
71
169
|
}>;
|
|
72
170
|
export type BooleanAnswerType = z.infer<typeof BooleanAnswer>;
|