@dmptool/types 1.0.0 → 1.0.1
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 +33 -2
- package/dist/answers/__tests__/answers.spec.d.ts +1 -0
- package/dist/answers/__tests__/answers.spec.js +122 -0
- package/dist/answers/answer.d.ts +12 -0
- package/dist/answers/answer.js +10 -0
- package/dist/answers/dateAnswers.d.ts +39 -0
- package/dist/answers/dateAnswers.js +16 -0
- package/dist/answers/graphQLAnswers.d.ts +23 -0
- package/dist/answers/graphQLAnswers.js +14 -0
- package/dist/{answers.d.ts → answers/index.d.ts} +102 -268
- package/dist/answers/index.js +48 -0
- package/dist/answers/optionBasedAnswers.d.ts +34 -0
- package/dist/answers/optionBasedAnswers.js +18 -0
- package/dist/answers/primitiveAnswers.d.ts +78 -0
- package/dist/answers/primitiveAnswers.js +34 -0
- package/dist/answers/tableAnswers.d.ts +388 -0
- package/dist/answers/tableAnswers.js +31 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19 -0
- package/dist/questions/__tests__/dateQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/dateQuestions.spec.js +149 -0
- package/dist/questions/__tests__/graphQLQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/graphQLQuestions.spec.js +87 -0
- package/dist/questions/__tests__/optionBasedQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +152 -0
- package/dist/questions/__tests__/primitiveQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/primitiveQuestions.spec.js +189 -0
- package/dist/{dateQuestions.js → questions/dateQuestions.js} +3 -3
- package/dist/{graphQLQuestions.js → questions/graphQLQuestions.js} +3 -3
- package/dist/{tableQuestions.d.ts → questions/index.d.ts} +97 -1650
- package/dist/questions/index.js +48 -0
- package/dist/{optionBasedQuestions.js → questions/optionBasedQuestions.js} +4 -4
- package/dist/{primitiveQuestions.d.ts → questions/primitiveQuestions.d.ts} +0 -27
- package/dist/{primitiveQuestions.js → questions/primitiveQuestions.js} +8 -35
- package/dist/questions/question.d.ts +29 -0
- package/dist/questions/question.js +32 -0
- package/dist/questions/tableQuestions.d.ts +2638 -0
- package/dist/{tableQuestions.js → questions/tableQuestions.js} +5 -22
- package/dist/schemas/anyAnswer.schema.json +110 -47
- package/dist/schemas/anyTableColumnAnswer.schema.json +267 -0
- package/dist/schemas/anyTableColumnQuestion.schema.json +637 -0
- package/dist/schemas/tableAnswer.schema.json +2 -2
- package/package.json +8 -1
- package/dist/answers.js +0 -87
- /package/dist/{dateQuestions.d.ts → questions/dateQuestions.d.ts} +0 -0
- /package/dist/{graphQLQuestions.d.ts → questions/graphQLQuestions.d.ts} +0 -0
- /package/dist/{optionBasedQuestions.d.ts → questions/optionBasedQuestions.d.ts} +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export
|
|
2
|
+
export * from './answer';
|
|
3
|
+
export * from './dateAnswers';
|
|
4
|
+
export * from './graphQLAnswers';
|
|
5
|
+
export * from './optionBasedAnswers';
|
|
6
|
+
export * from './primitiveAnswers';
|
|
7
|
+
export * from './tableAnswers';
|
|
8
|
+
export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{} & {
|
|
3
9
|
type: z.ZodLiteral<"boolean">;
|
|
4
10
|
answer: z.ZodBoolean;
|
|
5
11
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -8,163 +14,7 @@ export declare const BooleanAnswer: z.ZodObject<{
|
|
|
8
14
|
}, {
|
|
9
15
|
type: "boolean";
|
|
10
16
|
answer: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const CheckboxesAnswer: z.ZodObject<{
|
|
13
|
-
type: z.ZodLiteral<"checkBoxes">;
|
|
14
|
-
answer: z.ZodArray<z.ZodString, "many">;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
type: "checkBoxes";
|
|
17
|
-
answer: string[];
|
|
18
|
-
}, {
|
|
19
|
-
type: "checkBoxes";
|
|
20
|
-
answer: string[];
|
|
21
|
-
}>;
|
|
22
|
-
export declare const CurrencyAnswer: z.ZodObject<{
|
|
23
|
-
type: z.ZodLiteral<"currency">;
|
|
24
|
-
answer: z.ZodNumber;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
type: "currency";
|
|
27
|
-
answer: number;
|
|
28
|
-
}, {
|
|
29
|
-
type: "currency";
|
|
30
|
-
answer: number;
|
|
31
|
-
}>;
|
|
32
|
-
export declare const DatePickerAnswer: z.ZodObject<{
|
|
33
|
-
answer: z.ZodString;
|
|
34
|
-
} & {
|
|
35
|
-
type: z.ZodLiteral<"datePicker">;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
type: "datePicker";
|
|
38
|
-
answer: string;
|
|
39
|
-
}, {
|
|
40
|
-
type: "datePicker";
|
|
41
|
-
answer: string;
|
|
42
|
-
}>;
|
|
43
|
-
export declare const DateRangeAnswer: z.ZodObject<{} & {
|
|
44
|
-
type: z.ZodLiteral<"dateRange">;
|
|
45
|
-
answer: z.ZodObject<{
|
|
46
|
-
start: z.ZodString;
|
|
47
|
-
end: z.ZodString;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
start: string;
|
|
50
|
-
end: string;
|
|
51
|
-
}, {
|
|
52
|
-
start: string;
|
|
53
|
-
end: string;
|
|
54
|
-
}>;
|
|
55
|
-
}, "strip", z.ZodTypeAny, {
|
|
56
|
-
type: "dateRange";
|
|
57
|
-
answer: {
|
|
58
|
-
start: string;
|
|
59
|
-
end: string;
|
|
60
|
-
};
|
|
61
|
-
}, {
|
|
62
|
-
type: "dateRange";
|
|
63
|
-
answer: {
|
|
64
|
-
start: string;
|
|
65
|
-
end: string;
|
|
66
|
-
};
|
|
67
|
-
}>;
|
|
68
|
-
export declare const EmailAnswer: z.ZodObject<{
|
|
69
|
-
type: z.ZodLiteral<"email">;
|
|
70
|
-
answer: z.ZodString;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
type: "email";
|
|
73
|
-
answer: string;
|
|
74
|
-
}, {
|
|
75
|
-
type: "email";
|
|
76
|
-
answer: string;
|
|
77
|
-
}>;
|
|
78
|
-
export declare const FilteredSearchAnswer: z.ZodObject<{} & {
|
|
79
|
-
type: z.ZodLiteral<"filteredSearch">;
|
|
80
|
-
answer: z.ZodArray<z.ZodString, "many">;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
type: "filteredSearch";
|
|
83
|
-
answer: string[];
|
|
84
|
-
}, {
|
|
85
|
-
type: "filteredSearch";
|
|
86
|
-
answer: string[];
|
|
87
|
-
}>;
|
|
88
|
-
export declare const NumberAnswer: z.ZodObject<{
|
|
89
|
-
type: z.ZodLiteral<"number">;
|
|
90
|
-
answer: z.ZodNumber;
|
|
91
|
-
}, "strip", z.ZodTypeAny, {
|
|
92
|
-
type: "number";
|
|
93
|
-
answer: number;
|
|
94
|
-
}, {
|
|
95
|
-
type: "number";
|
|
96
|
-
answer: number;
|
|
97
|
-
}>;
|
|
98
|
-
export declare const RadioButtonsAnswer: z.ZodObject<{
|
|
99
|
-
type: z.ZodLiteral<"radioButtons">;
|
|
100
|
-
answer: z.ZodString;
|
|
101
|
-
}, "strip", z.ZodTypeAny, {
|
|
102
|
-
type: "radioButtons";
|
|
103
|
-
answer: string;
|
|
104
|
-
}, {
|
|
105
|
-
type: "radioButtons";
|
|
106
|
-
answer: string;
|
|
107
|
-
}>;
|
|
108
|
-
export declare const SelectBoxAnswer: z.ZodObject<{
|
|
109
|
-
type: z.ZodLiteral<"selectBox">;
|
|
110
|
-
answer: z.ZodString;
|
|
111
|
-
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
type: "selectBox";
|
|
113
|
-
answer: string;
|
|
114
|
-
}, {
|
|
115
|
-
type: "selectBox";
|
|
116
|
-
answer: string;
|
|
117
|
-
}>;
|
|
118
|
-
export declare const TextAnswer: z.ZodObject<{
|
|
119
|
-
type: z.ZodLiteral<"text">;
|
|
120
|
-
answer: z.ZodString;
|
|
121
|
-
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
type: "text";
|
|
123
|
-
answer: string;
|
|
124
|
-
}, {
|
|
125
|
-
type: "text";
|
|
126
|
-
answer: string;
|
|
127
|
-
}>;
|
|
128
|
-
export declare const TextAreaAnswer: z.ZodObject<{
|
|
129
|
-
type: z.ZodLiteral<"textArea">;
|
|
130
|
-
answer: z.ZodString;
|
|
131
|
-
}, "strip", z.ZodTypeAny, {
|
|
132
|
-
type: "textArea";
|
|
133
|
-
answer: string;
|
|
134
|
-
}, {
|
|
135
|
-
type: "textArea";
|
|
136
|
-
answer: string;
|
|
137
|
-
}>;
|
|
138
|
-
export declare const TypeaheadSearchAnswer: z.ZodObject<{
|
|
139
|
-
type: z.ZodLiteral<"typeaheadSearch">;
|
|
140
|
-
answer: z.ZodString;
|
|
141
|
-
}, "strip", z.ZodTypeAny, {
|
|
142
|
-
type: "typeaheadSearch";
|
|
143
|
-
answer: string;
|
|
144
|
-
}, {
|
|
145
|
-
type: "typeaheadSearch";
|
|
146
|
-
answer: string;
|
|
147
|
-
}>;
|
|
148
|
-
export declare const URLAnswer: z.ZodObject<{
|
|
149
|
-
type: z.ZodLiteral<"url">;
|
|
150
|
-
answer: z.ZodString;
|
|
151
|
-
}, "strip", z.ZodTypeAny, {
|
|
152
|
-
type: "url";
|
|
153
|
-
answer: string;
|
|
154
|
-
}, {
|
|
155
|
-
type: "url";
|
|
156
|
-
answer: string;
|
|
157
|
-
}>;
|
|
158
|
-
export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
159
|
-
type: z.ZodLiteral<"boolean">;
|
|
160
|
-
answer: z.ZodBoolean;
|
|
161
|
-
}, "strip", z.ZodTypeAny, {
|
|
162
|
-
type: "boolean";
|
|
163
|
-
answer: boolean;
|
|
164
|
-
}, {
|
|
165
|
-
type: "boolean";
|
|
166
|
-
answer: boolean;
|
|
167
|
-
}>, z.ZodObject<{
|
|
17
|
+
}>, z.ZodObject<{} & {
|
|
168
18
|
type: z.ZodLiteral<"checkBoxes">;
|
|
169
19
|
answer: z.ZodArray<z.ZodString, "many">;
|
|
170
20
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -173,7 +23,7 @@ export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
173
23
|
}, {
|
|
174
24
|
type: "checkBoxes";
|
|
175
25
|
answer: string[];
|
|
176
|
-
}>, z.ZodObject<{
|
|
26
|
+
}>, z.ZodObject<{} & {
|
|
177
27
|
type: z.ZodLiteral<"currency">;
|
|
178
28
|
answer: z.ZodNumber;
|
|
179
29
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -216,7 +66,7 @@ export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
216
66
|
start: string;
|
|
217
67
|
end: string;
|
|
218
68
|
};
|
|
219
|
-
}>, z.ZodObject<{
|
|
69
|
+
}>, z.ZodObject<{} & {
|
|
220
70
|
type: z.ZodLiteral<"email">;
|
|
221
71
|
answer: z.ZodString;
|
|
222
72
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -234,7 +84,7 @@ export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
234
84
|
}, {
|
|
235
85
|
type: "filteredSearch";
|
|
236
86
|
answer: string[];
|
|
237
|
-
}>, z.ZodObject<{
|
|
87
|
+
}>, z.ZodObject<{} & {
|
|
238
88
|
type: z.ZodLiteral<"number">;
|
|
239
89
|
answer: z.ZodNumber;
|
|
240
90
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -243,7 +93,7 @@ export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
243
93
|
}, {
|
|
244
94
|
type: "number";
|
|
245
95
|
answer: number;
|
|
246
|
-
}>, z.ZodObject<{
|
|
96
|
+
}>, z.ZodObject<{} & {
|
|
247
97
|
type: z.ZodLiteral<"radioButtons">;
|
|
248
98
|
answer: z.ZodString;
|
|
249
99
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -252,7 +102,7 @@ export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
252
102
|
}, {
|
|
253
103
|
type: "radioButtons";
|
|
254
104
|
answer: string;
|
|
255
|
-
}>, z.ZodObject<{
|
|
105
|
+
}>, z.ZodObject<{} & {
|
|
256
106
|
type: z.ZodLiteral<"selectBox">;
|
|
257
107
|
answer: z.ZodString;
|
|
258
108
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -261,46 +111,9 @@ export declare const AnyAnswer: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
261
111
|
}, {
|
|
262
112
|
type: "selectBox";
|
|
263
113
|
answer: string;
|
|
264
|
-
}>, z.ZodObject<{
|
|
265
|
-
type: z.ZodLiteral<"textArea">;
|
|
266
|
-
answer: z.ZodString;
|
|
267
|
-
}, "strip", z.ZodTypeAny, {
|
|
268
|
-
type: "textArea";
|
|
269
|
-
answer: string;
|
|
270
|
-
}, {
|
|
271
|
-
type: "textArea";
|
|
272
|
-
answer: string;
|
|
273
|
-
}>, z.ZodObject<{
|
|
274
|
-
type: z.ZodLiteral<"text">;
|
|
275
|
-
answer: z.ZodString;
|
|
276
|
-
}, "strip", z.ZodTypeAny, {
|
|
277
|
-
type: "text";
|
|
278
|
-
answer: string;
|
|
279
|
-
}, {
|
|
280
|
-
type: "text";
|
|
281
|
-
answer: string;
|
|
282
|
-
}>, z.ZodObject<{
|
|
283
|
-
type: z.ZodLiteral<"typeaheadSearch">;
|
|
284
|
-
answer: z.ZodString;
|
|
285
|
-
}, "strip", z.ZodTypeAny, {
|
|
286
|
-
type: "typeaheadSearch";
|
|
287
|
-
answer: string;
|
|
288
|
-
}, {
|
|
289
|
-
type: "typeaheadSearch";
|
|
290
|
-
answer: string;
|
|
291
|
-
}>, z.ZodObject<{
|
|
292
|
-
type: z.ZodLiteral<"url">;
|
|
293
|
-
answer: z.ZodString;
|
|
294
|
-
}, "strip", z.ZodTypeAny, {
|
|
295
|
-
type: "url";
|
|
296
|
-
answer: string;
|
|
297
|
-
}, {
|
|
298
|
-
type: "url";
|
|
299
|
-
answer: string;
|
|
300
|
-
}>]>;
|
|
301
|
-
export declare const TableAnswer: z.ZodObject<{
|
|
114
|
+
}>, z.ZodObject<{} & {
|
|
302
115
|
type: z.ZodLiteral<"table">;
|
|
303
|
-
answer: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
116
|
+
answer: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{} & {
|
|
304
117
|
type: z.ZodLiteral<"boolean">;
|
|
305
118
|
answer: z.ZodBoolean;
|
|
306
119
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -309,7 +122,7 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
309
122
|
}, {
|
|
310
123
|
type: "boolean";
|
|
311
124
|
answer: boolean;
|
|
312
|
-
}>, z.ZodObject<{
|
|
125
|
+
}>, z.ZodObject<{} & {
|
|
313
126
|
type: z.ZodLiteral<"checkBoxes">;
|
|
314
127
|
answer: z.ZodArray<z.ZodString, "many">;
|
|
315
128
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -318,7 +131,7 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
318
131
|
}, {
|
|
319
132
|
type: "checkBoxes";
|
|
320
133
|
answer: string[];
|
|
321
|
-
}>, z.ZodObject<{
|
|
134
|
+
}>, z.ZodObject<{} & {
|
|
322
135
|
type: z.ZodLiteral<"currency">;
|
|
323
136
|
answer: z.ZodNumber;
|
|
324
137
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -361,7 +174,7 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
361
174
|
start: string;
|
|
362
175
|
end: string;
|
|
363
176
|
};
|
|
364
|
-
}>, z.ZodObject<{
|
|
177
|
+
}>, z.ZodObject<{} & {
|
|
365
178
|
type: z.ZodLiteral<"email">;
|
|
366
179
|
answer: z.ZodString;
|
|
367
180
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -379,7 +192,7 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
379
192
|
}, {
|
|
380
193
|
type: "filteredSearch";
|
|
381
194
|
answer: string[];
|
|
382
|
-
}>, z.ZodObject<{
|
|
195
|
+
}>, z.ZodObject<{} & {
|
|
383
196
|
type: z.ZodLiteral<"number">;
|
|
384
197
|
answer: z.ZodNumber;
|
|
385
198
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -388,7 +201,7 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
388
201
|
}, {
|
|
389
202
|
type: "number";
|
|
390
203
|
answer: number;
|
|
391
|
-
}>, z.ZodObject<{
|
|
204
|
+
}>, z.ZodObject<{} & {
|
|
392
205
|
type: z.ZodLiteral<"radioButtons">;
|
|
393
206
|
answer: z.ZodString;
|
|
394
207
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -397,7 +210,7 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
397
210
|
}, {
|
|
398
211
|
type: "radioButtons";
|
|
399
212
|
answer: string;
|
|
400
|
-
}>, z.ZodObject<{
|
|
213
|
+
}>, z.ZodObject<{} & {
|
|
401
214
|
type: z.ZodLiteral<"selectBox">;
|
|
402
215
|
answer: z.ZodString;
|
|
403
216
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -406,25 +219,25 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
406
219
|
}, {
|
|
407
220
|
type: "selectBox";
|
|
408
221
|
answer: string;
|
|
409
|
-
}>, z.ZodObject<{
|
|
410
|
-
type: z.ZodLiteral<"
|
|
222
|
+
}>, z.ZodObject<{} & {
|
|
223
|
+
type: z.ZodLiteral<"text">;
|
|
411
224
|
answer: z.ZodString;
|
|
412
225
|
}, "strip", z.ZodTypeAny, {
|
|
413
|
-
type: "
|
|
226
|
+
type: "text";
|
|
414
227
|
answer: string;
|
|
415
228
|
}, {
|
|
416
|
-
type: "
|
|
229
|
+
type: "text";
|
|
417
230
|
answer: string;
|
|
418
|
-
}>, z.ZodObject<{
|
|
419
|
-
type: z.ZodLiteral<"
|
|
231
|
+
}>, z.ZodObject<{} & {
|
|
232
|
+
type: z.ZodLiteral<"textArea">;
|
|
420
233
|
answer: z.ZodString;
|
|
421
234
|
}, "strip", z.ZodTypeAny, {
|
|
422
|
-
type: "
|
|
235
|
+
type: "textArea";
|
|
423
236
|
answer: string;
|
|
424
237
|
}, {
|
|
425
|
-
type: "
|
|
238
|
+
type: "textArea";
|
|
426
239
|
answer: string;
|
|
427
|
-
}>, z.ZodObject<{
|
|
240
|
+
}>, z.ZodObject<{} & {
|
|
428
241
|
type: z.ZodLiteral<"typeaheadSearch">;
|
|
429
242
|
answer: z.ZodString;
|
|
430
243
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -433,7 +246,7 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
433
246
|
}, {
|
|
434
247
|
type: "typeaheadSearch";
|
|
435
248
|
answer: string;
|
|
436
|
-
}>, z.ZodObject<{
|
|
249
|
+
}>, z.ZodObject<{} & {
|
|
437
250
|
type: z.ZodLiteral<"url">;
|
|
438
251
|
answer: z.ZodString;
|
|
439
252
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -446,15 +259,6 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
446
259
|
}, "strip", z.ZodTypeAny, {
|
|
447
260
|
type: "table";
|
|
448
261
|
answer: ({
|
|
449
|
-
type: "boolean";
|
|
450
|
-
answer: boolean;
|
|
451
|
-
} | {
|
|
452
|
-
type: "checkBoxes";
|
|
453
|
-
answer: string[];
|
|
454
|
-
} | {
|
|
455
|
-
type: "currency";
|
|
456
|
-
answer: number;
|
|
457
|
-
} | {
|
|
458
262
|
type: "datePicker";
|
|
459
263
|
answer: string;
|
|
460
264
|
} | {
|
|
@@ -463,15 +267,15 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
463
267
|
start: string;
|
|
464
268
|
end: string;
|
|
465
269
|
};
|
|
466
|
-
} | {
|
|
467
|
-
type: "email";
|
|
468
|
-
answer: string;
|
|
469
270
|
} | {
|
|
470
271
|
type: "filteredSearch";
|
|
471
272
|
answer: string[];
|
|
472
273
|
} | {
|
|
473
|
-
type: "
|
|
474
|
-
answer:
|
|
274
|
+
type: "typeaheadSearch";
|
|
275
|
+
answer: string;
|
|
276
|
+
} | {
|
|
277
|
+
type: "checkBoxes";
|
|
278
|
+
answer: string[];
|
|
475
279
|
} | {
|
|
476
280
|
type: "radioButtons";
|
|
477
281
|
answer: string;
|
|
@@ -479,13 +283,22 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
479
283
|
type: "selectBox";
|
|
480
284
|
answer: string;
|
|
481
285
|
} | {
|
|
482
|
-
type: "
|
|
286
|
+
type: "boolean";
|
|
287
|
+
answer: boolean;
|
|
288
|
+
} | {
|
|
289
|
+
type: "currency";
|
|
290
|
+
answer: number;
|
|
291
|
+
} | {
|
|
292
|
+
type: "email";
|
|
483
293
|
answer: string;
|
|
484
294
|
} | {
|
|
485
|
-
type: "
|
|
295
|
+
type: "number";
|
|
296
|
+
answer: number;
|
|
297
|
+
} | {
|
|
298
|
+
type: "text";
|
|
486
299
|
answer: string;
|
|
487
300
|
} | {
|
|
488
|
-
type: "
|
|
301
|
+
type: "textArea";
|
|
489
302
|
answer: string;
|
|
490
303
|
} | {
|
|
491
304
|
type: "url";
|
|
@@ -494,15 +307,6 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
494
307
|
}, {
|
|
495
308
|
type: "table";
|
|
496
309
|
answer: ({
|
|
497
|
-
type: "boolean";
|
|
498
|
-
answer: boolean;
|
|
499
|
-
} | {
|
|
500
|
-
type: "checkBoxes";
|
|
501
|
-
answer: string[];
|
|
502
|
-
} | {
|
|
503
|
-
type: "currency";
|
|
504
|
-
answer: number;
|
|
505
|
-
} | {
|
|
506
310
|
type: "datePicker";
|
|
507
311
|
answer: string;
|
|
508
312
|
} | {
|
|
@@ -511,15 +315,15 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
511
315
|
start: string;
|
|
512
316
|
end: string;
|
|
513
317
|
};
|
|
514
|
-
} | {
|
|
515
|
-
type: "email";
|
|
516
|
-
answer: string;
|
|
517
318
|
} | {
|
|
518
319
|
type: "filteredSearch";
|
|
519
320
|
answer: string[];
|
|
520
321
|
} | {
|
|
521
|
-
type: "
|
|
522
|
-
answer:
|
|
322
|
+
type: "typeaheadSearch";
|
|
323
|
+
answer: string;
|
|
324
|
+
} | {
|
|
325
|
+
type: "checkBoxes";
|
|
326
|
+
answer: string[];
|
|
523
327
|
} | {
|
|
524
328
|
type: "radioButtons";
|
|
525
329
|
answer: string;
|
|
@@ -527,32 +331,62 @@ export declare const TableAnswer: z.ZodObject<{
|
|
|
527
331
|
type: "selectBox";
|
|
528
332
|
answer: string;
|
|
529
333
|
} | {
|
|
530
|
-
type: "
|
|
334
|
+
type: "boolean";
|
|
335
|
+
answer: boolean;
|
|
336
|
+
} | {
|
|
337
|
+
type: "currency";
|
|
338
|
+
answer: number;
|
|
339
|
+
} | {
|
|
340
|
+
type: "email";
|
|
531
341
|
answer: string;
|
|
532
342
|
} | {
|
|
533
|
-
type: "
|
|
343
|
+
type: "number";
|
|
344
|
+
answer: number;
|
|
345
|
+
} | {
|
|
346
|
+
type: "text";
|
|
534
347
|
answer: string;
|
|
535
348
|
} | {
|
|
536
|
-
type: "
|
|
349
|
+
type: "textArea";
|
|
537
350
|
answer: string;
|
|
538
351
|
} | {
|
|
539
352
|
type: "url";
|
|
540
353
|
answer: string;
|
|
541
354
|
})[];
|
|
542
|
-
}
|
|
355
|
+
}>, z.ZodObject<{} & {
|
|
356
|
+
type: z.ZodLiteral<"text">;
|
|
357
|
+
answer: z.ZodString;
|
|
358
|
+
}, "strip", z.ZodTypeAny, {
|
|
359
|
+
type: "text";
|
|
360
|
+
answer: string;
|
|
361
|
+
}, {
|
|
362
|
+
type: "text";
|
|
363
|
+
answer: string;
|
|
364
|
+
}>, z.ZodObject<{} & {
|
|
365
|
+
type: z.ZodLiteral<"textArea">;
|
|
366
|
+
answer: z.ZodString;
|
|
367
|
+
}, "strip", z.ZodTypeAny, {
|
|
368
|
+
type: "textArea";
|
|
369
|
+
answer: string;
|
|
370
|
+
}, {
|
|
371
|
+
type: "textArea";
|
|
372
|
+
answer: string;
|
|
373
|
+
}>, z.ZodObject<{} & {
|
|
374
|
+
type: z.ZodLiteral<"typeaheadSearch">;
|
|
375
|
+
answer: z.ZodString;
|
|
376
|
+
}, "strip", z.ZodTypeAny, {
|
|
377
|
+
type: "typeaheadSearch";
|
|
378
|
+
answer: string;
|
|
379
|
+
}, {
|
|
380
|
+
type: "typeaheadSearch";
|
|
381
|
+
answer: string;
|
|
382
|
+
}>, z.ZodObject<{} & {
|
|
383
|
+
type: z.ZodLiteral<"url">;
|
|
384
|
+
answer: z.ZodString;
|
|
385
|
+
}, "strip", z.ZodTypeAny, {
|
|
386
|
+
type: "url";
|
|
387
|
+
answer: string;
|
|
388
|
+
}, {
|
|
389
|
+
type: "url";
|
|
390
|
+
answer: string;
|
|
391
|
+
}>]>;
|
|
543
392
|
export type AnyAnswerType = z.infer<typeof AnyAnswer>;
|
|
544
|
-
export type BooleanAnswerType = z.infer<typeof BooleanAnswer>;
|
|
545
|
-
export type CheckboxesAnswerType = z.infer<typeof CheckboxesAnswer>;
|
|
546
|
-
export type CurrencyAnswerType = z.infer<typeof CurrencyAnswer>;
|
|
547
|
-
export type DatePickerAnswerType = z.infer<typeof DatePickerAnswer>;
|
|
548
|
-
export type DateRangeAnswerType = z.infer<typeof DateRangeAnswer>;
|
|
549
|
-
export type EmailAnswerType = z.infer<typeof EmailAnswer>;
|
|
550
|
-
export type FilteredSearchAnswerType = z.infer<typeof FilteredSearchAnswer>;
|
|
551
|
-
export type NumberAnswerType = z.infer<typeof NumberAnswer>;
|
|
552
|
-
export type RadioButtonsAnswerType = z.infer<typeof RadioButtonsAnswer>;
|
|
553
|
-
export type SelectBoxAnswerType = z.infer<typeof SelectBoxAnswer>;
|
|
554
|
-
export type TableAnswerType = z.infer<typeof TableAnswer>;
|
|
555
|
-
export type TextAnswerType = z.infer<typeof TextAnswer>;
|
|
556
|
-
export type TextAreaAnswerType = z.infer<typeof TextAreaAnswer>;
|
|
557
|
-
export type TypeaheadSearchAnswerType = z.infer<typeof TypeaheadSearchAnswer>;
|
|
558
|
-
export type URLAnswerType = z.infer<typeof URLAnswer>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.AnyAnswer = void 0;
|
|
18
|
+
const zod_1 = require("zod");
|
|
19
|
+
const dateAnswers_1 = require("./dateAnswers");
|
|
20
|
+
const graphQLAnswers_1 = require("./graphQLAnswers");
|
|
21
|
+
const optionBasedAnswers_1 = require("./optionBasedAnswers");
|
|
22
|
+
const primitiveAnswers_1 = require("./primitiveAnswers");
|
|
23
|
+
const tableAnswers_1 = require("./tableAnswers");
|
|
24
|
+
// reexport everything
|
|
25
|
+
__exportStar(require("./answer"), exports);
|
|
26
|
+
__exportStar(require("./dateAnswers"), exports);
|
|
27
|
+
__exportStar(require("./graphQLAnswers"), exports);
|
|
28
|
+
__exportStar(require("./optionBasedAnswers"), exports);
|
|
29
|
+
__exportStar(require("./primitiveAnswers"), exports);
|
|
30
|
+
__exportStar(require("./tableAnswers"), exports);
|
|
31
|
+
// Union of all possible answers
|
|
32
|
+
exports.AnyAnswer = zod_1.z.discriminatedUnion('type', [
|
|
33
|
+
primitiveAnswers_1.BooleanAnswer,
|
|
34
|
+
optionBasedAnswers_1.CheckboxesAnswer,
|
|
35
|
+
primitiveAnswers_1.CurrencyAnswer,
|
|
36
|
+
dateAnswers_1.DatePickerAnswer,
|
|
37
|
+
dateAnswers_1.DateRangeAnswer,
|
|
38
|
+
primitiveAnswers_1.EmailAnswer,
|
|
39
|
+
graphQLAnswers_1.FilteredSearchAnswer,
|
|
40
|
+
primitiveAnswers_1.NumberAnswer,
|
|
41
|
+
optionBasedAnswers_1.RadioButtonsAnswer,
|
|
42
|
+
optionBasedAnswers_1.SelectBoxAnswer,
|
|
43
|
+
tableAnswers_1.TableAnswer,
|
|
44
|
+
primitiveAnswers_1.TextAnswer,
|
|
45
|
+
primitiveAnswers_1.TextAreaAnswer,
|
|
46
|
+
graphQLAnswers_1.TypeaheadSearchAnswer,
|
|
47
|
+
primitiveAnswers_1.URLAnswer
|
|
48
|
+
]);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CheckboxesAnswer: z.ZodObject<{} & {
|
|
3
|
+
type: z.ZodLiteral<"checkBoxes">;
|
|
4
|
+
answer: z.ZodArray<z.ZodString, "many">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
type: "checkBoxes";
|
|
7
|
+
answer: string[];
|
|
8
|
+
}, {
|
|
9
|
+
type: "checkBoxes";
|
|
10
|
+
answer: string[];
|
|
11
|
+
}>;
|
|
12
|
+
export declare const RadioButtonsAnswer: z.ZodObject<{} & {
|
|
13
|
+
type: z.ZodLiteral<"radioButtons">;
|
|
14
|
+
answer: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
type: "radioButtons";
|
|
17
|
+
answer: string;
|
|
18
|
+
}, {
|
|
19
|
+
type: "radioButtons";
|
|
20
|
+
answer: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const SelectBoxAnswer: z.ZodObject<{} & {
|
|
23
|
+
type: z.ZodLiteral<"selectBox">;
|
|
24
|
+
answer: z.ZodString;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: "selectBox";
|
|
27
|
+
answer: string;
|
|
28
|
+
}, {
|
|
29
|
+
type: "selectBox";
|
|
30
|
+
answer: string;
|
|
31
|
+
}>;
|
|
32
|
+
export type CheckboxesAnswerType = z.infer<typeof CheckboxesAnswer>;
|
|
33
|
+
export type RadioButtonsAnswerType = z.infer<typeof RadioButtonsAnswer>;
|
|
34
|
+
export type SelectBoxAnswerType = z.infer<typeof SelectBoxAnswer>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectBoxAnswer = exports.RadioButtonsAnswer = exports.CheckboxesAnswer = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const answer_1 = require("./answer");
|
|
6
|
+
// Answers to Option Based Question Types
|
|
7
|
+
exports.CheckboxesAnswer = answer_1.Answer.merge(zod_1.z.object({
|
|
8
|
+
type: zod_1.z.literal('checkBoxes'), // The type of answer
|
|
9
|
+
answer: zod_1.z.array(zod_1.z.string()) // The answer to the question (array of strings)
|
|
10
|
+
}));
|
|
11
|
+
exports.RadioButtonsAnswer = answer_1.Answer.merge(zod_1.z.object({
|
|
12
|
+
type: zod_1.z.literal('radioButtons'), // The type of answer
|
|
13
|
+
answer: zod_1.z.string() // The answer to the question (string)
|
|
14
|
+
}));
|
|
15
|
+
exports.SelectBoxAnswer = answer_1.Answer.merge(zod_1.z.object({
|
|
16
|
+
type: zod_1.z.literal('selectBox'), // The type of answer
|
|
17
|
+
answer: zod_1.z.string() // The answer to the question (string)
|
|
18
|
+
}));
|