@wix/auto_sdk_bookings_availability-time-slots 1.0.246 → 1.0.248
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.js.map +1 -1
- package/build/cjs/index.typings.d.ts +268 -268
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +268 -268
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +268 -268
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +268 -268
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +278 -278
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +268 -268
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +278 -278
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +268 -268
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -288,17 +288,11 @@ interface NonBookableReasons {
|
|
|
288
288
|
/** Whether the related event is cancelled. */
|
|
289
289
|
eventCancelled?: boolean | null;
|
|
290
290
|
}
|
|
291
|
-
interface
|
|
292
|
-
/**
|
|
293
|
-
* Service ID for which to retrieve time slots. You must specify the ID of an appointment-based service.
|
|
294
|
-
* Required, unless you specify `cursorPaging.cursor`.
|
|
295
|
-
* @format GUID
|
|
296
|
-
*/
|
|
297
|
-
serviceId?: string | null;
|
|
291
|
+
interface ListEventTimeSlotsRequest {
|
|
298
292
|
/**
|
|
299
|
-
* Lower boundary for `localStartDate` to include in response.
|
|
300
|
-
* Each returned time slot has a `localStartDate`
|
|
301
|
-
* Required
|
|
293
|
+
* Lower boundary for `localStartDate` to include in the response.
|
|
294
|
+
* Each returned time slot has a `localStartDate` between `fromLocalDate` and `toLocalDate`.
|
|
295
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
302
296
|
*
|
|
303
297
|
* Local start date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
304
298
|
* For example, `2026-01-30T13:30:00`.
|
|
@@ -306,9 +300,9 @@ interface ListAvailabilityTimeSlotsRequest {
|
|
|
306
300
|
*/
|
|
307
301
|
fromLocalDate?: string | null;
|
|
308
302
|
/**
|
|
309
|
-
* Upper boundary for `localStartDate` to include in response.
|
|
310
|
-
* Each returned time slot has a `localStartDate`
|
|
311
|
-
* Required
|
|
303
|
+
* Upper boundary for `localStartDate` to include in the response.
|
|
304
|
+
* Each returned time slot has a `localStartDate` between `fromLocalDate` and `toLocalDate`.
|
|
305
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
312
306
|
*
|
|
313
307
|
* Local end date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
314
308
|
* For example, `2026-01-30T13:30:00`.
|
|
@@ -316,64 +310,58 @@ interface ListAvailabilityTimeSlotsRequest {
|
|
|
316
310
|
*/
|
|
317
311
|
toLocalDate?: string | null;
|
|
318
312
|
/**
|
|
319
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate
|
|
313
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
|
320
314
|
* For example, `America/New_York` or `UTC`.
|
|
321
315
|
*
|
|
322
316
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
323
|
-
* @
|
|
324
|
-
* @maxLength 150
|
|
317
|
+
* @maxLength 100
|
|
325
318
|
*/
|
|
326
319
|
timeZone?: string | null;
|
|
327
320
|
/**
|
|
328
|
-
*
|
|
329
|
-
* If not
|
|
330
|
-
* @maxSize 5
|
|
331
|
-
*/
|
|
332
|
-
locations?: Location[];
|
|
333
|
-
/**
|
|
334
|
-
* Resource type IDs to include in the response.
|
|
335
|
-
* If specified, returns up to 10 `availableResources` with matching `resourceTypeId`.
|
|
336
|
-
* This controls which resource details are included in the response but doesn't filter the time slots themselves.
|
|
321
|
+
* Optional service IDs to filter the response.
|
|
322
|
+
* If not provided, time slots for all services are returned.
|
|
337
323
|
* @format GUID
|
|
338
324
|
* @maxSize 100
|
|
339
325
|
*/
|
|
340
|
-
|
|
326
|
+
serviceIds?: string[] | null;
|
|
341
327
|
/**
|
|
342
|
-
* Whether
|
|
343
|
-
*
|
|
328
|
+
* Whether to include time slots that aren't bookable according to the service's booking policy or that are fully booked.
|
|
329
|
+
* - `true`: Both bookable and non-bookable time slots are returned.
|
|
330
|
+
* - `false`: Only bookable time slots are returned.
|
|
331
|
+
*
|
|
332
|
+
* Default: `true`
|
|
344
333
|
*/
|
|
345
|
-
|
|
334
|
+
includeNonBookable?: boolean | null;
|
|
346
335
|
/**
|
|
347
|
-
*
|
|
348
|
-
*
|
|
336
|
+
* Minimum bookable capacity.
|
|
337
|
+
* Use to filter out sessions that can't accommodate the desired party size.
|
|
338
|
+
* @min 1
|
|
349
339
|
*/
|
|
350
|
-
|
|
340
|
+
minBookableCapacity?: number | null;
|
|
341
|
+
/**
|
|
342
|
+
* Optional filter to apply to the events, for example resource or location.
|
|
343
|
+
* See [Query Events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/query-events) for a list of supported filters.
|
|
344
|
+
*/
|
|
345
|
+
eventFilter?: Record<string, any> | null;
|
|
351
346
|
/**
|
|
352
347
|
* Maximum number of slots to return for each day in the specified time range.
|
|
353
|
-
* If
|
|
348
|
+
* If both bookable and non-bookable slots exist on the same day, bookable slots are returned first.
|
|
349
|
+
*
|
|
350
|
+
* When you specify `maxSlotsPerDay`, you must also specify `toLocalDate`, and it must be no more than 1 month after `fromLocalDate`.
|
|
351
|
+
* @min 1
|
|
352
|
+
* @max 1000
|
|
354
353
|
*/
|
|
355
|
-
|
|
354
|
+
maxSlotsPerDay?: number | null;
|
|
356
355
|
/**
|
|
357
356
|
* Cursor-based paging configuration.
|
|
358
|
-
* Enables fetching results in smaller chunks by setting a limit on the number of
|
|
359
|
-
* For consistent pagination behavior, use the same `limit` value throughout a pagination sequence.
|
|
360
|
-
* When specifying a new `limit` in follow-up requests, the API respects the new value.
|
|
357
|
+
* Enables fetching results in smaller chunks by setting a limit on the number of returned items.
|
|
361
358
|
*/
|
|
362
359
|
cursorPaging?: CursorPaging;
|
|
363
360
|
/**
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
* When 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.
|
|
368
|
-
*/
|
|
369
|
-
customerChoices?: CustomerChoices;
|
|
370
|
-
/**
|
|
371
|
-
* Resource types to filter time slots.
|
|
372
|
-
* Only returns time slots that have these specific resource types available.
|
|
373
|
-
* This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
|
|
374
|
-
* @maxSize 3
|
|
361
|
+
* Indicators for service's booking policy violations.
|
|
362
|
+
* Allows filtering for time slots with specific violation types based on [booking policies](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/introduction). When you don't specify `bookingPolicyViolations` filters, all slots are returned regardless of their booking policy status.
|
|
375
363
|
*/
|
|
376
|
-
|
|
364
|
+
bookingPolicyViolations?: BookingPolicyViolations;
|
|
377
365
|
}
|
|
378
366
|
interface CursorPaging {
|
|
379
367
|
/**
|
|
@@ -393,51 +381,11 @@ interface CursorPaging {
|
|
|
393
381
|
*/
|
|
394
382
|
cursor?: string | null;
|
|
395
383
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* Duration selected by the customer in minutes. Based on the customer's selection from [service options and variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
400
|
-
* When using [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction), we recommend passing only `addOnIds` instead of `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.
|
|
401
|
-
* @min 1
|
|
402
|
-
* @max 44639
|
|
403
|
-
*/
|
|
404
|
-
durationInMinutes?: number | null;
|
|
405
|
-
/**
|
|
406
|
-
* IDs of [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) selected by the customer.
|
|
407
|
-
* When specifying this field, we recommend omitting `durationInMinutes`. Wix Bookings then calculates the total duration based on the service duration plus all selected add-on durations.
|
|
408
|
-
* @format GUID
|
|
409
|
-
* @maxSize 21
|
|
410
|
-
*/
|
|
411
|
-
addOnIds?: string[] | null;
|
|
412
|
-
/**
|
|
413
|
-
* ID of the duration choice selected by the customer.
|
|
414
|
-
* @format GUID
|
|
415
|
-
*/
|
|
416
|
-
durationChoiceId?: string | null;
|
|
417
|
-
}
|
|
418
|
-
interface ResourceType {
|
|
419
|
-
/**
|
|
420
|
-
* [Resource type ID](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction).
|
|
421
|
-
* @format GUID
|
|
422
|
-
*/
|
|
423
|
-
resourceTypeId?: string | null;
|
|
424
|
-
/**
|
|
425
|
-
* Resource IDs.
|
|
426
|
-
* Available only if there is at least 1 resource available for the slot.
|
|
427
|
-
* @format GUID
|
|
428
|
-
* @maxSize 135
|
|
429
|
-
*/
|
|
430
|
-
resourceIds?: string[] | null;
|
|
431
|
-
}
|
|
432
|
-
interface ListAvailabilityTimeSlotsResponse {
|
|
433
|
-
/**
|
|
434
|
-
* Retrieved time slots.
|
|
435
|
-
* Sorted by `localStartDate` in ascending order. When multiple slots have the same start time, no specific secondary sorting is guaranteed.
|
|
436
|
-
* @maxSize 1000
|
|
437
|
-
*/
|
|
384
|
+
interface ListEventTimeSlotsResponse {
|
|
385
|
+
/** Retrieved time slots matching the specified filters. */
|
|
438
386
|
timeSlots?: TimeSlot[];
|
|
439
387
|
/**
|
|
440
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate
|
|
388
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
|
441
389
|
* For example, `America/New_York` or `UTC`.
|
|
442
390
|
*
|
|
443
391
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
@@ -447,9 +395,9 @@ interface ListAvailabilityTimeSlotsResponse {
|
|
|
447
395
|
timeZone?: string | null;
|
|
448
396
|
/**
|
|
449
397
|
* Paging metadata for the next page of results.
|
|
450
|
-
* Contains a cursor if
|
|
398
|
+
* Contains a cursor if more data is available.
|
|
451
399
|
*/
|
|
452
|
-
|
|
400
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
453
401
|
}
|
|
454
402
|
interface CursorPagingMetadata {
|
|
455
403
|
/** Offset that was requested. */
|
|
@@ -467,139 +415,27 @@ interface Cursors {
|
|
|
467
415
|
/** Cursor pointing to previous page in the list of results. */
|
|
468
416
|
prev?: string | null;
|
|
469
417
|
}
|
|
470
|
-
interface
|
|
471
|
-
/**
|
|
472
|
-
* Service ID. Must be an appointment-based service whose
|
|
473
|
-
* `availabilityConstraints.durationRange` is configured. Call
|
|
474
|
-
* [Get Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/get-service)
|
|
475
|
-
* from Services V2 to check `availabilityConstraints.durationRange` before
|
|
476
|
-
* invoking this method.
|
|
477
|
-
* @format GUID
|
|
478
|
-
*/
|
|
479
|
-
serviceId: string;
|
|
480
|
-
/**
|
|
481
|
-
* The picked start time. Each returned end option pairs with this start.
|
|
482
|
-
* @format LOCAL_DATE_TIME
|
|
483
|
-
*/
|
|
484
|
-
localStartDate: string;
|
|
485
|
-
/**
|
|
486
|
-
* Latest end time to include. Default: `localStartDate + maxDurationInMinutes`
|
|
487
|
-
* from the service's `durationRange.hourConfig` (read from Services V2).
|
|
488
|
-
* A tighter value is honored; `maxDurationInMinutes` always bounds the
|
|
489
|
-
* result.
|
|
490
|
-
* @format LOCAL_DATE_TIME
|
|
491
|
-
*/
|
|
492
|
-
maxLocalEndDate?: string | null;
|
|
493
|
-
/**
|
|
494
|
-
* IANA time zone. Default: site `timeZone` property.
|
|
495
|
-
* @minLength 1
|
|
496
|
-
* @maxLength 150
|
|
497
|
-
*/
|
|
498
|
-
timeZone?: string | null;
|
|
499
|
-
/**
|
|
500
|
-
* Location of the picked start. Required; must match the location of the
|
|
501
|
-
* `localStartDate` slot returned by `ListAvailabilityTimeSlots`. The handler
|
|
502
|
-
* validates that end options reachable from this start at this location.
|
|
503
|
-
*/
|
|
504
|
-
location: Location;
|
|
505
|
-
/**
|
|
506
|
-
* Resource types to constrain the end options.
|
|
507
|
-
* When the customer has already picked a resource before the end time
|
|
508
|
-
* (e.g. flows that select a resource first, then start, then end), pass the
|
|
509
|
-
* selected resource here so the response surfaces only ends that the
|
|
510
|
-
* chosen resource can actually cover. Without this filter, the response
|
|
511
|
-
* reflects the resource pool — ends valid for the pool but not for a
|
|
512
|
-
* preselected resource would still be returned, and booking would fail
|
|
513
|
-
* later.
|
|
514
|
-
*
|
|
515
|
-
* Omit when no resource has been preselected. In that case, end options
|
|
516
|
-
* reflect any resource in the pool; pick the resource later via
|
|
517
|
-
* `GetAvailabilityTimeSlot` with the chosen `localEndDate`.
|
|
518
|
-
* @maxSize 3
|
|
519
|
-
*/
|
|
520
|
-
resourceTypes?: ResourceType[];
|
|
521
|
-
}
|
|
522
|
-
interface ListAvailabilityTimeSlotEndOptionsResponse {
|
|
523
|
-
/**
|
|
524
|
-
* Available end options for the requested start.
|
|
525
|
-
* Each entry is a `TimeSlot` sharing `localStartDate` with the request
|
|
526
|
-
* and varying only in `localEndDate`. Sorted by `localEndDate` ascending
|
|
527
|
-
* (shortest duration first).
|
|
528
|
-
* See `TimeSlot` field notes for the constrained semantics of this response.
|
|
529
|
-
* @maxSize 1000
|
|
530
|
-
*/
|
|
531
|
-
endOptions?: TimeSlot[];
|
|
532
|
-
/** IANA time zone, echoed from the request or resolved from the site default. */
|
|
533
|
-
timeZone?: string | null;
|
|
534
|
-
}
|
|
535
|
-
interface GetAvailabilityTimeSlotRequest {
|
|
536
|
-
/**
|
|
537
|
-
* Service ID of the time slot.
|
|
538
|
-
* You must specify the ID of an appointment-based service.
|
|
539
|
-
* @format GUID
|
|
540
|
-
*/
|
|
541
|
-
serviceId: string;
|
|
542
|
-
/**
|
|
543
|
-
* Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
544
|
-
* For example, `2026-01-30T13:30:00`.
|
|
545
|
-
* @format LOCAL_DATE_TIME
|
|
546
|
-
*/
|
|
547
|
-
localStartDate: string;
|
|
418
|
+
interface GetEventTimeSlotRequest {
|
|
548
419
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* @
|
|
420
|
+
* Event ID.
|
|
421
|
+
* @minLength 36
|
|
422
|
+
* @maxLength 250
|
|
552
423
|
*/
|
|
553
|
-
|
|
424
|
+
eventId?: string | null;
|
|
554
425
|
/**
|
|
555
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate
|
|
426
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
|
556
427
|
* For example, `America/New_York` or `UTC`.
|
|
557
428
|
*
|
|
558
429
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
559
|
-
* @
|
|
560
|
-
* @maxLength 150
|
|
430
|
+
* @maxLength 100
|
|
561
431
|
*/
|
|
562
432
|
timeZone?: string | null;
|
|
563
|
-
/**
|
|
564
|
-
* Location to filter time slots by.
|
|
565
|
-
*
|
|
566
|
-
* For business locations, you must specify a location ID.
|
|
567
|
-
* When specifying a location ID, all other location field filters are ignored.
|
|
568
|
-
*/
|
|
569
|
-
location?: Location;
|
|
570
|
-
/**
|
|
571
|
-
* IDs of the [resource types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction) to check availability for.
|
|
572
|
-
* @format GUID
|
|
573
|
-
* @maxSize 100
|
|
574
|
-
*/
|
|
575
|
-
includeResourceTypeIds?: string[];
|
|
576
|
-
/**
|
|
577
|
-
* Resource types to filter time slots.
|
|
578
|
-
* Only returns time slots that have these specific resource types available.
|
|
579
|
-
* This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
|
|
580
|
-
* @maxSize 3
|
|
581
|
-
*/
|
|
582
|
-
resourceTypes?: ResourceType[];
|
|
583
|
-
}
|
|
584
|
-
interface GetAvailabilityTimeSlotRequestCustomerChoices {
|
|
585
|
-
/**
|
|
586
|
-
* Selected add-on IDs.
|
|
587
|
-
* Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.
|
|
588
|
-
* @format GUID
|
|
589
|
-
* @maxSize 21
|
|
590
|
-
*/
|
|
591
|
-
addOnIds?: string[] | null;
|
|
592
|
-
/**
|
|
593
|
-
* Selected duration choice ID.
|
|
594
|
-
* @format GUID
|
|
595
|
-
*/
|
|
596
|
-
durationChoiceId?: string | null;
|
|
597
433
|
}
|
|
598
|
-
interface
|
|
599
|
-
/**
|
|
434
|
+
interface GetEventTimeSlotResponse {
|
|
435
|
+
/** The time slot. */
|
|
600
436
|
timeSlot?: TimeSlot;
|
|
601
437
|
/**
|
|
602
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate
|
|
438
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
|
603
439
|
* For example, `America/New_York` or `UTC`.
|
|
604
440
|
*
|
|
605
441
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
@@ -742,7 +578,21 @@ interface V2CustomerChoices {
|
|
|
742
578
|
* Selected duration choice ID.
|
|
743
579
|
* @format GUID
|
|
744
580
|
*/
|
|
745
|
-
durationChoiceId?: string | null;
|
|
581
|
+
durationChoiceId?: string | null;
|
|
582
|
+
}
|
|
583
|
+
interface ResourceType {
|
|
584
|
+
/**
|
|
585
|
+
* [Resource type ID](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction).
|
|
586
|
+
* @format GUID
|
|
587
|
+
*/
|
|
588
|
+
resourceTypeId?: string | null;
|
|
589
|
+
/**
|
|
590
|
+
* Resource IDs.
|
|
591
|
+
* Available only if there is at least 1 resource available for the slot.
|
|
592
|
+
* @format GUID
|
|
593
|
+
* @maxSize 135
|
|
594
|
+
*/
|
|
595
|
+
resourceIds?: string[] | null;
|
|
746
596
|
}
|
|
747
597
|
interface ListMultiServiceAvailabilityTimeSlotsResponse {
|
|
748
598
|
/**
|
|
@@ -813,11 +663,17 @@ interface GetMultiServiceAvailabilityTimeSlotResponse {
|
|
|
813
663
|
*/
|
|
814
664
|
timeZone?: string | null;
|
|
815
665
|
}
|
|
816
|
-
interface
|
|
666
|
+
interface ListAvailabilityTimeSlotsRequest {
|
|
817
667
|
/**
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
668
|
+
* Service ID for which to retrieve time slots. You must specify the ID of an appointment-based service.
|
|
669
|
+
* Required, unless you specify `cursorPaging.cursor`.
|
|
670
|
+
* @format GUID
|
|
671
|
+
*/
|
|
672
|
+
serviceId?: string | null;
|
|
673
|
+
/**
|
|
674
|
+
* Lower boundary for `localStartDate` to include in response.
|
|
675
|
+
* Each returned time slot has a `localStartDate` within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
|
676
|
+
* Required, unless you specify `cursorPaging.cursor`.
|
|
821
677
|
*
|
|
822
678
|
* Local start date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
823
679
|
* For example, `2026-01-30T13:30:00`.
|
|
@@ -825,9 +681,9 @@ interface ListEventTimeSlotsRequest {
|
|
|
825
681
|
*/
|
|
826
682
|
fromLocalDate?: string | null;
|
|
827
683
|
/**
|
|
828
|
-
* Upper boundary for `localStartDate` to include in
|
|
829
|
-
* Each returned time slot has a `localStartDate`
|
|
830
|
-
* Required unless you specify `cursorPaging.cursor`.
|
|
684
|
+
* Upper boundary for `localStartDate` to include in response.
|
|
685
|
+
* Each returned time slot has a `localStartDate` within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
|
686
|
+
* Required, unless you specify `cursorPaging.cursor`.
|
|
831
687
|
*
|
|
832
688
|
* Local end date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
833
689
|
* For example, `2026-01-30T13:30:00`.
|
|
@@ -835,64 +691,96 @@ interface ListEventTimeSlotsRequest {
|
|
|
835
691
|
*/
|
|
836
692
|
toLocalDate?: string | null;
|
|
837
693
|
/**
|
|
838
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate
|
|
694
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
|
839
695
|
* For example, `America/New_York` or `UTC`.
|
|
840
696
|
*
|
|
841
697
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
842
|
-
* @
|
|
698
|
+
* @minLength 1
|
|
699
|
+
* @maxLength 150
|
|
843
700
|
*/
|
|
844
701
|
timeZone?: string | null;
|
|
845
702
|
/**
|
|
846
|
-
*
|
|
847
|
-
* If not
|
|
703
|
+
* Locations to include in response.
|
|
704
|
+
* If not specified, returns time slots for all locations where the service is available.
|
|
705
|
+
* @maxSize 5
|
|
706
|
+
*/
|
|
707
|
+
locations?: Location[];
|
|
708
|
+
/**
|
|
709
|
+
* Resource type IDs to include in the response.
|
|
710
|
+
* If specified, returns up to 10 `availableResources` with matching `resourceTypeId`.
|
|
711
|
+
* This controls which resource details are included in the response but doesn't filter the time slots themselves.
|
|
848
712
|
* @format GUID
|
|
849
713
|
* @maxSize 100
|
|
850
714
|
*/
|
|
851
|
-
|
|
715
|
+
includeResourceTypeIds?: string[];
|
|
852
716
|
/**
|
|
853
|
-
* Whether
|
|
854
|
-
*
|
|
855
|
-
* - `false`: Only bookable time slots are returned.
|
|
856
|
-
*
|
|
857
|
-
* Default: `true`
|
|
717
|
+
* Whether the time slot is bookable according to the service's booking policies.
|
|
718
|
+
* If not specified, returns both bookable and un-bookable time slots.
|
|
858
719
|
*/
|
|
859
|
-
|
|
720
|
+
bookable?: boolean | null;
|
|
860
721
|
/**
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
* @min 1
|
|
722
|
+
* Indicators for service's booking policy violations.
|
|
723
|
+
* Allows filtering for time slots with specific violation types based on [booking policies](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/introduction)). When you don't specify `bookingPolicyViolations` filters, all slots are returned regardless of their booking policy status.
|
|
864
724
|
*/
|
|
865
|
-
|
|
725
|
+
bookingPolicyViolations?: BookingPolicyViolations;
|
|
866
726
|
/**
|
|
867
|
-
*
|
|
868
|
-
*
|
|
727
|
+
* Maximum number of slots to return for each day in the specified time range.
|
|
728
|
+
* If `bookable` filter isn't specified, bookable slots are returned first.
|
|
869
729
|
*/
|
|
870
|
-
|
|
730
|
+
timeSlotsPerDay?: number | null;
|
|
871
731
|
/**
|
|
872
|
-
*
|
|
873
|
-
*
|
|
732
|
+
* Cursor-based paging configuration.
|
|
733
|
+
* Enables fetching results in smaller chunks by setting a limit on the number of results.
|
|
734
|
+
* For consistent pagination behavior, use the same `limit` value throughout a pagination sequence.
|
|
735
|
+
* When specifying a new `limit` in follow-up requests, the API respects the new value.
|
|
736
|
+
*/
|
|
737
|
+
cursorPaging?: CursorPaging;
|
|
738
|
+
/**
|
|
739
|
+
* Selected customer choices for service configuration.
|
|
740
|
+
* If not specified, uses the service's default configuration.
|
|
874
741
|
*
|
|
875
|
-
* When
|
|
742
|
+
* When 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.
|
|
743
|
+
*/
|
|
744
|
+
customerChoices?: CustomerChoices;
|
|
745
|
+
/**
|
|
746
|
+
* Resource types to filter time slots.
|
|
747
|
+
* Only returns time slots that have these specific resource types available.
|
|
748
|
+
* This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
|
|
749
|
+
* @maxSize 3
|
|
750
|
+
*/
|
|
751
|
+
resourceTypes?: ResourceType[];
|
|
752
|
+
}
|
|
753
|
+
/** Customer's selected choices during the booking flow. Use these values to calculate service configuration properties such as duration. */
|
|
754
|
+
interface CustomerChoices {
|
|
755
|
+
/**
|
|
756
|
+
* Duration selected by the customer in minutes. Based on the customer's selection from [service options and variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
757
|
+
* When using [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction), we recommend passing only `addOnIds` instead of `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.
|
|
876
758
|
* @min 1
|
|
877
|
-
* @max
|
|
759
|
+
* @max 44639
|
|
878
760
|
*/
|
|
879
|
-
|
|
761
|
+
durationInMinutes?: number | null;
|
|
880
762
|
/**
|
|
881
|
-
*
|
|
882
|
-
*
|
|
763
|
+
* IDs of [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) selected by the customer.
|
|
764
|
+
* When specifying this field, we recommend omitting `durationInMinutes`. Wix Bookings then calculates the total duration based on the service duration plus all selected add-on durations.
|
|
765
|
+
* @format GUID
|
|
766
|
+
* @maxSize 21
|
|
883
767
|
*/
|
|
884
|
-
|
|
768
|
+
addOnIds?: string[] | null;
|
|
885
769
|
/**
|
|
886
|
-
*
|
|
887
|
-
*
|
|
770
|
+
* ID of the duration choice selected by the customer.
|
|
771
|
+
* @format GUID
|
|
888
772
|
*/
|
|
889
|
-
|
|
773
|
+
durationChoiceId?: string | null;
|
|
890
774
|
}
|
|
891
|
-
interface
|
|
892
|
-
/**
|
|
775
|
+
interface ListAvailabilityTimeSlotsResponse {
|
|
776
|
+
/**
|
|
777
|
+
* Retrieved time slots.
|
|
778
|
+
* Sorted by `localStartDate` in ascending order. When multiple slots have the same start time, no specific secondary sorting is guaranteed.
|
|
779
|
+
* @maxSize 1000
|
|
780
|
+
*/
|
|
893
781
|
timeSlots?: TimeSlot[];
|
|
894
782
|
/**
|
|
895
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate
|
|
783
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
|
896
784
|
* For example, `America/New_York` or `UTC`.
|
|
897
785
|
*
|
|
898
786
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
@@ -902,31 +790,143 @@ interface ListEventTimeSlotsResponse {
|
|
|
902
790
|
timeZone?: string | null;
|
|
903
791
|
/**
|
|
904
792
|
* Paging metadata for the next page of results.
|
|
905
|
-
* Contains a cursor if more
|
|
793
|
+
* Contains a cursor if there are more than 1000 results.
|
|
906
794
|
*/
|
|
907
|
-
|
|
795
|
+
cursorPagingMetadata?: CursorPagingMetadata;
|
|
908
796
|
}
|
|
909
|
-
interface
|
|
797
|
+
interface ListAvailabilityTimeSlotEndOptionsRequest {
|
|
910
798
|
/**
|
|
911
|
-
*
|
|
912
|
-
*
|
|
913
|
-
*
|
|
799
|
+
* Service ID. Must be an appointment-based service whose
|
|
800
|
+
* `availabilityConstraints.durationRange` is configured. Call
|
|
801
|
+
* [Get Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/get-service)
|
|
802
|
+
* from Services V2 to check `availabilityConstraints.durationRange` before
|
|
803
|
+
* invoking this method.
|
|
804
|
+
* @format GUID
|
|
914
805
|
*/
|
|
915
|
-
|
|
806
|
+
serviceId: string;
|
|
916
807
|
/**
|
|
917
|
-
*
|
|
808
|
+
* The picked start time. Each returned end option pairs with this start.
|
|
809
|
+
* @format LOCAL_DATE_TIME
|
|
810
|
+
*/
|
|
811
|
+
localStartDate: string;
|
|
812
|
+
/**
|
|
813
|
+
* Latest end time to include. Default: `localStartDate + maxDurationInMinutes`
|
|
814
|
+
* from the service's `durationRange.hourConfig` (read from Services V2).
|
|
815
|
+
* A tighter value is honored; `maxDurationInMinutes` always bounds the
|
|
816
|
+
* result.
|
|
817
|
+
* @format LOCAL_DATE_TIME
|
|
818
|
+
*/
|
|
819
|
+
maxLocalEndDate?: string | null;
|
|
820
|
+
/**
|
|
821
|
+
* IANA time zone. Default: site `timeZone` property.
|
|
822
|
+
* @minLength 1
|
|
823
|
+
* @maxLength 150
|
|
824
|
+
*/
|
|
825
|
+
timeZone?: string | null;
|
|
826
|
+
/**
|
|
827
|
+
* Location of the picked start. Required; must match the location of the
|
|
828
|
+
* `localStartDate` slot returned by `ListAvailabilityTimeSlots`. The handler
|
|
829
|
+
* validates that end options reachable from this start at this location.
|
|
830
|
+
*/
|
|
831
|
+
location: Location;
|
|
832
|
+
/**
|
|
833
|
+
* Resource types to constrain the end options.
|
|
834
|
+
* When the customer has already picked a resource before the end time
|
|
835
|
+
* (e.g. flows that select a resource first, then start, then end), pass the
|
|
836
|
+
* selected resource here so the response surfaces only ends that the
|
|
837
|
+
* chosen resource can actually cover. Without this filter, the response
|
|
838
|
+
* reflects the resource pool — ends valid for the pool but not for a
|
|
839
|
+
* preselected resource would still be returned, and booking would fail
|
|
840
|
+
* later.
|
|
841
|
+
*
|
|
842
|
+
* Omit when no resource has been preselected. In that case, end options
|
|
843
|
+
* reflect any resource in the pool; pick the resource later via
|
|
844
|
+
* `GetAvailabilityTimeSlot` with the chosen `localEndDate`.
|
|
845
|
+
* @maxSize 3
|
|
846
|
+
*/
|
|
847
|
+
resourceTypes?: ResourceType[];
|
|
848
|
+
}
|
|
849
|
+
interface ListAvailabilityTimeSlotEndOptionsResponse {
|
|
850
|
+
/**
|
|
851
|
+
* Available end options for the requested start.
|
|
852
|
+
* Each entry is a `TimeSlot` sharing `localStartDate` with the request
|
|
853
|
+
* and varying only in `localEndDate`. Sorted by `localEndDate` ascending
|
|
854
|
+
* (shortest duration first).
|
|
855
|
+
* See `TimeSlot` field notes for the constrained semantics of this response.
|
|
856
|
+
* @maxSize 1000
|
|
857
|
+
*/
|
|
858
|
+
endOptions?: TimeSlot[];
|
|
859
|
+
/** IANA time zone, echoed from the request or resolved from the site default. */
|
|
860
|
+
timeZone?: string | null;
|
|
861
|
+
}
|
|
862
|
+
interface GetAvailabilityTimeSlotRequest {
|
|
863
|
+
/**
|
|
864
|
+
* Service ID of the time slot.
|
|
865
|
+
* You must specify the ID of an appointment-based service.
|
|
866
|
+
* @format GUID
|
|
867
|
+
*/
|
|
868
|
+
serviceId: string;
|
|
869
|
+
/**
|
|
870
|
+
* Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
871
|
+
* For example, `2026-01-30T13:30:00`.
|
|
872
|
+
* @format LOCAL_DATE_TIME
|
|
873
|
+
*/
|
|
874
|
+
localStartDate: string;
|
|
875
|
+
/**
|
|
876
|
+
* Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
877
|
+
* For example, `2026-01-30T13:30:00`.
|
|
878
|
+
* @format LOCAL_DATE_TIME
|
|
879
|
+
*/
|
|
880
|
+
localEndDate: string;
|
|
881
|
+
/**
|
|
882
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
|
918
883
|
* For example, `America/New_York` or `UTC`.
|
|
919
884
|
*
|
|
920
885
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
921
|
-
* @
|
|
886
|
+
* @minLength 1
|
|
887
|
+
* @maxLength 150
|
|
922
888
|
*/
|
|
923
889
|
timeZone?: string | null;
|
|
890
|
+
/**
|
|
891
|
+
* Location to filter time slots by.
|
|
892
|
+
*
|
|
893
|
+
* For business locations, you must specify a location ID.
|
|
894
|
+
* When specifying a location ID, all other location field filters are ignored.
|
|
895
|
+
*/
|
|
896
|
+
location?: Location;
|
|
897
|
+
/**
|
|
898
|
+
* IDs of the [resource types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction) to check availability for.
|
|
899
|
+
* @format GUID
|
|
900
|
+
* @maxSize 100
|
|
901
|
+
*/
|
|
902
|
+
includeResourceTypeIds?: string[];
|
|
903
|
+
/**
|
|
904
|
+
* Resource types to filter time slots.
|
|
905
|
+
* Only returns time slots that have these specific resource types available.
|
|
906
|
+
* This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
|
|
907
|
+
* @maxSize 3
|
|
908
|
+
*/
|
|
909
|
+
resourceTypes?: ResourceType[];
|
|
924
910
|
}
|
|
925
|
-
interface
|
|
926
|
-
/**
|
|
911
|
+
interface GetAvailabilityTimeSlotRequestCustomerChoices {
|
|
912
|
+
/**
|
|
913
|
+
* Selected add-on IDs.
|
|
914
|
+
* Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.
|
|
915
|
+
* @format GUID
|
|
916
|
+
* @maxSize 21
|
|
917
|
+
*/
|
|
918
|
+
addOnIds?: string[] | null;
|
|
919
|
+
/**
|
|
920
|
+
* Selected duration choice ID.
|
|
921
|
+
* @format GUID
|
|
922
|
+
*/
|
|
923
|
+
durationChoiceId?: string | null;
|
|
924
|
+
}
|
|
925
|
+
interface GetAvailabilityTimeSlotResponse {
|
|
926
|
+
/** Retrieved time slot. */
|
|
927
927
|
timeSlot?: TimeSlot;
|
|
928
928
|
/**
|
|
929
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate
|
|
929
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
|
930
930
|
* For example, `America/New_York` or `UTC`.
|
|
931
931
|
*
|
|
932
932
|
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|