@wix/auto_sdk_form-templates_form-templates 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.
- package/build/cjs/index.d.ts +24 -0
- package/build/cjs/index.js +15482 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +5548 -0
- package/build/cjs/index.typings.js +15468 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +5566 -0
- package/build/cjs/meta.js +15240 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +1913 -0
- package/build/cjs/schemas.js +3198 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +24 -0
- package/build/es/index.mjs +15351 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +5548 -0
- package/build/es/index.typings.mjs +15337 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +5566 -0
- package/build/es/meta.mjs +15106 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +1913 -0
- package/build/es/schemas.mjs +3160 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +24 -0
- package/build/internal/cjs/index.js +15482 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +5701 -0
- package/build/internal/cjs/index.typings.js +15468 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +5733 -0
- package/build/internal/cjs/meta.js +15240 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +1913 -0
- package/build/internal/cjs/schemas.js +3198 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +24 -0
- package/build/internal/es/index.mjs +15351 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +5701 -0
- package/build/internal/es/index.typings.mjs +15337 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +5733 -0
- package/build/internal/es/meta.mjs +15106 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +1913 -0
- package/build/internal/es/schemas.mjs +3160 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,3160 @@
|
|
|
1
|
+
// src/forms-v2-form-template-form-templates.schemas.ts
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
var ListFormTemplatesRequest = z.object({
|
|
4
|
+
namespace: z.string().describe(
|
|
5
|
+
"Namespace whose templates to retrieve. A namespace groups the templates and forms that belong to\nthe same app or use case, such as a bookings or pricing plans checkout. The value is defined by\nthe app that owns the templates in the app dashboard."
|
|
6
|
+
).min(10).max(50),
|
|
7
|
+
options: z.object({ templateIds: z.array(z.string()).max(100).optional() }).optional()
|
|
8
|
+
});
|
|
9
|
+
var ListFormTemplatesResponse = z.object({
|
|
10
|
+
templates: z.array(
|
|
11
|
+
z.object({
|
|
12
|
+
_id: z.string().describe("Form template ID.").regex(
|
|
13
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
14
|
+
"Must be a valid GUID"
|
|
15
|
+
).optional().nullable(),
|
|
16
|
+
namespace: z.string().describe(
|
|
17
|
+
"Namespace that groups this template with the templates and forms belonging to the same app or use\ncase, such as a bookings or pricing plans checkout. The value is defined by the app that owns the\ntemplate in the app dashboard, and is the value you pass when retrieving form templates."
|
|
18
|
+
).min(10).max(50).optional(),
|
|
19
|
+
formFields: z.array(
|
|
20
|
+
z.intersection(
|
|
21
|
+
z.object({
|
|
22
|
+
_id: z.string().describe("Field ID.").regex(
|
|
23
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
24
|
+
"Must be a valid GUID"
|
|
25
|
+
).optional(),
|
|
26
|
+
hidden: z.boolean().describe(
|
|
27
|
+
"Whether the field is hidden from submitters.\n\nDefault: `false`"
|
|
28
|
+
).optional(),
|
|
29
|
+
identifier: z.string().describe(
|
|
30
|
+
"Custom identification for the field. This is intended as a way for you to identify certain fields that you want to apply special behavior to in your own logic."
|
|
31
|
+
).max(50).optional().nullable(),
|
|
32
|
+
fieldType: z.enum(["UNKNOWN_FIELD_TYPE", "INPUT", "DISPLAY"]).describe("Field type.").optional()
|
|
33
|
+
}),
|
|
34
|
+
z.xor([
|
|
35
|
+
z.object({
|
|
36
|
+
inputOptions: z.never().optional(),
|
|
37
|
+
displayOptions: z.never().optional()
|
|
38
|
+
}),
|
|
39
|
+
z.object({
|
|
40
|
+
displayOptions: z.never().optional(),
|
|
41
|
+
inputOptions: z.intersection(
|
|
42
|
+
z.object({
|
|
43
|
+
target: z.string().describe(
|
|
44
|
+
'Human readable identifier used to reference a field, used as the key\nunder which the field\'s value is stored in a submission. For example, `"address"`.\n\nRequired for input fields. Must be unique within the form (comparison is case-sensitive).\n\nNaming rules:\n- Must start with an ASCII letter (`a`-`z` or `A`-`Z`).\n- May contain ASCII letters, digits, and underscores (`_`). No spaces, hyphens, or non-ASCII characters.\n- Consecutive underscores (`__`) are not allowed.\n- Casing is not enforced, so `camelCase`, `snake_case`, and `PascalCase` are all valid.\n\nCan be set once.'
|
|
45
|
+
).min(1).max(200).optional(),
|
|
46
|
+
pii: z.boolean().describe(
|
|
47
|
+
"Whether this field contains Personally Identifiable Information (PII).\n\nPII fields are automatically encrypted when stored.\n\nDefault: `false`"
|
|
48
|
+
).optional(),
|
|
49
|
+
required: z.boolean().describe(
|
|
50
|
+
"Whether the field is required for form submission.\n\nDefault: `false`"
|
|
51
|
+
).optional(),
|
|
52
|
+
inputType: z.enum([
|
|
53
|
+
"UNKNOWN_INPUT_TYPE",
|
|
54
|
+
"STRING",
|
|
55
|
+
"NUMBER",
|
|
56
|
+
"BOOLEAN",
|
|
57
|
+
"ARRAY",
|
|
58
|
+
"OBJECT",
|
|
59
|
+
"WIX_FILE",
|
|
60
|
+
"PAYMENT",
|
|
61
|
+
"SCHEDULING",
|
|
62
|
+
"ADDRESS"
|
|
63
|
+
]).describe(
|
|
64
|
+
"Type of the input field that determines what kind of data it collects."
|
|
65
|
+
).optional(),
|
|
66
|
+
contactMapping: z.intersection(
|
|
67
|
+
z.object({
|
|
68
|
+
contactField: z.enum([
|
|
69
|
+
"FIRST_NAME",
|
|
70
|
+
"LAST_NAME",
|
|
71
|
+
"COMPANY",
|
|
72
|
+
"POSITION",
|
|
73
|
+
"EMAIL",
|
|
74
|
+
"PHONE",
|
|
75
|
+
"ADDRESS",
|
|
76
|
+
"BIRTHDATE",
|
|
77
|
+
"CUSTOM_FIELD",
|
|
78
|
+
"SUBSCRIPTION",
|
|
79
|
+
"VAT_ID"
|
|
80
|
+
]).describe(
|
|
81
|
+
"The [Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction) field that this form field maps to."
|
|
82
|
+
).optional()
|
|
83
|
+
}),
|
|
84
|
+
z.xor([
|
|
85
|
+
z.object({
|
|
86
|
+
emailInfo: z.never().optional(),
|
|
87
|
+
phoneInfo: z.never().optional(),
|
|
88
|
+
addressInfo: z.never().optional(),
|
|
89
|
+
customFieldInfo: z.never().optional(),
|
|
90
|
+
subscriptionInfo: z.never().optional()
|
|
91
|
+
}),
|
|
92
|
+
z.object({
|
|
93
|
+
phoneInfo: z.never().optional(),
|
|
94
|
+
addressInfo: z.never().optional(),
|
|
95
|
+
customFieldInfo: z.never().optional(),
|
|
96
|
+
subscriptionInfo: z.never().optional(),
|
|
97
|
+
emailInfo: z.object({
|
|
98
|
+
tag: z.enum(["UNTAGGED", "MAIN"]).describe("Email categorization tag.").optional()
|
|
99
|
+
}).describe(
|
|
100
|
+
"Configuration for email contact fields."
|
|
101
|
+
)
|
|
102
|
+
}),
|
|
103
|
+
z.object({
|
|
104
|
+
emailInfo: z.never().optional(),
|
|
105
|
+
addressInfo: z.never().optional(),
|
|
106
|
+
customFieldInfo: z.never().optional(),
|
|
107
|
+
subscriptionInfo: z.never().optional(),
|
|
108
|
+
phoneInfo: z.object({
|
|
109
|
+
tag: z.enum(["UNTAGGED", "MAIN"]).describe(
|
|
110
|
+
"Phone number categorization tag."
|
|
111
|
+
).optional()
|
|
112
|
+
}).describe(
|
|
113
|
+
"Configuration for phone contact fields."
|
|
114
|
+
)
|
|
115
|
+
}),
|
|
116
|
+
z.object({
|
|
117
|
+
emailInfo: z.never().optional(),
|
|
118
|
+
phoneInfo: z.never().optional(),
|
|
119
|
+
customFieldInfo: z.never().optional(),
|
|
120
|
+
subscriptionInfo: z.never().optional(),
|
|
121
|
+
addressInfo: z.object({
|
|
122
|
+
tag: z.enum(["UNTAGGED", "HOME"]).describe("Address categorization tag.").optional()
|
|
123
|
+
}).describe(
|
|
124
|
+
"Configuration for address contact fields."
|
|
125
|
+
)
|
|
126
|
+
}),
|
|
127
|
+
z.object({
|
|
128
|
+
emailInfo: z.never().optional(),
|
|
129
|
+
phoneInfo: z.never().optional(),
|
|
130
|
+
addressInfo: z.never().optional(),
|
|
131
|
+
subscriptionInfo: z.never().optional(),
|
|
132
|
+
customFieldInfo: z.object({
|
|
133
|
+
key: z.string().describe("Custom field key.").min(1).max(500).optional()
|
|
134
|
+
}).describe(
|
|
135
|
+
"Configuration for custom contact fields."
|
|
136
|
+
)
|
|
137
|
+
}),
|
|
138
|
+
z.object({
|
|
139
|
+
emailInfo: z.never().optional(),
|
|
140
|
+
phoneInfo: z.never().optional(),
|
|
141
|
+
addressInfo: z.never().optional(),
|
|
142
|
+
customFieldInfo: z.never().optional(),
|
|
143
|
+
subscriptionInfo: z.object({
|
|
144
|
+
confirmationLevel: z.enum([
|
|
145
|
+
"UNKNOWN_CONFIRMATION_LEVEL",
|
|
146
|
+
"SINGLE_CONFIRMATION",
|
|
147
|
+
"DOUBLE_CONFIRMATION"
|
|
148
|
+
]).describe(
|
|
149
|
+
"Subscription consent opt-in level, either single or double confirmation.\nDefault: `SINGLE_CONFIRMATION`"
|
|
150
|
+
).optional(),
|
|
151
|
+
subscriptionChannels: z.array(z.enum(["EMAIL", "SMS"])).max(2).optional()
|
|
152
|
+
}).describe(
|
|
153
|
+
"Configuration for subscription contact fields."
|
|
154
|
+
)
|
|
155
|
+
})
|
|
156
|
+
])
|
|
157
|
+
).describe(
|
|
158
|
+
"Mapping configuration for automatically saving field values to contact properties.\n\nWhen specified, form submissions automatically create or update contacts with the field data."
|
|
159
|
+
).optional(),
|
|
160
|
+
readOnly: z.boolean().describe(
|
|
161
|
+
"Whether the field is read-only.\n\nDefault: `false`"
|
|
162
|
+
).optional()
|
|
163
|
+
}),
|
|
164
|
+
z.xor([
|
|
165
|
+
z.object({
|
|
166
|
+
stringOptions: z.never().optional(),
|
|
167
|
+
numberOptions: z.never().optional(),
|
|
168
|
+
booleanOptions: z.never().optional(),
|
|
169
|
+
arrayOptions: z.never().optional(),
|
|
170
|
+
objectOptions: z.never().optional(),
|
|
171
|
+
wixFileOptions: z.never().optional(),
|
|
172
|
+
paymentOptions: z.never().optional(),
|
|
173
|
+
schedulingOptions: z.never().optional(),
|
|
174
|
+
addressOptions: z.never().optional()
|
|
175
|
+
}),
|
|
176
|
+
z.object({
|
|
177
|
+
numberOptions: z.never().optional(),
|
|
178
|
+
booleanOptions: z.never().optional(),
|
|
179
|
+
arrayOptions: z.never().optional(),
|
|
180
|
+
objectOptions: z.never().optional(),
|
|
181
|
+
wixFileOptions: z.never().optional(),
|
|
182
|
+
paymentOptions: z.never().optional(),
|
|
183
|
+
schedulingOptions: z.never().optional(),
|
|
184
|
+
addressOptions: z.never().optional(),
|
|
185
|
+
stringOptions: z.intersection(
|
|
186
|
+
z.object({
|
|
187
|
+
validation: z.intersection(
|
|
188
|
+
z.object({
|
|
189
|
+
minLength: z.number().int().describe(
|
|
190
|
+
"Minimum required length for the string value."
|
|
191
|
+
).min(0).max(2e4).optional().nullable(),
|
|
192
|
+
maxLength: z.number().int().describe(
|
|
193
|
+
"Maximum allowed length for the string value."
|
|
194
|
+
).min(0).max(2e4).optional().nullable(),
|
|
195
|
+
pattern: z.string().describe(
|
|
196
|
+
"Regular expression pattern that the string value must match."
|
|
197
|
+
).max(500).optional().nullable(),
|
|
198
|
+
format: z.enum([
|
|
199
|
+
"UNKNOWN_FORMAT",
|
|
200
|
+
"DATE",
|
|
201
|
+
"TIME",
|
|
202
|
+
"DATE_TIME",
|
|
203
|
+
"EMAIL",
|
|
204
|
+
"URL",
|
|
205
|
+
"UUID",
|
|
206
|
+
"PHONE",
|
|
207
|
+
"URI",
|
|
208
|
+
"HOSTNAME",
|
|
209
|
+
"COLOR_HEX",
|
|
210
|
+
"CURRENCY",
|
|
211
|
+
"LANGUAGE",
|
|
212
|
+
"DATE_OPTIONAL_TIME"
|
|
213
|
+
]).describe(
|
|
214
|
+
"Expected format of the string value."
|
|
215
|
+
).optional(),
|
|
216
|
+
enum: z.array(z.string()).max(500).optional(),
|
|
217
|
+
validationMessages: z.object({
|
|
218
|
+
pattern: z.string().describe(
|
|
219
|
+
"Error message shown when the pattern validation fails.\n\nThis message is displayed to users when their input doesn't match the specified regex pattern."
|
|
220
|
+
).max(200).optional().nullable()
|
|
221
|
+
}).describe(
|
|
222
|
+
"Custom error messages displayed when validation fails."
|
|
223
|
+
).optional()
|
|
224
|
+
}),
|
|
225
|
+
z.xor([
|
|
226
|
+
z.object({
|
|
227
|
+
dateOptions: z.never().optional(),
|
|
228
|
+
dateTimeOptions: z.never().optional(),
|
|
229
|
+
timeOptions: z.never().optional(),
|
|
230
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
231
|
+
phoneOptions: z.never().optional()
|
|
232
|
+
}),
|
|
233
|
+
z.object({
|
|
234
|
+
dateTimeOptions: z.never().optional(),
|
|
235
|
+
timeOptions: z.never().optional(),
|
|
236
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
237
|
+
phoneOptions: z.never().optional(),
|
|
238
|
+
dateOptions: z.object({
|
|
239
|
+
availability: z.object({
|
|
240
|
+
availableDates: z.array(
|
|
241
|
+
z.object({
|
|
242
|
+
start: z.string().describe(
|
|
243
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
244
|
+
).optional(),
|
|
245
|
+
end: z.string().describe(
|
|
246
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
247
|
+
).optional()
|
|
248
|
+
})
|
|
249
|
+
).min(0).max(5).optional(),
|
|
250
|
+
unavailableDates: z.array(
|
|
251
|
+
z.object({
|
|
252
|
+
start: z.string().describe(
|
|
253
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
254
|
+
).optional(),
|
|
255
|
+
end: z.string().describe(
|
|
256
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
257
|
+
).optional()
|
|
258
|
+
})
|
|
259
|
+
).min(0).max(5).optional(),
|
|
260
|
+
availableDays: z.array(
|
|
261
|
+
z.enum([
|
|
262
|
+
"MONDAY",
|
|
263
|
+
"TUESDAY",
|
|
264
|
+
"WEDNESDAY",
|
|
265
|
+
"THURSDAY",
|
|
266
|
+
"FRIDAY",
|
|
267
|
+
"SATURDAY",
|
|
268
|
+
"SUNDAY"
|
|
269
|
+
])
|
|
270
|
+
).min(0).max(7).optional()
|
|
271
|
+
}).describe(
|
|
272
|
+
"Allows to specify available and unavailable dates and days of the week.\nIf unset, all dates from minimum to maximum are available."
|
|
273
|
+
).optional(),
|
|
274
|
+
minimum: z.string().describe(
|
|
275
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
276
|
+
).max(50).optional().nullable(),
|
|
277
|
+
maximum: z.string().describe(
|
|
278
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
279
|
+
).max(50).optional().nullable()
|
|
280
|
+
}).describe(
|
|
281
|
+
"Validation rules for strings with date format."
|
|
282
|
+
)
|
|
283
|
+
}),
|
|
284
|
+
z.object({
|
|
285
|
+
dateOptions: z.never().optional(),
|
|
286
|
+
timeOptions: z.never().optional(),
|
|
287
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
288
|
+
phoneOptions: z.never().optional(),
|
|
289
|
+
dateTimeOptions: z.object({
|
|
290
|
+
minimum: z.string().describe(
|
|
291
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
292
|
+
).max(50).optional().nullable(),
|
|
293
|
+
maximum: z.string().describe(
|
|
294
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
295
|
+
).max(50).optional().nullable()
|
|
296
|
+
}).describe(
|
|
297
|
+
"Validation rules for strings with date and time format."
|
|
298
|
+
)
|
|
299
|
+
}),
|
|
300
|
+
z.object({
|
|
301
|
+
dateOptions: z.never().optional(),
|
|
302
|
+
dateTimeOptions: z.never().optional(),
|
|
303
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
304
|
+
phoneOptions: z.never().optional(),
|
|
305
|
+
timeOptions: z.object({
|
|
306
|
+
minimum: z.string().describe(
|
|
307
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
308
|
+
).max(50).optional().nullable(),
|
|
309
|
+
maximum: z.string().describe(
|
|
310
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
311
|
+
).max(50).optional().nullable()
|
|
312
|
+
}).describe(
|
|
313
|
+
"Validation rules for strings with time format."
|
|
314
|
+
)
|
|
315
|
+
}),
|
|
316
|
+
z.object({
|
|
317
|
+
dateOptions: z.never().optional(),
|
|
318
|
+
dateTimeOptions: z.never().optional(),
|
|
319
|
+
timeOptions: z.never().optional(),
|
|
320
|
+
phoneOptions: z.never().optional(),
|
|
321
|
+
dateOptionalTimeOptions: z.object({
|
|
322
|
+
minimum: z.string().describe(
|
|
323
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
324
|
+
).max(50).optional().nullable(),
|
|
325
|
+
maximum: z.string().describe(
|
|
326
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
327
|
+
).max(50).optional().nullable()
|
|
328
|
+
}).describe(
|
|
329
|
+
"Validation rules for string with date and time format, where time is optional."
|
|
330
|
+
)
|
|
331
|
+
}),
|
|
332
|
+
z.object({
|
|
333
|
+
dateOptions: z.never().optional(),
|
|
334
|
+
dateTimeOptions: z.never().optional(),
|
|
335
|
+
timeOptions: z.never().optional(),
|
|
336
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
337
|
+
phoneOptions: z.object({
|
|
338
|
+
allowedCountryCodes: z.array(z.string()).max(250).optional()
|
|
339
|
+
}).describe(
|
|
340
|
+
"Validation rules for strings with phone number format."
|
|
341
|
+
)
|
|
342
|
+
})
|
|
343
|
+
])
|
|
344
|
+
).describe(
|
|
345
|
+
"Validation configuration for the string input."
|
|
346
|
+
).optional(),
|
|
347
|
+
componentType: z.enum([
|
|
348
|
+
"UNKNOWN_COMPONENT_TYPE",
|
|
349
|
+
"TEXT_INPUT",
|
|
350
|
+
"RADIO_GROUP",
|
|
351
|
+
"DROPDOWN",
|
|
352
|
+
"DATE_TIME",
|
|
353
|
+
"PHONE_INPUT",
|
|
354
|
+
"DATE_INPUT",
|
|
355
|
+
"TIME_INPUT",
|
|
356
|
+
"DATE_PICKER",
|
|
357
|
+
"SERVICES_DROPDOWN",
|
|
358
|
+
"PASSWORD"
|
|
359
|
+
]).describe(
|
|
360
|
+
"Component type of the string input field."
|
|
361
|
+
).optional()
|
|
362
|
+
}),
|
|
363
|
+
z.xor([
|
|
364
|
+
z.object({
|
|
365
|
+
textInputOptions: z.never().optional(),
|
|
366
|
+
radioGroupOptions: z.never().optional(),
|
|
367
|
+
dropdownOptions: z.never().optional(),
|
|
368
|
+
dateTimeOptions: z.never().optional(),
|
|
369
|
+
phoneInputOptions: z.never().optional(),
|
|
370
|
+
dateInputOptions: z.never().optional(),
|
|
371
|
+
timeInputOptions: z.never().optional(),
|
|
372
|
+
datePickerOptions: z.never().optional(),
|
|
373
|
+
servicesDropdownOptions: z.never().optional(),
|
|
374
|
+
passwordOptions: z.never().optional()
|
|
375
|
+
}),
|
|
376
|
+
z.object({
|
|
377
|
+
radioGroupOptions: z.never().optional(),
|
|
378
|
+
dropdownOptions: z.never().optional(),
|
|
379
|
+
dateTimeOptions: z.never().optional(),
|
|
380
|
+
phoneInputOptions: z.never().optional(),
|
|
381
|
+
dateInputOptions: z.never().optional(),
|
|
382
|
+
timeInputOptions: z.never().optional(),
|
|
383
|
+
datePickerOptions: z.never().optional(),
|
|
384
|
+
servicesDropdownOptions: z.never().optional(),
|
|
385
|
+
passwordOptions: z.never().optional(),
|
|
386
|
+
textInputOptions: z.object({
|
|
387
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
388
|
+
description: z.any().describe(
|
|
389
|
+
"Additional description or instructions for the field."
|
|
390
|
+
).optional(),
|
|
391
|
+
placeholder: z.string().describe(
|
|
392
|
+
"Placeholder text shown inside the field when it's empty.\nUseful for providing a hint about the expected format or content."
|
|
393
|
+
).max(100).optional().nullable(),
|
|
394
|
+
showLabel: z.boolean().describe(
|
|
395
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
396
|
+
).optional().nullable(),
|
|
397
|
+
default: z.string().describe(
|
|
398
|
+
"Default value for the field. This value is pre-populated in the field when the form loads."
|
|
399
|
+
).max(2e4).optional().nullable(),
|
|
400
|
+
media: z.intersection(
|
|
401
|
+
z.object({}),
|
|
402
|
+
z.xor([
|
|
403
|
+
z.object({
|
|
404
|
+
image: z.never().optional()
|
|
405
|
+
}),
|
|
406
|
+
z.object({
|
|
407
|
+
image: z.string().describe("WixMedia image.")
|
|
408
|
+
})
|
|
409
|
+
])
|
|
410
|
+
).describe(
|
|
411
|
+
"Media content associated with the field, such as an image."
|
|
412
|
+
).optional(),
|
|
413
|
+
mediaSettings: z.object({
|
|
414
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
415
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
416
|
+
).optional(),
|
|
417
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
418
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
419
|
+
).optional(),
|
|
420
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
421
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
422
|
+
).optional()
|
|
423
|
+
}).describe(
|
|
424
|
+
"Configuration for the media content."
|
|
425
|
+
).optional()
|
|
426
|
+
}).describe("Text input component settings.")
|
|
427
|
+
}),
|
|
428
|
+
z.object({
|
|
429
|
+
textInputOptions: z.never().optional(),
|
|
430
|
+
dropdownOptions: z.never().optional(),
|
|
431
|
+
dateTimeOptions: z.never().optional(),
|
|
432
|
+
phoneInputOptions: z.never().optional(),
|
|
433
|
+
dateInputOptions: z.never().optional(),
|
|
434
|
+
timeInputOptions: z.never().optional(),
|
|
435
|
+
datePickerOptions: z.never().optional(),
|
|
436
|
+
servicesDropdownOptions: z.never().optional(),
|
|
437
|
+
passwordOptions: z.never().optional(),
|
|
438
|
+
radioGroupOptions: z.object({
|
|
439
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
440
|
+
description: z.any().describe(
|
|
441
|
+
"Additional description or instructions for the field."
|
|
442
|
+
).optional(),
|
|
443
|
+
options: z.array(
|
|
444
|
+
z.object({
|
|
445
|
+
label: z.string().describe(
|
|
446
|
+
"Selectable option label."
|
|
447
|
+
).max(400).optional().nullable(),
|
|
448
|
+
value: z.string().describe(
|
|
449
|
+
"Value stored on submission when this option is selected."
|
|
450
|
+
).max(2e4).optional().nullable(),
|
|
451
|
+
default: z.boolean().describe(
|
|
452
|
+
"Whether this option is selected by default."
|
|
453
|
+
).optional(),
|
|
454
|
+
_id: z.string().describe(
|
|
455
|
+
"Option ID. Can be used to connect this option with [Wix Multilingual](https://dev.wix.com/docs/api-reference/business-management/multilingual/translation/introduction) for translation."
|
|
456
|
+
).regex(
|
|
457
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
458
|
+
"Must be a valid GUID"
|
|
459
|
+
).optional()
|
|
460
|
+
})
|
|
461
|
+
).max(400).optional(),
|
|
462
|
+
showLabel: z.boolean().describe(
|
|
463
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
464
|
+
).optional().nullable(),
|
|
465
|
+
customOption: z.object({
|
|
466
|
+
label: z.string().describe("Custom option label.").max(350).optional().nullable(),
|
|
467
|
+
placeholder: z.string().describe(
|
|
468
|
+
"Custom option placeholder text."
|
|
469
|
+
).max(100).optional().nullable()
|
|
470
|
+
}).describe(
|
|
471
|
+
"Custom option which can be specified by the submitter."
|
|
472
|
+
).optional(),
|
|
473
|
+
numberOfColumns: z.enum(["ONE", "TWO", "THREE", "ZERO"]).describe(
|
|
474
|
+
"Specifies the number of columns used to display the selections within the component.\n\nDefault: `ONE`"
|
|
475
|
+
).optional(),
|
|
476
|
+
media: z.intersection(
|
|
477
|
+
z.object({}),
|
|
478
|
+
z.xor([
|
|
479
|
+
z.object({
|
|
480
|
+
image: z.never().optional()
|
|
481
|
+
}),
|
|
482
|
+
z.object({
|
|
483
|
+
image: z.string().describe("WixMedia image.")
|
|
484
|
+
})
|
|
485
|
+
])
|
|
486
|
+
).describe(
|
|
487
|
+
"Media content associated with the field, such as an image."
|
|
488
|
+
).optional(),
|
|
489
|
+
mediaSettings: z.object({
|
|
490
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
491
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
492
|
+
).optional(),
|
|
493
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
494
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
495
|
+
).optional(),
|
|
496
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
497
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
498
|
+
).optional()
|
|
499
|
+
}).describe(
|
|
500
|
+
"Configuration for the media content."
|
|
501
|
+
).optional()
|
|
502
|
+
}).describe(
|
|
503
|
+
"Radio group component settings."
|
|
504
|
+
)
|
|
505
|
+
}),
|
|
506
|
+
z.object({
|
|
507
|
+
textInputOptions: z.never().optional(),
|
|
508
|
+
radioGroupOptions: z.never().optional(),
|
|
509
|
+
dateTimeOptions: z.never().optional(),
|
|
510
|
+
phoneInputOptions: z.never().optional(),
|
|
511
|
+
dateInputOptions: z.never().optional(),
|
|
512
|
+
timeInputOptions: z.never().optional(),
|
|
513
|
+
datePickerOptions: z.never().optional(),
|
|
514
|
+
servicesDropdownOptions: z.never().optional(),
|
|
515
|
+
passwordOptions: z.never().optional(),
|
|
516
|
+
dropdownOptions: z.object({
|
|
517
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
518
|
+
description: z.any().describe(
|
|
519
|
+
"Additional description or instructions for the field."
|
|
520
|
+
).optional(),
|
|
521
|
+
options: z.array(
|
|
522
|
+
z.object({
|
|
523
|
+
label: z.string().describe(
|
|
524
|
+
"Selectable option label."
|
|
525
|
+
).max(400).optional().nullable(),
|
|
526
|
+
value: z.string().describe(
|
|
527
|
+
"Value stored on submission when this option is selected."
|
|
528
|
+
).max(2e4).optional().nullable(),
|
|
529
|
+
default: z.boolean().describe(
|
|
530
|
+
"Whether this option is selected by default."
|
|
531
|
+
).optional(),
|
|
532
|
+
_id: z.string().describe(
|
|
533
|
+
"Option ID. Can be used to connect this option with [Wix Multilingual](https://dev.wix.com/docs/api-reference/business-management/multilingual/translation/introduction) for translation."
|
|
534
|
+
).regex(
|
|
535
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
536
|
+
"Must be a valid GUID"
|
|
537
|
+
).optional()
|
|
538
|
+
})
|
|
539
|
+
).max(400).optional(),
|
|
540
|
+
showLabel: z.boolean().describe(
|
|
541
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
542
|
+
).optional().nullable(),
|
|
543
|
+
customOption: z.object({
|
|
544
|
+
label: z.string().describe("Custom option label.").max(350).optional().nullable(),
|
|
545
|
+
placeholder: z.string().describe(
|
|
546
|
+
"Custom option placeholder text."
|
|
547
|
+
).max(100).optional().nullable()
|
|
548
|
+
}).describe(
|
|
549
|
+
"Custom option which can be specified by the submitter."
|
|
550
|
+
).optional(),
|
|
551
|
+
placeholder: z.string().describe(
|
|
552
|
+
"Placeholder text shown when no option is selected."
|
|
553
|
+
).max(100).optional().nullable(),
|
|
554
|
+
media: z.intersection(
|
|
555
|
+
z.object({}),
|
|
556
|
+
z.xor([
|
|
557
|
+
z.object({
|
|
558
|
+
image: z.never().optional()
|
|
559
|
+
}),
|
|
560
|
+
z.object({
|
|
561
|
+
image: z.string().describe("WixMedia image.")
|
|
562
|
+
})
|
|
563
|
+
])
|
|
564
|
+
).describe(
|
|
565
|
+
"Media content associated with the field, such as an image."
|
|
566
|
+
).optional(),
|
|
567
|
+
mediaSettings: z.object({
|
|
568
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
569
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
570
|
+
).optional(),
|
|
571
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
572
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
573
|
+
).optional(),
|
|
574
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
575
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
576
|
+
).optional()
|
|
577
|
+
}).describe(
|
|
578
|
+
"Configuration for the media content."
|
|
579
|
+
).optional()
|
|
580
|
+
}).describe("Dropdown component settings.")
|
|
581
|
+
}),
|
|
582
|
+
z.object({
|
|
583
|
+
textInputOptions: z.never().optional(),
|
|
584
|
+
radioGroupOptions: z.never().optional(),
|
|
585
|
+
dropdownOptions: z.never().optional(),
|
|
586
|
+
phoneInputOptions: z.never().optional(),
|
|
587
|
+
dateInputOptions: z.never().optional(),
|
|
588
|
+
timeInputOptions: z.never().optional(),
|
|
589
|
+
datePickerOptions: z.never().optional(),
|
|
590
|
+
servicesDropdownOptions: z.never().optional(),
|
|
591
|
+
passwordOptions: z.never().optional(),
|
|
592
|
+
dateTimeOptions: z.object({
|
|
593
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
594
|
+
description: z.any().describe(
|
|
595
|
+
"Additional description or instructions for the field."
|
|
596
|
+
).optional(),
|
|
597
|
+
showLabel: z.boolean().describe(
|
|
598
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
599
|
+
).optional().nullable(),
|
|
600
|
+
showPlaceholder: z.boolean().describe(
|
|
601
|
+
"Whether to display placeholder text in the field when it's empty.\n\nDefault: `true`"
|
|
602
|
+
).optional().nullable(),
|
|
603
|
+
use24HourFormat: z.boolean().describe(
|
|
604
|
+
"Whether to use 24-hour time format.\n\nDefault: `false`"
|
|
605
|
+
).optional(),
|
|
606
|
+
default: z.string().describe(
|
|
607
|
+
'Default value for the field. This value is pre-populated in the field when the form loads.\nSupports static constrains defined as ISO date-time format, as well as dynamic calculations using special keywords\nsuch as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
608
|
+
).max(50).optional().nullable(),
|
|
609
|
+
media: z.intersection(
|
|
610
|
+
z.object({}),
|
|
611
|
+
z.xor([
|
|
612
|
+
z.object({
|
|
613
|
+
image: z.never().optional()
|
|
614
|
+
}),
|
|
615
|
+
z.object({
|
|
616
|
+
image: z.string().describe("WixMedia image.")
|
|
617
|
+
})
|
|
618
|
+
])
|
|
619
|
+
).describe(
|
|
620
|
+
"Media content associated with the field, such as an image."
|
|
621
|
+
).optional(),
|
|
622
|
+
mediaSettings: z.object({
|
|
623
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
624
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
625
|
+
).optional(),
|
|
626
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
627
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
628
|
+
).optional(),
|
|
629
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
630
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
631
|
+
).optional()
|
|
632
|
+
}).describe(
|
|
633
|
+
"Configuration for the media content."
|
|
634
|
+
).optional(),
|
|
635
|
+
showDateLabels: z.boolean().describe(
|
|
636
|
+
"Flag identifying whether to show or hide the date labels.\nDefault: true"
|
|
637
|
+
).optional().nullable()
|
|
638
|
+
}).describe(
|
|
639
|
+
"Date and time input component settings."
|
|
640
|
+
)
|
|
641
|
+
}),
|
|
642
|
+
z.object({
|
|
643
|
+
textInputOptions: z.never().optional(),
|
|
644
|
+
radioGroupOptions: z.never().optional(),
|
|
645
|
+
dropdownOptions: z.never().optional(),
|
|
646
|
+
dateTimeOptions: z.never().optional(),
|
|
647
|
+
dateInputOptions: z.never().optional(),
|
|
648
|
+
timeInputOptions: z.never().optional(),
|
|
649
|
+
datePickerOptions: z.never().optional(),
|
|
650
|
+
servicesDropdownOptions: z.never().optional(),
|
|
651
|
+
passwordOptions: z.never().optional(),
|
|
652
|
+
phoneInputOptions: z.object({
|
|
653
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
654
|
+
description: z.any().describe(
|
|
655
|
+
"Additional description or instructions for the field."
|
|
656
|
+
).optional(),
|
|
657
|
+
placeholder: z.string().describe(
|
|
658
|
+
"Placeholder text shown inside the field when it's empty."
|
|
659
|
+
).max(100).optional().nullable(),
|
|
660
|
+
showLabel: z.boolean().describe(
|
|
661
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
662
|
+
).optional().nullable(),
|
|
663
|
+
defaultCountryCode: z.string().describe(
|
|
664
|
+
"Default country code for the phone number input. Two-letter country code in ISO-3166 alpha-2 format."
|
|
665
|
+
).min(1).max(5).optional().nullable(),
|
|
666
|
+
showCountryFlag: z.boolean().describe(
|
|
667
|
+
"Whether to display the country flag next to the country code.\n\nDefault: `false`"
|
|
668
|
+
).optional(),
|
|
669
|
+
media: z.intersection(
|
|
670
|
+
z.object({}),
|
|
671
|
+
z.xor([
|
|
672
|
+
z.object({
|
|
673
|
+
image: z.never().optional()
|
|
674
|
+
}),
|
|
675
|
+
z.object({
|
|
676
|
+
image: z.string().describe("WixMedia image.")
|
|
677
|
+
})
|
|
678
|
+
])
|
|
679
|
+
).describe(
|
|
680
|
+
"Media content associated with the field, such as an image."
|
|
681
|
+
).optional(),
|
|
682
|
+
mediaSettings: z.object({
|
|
683
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
684
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
685
|
+
).optional(),
|
|
686
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
687
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
688
|
+
).optional(),
|
|
689
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
690
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
691
|
+
).optional()
|
|
692
|
+
}).describe(
|
|
693
|
+
"Configuration for the media content."
|
|
694
|
+
).optional()
|
|
695
|
+
}).describe(
|
|
696
|
+
"Phone input component settings."
|
|
697
|
+
)
|
|
698
|
+
}),
|
|
699
|
+
z.object({
|
|
700
|
+
textInputOptions: z.never().optional(),
|
|
701
|
+
radioGroupOptions: z.never().optional(),
|
|
702
|
+
dropdownOptions: z.never().optional(),
|
|
703
|
+
dateTimeOptions: z.never().optional(),
|
|
704
|
+
phoneInputOptions: z.never().optional(),
|
|
705
|
+
timeInputOptions: z.never().optional(),
|
|
706
|
+
datePickerOptions: z.never().optional(),
|
|
707
|
+
servicesDropdownOptions: z.never().optional(),
|
|
708
|
+
passwordOptions: z.never().optional(),
|
|
709
|
+
dateInputOptions: z.object({
|
|
710
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
711
|
+
description: z.any().describe(
|
|
712
|
+
"Additional description or instructions for the field."
|
|
713
|
+
).optional(),
|
|
714
|
+
showLabel: z.boolean().describe(
|
|
715
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
716
|
+
).optional().nullable(),
|
|
717
|
+
showPlaceholder: z.boolean().describe(
|
|
718
|
+
"Whether to display placeholder text in the field when it's empty.\n\nDefault: `true`"
|
|
719
|
+
).optional().nullable(),
|
|
720
|
+
default: z.string().describe(
|
|
721
|
+
'Default value for the field. This value is pre-populated in the field when the form loads.\nSupports static constrains defined as ISO date format, as well as dynamic calculations using special keywords\nsuch as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
722
|
+
).max(50).optional().nullable(),
|
|
723
|
+
media: z.intersection(
|
|
724
|
+
z.object({}),
|
|
725
|
+
z.xor([
|
|
726
|
+
z.object({
|
|
727
|
+
image: z.never().optional()
|
|
728
|
+
}),
|
|
729
|
+
z.object({
|
|
730
|
+
image: z.string().describe("WixMedia image.")
|
|
731
|
+
})
|
|
732
|
+
])
|
|
733
|
+
).describe(
|
|
734
|
+
"Media content associated with the field, such as an image."
|
|
735
|
+
).optional(),
|
|
736
|
+
mediaSettings: z.object({
|
|
737
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
738
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
739
|
+
).optional(),
|
|
740
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
741
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
742
|
+
).optional(),
|
|
743
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
744
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
745
|
+
).optional()
|
|
746
|
+
}).describe(
|
|
747
|
+
"Configuration for the media content."
|
|
748
|
+
).optional(),
|
|
749
|
+
showDateLabels: z.boolean().describe(
|
|
750
|
+
"Flag identifying whether to show or hide the date labels.\nDefault: true"
|
|
751
|
+
).optional().nullable()
|
|
752
|
+
}).describe("Date input component settings.")
|
|
753
|
+
}),
|
|
754
|
+
z.object({
|
|
755
|
+
textInputOptions: z.never().optional(),
|
|
756
|
+
radioGroupOptions: z.never().optional(),
|
|
757
|
+
dropdownOptions: z.never().optional(),
|
|
758
|
+
dateTimeOptions: z.never().optional(),
|
|
759
|
+
phoneInputOptions: z.never().optional(),
|
|
760
|
+
dateInputOptions: z.never().optional(),
|
|
761
|
+
datePickerOptions: z.never().optional(),
|
|
762
|
+
servicesDropdownOptions: z.never().optional(),
|
|
763
|
+
passwordOptions: z.never().optional(),
|
|
764
|
+
timeInputOptions: z.object({
|
|
765
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
766
|
+
description: z.any().describe("Field description.").optional(),
|
|
767
|
+
showLabel: z.boolean().describe(
|
|
768
|
+
"Whether to display the label.\n\nDefault: `true`"
|
|
769
|
+
).optional().nullable(),
|
|
770
|
+
showPlaceholder: z.boolean().describe(
|
|
771
|
+
"Whether to display placeholder text in the field when it's empty.\n\nDefault: `true`"
|
|
772
|
+
).optional().nullable(),
|
|
773
|
+
use24HourFormat: z.boolean().describe(
|
|
774
|
+
"Whether to use 24-hour time format.\n\nDefault: `false`"
|
|
775
|
+
).optional(),
|
|
776
|
+
default: z.string().describe(
|
|
777
|
+
'Default value for the field. This value is pre-populated in the field when the form loads.\nSupports static constrains defined as ISO time format, as well as dynamic calculations using special keywords\nsuch as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
778
|
+
).max(50).optional().nullable(),
|
|
779
|
+
media: z.intersection(
|
|
780
|
+
z.object({}),
|
|
781
|
+
z.xor([
|
|
782
|
+
z.object({
|
|
783
|
+
image: z.never().optional()
|
|
784
|
+
}),
|
|
785
|
+
z.object({
|
|
786
|
+
image: z.string().describe("WixMedia image.")
|
|
787
|
+
})
|
|
788
|
+
])
|
|
789
|
+
).describe(
|
|
790
|
+
"Media content associated with the field, such as an image."
|
|
791
|
+
).optional(),
|
|
792
|
+
mediaSettings: z.object({
|
|
793
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
794
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
795
|
+
).optional(),
|
|
796
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
797
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
798
|
+
).optional(),
|
|
799
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
800
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
801
|
+
).optional()
|
|
802
|
+
}).describe(
|
|
803
|
+
"Configuration for the media content."
|
|
804
|
+
).optional()
|
|
805
|
+
}).describe("Time input component settings.")
|
|
806
|
+
}),
|
|
807
|
+
z.object({
|
|
808
|
+
textInputOptions: z.never().optional(),
|
|
809
|
+
radioGroupOptions: z.never().optional(),
|
|
810
|
+
dropdownOptions: z.never().optional(),
|
|
811
|
+
dateTimeOptions: z.never().optional(),
|
|
812
|
+
phoneInputOptions: z.never().optional(),
|
|
813
|
+
dateInputOptions: z.never().optional(),
|
|
814
|
+
timeInputOptions: z.never().optional(),
|
|
815
|
+
servicesDropdownOptions: z.never().optional(),
|
|
816
|
+
passwordOptions: z.never().optional(),
|
|
817
|
+
datePickerOptions: z.object({
|
|
818
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
819
|
+
description: z.any().describe(
|
|
820
|
+
"Additional description or instructions for the field."
|
|
821
|
+
).optional(),
|
|
822
|
+
showLabel: z.boolean().describe(
|
|
823
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
824
|
+
).optional().nullable(),
|
|
825
|
+
placeholder: z.string().describe(
|
|
826
|
+
"Placeholder text shown when no date is selected."
|
|
827
|
+
).max(100).optional().nullable(),
|
|
828
|
+
firstDayOfWeek: z.enum(["MONDAY", "SUNDAY"]).describe(
|
|
829
|
+
"First day of the week displayed on the date picker."
|
|
830
|
+
).optional(),
|
|
831
|
+
default: z.string().describe(
|
|
832
|
+
'Default value for the field. This value is pre-populated in the field when the form loads.\nSupports static constrains defined as ISO date format, as well as dynamic calculations using special keywords\nsuch as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
833
|
+
).max(50).optional().nullable(),
|
|
834
|
+
media: z.intersection(
|
|
835
|
+
z.object({}),
|
|
836
|
+
z.xor([
|
|
837
|
+
z.object({
|
|
838
|
+
image: z.never().optional()
|
|
839
|
+
}),
|
|
840
|
+
z.object({
|
|
841
|
+
image: z.string().describe("WixMedia image.")
|
|
842
|
+
})
|
|
843
|
+
])
|
|
844
|
+
).describe(
|
|
845
|
+
"Media content associated with the field, such as an image."
|
|
846
|
+
).optional(),
|
|
847
|
+
mediaSettings: z.object({
|
|
848
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
849
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
850
|
+
).optional(),
|
|
851
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
852
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
853
|
+
).optional(),
|
|
854
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
855
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
856
|
+
).optional()
|
|
857
|
+
}).describe(
|
|
858
|
+
"Configuration for the media content."
|
|
859
|
+
).optional()
|
|
860
|
+
}).describe(
|
|
861
|
+
"Date picker component settings."
|
|
862
|
+
)
|
|
863
|
+
}),
|
|
864
|
+
z.object({
|
|
865
|
+
textInputOptions: z.never().optional(),
|
|
866
|
+
radioGroupOptions: z.never().optional(),
|
|
867
|
+
dropdownOptions: z.never().optional(),
|
|
868
|
+
dateTimeOptions: z.never().optional(),
|
|
869
|
+
phoneInputOptions: z.never().optional(),
|
|
870
|
+
dateInputOptions: z.never().optional(),
|
|
871
|
+
timeInputOptions: z.never().optional(),
|
|
872
|
+
datePickerOptions: z.never().optional(),
|
|
873
|
+
passwordOptions: z.never().optional(),
|
|
874
|
+
servicesDropdownOptions: z.object({
|
|
875
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
876
|
+
showLabel: z.boolean().describe(
|
|
877
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
878
|
+
).optional().nullable(),
|
|
879
|
+
placeholder: z.string().describe(
|
|
880
|
+
"Placeholder text shown when no service is selected."
|
|
881
|
+
).max(100).optional().nullable(),
|
|
882
|
+
options: z.array(
|
|
883
|
+
z.object({
|
|
884
|
+
label: z.string().describe("Service name/label").max(400).optional().nullable(),
|
|
885
|
+
_id: z.string().describe(
|
|
886
|
+
"Option id. Used as binding for translations. Corresponds to the Service ID."
|
|
887
|
+
).regex(
|
|
888
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
889
|
+
"Must be a valid GUID"
|
|
890
|
+
).optional(),
|
|
891
|
+
value: z.string().describe(
|
|
892
|
+
"Selectable option value, which is saved to DB. Corresponds to the Service ID."
|
|
893
|
+
).regex(
|
|
894
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
895
|
+
"Must be a valid GUID"
|
|
896
|
+
).optional().nullable()
|
|
897
|
+
})
|
|
898
|
+
).max(400).optional(),
|
|
899
|
+
customOption: z.object({
|
|
900
|
+
label: z.string().describe("Custom option label.").max(350).optional().nullable(),
|
|
901
|
+
placeholder: z.string().describe(
|
|
902
|
+
"Custom option placeholder text."
|
|
903
|
+
).max(100).optional().nullable()
|
|
904
|
+
}).describe(
|
|
905
|
+
"Custom option which can be specified by the submitter."
|
|
906
|
+
).optional(),
|
|
907
|
+
description: z.any().describe(
|
|
908
|
+
"Additional description or instructions for the field."
|
|
909
|
+
).optional()
|
|
910
|
+
}).describe(
|
|
911
|
+
"Services dropdown component settings."
|
|
912
|
+
)
|
|
913
|
+
}),
|
|
914
|
+
z.object({
|
|
915
|
+
textInputOptions: z.never().optional(),
|
|
916
|
+
radioGroupOptions: z.never().optional(),
|
|
917
|
+
dropdownOptions: z.never().optional(),
|
|
918
|
+
dateTimeOptions: z.never().optional(),
|
|
919
|
+
phoneInputOptions: z.never().optional(),
|
|
920
|
+
dateInputOptions: z.never().optional(),
|
|
921
|
+
timeInputOptions: z.never().optional(),
|
|
922
|
+
datePickerOptions: z.never().optional(),
|
|
923
|
+
servicesDropdownOptions: z.never().optional(),
|
|
924
|
+
passwordOptions: z.object({
|
|
925
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
926
|
+
description: z.any().describe(
|
|
927
|
+
"Additional description or instructions for the field."
|
|
928
|
+
).optional(),
|
|
929
|
+
placeholder: z.string().describe(
|
|
930
|
+
"Placeholder text shown inside the field when it's empty.\nUseful for providing a hint about the expected format or content."
|
|
931
|
+
).max(100).optional().nullable(),
|
|
932
|
+
showLabel: z.boolean().describe(
|
|
933
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
934
|
+
).optional().nullable(),
|
|
935
|
+
default: z.string().describe(
|
|
936
|
+
"Default value for the field. This value is pre-populated in the field when the form loads."
|
|
937
|
+
).max(2e4).optional().nullable(),
|
|
938
|
+
media: z.intersection(
|
|
939
|
+
z.object({}),
|
|
940
|
+
z.xor([
|
|
941
|
+
z.object({
|
|
942
|
+
image: z.never().optional()
|
|
943
|
+
}),
|
|
944
|
+
z.object({
|
|
945
|
+
image: z.string().describe("WixMedia image.")
|
|
946
|
+
})
|
|
947
|
+
])
|
|
948
|
+
).describe(
|
|
949
|
+
"Media content associated with the field, such as an image."
|
|
950
|
+
).optional(),
|
|
951
|
+
mediaSettings: z.object({
|
|
952
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
953
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
954
|
+
).optional(),
|
|
955
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
956
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
957
|
+
).optional(),
|
|
958
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
959
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
960
|
+
).optional()
|
|
961
|
+
}).describe(
|
|
962
|
+
"Configuration for the media content."
|
|
963
|
+
).optional()
|
|
964
|
+
}).describe("Password component settings.")
|
|
965
|
+
})
|
|
966
|
+
])
|
|
967
|
+
).describe("String input field settings.")
|
|
968
|
+
}),
|
|
969
|
+
z.object({
|
|
970
|
+
stringOptions: z.never().optional(),
|
|
971
|
+
booleanOptions: z.never().optional(),
|
|
972
|
+
arrayOptions: z.never().optional(),
|
|
973
|
+
objectOptions: z.never().optional(),
|
|
974
|
+
wixFileOptions: z.never().optional(),
|
|
975
|
+
paymentOptions: z.never().optional(),
|
|
976
|
+
schedulingOptions: z.never().optional(),
|
|
977
|
+
addressOptions: z.never().optional(),
|
|
978
|
+
numberOptions: z.intersection(
|
|
979
|
+
z.object({
|
|
980
|
+
validation: z.object({
|
|
981
|
+
maximum: z.number().describe(
|
|
982
|
+
"The maximum value of the number. Inclusive."
|
|
983
|
+
).optional().nullable(),
|
|
984
|
+
minimum: z.number().describe(
|
|
985
|
+
"The minimum value of the number. Inclusive."
|
|
986
|
+
).optional().nullable(),
|
|
987
|
+
multipleOf: z.number().describe(
|
|
988
|
+
"A number that the value must be a multiple of."
|
|
989
|
+
).optional().nullable(),
|
|
990
|
+
enum: z.array(z.number()).max(500).optional()
|
|
991
|
+
}).describe(
|
|
992
|
+
"Validation configuration for the number input."
|
|
993
|
+
).optional(),
|
|
994
|
+
componentType: z.enum([
|
|
995
|
+
"UNKNOWN_COMPONENT_TYPE",
|
|
996
|
+
"NUMBER_INPUT",
|
|
997
|
+
"RATING_INPUT"
|
|
998
|
+
]).describe(
|
|
999
|
+
"Component type of the number input field."
|
|
1000
|
+
).optional()
|
|
1001
|
+
}),
|
|
1002
|
+
z.xor([
|
|
1003
|
+
z.object({
|
|
1004
|
+
numberInputOptions: z.never().optional(),
|
|
1005
|
+
ratingInputOptions: z.never().optional()
|
|
1006
|
+
}),
|
|
1007
|
+
z.object({
|
|
1008
|
+
ratingInputOptions: z.never().optional(),
|
|
1009
|
+
numberInputOptions: z.object({
|
|
1010
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
1011
|
+
description: z.any().describe(
|
|
1012
|
+
"Additional description or instructions for the field."
|
|
1013
|
+
).optional(),
|
|
1014
|
+
placeholder: z.string().describe(
|
|
1015
|
+
"Placeholder text shown inside the field when it's empty."
|
|
1016
|
+
).max(100).optional().nullable(),
|
|
1017
|
+
showLabel: z.boolean().describe(
|
|
1018
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
1019
|
+
).optional().nullable(),
|
|
1020
|
+
default: z.number().describe(
|
|
1021
|
+
"Default value for the field. This value is pre-populated in the field when the form loads."
|
|
1022
|
+
).optional().nullable(),
|
|
1023
|
+
media: z.intersection(
|
|
1024
|
+
z.object({}),
|
|
1025
|
+
z.xor([
|
|
1026
|
+
z.object({
|
|
1027
|
+
image: z.never().optional()
|
|
1028
|
+
}),
|
|
1029
|
+
z.object({
|
|
1030
|
+
image: z.string().describe("WixMedia image.")
|
|
1031
|
+
})
|
|
1032
|
+
])
|
|
1033
|
+
).describe(
|
|
1034
|
+
"Media content associated with the field, such as an image."
|
|
1035
|
+
).optional(),
|
|
1036
|
+
mediaSettings: z.object({
|
|
1037
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
1038
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
1039
|
+
).optional(),
|
|
1040
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
1041
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
1042
|
+
).optional(),
|
|
1043
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
1044
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
1045
|
+
).optional()
|
|
1046
|
+
}).describe(
|
|
1047
|
+
"Configuration for the media content."
|
|
1048
|
+
).optional()
|
|
1049
|
+
}).describe("Number input settings.")
|
|
1050
|
+
}),
|
|
1051
|
+
z.object({
|
|
1052
|
+
numberInputOptions: z.never().optional(),
|
|
1053
|
+
ratingInputOptions: z.object({
|
|
1054
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
1055
|
+
description: z.any().describe(
|
|
1056
|
+
"Additional description or instructions for the field."
|
|
1057
|
+
).optional(),
|
|
1058
|
+
showLabel: z.boolean().describe(
|
|
1059
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
1060
|
+
).optional().nullable(),
|
|
1061
|
+
defaultValue: z.number().int().describe(
|
|
1062
|
+
"Default rating value for the field."
|
|
1063
|
+
).min(1).max(5).optional().nullable(),
|
|
1064
|
+
media: z.intersection(
|
|
1065
|
+
z.object({}),
|
|
1066
|
+
z.xor([
|
|
1067
|
+
z.object({
|
|
1068
|
+
image: z.never().optional()
|
|
1069
|
+
}),
|
|
1070
|
+
z.object({
|
|
1071
|
+
image: z.string().describe("WixMedia image.")
|
|
1072
|
+
})
|
|
1073
|
+
])
|
|
1074
|
+
).describe(
|
|
1075
|
+
"Media content associated with the field, such as an image."
|
|
1076
|
+
).optional(),
|
|
1077
|
+
mediaSettings: z.object({
|
|
1078
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
1079
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
1080
|
+
).optional(),
|
|
1081
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
1082
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
1083
|
+
).optional(),
|
|
1084
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
1085
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
1086
|
+
).optional()
|
|
1087
|
+
}).describe(
|
|
1088
|
+
"Configuration for the media content."
|
|
1089
|
+
).optional()
|
|
1090
|
+
}).describe("Rating input settings.")
|
|
1091
|
+
})
|
|
1092
|
+
])
|
|
1093
|
+
).describe("Number input field settings.")
|
|
1094
|
+
}),
|
|
1095
|
+
z.object({
|
|
1096
|
+
stringOptions: z.never().optional(),
|
|
1097
|
+
numberOptions: z.never().optional(),
|
|
1098
|
+
arrayOptions: z.never().optional(),
|
|
1099
|
+
objectOptions: z.never().optional(),
|
|
1100
|
+
wixFileOptions: z.never().optional(),
|
|
1101
|
+
paymentOptions: z.never().optional(),
|
|
1102
|
+
schedulingOptions: z.never().optional(),
|
|
1103
|
+
addressOptions: z.never().optional(),
|
|
1104
|
+
booleanOptions: z.intersection(
|
|
1105
|
+
z.object({
|
|
1106
|
+
validation: z.object({
|
|
1107
|
+
enum: z.array(z.boolean()).max(2).optional()
|
|
1108
|
+
}).describe(
|
|
1109
|
+
"Validation configuration for the boolean input."
|
|
1110
|
+
).optional(),
|
|
1111
|
+
componentType: z.enum(["UNKNOWN_COMPONENT_TYPE", "CHECKBOX"]).describe(
|
|
1112
|
+
"Component type of the boolean input field."
|
|
1113
|
+
).optional()
|
|
1114
|
+
}),
|
|
1115
|
+
z.xor([
|
|
1116
|
+
z.object({
|
|
1117
|
+
checkboxOptions: z.never().optional()
|
|
1118
|
+
}),
|
|
1119
|
+
z.object({
|
|
1120
|
+
checkboxOptions: z.object({
|
|
1121
|
+
label: z.any().describe("Field label.").optional(),
|
|
1122
|
+
checked: z.boolean().describe(
|
|
1123
|
+
"Whether the checkbox is selected by default when the form loads.\n\nDefault: `false`"
|
|
1124
|
+
).optional()
|
|
1125
|
+
}).describe("Checkbox component settings.")
|
|
1126
|
+
})
|
|
1127
|
+
])
|
|
1128
|
+
).describe("Boolean input field settings.")
|
|
1129
|
+
}),
|
|
1130
|
+
z.object({
|
|
1131
|
+
stringOptions: z.never().optional(),
|
|
1132
|
+
numberOptions: z.never().optional(),
|
|
1133
|
+
booleanOptions: z.never().optional(),
|
|
1134
|
+
objectOptions: z.never().optional(),
|
|
1135
|
+
wixFileOptions: z.never().optional(),
|
|
1136
|
+
paymentOptions: z.never().optional(),
|
|
1137
|
+
schedulingOptions: z.never().optional(),
|
|
1138
|
+
addressOptions: z.never().optional(),
|
|
1139
|
+
arrayOptions: z.intersection(
|
|
1140
|
+
z.object({
|
|
1141
|
+
validation: z.object({
|
|
1142
|
+
maxItems: z.number().int().describe(
|
|
1143
|
+
"Maximum number of elements allowed in the array."
|
|
1144
|
+
).min(0).max(1e3).optional().nullable(),
|
|
1145
|
+
minItems: z.number().int().describe(
|
|
1146
|
+
"Minimum number of elements required in the array."
|
|
1147
|
+
).min(0).max(1e3).optional().nullable(),
|
|
1148
|
+
items: z.intersection(
|
|
1149
|
+
z.object({
|
|
1150
|
+
itemType: z.enum([
|
|
1151
|
+
"STRING",
|
|
1152
|
+
"NUMBER",
|
|
1153
|
+
"BOOLEAN"
|
|
1154
|
+
]).describe("Allowed item type.").optional()
|
|
1155
|
+
}),
|
|
1156
|
+
z.xor([
|
|
1157
|
+
z.object({
|
|
1158
|
+
stringOptions: z.never().optional(),
|
|
1159
|
+
numberOptions: z.never().optional(),
|
|
1160
|
+
booleanOptions: z.never().optional()
|
|
1161
|
+
}),
|
|
1162
|
+
z.object({
|
|
1163
|
+
numberOptions: z.never().optional(),
|
|
1164
|
+
booleanOptions: z.never().optional(),
|
|
1165
|
+
stringOptions: z.intersection(
|
|
1166
|
+
z.object({
|
|
1167
|
+
minLength: z.number().int().describe(
|
|
1168
|
+
"Minimum required length for the string value."
|
|
1169
|
+
).min(0).max(2e4).optional().nullable(),
|
|
1170
|
+
maxLength: z.number().int().describe(
|
|
1171
|
+
"Maximum allowed length for the string value."
|
|
1172
|
+
).min(0).max(2e4).optional().nullable(),
|
|
1173
|
+
pattern: z.string().describe(
|
|
1174
|
+
"Regular expression pattern that the string value must match."
|
|
1175
|
+
).max(500).optional().nullable(),
|
|
1176
|
+
format: z.enum([
|
|
1177
|
+
"UNKNOWN_FORMAT",
|
|
1178
|
+
"DATE",
|
|
1179
|
+
"TIME",
|
|
1180
|
+
"DATE_TIME",
|
|
1181
|
+
"EMAIL",
|
|
1182
|
+
"URL",
|
|
1183
|
+
"UUID",
|
|
1184
|
+
"PHONE",
|
|
1185
|
+
"URI",
|
|
1186
|
+
"HOSTNAME",
|
|
1187
|
+
"COLOR_HEX",
|
|
1188
|
+
"CURRENCY",
|
|
1189
|
+
"LANGUAGE",
|
|
1190
|
+
"DATE_OPTIONAL_TIME"
|
|
1191
|
+
]).describe(
|
|
1192
|
+
"Expected format of the string value."
|
|
1193
|
+
).optional(),
|
|
1194
|
+
enum: z.array(z.string()).max(500).optional(),
|
|
1195
|
+
validationMessages: z.object({
|
|
1196
|
+
pattern: z.string().describe(
|
|
1197
|
+
"Error message shown when the pattern validation fails.\n\nThis message is displayed to users when their input doesn't match the specified regex pattern."
|
|
1198
|
+
).max(200).optional().nullable()
|
|
1199
|
+
}).describe(
|
|
1200
|
+
"Custom error messages displayed when validation fails."
|
|
1201
|
+
).optional()
|
|
1202
|
+
}),
|
|
1203
|
+
z.xor([
|
|
1204
|
+
z.object({
|
|
1205
|
+
dateOptions: z.never().optional(),
|
|
1206
|
+
dateTimeOptions: z.never().optional(),
|
|
1207
|
+
timeOptions: z.never().optional(),
|
|
1208
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1209
|
+
phoneOptions: z.never().optional()
|
|
1210
|
+
}),
|
|
1211
|
+
z.object({
|
|
1212
|
+
dateTimeOptions: z.never().optional(),
|
|
1213
|
+
timeOptions: z.never().optional(),
|
|
1214
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1215
|
+
phoneOptions: z.never().optional(),
|
|
1216
|
+
dateOptions: z.object({
|
|
1217
|
+
availability: z.object({
|
|
1218
|
+
availableDates: z.array(
|
|
1219
|
+
z.object({
|
|
1220
|
+
start: z.string().describe(
|
|
1221
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1222
|
+
).optional(),
|
|
1223
|
+
end: z.string().describe(
|
|
1224
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1225
|
+
).optional()
|
|
1226
|
+
})
|
|
1227
|
+
).min(0).max(5).optional(),
|
|
1228
|
+
unavailableDates: z.array(
|
|
1229
|
+
z.object({
|
|
1230
|
+
start: z.string().describe(
|
|
1231
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1232
|
+
).optional(),
|
|
1233
|
+
end: z.string().describe(
|
|
1234
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1235
|
+
).optional()
|
|
1236
|
+
})
|
|
1237
|
+
).min(0).max(5).optional(),
|
|
1238
|
+
availableDays: z.array(
|
|
1239
|
+
z.enum([
|
|
1240
|
+
"MONDAY",
|
|
1241
|
+
"TUESDAY",
|
|
1242
|
+
"WEDNESDAY",
|
|
1243
|
+
"THURSDAY",
|
|
1244
|
+
"FRIDAY",
|
|
1245
|
+
"SATURDAY",
|
|
1246
|
+
"SUNDAY"
|
|
1247
|
+
])
|
|
1248
|
+
).min(0).max(7).optional()
|
|
1249
|
+
}).describe(
|
|
1250
|
+
"Allows to specify available and unavailable dates and days of the week.\nIf unset, all dates from minimum to maximum are available."
|
|
1251
|
+
).optional(),
|
|
1252
|
+
minimum: z.string().describe(
|
|
1253
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
1254
|
+
).max(50).optional().nullable(),
|
|
1255
|
+
maximum: z.string().describe(
|
|
1256
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
1257
|
+
).max(50).optional().nullable()
|
|
1258
|
+
}).describe(
|
|
1259
|
+
"Validation rules for strings with date format."
|
|
1260
|
+
)
|
|
1261
|
+
}),
|
|
1262
|
+
z.object({
|
|
1263
|
+
dateOptions: z.never().optional(),
|
|
1264
|
+
timeOptions: z.never().optional(),
|
|
1265
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1266
|
+
phoneOptions: z.never().optional(),
|
|
1267
|
+
dateTimeOptions: z.object({
|
|
1268
|
+
minimum: z.string().describe(
|
|
1269
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1270
|
+
).max(50).optional().nullable(),
|
|
1271
|
+
maximum: z.string().describe(
|
|
1272
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1273
|
+
).max(50).optional().nullable()
|
|
1274
|
+
}).describe(
|
|
1275
|
+
"Validation rules for strings with date and time format."
|
|
1276
|
+
)
|
|
1277
|
+
}),
|
|
1278
|
+
z.object({
|
|
1279
|
+
dateOptions: z.never().optional(),
|
|
1280
|
+
dateTimeOptions: z.never().optional(),
|
|
1281
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1282
|
+
phoneOptions: z.never().optional(),
|
|
1283
|
+
timeOptions: z.object({
|
|
1284
|
+
minimum: z.string().describe(
|
|
1285
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1286
|
+
).max(50).optional().nullable(),
|
|
1287
|
+
maximum: z.string().describe(
|
|
1288
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1289
|
+
).max(50).optional().nullable()
|
|
1290
|
+
}).describe(
|
|
1291
|
+
"Validation rules for strings with time format."
|
|
1292
|
+
)
|
|
1293
|
+
}),
|
|
1294
|
+
z.object({
|
|
1295
|
+
dateOptions: z.never().optional(),
|
|
1296
|
+
dateTimeOptions: z.never().optional(),
|
|
1297
|
+
timeOptions: z.never().optional(),
|
|
1298
|
+
phoneOptions: z.never().optional(),
|
|
1299
|
+
dateOptionalTimeOptions: z.object({
|
|
1300
|
+
minimum: z.string().describe(
|
|
1301
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1302
|
+
).max(50).optional().nullable(),
|
|
1303
|
+
maximum: z.string().describe(
|
|
1304
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1305
|
+
).max(50).optional().nullable()
|
|
1306
|
+
}).describe(
|
|
1307
|
+
"Validation rules for string with date and time format, where time is optional."
|
|
1308
|
+
)
|
|
1309
|
+
}),
|
|
1310
|
+
z.object({
|
|
1311
|
+
dateOptions: z.never().optional(),
|
|
1312
|
+
dateTimeOptions: z.never().optional(),
|
|
1313
|
+
timeOptions: z.never().optional(),
|
|
1314
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1315
|
+
phoneOptions: z.object({
|
|
1316
|
+
allowedCountryCodes: z.array(z.string()).max(250).optional()
|
|
1317
|
+
}).describe(
|
|
1318
|
+
"Validation rules for strings with phone number format."
|
|
1319
|
+
)
|
|
1320
|
+
})
|
|
1321
|
+
])
|
|
1322
|
+
).describe(
|
|
1323
|
+
"Validation rules for string array elements."
|
|
1324
|
+
)
|
|
1325
|
+
}),
|
|
1326
|
+
z.object({
|
|
1327
|
+
stringOptions: z.never().optional(),
|
|
1328
|
+
booleanOptions: z.never().optional(),
|
|
1329
|
+
numberOptions: z.object({
|
|
1330
|
+
maximum: z.number().describe(
|
|
1331
|
+
"The maximum value of the number. Inclusive."
|
|
1332
|
+
).optional().nullable(),
|
|
1333
|
+
minimum: z.number().describe(
|
|
1334
|
+
"The minimum value of the number. Inclusive."
|
|
1335
|
+
).optional().nullable(),
|
|
1336
|
+
multipleOf: z.number().describe(
|
|
1337
|
+
"A number that the value must be a multiple of."
|
|
1338
|
+
).optional().nullable(),
|
|
1339
|
+
enum: z.array(z.number()).max(500).optional()
|
|
1340
|
+
}).describe(
|
|
1341
|
+
"Validation rules for numeric array elements."
|
|
1342
|
+
)
|
|
1343
|
+
}),
|
|
1344
|
+
z.object({
|
|
1345
|
+
stringOptions: z.never().optional(),
|
|
1346
|
+
numberOptions: z.never().optional(),
|
|
1347
|
+
booleanOptions: z.object({
|
|
1348
|
+
enum: z.array(z.boolean()).max(2).optional()
|
|
1349
|
+
}).describe(
|
|
1350
|
+
"Validation rules for boolean array elements."
|
|
1351
|
+
)
|
|
1352
|
+
})
|
|
1353
|
+
])
|
|
1354
|
+
).describe(
|
|
1355
|
+
"Type of items allowed in the array."
|
|
1356
|
+
).optional()
|
|
1357
|
+
}).describe(
|
|
1358
|
+
"Validation configuration for the array input."
|
|
1359
|
+
).optional(),
|
|
1360
|
+
componentType: z.enum([
|
|
1361
|
+
"UNKNOWN_COMPONENT_TYPE",
|
|
1362
|
+
"CHECKBOX_GROUP",
|
|
1363
|
+
"TAGS",
|
|
1364
|
+
"SERVICES_CHECKBOX_GROUP"
|
|
1365
|
+
]).describe(
|
|
1366
|
+
"Component type of the array input field."
|
|
1367
|
+
).optional()
|
|
1368
|
+
}),
|
|
1369
|
+
z.xor([
|
|
1370
|
+
z.object({
|
|
1371
|
+
checkboxGroupOptions: z.never().optional(),
|
|
1372
|
+
tagsOptions: z.never().optional(),
|
|
1373
|
+
servicesCheckboxGroupOptions: z.never().optional()
|
|
1374
|
+
}),
|
|
1375
|
+
z.object({
|
|
1376
|
+
tagsOptions: z.never().optional(),
|
|
1377
|
+
servicesCheckboxGroupOptions: z.never().optional(),
|
|
1378
|
+
checkboxGroupOptions: z.object({
|
|
1379
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
1380
|
+
description: z.any().describe(
|
|
1381
|
+
"Additional description or instructions for the field."
|
|
1382
|
+
).optional(),
|
|
1383
|
+
options: z.array(
|
|
1384
|
+
z.object({
|
|
1385
|
+
label: z.string().describe(
|
|
1386
|
+
"Selectable option label."
|
|
1387
|
+
).max(400).optional().nullable(),
|
|
1388
|
+
value: z.any().describe(
|
|
1389
|
+
"Value stored on submission when this option is selected."
|
|
1390
|
+
).optional().nullable(),
|
|
1391
|
+
default: z.boolean().describe(
|
|
1392
|
+
"Whether this option is selected by default."
|
|
1393
|
+
).optional(),
|
|
1394
|
+
_id: z.string().describe(
|
|
1395
|
+
"Option ID. Can be used to connect this option with [Wix Multilingual](https://dev.wix.com/docs/api-reference/business-management/multilingual/translation/introduction) for translation."
|
|
1396
|
+
).regex(
|
|
1397
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1398
|
+
"Must be a valid GUID"
|
|
1399
|
+
).optional(),
|
|
1400
|
+
media: z.intersection(
|
|
1401
|
+
z.object({}),
|
|
1402
|
+
z.xor([
|
|
1403
|
+
z.object({
|
|
1404
|
+
image: z.never().optional()
|
|
1405
|
+
}),
|
|
1406
|
+
z.object({
|
|
1407
|
+
image: z.string().describe(
|
|
1408
|
+
"WixMedia image."
|
|
1409
|
+
)
|
|
1410
|
+
})
|
|
1411
|
+
])
|
|
1412
|
+
).describe(
|
|
1413
|
+
"Media content associated with this option."
|
|
1414
|
+
).optional(),
|
|
1415
|
+
showLabel: z.boolean().describe(
|
|
1416
|
+
"Whether to display the option label.\n\nDefault: `true`"
|
|
1417
|
+
).optional().nullable()
|
|
1418
|
+
})
|
|
1419
|
+
).max(400).optional(),
|
|
1420
|
+
showLabel: z.boolean().describe(
|
|
1421
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
1422
|
+
).optional().nullable(),
|
|
1423
|
+
customOption: z.object({
|
|
1424
|
+
label: z.string().describe("Custom option label.").max(350).optional().nullable(),
|
|
1425
|
+
placeholder: z.string().describe(
|
|
1426
|
+
"Custom option placeholder text."
|
|
1427
|
+
).max(100).optional().nullable()
|
|
1428
|
+
}).describe(
|
|
1429
|
+
"Custom option which can be specified by the submitter."
|
|
1430
|
+
).optional(),
|
|
1431
|
+
numberOfColumns: z.enum(["ONE", "TWO", "THREE", "ZERO"]).describe(
|
|
1432
|
+
"Specifies the number of columns used to display the selections within the component.\n\nDefault: `ONE`"
|
|
1433
|
+
).optional(),
|
|
1434
|
+
media: z.intersection(
|
|
1435
|
+
z.object({}),
|
|
1436
|
+
z.xor([
|
|
1437
|
+
z.object({
|
|
1438
|
+
image: z.never().optional()
|
|
1439
|
+
}),
|
|
1440
|
+
z.object({
|
|
1441
|
+
image: z.string().describe("WixMedia image.")
|
|
1442
|
+
})
|
|
1443
|
+
])
|
|
1444
|
+
).describe(
|
|
1445
|
+
"Media content associated with the field, such as an image."
|
|
1446
|
+
).optional(),
|
|
1447
|
+
mediaSettings: z.object({
|
|
1448
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
1449
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
1450
|
+
).optional(),
|
|
1451
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
1452
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
1453
|
+
).optional(),
|
|
1454
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
1455
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
1456
|
+
).optional()
|
|
1457
|
+
}).describe(
|
|
1458
|
+
"Configuration for the media content."
|
|
1459
|
+
).optional(),
|
|
1460
|
+
optionsMediaSettings: z.object({
|
|
1461
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
1462
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
1463
|
+
).optional(),
|
|
1464
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
1465
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
1466
|
+
).optional()
|
|
1467
|
+
}).describe(
|
|
1468
|
+
"Display settings for `Option.media`, applied uniformly to all options."
|
|
1469
|
+
).optional()
|
|
1470
|
+
}).describe(
|
|
1471
|
+
"Checkbox group component settings."
|
|
1472
|
+
)
|
|
1473
|
+
}),
|
|
1474
|
+
z.object({
|
|
1475
|
+
checkboxGroupOptions: z.never().optional(),
|
|
1476
|
+
servicesCheckboxGroupOptions: z.never().optional(),
|
|
1477
|
+
tagsOptions: z.object({
|
|
1478
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
1479
|
+
description: z.any().describe(
|
|
1480
|
+
"Additional description or instructions for the field."
|
|
1481
|
+
).optional(),
|
|
1482
|
+
options: z.array(
|
|
1483
|
+
z.object({
|
|
1484
|
+
label: z.string().describe(
|
|
1485
|
+
"Selectable option label."
|
|
1486
|
+
).max(400).optional().nullable(),
|
|
1487
|
+
value: z.any().describe(
|
|
1488
|
+
"Value stored on submission when this option is selected."
|
|
1489
|
+
).optional().nullable(),
|
|
1490
|
+
default: z.boolean().describe(
|
|
1491
|
+
"Flag identifying that option should be selected by default."
|
|
1492
|
+
).optional(),
|
|
1493
|
+
_id: z.string().describe(
|
|
1494
|
+
"Option id. Used as binding for translations"
|
|
1495
|
+
).regex(
|
|
1496
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1497
|
+
"Must be a valid GUID"
|
|
1498
|
+
).optional(),
|
|
1499
|
+
media: z.intersection(
|
|
1500
|
+
z.object({}),
|
|
1501
|
+
z.xor([
|
|
1502
|
+
z.object({
|
|
1503
|
+
image: z.never().optional()
|
|
1504
|
+
}),
|
|
1505
|
+
z.object({
|
|
1506
|
+
image: z.string().describe(
|
|
1507
|
+
"WixMedia image."
|
|
1508
|
+
)
|
|
1509
|
+
})
|
|
1510
|
+
])
|
|
1511
|
+
).describe(
|
|
1512
|
+
"Media content associated with the option, such as an image."
|
|
1513
|
+
).optional()
|
|
1514
|
+
})
|
|
1515
|
+
).max(400).optional(),
|
|
1516
|
+
showLabel: z.boolean().describe(
|
|
1517
|
+
"Whether to display the label.\n\nDefault: `true`"
|
|
1518
|
+
).optional().nullable(),
|
|
1519
|
+
customOption: z.object({
|
|
1520
|
+
label: z.string().describe("Custom option label.").max(350).optional().nullable(),
|
|
1521
|
+
placeholder: z.string().describe(
|
|
1522
|
+
"Custom option placeholder text."
|
|
1523
|
+
).max(100).optional().nullable()
|
|
1524
|
+
}).describe(
|
|
1525
|
+
"Custom option which can be specified by the submitter."
|
|
1526
|
+
).optional(),
|
|
1527
|
+
numberOfColumns: z.enum(["ONE", "TWO", "THREE", "ZERO"]).describe(
|
|
1528
|
+
"Specifies the number of columns used to display the selections within the component.\n\nDefault: `ONE`"
|
|
1529
|
+
).optional(),
|
|
1530
|
+
media: z.intersection(
|
|
1531
|
+
z.object({}),
|
|
1532
|
+
z.xor([
|
|
1533
|
+
z.object({
|
|
1534
|
+
image: z.never().optional()
|
|
1535
|
+
}),
|
|
1536
|
+
z.object({
|
|
1537
|
+
image: z.string().describe("WixMedia image.")
|
|
1538
|
+
})
|
|
1539
|
+
])
|
|
1540
|
+
).describe(
|
|
1541
|
+
"Media item. Media, associated with field, like image."
|
|
1542
|
+
).optional(),
|
|
1543
|
+
mediaSettings: z.object({
|
|
1544
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
1545
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
1546
|
+
).optional(),
|
|
1547
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
1548
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
1549
|
+
).optional(),
|
|
1550
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
1551
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
1552
|
+
).optional()
|
|
1553
|
+
}).describe(
|
|
1554
|
+
"Configuration for the media item."
|
|
1555
|
+
).optional()
|
|
1556
|
+
}).describe("Tags component settings.")
|
|
1557
|
+
}),
|
|
1558
|
+
z.object({
|
|
1559
|
+
checkboxGroupOptions: z.never().optional(),
|
|
1560
|
+
tagsOptions: z.never().optional(),
|
|
1561
|
+
servicesCheckboxGroupOptions: z.object({
|
|
1562
|
+
label: z.string().describe("Label of the field").max(350).optional().nullable(),
|
|
1563
|
+
description: z.any().describe("Description of the field").optional(),
|
|
1564
|
+
options: z.array(
|
|
1565
|
+
z.object({
|
|
1566
|
+
label: z.string().describe("Service name/label").max(400).optional().nullable(),
|
|
1567
|
+
_id: z.string().describe(
|
|
1568
|
+
"Option id. Used as binding for translations. Corresponds to the Service ID."
|
|
1569
|
+
).regex(
|
|
1570
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1571
|
+
"Must be a valid GUID"
|
|
1572
|
+
).optional(),
|
|
1573
|
+
value: z.string().describe(
|
|
1574
|
+
"Selectable option value, which is saved to DB. Corresponds to the Service ID."
|
|
1575
|
+
).regex(
|
|
1576
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1577
|
+
"Must be a valid GUID"
|
|
1578
|
+
).optional().nullable()
|
|
1579
|
+
})
|
|
1580
|
+
).max(100).optional(),
|
|
1581
|
+
showLabel: z.boolean().describe(
|
|
1582
|
+
"Flag identifying to hide or not label\nDefault: true"
|
|
1583
|
+
).optional().nullable(),
|
|
1584
|
+
customOption: z.object({
|
|
1585
|
+
label: z.string().describe("Custom option label.").max(350).optional().nullable(),
|
|
1586
|
+
placeholder: z.string().describe(
|
|
1587
|
+
"Custom option placeholder text."
|
|
1588
|
+
).max(100).optional().nullable()
|
|
1589
|
+
}).describe(
|
|
1590
|
+
"Option which can be specified by UoU, enabled when this object is specified."
|
|
1591
|
+
).optional(),
|
|
1592
|
+
numberOfColumns: z.enum(["ONE", "TWO", "THREE", "ZERO"]).describe(
|
|
1593
|
+
"Specifies the number of columns used to display the selections within the component.\nDefault: ONE"
|
|
1594
|
+
).optional()
|
|
1595
|
+
}).describe(
|
|
1596
|
+
"Services checkbox group input field"
|
|
1597
|
+
)
|
|
1598
|
+
})
|
|
1599
|
+
])
|
|
1600
|
+
).describe("Array input field settings.")
|
|
1601
|
+
}),
|
|
1602
|
+
z.object({
|
|
1603
|
+
stringOptions: z.never().optional(),
|
|
1604
|
+
numberOptions: z.never().optional(),
|
|
1605
|
+
booleanOptions: z.never().optional(),
|
|
1606
|
+
arrayOptions: z.never().optional(),
|
|
1607
|
+
wixFileOptions: z.never().optional(),
|
|
1608
|
+
paymentOptions: z.never().optional(),
|
|
1609
|
+
schedulingOptions: z.never().optional(),
|
|
1610
|
+
addressOptions: z.never().optional(),
|
|
1611
|
+
objectOptions: z.object({
|
|
1612
|
+
validation: z.object({
|
|
1613
|
+
properties: z.record(
|
|
1614
|
+
z.string(),
|
|
1615
|
+
z.intersection(
|
|
1616
|
+
z.object({
|
|
1617
|
+
propertiesType: z.enum([
|
|
1618
|
+
"STRING",
|
|
1619
|
+
"NUMBER",
|
|
1620
|
+
"BOOLEAN",
|
|
1621
|
+
"ARRAY"
|
|
1622
|
+
]).describe(
|
|
1623
|
+
"Data type of the object property."
|
|
1624
|
+
).optional(),
|
|
1625
|
+
required: z.boolean().describe(
|
|
1626
|
+
"Whether the object property is required for validation."
|
|
1627
|
+
).optional()
|
|
1628
|
+
}),
|
|
1629
|
+
z.xor([
|
|
1630
|
+
z.object({
|
|
1631
|
+
stringOptions: z.never().optional(),
|
|
1632
|
+
numberOptions: z.never().optional(),
|
|
1633
|
+
booleanOptions: z.never().optional(),
|
|
1634
|
+
arrayOptions: z.never().optional()
|
|
1635
|
+
}),
|
|
1636
|
+
z.object({
|
|
1637
|
+
numberOptions: z.never().optional(),
|
|
1638
|
+
booleanOptions: z.never().optional(),
|
|
1639
|
+
arrayOptions: z.never().optional(),
|
|
1640
|
+
stringOptions: z.intersection(
|
|
1641
|
+
z.object({
|
|
1642
|
+
minLength: z.number().int().describe(
|
|
1643
|
+
"Minimum required length for the string value."
|
|
1644
|
+
).min(0).max(2e4).optional().nullable(),
|
|
1645
|
+
maxLength: z.number().int().describe(
|
|
1646
|
+
"Maximum allowed length for the string value."
|
|
1647
|
+
).min(0).max(2e4).optional().nullable(),
|
|
1648
|
+
pattern: z.string().describe(
|
|
1649
|
+
"Regular expression pattern that the string value must match."
|
|
1650
|
+
).max(500).optional().nullable(),
|
|
1651
|
+
format: z.enum([
|
|
1652
|
+
"UNKNOWN_FORMAT",
|
|
1653
|
+
"DATE",
|
|
1654
|
+
"TIME",
|
|
1655
|
+
"DATE_TIME",
|
|
1656
|
+
"EMAIL",
|
|
1657
|
+
"URL",
|
|
1658
|
+
"UUID",
|
|
1659
|
+
"PHONE",
|
|
1660
|
+
"URI",
|
|
1661
|
+
"HOSTNAME",
|
|
1662
|
+
"COLOR_HEX",
|
|
1663
|
+
"CURRENCY",
|
|
1664
|
+
"LANGUAGE",
|
|
1665
|
+
"DATE_OPTIONAL_TIME"
|
|
1666
|
+
]).describe(
|
|
1667
|
+
"Expected format of the string value."
|
|
1668
|
+
).optional(),
|
|
1669
|
+
enum: z.array(z.string()).max(500).optional(),
|
|
1670
|
+
validationMessages: z.object({
|
|
1671
|
+
pattern: z.string().describe(
|
|
1672
|
+
"Error message shown when the pattern validation fails.\n\nThis message is displayed to users when their input doesn't match the specified regex pattern."
|
|
1673
|
+
).max(200).optional().nullable()
|
|
1674
|
+
}).describe(
|
|
1675
|
+
"Custom error messages displayed when validation fails."
|
|
1676
|
+
).optional()
|
|
1677
|
+
}),
|
|
1678
|
+
z.xor([
|
|
1679
|
+
z.object({
|
|
1680
|
+
dateOptions: z.never().optional(),
|
|
1681
|
+
dateTimeOptions: z.never().optional(),
|
|
1682
|
+
timeOptions: z.never().optional(),
|
|
1683
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1684
|
+
phoneOptions: z.never().optional()
|
|
1685
|
+
}),
|
|
1686
|
+
z.object({
|
|
1687
|
+
dateTimeOptions: z.never().optional(),
|
|
1688
|
+
timeOptions: z.never().optional(),
|
|
1689
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1690
|
+
phoneOptions: z.never().optional(),
|
|
1691
|
+
dateOptions: z.object({
|
|
1692
|
+
availability: z.object({
|
|
1693
|
+
availableDates: z.array(
|
|
1694
|
+
z.object({
|
|
1695
|
+
start: z.string().describe(
|
|
1696
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1697
|
+
).optional(),
|
|
1698
|
+
end: z.string().describe(
|
|
1699
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1700
|
+
).optional()
|
|
1701
|
+
})
|
|
1702
|
+
).min(0).max(5).optional(),
|
|
1703
|
+
unavailableDates: z.array(
|
|
1704
|
+
z.object({
|
|
1705
|
+
start: z.string().describe(
|
|
1706
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1707
|
+
).optional(),
|
|
1708
|
+
end: z.string().describe(
|
|
1709
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1710
|
+
).optional()
|
|
1711
|
+
})
|
|
1712
|
+
).min(0).max(5).optional(),
|
|
1713
|
+
availableDays: z.array(
|
|
1714
|
+
z.enum([
|
|
1715
|
+
"MONDAY",
|
|
1716
|
+
"TUESDAY",
|
|
1717
|
+
"WEDNESDAY",
|
|
1718
|
+
"THURSDAY",
|
|
1719
|
+
"FRIDAY",
|
|
1720
|
+
"SATURDAY",
|
|
1721
|
+
"SUNDAY"
|
|
1722
|
+
])
|
|
1723
|
+
).min(0).max(7).optional()
|
|
1724
|
+
}).describe(
|
|
1725
|
+
"Allows to specify available and unavailable dates and days of the week.\nIf unset, all dates from minimum to maximum are available."
|
|
1726
|
+
).optional(),
|
|
1727
|
+
minimum: z.string().describe(
|
|
1728
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
1729
|
+
).max(50).optional().nullable(),
|
|
1730
|
+
maximum: z.string().describe(
|
|
1731
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
1732
|
+
).max(50).optional().nullable()
|
|
1733
|
+
}).describe(
|
|
1734
|
+
"Validation rules for strings with date format."
|
|
1735
|
+
)
|
|
1736
|
+
}),
|
|
1737
|
+
z.object({
|
|
1738
|
+
dateOptions: z.never().optional(),
|
|
1739
|
+
timeOptions: z.never().optional(),
|
|
1740
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1741
|
+
phoneOptions: z.never().optional(),
|
|
1742
|
+
dateTimeOptions: z.object({
|
|
1743
|
+
minimum: z.string().describe(
|
|
1744
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1745
|
+
).max(50).optional().nullable(),
|
|
1746
|
+
maximum: z.string().describe(
|
|
1747
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1748
|
+
).max(50).optional().nullable()
|
|
1749
|
+
}).describe(
|
|
1750
|
+
"Validation rules for strings with date and time format."
|
|
1751
|
+
)
|
|
1752
|
+
}),
|
|
1753
|
+
z.object({
|
|
1754
|
+
dateOptions: z.never().optional(),
|
|
1755
|
+
dateTimeOptions: z.never().optional(),
|
|
1756
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1757
|
+
phoneOptions: z.never().optional(),
|
|
1758
|
+
timeOptions: z.object({
|
|
1759
|
+
minimum: z.string().describe(
|
|
1760
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1761
|
+
).max(50).optional().nullable(),
|
|
1762
|
+
maximum: z.string().describe(
|
|
1763
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1764
|
+
).max(50).optional().nullable()
|
|
1765
|
+
}).describe(
|
|
1766
|
+
"Validation rules for strings with time format."
|
|
1767
|
+
)
|
|
1768
|
+
}),
|
|
1769
|
+
z.object({
|
|
1770
|
+
dateOptions: z.never().optional(),
|
|
1771
|
+
dateTimeOptions: z.never().optional(),
|
|
1772
|
+
timeOptions: z.never().optional(),
|
|
1773
|
+
phoneOptions: z.never().optional(),
|
|
1774
|
+
dateOptionalTimeOptions: z.object({
|
|
1775
|
+
minimum: z.string().describe(
|
|
1776
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1777
|
+
).max(50).optional().nullable(),
|
|
1778
|
+
maximum: z.string().describe(
|
|
1779
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1780
|
+
).max(50).optional().nullable()
|
|
1781
|
+
}).describe(
|
|
1782
|
+
"Validation rules for string with date and time format, where time is optional."
|
|
1783
|
+
)
|
|
1784
|
+
}),
|
|
1785
|
+
z.object({
|
|
1786
|
+
dateOptions: z.never().optional(),
|
|
1787
|
+
dateTimeOptions: z.never().optional(),
|
|
1788
|
+
timeOptions: z.never().optional(),
|
|
1789
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1790
|
+
phoneOptions: z.object({
|
|
1791
|
+
allowedCountryCodes: z.array(z.string()).max(250).optional()
|
|
1792
|
+
}).describe(
|
|
1793
|
+
"Validation rules for strings with phone number format."
|
|
1794
|
+
)
|
|
1795
|
+
})
|
|
1796
|
+
])
|
|
1797
|
+
).describe(
|
|
1798
|
+
"Validation rules for string properties."
|
|
1799
|
+
)
|
|
1800
|
+
}),
|
|
1801
|
+
z.object({
|
|
1802
|
+
stringOptions: z.never().optional(),
|
|
1803
|
+
booleanOptions: z.never().optional(),
|
|
1804
|
+
arrayOptions: z.never().optional(),
|
|
1805
|
+
numberOptions: z.object({
|
|
1806
|
+
maximum: z.number().describe(
|
|
1807
|
+
"The maximum value of the number. Inclusive."
|
|
1808
|
+
).optional().nullable(),
|
|
1809
|
+
minimum: z.number().describe(
|
|
1810
|
+
"The minimum value of the number. Inclusive."
|
|
1811
|
+
).optional().nullable(),
|
|
1812
|
+
multipleOf: z.number().describe(
|
|
1813
|
+
"A number that the value must be a multiple of."
|
|
1814
|
+
).optional().nullable(),
|
|
1815
|
+
enum: z.array(z.number()).max(500).optional()
|
|
1816
|
+
}).describe(
|
|
1817
|
+
"Validation rules for numeric properties."
|
|
1818
|
+
)
|
|
1819
|
+
}),
|
|
1820
|
+
z.object({
|
|
1821
|
+
stringOptions: z.never().optional(),
|
|
1822
|
+
numberOptions: z.never().optional(),
|
|
1823
|
+
arrayOptions: z.never().optional(),
|
|
1824
|
+
booleanOptions: z.object({
|
|
1825
|
+
enum: z.array(z.boolean()).max(2).optional()
|
|
1826
|
+
}).describe(
|
|
1827
|
+
"Validation rules for boolean properties."
|
|
1828
|
+
)
|
|
1829
|
+
}),
|
|
1830
|
+
z.object({
|
|
1831
|
+
stringOptions: z.never().optional(),
|
|
1832
|
+
numberOptions: z.never().optional(),
|
|
1833
|
+
booleanOptions: z.never().optional(),
|
|
1834
|
+
arrayOptions: z.object({
|
|
1835
|
+
maxItems: z.number().int().describe(
|
|
1836
|
+
"Maximum number of elements allowed in the array."
|
|
1837
|
+
).min(0).max(1e3).optional().nullable(),
|
|
1838
|
+
minItems: z.number().int().describe(
|
|
1839
|
+
"Minimum number of elements required in the array."
|
|
1840
|
+
).min(0).max(1e3).optional().nullable(),
|
|
1841
|
+
items: z.intersection(
|
|
1842
|
+
z.object({
|
|
1843
|
+
itemType: z.enum([
|
|
1844
|
+
"STRING",
|
|
1845
|
+
"NUMBER",
|
|
1846
|
+
"BOOLEAN"
|
|
1847
|
+
]).describe(
|
|
1848
|
+
"Allowed item type."
|
|
1849
|
+
).optional()
|
|
1850
|
+
}),
|
|
1851
|
+
z.xor([
|
|
1852
|
+
z.object({
|
|
1853
|
+
stringOptions: z.never().optional(),
|
|
1854
|
+
numberOptions: z.never().optional(),
|
|
1855
|
+
booleanOptions: z.never().optional()
|
|
1856
|
+
}),
|
|
1857
|
+
z.object({
|
|
1858
|
+
numberOptions: z.never().optional(),
|
|
1859
|
+
booleanOptions: z.never().optional(),
|
|
1860
|
+
stringOptions: z.intersection(
|
|
1861
|
+
z.object({
|
|
1862
|
+
minLength: z.number().int().describe(
|
|
1863
|
+
"Minimum required length for the string value."
|
|
1864
|
+
).min(0).max(2e4).optional().nullable(),
|
|
1865
|
+
maxLength: z.number().int().describe(
|
|
1866
|
+
"Maximum allowed length for the string value."
|
|
1867
|
+
).min(0).max(2e4).optional().nullable(),
|
|
1868
|
+
pattern: z.string().describe(
|
|
1869
|
+
"Regular expression pattern that the string value must match."
|
|
1870
|
+
).max(500).optional().nullable(),
|
|
1871
|
+
format: z.enum([
|
|
1872
|
+
"UNKNOWN_FORMAT",
|
|
1873
|
+
"DATE",
|
|
1874
|
+
"TIME",
|
|
1875
|
+
"DATE_TIME",
|
|
1876
|
+
"EMAIL",
|
|
1877
|
+
"URL",
|
|
1878
|
+
"UUID",
|
|
1879
|
+
"PHONE",
|
|
1880
|
+
"URI",
|
|
1881
|
+
"HOSTNAME",
|
|
1882
|
+
"COLOR_HEX",
|
|
1883
|
+
"CURRENCY",
|
|
1884
|
+
"LANGUAGE",
|
|
1885
|
+
"DATE_OPTIONAL_TIME"
|
|
1886
|
+
]).describe(
|
|
1887
|
+
"Expected format of the string value."
|
|
1888
|
+
).optional(),
|
|
1889
|
+
enum: z.array(
|
|
1890
|
+
z.string()
|
|
1891
|
+
).max(500).optional(),
|
|
1892
|
+
validationMessages: z.object({
|
|
1893
|
+
pattern: z.string().describe(
|
|
1894
|
+
"Error message shown when the pattern validation fails.\n\nThis message is displayed to users when their input doesn't match the specified regex pattern."
|
|
1895
|
+
).max(200).optional().nullable()
|
|
1896
|
+
}).describe(
|
|
1897
|
+
"Custom error messages displayed when validation fails."
|
|
1898
|
+
).optional()
|
|
1899
|
+
}),
|
|
1900
|
+
z.xor([
|
|
1901
|
+
z.object({
|
|
1902
|
+
dateOptions: z.never().optional(),
|
|
1903
|
+
dateTimeOptions: z.never().optional(),
|
|
1904
|
+
timeOptions: z.never().optional(),
|
|
1905
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1906
|
+
phoneOptions: z.never().optional()
|
|
1907
|
+
}),
|
|
1908
|
+
z.object({
|
|
1909
|
+
dateTimeOptions: z.never().optional(),
|
|
1910
|
+
timeOptions: z.never().optional(),
|
|
1911
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1912
|
+
phoneOptions: z.never().optional(),
|
|
1913
|
+
dateOptions: z.object({
|
|
1914
|
+
availability: z.object(
|
|
1915
|
+
{
|
|
1916
|
+
availableDates: z.array(
|
|
1917
|
+
z.object(
|
|
1918
|
+
{
|
|
1919
|
+
start: z.string().describe(
|
|
1920
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1921
|
+
).optional(),
|
|
1922
|
+
end: z.string().describe(
|
|
1923
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1924
|
+
).optional()
|
|
1925
|
+
}
|
|
1926
|
+
)
|
|
1927
|
+
).min(
|
|
1928
|
+
0
|
|
1929
|
+
).max(
|
|
1930
|
+
5
|
|
1931
|
+
).optional(),
|
|
1932
|
+
unavailableDates: z.array(
|
|
1933
|
+
z.object(
|
|
1934
|
+
{
|
|
1935
|
+
start: z.string().describe(
|
|
1936
|
+
"The beginning of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1937
|
+
).optional(),
|
|
1938
|
+
end: z.string().describe(
|
|
1939
|
+
"The end of the date range (inclusive). ISO 8601 date format (YYYY-MM-DD)."
|
|
1940
|
+
).optional()
|
|
1941
|
+
}
|
|
1942
|
+
)
|
|
1943
|
+
).min(
|
|
1944
|
+
0
|
|
1945
|
+
).max(
|
|
1946
|
+
5
|
|
1947
|
+
).optional(),
|
|
1948
|
+
availableDays: z.array(
|
|
1949
|
+
z.enum(
|
|
1950
|
+
[
|
|
1951
|
+
"MONDAY",
|
|
1952
|
+
"TUESDAY",
|
|
1953
|
+
"WEDNESDAY",
|
|
1954
|
+
"THURSDAY",
|
|
1955
|
+
"FRIDAY",
|
|
1956
|
+
"SATURDAY",
|
|
1957
|
+
"SUNDAY"
|
|
1958
|
+
]
|
|
1959
|
+
)
|
|
1960
|
+
).min(
|
|
1961
|
+
0
|
|
1962
|
+
).max(
|
|
1963
|
+
7
|
|
1964
|
+
).optional()
|
|
1965
|
+
}
|
|
1966
|
+
).describe(
|
|
1967
|
+
"Allows to specify available and unavailable dates and days of the week.\nIf unset, all dates from minimum to maximum are available."
|
|
1968
|
+
).optional(),
|
|
1969
|
+
minimum: z.string().describe(
|
|
1970
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
1971
|
+
).max(50).optional().nullable(),
|
|
1972
|
+
maximum: z.string().describe(
|
|
1973
|
+
'Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.\nThe dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])'
|
|
1974
|
+
).max(50).optional().nullable()
|
|
1975
|
+
}).describe(
|
|
1976
|
+
"Validation rules for strings with date format."
|
|
1977
|
+
)
|
|
1978
|
+
}),
|
|
1979
|
+
z.object({
|
|
1980
|
+
dateOptions: z.never().optional(),
|
|
1981
|
+
timeOptions: z.never().optional(),
|
|
1982
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1983
|
+
phoneOptions: z.never().optional(),
|
|
1984
|
+
dateTimeOptions: z.object({
|
|
1985
|
+
minimum: z.string().describe(
|
|
1986
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1987
|
+
).max(50).optional().nullable(),
|
|
1988
|
+
maximum: z.string().describe(
|
|
1989
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
1990
|
+
).max(50).optional().nullable()
|
|
1991
|
+
}).describe(
|
|
1992
|
+
"Validation rules for strings with date and time format."
|
|
1993
|
+
)
|
|
1994
|
+
}),
|
|
1995
|
+
z.object({
|
|
1996
|
+
dateOptions: z.never().optional(),
|
|
1997
|
+
dateTimeOptions: z.never().optional(),
|
|
1998
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
1999
|
+
phoneOptions: z.never().optional(),
|
|
2000
|
+
timeOptions: z.object({
|
|
2001
|
+
minimum: z.string().describe(
|
|
2002
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
2003
|
+
).max(50).optional().nullable(),
|
|
2004
|
+
maximum: z.string().describe(
|
|
2005
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
2006
|
+
).max(50).optional().nullable()
|
|
2007
|
+
}).describe(
|
|
2008
|
+
"Validation rules for strings with time format."
|
|
2009
|
+
)
|
|
2010
|
+
}),
|
|
2011
|
+
z.object({
|
|
2012
|
+
dateOptions: z.never().optional(),
|
|
2013
|
+
dateTimeOptions: z.never().optional(),
|
|
2014
|
+
timeOptions: z.never().optional(),
|
|
2015
|
+
phoneOptions: z.never().optional(),
|
|
2016
|
+
dateOptionalTimeOptions: z.object({
|
|
2017
|
+
minimum: z.string().describe(
|
|
2018
|
+
'Minimum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
2019
|
+
).max(50).optional().nullable(),
|
|
2020
|
+
maximum: z.string().describe(
|
|
2021
|
+
'Maximum allowed datetime value.\n\nSupports ISO datetime format or dynamic calculations using "$now" keyword.\nThe dynamic calculation supports times in the future and past.\nThe pattern for dynamic calculations: $now([+-]\\d{1,2})([yMdmh]).\n\nExamples: `"2023-01-01"`, `"$now-1d"` (1 day ago), `"$now+2h"` (2 hours from now).'
|
|
2022
|
+
).max(50).optional().nullable()
|
|
2023
|
+
}).describe(
|
|
2024
|
+
"Validation rules for string with date and time format, where time is optional."
|
|
2025
|
+
)
|
|
2026
|
+
}),
|
|
2027
|
+
z.object({
|
|
2028
|
+
dateOptions: z.never().optional(),
|
|
2029
|
+
dateTimeOptions: z.never().optional(),
|
|
2030
|
+
timeOptions: z.never().optional(),
|
|
2031
|
+
dateOptionalTimeOptions: z.never().optional(),
|
|
2032
|
+
phoneOptions: z.object({
|
|
2033
|
+
allowedCountryCodes: z.array(
|
|
2034
|
+
z.string()
|
|
2035
|
+
).max(
|
|
2036
|
+
250
|
|
2037
|
+
).optional()
|
|
2038
|
+
}).describe(
|
|
2039
|
+
"Validation rules for strings with phone number format."
|
|
2040
|
+
)
|
|
2041
|
+
})
|
|
2042
|
+
])
|
|
2043
|
+
).describe(
|
|
2044
|
+
"Validation rules for string array elements."
|
|
2045
|
+
)
|
|
2046
|
+
}),
|
|
2047
|
+
z.object({
|
|
2048
|
+
stringOptions: z.never().optional(),
|
|
2049
|
+
booleanOptions: z.never().optional(),
|
|
2050
|
+
numberOptions: z.object({
|
|
2051
|
+
maximum: z.number().describe(
|
|
2052
|
+
"The maximum value of the number. Inclusive."
|
|
2053
|
+
).optional().nullable(),
|
|
2054
|
+
minimum: z.number().describe(
|
|
2055
|
+
"The minimum value of the number. Inclusive."
|
|
2056
|
+
).optional().nullable(),
|
|
2057
|
+
multipleOf: z.number().describe(
|
|
2058
|
+
"A number that the value must be a multiple of."
|
|
2059
|
+
).optional().nullable(),
|
|
2060
|
+
enum: z.array(z.number()).max(500).optional()
|
|
2061
|
+
}).describe(
|
|
2062
|
+
"Validation rules for numeric array elements."
|
|
2063
|
+
)
|
|
2064
|
+
}),
|
|
2065
|
+
z.object({
|
|
2066
|
+
stringOptions: z.never().optional(),
|
|
2067
|
+
numberOptions: z.never().optional(),
|
|
2068
|
+
booleanOptions: z.object({
|
|
2069
|
+
enum: z.array(
|
|
2070
|
+
z.boolean()
|
|
2071
|
+
).max(2).optional()
|
|
2072
|
+
}).describe(
|
|
2073
|
+
"Validation rules for boolean array elements."
|
|
2074
|
+
)
|
|
2075
|
+
})
|
|
2076
|
+
])
|
|
2077
|
+
).describe(
|
|
2078
|
+
"Type of items allowed in the array."
|
|
2079
|
+
).optional()
|
|
2080
|
+
}).describe(
|
|
2081
|
+
"Validation rules for array properties."
|
|
2082
|
+
)
|
|
2083
|
+
})
|
|
2084
|
+
])
|
|
2085
|
+
)
|
|
2086
|
+
).describe(
|
|
2087
|
+
"Definition of object properties and their validation rules."
|
|
2088
|
+
).optional()
|
|
2089
|
+
}).describe(
|
|
2090
|
+
"Validation configuration for the object input."
|
|
2091
|
+
).optional()
|
|
2092
|
+
}).describe("Object input field settings.")
|
|
2093
|
+
}),
|
|
2094
|
+
z.object({
|
|
2095
|
+
stringOptions: z.never().optional(),
|
|
2096
|
+
numberOptions: z.never().optional(),
|
|
2097
|
+
booleanOptions: z.never().optional(),
|
|
2098
|
+
arrayOptions: z.never().optional(),
|
|
2099
|
+
objectOptions: z.never().optional(),
|
|
2100
|
+
paymentOptions: z.never().optional(),
|
|
2101
|
+
schedulingOptions: z.never().optional(),
|
|
2102
|
+
addressOptions: z.never().optional(),
|
|
2103
|
+
wixFileOptions: z.intersection(
|
|
2104
|
+
z.object({
|
|
2105
|
+
componentType: z.enum([
|
|
2106
|
+
"UNKNOWN_COMPONENT_TYPE",
|
|
2107
|
+
"FILE_UPLOAD",
|
|
2108
|
+
"SIGNATURE"
|
|
2109
|
+
]).describe(
|
|
2110
|
+
"Component type of the file input field."
|
|
2111
|
+
).optional(),
|
|
2112
|
+
validation: z.object({
|
|
2113
|
+
fileLimit: z.number().int().describe(
|
|
2114
|
+
"Maximum number of files that can be uploaded."
|
|
2115
|
+
).min(1).max(30).optional(),
|
|
2116
|
+
uploadFileFormats: z.array(
|
|
2117
|
+
z.enum([
|
|
2118
|
+
"VIDEO",
|
|
2119
|
+
"IMAGE",
|
|
2120
|
+
"AUDIO",
|
|
2121
|
+
"DOCUMENT",
|
|
2122
|
+
"ARCHIVE",
|
|
2123
|
+
"MODEL_3D"
|
|
2124
|
+
])
|
|
2125
|
+
).max(6).optional()
|
|
2126
|
+
}).describe(
|
|
2127
|
+
"Validation configuration for the file input."
|
|
2128
|
+
).optional()
|
|
2129
|
+
}),
|
|
2130
|
+
z.xor([
|
|
2131
|
+
z.object({
|
|
2132
|
+
fileUploadOptions: z.never().optional(),
|
|
2133
|
+
signatureOptions: z.never().optional()
|
|
2134
|
+
}),
|
|
2135
|
+
z.object({
|
|
2136
|
+
signatureOptions: z.never().optional(),
|
|
2137
|
+
fileUploadOptions: z.object({
|
|
2138
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
2139
|
+
description: z.any().describe(
|
|
2140
|
+
"Additional description or instructions for the field."
|
|
2141
|
+
).optional(),
|
|
2142
|
+
showLabel: z.boolean().describe(
|
|
2143
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
2144
|
+
).optional().nullable(),
|
|
2145
|
+
buttonText: z.string().describe(
|
|
2146
|
+
"Text displayed on the upload button."
|
|
2147
|
+
).max(500).optional().nullable(),
|
|
2148
|
+
explanationText: z.string().describe(
|
|
2149
|
+
"Custom text displayed when a file is uploaded. If not specified, the file name is shown."
|
|
2150
|
+
).max(255).optional().nullable(),
|
|
2151
|
+
media: z.intersection(
|
|
2152
|
+
z.object({}),
|
|
2153
|
+
z.xor([
|
|
2154
|
+
z.object({
|
|
2155
|
+
image: z.never().optional()
|
|
2156
|
+
}),
|
|
2157
|
+
z.object({
|
|
2158
|
+
image: z.string().describe("WixMedia image.")
|
|
2159
|
+
})
|
|
2160
|
+
])
|
|
2161
|
+
).describe(
|
|
2162
|
+
"Media content associated with the field, such as an image."
|
|
2163
|
+
).optional(),
|
|
2164
|
+
mediaSettings: z.object({
|
|
2165
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
2166
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
2167
|
+
).optional(),
|
|
2168
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
2169
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
2170
|
+
).optional(),
|
|
2171
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
2172
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
2173
|
+
).optional()
|
|
2174
|
+
}).describe(
|
|
2175
|
+
"Configuration for the media content."
|
|
2176
|
+
).optional()
|
|
2177
|
+
}).describe(
|
|
2178
|
+
"File upload component settings."
|
|
2179
|
+
)
|
|
2180
|
+
}),
|
|
2181
|
+
z.object({
|
|
2182
|
+
fileUploadOptions: z.never().optional(),
|
|
2183
|
+
signatureOptions: z.object({
|
|
2184
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
2185
|
+
showLabel: z.boolean().describe(
|
|
2186
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
2187
|
+
).optional().nullable(),
|
|
2188
|
+
description: z.any().describe(
|
|
2189
|
+
"Additional description or instructions for the field."
|
|
2190
|
+
).optional(),
|
|
2191
|
+
imageUploadEnabled: z.boolean().describe(
|
|
2192
|
+
"Whether image upload is enabled for the signature field."
|
|
2193
|
+
).optional(),
|
|
2194
|
+
media: z.intersection(
|
|
2195
|
+
z.object({}),
|
|
2196
|
+
z.xor([
|
|
2197
|
+
z.object({
|
|
2198
|
+
image: z.never().optional()
|
|
2199
|
+
}),
|
|
2200
|
+
z.object({
|
|
2201
|
+
image: z.string().describe("WixMedia image.")
|
|
2202
|
+
})
|
|
2203
|
+
])
|
|
2204
|
+
).describe(
|
|
2205
|
+
"Media content associated with the field, such as an image."
|
|
2206
|
+
).optional(),
|
|
2207
|
+
mediaSettings: z.object({
|
|
2208
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
2209
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
2210
|
+
).optional(),
|
|
2211
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
2212
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
2213
|
+
).optional(),
|
|
2214
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
2215
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
2216
|
+
).optional()
|
|
2217
|
+
}).describe(
|
|
2218
|
+
"Configuration for the media item."
|
|
2219
|
+
).optional()
|
|
2220
|
+
}).describe("Signature component settings.")
|
|
2221
|
+
})
|
|
2222
|
+
])
|
|
2223
|
+
).describe(
|
|
2224
|
+
"File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager)."
|
|
2225
|
+
)
|
|
2226
|
+
}),
|
|
2227
|
+
z.object({
|
|
2228
|
+
stringOptions: z.never().optional(),
|
|
2229
|
+
numberOptions: z.never().optional(),
|
|
2230
|
+
booleanOptions: z.never().optional(),
|
|
2231
|
+
arrayOptions: z.never().optional(),
|
|
2232
|
+
objectOptions: z.never().optional(),
|
|
2233
|
+
wixFileOptions: z.never().optional(),
|
|
2234
|
+
schedulingOptions: z.never().optional(),
|
|
2235
|
+
addressOptions: z.never().optional(),
|
|
2236
|
+
paymentOptions: z.intersection(
|
|
2237
|
+
z.object({
|
|
2238
|
+
componentType: z.enum([
|
|
2239
|
+
"UNKNOWN_COMPONENT_TYPE",
|
|
2240
|
+
"CHECKBOX_GROUP",
|
|
2241
|
+
"DONATION_INPUT",
|
|
2242
|
+
"PAYMENT_INPUT",
|
|
2243
|
+
"FIXED_PAYMENT"
|
|
2244
|
+
]).describe(
|
|
2245
|
+
"Component type of the payment input field."
|
|
2246
|
+
).optional(),
|
|
2247
|
+
validation: z.object({
|
|
2248
|
+
products: z.array(
|
|
2249
|
+
z.intersection(
|
|
2250
|
+
z.object({
|
|
2251
|
+
_id: z.string().describe("Product ID.").regex(
|
|
2252
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2253
|
+
"Must be a valid GUID"
|
|
2254
|
+
).optional(),
|
|
2255
|
+
productType: z.enum(["SHIPPABLE", "DIGITAL"]).describe("Product type.").optional(),
|
|
2256
|
+
priceType: z.enum([
|
|
2257
|
+
"FIXED_PRICE",
|
|
2258
|
+
"DYNAMIC_PRICE"
|
|
2259
|
+
]).describe("Price type.").optional(),
|
|
2260
|
+
quantityLimit: z.object({
|
|
2261
|
+
minimum: z.number().int().describe(
|
|
2262
|
+
"Minimum quantity that must be selected for this product."
|
|
2263
|
+
).min(1).max(1e5).optional().nullable(),
|
|
2264
|
+
maximum: z.number().int().describe(
|
|
2265
|
+
"Maximum quantity that can be selected for this product."
|
|
2266
|
+
).min(1).max(1e5).optional().nullable()
|
|
2267
|
+
}).describe(
|
|
2268
|
+
"Limits on how many units of this product can be selected."
|
|
2269
|
+
).optional()
|
|
2270
|
+
}),
|
|
2271
|
+
z.xor([
|
|
2272
|
+
z.object({
|
|
2273
|
+
fixedPriceOptions: z.never().optional(),
|
|
2274
|
+
dynamicPriceOptions: z.never().optional()
|
|
2275
|
+
}),
|
|
2276
|
+
z.object({
|
|
2277
|
+
dynamicPriceOptions: z.never().optional(),
|
|
2278
|
+
fixedPriceOptions: z.object({
|
|
2279
|
+
price: z.string().describe(
|
|
2280
|
+
'Fixed price of the product.\n\nSpecified as a decimal string with period as decimal separator. For example, `"3.99"`.'
|
|
2281
|
+
).optional()
|
|
2282
|
+
}).describe(
|
|
2283
|
+
"Configuration for products with fixed pricing."
|
|
2284
|
+
)
|
|
2285
|
+
}),
|
|
2286
|
+
z.object({
|
|
2287
|
+
fixedPriceOptions: z.never().optional(),
|
|
2288
|
+
dynamicPriceOptions: z.object({
|
|
2289
|
+
minPrice: z.string().describe(
|
|
2290
|
+
'Minimum price of the product.\n\nSpecified as a decimal string with period as decimal separator. For example, `"1.00"`.'
|
|
2291
|
+
).optional(),
|
|
2292
|
+
maxPrice: z.string().describe(
|
|
2293
|
+
'Maximum monetary price of the product.\n\nSpecified as a decimal string with period as decimal separator. For example, `"10.00"`.\n\nIf not specified, there is no upper limit on the price.'
|
|
2294
|
+
).optional().nullable()
|
|
2295
|
+
}).describe(
|
|
2296
|
+
"Configuration for products with variable pricing within a range."
|
|
2297
|
+
)
|
|
2298
|
+
})
|
|
2299
|
+
])
|
|
2300
|
+
)
|
|
2301
|
+
).min(1).max(100).optional(),
|
|
2302
|
+
minItems: z.number().int().describe(
|
|
2303
|
+
"Minimum number of different products that must be selected."
|
|
2304
|
+
).min(0).max(100).optional().nullable(),
|
|
2305
|
+
maxItems: z.number().int().describe(
|
|
2306
|
+
"Maximum number of different products that can be selected."
|
|
2307
|
+
).min(0).max(100).optional().nullable()
|
|
2308
|
+
}).describe(
|
|
2309
|
+
"Validation configuration for the payment input."
|
|
2310
|
+
).optional()
|
|
2311
|
+
}),
|
|
2312
|
+
z.xor([
|
|
2313
|
+
z.object({
|
|
2314
|
+
checkboxGroupOptions: z.never().optional(),
|
|
2315
|
+
donationInputOptions: z.never().optional(),
|
|
2316
|
+
paymentInputOptions: z.never().optional(),
|
|
2317
|
+
fixedPaymentOptions: z.never().optional()
|
|
2318
|
+
}),
|
|
2319
|
+
z.object({
|
|
2320
|
+
donationInputOptions: z.never().optional(),
|
|
2321
|
+
paymentInputOptions: z.never().optional(),
|
|
2322
|
+
fixedPaymentOptions: z.never().optional(),
|
|
2323
|
+
checkboxGroupOptions: z.object({
|
|
2324
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
2325
|
+
description: z.any().describe(
|
|
2326
|
+
"Additional description or instructions for the field."
|
|
2327
|
+
).optional(),
|
|
2328
|
+
options: z.array(
|
|
2329
|
+
z.object({
|
|
2330
|
+
label: z.string().describe(
|
|
2331
|
+
"Selectable option label."
|
|
2332
|
+
).max(400).optional().nullable(),
|
|
2333
|
+
value: z.any().describe(
|
|
2334
|
+
"Value stored on submission when this option is selected. Must match a product ID found in the field's products list."
|
|
2335
|
+
).optional().nullable(),
|
|
2336
|
+
_id: z.string().describe(
|
|
2337
|
+
"Option ID. Can be used to connect this option with [Wix Multilingual](https://dev.wix.com/docs/api-reference/business-management/multilingual/translation/introduction) for translation."
|
|
2338
|
+
).regex(
|
|
2339
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2340
|
+
"Must be a valid GUID"
|
|
2341
|
+
).optional(),
|
|
2342
|
+
media: z.intersection(
|
|
2343
|
+
z.object({}),
|
|
2344
|
+
z.xor([
|
|
2345
|
+
z.object({
|
|
2346
|
+
image: z.never().optional()
|
|
2347
|
+
}),
|
|
2348
|
+
z.object({
|
|
2349
|
+
image: z.string().describe(
|
|
2350
|
+
"WixMedia image."
|
|
2351
|
+
)
|
|
2352
|
+
})
|
|
2353
|
+
])
|
|
2354
|
+
).describe(
|
|
2355
|
+
"Media content associated with this option, such as an image."
|
|
2356
|
+
).optional(),
|
|
2357
|
+
default: z.boolean().describe(
|
|
2358
|
+
"Whether this option is selected by default."
|
|
2359
|
+
).optional()
|
|
2360
|
+
})
|
|
2361
|
+
).max(400).optional(),
|
|
2362
|
+
showLabel: z.boolean().describe(
|
|
2363
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
2364
|
+
).optional().nullable(),
|
|
2365
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
2366
|
+
"How an image should be resized to fit within its option container.\n\nDefault: `COVER`"
|
|
2367
|
+
).optional(),
|
|
2368
|
+
media: z.intersection(
|
|
2369
|
+
z.object({}),
|
|
2370
|
+
z.xor([
|
|
2371
|
+
z.object({
|
|
2372
|
+
image: z.never().optional()
|
|
2373
|
+
}),
|
|
2374
|
+
z.object({
|
|
2375
|
+
image: z.string().describe("WixMedia image.")
|
|
2376
|
+
})
|
|
2377
|
+
])
|
|
2378
|
+
).describe(
|
|
2379
|
+
"Media content associated with the field, such as an image."
|
|
2380
|
+
).optional(),
|
|
2381
|
+
mediaSettings: z.object({
|
|
2382
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
2383
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
2384
|
+
).optional(),
|
|
2385
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
2386
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
2387
|
+
).optional(),
|
|
2388
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
2389
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
2390
|
+
).optional()
|
|
2391
|
+
}).describe(
|
|
2392
|
+
"Configuration for the media content."
|
|
2393
|
+
).optional()
|
|
2394
|
+
}).describe(
|
|
2395
|
+
"Checkbox group component settings."
|
|
2396
|
+
)
|
|
2397
|
+
}),
|
|
2398
|
+
z.object({
|
|
2399
|
+
checkboxGroupOptions: z.never().optional(),
|
|
2400
|
+
paymentInputOptions: z.never().optional(),
|
|
2401
|
+
fixedPaymentOptions: z.never().optional(),
|
|
2402
|
+
donationInputOptions: z.object({
|
|
2403
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
2404
|
+
description: z.any().describe(
|
|
2405
|
+
"Additional description or instructions for the field."
|
|
2406
|
+
).optional(),
|
|
2407
|
+
options: z.array(
|
|
2408
|
+
z.object({
|
|
2409
|
+
value: z.string().describe(
|
|
2410
|
+
"Value stored on submission when this option is selected. Must match a product ID found in the field's products list."
|
|
2411
|
+
).regex(
|
|
2412
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2413
|
+
"Must be a valid GUID"
|
|
2414
|
+
).optional(),
|
|
2415
|
+
default: z.boolean().describe(
|
|
2416
|
+
"Whether this option is selected by default."
|
|
2417
|
+
).optional()
|
|
2418
|
+
})
|
|
2419
|
+
).max(400).optional(),
|
|
2420
|
+
customOption: z.object({
|
|
2421
|
+
label: z.string().describe("Custom option label.").max(350).optional().nullable(),
|
|
2422
|
+
placeholder: z.string().describe(
|
|
2423
|
+
"Custom option placeholder text."
|
|
2424
|
+
).max(100).optional().nullable()
|
|
2425
|
+
}).describe(
|
|
2426
|
+
"Custom option which can be specified by the submitter."
|
|
2427
|
+
).optional(),
|
|
2428
|
+
numberOfColumns: z.enum(["ONE", "TWO", "THREE", "ZERO"]).describe(
|
|
2429
|
+
"Specifies the number of columns used to display the selections within the component.\n\nDefault: `ONE`"
|
|
2430
|
+
).optional(),
|
|
2431
|
+
showLabel: z.boolean().describe(
|
|
2432
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
2433
|
+
).optional().nullable(),
|
|
2434
|
+
media: z.intersection(
|
|
2435
|
+
z.object({}),
|
|
2436
|
+
z.xor([
|
|
2437
|
+
z.object({
|
|
2438
|
+
image: z.never().optional()
|
|
2439
|
+
}),
|
|
2440
|
+
z.object({
|
|
2441
|
+
image: z.string().describe("WixMedia image.")
|
|
2442
|
+
})
|
|
2443
|
+
])
|
|
2444
|
+
).describe(
|
|
2445
|
+
"Media content associated with the field, such as an image."
|
|
2446
|
+
).optional(),
|
|
2447
|
+
mediaSettings: z.object({
|
|
2448
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
2449
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
2450
|
+
).optional(),
|
|
2451
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
2452
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
2453
|
+
).optional(),
|
|
2454
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
2455
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
2456
|
+
).optional()
|
|
2457
|
+
}).describe(
|
|
2458
|
+
"Configuration for the media content."
|
|
2459
|
+
).optional()
|
|
2460
|
+
}).describe(
|
|
2461
|
+
"Donation input component settings."
|
|
2462
|
+
)
|
|
2463
|
+
}),
|
|
2464
|
+
z.object({
|
|
2465
|
+
checkboxGroupOptions: z.never().optional(),
|
|
2466
|
+
donationInputOptions: z.never().optional(),
|
|
2467
|
+
fixedPaymentOptions: z.never().optional(),
|
|
2468
|
+
paymentInputOptions: z.object({
|
|
2469
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
2470
|
+
description: z.any().describe(
|
|
2471
|
+
"Additional description or instructions for the field."
|
|
2472
|
+
).optional(),
|
|
2473
|
+
showLabel: z.boolean().describe(
|
|
2474
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
2475
|
+
).optional().nullable(),
|
|
2476
|
+
placeholder: z.string().describe(
|
|
2477
|
+
"Placeholder text shown inside the field when it's empty."
|
|
2478
|
+
).max(100).optional().nullable(),
|
|
2479
|
+
default: z.number().describe(
|
|
2480
|
+
"Default value for the field. This value is pre-populated in the field when the form loads."
|
|
2481
|
+
).optional().nullable(),
|
|
2482
|
+
media: z.intersection(
|
|
2483
|
+
z.object({}),
|
|
2484
|
+
z.xor([
|
|
2485
|
+
z.object({
|
|
2486
|
+
image: z.never().optional()
|
|
2487
|
+
}),
|
|
2488
|
+
z.object({
|
|
2489
|
+
image: z.string().describe("WixMedia image.")
|
|
2490
|
+
})
|
|
2491
|
+
])
|
|
2492
|
+
).describe(
|
|
2493
|
+
"Media content associated with the field, such as an image."
|
|
2494
|
+
).optional(),
|
|
2495
|
+
mediaSettings: z.object({
|
|
2496
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
2497
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
2498
|
+
).optional(),
|
|
2499
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
2500
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
2501
|
+
).optional(),
|
|
2502
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
2503
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
2504
|
+
).optional()
|
|
2505
|
+
}).describe(
|
|
2506
|
+
"Configuration for the media content."
|
|
2507
|
+
).optional()
|
|
2508
|
+
}).describe(
|
|
2509
|
+
"Payment input component settings."
|
|
2510
|
+
)
|
|
2511
|
+
}),
|
|
2512
|
+
z.object({
|
|
2513
|
+
checkboxGroupOptions: z.never().optional(),
|
|
2514
|
+
donationInputOptions: z.never().optional(),
|
|
2515
|
+
paymentInputOptions: z.never().optional(),
|
|
2516
|
+
fixedPaymentOptions: z.object({
|
|
2517
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
2518
|
+
description: z.any().describe(
|
|
2519
|
+
"Additional description or instructions for the field."
|
|
2520
|
+
).optional(),
|
|
2521
|
+
showLabel: z.boolean().describe(
|
|
2522
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
2523
|
+
).optional().nullable(),
|
|
2524
|
+
media: z.intersection(
|
|
2525
|
+
z.object({}),
|
|
2526
|
+
z.xor([
|
|
2527
|
+
z.object({
|
|
2528
|
+
image: z.never().optional()
|
|
2529
|
+
}),
|
|
2530
|
+
z.object({
|
|
2531
|
+
image: z.string().describe("WixMedia image.")
|
|
2532
|
+
})
|
|
2533
|
+
])
|
|
2534
|
+
).describe(
|
|
2535
|
+
"Media content associated with the field, such as an image."
|
|
2536
|
+
).optional(),
|
|
2537
|
+
mediaSettings: z.object({
|
|
2538
|
+
imagePosition: z.enum(["ABOVE", "BELOW"]).describe(
|
|
2539
|
+
"Specifies where the image should be displayed relative to the field's label.\nDefault: `BELOW`"
|
|
2540
|
+
).optional(),
|
|
2541
|
+
imageAlignment: z.enum(["LEFT", "CENTER", "RIGHT"]).describe(
|
|
2542
|
+
"Specifies the image alignment.\nDefault: `CENTER`"
|
|
2543
|
+
).optional(),
|
|
2544
|
+
imageFit: z.enum(["COVER", "CONTAIN"]).describe(
|
|
2545
|
+
"Specifies how an image should be resized to fit.\nDefault: `COVER`"
|
|
2546
|
+
).optional()
|
|
2547
|
+
}).describe(
|
|
2548
|
+
"Configuration for the media content."
|
|
2549
|
+
).optional()
|
|
2550
|
+
}).describe(
|
|
2551
|
+
"Fixed payment component settings."
|
|
2552
|
+
)
|
|
2553
|
+
})
|
|
2554
|
+
])
|
|
2555
|
+
).describe("Payment input field settings.")
|
|
2556
|
+
}),
|
|
2557
|
+
z.object({
|
|
2558
|
+
stringOptions: z.never().optional(),
|
|
2559
|
+
numberOptions: z.never().optional(),
|
|
2560
|
+
booleanOptions: z.never().optional(),
|
|
2561
|
+
arrayOptions: z.never().optional(),
|
|
2562
|
+
objectOptions: z.never().optional(),
|
|
2563
|
+
wixFileOptions: z.never().optional(),
|
|
2564
|
+
paymentOptions: z.never().optional(),
|
|
2565
|
+
addressOptions: z.never().optional(),
|
|
2566
|
+
schedulingOptions: z.intersection(
|
|
2567
|
+
z.object({
|
|
2568
|
+
componentType: z.enum([
|
|
2569
|
+
"UNKNOWN_COMPONENT_TYPE",
|
|
2570
|
+
"APPOINTMENT"
|
|
2571
|
+
]).describe(
|
|
2572
|
+
"Component type of the scheduling field."
|
|
2573
|
+
).optional()
|
|
2574
|
+
}),
|
|
2575
|
+
z.xor([
|
|
2576
|
+
z.object({
|
|
2577
|
+
appointmentOptions: z.never().optional()
|
|
2578
|
+
}),
|
|
2579
|
+
z.object({
|
|
2580
|
+
appointmentOptions: z.intersection(
|
|
2581
|
+
z.object({
|
|
2582
|
+
label: z.string().describe("Field label.").max(255).optional().nullable(),
|
|
2583
|
+
name: z.string().describe("Appointment name.").min(1).max(400).optional().nullable(),
|
|
2584
|
+
durationInMinutes: z.number().int().describe(
|
|
2585
|
+
"Duration of the appointment in minutes."
|
|
2586
|
+
).min(1).max(44639).optional().nullable(),
|
|
2587
|
+
manualApprovalRequired: z.boolean().describe(
|
|
2588
|
+
"Whether appointments require manual approval before confirmation."
|
|
2589
|
+
).optional().nullable(),
|
|
2590
|
+
staffIds: z.array(z.string()).max(220).optional(),
|
|
2591
|
+
format: z.enum([
|
|
2592
|
+
"IN_PERSON",
|
|
2593
|
+
"VIDEO_CONFERENCE",
|
|
2594
|
+
"PHONE"
|
|
2595
|
+
]).describe("Appointment format.").optional(),
|
|
2596
|
+
description: z.any().describe(
|
|
2597
|
+
"Additional description or instructions for the field."
|
|
2598
|
+
).optional(),
|
|
2599
|
+
showLabel: z.boolean().describe(
|
|
2600
|
+
"Whether to display the field label.\n\nDefault: `true`"
|
|
2601
|
+
).optional().nullable()
|
|
2602
|
+
}),
|
|
2603
|
+
z.xor([
|
|
2604
|
+
z.object({
|
|
2605
|
+
inPersonOptions: z.never().optional(),
|
|
2606
|
+
videoConferenceOptions: z.never().optional(),
|
|
2607
|
+
phoneOptions: z.never().optional()
|
|
2608
|
+
}),
|
|
2609
|
+
z.object({
|
|
2610
|
+
videoConferenceOptions: z.never().optional(),
|
|
2611
|
+
phoneOptions: z.never().optional(),
|
|
2612
|
+
inPersonOptions: z.object({
|
|
2613
|
+
locations: z.array(
|
|
2614
|
+
z.intersection(
|
|
2615
|
+
z.object({}),
|
|
2616
|
+
z.xor([
|
|
2617
|
+
z.object({
|
|
2618
|
+
customAddress: z.never().optional(),
|
|
2619
|
+
businessLocationId: z.never().optional()
|
|
2620
|
+
}),
|
|
2621
|
+
z.object({
|
|
2622
|
+
businessLocationId: z.never().optional(),
|
|
2623
|
+
customAddress: z.string().describe(
|
|
2624
|
+
"Custom address specified as a text string."
|
|
2625
|
+
).max(512)
|
|
2626
|
+
}),
|
|
2627
|
+
z.object({
|
|
2628
|
+
customAddress: z.never().optional(),
|
|
2629
|
+
businessLocationId: z.string().describe(
|
|
2630
|
+
"ID of a predefined business [location](https://dev.wix.com/docs/rest/crm/members-contacts/locations/locations/introduction)."
|
|
2631
|
+
).regex(
|
|
2632
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2633
|
+
"Must be a valid GUID"
|
|
2634
|
+
)
|
|
2635
|
+
})
|
|
2636
|
+
])
|
|
2637
|
+
)
|
|
2638
|
+
).min(1).max(1).optional()
|
|
2639
|
+
}).describe(
|
|
2640
|
+
"Configuration for in-person appointments."
|
|
2641
|
+
)
|
|
2642
|
+
}),
|
|
2643
|
+
z.object({
|
|
2644
|
+
inPersonOptions: z.never().optional(),
|
|
2645
|
+
phoneOptions: z.never().optional(),
|
|
2646
|
+
videoConferenceOptions: z.object({
|
|
2647
|
+
description: z.string().describe(
|
|
2648
|
+
"Description or instructions for video conference appointments."
|
|
2649
|
+
).max(512).optional().nullable()
|
|
2650
|
+
}).describe(
|
|
2651
|
+
"Configuration for video conference appointments."
|
|
2652
|
+
)
|
|
2653
|
+
}),
|
|
2654
|
+
z.object({
|
|
2655
|
+
inPersonOptions: z.never().optional(),
|
|
2656
|
+
videoConferenceOptions: z.never().optional(),
|
|
2657
|
+
phoneOptions: z.object({
|
|
2658
|
+
description: z.string().describe(
|
|
2659
|
+
"Description or instructions for phone appointments."
|
|
2660
|
+
).max(512).optional().nullable()
|
|
2661
|
+
}).describe(
|
|
2662
|
+
"Configuration for phone appointments."
|
|
2663
|
+
)
|
|
2664
|
+
})
|
|
2665
|
+
])
|
|
2666
|
+
).describe(
|
|
2667
|
+
"Appointment component settings."
|
|
2668
|
+
)
|
|
2669
|
+
})
|
|
2670
|
+
])
|
|
2671
|
+
).describe("Scheduling input field settings.")
|
|
2672
|
+
}),
|
|
2673
|
+
z.object({
|
|
2674
|
+
stringOptions: z.never().optional(),
|
|
2675
|
+
numberOptions: z.never().optional(),
|
|
2676
|
+
booleanOptions: z.never().optional(),
|
|
2677
|
+
arrayOptions: z.never().optional(),
|
|
2678
|
+
objectOptions: z.never().optional(),
|
|
2679
|
+
wixFileOptions: z.never().optional(),
|
|
2680
|
+
paymentOptions: z.never().optional(),
|
|
2681
|
+
schedulingOptions: z.never().optional(),
|
|
2682
|
+
addressOptions: z.intersection(
|
|
2683
|
+
z.object({
|
|
2684
|
+
componentType: z.enum([
|
|
2685
|
+
"UNKNOWN_COMPONENT_TYPE",
|
|
2686
|
+
"MULTILINE_ADDRESS"
|
|
2687
|
+
]).describe(
|
|
2688
|
+
"Component type of the multiline address field."
|
|
2689
|
+
).optional(),
|
|
2690
|
+
validation: z.object({
|
|
2691
|
+
allowedCountries: z.array(z.string()).min(0).max(200).optional(),
|
|
2692
|
+
fields: z.object({
|
|
2693
|
+
subdivision: z.object({
|
|
2694
|
+
required: z.boolean().describe(
|
|
2695
|
+
"Whether the field is required."
|
|
2696
|
+
).optional()
|
|
2697
|
+
}).describe("Subdivision settings.").optional(),
|
|
2698
|
+
city: z.object({
|
|
2699
|
+
required: z.boolean().describe(
|
|
2700
|
+
"Whether the field is required."
|
|
2701
|
+
).optional()
|
|
2702
|
+
}).describe("City settings.").optional(),
|
|
2703
|
+
postalCode: z.object({
|
|
2704
|
+
required: z.boolean().describe(
|
|
2705
|
+
"Whether the field is required."
|
|
2706
|
+
).optional()
|
|
2707
|
+
}).describe("Postal code settings.").optional(),
|
|
2708
|
+
streetName: z.object({
|
|
2709
|
+
required: z.boolean().describe(
|
|
2710
|
+
"Whether the field is required."
|
|
2711
|
+
).optional()
|
|
2712
|
+
}).describe("Street name settings.").optional(),
|
|
2713
|
+
streetNumber: z.object({
|
|
2714
|
+
required: z.boolean().describe(
|
|
2715
|
+
"Whether the field is required."
|
|
2716
|
+
).optional()
|
|
2717
|
+
}).describe("Street number settings.").optional(),
|
|
2718
|
+
addressLine: z.object({
|
|
2719
|
+
required: z.boolean().describe(
|
|
2720
|
+
"Whether the field is required."
|
|
2721
|
+
).optional()
|
|
2722
|
+
}).describe("Address line settings.").optional(),
|
|
2723
|
+
addressLine2: z.object({
|
|
2724
|
+
required: z.boolean().describe(
|
|
2725
|
+
"Whether the field is required."
|
|
2726
|
+
).optional()
|
|
2727
|
+
}).describe("Address line 2 settings.").optional(),
|
|
2728
|
+
country: z.object({
|
|
2729
|
+
required: z.boolean().describe(
|
|
2730
|
+
"Whether the field is required."
|
|
2731
|
+
).optional()
|
|
2732
|
+
}).describe("Country settings.").optional()
|
|
2733
|
+
}).describe(
|
|
2734
|
+
"Customization configuration for individual address field components."
|
|
2735
|
+
).optional()
|
|
2736
|
+
}).describe(
|
|
2737
|
+
"Validation configuration for the multiline address input."
|
|
2738
|
+
).optional()
|
|
2739
|
+
}),
|
|
2740
|
+
z.xor([
|
|
2741
|
+
z.object({
|
|
2742
|
+
multilineAddressOptions: z.never().optional()
|
|
2743
|
+
}),
|
|
2744
|
+
z.object({
|
|
2745
|
+
multilineAddressOptions: z.object({
|
|
2746
|
+
label: z.string().describe("Field label.").max(350).optional().nullable(),
|
|
2747
|
+
description: z.any().describe(
|
|
2748
|
+
"Additional description or instructions for the field."
|
|
2749
|
+
).optional(),
|
|
2750
|
+
showCountryFlags: z.boolean().describe(
|
|
2751
|
+
"Whether to display country flags in the country selection."
|
|
2752
|
+
).optional(),
|
|
2753
|
+
defaultCountryConfig: z.intersection(
|
|
2754
|
+
z.object({
|
|
2755
|
+
type: z.enum([
|
|
2756
|
+
"UNKNOWN_DEFAULT_COUNTRY",
|
|
2757
|
+
"BY_IP",
|
|
2758
|
+
"COUNTRY"
|
|
2759
|
+
]).describe("Default country type.").optional()
|
|
2760
|
+
}),
|
|
2761
|
+
z.xor([
|
|
2762
|
+
z.object({
|
|
2763
|
+
countryOptions: z.never().optional()
|
|
2764
|
+
}),
|
|
2765
|
+
z.object({
|
|
2766
|
+
countryOptions: z.string().describe(
|
|
2767
|
+
"Country code for the pre-selected default country. Two-letter country code in ISO-3166 alpha-2 format."
|
|
2768
|
+
)
|
|
2769
|
+
})
|
|
2770
|
+
])
|
|
2771
|
+
).describe(
|
|
2772
|
+
"Default country configuration for the address field."
|
|
2773
|
+
).optional(),
|
|
2774
|
+
fieldSettings: z.object({
|
|
2775
|
+
addressLine2: z.object({
|
|
2776
|
+
show: z.boolean().describe(
|
|
2777
|
+
"Whether to display the address line 2 field."
|
|
2778
|
+
).optional()
|
|
2779
|
+
}).describe(
|
|
2780
|
+
"Configuration for the address line 2 field."
|
|
2781
|
+
).optional()
|
|
2782
|
+
}).describe("Fields settings.").optional(),
|
|
2783
|
+
autocompleteEnabled: z.boolean().describe(
|
|
2784
|
+
"Whether autocomplete is enabled for the address line field."
|
|
2785
|
+
).optional(),
|
|
2786
|
+
showAddressLabels: z.boolean().describe(
|
|
2787
|
+
"Flag identifying whether to show or hide the address labels.\nDefault: true"
|
|
2788
|
+
).optional().nullable(),
|
|
2789
|
+
showLabel: z.boolean().describe(
|
|
2790
|
+
"Flag identifying whether to show or hide the label.\nDefault: true"
|
|
2791
|
+
).optional().nullable()
|
|
2792
|
+
}).describe(
|
|
2793
|
+
"Multiline address component settings."
|
|
2794
|
+
)
|
|
2795
|
+
})
|
|
2796
|
+
])
|
|
2797
|
+
).describe("Address input field settings.")
|
|
2798
|
+
})
|
|
2799
|
+
])
|
|
2800
|
+
).describe(
|
|
2801
|
+
"Configuration for input fields that collect user data."
|
|
2802
|
+
)
|
|
2803
|
+
}),
|
|
2804
|
+
z.object({
|
|
2805
|
+
inputOptions: z.never().optional(),
|
|
2806
|
+
displayOptions: z.intersection(
|
|
2807
|
+
z.object({
|
|
2808
|
+
displayFieldType: z.enum([
|
|
2809
|
+
"UNKNOWN_FIELD_TYPE",
|
|
2810
|
+
"RICH_CONTENT",
|
|
2811
|
+
"PAGE_NAVIGATION",
|
|
2812
|
+
"LOGIN_BAR"
|
|
2813
|
+
]).describe(
|
|
2814
|
+
"Type of display field that determines its appearance and behavior."
|
|
2815
|
+
).optional()
|
|
2816
|
+
}),
|
|
2817
|
+
z.xor([
|
|
2818
|
+
z.object({
|
|
2819
|
+
richContentOptions: z.never().optional(),
|
|
2820
|
+
pageNavigationOptions: z.never().optional()
|
|
2821
|
+
}),
|
|
2822
|
+
z.object({
|
|
2823
|
+
pageNavigationOptions: z.never().optional(),
|
|
2824
|
+
richContentOptions: z.object({
|
|
2825
|
+
richContent: z.any().describe(
|
|
2826
|
+
"Rich content to display in the field."
|
|
2827
|
+
).optional(),
|
|
2828
|
+
maxShownParagraphs: z.number().int().describe(
|
|
2829
|
+
"Maximum number of paragraphs to show initially.\nAdditional content is hidden behind an expandable section. If not specified, all content is visible."
|
|
2830
|
+
).optional().nullable()
|
|
2831
|
+
}).describe(
|
|
2832
|
+
"Configuration for rich content display fields."
|
|
2833
|
+
)
|
|
2834
|
+
}),
|
|
2835
|
+
z.object({
|
|
2836
|
+
richContentOptions: z.never().optional(),
|
|
2837
|
+
pageNavigationOptions: z.object({
|
|
2838
|
+
nextPageText: z.string().describe(
|
|
2839
|
+
"Text displayed on the button when it navigates to the next page.\nOnly applicable when the button is not on the final form page."
|
|
2840
|
+
).max(65).optional().nullable(),
|
|
2841
|
+
previousPageText: z.string().describe(
|
|
2842
|
+
"Text displayed on the button when it navigates to the previous page.\nOnly applicable when the button is not on the first form page."
|
|
2843
|
+
).max(65).optional().nullable(),
|
|
2844
|
+
submitText: z.string().describe(
|
|
2845
|
+
"Text displayed on the button when it submits the form.\nOnly applicable when the button is on the final form page."
|
|
2846
|
+
).max(65).optional().nullable()
|
|
2847
|
+
}).describe(
|
|
2848
|
+
"Configuration for page navigation display fields such as navigation or submit buttons."
|
|
2849
|
+
)
|
|
2850
|
+
})
|
|
2851
|
+
])
|
|
2852
|
+
).describe(
|
|
2853
|
+
"Configuration for display fields that show information without collecting input."
|
|
2854
|
+
)
|
|
2855
|
+
})
|
|
2856
|
+
])
|
|
2857
|
+
)
|
|
2858
|
+
).max(100).optional(),
|
|
2859
|
+
steps: z.array(
|
|
2860
|
+
z.object({
|
|
2861
|
+
_id: z.string().describe("Step ID.").regex(
|
|
2862
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2863
|
+
"Must be a valid GUID"
|
|
2864
|
+
).optional(),
|
|
2865
|
+
name: z.string().describe("Name of the step.").max(200).optional().nullable(),
|
|
2866
|
+
hidden: z.boolean().describe("Whether the step is hidden.").optional(),
|
|
2867
|
+
layout: z.object({
|
|
2868
|
+
large: z.object({
|
|
2869
|
+
items: z.array(
|
|
2870
|
+
z.intersection(
|
|
2871
|
+
z.object({
|
|
2872
|
+
row: z.number().int().describe(
|
|
2873
|
+
"Row position in the grid where this item is placed."
|
|
2874
|
+
).optional().nullable(),
|
|
2875
|
+
column: z.number().int().describe(
|
|
2876
|
+
"Column position in the grid where this item is placed."
|
|
2877
|
+
).optional().nullable(),
|
|
2878
|
+
width: z.number().int().describe("Width of the item in grid units.").optional().nullable(),
|
|
2879
|
+
height: z.number().int().describe("Height of the item in grid units.").optional().nullable()
|
|
2880
|
+
}),
|
|
2881
|
+
z.xor([
|
|
2882
|
+
z.object({ fieldId: z.never().optional() }),
|
|
2883
|
+
z.object({
|
|
2884
|
+
fieldId: z.string().describe(
|
|
2885
|
+
"ID of the form field to be positioned in the layout."
|
|
2886
|
+
).regex(
|
|
2887
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2888
|
+
"Must be a valid GUID"
|
|
2889
|
+
)
|
|
2890
|
+
})
|
|
2891
|
+
])
|
|
2892
|
+
)
|
|
2893
|
+
).max(500).optional(),
|
|
2894
|
+
columns: z.number().int().describe("Number of columns in the layout grid.").optional().nullable(),
|
|
2895
|
+
rowHeight: z.number().int().describe(
|
|
2896
|
+
"Height of each row in the layout grid, measured in pixels."
|
|
2897
|
+
).optional().nullable(),
|
|
2898
|
+
margin: z.object({
|
|
2899
|
+
horizontal: z.number().int().describe("Horizontal spacing in pixels.").optional().nullable(),
|
|
2900
|
+
vertical: z.number().int().describe("Vertical spacing in pixels.").optional().nullable()
|
|
2901
|
+
}).describe(
|
|
2902
|
+
"Margin spacing configuration for the form elements."
|
|
2903
|
+
).optional(),
|
|
2904
|
+
padding: z.object({
|
|
2905
|
+
horizontal: z.number().int().describe("Horizontal spacing in pixels.").optional().nullable(),
|
|
2906
|
+
vertical: z.number().int().describe("Vertical spacing in pixels.").optional().nullable()
|
|
2907
|
+
}).describe(
|
|
2908
|
+
"Padding spacing inside form elements in pixels."
|
|
2909
|
+
).optional()
|
|
2910
|
+
}).describe(
|
|
2911
|
+
"Layout configuration for large screen breakpoints (desktop)."
|
|
2912
|
+
).optional(),
|
|
2913
|
+
medium: z.object({
|
|
2914
|
+
items: z.array(
|
|
2915
|
+
z.intersection(
|
|
2916
|
+
z.object({
|
|
2917
|
+
row: z.number().int().describe(
|
|
2918
|
+
"Row position in the grid where this item is placed."
|
|
2919
|
+
).optional().nullable(),
|
|
2920
|
+
column: z.number().int().describe(
|
|
2921
|
+
"Column position in the grid where this item is placed."
|
|
2922
|
+
).optional().nullable(),
|
|
2923
|
+
width: z.number().int().describe("Width of the item in grid units.").optional().nullable(),
|
|
2924
|
+
height: z.number().int().describe("Height of the item in grid units.").optional().nullable()
|
|
2925
|
+
}),
|
|
2926
|
+
z.xor([
|
|
2927
|
+
z.object({ fieldId: z.never().optional() }),
|
|
2928
|
+
z.object({
|
|
2929
|
+
fieldId: z.string().describe(
|
|
2930
|
+
"ID of the form field to be positioned in the layout."
|
|
2931
|
+
).regex(
|
|
2932
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2933
|
+
"Must be a valid GUID"
|
|
2934
|
+
)
|
|
2935
|
+
})
|
|
2936
|
+
])
|
|
2937
|
+
)
|
|
2938
|
+
).max(500).optional(),
|
|
2939
|
+
columns: z.number().int().describe("Number of columns in the layout grid.").optional().nullable(),
|
|
2940
|
+
rowHeight: z.number().int().describe(
|
|
2941
|
+
"Height of each row in the layout grid, measured in pixels."
|
|
2942
|
+
).optional().nullable(),
|
|
2943
|
+
margin: z.object({
|
|
2944
|
+
horizontal: z.number().int().describe("Horizontal spacing in pixels.").optional().nullable(),
|
|
2945
|
+
vertical: z.number().int().describe("Vertical spacing in pixels.").optional().nullable()
|
|
2946
|
+
}).describe(
|
|
2947
|
+
"Margin spacing configuration for the form elements."
|
|
2948
|
+
).optional(),
|
|
2949
|
+
padding: z.object({
|
|
2950
|
+
horizontal: z.number().int().describe("Horizontal spacing in pixels.").optional().nullable(),
|
|
2951
|
+
vertical: z.number().int().describe("Vertical spacing in pixels.").optional().nullable()
|
|
2952
|
+
}).describe(
|
|
2953
|
+
"Padding spacing inside form elements in pixels."
|
|
2954
|
+
).optional()
|
|
2955
|
+
}).describe(
|
|
2956
|
+
"Layout configuration for medium screen breakpoints (tablet)."
|
|
2957
|
+
).optional(),
|
|
2958
|
+
small: z.object({
|
|
2959
|
+
items: z.array(
|
|
2960
|
+
z.intersection(
|
|
2961
|
+
z.object({
|
|
2962
|
+
row: z.number().int().describe(
|
|
2963
|
+
"Row position in the grid where this item is placed."
|
|
2964
|
+
).optional().nullable(),
|
|
2965
|
+
column: z.number().int().describe(
|
|
2966
|
+
"Column position in the grid where this item is placed."
|
|
2967
|
+
).optional().nullable(),
|
|
2968
|
+
width: z.number().int().describe("Width of the item in grid units.").optional().nullable(),
|
|
2969
|
+
height: z.number().int().describe("Height of the item in grid units.").optional().nullable()
|
|
2970
|
+
}),
|
|
2971
|
+
z.xor([
|
|
2972
|
+
z.object({ fieldId: z.never().optional() }),
|
|
2973
|
+
z.object({
|
|
2974
|
+
fieldId: z.string().describe(
|
|
2975
|
+
"ID of the form field to be positioned in the layout."
|
|
2976
|
+
).regex(
|
|
2977
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2978
|
+
"Must be a valid GUID"
|
|
2979
|
+
)
|
|
2980
|
+
})
|
|
2981
|
+
])
|
|
2982
|
+
)
|
|
2983
|
+
).max(500).optional(),
|
|
2984
|
+
columns: z.number().int().describe("Number of columns in the layout grid.").optional().nullable(),
|
|
2985
|
+
rowHeight: z.number().int().describe(
|
|
2986
|
+
"Height of each row in the layout grid, measured in pixels."
|
|
2987
|
+
).optional().nullable(),
|
|
2988
|
+
margin: z.object({
|
|
2989
|
+
horizontal: z.number().int().describe("Horizontal spacing in pixels.").optional().nullable(),
|
|
2990
|
+
vertical: z.number().int().describe("Vertical spacing in pixels.").optional().nullable()
|
|
2991
|
+
}).describe(
|
|
2992
|
+
"Margin spacing configuration for the form elements."
|
|
2993
|
+
).optional(),
|
|
2994
|
+
padding: z.object({
|
|
2995
|
+
horizontal: z.number().int().describe("Horizontal spacing in pixels.").optional().nullable(),
|
|
2996
|
+
vertical: z.number().int().describe("Vertical spacing in pixels.").optional().nullable()
|
|
2997
|
+
}).describe(
|
|
2998
|
+
"Padding spacing inside form elements in pixels."
|
|
2999
|
+
).optional()
|
|
3000
|
+
}).describe(
|
|
3001
|
+
"Layout configuration for small screen breakpoints (mobile)."
|
|
3002
|
+
).optional()
|
|
3003
|
+
}).describe(
|
|
3004
|
+
"Layout configuration that defines how form fields are arranged within this step."
|
|
3005
|
+
).optional()
|
|
3006
|
+
})
|
|
3007
|
+
).max(100).optional(),
|
|
3008
|
+
name: z.string().describe("Display name of the template.").min(1).max(200).optional().nullable(),
|
|
3009
|
+
submitSettings: z.intersection(
|
|
3010
|
+
z.object({
|
|
3011
|
+
submitSuccessAction: z.enum(["NO_ACTION", "THANK_YOU_MESSAGE", "REDIRECT", "POPUP"]).describe(
|
|
3012
|
+
"Action that's triggered after a form is successfully submitted."
|
|
3013
|
+
).optional()
|
|
3014
|
+
}),
|
|
3015
|
+
z.xor([
|
|
3016
|
+
z.object({
|
|
3017
|
+
thankYouMessageOptions: z.never().optional(),
|
|
3018
|
+
redirectOptions: z.never().optional(),
|
|
3019
|
+
popupOptions: z.never().optional()
|
|
3020
|
+
}),
|
|
3021
|
+
z.object({
|
|
3022
|
+
redirectOptions: z.never().optional(),
|
|
3023
|
+
popupOptions: z.never().optional(),
|
|
3024
|
+
thankYouMessageOptions: z.object({
|
|
3025
|
+
durationInSeconds: z.number().int().describe(
|
|
3026
|
+
"Duration in seconds before the thank you message automatically disappears.\nIf set to 0, the message remains visible until manually dismissed."
|
|
3027
|
+
).optional().nullable(),
|
|
3028
|
+
richContent: z.any().describe(
|
|
3029
|
+
"Rich content message displayed to users after successful form submission."
|
|
3030
|
+
).optional()
|
|
3031
|
+
}).describe(
|
|
3032
|
+
"Configuration for displaying a thank you message after submission."
|
|
3033
|
+
)
|
|
3034
|
+
}),
|
|
3035
|
+
z.object({
|
|
3036
|
+
thankYouMessageOptions: z.never().optional(),
|
|
3037
|
+
popupOptions: z.never().optional(),
|
|
3038
|
+
redirectOptions: z.object({
|
|
3039
|
+
redirectUrl: z.string().describe(
|
|
3040
|
+
"URL to which the user should be redirected after successfully submitting the form."
|
|
3041
|
+
).max(2e3).optional().nullable(),
|
|
3042
|
+
target: z.enum(["UNKNOWN_TARGET", "SELF", "BLANK"]).describe(
|
|
3043
|
+
"How the redirect URL should be opened in the browser."
|
|
3044
|
+
).optional()
|
|
3045
|
+
}).describe(
|
|
3046
|
+
"Configuration for redirecting submitters to a URL after submission."
|
|
3047
|
+
)
|
|
3048
|
+
}),
|
|
3049
|
+
z.object({
|
|
3050
|
+
thankYouMessageOptions: z.never().optional(),
|
|
3051
|
+
redirectOptions: z.never().optional(),
|
|
3052
|
+
popupOptions: z.object({
|
|
3053
|
+
popupId: z.string().describe(
|
|
3054
|
+
"ID of the site popup to open after successful form submission."
|
|
3055
|
+
).min(1).max(100).optional()
|
|
3056
|
+
}).describe(
|
|
3057
|
+
"Configuration for displaying a popup after submission."
|
|
3058
|
+
)
|
|
3059
|
+
})
|
|
3060
|
+
])
|
|
3061
|
+
).describe(
|
|
3062
|
+
"Settings that determine what happens after the form is submitted, such as displaying a\nthank you message, redirecting to a URL, or opening a popup."
|
|
3063
|
+
).optional(),
|
|
3064
|
+
_createdDate: z.date().describe("Date and time the form template was created.").optional().nullable(),
|
|
3065
|
+
_updatedDate: z.date().describe("Date and time the form template was last updated.").optional().nullable(),
|
|
3066
|
+
fieldGroups: z.array(
|
|
3067
|
+
z.object({
|
|
3068
|
+
_id: z.string().describe("Id of group, on layout").regex(
|
|
3069
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3070
|
+
"Must be a valid GUID"
|
|
3071
|
+
).optional(),
|
|
3072
|
+
label: z.string().describe("Label of group").max(350).optional().nullable()
|
|
3073
|
+
})
|
|
3074
|
+
).max(50).optional(),
|
|
3075
|
+
requiredIndicatorProperties: z.object({
|
|
3076
|
+
requiredIndicator: z.enum(["ASTERISK", "TEXT", "NONE"]).describe(
|
|
3077
|
+
"Type of visual indicator used to mark required fields."
|
|
3078
|
+
).optional(),
|
|
3079
|
+
requiredIndicatorPlacement: z.enum(["AFTER_FIELD_TITLE", "BEFORE_FIELD_TITLE"]).describe(
|
|
3080
|
+
"Position where the required indicator appears relative to the field title."
|
|
3081
|
+
).optional()
|
|
3082
|
+
}).describe(
|
|
3083
|
+
"How required fields are marked on the form: the indicator that's displayed, for example an\nasterisk, and its placement relative to the field title."
|
|
3084
|
+
).optional(),
|
|
3085
|
+
autoFillContact: z.enum(["MEMBER_DATA", "FORM_INPUT"]).describe(
|
|
3086
|
+
"Source used to autofill contact fields in forms created from this template.\n\nDefault: `FORM_INPUT`"
|
|
3087
|
+
).optional(),
|
|
3088
|
+
quizSettings: z.intersection(
|
|
3089
|
+
z.object({
|
|
3090
|
+
message: z.any().describe("Confirmation message text.").optional(),
|
|
3091
|
+
resultsDisplay: z.enum([
|
|
3092
|
+
"DO_NOT_DISPLAY",
|
|
3093
|
+
"SCORE",
|
|
3094
|
+
"PASSING_STATUS",
|
|
3095
|
+
"SCORE_AND_PASSING_STATUS"
|
|
3096
|
+
]).describe(
|
|
3097
|
+
"How to display quiz results in the confirmation page.\nDefault: `DO_NOT_DISPLAY`"
|
|
3098
|
+
).optional()
|
|
3099
|
+
}),
|
|
3100
|
+
z.intersection(
|
|
3101
|
+
z.xor([
|
|
3102
|
+
z.object({
|
|
3103
|
+
passingScorePoints: z.never().optional(),
|
|
3104
|
+
passingScorePercentage: z.never().optional()
|
|
3105
|
+
}),
|
|
3106
|
+
z.object({
|
|
3107
|
+
passingScorePercentage: z.never().optional(),
|
|
3108
|
+
passingScorePoints: z.number().describe("Score required to pass the quiz (in points).").min(0)
|
|
3109
|
+
}),
|
|
3110
|
+
z.object({
|
|
3111
|
+
passingScorePoints: z.never().optional(),
|
|
3112
|
+
passingScorePercentage: z.number().describe(
|
|
3113
|
+
"Score required to pass the quiz as a percentage (0-100)."
|
|
3114
|
+
).min(0).max(100)
|
|
3115
|
+
})
|
|
3116
|
+
]),
|
|
3117
|
+
z.xor([
|
|
3118
|
+
z.object({
|
|
3119
|
+
passingStatusOptions: z.never().optional(),
|
|
3120
|
+
scoreAndPassingStatusOptions: z.never().optional()
|
|
3121
|
+
}),
|
|
3122
|
+
z.object({
|
|
3123
|
+
scoreAndPassingStatusOptions: z.never().optional(),
|
|
3124
|
+
passingStatusOptions: z.object({
|
|
3125
|
+
passMessage: z.any().describe(
|
|
3126
|
+
"Message displayed when the user passes the quiz."
|
|
3127
|
+
).optional(),
|
|
3128
|
+
failMessage: z.any().describe(
|
|
3129
|
+
"Message displayed when the user fails the quiz."
|
|
3130
|
+
).optional()
|
|
3131
|
+
}).describe(
|
|
3132
|
+
"Configuration for displaying only the pass/fail message."
|
|
3133
|
+
)
|
|
3134
|
+
}),
|
|
3135
|
+
z.object({
|
|
3136
|
+
passingStatusOptions: z.never().optional(),
|
|
3137
|
+
scoreAndPassingStatusOptions: z.object({
|
|
3138
|
+
passMessage: z.any().describe(
|
|
3139
|
+
"Message displayed when the user passes the quiz."
|
|
3140
|
+
).optional(),
|
|
3141
|
+
failMessage: z.any().describe(
|
|
3142
|
+
"Message displayed when the user fails the quiz."
|
|
3143
|
+
).optional()
|
|
3144
|
+
}).describe(
|
|
3145
|
+
"Configuration for displaying both the score and pass/fail message."
|
|
3146
|
+
)
|
|
3147
|
+
})
|
|
3148
|
+
])
|
|
3149
|
+
)
|
|
3150
|
+
).describe(
|
|
3151
|
+
"Quiz configuration applied to forms created from this template."
|
|
3152
|
+
).optional()
|
|
3153
|
+
})
|
|
3154
|
+
).optional()
|
|
3155
|
+
});
|
|
3156
|
+
export {
|
|
3157
|
+
ListFormTemplatesRequest,
|
|
3158
|
+
ListFormTemplatesResponse
|
|
3159
|
+
};
|
|
3160
|
+
//# sourceMappingURL=schemas.mjs.map
|