@wix/auto_sdk_bookings_availability-time-slots 1.0.252 → 1.0.253
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 +41 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +77 -57
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +18 -32
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +89 -1
- package/build/cjs/schemas.js +211 -3
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +41 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +77 -57
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +18 -32
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +89 -1
- package/build/es/schemas.mjs +209 -3
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +24 -21
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +59 -75
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +18 -32
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +89 -1
- package/build/internal/cjs/schemas.js +211 -3
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +24 -21
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +59 -75
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +18 -32
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +89 -1
- package/build/internal/es/schemas.mjs +209 -3
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/schemas.d.ts
CHANGED
|
@@ -112,6 +112,94 @@ declare const ListAvailabilityTimeSlotsResponse: z.ZodObject<{
|
|
|
112
112
|
hasNext: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
113
113
|
}, z.core.$strip>>;
|
|
114
114
|
}, z.core.$strip>;
|
|
115
|
+
declare const ListAvailabilityTimeSlotEndOptionsRequest: z.ZodObject<{
|
|
116
|
+
serviceId: z.ZodString;
|
|
117
|
+
options: z.ZodObject<{
|
|
118
|
+
localStartDate: z.ZodString;
|
|
119
|
+
maxLocalEndDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
120
|
+
timeZone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
121
|
+
location: z.ZodObject<{
|
|
122
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
123
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
124
|
+
formattedAddress: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
125
|
+
locationType: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
BUSINESS: "BUSINESS";
|
|
127
|
+
CUSTOM: "CUSTOM";
|
|
128
|
+
CUSTOMER: "CUSTOMER";
|
|
129
|
+
}>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
resourceTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
+
resourceTypeId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
133
|
+
resourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
|
+
}, z.core.$strip>>>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
declare const ListAvailabilityTimeSlotEndOptionsResponse: z.ZodObject<{
|
|
138
|
+
endOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
139
|
+
serviceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
140
|
+
localStartDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
141
|
+
localEndDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
142
|
+
bookable: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
143
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
145
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
146
|
+
formattedAddress: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
147
|
+
locationType: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
BUSINESS: "BUSINESS";
|
|
149
|
+
CUSTOM: "CUSTOM";
|
|
150
|
+
CUSTOMER: "CUSTOMER";
|
|
151
|
+
}>>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
eventInfo: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
eventId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
155
|
+
waitingList: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
totalCapacity: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
157
|
+
remainingCapacity: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
eventTitle: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
totalCapacity: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
162
|
+
remainingCapacity: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
163
|
+
bookableCapacity: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
164
|
+
bookingPolicyViolations: z.ZodOptional<z.ZodObject<{
|
|
165
|
+
tooEarlyToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
166
|
+
earliestBookingDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
167
|
+
tooLateToBook: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
168
|
+
bookOnlineDisabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
availableResources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
+
resourceTypeId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
172
|
+
resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
173
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
174
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
175
|
+
}, z.core.$strip>>>;
|
|
176
|
+
hasMoreAvailableResources: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
177
|
+
}, z.core.$strip>>>;
|
|
178
|
+
nestedTimeSlots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
179
|
+
serviceId: z.ZodOptional<z.ZodString>;
|
|
180
|
+
localStartDate: z.ZodOptional<z.ZodString>;
|
|
181
|
+
localEndDate: z.ZodOptional<z.ZodString>;
|
|
182
|
+
availableResources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
|
+
resourceTypeId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
184
|
+
resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
185
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
186
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
187
|
+
}, z.core.$strip>>>;
|
|
188
|
+
hasMoreAvailableResources: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
189
|
+
}, z.core.$strip>>>;
|
|
190
|
+
scheduleId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
191
|
+
}, z.core.$strip>>>;
|
|
192
|
+
nonBookableReasons: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
noRemainingCapacity: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
194
|
+
violatesBookingPolicy: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
195
|
+
reservedForWaitingList: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
196
|
+
eventCancelled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
scheduleId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
199
|
+
allDay: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
200
|
+
}, z.core.$strip>>>;
|
|
201
|
+
timeZone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
202
|
+
}, z.core.$strip>;
|
|
115
203
|
declare const GetAvailabilityTimeSlotRequest: z.ZodObject<{
|
|
116
204
|
serviceId: z.ZodString;
|
|
117
205
|
localStartDate: z.ZodString;
|
|
@@ -202,4 +290,4 @@ declare const GetAvailabilityTimeSlotResponse: z.ZodObject<{
|
|
|
202
290
|
timeZone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
203
291
|
}, z.core.$strip>;
|
|
204
292
|
|
|
205
|
-
export { GetAvailabilityTimeSlotRequest, GetAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotsRequest, ListAvailabilityTimeSlotsResponse };
|
|
293
|
+
export { GetAvailabilityTimeSlotRequest, GetAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotEndOptionsRequest, ListAvailabilityTimeSlotEndOptionsResponse, ListAvailabilityTimeSlotsRequest, ListAvailabilityTimeSlotsResponse };
|
package/build/cjs/schemas.js
CHANGED
|
@@ -32,6 +32,8 @@ var schemas_exports = {};
|
|
|
32
32
|
__export(schemas_exports, {
|
|
33
33
|
GetAvailabilityTimeSlotRequest: () => GetAvailabilityTimeSlotRequest,
|
|
34
34
|
GetAvailabilityTimeSlotResponse: () => GetAvailabilityTimeSlotResponse,
|
|
35
|
+
ListAvailabilityTimeSlotEndOptionsRequest: () => ListAvailabilityTimeSlotEndOptionsRequest,
|
|
36
|
+
ListAvailabilityTimeSlotEndOptionsResponse: () => ListAvailabilityTimeSlotEndOptionsResponse,
|
|
35
37
|
ListAvailabilityTimeSlotsRequest: () => ListAvailabilityTimeSlotsRequest,
|
|
36
38
|
ListAvailabilityTimeSlotsResponse: () => ListAvailabilityTimeSlotsResponse
|
|
37
39
|
});
|
|
@@ -108,7 +110,7 @@ var ListAvailabilityTimeSlotsRequest = z.object({
|
|
|
108
110
|
).min(1).max(44639).optional().nullable(),
|
|
109
111
|
addOnIds: z.array(z.string()).max(21).optional()
|
|
110
112
|
}).describe(
|
|
111
|
-
"Selected customer choices for service configuration.\nIf not specified, uses the service's default configuration.\n\nWhen using [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction), we recommend passing only `addOnIds` and omitting `durationInMinutes`. Wix Bookings then calculates the total duration automatically. If you specify both `addOnIds` and `durationInMinutes`, `durationInMinutes` must equal the service duration plus all selected add-on durations."
|
|
113
|
+
"Selected customer choices for service configuration.\nIf not specified, uses the service's default configuration.\n\nNot supported for services configured with a duration range (`availabilityConstraints.durationRange`).\n\nWhen using [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction), we recommend passing only `addOnIds` and omitting `durationInMinutes`. Wix Bookings then calculates the total duration automatically. If you specify both `addOnIds` and `durationInMinutes`, `durationInMinutes` must equal the service duration plus all selected add-on durations."
|
|
112
114
|
).optional(),
|
|
113
115
|
resourceTypes: z.array(
|
|
114
116
|
z.object({
|
|
@@ -276,7 +278,7 @@ var ListAvailabilityTimeSlotsResponse = z.object({
|
|
|
276
278
|
"Must be a valid GUID"
|
|
277
279
|
).optional().nullable(),
|
|
278
280
|
allDay: z.boolean().describe(
|
|
279
|
-
"Whether this time slot spans one or more full days.\
|
|
281
|
+
"Whether this time slot spans one or more full days.\nWhen `true`, `localStartDate` is `00:00:00` of the first day and `localEndDate` is `00:00:00` of the day after the last day (exclusive).\nMidnight boundaries are interpreted in the event's `timeZone`.\nThe time component should be ignored for display purposes.\n\nDefault: `false`"
|
|
280
282
|
).optional().nullable()
|
|
281
283
|
})
|
|
282
284
|
).max(1e3).optional(),
|
|
@@ -297,6 +299,210 @@ var ListAvailabilityTimeSlotsResponse = z.object({
|
|
|
297
299
|
"Paging metadata for the next page of results.\nContains a cursor if there are more than 1000 results."
|
|
298
300
|
).optional()
|
|
299
301
|
});
|
|
302
|
+
var ListAvailabilityTimeSlotEndOptionsRequest = z.object({
|
|
303
|
+
serviceId: z.string().describe(
|
|
304
|
+
"[Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) ID. Must be an appointment-based service configured with `availabilityConstraints.durationRange.hourConfig`."
|
|
305
|
+
).regex(
|
|
306
|
+
/^[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}$/,
|
|
307
|
+
"Must be a valid GUID"
|
|
308
|
+
),
|
|
309
|
+
options: z.object({
|
|
310
|
+
localStartDate: z.string().describe(
|
|
311
|
+
"Selected start time in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-03-23T10:00:00`.\nEach returned end option shares this start time."
|
|
312
|
+
),
|
|
313
|
+
maxLocalEndDate: z.string().describe(
|
|
314
|
+
"Latest end time to include in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-03-23T14:00:00`.\nThe service's maximum duration always caps the result, even if a later value is specified.\n\nDefault: `localStartDate` plus the service's maximum duration from `durationRange.hourConfig`."
|
|
315
|
+
).optional().nullable(),
|
|
316
|
+
timeZone: z.string().describe(
|
|
317
|
+
"Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York` or `UTC`.\n\nDefault: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties)."
|
|
318
|
+
).min(1).max(150).optional().nullable(),
|
|
319
|
+
location: z.object({
|
|
320
|
+
_id: z.string().describe(
|
|
321
|
+
"[Location ID](https://dev.wix.com/docs/api-reference/business-management/locations/introduction).\nAvailable only for business locations."
|
|
322
|
+
).regex(
|
|
323
|
+
/^[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}$/,
|
|
324
|
+
"Must be a valid GUID"
|
|
325
|
+
).optional().nullable(),
|
|
326
|
+
name: z.string().describe("Location name.").optional().nullable(),
|
|
327
|
+
formattedAddress: z.string().describe("Formatted location address.").optional().nullable(),
|
|
328
|
+
locationType: z.enum(["BUSINESS", "CUSTOM", "CUSTOMER"]).optional()
|
|
329
|
+
}).describe(
|
|
330
|
+
"Location of the selected start time. Must match the location of the slot returned by [List Availability Time Slots](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/list-availability-time-slots)."
|
|
331
|
+
),
|
|
332
|
+
resourceTypes: z.array(
|
|
333
|
+
z.object({
|
|
334
|
+
resourceTypeId: z.string().describe(
|
|
335
|
+
"[Resource type ID](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction)."
|
|
336
|
+
).regex(
|
|
337
|
+
/^[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}$/,
|
|
338
|
+
"Must be a valid GUID"
|
|
339
|
+
).optional().nullable(),
|
|
340
|
+
resourceIds: z.array(z.string()).max(135).optional()
|
|
341
|
+
})
|
|
342
|
+
).max(3).optional()
|
|
343
|
+
})
|
|
344
|
+
});
|
|
345
|
+
var ListAvailabilityTimeSlotEndOptionsResponse = z.object({
|
|
346
|
+
endOptions: z.array(
|
|
347
|
+
z.object({
|
|
348
|
+
serviceId: z.string().describe(
|
|
349
|
+
"[Service ID] (https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction).\n\nAvailable only for single-service bookings. For multi-service bookings, this field is empty and individual service IDs are provided in `nestedTimeSlots`."
|
|
350
|
+
).regex(
|
|
351
|
+
/^[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}$/,
|
|
352
|
+
"Must be a valid GUID"
|
|
353
|
+
).optional().nullable(),
|
|
354
|
+
localStartDate: z.string().describe(
|
|
355
|
+
"Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\nFor example, `2026-01-30T13:30:00`.\n\nFor multi-service bookings, this represents the start time of the first service in the sequence.\n\nIn `ListAvailabilityTimeSlotEndOptions`, this is identical on every entry and equals the request's `localStartDate`."
|
|
356
|
+
).optional().nullable(),
|
|
357
|
+
localEndDate: z.string().describe(
|
|
358
|
+
"Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\nFor example, `2026-01-30T14:00:00`.\n\nFor multi-service bookings, this represents the end time of the last service in the sequence."
|
|
359
|
+
).optional().nullable(),
|
|
360
|
+
bookable: z.boolean().describe(
|
|
361
|
+
"Whether customers can book the slot according to the service's [booking policies](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/introduction).\n\nFor multi-service bookings, this is `true` only when all services in the sequence comply with their respective booking policies."
|
|
362
|
+
).optional().nullable(),
|
|
363
|
+
location: z.object({
|
|
364
|
+
_id: z.string().describe(
|
|
365
|
+
"[Location ID](https://dev.wix.com/docs/api-reference/business-management/locations/introduction).\nAvailable only for business locations."
|
|
366
|
+
).regex(
|
|
367
|
+
/^[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}$/,
|
|
368
|
+
"Must be a valid GUID"
|
|
369
|
+
).optional().nullable(),
|
|
370
|
+
name: z.string().describe("Location name.").optional().nullable(),
|
|
371
|
+
formattedAddress: z.string().describe("Formatted location address.").optional().nullable(),
|
|
372
|
+
locationType: z.enum(["BUSINESS", "CUSTOM", "CUSTOMER"]).describe("Location type.").optional()
|
|
373
|
+
}).describe(
|
|
374
|
+
"Information about where the business provides the service to the customer.\n\nIn `ListAvailabilityTimeSlotEndOptions`, this is the requested location, identical on every entry."
|
|
375
|
+
).optional(),
|
|
376
|
+
eventInfo: z.object({
|
|
377
|
+
eventId: z.string().describe("Event ID.").min(36).max(250).optional().nullable(),
|
|
378
|
+
waitingList: z.object({
|
|
379
|
+
totalCapacity: z.number().int().describe("Total number of spots in the waitlist.").min(1).optional().nullable(),
|
|
380
|
+
remainingCapacity: z.number().int().describe(
|
|
381
|
+
"Number of remaining spots in the waitlist.\nFor example, an event with a waitlist for 10 people and 3 registrants, results in a remaining capacity of `7`."
|
|
382
|
+
).min(0).optional().nullable()
|
|
383
|
+
}).describe(
|
|
384
|
+
"Information about the event's waitlist. Available only if the service has a waitlist."
|
|
385
|
+
).optional(),
|
|
386
|
+
eventTitle: z.string().describe("Event title.").min(1).max(200).optional().nullable()
|
|
387
|
+
}).describe(
|
|
388
|
+
"Information about the [event](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/introduction) related to the slot.\nAvailable only for classes. Not available for appointment-based services and courses."
|
|
389
|
+
).optional(),
|
|
390
|
+
totalCapacity: z.number().int().describe(
|
|
391
|
+
"Total number of spots for the slot.\n\nFor multi-service bookings, this is always `1` because customers book the entire service sequence as a single unit.\n\nIn `ListAvailabilityTimeSlotEndOptions`, capacity reflects whether at least one resource can cover `[localStartDate, localEndDate]`; the specific resource is selected later via `GetAvailabilityTimeSlot`."
|
|
392
|
+
).min(1).max(1e3).optional().nullable(),
|
|
393
|
+
remainingCapacity: z.number().int().describe(
|
|
394
|
+
"Remaining number of spots for the slot.\n- For appointment bookings: Either `1` (available) or `0` (unavailable).\n- For classes: Total capacity minus booked spots. Doesn't account for waitlist reservations. For classes with waitlists, use `bookableCapacity` to get the actual number of spots customers can book.\n- For courses: Total capacity minus booked spots. Courses don't currently support waitlists.\n\nIn `ListAvailabilityTimeSlotEndOptions`, capacity reflects whether at least one resource can cover `[localStartDate, localEndDate]`; the specific resource is selected later via `GetAvailabilityTimeSlot`."
|
|
395
|
+
).min(0).max(1e3).optional().nullable(),
|
|
396
|
+
bookableCapacity: z.number().int().describe(
|
|
397
|
+
"Number of spots that customers can book for the slot.\nCalculated as the remaining capacity minus the spots reserved for the waitlist.\nIf the service has no waitlist, identical to `remainingCapacity`.\n\nFor multi-service bookings, this is either `1` (sequence can be booked) or `0` (sequence can't be booked).\n\nIn `ListAvailabilityTimeSlotEndOptions`, capacity reflects whether at least one resource can cover `[localStartDate, localEndDate]`; the specific resource is selected later via `GetAvailabilityTimeSlot`."
|
|
398
|
+
).optional().nullable(),
|
|
399
|
+
bookingPolicyViolations: z.object({
|
|
400
|
+
tooEarlyToBook: z.boolean().describe(
|
|
401
|
+
'Whether it\'s too early for customers to book the slot.\n\nBy default, all slots are returned. Specifying `{"tooEarlyToBook": false}` returns only those that customers can already book, while specifying `{"tooEarlyToBook": true}` returns only those that can\'t be booked yet.'
|
|
402
|
+
).optional().nullable(),
|
|
403
|
+
earliestBookingDate: z.date().describe(
|
|
404
|
+
"Earliest time for booking the slot in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n\n*In responses**: Contains a value when `tooEarlyToBook` is `true`, indicating the earliest time customers can book the slot.\n\n*In requests**: Don't specify a value for this field. Use `tooEarlyToBook` to filter slots that can't be booked yet due to minimum advance booking time restrictions."
|
|
405
|
+
).optional().nullable(),
|
|
406
|
+
tooLateToBook: z.boolean().describe(
|
|
407
|
+
'Whether it\'s too late for customers to book the slot.\n\nBy default, all slots are returned. Specifying `{"tooLateToBook": false}` returns only those that customers can still book, while specifying `{"tooLateToBook": true}` returns only those that can no longer be booked.'
|
|
408
|
+
).optional().nullable(),
|
|
409
|
+
bookOnlineDisabled: z.boolean().describe(
|
|
410
|
+
"Whether customers can book the service online.\n\nBy default, both services with online booking enabled and disabled are returned. Providing the boolean set to `true` or `false` returns only matching slots."
|
|
411
|
+
).optional().nullable()
|
|
412
|
+
}).describe(
|
|
413
|
+
"Information about booking policy violations for the slot.\n\nFor multi-service bookings, this aggregates violations from all services in the sequence."
|
|
414
|
+
).optional(),
|
|
415
|
+
availableResources: z.array(
|
|
416
|
+
z.object({
|
|
417
|
+
resourceTypeId: z.string().describe(
|
|
418
|
+
"[Resource type ID](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction)."
|
|
419
|
+
).regex(
|
|
420
|
+
/^[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}$/,
|
|
421
|
+
"Must be a valid GUID"
|
|
422
|
+
).optional().nullable(),
|
|
423
|
+
resources: z.array(
|
|
424
|
+
z.object({
|
|
425
|
+
_id: z.string().describe("Resource ID.").regex(
|
|
426
|
+
/^[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}$/,
|
|
427
|
+
"Must be a valid GUID"
|
|
428
|
+
).optional(),
|
|
429
|
+
name: z.string().describe("Resource name.").min(1).optional().nullable()
|
|
430
|
+
})
|
|
431
|
+
).optional(),
|
|
432
|
+
hasMoreAvailableResources: z.boolean().describe(
|
|
433
|
+
"Whether there are more available resources for the slot than those listed in `resources`."
|
|
434
|
+
).optional().nullable()
|
|
435
|
+
})
|
|
436
|
+
).min(0).optional(),
|
|
437
|
+
nestedTimeSlots: z.array(
|
|
438
|
+
z.object({
|
|
439
|
+
serviceId: z.string().describe("Service ID of the nested time slot.").regex(
|
|
440
|
+
/^[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}$/,
|
|
441
|
+
"Must be a valid GUID"
|
|
442
|
+
).optional(),
|
|
443
|
+
localStartDate: z.string().describe(
|
|
444
|
+
"Local start date of the nested time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\nFor example, `2026-01-30T13:30:00`."
|
|
445
|
+
).optional(),
|
|
446
|
+
localEndDate: z.string().describe(
|
|
447
|
+
"Local end date of the nested time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\nFor example, `2026-01-30T13:30:00`."
|
|
448
|
+
).optional(),
|
|
449
|
+
availableResources: z.array(
|
|
450
|
+
z.object({
|
|
451
|
+
resourceTypeId: z.string().describe(
|
|
452
|
+
"[Resource type ID](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction)."
|
|
453
|
+
).regex(
|
|
454
|
+
/^[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}$/,
|
|
455
|
+
"Must be a valid GUID"
|
|
456
|
+
).optional().nullable(),
|
|
457
|
+
resources: z.array(
|
|
458
|
+
z.object({
|
|
459
|
+
_id: z.string().describe("Resource ID.").regex(
|
|
460
|
+
/^[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}$/,
|
|
461
|
+
"Must be a valid GUID"
|
|
462
|
+
).optional(),
|
|
463
|
+
name: z.string().describe("Resource name.").min(1).optional().nullable()
|
|
464
|
+
})
|
|
465
|
+
).optional(),
|
|
466
|
+
hasMoreAvailableResources: z.boolean().describe(
|
|
467
|
+
"Whether there are more available resources for the slot than those listed in `resources`."
|
|
468
|
+
).optional().nullable()
|
|
469
|
+
})
|
|
470
|
+
).max(10).optional(),
|
|
471
|
+
scheduleId: z.string().describe(
|
|
472
|
+
"The schedule ID associated with this nested time slot.\nSame as the service's schedule ID."
|
|
473
|
+
).regex(
|
|
474
|
+
/^[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}$/,
|
|
475
|
+
"Must be a valid GUID"
|
|
476
|
+
).optional().nullable()
|
|
477
|
+
})
|
|
478
|
+
).max(8).optional(),
|
|
479
|
+
nonBookableReasons: z.object({
|
|
480
|
+
noRemainingCapacity: z.boolean().describe(
|
|
481
|
+
"Whether the slot is fully booked with no remaining capacity."
|
|
482
|
+
).optional().nullable(),
|
|
483
|
+
violatesBookingPolicy: z.boolean().describe(
|
|
484
|
+
"Whether booking the slot violates any of the service's booking policies."
|
|
485
|
+
).optional().nullable(),
|
|
486
|
+
reservedForWaitingList: z.boolean().describe(
|
|
487
|
+
"Whether the slot is reserved for the waitlist. A new customer can't book the reserved slot."
|
|
488
|
+
).optional().nullable(),
|
|
489
|
+
eventCancelled: z.boolean().describe("Whether the related event is cancelled.").optional().nullable()
|
|
490
|
+
}).describe("Information about why customers can't book the time slot.").optional(),
|
|
491
|
+
scheduleId: z.string().describe(
|
|
492
|
+
"Schedule ID associated with this time slot.\nSame as the service's schedule ID."
|
|
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
|
+
allDay: z.boolean().describe(
|
|
498
|
+
"Whether this time slot spans one or more full days.\nWhen `true`, `localStartDate` is `00:00:00` of the first day and `localEndDate` is `00:00:00` of the day after the last day (exclusive).\nMidnight boundaries are interpreted in the event's `timeZone`.\nThe time component should be ignored for display purposes.\n\nDefault: `false`"
|
|
499
|
+
).optional().nullable()
|
|
500
|
+
})
|
|
501
|
+
).max(1e3).optional(),
|
|
502
|
+
timeZone: z.string().describe(
|
|
503
|
+
"Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York` or `UTC`."
|
|
504
|
+
).optional().nullable()
|
|
505
|
+
});
|
|
300
506
|
var GetAvailabilityTimeSlotRequest = z.object({
|
|
301
507
|
serviceId: z.string().describe(
|
|
302
508
|
"Service ID of the time slot.\nYou must specify the ID of an appointment-based service."
|
|
@@ -493,7 +699,7 @@ var GetAvailabilityTimeSlotResponse = z.object({
|
|
|
493
699
|
"Must be a valid GUID"
|
|
494
700
|
).optional().nullable(),
|
|
495
701
|
allDay: z.boolean().describe(
|
|
496
|
-
"Whether this time slot spans one or more full days.\
|
|
702
|
+
"Whether this time slot spans one or more full days.\nWhen `true`, `localStartDate` is `00:00:00` of the first day and `localEndDate` is `00:00:00` of the day after the last day (exclusive).\nMidnight boundaries are interpreted in the event's `timeZone`.\nThe time component should be ignored for display purposes.\n\nDefault: `false`"
|
|
497
703
|
).optional().nullable()
|
|
498
704
|
}).describe("Retrieved time slot.").optional(),
|
|
499
705
|
timeZone: z.string().describe(
|
|
@@ -504,6 +710,8 @@ var GetAvailabilityTimeSlotResponse = z.object({
|
|
|
504
710
|
0 && (module.exports = {
|
|
505
711
|
GetAvailabilityTimeSlotRequest,
|
|
506
712
|
GetAvailabilityTimeSlotResponse,
|
|
713
|
+
ListAvailabilityTimeSlotEndOptionsRequest,
|
|
714
|
+
ListAvailabilityTimeSlotEndOptionsResponse,
|
|
507
715
|
ListAvailabilityTimeSlotsRequest,
|
|
508
716
|
ListAvailabilityTimeSlotsResponse
|
|
509
717
|
});
|