@wix/auto_sdk_calendar_participations 1.0.49 → 1.0.50

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.
@@ -1,556 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // schemas.ts
31
- var schemas_exports = {};
32
- __export(schemas_exports, {
33
- CreateParticipationRequest: () => CreateParticipationRequest,
34
- CreateParticipationResponse: () => CreateParticipationResponse,
35
- DeleteParticipationRequest: () => DeleteParticipationRequest,
36
- DeleteParticipationResponse: () => DeleteParticipationResponse,
37
- GetParticipationRequest: () => GetParticipationRequest,
38
- GetParticipationResponse: () => GetParticipationResponse,
39
- QueryParticipationsRequest: () => QueryParticipationsRequest,
40
- QueryParticipationsResponse: () => QueryParticipationsResponse,
41
- UpdateParticipationRequest: () => UpdateParticipationRequest,
42
- UpdateParticipationResponse: () => UpdateParticipationResponse
43
- });
44
- module.exports = __toCommonJS(schemas_exports);
45
-
46
- // src/calendar-v3-participation-participations.schemas.ts
47
- var z = __toESM(require("zod"));
48
- var GetParticipationRequest = /* @__PURE__ */ z.object({
49
- participationId: z.string().describe("ID of the `participation` object to retrieve.").regex(
50
- /^[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}$/,
51
- "Must be a valid GUID"
52
- )
53
- });
54
- var GetParticipationResponse = /* @__PURE__ */ z.intersection(
55
- z.object({
56
- _id: z.string().describe("Participation ID.").regex(
57
- /^[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}$/,
58
- "Must be a valid GUID"
59
- ).optional().nullable(),
60
- externalId: z.string().describe("External ID.").regex(
61
- /^[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}$/,
62
- "Must be a valid GUID"
63
- ).optional().nullable(),
64
- participant: z.object({
65
- name: z.string().describe(
66
- "Participant name.\n\nMin: 1 character\nMax: 200 characters"
67
- ).min(1).max(200).optional().nullable(),
68
- phone: z.string().describe("Participant's phone number.").optional().nullable(),
69
- email: z.string().describe("Participant's email address.").email().optional().nullable(),
70
- contactId: z.string().describe(
71
- "[Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\nID of the parcipant."
72
- ).regex(
73
- /^[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}$/,
74
- "Must be a valid GUID"
75
- ).optional().nullable()
76
- }).describe("Information about the participant.").optional(),
77
- partySize: z.number().int().describe(
78
- "Party size of the group or `1` for individuals.\n\nMin: `1`\nMax: `1000`"
79
- ).min(1).max(1e3).optional().nullable(),
80
- status: z.enum(["CONFIRMED", "PENDING_CONFIRMATION"]).describe(
81
- "Status of the party's participation in the event. Depending on your\nimplementation, confirmation may be handled by the business owner or the customer.\n\nSupported values:\n+ `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n+ `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n\nDefault: `CONFIRMED`"
82
- ).optional(),
83
- appId: z.string().describe(
84
- "ID of the app that owns the participation `object`. Identical to `appId` of the\n[schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nthat the related\n[event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nbelongs to."
85
- ).regex(
86
- /^[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}$/,
87
- "Must be a valid GUID"
88
- ).optional().nullable(),
89
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
90
- "Revision number, which increments by 1 each time the participation is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the participation.\nIgnored when creating a participation."
91
- ).optional().nullable(),
92
- _createdDate: z.date().describe(
93
- "Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format."
94
- ).optional().nullable(),
95
- _updatedDate: z.date().describe(
96
- "Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format."
97
- ).optional().nullable(),
98
- extendedFields: z.object({
99
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
100
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
101
- ).optional()
102
- }).describe(
103
- "Extensions enabling applications or users to save custom data related to the participation."
104
- ).optional()
105
- }),
106
- z.xor([
107
- z.object({
108
- scheduleId: z.never().optional(),
109
- eventId: z.never().optional()
110
- }),
111
- z.object({
112
- eventId: z.never().optional(),
113
- scheduleId: z.string().describe(
114
- "ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nassociated with the participation."
115
- ).regex(
116
- /^[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}$/,
117
- "Must be a valid GUID"
118
- )
119
- }),
120
- z.object({
121
- scheduleId: z.never().optional(),
122
- eventId: z.string().describe(
123
- "ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nassociated with the participation."
124
- ).min(36).max(250)
125
- })
126
- ])
127
- );
128
- var QueryParticipationsRequest = /* @__PURE__ */ z.object({
129
- query: z.object({
130
- filter: z.object({
131
- _id: z.object({ $in: z.array(z.string()) }).partial().strict().optional(),
132
- eventId: z.object({ $eq: z.any(), $in: z.array(z.any()) }).partial().strict().optional(),
133
- scheduleId: z.object({ $eq: z.any(), $in: z.array(z.any()) }).partial().strict().optional(),
134
- externalId: z.object({ $eq: z.string(), $in: z.array(z.string()) }).partial().strict().optional(),
135
- $and: z.array(z.any()).optional(),
136
- $or: z.array(z.any()).optional(),
137
- $not: z.any().optional()
138
- }).strict().optional(),
139
- sort: z.array(z.object({})).optional()
140
- }).catchall(z.any()).describe("Query containing filters and paging.")
141
- });
142
- var QueryParticipationsResponse = /* @__PURE__ */ z.object({
143
- participations: z.array(
144
- z.intersection(
145
- z.object({
146
- _id: z.string().describe("Participation ID.").regex(
147
- /^[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}$/,
148
- "Must be a valid GUID"
149
- ).optional().nullable(),
150
- externalId: z.string().describe("External ID.").regex(
151
- /^[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}$/,
152
- "Must be a valid GUID"
153
- ).optional().nullable(),
154
- participant: z.object({
155
- name: z.string().describe(
156
- "Participant name.\n\nMin: 1 character\nMax: 200 characters"
157
- ).min(1).max(200).optional().nullable(),
158
- phone: z.string().describe("Participant's phone number.").optional().nullable(),
159
- email: z.string().describe("Participant's email address.").email().optional().nullable(),
160
- contactId: z.string().describe(
161
- "[Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\nID of the parcipant."
162
- ).regex(
163
- /^[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}$/,
164
- "Must be a valid GUID"
165
- ).optional().nullable()
166
- }).describe("Information about the participant.").optional(),
167
- partySize: z.number().int().describe(
168
- "Party size of the group or `1` for individuals.\n\nMin: `1`\nMax: `1000`"
169
- ).min(1).max(1e3).optional().nullable(),
170
- status: z.enum(["CONFIRMED", "PENDING_CONFIRMATION"]).describe(
171
- "Status of the party's participation in the event. Depending on your\nimplementation, confirmation may be handled by the business owner or the customer.\n\nSupported values:\n+ `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n+ `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n\nDefault: `CONFIRMED`"
172
- ).optional(),
173
- appId: z.string().describe(
174
- "ID of the app that owns the participation `object`. Identical to `appId` of the\n[schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nthat the related\n[event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nbelongs to."
175
- ).regex(
176
- /^[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}$/,
177
- "Must be a valid GUID"
178
- ).optional().nullable(),
179
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
180
- "Revision number, which increments by 1 each time the participation is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the participation.\nIgnored when creating a participation."
181
- ).optional().nullable(),
182
- _createdDate: z.date().describe(
183
- "Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format."
184
- ).optional().nullable(),
185
- _updatedDate: z.date().describe(
186
- "Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format."
187
- ).optional().nullable(),
188
- extendedFields: z.object({
189
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
190
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
191
- ).optional()
192
- }).describe(
193
- "Extensions enabling applications or users to save custom data related to the participation."
194
- ).optional()
195
- }),
196
- z.xor([
197
- z.object({
198
- scheduleId: z.never().optional(),
199
- eventId: z.never().optional()
200
- }),
201
- z.object({
202
- eventId: z.never().optional(),
203
- scheduleId: z.string().describe(
204
- "ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nassociated with the participation."
205
- ).regex(
206
- /^[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}$/,
207
- "Must be a valid GUID"
208
- )
209
- }),
210
- z.object({
211
- scheduleId: z.never().optional(),
212
- eventId: z.string().describe(
213
- "ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nassociated with the participation."
214
- ).min(36).max(250)
215
- })
216
- ])
217
- )
218
- ).optional(),
219
- pagingMetadata: z.object({
220
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
221
- cursors: z.object({
222
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
223
- prev: z.string().describe(
224
- "Cursor pointing to previous page in the list of results."
225
- ).optional().nullable()
226
- }).describe("Offset that was requested.").optional(),
227
- hasNext: z.boolean().describe(
228
- "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
229
- ).optional().nullable()
230
- }).describe("Paging metadata.").optional()
231
- });
232
- var CreateParticipationRequest = /* @__PURE__ */ z.object({
233
- participation: z.intersection(
234
- z.object({
235
- _id: z.string().describe("Participation ID.").regex(
236
- /^[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}$/,
237
- "Must be a valid GUID"
238
- ).optional().nullable(),
239
- externalId: z.string().describe("External ID.").regex(
240
- /^[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}$/,
241
- "Must be a valid GUID"
242
- ).optional().nullable(),
243
- participant: z.object({
244
- name: z.string().describe(
245
- "Participant name.\n\nMin: 1 character\nMax: 200 characters"
246
- ).min(1).max(200),
247
- phone: z.string().describe("Participant's phone number.").optional().nullable(),
248
- email: z.string().describe("Participant's email address.").email().optional().nullable(),
249
- contactId: z.string().describe(
250
- "[Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\nID of the parcipant."
251
- ).regex(
252
- /^[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}$/,
253
- "Must be a valid GUID"
254
- ).optional().nullable()
255
- }).describe("Information about the participant."),
256
- partySize: z.number().int().describe(
257
- "Party size of the group or `1` for individuals.\n\nMin: `1`\nMax: `1000`"
258
- ).min(1).max(1e3),
259
- status: z.enum(["CONFIRMED", "PENDING_CONFIRMATION"]).optional(),
260
- appId: z.string().describe(
261
- "ID of the app that owns the participation `object`. Identical to `appId` of the\n[schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nthat the related\n[event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nbelongs to."
262
- ).regex(
263
- /^[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}$/,
264
- "Must be a valid GUID"
265
- ).optional().nullable(),
266
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
267
- "Revision number, which increments by 1 each time the participation is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the participation.\nIgnored when creating a participation."
268
- ).optional().nullable(),
269
- _createdDate: z.date().describe(
270
- "Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format."
271
- ).optional().nullable(),
272
- _updatedDate: z.date().describe(
273
- "Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format."
274
- ).optional().nullable(),
275
- extendedFields: z.object({
276
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
277
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
278
- ).optional()
279
- }).describe(
280
- "Extensions enabling applications or users to save custom data related to the participation."
281
- ).optional()
282
- }),
283
- z.xor([
284
- z.object({
285
- eventId: z.never().optional(),
286
- scheduleId: z.string().describe(
287
- "ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nassociated with the participation."
288
- ).regex(
289
- /^[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}$/,
290
- "Must be a valid GUID"
291
- )
292
- }),
293
- z.object({
294
- scheduleId: z.never().optional(),
295
- eventId: z.string().describe(
296
- "ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nassociated with the participation."
297
- ).min(36).max(250)
298
- })
299
- ])
300
- ).describe("`participation` object to create."),
301
- options: z.object({
302
- idempotencyKey: z.string().describe(
303
- "Idempotency key guaranteeing that you don't create the same `participation`\nobject more than once."
304
- ).regex(
305
- /^[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}$/,
306
- "Must be a valid GUID"
307
- ).optional().nullable()
308
- }).optional()
309
- });
310
- var CreateParticipationResponse = /* @__PURE__ */ z.intersection(
311
- z.object({
312
- _id: z.string().describe("Participation ID.").regex(
313
- /^[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}$/,
314
- "Must be a valid GUID"
315
- ).optional().nullable(),
316
- externalId: z.string().describe("External ID.").regex(
317
- /^[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}$/,
318
- "Must be a valid GUID"
319
- ).optional().nullable(),
320
- participant: z.object({
321
- name: z.string().describe(
322
- "Participant name.\n\nMin: 1 character\nMax: 200 characters"
323
- ).min(1).max(200).optional().nullable(),
324
- phone: z.string().describe("Participant's phone number.").optional().nullable(),
325
- email: z.string().describe("Participant's email address.").email().optional().nullable(),
326
- contactId: z.string().describe(
327
- "[Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\nID of the parcipant."
328
- ).regex(
329
- /^[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}$/,
330
- "Must be a valid GUID"
331
- ).optional().nullable()
332
- }).describe("Information about the participant.").optional(),
333
- partySize: z.number().int().describe(
334
- "Party size of the group or `1` for individuals.\n\nMin: `1`\nMax: `1000`"
335
- ).min(1).max(1e3).optional().nullable(),
336
- status: z.enum(["CONFIRMED", "PENDING_CONFIRMATION"]).describe(
337
- "Status of the party's participation in the event. Depending on your\nimplementation, confirmation may be handled by the business owner or the customer.\n\nSupported values:\n+ `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n+ `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n\nDefault: `CONFIRMED`"
338
- ).optional(),
339
- appId: z.string().describe(
340
- "ID of the app that owns the participation `object`. Identical to `appId` of the\n[schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nthat the related\n[event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nbelongs to."
341
- ).regex(
342
- /^[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}$/,
343
- "Must be a valid GUID"
344
- ).optional().nullable(),
345
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
346
- "Revision number, which increments by 1 each time the participation is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the participation.\nIgnored when creating a participation."
347
- ).optional().nullable(),
348
- _createdDate: z.date().describe(
349
- "Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format."
350
- ).optional().nullable(),
351
- _updatedDate: z.date().describe(
352
- "Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format."
353
- ).optional().nullable(),
354
- extendedFields: z.object({
355
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
356
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
357
- ).optional()
358
- }).describe(
359
- "Extensions enabling applications or users to save custom data related to the participation."
360
- ).optional()
361
- }),
362
- z.xor([
363
- z.object({
364
- scheduleId: z.never().optional(),
365
- eventId: z.never().optional()
366
- }),
367
- z.object({
368
- eventId: z.never().optional(),
369
- scheduleId: z.string().describe(
370
- "ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nassociated with the participation."
371
- ).regex(
372
- /^[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}$/,
373
- "Must be a valid GUID"
374
- )
375
- }),
376
- z.object({
377
- scheduleId: z.never().optional(),
378
- eventId: z.string().describe(
379
- "ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nassociated with the participation."
380
- ).min(36).max(250)
381
- })
382
- ])
383
- );
384
- var UpdateParticipationRequest = /* @__PURE__ */ z.object({
385
- _id: z.string().describe("Participation ID.").regex(
386
- /^[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}$/,
387
- "Must be a valid GUID"
388
- ),
389
- participation: z.intersection(
390
- z.object({
391
- _id: z.string().describe("Participation ID.").regex(
392
- /^[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}$/,
393
- "Must be a valid GUID"
394
- ).optional().nullable(),
395
- externalId: z.string().describe("External ID.").regex(
396
- /^[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}$/,
397
- "Must be a valid GUID"
398
- ).optional().nullable(),
399
- participant: z.object({
400
- name: z.string().describe(
401
- "Participant name.\n\nMin: 1 character\nMax: 200 characters"
402
- ).min(1).max(200).optional().nullable(),
403
- phone: z.string().describe("Participant's phone number.").optional().nullable(),
404
- email: z.string().describe("Participant's email address.").email().optional().nullable(),
405
- contactId: z.string().describe(
406
- "[Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\nID of the parcipant."
407
- ).regex(
408
- /^[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}$/,
409
- "Must be a valid GUID"
410
- ).optional().nullable()
411
- }).describe("Information about the participant.").optional(),
412
- partySize: z.number().int().describe(
413
- "Party size of the group or `1` for individuals.\n\nMin: `1`\nMax: `1000`"
414
- ).min(1).max(1e3).optional().nullable(),
415
- status: z.enum(["CONFIRMED", "PENDING_CONFIRMATION"]).optional(),
416
- appId: z.string().describe(
417
- "ID of the app that owns the participation `object`. Identical to `appId` of the\n[schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nthat the related\n[event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nbelongs to."
418
- ).regex(
419
- /^[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}$/,
420
- "Must be a valid GUID"
421
- ).optional().nullable(),
422
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
423
- "Revision number, which increments by 1 each time the participation is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the participation.\nIgnored when creating a participation."
424
- ),
425
- _createdDate: z.date().describe(
426
- "Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format."
427
- ).optional().nullable(),
428
- _updatedDate: z.date().describe(
429
- "Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format."
430
- ).optional().nullable(),
431
- extendedFields: z.object({
432
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
433
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
434
- ).optional()
435
- }).describe(
436
- "Extensions enabling applications or users to save custom data related to the participation."
437
- ).optional()
438
- }),
439
- z.xor([
440
- z.object({
441
- scheduleId: z.never().optional(),
442
- eventId: z.never().optional()
443
- }),
444
- z.object({
445
- eventId: z.never().optional(),
446
- scheduleId: z.string().describe(
447
- "ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nassociated with the participation."
448
- ).regex(
449
- /^[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}$/,
450
- "Must be a valid GUID"
451
- )
452
- }),
453
- z.object({
454
- scheduleId: z.never().optional(),
455
- eventId: z.string().describe(
456
- "ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nassociated with the participation."
457
- ).min(36).max(250)
458
- })
459
- ])
460
- ).describe("`participation` object to update.")
461
- });
462
- var UpdateParticipationResponse = /* @__PURE__ */ z.intersection(
463
- z.object({
464
- _id: z.string().describe("Participation ID.").regex(
465
- /^[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}$/,
466
- "Must be a valid GUID"
467
- ).optional().nullable(),
468
- externalId: z.string().describe("External ID.").regex(
469
- /^[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}$/,
470
- "Must be a valid GUID"
471
- ).optional().nullable(),
472
- participant: z.object({
473
- name: z.string().describe(
474
- "Participant name.\n\nMin: 1 character\nMax: 200 characters"
475
- ).min(1).max(200).optional().nullable(),
476
- phone: z.string().describe("Participant's phone number.").optional().nullable(),
477
- email: z.string().describe("Participant's email address.").email().optional().nullable(),
478
- contactId: z.string().describe(
479
- "[Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\nID of the parcipant."
480
- ).regex(
481
- /^[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}$/,
482
- "Must be a valid GUID"
483
- ).optional().nullable()
484
- }).describe("Information about the participant.").optional(),
485
- partySize: z.number().int().describe(
486
- "Party size of the group or `1` for individuals.\n\nMin: `1`\nMax: `1000`"
487
- ).min(1).max(1e3).optional().nullable(),
488
- status: z.enum(["CONFIRMED", "PENDING_CONFIRMATION"]).describe(
489
- "Status of the party's participation in the event. Depending on your\nimplementation, confirmation may be handled by the business owner or the customer.\n\nSupported values:\n+ `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n+ `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n\nDefault: `CONFIRMED`"
490
- ).optional(),
491
- appId: z.string().describe(
492
- "ID of the app that owns the participation `object`. Identical to `appId` of the\n[schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nthat the related\n[event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nbelongs to."
493
- ).regex(
494
- /^[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}$/,
495
- "Must be a valid GUID"
496
- ).optional().nullable(),
497
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
498
- "Revision number, which increments by 1 each time the participation is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the participation.\nIgnored when creating a participation."
499
- ).optional().nullable(),
500
- _createdDate: z.date().describe(
501
- "Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format."
502
- ).optional().nullable(),
503
- _updatedDate: z.date().describe(
504
- "Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format."
505
- ).optional().nullable(),
506
- extendedFields: z.object({
507
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
508
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
509
- ).optional()
510
- }).describe(
511
- "Extensions enabling applications or users to save custom data related to the participation."
512
- ).optional()
513
- }),
514
- z.xor([
515
- z.object({
516
- scheduleId: z.never().optional(),
517
- eventId: z.never().optional()
518
- }),
519
- z.object({
520
- eventId: z.never().optional(),
521
- scheduleId: z.string().describe(
522
- "ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\nassociated with the participation."
523
- ).regex(
524
- /^[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}$/,
525
- "Must be a valid GUID"
526
- )
527
- }),
528
- z.object({
529
- scheduleId: z.never().optional(),
530
- eventId: z.string().describe(
531
- "ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\nassociated with the participation."
532
- ).min(36).max(250)
533
- })
534
- ])
535
- );
536
- var DeleteParticipationRequest = /* @__PURE__ */ z.object({
537
- participationId: z.string().describe("ID of `participation` object to delete.").regex(
538
- /^[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}$/,
539
- "Must be a valid GUID"
540
- )
541
- });
542
- var DeleteParticipationResponse = /* @__PURE__ */ z.object({});
543
- // Annotate the CommonJS export names for ESM import in node:
544
- 0 && (module.exports = {
545
- CreateParticipationRequest,
546
- CreateParticipationResponse,
547
- DeleteParticipationRequest,
548
- DeleteParticipationResponse,
549
- GetParticipationRequest,
550
- GetParticipationResponse,
551
- QueryParticipationsRequest,
552
- QueryParticipationsResponse,
553
- UpdateParticipationRequest,
554
- UpdateParticipationResponse
555
- });
556
- //# sourceMappingURL=schemas.js.map