@u-krupaveho-kraba/form-schemas 0.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/index.js +25 -0
- package/package.json +29 -0
- package/schema/campaign.schema.json +4686 -0
- package/schemas/campaign.js +64 -0
- package/schemas/element.js +88 -0
- package/schemas/elementProperties.js +117 -0
- package/schemas/form.js +33 -0
- package/schemas/formDisplay.js +61 -0
- package/schemas/helpers.js +12 -0
- package/schemas/step.js +15 -0
- package/types/index.d.ts +18 -0
- package/types/schemas/campaign.d.ts +15172 -0
- package/types/schemas/element.d.ts +1503 -0
- package/types/schemas/elementProperties.d.ts +346 -0
- package/types/schemas/form.d.ts +6027 -0
- package/types/schemas/formDisplay.d.ts +278 -0
- package/types/schemas/helpers.d.ts +9 -0
- package/types/schemas/step.d.ts +693 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
export declare const BaseContainerPropertiesSchema: z.ZodMiniObject<{
|
|
3
|
+
hideOnMobile: z.ZodMiniBoolean<boolean>;
|
|
4
|
+
hideOnDesktop: z.ZodMiniBoolean<boolean>;
|
|
5
|
+
padding: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
6
|
+
left: z.ZodMiniNumber<number>;
|
|
7
|
+
right: z.ZodMiniNumber<number>;
|
|
8
|
+
top: z.ZodMiniNumber<number>;
|
|
9
|
+
bottom: z.ZodMiniNumber<number>;
|
|
10
|
+
independent: z.ZodMiniBoolean<boolean>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
border: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
13
|
+
width: z.ZodMiniNumber<number>;
|
|
14
|
+
color: z.ZodMiniTemplateLiteral<`#${string}`>;
|
|
15
|
+
style: z.ZodMiniEnum<{
|
|
16
|
+
none: "none";
|
|
17
|
+
solid: "solid";
|
|
18
|
+
dashed: "dashed";
|
|
19
|
+
dotted: "dotted";
|
|
20
|
+
}>;
|
|
21
|
+
sides: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
22
|
+
left: "left";
|
|
23
|
+
right: "right";
|
|
24
|
+
top: "top";
|
|
25
|
+
bottom: "bottom";
|
|
26
|
+
all: "all";
|
|
27
|
+
}>>;
|
|
28
|
+
useTheme: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
backgroundColor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const BaseElementPropertiesSchema: z.ZodMiniObject<{
|
|
33
|
+
margin: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
34
|
+
left: z.ZodMiniNumber<number>;
|
|
35
|
+
right: z.ZodMiniNumber<number>;
|
|
36
|
+
top: z.ZodMiniNumber<number>;
|
|
37
|
+
bottom: z.ZodMiniNumber<number>;
|
|
38
|
+
independent: z.ZodMiniBoolean<boolean>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
hideOnMobile: z.ZodMiniBoolean<boolean>;
|
|
41
|
+
hideOnDesktop: z.ZodMiniBoolean<boolean>;
|
|
42
|
+
padding: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
43
|
+
left: z.ZodMiniNumber<number>;
|
|
44
|
+
right: z.ZodMiniNumber<number>;
|
|
45
|
+
top: z.ZodMiniNumber<number>;
|
|
46
|
+
bottom: z.ZodMiniNumber<number>;
|
|
47
|
+
independent: z.ZodMiniBoolean<boolean>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
border: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
50
|
+
width: z.ZodMiniNumber<number>;
|
|
51
|
+
color: z.ZodMiniTemplateLiteral<`#${string}`>;
|
|
52
|
+
style: z.ZodMiniEnum<{
|
|
53
|
+
none: "none";
|
|
54
|
+
solid: "solid";
|
|
55
|
+
dashed: "dashed";
|
|
56
|
+
dotted: "dotted";
|
|
57
|
+
}>;
|
|
58
|
+
sides: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
59
|
+
left: "left";
|
|
60
|
+
right: "right";
|
|
61
|
+
top: "top";
|
|
62
|
+
bottom: "bottom";
|
|
63
|
+
all: "all";
|
|
64
|
+
}>>;
|
|
65
|
+
useTheme: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
backgroundColor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export declare const LinkTargetSchema: z.ZodMiniObject<{
|
|
70
|
+
url: z.ZodMiniString<string>;
|
|
71
|
+
openInNewTab: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export declare const ButtonActionSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
74
|
+
type: z.ZodMiniLiteral<"next_step">;
|
|
75
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
76
|
+
type: z.ZodMiniLiteral<"send">;
|
|
77
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
78
|
+
type: z.ZodMiniLiteral<"close">;
|
|
79
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
80
|
+
type: z.ZodMiniLiteral<"jump_to">;
|
|
81
|
+
targetStepId: z.ZodMiniString<string>;
|
|
82
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
83
|
+
url: z.ZodMiniString<string>;
|
|
84
|
+
openInNewTab: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
85
|
+
type: z.ZodMiniLiteral<"redirect">;
|
|
86
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
87
|
+
type: z.ZodMiniLiteral<"call">;
|
|
88
|
+
phoneNumber: z.ZodMiniString<string>;
|
|
89
|
+
}, z.core.$strip>], "type">;
|
|
90
|
+
export declare const ButtonWidthSchema: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"full">, z.ZodMiniLiteral<"auto">, z.ZodMiniObject<{
|
|
91
|
+
unit: z.ZodMiniEnum<{
|
|
92
|
+
px: "px";
|
|
93
|
+
"%": "%";
|
|
94
|
+
}>;
|
|
95
|
+
value: z.ZodMiniNumber<number>;
|
|
96
|
+
}, z.core.$strip>]>;
|
|
97
|
+
export declare const ButtonAlignSchema: z.ZodMiniEnum<{
|
|
98
|
+
left: "left";
|
|
99
|
+
right: "right";
|
|
100
|
+
center: "center";
|
|
101
|
+
}>;
|
|
102
|
+
export declare const ButtonElementPropertiesSchema: z.ZodMiniObject<{
|
|
103
|
+
text: z.ZodMiniString<string>;
|
|
104
|
+
action: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
105
|
+
type: z.ZodMiniLiteral<"next_step">;
|
|
106
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
107
|
+
type: z.ZodMiniLiteral<"send">;
|
|
108
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
109
|
+
type: z.ZodMiniLiteral<"close">;
|
|
110
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
111
|
+
type: z.ZodMiniLiteral<"jump_to">;
|
|
112
|
+
targetStepId: z.ZodMiniString<string>;
|
|
113
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
114
|
+
url: z.ZodMiniString<string>;
|
|
115
|
+
openInNewTab: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
116
|
+
type: z.ZodMiniLiteral<"redirect">;
|
|
117
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
118
|
+
type: z.ZodMiniLiteral<"call">;
|
|
119
|
+
phoneNumber: z.ZodMiniString<string>;
|
|
120
|
+
}, z.core.$strip>], "type">;
|
|
121
|
+
fontColor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
122
|
+
fontFamily: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
123
|
+
fontSize: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
124
|
+
fontWeight: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
125
|
+
normal: "normal";
|
|
126
|
+
bold: "bold";
|
|
127
|
+
}>>;
|
|
128
|
+
fontStyle: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
129
|
+
normal: "normal";
|
|
130
|
+
italic: "italic";
|
|
131
|
+
}>>;
|
|
132
|
+
hover: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
133
|
+
backgroundColor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
134
|
+
fontColor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
countAsConversion: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
137
|
+
width: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"full">, z.ZodMiniLiteral<"auto">, z.ZodMiniObject<{
|
|
138
|
+
unit: z.ZodMiniEnum<{
|
|
139
|
+
px: "px";
|
|
140
|
+
"%": "%";
|
|
141
|
+
}>;
|
|
142
|
+
value: z.ZodMiniNumber<number>;
|
|
143
|
+
}, z.core.$strip>]>>;
|
|
144
|
+
height: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
145
|
+
align: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
146
|
+
left: "left";
|
|
147
|
+
right: "right";
|
|
148
|
+
center: "center";
|
|
149
|
+
}>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export declare const InputTypeSchema: z.ZodMiniEnum<{
|
|
152
|
+
number: "number";
|
|
153
|
+
email: "email";
|
|
154
|
+
url: "url";
|
|
155
|
+
date: "date";
|
|
156
|
+
text: "text";
|
|
157
|
+
telephone: "telephone";
|
|
158
|
+
}>;
|
|
159
|
+
export declare const InputFieldSchema: z.ZodMiniObject<{
|
|
160
|
+
type: z.ZodMiniEnum<{
|
|
161
|
+
number: "number";
|
|
162
|
+
email: "email";
|
|
163
|
+
url: "url";
|
|
164
|
+
date: "date";
|
|
165
|
+
text: "text";
|
|
166
|
+
telephone: "telephone";
|
|
167
|
+
}>;
|
|
168
|
+
name: z.ZodMiniString<string>;
|
|
169
|
+
label: z.ZodMiniString<string>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
export declare const TextInputElementPropertiesSchema: z.ZodMiniObject<{
|
|
172
|
+
placeholder: z.ZodMiniString<string>;
|
|
173
|
+
labelColor: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`#${string}`>>;
|
|
174
|
+
type: z.ZodMiniEnum<{
|
|
175
|
+
number: "number";
|
|
176
|
+
email: "email";
|
|
177
|
+
url: "url";
|
|
178
|
+
date: "date";
|
|
179
|
+
text: "text";
|
|
180
|
+
telephone: "telephone";
|
|
181
|
+
}>;
|
|
182
|
+
name: z.ZodMiniString<string>;
|
|
183
|
+
label: z.ZodMiniString<string>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
export declare const PreferenceOptionSchema: z.ZodMiniObject<{
|
|
186
|
+
value: z.ZodMiniString<string>;
|
|
187
|
+
label: z.ZodMiniString<string>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
export declare const PreferenceTypeSchema: z.ZodMiniEnum<{
|
|
190
|
+
checkbox: "checkbox";
|
|
191
|
+
hidden: "hidden";
|
|
192
|
+
radio: "radio";
|
|
193
|
+
select: "select";
|
|
194
|
+
}>;
|
|
195
|
+
export declare const PreferenceSchema: z.ZodMiniObject<{
|
|
196
|
+
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>;
|
|
197
|
+
name: z.ZodMiniString<string>;
|
|
198
|
+
options: z.ZodMiniArray<z.ZodMiniObject<{
|
|
199
|
+
value: z.ZodMiniString<string>;
|
|
200
|
+
label: z.ZodMiniString<string>;
|
|
201
|
+
}, z.core.$strip>>;
|
|
202
|
+
type: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
203
|
+
checkbox: "checkbox";
|
|
204
|
+
hidden: "hidden";
|
|
205
|
+
radio: "radio";
|
|
206
|
+
select: "select";
|
|
207
|
+
}>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
export declare const PreferenceElementPropertiesSchema: z.ZodMiniObject<{
|
|
210
|
+
label: z.ZodMiniString<string>;
|
|
211
|
+
preference: z.ZodMiniNullable<z.ZodMiniObject<{
|
|
212
|
+
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>;
|
|
213
|
+
name: z.ZodMiniString<string>;
|
|
214
|
+
options: z.ZodMiniArray<z.ZodMiniObject<{
|
|
215
|
+
value: z.ZodMiniString<string>;
|
|
216
|
+
label: z.ZodMiniString<string>;
|
|
217
|
+
}, z.core.$strip>>;
|
|
218
|
+
type: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
219
|
+
checkbox: "checkbox";
|
|
220
|
+
hidden: "hidden";
|
|
221
|
+
radio: "radio";
|
|
222
|
+
select: "select";
|
|
223
|
+
}>>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
custom_options: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
226
|
+
value: z.ZodMiniString<string>;
|
|
227
|
+
label: z.ZodMiniString<string>;
|
|
228
|
+
}, z.core.$strip>>>;
|
|
229
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
export declare const SelectElementPropertiesSchema: z.ZodMiniObject<{
|
|
232
|
+
placeholder: z.ZodMiniString<string>;
|
|
233
|
+
label: z.ZodMiniString<string>;
|
|
234
|
+
preference: z.ZodMiniNullable<z.ZodMiniObject<{
|
|
235
|
+
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>;
|
|
236
|
+
name: z.ZodMiniString<string>;
|
|
237
|
+
options: z.ZodMiniArray<z.ZodMiniObject<{
|
|
238
|
+
value: z.ZodMiniString<string>;
|
|
239
|
+
label: z.ZodMiniString<string>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
type: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
242
|
+
checkbox: "checkbox";
|
|
243
|
+
hidden: "hidden";
|
|
244
|
+
radio: "radio";
|
|
245
|
+
select: "select";
|
|
246
|
+
}>>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
custom_options: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
249
|
+
value: z.ZodMiniString<string>;
|
|
250
|
+
label: z.ZodMiniString<string>;
|
|
251
|
+
}, z.core.$strip>>>;
|
|
252
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
export declare const CheckboxElementPropertiesSchema: z.ZodMiniObject<{
|
|
255
|
+
label: z.ZodMiniString<string>;
|
|
256
|
+
preference: z.ZodMiniNullable<z.ZodMiniObject<{
|
|
257
|
+
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>;
|
|
258
|
+
name: z.ZodMiniString<string>;
|
|
259
|
+
options: z.ZodMiniArray<z.ZodMiniObject<{
|
|
260
|
+
value: z.ZodMiniString<string>;
|
|
261
|
+
label: z.ZodMiniString<string>;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
type: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
264
|
+
checkbox: "checkbox";
|
|
265
|
+
hidden: "hidden";
|
|
266
|
+
radio: "radio";
|
|
267
|
+
select: "select";
|
|
268
|
+
}>>;
|
|
269
|
+
}, z.core.$strip>>;
|
|
270
|
+
custom_options: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
271
|
+
value: z.ZodMiniString<string>;
|
|
272
|
+
label: z.ZodMiniString<string>;
|
|
273
|
+
}, z.core.$strip>>>;
|
|
274
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
export declare const RadioElementPropertiesSchema: z.ZodMiniObject<{
|
|
277
|
+
label: z.ZodMiniString<string>;
|
|
278
|
+
preference: z.ZodMiniNullable<z.ZodMiniObject<{
|
|
279
|
+
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>]>;
|
|
280
|
+
name: z.ZodMiniString<string>;
|
|
281
|
+
options: z.ZodMiniArray<z.ZodMiniObject<{
|
|
282
|
+
value: z.ZodMiniString<string>;
|
|
283
|
+
label: z.ZodMiniString<string>;
|
|
284
|
+
}, z.core.$strip>>;
|
|
285
|
+
type: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
286
|
+
checkbox: "checkbox";
|
|
287
|
+
hidden: "hidden";
|
|
288
|
+
radio: "radio";
|
|
289
|
+
select: "select";
|
|
290
|
+
}>>;
|
|
291
|
+
}, z.core.$strip>>;
|
|
292
|
+
custom_options: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
293
|
+
value: z.ZodMiniString<string>;
|
|
294
|
+
label: z.ZodMiniString<string>;
|
|
295
|
+
}, z.core.$strip>>>;
|
|
296
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
export declare const TextElementPropertiesSchema: z.ZodMiniObject<{
|
|
299
|
+
text: z.ZodMiniString<string>;
|
|
300
|
+
color: z.ZodMiniString<string>;
|
|
301
|
+
fontFamily: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
302
|
+
rotation: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
303
|
+
textShadow: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
304
|
+
offsetX: z.ZodMiniNumber<number>;
|
|
305
|
+
offsetY: z.ZodMiniNumber<number>;
|
|
306
|
+
blur: z.ZodMiniNumber<number>;
|
|
307
|
+
color: z.ZodMiniString<string>;
|
|
308
|
+
}, z.core.$strip>>;
|
|
309
|
+
}, z.core.$strip>;
|
|
310
|
+
export declare const HtmlElementPropertiesSchema: z.ZodMiniObject<{
|
|
311
|
+
html: z.ZodMiniString<string>;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
export declare const ImageElementPropertiesSchema: z.ZodMiniObject<{
|
|
314
|
+
src: z.ZodMiniString<string>;
|
|
315
|
+
link: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
316
|
+
url: z.ZodMiniString<string>;
|
|
317
|
+
openInNewTab: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
318
|
+
}, z.core.$strip>>;
|
|
319
|
+
width: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
320
|
+
unit: z.ZodMiniEnum<{
|
|
321
|
+
px: "px";
|
|
322
|
+
"%": "%";
|
|
323
|
+
}>;
|
|
324
|
+
value: z.ZodMiniNumber<number>;
|
|
325
|
+
}, z.core.$strip>>;
|
|
326
|
+
align: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
327
|
+
left: "left";
|
|
328
|
+
right: "right";
|
|
329
|
+
center: "center";
|
|
330
|
+
}>>;
|
|
331
|
+
objectFit: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
332
|
+
cover: "cover";
|
|
333
|
+
contain: "contain";
|
|
334
|
+
fill: "fill";
|
|
335
|
+
}>>;
|
|
336
|
+
objectPosition: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
export declare const FloatingImageElementPropertiesSchema: z.ZodMiniObject<{
|
|
339
|
+
src: z.ZodMiniString<string>;
|
|
340
|
+
}, z.core.$strip>;
|
|
341
|
+
export declare const SpacerElementPropertiesSchema: z.ZodMiniObject<{
|
|
342
|
+
height: z.ZodMiniNumber<number>;
|
|
343
|
+
showDivider: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
344
|
+
dividerColor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
345
|
+
dividerThickness: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
346
|
+
}, z.core.$strip>;
|