@wix/auto_sdk_events_forms 1.0.80 → 1.0.81
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 +2 -2
- package/build/cjs/index.js +2 -5
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4 -13
- package/build/cjs/index.typings.js +2 -5
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +1018 -0
- package/build/cjs/schemas.js +1452 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs +2 -5
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4 -13
- package/build/es/index.typings.mjs +2 -5
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +1018 -0
- package/build/es/schemas.mjs +1402 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js +2 -5
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +4 -13
- package/build/internal/cjs/index.typings.js +2 -5
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +1018 -0
- package/build/internal/cjs/schemas.js +1452 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs +2 -5
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +4 -13
- package/build/internal/es/index.typings.mjs +2 -5
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +1018 -0
- package/build/internal/es/schemas.mjs +1402 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +11 -4
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,1402 @@
|
|
|
1
|
+
// src/events-v1-form-forms.schemas.ts
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
var GetFormRequest = z.object({
|
|
4
|
+
eventId: z.string().describe("Event ID to which the form belongs.").regex(
|
|
5
|
+
/^[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}$/,
|
|
6
|
+
"Must be a valid GUID"
|
|
7
|
+
)
|
|
8
|
+
});
|
|
9
|
+
var GetFormResponse = z.object({
|
|
10
|
+
controls: z.array(
|
|
11
|
+
z.object({
|
|
12
|
+
type: z.enum([
|
|
13
|
+
"INPUT",
|
|
14
|
+
"TEXTAREA",
|
|
15
|
+
"DROPDOWN",
|
|
16
|
+
"RADIO",
|
|
17
|
+
"CHECKBOX",
|
|
18
|
+
"NAME",
|
|
19
|
+
"GUEST_CONTROL",
|
|
20
|
+
"ADDRESS_SHORT",
|
|
21
|
+
"ADDRESS_FULL",
|
|
22
|
+
"DATE"
|
|
23
|
+
]).describe("Field control type.").optional(),
|
|
24
|
+
system: z.boolean().describe(
|
|
25
|
+
"Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed."
|
|
26
|
+
).optional(),
|
|
27
|
+
name: z.string().describe("Deprecated: Use `id` or `_id`.").optional(),
|
|
28
|
+
inputs: z.array(
|
|
29
|
+
z.object({
|
|
30
|
+
name: z.string().describe("Field name.").optional(),
|
|
31
|
+
array: z.boolean().describe(
|
|
32
|
+
"*Deprecated:** Use `controls.inputs.type.TEXT_ARRAY`."
|
|
33
|
+
).optional(),
|
|
34
|
+
label: z.string().describe("Main field label.").optional(),
|
|
35
|
+
additionalLabels: z.record(z.string(), z.string()).describe(
|
|
36
|
+
"Additional labels for multi-valued fields such as address."
|
|
37
|
+
).optional(),
|
|
38
|
+
options: z.array(z.string()).optional(),
|
|
39
|
+
mandatory: z.boolean().describe("Whether field is mandatory.").optional(),
|
|
40
|
+
maxLength: z.number().int().describe(
|
|
41
|
+
"Maximum number of accepted characters (relevant for text fields)."
|
|
42
|
+
).optional(),
|
|
43
|
+
type: z.enum(["TEXT", "NUMBER", "TEXT_ARRAY", "DATE_TIME", "ADDRESS"]).describe(
|
|
44
|
+
"Type which determines field format.\nUsed to validate submitted response."
|
|
45
|
+
).optional(),
|
|
46
|
+
maxSize: z.number().int().describe(
|
|
47
|
+
"The maximum number of accepted values for array input.\n\n**Note:** Only applicable for `TEXT_ARRAY` input fields."
|
|
48
|
+
).optional().nullable(),
|
|
49
|
+
defaultOptionSelection: z.intersection(
|
|
50
|
+
z.object({}),
|
|
51
|
+
z.xor([
|
|
52
|
+
z.object({
|
|
53
|
+
optionIndex: z.never().optional(),
|
|
54
|
+
placeholderText: z.never().optional()
|
|
55
|
+
}),
|
|
56
|
+
z.object({
|
|
57
|
+
placeholderText: z.never().optional(),
|
|
58
|
+
optionIndex: z.number().int().describe(
|
|
59
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
60
|
+
).min(0).max(199)
|
|
61
|
+
}),
|
|
62
|
+
z.object({
|
|
63
|
+
optionIndex: z.never().optional(),
|
|
64
|
+
placeholderText: z.string().describe(
|
|
65
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
66
|
+
).max(200)
|
|
67
|
+
})
|
|
68
|
+
])
|
|
69
|
+
).describe(
|
|
70
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured.\nCurrently only applicable for `type.dropdown`."
|
|
71
|
+
).optional(),
|
|
72
|
+
labels: z.array(
|
|
73
|
+
z.object({
|
|
74
|
+
name: z.string().describe("Field name.").optional(),
|
|
75
|
+
label: z.string().describe("Field label.").optional()
|
|
76
|
+
})
|
|
77
|
+
).optional()
|
|
78
|
+
})
|
|
79
|
+
).optional(),
|
|
80
|
+
label: z.string().describe("*Deprecated:** Use `controls.inputs.label`.").optional(),
|
|
81
|
+
orderIndex: z.number().int().describe(
|
|
82
|
+
"Field controls are sorted by this value in ascending order."
|
|
83
|
+
).optional(),
|
|
84
|
+
_id: z.string().describe("Unique control ID.").optional(),
|
|
85
|
+
deleted: z.boolean().describe("Whether the input control is deleted.").optional().nullable()
|
|
86
|
+
})
|
|
87
|
+
).optional(),
|
|
88
|
+
messages: z.object({
|
|
89
|
+
rsvp: z.object({
|
|
90
|
+
rsvpYesOption: z.string().describe('Label text indicating RSVP\'s `status` is `"YES"`.').optional(),
|
|
91
|
+
rsvpNoOption: z.string().describe('Label text indicating RSVP\'s `status` is `"NO"`.').optional(),
|
|
92
|
+
positiveMessages: z.object({
|
|
93
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
94
|
+
confirmation: z.object({
|
|
95
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
96
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
97
|
+
addToCalendarActionLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
98
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
99
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
100
|
+
}).describe(
|
|
101
|
+
'Messages displayed when an RSVP\'s `status` is set to `"YES"`.'
|
|
102
|
+
).optional(),
|
|
103
|
+
waitlistMessages: z.object({
|
|
104
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
105
|
+
confirmation: z.object({
|
|
106
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
107
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
108
|
+
addToCalendarActionLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
109
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
110
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
111
|
+
}).describe(
|
|
112
|
+
'Messages displayed when an RSVP\'s `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).'
|
|
113
|
+
).optional(),
|
|
114
|
+
negativeMessages: z.object({
|
|
115
|
+
title: z.string().describe("Main form title for negative response.").optional(),
|
|
116
|
+
confirmation: z.object({
|
|
117
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
118
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
119
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
120
|
+
}).describe(
|
|
121
|
+
'Messages displayed when an RSVP\'s `status` is set to `"NO"`.'
|
|
122
|
+
).optional(),
|
|
123
|
+
submitActionLabel: z.string().describe('"Submit form" call-to-action label text.').optional()
|
|
124
|
+
}).describe(
|
|
125
|
+
"[RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction) messages."
|
|
126
|
+
).optional(),
|
|
127
|
+
checkout: z.object({
|
|
128
|
+
title: z.string().describe("Main form title for response.").optional(),
|
|
129
|
+
submitActionLabel: z.string().describe("Submit form call-to-action label text.").optional(),
|
|
130
|
+
confirmation: z.object({
|
|
131
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
132
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
133
|
+
downloadTicketsLabel: z.string().describe('"Download tickets" call-to-action label text.').optional(),
|
|
134
|
+
addToCalendarLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
135
|
+
shareEventLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
136
|
+
}).describe("Confirmation messages shown after checkout.").optional()
|
|
137
|
+
}).describe("Checkout form messages.").optional(),
|
|
138
|
+
registrationClosed: z.object({
|
|
139
|
+
message: z.string().describe("Message shown when event registration is closed.").optional(),
|
|
140
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
141
|
+
}).describe("Messages shown when event registration is closed.").optional(),
|
|
142
|
+
ticketsUnavailable: z.object({
|
|
143
|
+
message: z.string().describe("Message shown when event tickets are unavailable.").optional(),
|
|
144
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
145
|
+
}).describe("Messages shown when event tickets are unavailable.").optional()
|
|
146
|
+
}).describe(
|
|
147
|
+
'Set of defined form messages displayed in the UI before, during, and after a registration flow.\nIncludes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.'
|
|
148
|
+
).optional()
|
|
149
|
+
});
|
|
150
|
+
var AddControlRequest = z.object({
|
|
151
|
+
eventId: z.string().describe("Event ID to which the form belongs.").regex(
|
|
152
|
+
/^[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}$/,
|
|
153
|
+
"Must be a valid GUID"
|
|
154
|
+
),
|
|
155
|
+
options: z.intersection(
|
|
156
|
+
z.object({}),
|
|
157
|
+
z.xor([
|
|
158
|
+
z.object({
|
|
159
|
+
address: z.never().optional(),
|
|
160
|
+
date: z.never().optional(),
|
|
161
|
+
additionalGuests: z.never().optional(),
|
|
162
|
+
dropdown: z.never().optional(),
|
|
163
|
+
checkbox: z.never().optional(),
|
|
164
|
+
text: z.never().optional(),
|
|
165
|
+
radioButton: z.never().optional(),
|
|
166
|
+
phone: z.object({
|
|
167
|
+
label: z.string().describe("Phone input label.").max(100).optional(),
|
|
168
|
+
mandatory: z.boolean().describe("Whether the phone input is required.").optional()
|
|
169
|
+
}).describe("Phone number input control.")
|
|
170
|
+
}),
|
|
171
|
+
z.object({
|
|
172
|
+
phone: z.never().optional(),
|
|
173
|
+
date: z.never().optional(),
|
|
174
|
+
additionalGuests: z.never().optional(),
|
|
175
|
+
dropdown: z.never().optional(),
|
|
176
|
+
checkbox: z.never().optional(),
|
|
177
|
+
text: z.never().optional(),
|
|
178
|
+
radioButton: z.never().optional(),
|
|
179
|
+
address: z.object({
|
|
180
|
+
labels: z.object({
|
|
181
|
+
addressLine: z.string().describe("Single-line address input label.").max(100).optional(),
|
|
182
|
+
country: z.string().describe("Country input label.").max(100).optional(),
|
|
183
|
+
subdivision: z.string().describe("Subdivision input label.").max(100).optional(),
|
|
184
|
+
city: z.string().describe("City input label.").max(100).optional(),
|
|
185
|
+
postalCode: z.string().describe("Postal code input label.").max(100).optional(),
|
|
186
|
+
streetAddress: z.string().describe("Street address input label.").max(100).optional()
|
|
187
|
+
}).describe("Address control labels for each input.").optional(),
|
|
188
|
+
full: z.boolean().describe(
|
|
189
|
+
"Whether an address is multi-line (consisting of multiple fields such as country, city, postal code). When `false`, address is single-line."
|
|
190
|
+
).optional(),
|
|
191
|
+
mandatory: z.boolean().describe("Whether the address input is required.").optional()
|
|
192
|
+
}).describe("Single-line or full address input control.")
|
|
193
|
+
}),
|
|
194
|
+
z.object({
|
|
195
|
+
phone: z.never().optional(),
|
|
196
|
+
address: z.never().optional(),
|
|
197
|
+
additionalGuests: z.never().optional(),
|
|
198
|
+
dropdown: z.never().optional(),
|
|
199
|
+
checkbox: z.never().optional(),
|
|
200
|
+
text: z.never().optional(),
|
|
201
|
+
radioButton: z.never().optional(),
|
|
202
|
+
date: z.object({
|
|
203
|
+
label: z.string().describe("Input control label.").max(100).optional(),
|
|
204
|
+
mandatory: z.boolean().describe("Whether the date input is required.").optional()
|
|
205
|
+
}).describe("Day, month, year date input control.")
|
|
206
|
+
}),
|
|
207
|
+
z.object({
|
|
208
|
+
phone: z.never().optional(),
|
|
209
|
+
address: z.never().optional(),
|
|
210
|
+
date: z.never().optional(),
|
|
211
|
+
dropdown: z.never().optional(),
|
|
212
|
+
checkbox: z.never().optional(),
|
|
213
|
+
text: z.never().optional(),
|
|
214
|
+
radioButton: z.never().optional(),
|
|
215
|
+
additionalGuests: z.object({
|
|
216
|
+
labels: z.object({
|
|
217
|
+
single: z.string().describe("Input label for a single guest.").max(200).optional(),
|
|
218
|
+
multiple: z.string().describe("Input label for multiple guests.").max(200).optional()
|
|
219
|
+
}).describe("Additional guests control labels for each input.").optional(),
|
|
220
|
+
namesMandatory: z.boolean().describe("Whether the individual guest names are required.").optional(),
|
|
221
|
+
maxGuests: z.number().int().describe("Maximum number of additional guests.").min(1).max(10).optional()
|
|
222
|
+
}).describe("Additional guests input control.")
|
|
223
|
+
}),
|
|
224
|
+
z.object({
|
|
225
|
+
phone: z.never().optional(),
|
|
226
|
+
address: z.never().optional(),
|
|
227
|
+
date: z.never().optional(),
|
|
228
|
+
additionalGuests: z.never().optional(),
|
|
229
|
+
checkbox: z.never().optional(),
|
|
230
|
+
text: z.never().optional(),
|
|
231
|
+
radioButton: z.never().optional(),
|
|
232
|
+
dropdown: z.object({
|
|
233
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
234
|
+
options: z.array(z.string()).min(2).max(200).optional(),
|
|
235
|
+
mandatory: z.boolean().describe("Whether a choice is required.").optional(),
|
|
236
|
+
defaultOptionSelection: z.intersection(
|
|
237
|
+
z.object({}),
|
|
238
|
+
z.xor([
|
|
239
|
+
z.object({
|
|
240
|
+
optionIndex: z.never().optional(),
|
|
241
|
+
placeholderText: z.never().optional()
|
|
242
|
+
}),
|
|
243
|
+
z.object({
|
|
244
|
+
placeholderText: z.never().optional(),
|
|
245
|
+
optionIndex: z.number().int().describe(
|
|
246
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
247
|
+
).min(0).max(199)
|
|
248
|
+
}),
|
|
249
|
+
z.object({
|
|
250
|
+
optionIndex: z.never().optional(),
|
|
251
|
+
placeholderText: z.string().describe(
|
|
252
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
253
|
+
).max(200)
|
|
254
|
+
})
|
|
255
|
+
])
|
|
256
|
+
).describe(
|
|
257
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured."
|
|
258
|
+
).optional()
|
|
259
|
+
}).describe("Single-choice dropdown style input control.")
|
|
260
|
+
}),
|
|
261
|
+
z.object({
|
|
262
|
+
phone: z.never().optional(),
|
|
263
|
+
address: z.never().optional(),
|
|
264
|
+
date: z.never().optional(),
|
|
265
|
+
additionalGuests: z.never().optional(),
|
|
266
|
+
dropdown: z.never().optional(),
|
|
267
|
+
text: z.never().optional(),
|
|
268
|
+
radioButton: z.never().optional(),
|
|
269
|
+
checkbox: z.object({
|
|
270
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
271
|
+
mandatory: z.boolean().describe("Whether at least one checkbox is required.").optional(),
|
|
272
|
+
options: z.array(z.string()).min(1).max(200).optional()
|
|
273
|
+
}).describe("Multiple-choice checkbox style input control.")
|
|
274
|
+
}),
|
|
275
|
+
z.object({
|
|
276
|
+
phone: z.never().optional(),
|
|
277
|
+
address: z.never().optional(),
|
|
278
|
+
date: z.never().optional(),
|
|
279
|
+
additionalGuests: z.never().optional(),
|
|
280
|
+
dropdown: z.never().optional(),
|
|
281
|
+
checkbox: z.never().optional(),
|
|
282
|
+
radioButton: z.never().optional(),
|
|
283
|
+
text: z.object({
|
|
284
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
285
|
+
mandatory: z.boolean().describe("Whether a text input is required.").optional(),
|
|
286
|
+
maxLength: z.number().int().describe("Maximum number of characters allowed.").min(0).max(1e3).optional(),
|
|
287
|
+
multiLine: z.boolean().describe(
|
|
288
|
+
"Whether the input control should allow multiple lines in text."
|
|
289
|
+
).optional(),
|
|
290
|
+
comment: z.boolean().describe(
|
|
291
|
+
"Whether the input control should be displayed as a comment."
|
|
292
|
+
).optional()
|
|
293
|
+
}).describe("Free-form text input control.")
|
|
294
|
+
}),
|
|
295
|
+
z.object({
|
|
296
|
+
phone: z.never().optional(),
|
|
297
|
+
address: z.never().optional(),
|
|
298
|
+
date: z.never().optional(),
|
|
299
|
+
additionalGuests: z.never().optional(),
|
|
300
|
+
dropdown: z.never().optional(),
|
|
301
|
+
checkbox: z.never().optional(),
|
|
302
|
+
text: z.never().optional(),
|
|
303
|
+
radioButton: z.object({
|
|
304
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
305
|
+
options: z.array(z.string()).min(2).max(200).optional()
|
|
306
|
+
}).describe("Single-choice radio button style input control.")
|
|
307
|
+
})
|
|
308
|
+
])
|
|
309
|
+
).describe("Optional fields.")
|
|
310
|
+
});
|
|
311
|
+
var AddControlResponse = z.object({
|
|
312
|
+
_id: z.string().describe("Generated unique input control ID.").optional(),
|
|
313
|
+
form: z.object({
|
|
314
|
+
controls: z.array(
|
|
315
|
+
z.object({
|
|
316
|
+
type: z.enum([
|
|
317
|
+
"INPUT",
|
|
318
|
+
"TEXTAREA",
|
|
319
|
+
"DROPDOWN",
|
|
320
|
+
"RADIO",
|
|
321
|
+
"CHECKBOX",
|
|
322
|
+
"NAME",
|
|
323
|
+
"GUEST_CONTROL",
|
|
324
|
+
"ADDRESS_SHORT",
|
|
325
|
+
"ADDRESS_FULL",
|
|
326
|
+
"DATE"
|
|
327
|
+
]).describe("Field control type.").optional(),
|
|
328
|
+
system: z.boolean().describe(
|
|
329
|
+
"Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed."
|
|
330
|
+
).optional(),
|
|
331
|
+
name: z.string().describe("Deprecated: Use `id` or `_id`.").optional(),
|
|
332
|
+
inputs: z.array(
|
|
333
|
+
z.object({
|
|
334
|
+
name: z.string().describe("Field name.").optional(),
|
|
335
|
+
array: z.boolean().describe(
|
|
336
|
+
"*Deprecated:** Use `controls.inputs.type.TEXT_ARRAY`."
|
|
337
|
+
).optional(),
|
|
338
|
+
label: z.string().describe("Main field label.").optional(),
|
|
339
|
+
additionalLabels: z.record(z.string(), z.string()).describe(
|
|
340
|
+
"Additional labels for multi-valued fields such as address."
|
|
341
|
+
).optional(),
|
|
342
|
+
options: z.array(z.string()).optional(),
|
|
343
|
+
mandatory: z.boolean().describe("Whether field is mandatory.").optional(),
|
|
344
|
+
maxLength: z.number().int().describe(
|
|
345
|
+
"Maximum number of accepted characters (relevant for text fields)."
|
|
346
|
+
).optional(),
|
|
347
|
+
type: z.enum([
|
|
348
|
+
"TEXT",
|
|
349
|
+
"NUMBER",
|
|
350
|
+
"TEXT_ARRAY",
|
|
351
|
+
"DATE_TIME",
|
|
352
|
+
"ADDRESS"
|
|
353
|
+
]).describe(
|
|
354
|
+
"Type which determines field format.\nUsed to validate submitted response."
|
|
355
|
+
).optional(),
|
|
356
|
+
maxSize: z.number().int().describe(
|
|
357
|
+
"The maximum number of accepted values for array input.\n\n**Note:** Only applicable for `TEXT_ARRAY` input fields."
|
|
358
|
+
).optional().nullable(),
|
|
359
|
+
defaultOptionSelection: z.intersection(
|
|
360
|
+
z.object({}),
|
|
361
|
+
z.xor([
|
|
362
|
+
z.object({
|
|
363
|
+
optionIndex: z.never().optional(),
|
|
364
|
+
placeholderText: z.never().optional()
|
|
365
|
+
}),
|
|
366
|
+
z.object({
|
|
367
|
+
placeholderText: z.never().optional(),
|
|
368
|
+
optionIndex: z.number().int().describe(
|
|
369
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
370
|
+
).min(0).max(199)
|
|
371
|
+
}),
|
|
372
|
+
z.object({
|
|
373
|
+
optionIndex: z.never().optional(),
|
|
374
|
+
placeholderText: z.string().describe(
|
|
375
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
376
|
+
).max(200)
|
|
377
|
+
})
|
|
378
|
+
])
|
|
379
|
+
).describe(
|
|
380
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured.\nCurrently only applicable for `type.dropdown`."
|
|
381
|
+
).optional(),
|
|
382
|
+
labels: z.array(
|
|
383
|
+
z.object({
|
|
384
|
+
name: z.string().describe("Field name.").optional(),
|
|
385
|
+
label: z.string().describe("Field label.").optional()
|
|
386
|
+
})
|
|
387
|
+
).optional()
|
|
388
|
+
})
|
|
389
|
+
).optional(),
|
|
390
|
+
label: z.string().describe("*Deprecated:** Use `controls.inputs.label`.").optional(),
|
|
391
|
+
orderIndex: z.number().int().describe(
|
|
392
|
+
"Field controls are sorted by this value in ascending order."
|
|
393
|
+
).optional(),
|
|
394
|
+
_id: z.string().describe("Unique control ID.").optional(),
|
|
395
|
+
deleted: z.boolean().describe("Whether the input control is deleted.").optional().nullable()
|
|
396
|
+
})
|
|
397
|
+
).optional(),
|
|
398
|
+
messages: z.object({
|
|
399
|
+
rsvp: z.object({
|
|
400
|
+
rsvpYesOption: z.string().describe('Label text indicating RSVP\'s `status` is `"YES"`.').optional(),
|
|
401
|
+
rsvpNoOption: z.string().describe('Label text indicating RSVP\'s `status` is `"NO"`.').optional(),
|
|
402
|
+
positiveMessages: z.object({
|
|
403
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
404
|
+
confirmation: z.object({
|
|
405
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
406
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
407
|
+
addToCalendarActionLabel: z.string().describe(
|
|
408
|
+
'"Add to calendar" call-to-action label text.'
|
|
409
|
+
).optional(),
|
|
410
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
411
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
412
|
+
}).describe(
|
|
413
|
+
'Messages displayed when an RSVP\'s `status` is set to `"YES"`.'
|
|
414
|
+
).optional(),
|
|
415
|
+
waitlistMessages: z.object({
|
|
416
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
417
|
+
confirmation: z.object({
|
|
418
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
419
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
420
|
+
addToCalendarActionLabel: z.string().describe(
|
|
421
|
+
'"Add to calendar" call-to-action label text.'
|
|
422
|
+
).optional(),
|
|
423
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
424
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
425
|
+
}).describe(
|
|
426
|
+
'Messages displayed when an RSVP\'s `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).'
|
|
427
|
+
).optional(),
|
|
428
|
+
negativeMessages: z.object({
|
|
429
|
+
title: z.string().describe("Main form title for negative response.").optional(),
|
|
430
|
+
confirmation: z.object({
|
|
431
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
432
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
433
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
434
|
+
}).describe(
|
|
435
|
+
'Messages displayed when an RSVP\'s `status` is set to `"NO"`.'
|
|
436
|
+
).optional(),
|
|
437
|
+
submitActionLabel: z.string().describe('"Submit form" call-to-action label text.').optional()
|
|
438
|
+
}).describe(
|
|
439
|
+
"[RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction) messages."
|
|
440
|
+
).optional(),
|
|
441
|
+
checkout: z.object({
|
|
442
|
+
title: z.string().describe("Main form title for response.").optional(),
|
|
443
|
+
submitActionLabel: z.string().describe("Submit form call-to-action label text.").optional(),
|
|
444
|
+
confirmation: z.object({
|
|
445
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
446
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
447
|
+
downloadTicketsLabel: z.string().describe('"Download tickets" call-to-action label text.').optional(),
|
|
448
|
+
addToCalendarLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
449
|
+
shareEventLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
450
|
+
}).describe("Confirmation messages shown after checkout.").optional()
|
|
451
|
+
}).describe("Checkout form messages.").optional(),
|
|
452
|
+
registrationClosed: z.object({
|
|
453
|
+
message: z.string().describe("Message shown when event registration is closed.").optional(),
|
|
454
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
455
|
+
}).describe("Messages shown when event registration is closed.").optional(),
|
|
456
|
+
ticketsUnavailable: z.object({
|
|
457
|
+
message: z.string().describe("Message shown when event tickets are unavailable.").optional(),
|
|
458
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
459
|
+
}).describe("Messages shown when event tickets are unavailable.").optional()
|
|
460
|
+
}).describe(
|
|
461
|
+
'Set of defined form messages displayed in the UI before, during, and after a registration flow.\nIncludes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.'
|
|
462
|
+
).optional()
|
|
463
|
+
}).describe("Modified event form.").optional()
|
|
464
|
+
});
|
|
465
|
+
var UpdateControlRequest = z.object({
|
|
466
|
+
identifiers: z.object({
|
|
467
|
+
eventId: z.string().describe("Event ID to which the form belongs.").regex(
|
|
468
|
+
/^[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}$/,
|
|
469
|
+
"Must be a valid GUID"
|
|
470
|
+
),
|
|
471
|
+
_id: z.string().describe("Unique input control ID.")
|
|
472
|
+
}).describe("Identifies what form to update."),
|
|
473
|
+
options: z.intersection(
|
|
474
|
+
z.object({
|
|
475
|
+
orderIndex: z.number().int().describe("Index used to sort input controls in ascending order.").optional()
|
|
476
|
+
}),
|
|
477
|
+
z.xor([
|
|
478
|
+
z.object({
|
|
479
|
+
address: z.never().optional(),
|
|
480
|
+
date: z.never().optional(),
|
|
481
|
+
additionalGuests: z.never().optional(),
|
|
482
|
+
dropdown: z.never().optional(),
|
|
483
|
+
checkbox: z.never().optional(),
|
|
484
|
+
text: z.never().optional(),
|
|
485
|
+
name: z.never().optional(),
|
|
486
|
+
email: z.never().optional(),
|
|
487
|
+
radioButton: z.never().optional(),
|
|
488
|
+
phone: z.object({
|
|
489
|
+
label: z.string().describe("Phone input label.").max(100).optional(),
|
|
490
|
+
mandatory: z.boolean().describe("Whether the phone input is required.").optional()
|
|
491
|
+
}).describe("Phone number input control.")
|
|
492
|
+
}),
|
|
493
|
+
z.object({
|
|
494
|
+
phone: z.never().optional(),
|
|
495
|
+
date: z.never().optional(),
|
|
496
|
+
additionalGuests: z.never().optional(),
|
|
497
|
+
dropdown: z.never().optional(),
|
|
498
|
+
checkbox: z.never().optional(),
|
|
499
|
+
text: z.never().optional(),
|
|
500
|
+
name: z.never().optional(),
|
|
501
|
+
email: z.never().optional(),
|
|
502
|
+
radioButton: z.never().optional(),
|
|
503
|
+
address: z.object({
|
|
504
|
+
labels: z.object({
|
|
505
|
+
addressLine: z.string().describe("Single-line address input label.").max(100).optional(),
|
|
506
|
+
country: z.string().describe("Country input label.").max(100).optional(),
|
|
507
|
+
subdivision: z.string().describe("Subdivision input label.").max(100).optional(),
|
|
508
|
+
city: z.string().describe("City input label.").max(100).optional(),
|
|
509
|
+
postalCode: z.string().describe("Postal code input label.").max(100).optional(),
|
|
510
|
+
streetAddress: z.string().describe("Street address input label.").max(100).optional()
|
|
511
|
+
}).describe("Address control labels for each input.").optional(),
|
|
512
|
+
full: z.boolean().describe(
|
|
513
|
+
"Whether an address is multi-line (consisting of multiple fields such as country, city, postal code). When `false`, address is single-line."
|
|
514
|
+
).optional(),
|
|
515
|
+
mandatory: z.boolean().describe("Whether the address input is required.").optional()
|
|
516
|
+
}).describe("Single-line or full address input control.")
|
|
517
|
+
}),
|
|
518
|
+
z.object({
|
|
519
|
+
phone: z.never().optional(),
|
|
520
|
+
address: z.never().optional(),
|
|
521
|
+
additionalGuests: z.never().optional(),
|
|
522
|
+
dropdown: z.never().optional(),
|
|
523
|
+
checkbox: z.never().optional(),
|
|
524
|
+
text: z.never().optional(),
|
|
525
|
+
name: z.never().optional(),
|
|
526
|
+
email: z.never().optional(),
|
|
527
|
+
radioButton: z.never().optional(),
|
|
528
|
+
date: z.object({
|
|
529
|
+
label: z.string().describe("Input control label.").max(100).optional(),
|
|
530
|
+
mandatory: z.boolean().describe("Whether the date input is required.").optional()
|
|
531
|
+
}).describe("Day, month, year date input control.")
|
|
532
|
+
}),
|
|
533
|
+
z.object({
|
|
534
|
+
phone: z.never().optional(),
|
|
535
|
+
address: z.never().optional(),
|
|
536
|
+
date: z.never().optional(),
|
|
537
|
+
dropdown: z.never().optional(),
|
|
538
|
+
checkbox: z.never().optional(),
|
|
539
|
+
text: z.never().optional(),
|
|
540
|
+
name: z.never().optional(),
|
|
541
|
+
email: z.never().optional(),
|
|
542
|
+
radioButton: z.never().optional(),
|
|
543
|
+
additionalGuests: z.object({
|
|
544
|
+
labels: z.object({
|
|
545
|
+
single: z.string().describe("Input label for a single guest.").max(200).optional(),
|
|
546
|
+
multiple: z.string().describe("Input label for multiple guests.").max(200).optional()
|
|
547
|
+
}).describe("Additional guests control labels for each input.").optional(),
|
|
548
|
+
namesMandatory: z.boolean().describe("Whether the individual guest names are required.").optional(),
|
|
549
|
+
maxGuests: z.number().int().describe("Maximum number of additional guests.").min(1).max(10).optional()
|
|
550
|
+
}).describe("Additional guests input control.")
|
|
551
|
+
}),
|
|
552
|
+
z.object({
|
|
553
|
+
phone: z.never().optional(),
|
|
554
|
+
address: z.never().optional(),
|
|
555
|
+
date: z.never().optional(),
|
|
556
|
+
additionalGuests: z.never().optional(),
|
|
557
|
+
checkbox: z.never().optional(),
|
|
558
|
+
text: z.never().optional(),
|
|
559
|
+
name: z.never().optional(),
|
|
560
|
+
email: z.never().optional(),
|
|
561
|
+
radioButton: z.never().optional(),
|
|
562
|
+
dropdown: z.object({
|
|
563
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
564
|
+
options: z.array(z.string()).min(2).max(200).optional(),
|
|
565
|
+
mandatory: z.boolean().describe("Whether a choice is required.").optional(),
|
|
566
|
+
defaultOptionSelection: z.intersection(
|
|
567
|
+
z.object({}),
|
|
568
|
+
z.xor([
|
|
569
|
+
z.object({
|
|
570
|
+
optionIndex: z.never().optional(),
|
|
571
|
+
placeholderText: z.never().optional()
|
|
572
|
+
}),
|
|
573
|
+
z.object({
|
|
574
|
+
placeholderText: z.never().optional(),
|
|
575
|
+
optionIndex: z.number().int().describe(
|
|
576
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
577
|
+
).min(0).max(199)
|
|
578
|
+
}),
|
|
579
|
+
z.object({
|
|
580
|
+
optionIndex: z.never().optional(),
|
|
581
|
+
placeholderText: z.string().describe(
|
|
582
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
583
|
+
).max(200)
|
|
584
|
+
})
|
|
585
|
+
])
|
|
586
|
+
).describe(
|
|
587
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured."
|
|
588
|
+
).optional()
|
|
589
|
+
}).describe("Single-choice dropdown style input control.")
|
|
590
|
+
}),
|
|
591
|
+
z.object({
|
|
592
|
+
phone: z.never().optional(),
|
|
593
|
+
address: z.never().optional(),
|
|
594
|
+
date: z.never().optional(),
|
|
595
|
+
additionalGuests: z.never().optional(),
|
|
596
|
+
dropdown: z.never().optional(),
|
|
597
|
+
text: z.never().optional(),
|
|
598
|
+
name: z.never().optional(),
|
|
599
|
+
email: z.never().optional(),
|
|
600
|
+
radioButton: z.never().optional(),
|
|
601
|
+
checkbox: z.object({
|
|
602
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
603
|
+
mandatory: z.boolean().describe("Whether at least one checkbox is required.").optional(),
|
|
604
|
+
options: z.array(z.string()).min(1).max(200).optional()
|
|
605
|
+
}).describe("Multiple-choice checkbox style input control.")
|
|
606
|
+
}),
|
|
607
|
+
z.object({
|
|
608
|
+
phone: z.never().optional(),
|
|
609
|
+
address: z.never().optional(),
|
|
610
|
+
date: z.never().optional(),
|
|
611
|
+
additionalGuests: z.never().optional(),
|
|
612
|
+
dropdown: z.never().optional(),
|
|
613
|
+
checkbox: z.never().optional(),
|
|
614
|
+
name: z.never().optional(),
|
|
615
|
+
email: z.never().optional(),
|
|
616
|
+
radioButton: z.never().optional(),
|
|
617
|
+
text: z.object({
|
|
618
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
619
|
+
mandatory: z.boolean().describe("Whether a text input is required.").optional(),
|
|
620
|
+
maxLength: z.number().int().describe("Maximum number of characters allowed.").min(0).max(1e3).optional(),
|
|
621
|
+
multiLine: z.boolean().describe(
|
|
622
|
+
"Whether the input control should allow multiple lines in text."
|
|
623
|
+
).optional(),
|
|
624
|
+
comment: z.boolean().describe(
|
|
625
|
+
"Whether the input control should be displayed as a comment."
|
|
626
|
+
).optional()
|
|
627
|
+
}).describe("Free-form text input control.")
|
|
628
|
+
}),
|
|
629
|
+
z.object({
|
|
630
|
+
phone: z.never().optional(),
|
|
631
|
+
address: z.never().optional(),
|
|
632
|
+
date: z.never().optional(),
|
|
633
|
+
additionalGuests: z.never().optional(),
|
|
634
|
+
dropdown: z.never().optional(),
|
|
635
|
+
checkbox: z.never().optional(),
|
|
636
|
+
text: z.never().optional(),
|
|
637
|
+
email: z.never().optional(),
|
|
638
|
+
radioButton: z.never().optional(),
|
|
639
|
+
name: z.object({
|
|
640
|
+
labels: z.object({
|
|
641
|
+
firstName: z.string().describe("First name input label.").max(100).optional(),
|
|
642
|
+
lastName: z.string().describe("Last name input label .").max(100).optional()
|
|
643
|
+
}).describe("Name control labels of each input.").optional()
|
|
644
|
+
}).describe("Main guest name input control.")
|
|
645
|
+
}),
|
|
646
|
+
z.object({
|
|
647
|
+
phone: z.never().optional(),
|
|
648
|
+
address: z.never().optional(),
|
|
649
|
+
date: z.never().optional(),
|
|
650
|
+
additionalGuests: z.never().optional(),
|
|
651
|
+
dropdown: z.never().optional(),
|
|
652
|
+
checkbox: z.never().optional(),
|
|
653
|
+
text: z.never().optional(),
|
|
654
|
+
name: z.never().optional(),
|
|
655
|
+
radioButton: z.never().optional(),
|
|
656
|
+
email: z.object({
|
|
657
|
+
label: z.string().describe("Email input label.").max(100).optional()
|
|
658
|
+
}).describe("Main guest email input control.")
|
|
659
|
+
}),
|
|
660
|
+
z.object({
|
|
661
|
+
phone: z.never().optional(),
|
|
662
|
+
address: z.never().optional(),
|
|
663
|
+
date: z.never().optional(),
|
|
664
|
+
additionalGuests: z.never().optional(),
|
|
665
|
+
dropdown: z.never().optional(),
|
|
666
|
+
checkbox: z.never().optional(),
|
|
667
|
+
text: z.never().optional(),
|
|
668
|
+
name: z.never().optional(),
|
|
669
|
+
email: z.never().optional(),
|
|
670
|
+
radioButton: z.object({
|
|
671
|
+
label: z.string().describe("Input control label.").max(200).optional(),
|
|
672
|
+
options: z.array(z.string()).min(2).max(200).optional()
|
|
673
|
+
}).describe("Single-choice radio style input control.")
|
|
674
|
+
})
|
|
675
|
+
])
|
|
676
|
+
).describe("Optional fields.")
|
|
677
|
+
});
|
|
678
|
+
var UpdateControlResponse = z.object({
|
|
679
|
+
form: z.object({
|
|
680
|
+
controls: z.array(
|
|
681
|
+
z.object({
|
|
682
|
+
type: z.enum([
|
|
683
|
+
"INPUT",
|
|
684
|
+
"TEXTAREA",
|
|
685
|
+
"DROPDOWN",
|
|
686
|
+
"RADIO",
|
|
687
|
+
"CHECKBOX",
|
|
688
|
+
"NAME",
|
|
689
|
+
"GUEST_CONTROL",
|
|
690
|
+
"ADDRESS_SHORT",
|
|
691
|
+
"ADDRESS_FULL",
|
|
692
|
+
"DATE"
|
|
693
|
+
]).describe("Field control type.").optional(),
|
|
694
|
+
system: z.boolean().describe(
|
|
695
|
+
"Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed."
|
|
696
|
+
).optional(),
|
|
697
|
+
name: z.string().describe("Deprecated: Use `id` or `_id`.").optional(),
|
|
698
|
+
inputs: z.array(
|
|
699
|
+
z.object({
|
|
700
|
+
name: z.string().describe("Field name.").optional(),
|
|
701
|
+
array: z.boolean().describe(
|
|
702
|
+
"*Deprecated:** Use `controls.inputs.type.TEXT_ARRAY`."
|
|
703
|
+
).optional(),
|
|
704
|
+
label: z.string().describe("Main field label.").optional(),
|
|
705
|
+
additionalLabels: z.record(z.string(), z.string()).describe(
|
|
706
|
+
"Additional labels for multi-valued fields such as address."
|
|
707
|
+
).optional(),
|
|
708
|
+
options: z.array(z.string()).optional(),
|
|
709
|
+
mandatory: z.boolean().describe("Whether field is mandatory.").optional(),
|
|
710
|
+
maxLength: z.number().int().describe(
|
|
711
|
+
"Maximum number of accepted characters (relevant for text fields)."
|
|
712
|
+
).optional(),
|
|
713
|
+
type: z.enum([
|
|
714
|
+
"TEXT",
|
|
715
|
+
"NUMBER",
|
|
716
|
+
"TEXT_ARRAY",
|
|
717
|
+
"DATE_TIME",
|
|
718
|
+
"ADDRESS"
|
|
719
|
+
]).describe(
|
|
720
|
+
"Type which determines field format.\nUsed to validate submitted response."
|
|
721
|
+
).optional(),
|
|
722
|
+
maxSize: z.number().int().describe(
|
|
723
|
+
"The maximum number of accepted values for array input.\n\n**Note:** Only applicable for `TEXT_ARRAY` input fields."
|
|
724
|
+
).optional().nullable(),
|
|
725
|
+
defaultOptionSelection: z.intersection(
|
|
726
|
+
z.object({}),
|
|
727
|
+
z.xor([
|
|
728
|
+
z.object({
|
|
729
|
+
optionIndex: z.never().optional(),
|
|
730
|
+
placeholderText: z.never().optional()
|
|
731
|
+
}),
|
|
732
|
+
z.object({
|
|
733
|
+
placeholderText: z.never().optional(),
|
|
734
|
+
optionIndex: z.number().int().describe(
|
|
735
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
736
|
+
).min(0).max(199)
|
|
737
|
+
}),
|
|
738
|
+
z.object({
|
|
739
|
+
optionIndex: z.never().optional(),
|
|
740
|
+
placeholderText: z.string().describe(
|
|
741
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
742
|
+
).max(200)
|
|
743
|
+
})
|
|
744
|
+
])
|
|
745
|
+
).describe(
|
|
746
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured.\nCurrently only applicable for `type.dropdown`."
|
|
747
|
+
).optional(),
|
|
748
|
+
labels: z.array(
|
|
749
|
+
z.object({
|
|
750
|
+
name: z.string().describe("Field name.").optional(),
|
|
751
|
+
label: z.string().describe("Field label.").optional()
|
|
752
|
+
})
|
|
753
|
+
).optional()
|
|
754
|
+
})
|
|
755
|
+
).optional(),
|
|
756
|
+
label: z.string().describe("*Deprecated:** Use `controls.inputs.label`.").optional(),
|
|
757
|
+
orderIndex: z.number().int().describe(
|
|
758
|
+
"Field controls are sorted by this value in ascending order."
|
|
759
|
+
).optional(),
|
|
760
|
+
_id: z.string().describe("Unique control ID.").optional(),
|
|
761
|
+
deleted: z.boolean().describe("Whether the input control is deleted.").optional().nullable()
|
|
762
|
+
})
|
|
763
|
+
).optional(),
|
|
764
|
+
messages: z.object({
|
|
765
|
+
rsvp: z.object({
|
|
766
|
+
rsvpYesOption: z.string().describe('Label text indicating RSVP\'s `status` is `"YES"`.').optional(),
|
|
767
|
+
rsvpNoOption: z.string().describe('Label text indicating RSVP\'s `status` is `"NO"`.').optional(),
|
|
768
|
+
positiveMessages: z.object({
|
|
769
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
770
|
+
confirmation: z.object({
|
|
771
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
772
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
773
|
+
addToCalendarActionLabel: z.string().describe(
|
|
774
|
+
'"Add to calendar" call-to-action label text.'
|
|
775
|
+
).optional(),
|
|
776
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
777
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
778
|
+
}).describe(
|
|
779
|
+
'Messages displayed when an RSVP\'s `status` is set to `"YES"`.'
|
|
780
|
+
).optional(),
|
|
781
|
+
waitlistMessages: z.object({
|
|
782
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
783
|
+
confirmation: z.object({
|
|
784
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
785
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
786
|
+
addToCalendarActionLabel: z.string().describe(
|
|
787
|
+
'"Add to calendar" call-to-action label text.'
|
|
788
|
+
).optional(),
|
|
789
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
790
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
791
|
+
}).describe(
|
|
792
|
+
'Messages displayed when an RSVP\'s `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).'
|
|
793
|
+
).optional(),
|
|
794
|
+
negativeMessages: z.object({
|
|
795
|
+
title: z.string().describe("Main form title for negative response.").optional(),
|
|
796
|
+
confirmation: z.object({
|
|
797
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
798
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
799
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
800
|
+
}).describe(
|
|
801
|
+
'Messages displayed when an RSVP\'s `status` is set to `"NO"`.'
|
|
802
|
+
).optional(),
|
|
803
|
+
submitActionLabel: z.string().describe('"Submit form" call-to-action label text.').optional()
|
|
804
|
+
}).describe(
|
|
805
|
+
"[RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction) messages."
|
|
806
|
+
).optional(),
|
|
807
|
+
checkout: z.object({
|
|
808
|
+
title: z.string().describe("Main form title for response.").optional(),
|
|
809
|
+
submitActionLabel: z.string().describe("Submit form call-to-action label text.").optional(),
|
|
810
|
+
confirmation: z.object({
|
|
811
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
812
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
813
|
+
downloadTicketsLabel: z.string().describe('"Download tickets" call-to-action label text.').optional(),
|
|
814
|
+
addToCalendarLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
815
|
+
shareEventLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
816
|
+
}).describe("Confirmation messages shown after checkout.").optional()
|
|
817
|
+
}).describe("Checkout form messages.").optional(),
|
|
818
|
+
registrationClosed: z.object({
|
|
819
|
+
message: z.string().describe("Message shown when event registration is closed.").optional(),
|
|
820
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
821
|
+
}).describe("Messages shown when event registration is closed.").optional(),
|
|
822
|
+
ticketsUnavailable: z.object({
|
|
823
|
+
message: z.string().describe("Message shown when event tickets are unavailable.").optional(),
|
|
824
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
825
|
+
}).describe("Messages shown when event tickets are unavailable.").optional()
|
|
826
|
+
}).describe(
|
|
827
|
+
'Set of defined form messages displayed in the UI before, during, and after a registration flow.\nIncludes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.'
|
|
828
|
+
).optional()
|
|
829
|
+
}).describe("Modified event form.").optional()
|
|
830
|
+
});
|
|
831
|
+
var DeleteControlRequest = z.object({
|
|
832
|
+
identifiers: z.object({
|
|
833
|
+
eventId: z.string().describe("Event ID to which the form belongs.").regex(
|
|
834
|
+
/^[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}$/,
|
|
835
|
+
"Must be a valid GUID"
|
|
836
|
+
),
|
|
837
|
+
_id: z.string().describe("Unique input control ID.").max(100)
|
|
838
|
+
}).describe("Identifies what form to delete.")
|
|
839
|
+
});
|
|
840
|
+
var DeleteControlResponse = z.object({
|
|
841
|
+
form: z.object({
|
|
842
|
+
controls: z.array(
|
|
843
|
+
z.object({
|
|
844
|
+
type: z.enum([
|
|
845
|
+
"INPUT",
|
|
846
|
+
"TEXTAREA",
|
|
847
|
+
"DROPDOWN",
|
|
848
|
+
"RADIO",
|
|
849
|
+
"CHECKBOX",
|
|
850
|
+
"NAME",
|
|
851
|
+
"GUEST_CONTROL",
|
|
852
|
+
"ADDRESS_SHORT",
|
|
853
|
+
"ADDRESS_FULL",
|
|
854
|
+
"DATE"
|
|
855
|
+
]).describe("Field control type.").optional(),
|
|
856
|
+
system: z.boolean().describe(
|
|
857
|
+
"Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed."
|
|
858
|
+
).optional(),
|
|
859
|
+
name: z.string().describe("Deprecated: Use `id` or `_id`.").optional(),
|
|
860
|
+
inputs: z.array(
|
|
861
|
+
z.object({
|
|
862
|
+
name: z.string().describe("Field name.").optional(),
|
|
863
|
+
array: z.boolean().describe(
|
|
864
|
+
"*Deprecated:** Use `controls.inputs.type.TEXT_ARRAY`."
|
|
865
|
+
).optional(),
|
|
866
|
+
label: z.string().describe("Main field label.").optional(),
|
|
867
|
+
additionalLabels: z.record(z.string(), z.string()).describe(
|
|
868
|
+
"Additional labels for multi-valued fields such as address."
|
|
869
|
+
).optional(),
|
|
870
|
+
options: z.array(z.string()).optional(),
|
|
871
|
+
mandatory: z.boolean().describe("Whether field is mandatory.").optional(),
|
|
872
|
+
maxLength: z.number().int().describe(
|
|
873
|
+
"Maximum number of accepted characters (relevant for text fields)."
|
|
874
|
+
).optional(),
|
|
875
|
+
type: z.enum([
|
|
876
|
+
"TEXT",
|
|
877
|
+
"NUMBER",
|
|
878
|
+
"TEXT_ARRAY",
|
|
879
|
+
"DATE_TIME",
|
|
880
|
+
"ADDRESS"
|
|
881
|
+
]).describe(
|
|
882
|
+
"Type which determines field format.\nUsed to validate submitted response."
|
|
883
|
+
).optional(),
|
|
884
|
+
maxSize: z.number().int().describe(
|
|
885
|
+
"The maximum number of accepted values for array input.\n\n**Note:** Only applicable for `TEXT_ARRAY` input fields."
|
|
886
|
+
).optional().nullable(),
|
|
887
|
+
defaultOptionSelection: z.intersection(
|
|
888
|
+
z.object({}),
|
|
889
|
+
z.xor([
|
|
890
|
+
z.object({
|
|
891
|
+
optionIndex: z.never().optional(),
|
|
892
|
+
placeholderText: z.never().optional()
|
|
893
|
+
}),
|
|
894
|
+
z.object({
|
|
895
|
+
placeholderText: z.never().optional(),
|
|
896
|
+
optionIndex: z.number().int().describe(
|
|
897
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
898
|
+
).min(0).max(199)
|
|
899
|
+
}),
|
|
900
|
+
z.object({
|
|
901
|
+
optionIndex: z.never().optional(),
|
|
902
|
+
placeholderText: z.string().describe(
|
|
903
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
904
|
+
).max(200)
|
|
905
|
+
})
|
|
906
|
+
])
|
|
907
|
+
).describe(
|
|
908
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured.\nCurrently only applicable for `type.dropdown`."
|
|
909
|
+
).optional(),
|
|
910
|
+
labels: z.array(
|
|
911
|
+
z.object({
|
|
912
|
+
name: z.string().describe("Field name.").optional(),
|
|
913
|
+
label: z.string().describe("Field label.").optional()
|
|
914
|
+
})
|
|
915
|
+
).optional()
|
|
916
|
+
})
|
|
917
|
+
).optional(),
|
|
918
|
+
label: z.string().describe("*Deprecated:** Use `controls.inputs.label`.").optional(),
|
|
919
|
+
orderIndex: z.number().int().describe(
|
|
920
|
+
"Field controls are sorted by this value in ascending order."
|
|
921
|
+
).optional(),
|
|
922
|
+
_id: z.string().describe("Unique control ID.").optional(),
|
|
923
|
+
deleted: z.boolean().describe("Whether the input control is deleted.").optional().nullable()
|
|
924
|
+
})
|
|
925
|
+
).optional(),
|
|
926
|
+
messages: z.object({
|
|
927
|
+
rsvp: z.object({
|
|
928
|
+
rsvpYesOption: z.string().describe('Label text indicating RSVP\'s `status` is `"YES"`.').optional(),
|
|
929
|
+
rsvpNoOption: z.string().describe('Label text indicating RSVP\'s `status` is `"NO"`.').optional(),
|
|
930
|
+
positiveMessages: z.object({
|
|
931
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
932
|
+
confirmation: z.object({
|
|
933
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
934
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
935
|
+
addToCalendarActionLabel: z.string().describe(
|
|
936
|
+
'"Add to calendar" call-to-action label text.'
|
|
937
|
+
).optional(),
|
|
938
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
939
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
940
|
+
}).describe(
|
|
941
|
+
'Messages displayed when an RSVP\'s `status` is set to `"YES"`.'
|
|
942
|
+
).optional(),
|
|
943
|
+
waitlistMessages: z.object({
|
|
944
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
945
|
+
confirmation: z.object({
|
|
946
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
947
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
948
|
+
addToCalendarActionLabel: z.string().describe(
|
|
949
|
+
'"Add to calendar" call-to-action label text.'
|
|
950
|
+
).optional(),
|
|
951
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
952
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
953
|
+
}).describe(
|
|
954
|
+
'Messages displayed when an RSVP\'s `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).'
|
|
955
|
+
).optional(),
|
|
956
|
+
negativeMessages: z.object({
|
|
957
|
+
title: z.string().describe("Main form title for negative response.").optional(),
|
|
958
|
+
confirmation: z.object({
|
|
959
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
960
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
961
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
962
|
+
}).describe(
|
|
963
|
+
'Messages displayed when an RSVP\'s `status` is set to `"NO"`.'
|
|
964
|
+
).optional(),
|
|
965
|
+
submitActionLabel: z.string().describe('"Submit form" call-to-action label text.').optional()
|
|
966
|
+
}).describe(
|
|
967
|
+
"[RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction) messages."
|
|
968
|
+
).optional(),
|
|
969
|
+
checkout: z.object({
|
|
970
|
+
title: z.string().describe("Main form title for response.").optional(),
|
|
971
|
+
submitActionLabel: z.string().describe("Submit form call-to-action label text.").optional(),
|
|
972
|
+
confirmation: z.object({
|
|
973
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
974
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
975
|
+
downloadTicketsLabel: z.string().describe('"Download tickets" call-to-action label text.').optional(),
|
|
976
|
+
addToCalendarLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
977
|
+
shareEventLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
978
|
+
}).describe("Confirmation messages shown after checkout.").optional()
|
|
979
|
+
}).describe("Checkout form messages.").optional(),
|
|
980
|
+
registrationClosed: z.object({
|
|
981
|
+
message: z.string().describe("Message shown when event registration is closed.").optional(),
|
|
982
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
983
|
+
}).describe("Messages shown when event registration is closed.").optional(),
|
|
984
|
+
ticketsUnavailable: z.object({
|
|
985
|
+
message: z.string().describe("Message shown when event tickets are unavailable.").optional(),
|
|
986
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
987
|
+
}).describe("Messages shown when event tickets are unavailable.").optional()
|
|
988
|
+
}).describe(
|
|
989
|
+
'Set of defined form messages displayed in the UI before, during, and after a registration flow.\nIncludes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.'
|
|
990
|
+
).optional()
|
|
991
|
+
}).describe("Modified event form").optional()
|
|
992
|
+
});
|
|
993
|
+
var UpdateMessagesRequest = z.object({
|
|
994
|
+
eventId: z.string().describe("Event ID to which the form belongs.").regex(
|
|
995
|
+
/^[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}$/,
|
|
996
|
+
"Must be a valid GUID"
|
|
997
|
+
),
|
|
998
|
+
options: z.object({
|
|
999
|
+
fields: z.object({ paths: z.array(z.string()) }).describe(
|
|
1000
|
+
"Set of field paths, specifying which parts of this resource to update.\nWhen fields are empty, request is interpreted as full update.\nBehavior follows [google.protobuf.FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask) semantics."
|
|
1001
|
+
).optional().nullable(),
|
|
1002
|
+
messages: z.object({
|
|
1003
|
+
rsvp: z.object({
|
|
1004
|
+
rsvpYesOption: z.string().describe('Label text indicating RSVP\'s `status` is `"YES"`.').optional(),
|
|
1005
|
+
rsvpNoOption: z.string().describe('Label text indicating RSVP\'s `status` is `"NO"`.').optional(),
|
|
1006
|
+
positiveMessages: z.object({
|
|
1007
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
1008
|
+
confirmation: z.object({
|
|
1009
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1010
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1011
|
+
addToCalendarActionLabel: z.string().describe(
|
|
1012
|
+
'"Add to calendar" call-to-action label text.'
|
|
1013
|
+
).optional(),
|
|
1014
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1015
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1016
|
+
}).describe(
|
|
1017
|
+
'Messages displayed when an RSVP\'s `status` is set to `"YES"`.'
|
|
1018
|
+
).optional(),
|
|
1019
|
+
waitlistMessages: z.object({
|
|
1020
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
1021
|
+
confirmation: z.object({
|
|
1022
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1023
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1024
|
+
addToCalendarActionLabel: z.string().describe(
|
|
1025
|
+
'"Add to calendar" call-to-action label text.'
|
|
1026
|
+
).optional(),
|
|
1027
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1028
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1029
|
+
}).describe(
|
|
1030
|
+
'Messages displayed when an RSVP\'s `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).'
|
|
1031
|
+
).optional(),
|
|
1032
|
+
negativeMessages: z.object({
|
|
1033
|
+
title: z.string().describe("Main form title for negative response.").optional(),
|
|
1034
|
+
confirmation: z.object({
|
|
1035
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1036
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1037
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1038
|
+
}).describe(
|
|
1039
|
+
'Messages displayed when an RSVP\'s `status` is set to `"NO"`.'
|
|
1040
|
+
).optional(),
|
|
1041
|
+
submitActionLabel: z.string().describe('"Submit form" call-to-action label text.').optional()
|
|
1042
|
+
}).describe(
|
|
1043
|
+
"[RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction) messages."
|
|
1044
|
+
).optional(),
|
|
1045
|
+
checkout: z.object({
|
|
1046
|
+
title: z.string().describe("Main form title for response.").optional(),
|
|
1047
|
+
submitActionLabel: z.string().describe("Submit form call-to-action label text.").optional(),
|
|
1048
|
+
confirmation: z.object({
|
|
1049
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1050
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1051
|
+
downloadTicketsLabel: z.string().describe('"Download tickets" call-to-action label text.').optional(),
|
|
1052
|
+
addToCalendarLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
1053
|
+
shareEventLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1054
|
+
}).describe("Confirmation messages shown after checkout.").optional()
|
|
1055
|
+
}).describe("Checkout form messages.").optional(),
|
|
1056
|
+
registrationClosed: z.object({
|
|
1057
|
+
message: z.string().describe("Message shown when event registration is closed.").optional(),
|
|
1058
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
1059
|
+
}).describe("Messages shown when event registration is closed.").optional(),
|
|
1060
|
+
ticketsUnavailable: z.object({
|
|
1061
|
+
message: z.string().describe("Message shown when event tickets are unavailable.").optional(),
|
|
1062
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
1063
|
+
}).describe("Messages shown when event tickets are unavailable.").optional()
|
|
1064
|
+
}).describe("Set of configured form messages to update.").optional()
|
|
1065
|
+
}).describe("Optional fields.").optional()
|
|
1066
|
+
});
|
|
1067
|
+
var UpdateMessagesResponse = z.object({
|
|
1068
|
+
form: z.object({
|
|
1069
|
+
controls: z.array(
|
|
1070
|
+
z.object({
|
|
1071
|
+
type: z.enum([
|
|
1072
|
+
"INPUT",
|
|
1073
|
+
"TEXTAREA",
|
|
1074
|
+
"DROPDOWN",
|
|
1075
|
+
"RADIO",
|
|
1076
|
+
"CHECKBOX",
|
|
1077
|
+
"NAME",
|
|
1078
|
+
"GUEST_CONTROL",
|
|
1079
|
+
"ADDRESS_SHORT",
|
|
1080
|
+
"ADDRESS_FULL",
|
|
1081
|
+
"DATE"
|
|
1082
|
+
]).describe("Field control type.").optional(),
|
|
1083
|
+
system: z.boolean().describe(
|
|
1084
|
+
"Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed."
|
|
1085
|
+
).optional(),
|
|
1086
|
+
name: z.string().describe("Deprecated: Use `id` or `_id`.").optional(),
|
|
1087
|
+
inputs: z.array(
|
|
1088
|
+
z.object({
|
|
1089
|
+
name: z.string().describe("Field name.").optional(),
|
|
1090
|
+
array: z.boolean().describe(
|
|
1091
|
+
"*Deprecated:** Use `controls.inputs.type.TEXT_ARRAY`."
|
|
1092
|
+
).optional(),
|
|
1093
|
+
label: z.string().describe("Main field label.").optional(),
|
|
1094
|
+
additionalLabels: z.record(z.string(), z.string()).describe(
|
|
1095
|
+
"Additional labels for multi-valued fields such as address."
|
|
1096
|
+
).optional(),
|
|
1097
|
+
options: z.array(z.string()).optional(),
|
|
1098
|
+
mandatory: z.boolean().describe("Whether field is mandatory.").optional(),
|
|
1099
|
+
maxLength: z.number().int().describe(
|
|
1100
|
+
"Maximum number of accepted characters (relevant for text fields)."
|
|
1101
|
+
).optional(),
|
|
1102
|
+
type: z.enum([
|
|
1103
|
+
"TEXT",
|
|
1104
|
+
"NUMBER",
|
|
1105
|
+
"TEXT_ARRAY",
|
|
1106
|
+
"DATE_TIME",
|
|
1107
|
+
"ADDRESS"
|
|
1108
|
+
]).describe(
|
|
1109
|
+
"Type which determines field format.\nUsed to validate submitted response."
|
|
1110
|
+
).optional(),
|
|
1111
|
+
maxSize: z.number().int().describe(
|
|
1112
|
+
"The maximum number of accepted values for array input.\n\n**Note:** Only applicable for `TEXT_ARRAY` input fields."
|
|
1113
|
+
).optional().nullable(),
|
|
1114
|
+
defaultOptionSelection: z.intersection(
|
|
1115
|
+
z.object({}),
|
|
1116
|
+
z.xor([
|
|
1117
|
+
z.object({
|
|
1118
|
+
optionIndex: z.never().optional(),
|
|
1119
|
+
placeholderText: z.never().optional()
|
|
1120
|
+
}),
|
|
1121
|
+
z.object({
|
|
1122
|
+
placeholderText: z.never().optional(),
|
|
1123
|
+
optionIndex: z.number().int().describe(
|
|
1124
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
1125
|
+
).min(0).max(199)
|
|
1126
|
+
}),
|
|
1127
|
+
z.object({
|
|
1128
|
+
optionIndex: z.never().optional(),
|
|
1129
|
+
placeholderText: z.string().describe(
|
|
1130
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
1131
|
+
).max(200)
|
|
1132
|
+
})
|
|
1133
|
+
])
|
|
1134
|
+
).describe(
|
|
1135
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured.\nCurrently only applicable for `type.dropdown`."
|
|
1136
|
+
).optional(),
|
|
1137
|
+
labels: z.array(
|
|
1138
|
+
z.object({
|
|
1139
|
+
name: z.string().describe("Field name.").optional(),
|
|
1140
|
+
label: z.string().describe("Field label.").optional()
|
|
1141
|
+
})
|
|
1142
|
+
).optional()
|
|
1143
|
+
})
|
|
1144
|
+
).optional(),
|
|
1145
|
+
label: z.string().describe("*Deprecated:** Use `controls.inputs.label`.").optional(),
|
|
1146
|
+
orderIndex: z.number().int().describe(
|
|
1147
|
+
"Field controls are sorted by this value in ascending order."
|
|
1148
|
+
).optional(),
|
|
1149
|
+
_id: z.string().describe("Unique control ID.").optional(),
|
|
1150
|
+
deleted: z.boolean().describe("Whether the input control is deleted.").optional().nullable()
|
|
1151
|
+
})
|
|
1152
|
+
).optional(),
|
|
1153
|
+
messages: z.object({
|
|
1154
|
+
rsvp: z.object({
|
|
1155
|
+
rsvpYesOption: z.string().describe('Label text indicating RSVP\'s `status` is `"YES"`.').optional(),
|
|
1156
|
+
rsvpNoOption: z.string().describe('Label text indicating RSVP\'s `status` is `"NO"`.').optional(),
|
|
1157
|
+
positiveMessages: z.object({
|
|
1158
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
1159
|
+
confirmation: z.object({
|
|
1160
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1161
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1162
|
+
addToCalendarActionLabel: z.string().describe(
|
|
1163
|
+
'"Add to calendar" call-to-action label text.'
|
|
1164
|
+
).optional(),
|
|
1165
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1166
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1167
|
+
}).describe(
|
|
1168
|
+
'Messages displayed when an RSVP\'s `status` is set to `"YES"`.'
|
|
1169
|
+
).optional(),
|
|
1170
|
+
waitlistMessages: z.object({
|
|
1171
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
1172
|
+
confirmation: z.object({
|
|
1173
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1174
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1175
|
+
addToCalendarActionLabel: z.string().describe(
|
|
1176
|
+
'"Add to calendar" call-to-action label text.'
|
|
1177
|
+
).optional(),
|
|
1178
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1179
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1180
|
+
}).describe(
|
|
1181
|
+
'Messages displayed when an RSVP\'s `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).'
|
|
1182
|
+
).optional(),
|
|
1183
|
+
negativeMessages: z.object({
|
|
1184
|
+
title: z.string().describe("Main form title for negative response.").optional(),
|
|
1185
|
+
confirmation: z.object({
|
|
1186
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1187
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1188
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1189
|
+
}).describe(
|
|
1190
|
+
'Messages displayed when an RSVP\'s `status` is set to `"NO"`.'
|
|
1191
|
+
).optional(),
|
|
1192
|
+
submitActionLabel: z.string().describe('"Submit form" call-to-action label text.').optional()
|
|
1193
|
+
}).describe(
|
|
1194
|
+
"[RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction) messages."
|
|
1195
|
+
).optional(),
|
|
1196
|
+
checkout: z.object({
|
|
1197
|
+
title: z.string().describe("Main form title for response.").optional(),
|
|
1198
|
+
submitActionLabel: z.string().describe("Submit form call-to-action label text.").optional(),
|
|
1199
|
+
confirmation: z.object({
|
|
1200
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1201
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1202
|
+
downloadTicketsLabel: z.string().describe('"Download tickets" call-to-action label text.').optional(),
|
|
1203
|
+
addToCalendarLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
1204
|
+
shareEventLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1205
|
+
}).describe("Confirmation messages shown after checkout.").optional()
|
|
1206
|
+
}).describe("Checkout form messages.").optional(),
|
|
1207
|
+
registrationClosed: z.object({
|
|
1208
|
+
message: z.string().describe("Message shown when event registration is closed.").optional(),
|
|
1209
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
1210
|
+
}).describe("Messages shown when event registration is closed.").optional(),
|
|
1211
|
+
ticketsUnavailable: z.object({
|
|
1212
|
+
message: z.string().describe("Message shown when event tickets are unavailable.").optional(),
|
|
1213
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
1214
|
+
}).describe("Messages shown when event tickets are unavailable.").optional()
|
|
1215
|
+
}).describe(
|
|
1216
|
+
'Set of defined form messages displayed in the UI before, during, and after a registration flow.\nIncludes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.'
|
|
1217
|
+
).optional()
|
|
1218
|
+
}).describe("Modified event form.").optional()
|
|
1219
|
+
});
|
|
1220
|
+
var PublishDraftRequest = z.object({
|
|
1221
|
+
eventId: z.string().describe("Event ID to which the form belongs.").regex(
|
|
1222
|
+
/^[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}$/,
|
|
1223
|
+
"Must be a valid GUID"
|
|
1224
|
+
)
|
|
1225
|
+
});
|
|
1226
|
+
var PublishDraftResponse = z.object({
|
|
1227
|
+
form: z.object({
|
|
1228
|
+
controls: z.array(
|
|
1229
|
+
z.object({
|
|
1230
|
+
type: z.enum([
|
|
1231
|
+
"INPUT",
|
|
1232
|
+
"TEXTAREA",
|
|
1233
|
+
"DROPDOWN",
|
|
1234
|
+
"RADIO",
|
|
1235
|
+
"CHECKBOX",
|
|
1236
|
+
"NAME",
|
|
1237
|
+
"GUEST_CONTROL",
|
|
1238
|
+
"ADDRESS_SHORT",
|
|
1239
|
+
"ADDRESS_FULL",
|
|
1240
|
+
"DATE"
|
|
1241
|
+
]).describe("Field control type.").optional(),
|
|
1242
|
+
system: z.boolean().describe(
|
|
1243
|
+
"Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed."
|
|
1244
|
+
).optional(),
|
|
1245
|
+
name: z.string().describe("Deprecated: Use `id` or `_id`.").optional(),
|
|
1246
|
+
inputs: z.array(
|
|
1247
|
+
z.object({
|
|
1248
|
+
name: z.string().describe("Field name.").optional(),
|
|
1249
|
+
array: z.boolean().describe(
|
|
1250
|
+
"*Deprecated:** Use `controls.inputs.type.TEXT_ARRAY`."
|
|
1251
|
+
).optional(),
|
|
1252
|
+
label: z.string().describe("Main field label.").optional(),
|
|
1253
|
+
additionalLabels: z.record(z.string(), z.string()).describe(
|
|
1254
|
+
"Additional labels for multi-valued fields such as address."
|
|
1255
|
+
).optional(),
|
|
1256
|
+
options: z.array(z.string()).optional(),
|
|
1257
|
+
mandatory: z.boolean().describe("Whether field is mandatory.").optional(),
|
|
1258
|
+
maxLength: z.number().int().describe(
|
|
1259
|
+
"Maximum number of accepted characters (relevant for text fields)."
|
|
1260
|
+
).optional(),
|
|
1261
|
+
type: z.enum([
|
|
1262
|
+
"TEXT",
|
|
1263
|
+
"NUMBER",
|
|
1264
|
+
"TEXT_ARRAY",
|
|
1265
|
+
"DATE_TIME",
|
|
1266
|
+
"ADDRESS"
|
|
1267
|
+
]).describe(
|
|
1268
|
+
"Type which determines field format.\nUsed to validate submitted response."
|
|
1269
|
+
).optional(),
|
|
1270
|
+
maxSize: z.number().int().describe(
|
|
1271
|
+
"The maximum number of accepted values for array input.\n\n**Note:** Only applicable for `TEXT_ARRAY` input fields."
|
|
1272
|
+
).optional().nullable(),
|
|
1273
|
+
defaultOptionSelection: z.intersection(
|
|
1274
|
+
z.object({}),
|
|
1275
|
+
z.xor([
|
|
1276
|
+
z.object({
|
|
1277
|
+
optionIndex: z.never().optional(),
|
|
1278
|
+
placeholderText: z.never().optional()
|
|
1279
|
+
}),
|
|
1280
|
+
z.object({
|
|
1281
|
+
placeholderText: z.never().optional(),
|
|
1282
|
+
optionIndex: z.number().int().describe(
|
|
1283
|
+
"0-based index from predefined `controls.inputs.options` which is initial selection."
|
|
1284
|
+
).min(0).max(199)
|
|
1285
|
+
}),
|
|
1286
|
+
z.object({
|
|
1287
|
+
optionIndex: z.never().optional(),
|
|
1288
|
+
placeholderText: z.string().describe(
|
|
1289
|
+
'Placeholder hint describing expected choices, such as "Please select".\nConsidered an empty choice.'
|
|
1290
|
+
).max(200)
|
|
1291
|
+
})
|
|
1292
|
+
])
|
|
1293
|
+
).describe(
|
|
1294
|
+
"Default option initially selected when an input has multiple choices.\n\nDefaults to first (0th) option, if not configured.\nCurrently only applicable for `type.dropdown`."
|
|
1295
|
+
).optional(),
|
|
1296
|
+
labels: z.array(
|
|
1297
|
+
z.object({
|
|
1298
|
+
name: z.string().describe("Field name.").optional(),
|
|
1299
|
+
label: z.string().describe("Field label.").optional()
|
|
1300
|
+
})
|
|
1301
|
+
).optional()
|
|
1302
|
+
})
|
|
1303
|
+
).optional(),
|
|
1304
|
+
label: z.string().describe("*Deprecated:** Use `controls.inputs.label`.").optional(),
|
|
1305
|
+
orderIndex: z.number().int().describe(
|
|
1306
|
+
"Field controls are sorted by this value in ascending order."
|
|
1307
|
+
).optional(),
|
|
1308
|
+
_id: z.string().describe("Unique control ID.").optional(),
|
|
1309
|
+
deleted: z.boolean().describe("Whether the input control is deleted.").optional().nullable()
|
|
1310
|
+
})
|
|
1311
|
+
).optional(),
|
|
1312
|
+
messages: z.object({
|
|
1313
|
+
rsvp: z.object({
|
|
1314
|
+
rsvpYesOption: z.string().describe('Label text indicating RSVP\'s `status` is `"YES"`.').optional(),
|
|
1315
|
+
rsvpNoOption: z.string().describe('Label text indicating RSVP\'s `status` is `"NO"`.').optional(),
|
|
1316
|
+
positiveMessages: z.object({
|
|
1317
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
1318
|
+
confirmation: z.object({
|
|
1319
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1320
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1321
|
+
addToCalendarActionLabel: z.string().describe(
|
|
1322
|
+
'"Add to calendar" call-to-action label text.'
|
|
1323
|
+
).optional(),
|
|
1324
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1325
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1326
|
+
}).describe(
|
|
1327
|
+
'Messages displayed when an RSVP\'s `status` is set to `"YES"`.'
|
|
1328
|
+
).optional(),
|
|
1329
|
+
waitlistMessages: z.object({
|
|
1330
|
+
title: z.string().describe("Main form title for positive response.").optional(),
|
|
1331
|
+
confirmation: z.object({
|
|
1332
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1333
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1334
|
+
addToCalendarActionLabel: z.string().describe(
|
|
1335
|
+
'"Add to calendar" call-to-action label text.'
|
|
1336
|
+
).optional(),
|
|
1337
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1338
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1339
|
+
}).describe(
|
|
1340
|
+
'Messages displayed when an RSVP\'s `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).'
|
|
1341
|
+
).optional(),
|
|
1342
|
+
negativeMessages: z.object({
|
|
1343
|
+
title: z.string().describe("Main form title for negative response.").optional(),
|
|
1344
|
+
confirmation: z.object({
|
|
1345
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1346
|
+
shareActionLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1347
|
+
}).describe("Confirmation messages shown after registration.").optional()
|
|
1348
|
+
}).describe(
|
|
1349
|
+
'Messages displayed when an RSVP\'s `status` is set to `"NO"`.'
|
|
1350
|
+
).optional(),
|
|
1351
|
+
submitActionLabel: z.string().describe('"Submit form" call-to-action label text.').optional()
|
|
1352
|
+
}).describe(
|
|
1353
|
+
"[RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction) messages."
|
|
1354
|
+
).optional(),
|
|
1355
|
+
checkout: z.object({
|
|
1356
|
+
title: z.string().describe("Main form title for response.").optional(),
|
|
1357
|
+
submitActionLabel: z.string().describe("Submit form call-to-action label text.").optional(),
|
|
1358
|
+
confirmation: z.object({
|
|
1359
|
+
title: z.string().describe("Confirmation message title.").optional(),
|
|
1360
|
+
message: z.string().describe("Confirmation message text.").optional(),
|
|
1361
|
+
downloadTicketsLabel: z.string().describe('"Download tickets" call-to-action label text.').optional(),
|
|
1362
|
+
addToCalendarLabel: z.string().describe('"Add to calendar" call-to-action label text.').optional(),
|
|
1363
|
+
shareEventLabel: z.string().describe('"Share event" call-to-action label text.').optional()
|
|
1364
|
+
}).describe("Confirmation messages shown after checkout.").optional()
|
|
1365
|
+
}).describe("Checkout form messages.").optional(),
|
|
1366
|
+
registrationClosed: z.object({
|
|
1367
|
+
message: z.string().describe("Message shown when event registration is closed.").optional(),
|
|
1368
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
1369
|
+
}).describe("Messages shown when event registration is closed.").optional(),
|
|
1370
|
+
ticketsUnavailable: z.object({
|
|
1371
|
+
message: z.string().describe("Message shown when event tickets are unavailable.").optional(),
|
|
1372
|
+
exploreEventsActionLabel: z.string().describe('"Explore other events" call-to-action label text.').optional()
|
|
1373
|
+
}).describe("Messages shown when event tickets are unavailable.").optional()
|
|
1374
|
+
}).describe(
|
|
1375
|
+
'Set of defined form messages displayed in the UI before, during, and after a registration flow.\nIncludes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.'
|
|
1376
|
+
).optional()
|
|
1377
|
+
}).describe("Event form.").optional()
|
|
1378
|
+
});
|
|
1379
|
+
var DiscardDraftRequest = z.object({
|
|
1380
|
+
eventId: z.string().describe("Event ID to which the form belongs.").regex(
|
|
1381
|
+
/^[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}$/,
|
|
1382
|
+
"Must be a valid GUID"
|
|
1383
|
+
)
|
|
1384
|
+
});
|
|
1385
|
+
var DiscardDraftResponse = z.object({});
|
|
1386
|
+
export {
|
|
1387
|
+
AddControlRequest,
|
|
1388
|
+
AddControlResponse,
|
|
1389
|
+
DeleteControlRequest,
|
|
1390
|
+
DeleteControlResponse,
|
|
1391
|
+
DiscardDraftRequest,
|
|
1392
|
+
DiscardDraftResponse,
|
|
1393
|
+
GetFormRequest,
|
|
1394
|
+
GetFormResponse,
|
|
1395
|
+
PublishDraftRequest,
|
|
1396
|
+
PublishDraftResponse,
|
|
1397
|
+
UpdateControlRequest,
|
|
1398
|
+
UpdateControlResponse,
|
|
1399
|
+
UpdateMessagesRequest,
|
|
1400
|
+
UpdateMessagesResponse
|
|
1401
|
+
};
|
|
1402
|
+
//# sourceMappingURL=schemas.mjs.map
|