@dmptool/types 1.0.1 → 1.0.3
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 +65 -60
- package/dist/answers/answer.d.ts +15 -2
- package/dist/answers/answer.js +5 -2
- package/dist/answers/dateAnswers.d.ts +31 -4
- package/dist/answers/dateAnswers.js +3 -3
- package/dist/answers/graphQLAnswers.d.ts +32 -4
- package/dist/answers/graphQLAnswers.js +3 -3
- package/dist/answers/index.d.ts +524 -36
- package/dist/answers/index.js +17 -17
- package/dist/answers/optionBasedAnswers.d.ts +51 -9
- package/dist/answers/optionBasedAnswers.js +5 -5
- package/dist/answers/primitiveAnswers.d.ts +112 -14
- package/dist/answers/primitiveAnswers.js +8 -8
- package/dist/answers/tableAnswers.d.ts +525 -37
- package/dist/answers/tableAnswers.js +18 -18
- package/dist/questions/__tests__/dateQuestions.spec.js +6 -6
- package/dist/questions/__tests__/graphQLQuestions.spec.js +4 -4
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +6 -6
- package/dist/questions/__tests__/primitiveQuestions.spec.js +14 -14
- package/dist/questions/dateQuestions.d.ts +4 -4
- package/dist/questions/dateQuestions.js +5 -5
- package/dist/questions/graphQLQuestions.d.ts +4 -4
- package/dist/questions/graphQLQuestions.js +3 -3
- package/dist/questions/index.d.ts +2 -2
- package/dist/questions/index.js +17 -17
- package/dist/questions/optionBasedQuestions.d.ts +6 -6
- package/dist/questions/optionBasedQuestions.js +11 -11
- package/dist/questions/primitiveQuestions.d.ts +14 -14
- package/dist/questions/primitiveQuestions.js +8 -8
- package/dist/questions/question.d.ts +2 -2
- package/dist/questions/question.js +2 -2
- package/dist/questions/tableQuestions.d.ts +4 -4
- package/dist/questions/tableQuestions.js +18 -18
- 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
package/dist/answers/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.AnyAnswerSchema = void 0;
|
|
18
18
|
const zod_1 = require("zod");
|
|
19
19
|
const dateAnswers_1 = require("./dateAnswers");
|
|
20
20
|
const graphQLAnswers_1 = require("./graphQLAnswers");
|
|
@@ -29,20 +29,20 @@ __exportStar(require("./optionBasedAnswers"), exports);
|
|
|
29
29
|
__exportStar(require("./primitiveAnswers"), exports);
|
|
30
30
|
__exportStar(require("./tableAnswers"), exports);
|
|
31
31
|
// Union of all possible answers
|
|
32
|
-
exports.
|
|
33
|
-
primitiveAnswers_1.
|
|
34
|
-
optionBasedAnswers_1.
|
|
35
|
-
primitiveAnswers_1.
|
|
36
|
-
dateAnswers_1.
|
|
37
|
-
dateAnswers_1.
|
|
38
|
-
primitiveAnswers_1.
|
|
39
|
-
graphQLAnswers_1.
|
|
40
|
-
primitiveAnswers_1.
|
|
41
|
-
optionBasedAnswers_1.
|
|
42
|
-
optionBasedAnswers_1.
|
|
43
|
-
tableAnswers_1.
|
|
44
|
-
primitiveAnswers_1.
|
|
45
|
-
primitiveAnswers_1.
|
|
46
|
-
graphQLAnswers_1.
|
|
47
|
-
primitiveAnswers_1.
|
|
32
|
+
exports.AnyAnswerSchema = zod_1.z.discriminatedUnion('type', [
|
|
33
|
+
primitiveAnswers_1.BooleanAnswerSchema,
|
|
34
|
+
optionBasedAnswers_1.CheckboxesAnswerSchema,
|
|
35
|
+
primitiveAnswers_1.CurrencyAnswerSchema,
|
|
36
|
+
dateAnswers_1.DatePickerAnswerSchema,
|
|
37
|
+
dateAnswers_1.DateRangeAnswerSchema,
|
|
38
|
+
primitiveAnswers_1.EmailAnswerSchema,
|
|
39
|
+
graphQLAnswers_1.FilteredSearchAnswerSchema,
|
|
40
|
+
primitiveAnswers_1.NumberAnswerSchema,
|
|
41
|
+
optionBasedAnswers_1.RadioButtonsAnswerSchema,
|
|
42
|
+
optionBasedAnswers_1.SelectBoxAnswerSchema,
|
|
43
|
+
tableAnswers_1.TableAnswerSchema,
|
|
44
|
+
primitiveAnswers_1.TextAnswerSchema,
|
|
45
|
+
primitiveAnswers_1.TextAreaAnswerSchema,
|
|
46
|
+
graphQLAnswers_1.TypeaheadSearchAnswerSchema,
|
|
47
|
+
primitiveAnswers_1.URLAnswerSchema
|
|
48
48
|
]);
|
|
@@ -1,34 +1,76 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const CheckboxesAnswerSchema: 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
|
|
26
|
+
export declare const RadioButtonsAnswerSchema: 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
|
|
50
|
+
export declare const SelectBoxAnswerSchema: 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
|
-
export type CheckboxesAnswerType = z.infer<typeof
|
|
33
|
-
export type RadioButtonsAnswerType = z.infer<typeof
|
|
34
|
-
export type SelectBoxAnswerType = z.infer<typeof
|
|
74
|
+
export type CheckboxesAnswerType = z.infer<typeof CheckboxesAnswerSchema>;
|
|
75
|
+
export type RadioButtonsAnswerType = z.infer<typeof RadioButtonsAnswerSchema>;
|
|
76
|
+
export type SelectBoxAnswerType = z.infer<typeof SelectBoxAnswerSchema>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SelectBoxAnswerSchema = exports.RadioButtonsAnswerSchema = exports.CheckboxesAnswerSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const answer_1 = require("./answer");
|
|
6
6
|
// Answers to Option Based Question Types
|
|
7
|
-
exports.
|
|
7
|
+
exports.CheckboxesAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
8
8
|
type: zod_1.z.literal('checkBoxes'), // The type of answer
|
|
9
9
|
answer: zod_1.z.array(zod_1.z.string()) // The answer to the question (array of strings)
|
|
10
10
|
}));
|
|
11
|
-
exports.
|
|
11
|
+
exports.RadioButtonsAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
12
12
|
type: zod_1.z.literal('radioButtons'), // The type of answer
|
|
13
13
|
answer: zod_1.z.string() // The answer to the question (string)
|
|
14
14
|
}));
|
|
15
|
-
exports.
|
|
15
|
+
exports.SelectBoxAnswerSchema = answer_1.AnswerSchema.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,78 +1,176 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const BooleanAnswerSchema: 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
|
|
26
|
+
export declare const CurrencyAnswerSchema: 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
|
|
50
|
+
export declare const EmailAnswerSchema: 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
|
|
74
|
+
export declare const NumberAnswerSchema: 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
|
|
98
|
+
export declare const TextAnswerSchema: 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
|
|
122
|
+
export declare const TextAreaAnswerSchema: 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
|
|
146
|
+
export declare const URLAnswerSchema: 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
|
-
export type BooleanAnswerType = z.infer<typeof
|
|
73
|
-
export type CurrencyAnswerType = z.infer<typeof
|
|
74
|
-
export type EmailAnswerType = z.infer<typeof
|
|
75
|
-
export type NumberAnswerType = z.infer<typeof
|
|
76
|
-
export type TextAnswerType = z.infer<typeof
|
|
77
|
-
export type TextAreaAnswerType = z.infer<typeof
|
|
78
|
-
export type URLAnswerType = z.infer<typeof
|
|
170
|
+
export type BooleanAnswerType = z.infer<typeof BooleanAnswerSchema>;
|
|
171
|
+
export type CurrencyAnswerType = z.infer<typeof CurrencyAnswerSchema>;
|
|
172
|
+
export type EmailAnswerType = z.infer<typeof EmailAnswerSchema>;
|
|
173
|
+
export type NumberAnswerType = z.infer<typeof NumberAnswerSchema>;
|
|
174
|
+
export type TextAnswerType = z.infer<typeof TextAnswerSchema>;
|
|
175
|
+
export type TextAreaAnswerType = z.infer<typeof TextAreaAnswerSchema>;
|
|
176
|
+
export type URLAnswerType = z.infer<typeof URLAnswerSchema>;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.URLAnswerSchema = exports.TextAreaAnswerSchema = exports.TextAnswerSchema = exports.NumberAnswerSchema = exports.EmailAnswerSchema = exports.CurrencyAnswerSchema = exports.BooleanAnswerSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const answer_1 = require("./answer");
|
|
6
6
|
// Answers to Primitive Question Types
|
|
7
|
-
exports.
|
|
7
|
+
exports.BooleanAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
8
8
|
type: zod_1.z.literal('boolean'), // The type of answer
|
|
9
9
|
answer: zod_1.z.boolean() // The answer to the question (true/false)
|
|
10
10
|
}));
|
|
11
|
-
exports.
|
|
11
|
+
exports.CurrencyAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
12
12
|
type: zod_1.z.literal('currency'), // The type of answer
|
|
13
13
|
answer: zod_1.z.number() // The answer to the question (number)
|
|
14
14
|
}));
|
|
15
|
-
exports.
|
|
15
|
+
exports.EmailAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
16
16
|
type: zod_1.z.literal('email'), // The type of question
|
|
17
17
|
answer: zod_1.z.string() // The answer to the question (string)
|
|
18
18
|
}));
|
|
19
|
-
exports.
|
|
19
|
+
exports.NumberAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
20
20
|
type: zod_1.z.literal('number'), // The type of answer
|
|
21
21
|
answer: zod_1.z.number() // The answer to the question (number)
|
|
22
22
|
}));
|
|
23
|
-
exports.
|
|
23
|
+
exports.TextAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
24
24
|
type: zod_1.z.literal('text'), // The type of answer
|
|
25
25
|
answer: zod_1.z.string() // The answer to the question (string)
|
|
26
26
|
}));
|
|
27
|
-
exports.
|
|
27
|
+
exports.TextAreaAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
28
28
|
type: zod_1.z.literal('textArea'), // The type of answer
|
|
29
29
|
answer: zod_1.z.string() // The answer to the question (string)
|
|
30
30
|
}));
|
|
31
|
-
exports.
|
|
31
|
+
exports.URLAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
32
32
|
type: zod_1.z.literal('url'), // The type of answer
|
|
33
33
|
answer: zod_1.z.string() // The answer to the question (string)
|
|
34
34
|
}));
|