@wix/auto_sdk_bookings_availability-time-slots 1.0.247 → 1.0.249
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 +1 -1
- package/build/cjs/index.js +28 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +325 -171
- package/build/cjs/index.typings.js +28 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +325 -171
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +26 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +325 -171
- package/build/es/index.typings.mjs +26 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +325 -171
- package/build/es/meta.mjs +26 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js +28 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +335 -181
- package/build/internal/cjs/index.typings.js +28 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +325 -171
- package/build/internal/cjs/meta.js +28 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs +26 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +335 -181
- package/build/internal/es/index.typings.mjs +26 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +325 -171
- package/build/internal/es/meta.mjs +26 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -444,6 +444,225 @@ interface GetEventTimeSlotResponse {
|
|
|
444
444
|
*/
|
|
445
445
|
timeZone?: string | null;
|
|
446
446
|
}
|
|
447
|
+
interface ListMultiServiceAvailabilityTimeSlotsRequest {
|
|
448
|
+
/**
|
|
449
|
+
* Services for which the multi-service time slots are returned.
|
|
450
|
+
* Each service can include its own resource filters.
|
|
451
|
+
*
|
|
452
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
453
|
+
*
|
|
454
|
+
* Min: 2 services
|
|
455
|
+
* Max: 8 services
|
|
456
|
+
* @maxSize 8
|
|
457
|
+
*/
|
|
458
|
+
services?: Service[];
|
|
459
|
+
/**
|
|
460
|
+
* Lower boundary for `localStartDate` in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
461
|
+
* For example, `2026-01-30T13:30:00`.
|
|
462
|
+
* Each returned time slot has a `localStartDate` between `fromLocalDate` and `toLocalDate`.
|
|
463
|
+
*
|
|
464
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
465
|
+
* @format LOCAL_DATE_TIME
|
|
466
|
+
*/
|
|
467
|
+
fromLocalDate?: string | null;
|
|
468
|
+
/**
|
|
469
|
+
* Upper boundary for `localToDate` in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
470
|
+
* For example, `2026-01-30T13:30:00`.
|
|
471
|
+
* Each returned time slot has a `localEndDate` between `fromLocalDate` and `toLocalDate`.
|
|
472
|
+
*
|
|
473
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
474
|
+
* @format LOCAL_DATE_TIME
|
|
475
|
+
*/
|
|
476
|
+
toLocalDate?: string | null;
|
|
477
|
+
/**
|
|
478
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values. For example, `America/New_York` or `UTC`.
|
|
479
|
+
*
|
|
480
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
481
|
+
*
|
|
482
|
+
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
483
|
+
* @minLength 1
|
|
484
|
+
* @maxLength 150
|
|
485
|
+
*/
|
|
486
|
+
timeZone?: string | null;
|
|
487
|
+
/**
|
|
488
|
+
* Location for which the multi-service time slots are returned. If you filter by `{"type": "BUSINESS"}`, you must also specify a location ID. Filters for `location.name` and `location.formattedAddress` are ignored.
|
|
489
|
+
*
|
|
490
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
491
|
+
*/
|
|
492
|
+
location?: Location;
|
|
493
|
+
/**
|
|
494
|
+
* Whether the time slot is bookable according to all services' booking policies.
|
|
495
|
+
* If not specified, returns both bookable and non-bookable time slots.
|
|
496
|
+
*/
|
|
497
|
+
bookable?: boolean | null;
|
|
498
|
+
/**
|
|
499
|
+
* Indicators for service's booking policy violations.
|
|
500
|
+
* 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.
|
|
501
|
+
*/
|
|
502
|
+
bookingPolicyViolations?: BookingPolicyViolations;
|
|
503
|
+
/**
|
|
504
|
+
* Maximum number of slots to return for each day in the specified time range.
|
|
505
|
+
* If `bookable` filter isn't specified, bookable slots are returned first.
|
|
506
|
+
*/
|
|
507
|
+
timeSlotsPerDay?: number | null;
|
|
508
|
+
/**
|
|
509
|
+
* Cursor-based paging configuration.
|
|
510
|
+
* Enables fetching results in smaller chunks by setting a limit on the number of results.
|
|
511
|
+
* For consistent pagination behavior, use the same `limit` value throughout a pagination sequence.
|
|
512
|
+
* When specifying a new `limit` in follow-up requests, the API respects the new value.
|
|
513
|
+
*/
|
|
514
|
+
cursorPaging?: CursorPaging;
|
|
515
|
+
}
|
|
516
|
+
interface Service {
|
|
517
|
+
/**
|
|
518
|
+
* Service ID.
|
|
519
|
+
* @format GUID
|
|
520
|
+
*/
|
|
521
|
+
serviceId?: string;
|
|
522
|
+
/**
|
|
523
|
+
* Resource [type IDs](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction) to include in returned time slots.
|
|
524
|
+
* This is in addition to the specifically requested resources.
|
|
525
|
+
*
|
|
526
|
+
* <blockquote>
|
|
527
|
+
* Currently supported only for Staff Member resource type.
|
|
528
|
+
* Staff members belong to resource type ID `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`.
|
|
529
|
+
* </blockquote>
|
|
530
|
+
* @format GUID
|
|
531
|
+
* @maxSize 100
|
|
532
|
+
*/
|
|
533
|
+
includeResourceTypeIds?: string[];
|
|
534
|
+
/**
|
|
535
|
+
* Selected customer choices.
|
|
536
|
+
* If specified, the selected choices are used to calculate service configuration.
|
|
537
|
+
* If not specified, the service default configuration is used.
|
|
538
|
+
* Enforcing this field is the responsibility of the service plugin implementer, and not the Time Slots V2 API.
|
|
539
|
+
*
|
|
540
|
+
* 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.
|
|
541
|
+
*/
|
|
542
|
+
customerChoices?: V2CustomerChoices;
|
|
543
|
+
/**
|
|
544
|
+
* Resource types to filter time slots.
|
|
545
|
+
* Only returns time slots that have these specific resource types available.
|
|
546
|
+
* This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
|
|
547
|
+
* @maxSize 3
|
|
548
|
+
*/
|
|
549
|
+
resourceTypes?: ResourceType[];
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Selected customer choices.
|
|
553
|
+
*
|
|
554
|
+
* These choices are selected by the customer during the book flow and used to calculate the service's availability configuration.
|
|
555
|
+
*/
|
|
556
|
+
interface V2CustomerChoices {
|
|
557
|
+
/**
|
|
558
|
+
* Selected duration in minutes, based on a [service variant](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction) the customer chose.
|
|
559
|
+
* 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.
|
|
560
|
+
*
|
|
561
|
+
* Min: `1` minute
|
|
562
|
+
* Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
|
|
563
|
+
* Default: `15` minutes
|
|
564
|
+
* @min 1
|
|
565
|
+
* @max 44639
|
|
566
|
+
*/
|
|
567
|
+
durationInMinutes?: number | null;
|
|
568
|
+
/**
|
|
569
|
+
* Selected [add-on](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) IDs.
|
|
570
|
+
* 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.
|
|
571
|
+
*
|
|
572
|
+
* Max: 21 (3 add-on groups × 7 add-ons per group).
|
|
573
|
+
* @format GUID
|
|
574
|
+
* @maxSize 21
|
|
575
|
+
*/
|
|
576
|
+
addOnIds?: string[] | null;
|
|
577
|
+
/**
|
|
578
|
+
* Selected duration choice ID.
|
|
579
|
+
* @format GUID
|
|
580
|
+
*/
|
|
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;
|
|
596
|
+
}
|
|
597
|
+
interface ListMultiServiceAvailabilityTimeSlotsResponse {
|
|
598
|
+
/**
|
|
599
|
+
* Retrieved time slots.
|
|
600
|
+
* Sorted by `localStartDate` in ascending order. When multiple slots have the same start time, no specific secondary sorting is guaranteed.
|
|
601
|
+
* @maxSize 1000
|
|
602
|
+
*/
|
|
603
|
+
timeSlots?: TimeSlot[];
|
|
604
|
+
/**
|
|
605
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
|
606
|
+
* For example, `America/New_York` or `UTC`.
|
|
607
|
+
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
608
|
+
* @minLength 1
|
|
609
|
+
* @maxLength 150
|
|
610
|
+
*/
|
|
611
|
+
timeZone?: string | null;
|
|
612
|
+
/**
|
|
613
|
+
* Paging metadata for the next page of results.
|
|
614
|
+
* Contains a cursor if there are more than 1000 results.
|
|
615
|
+
*/
|
|
616
|
+
cursorPagingMetadata?: CursorPagingMetadata;
|
|
617
|
+
}
|
|
618
|
+
interface GetMultiServiceAvailabilityTimeSlotRequest {
|
|
619
|
+
/**
|
|
620
|
+
* Services for which the multi-service time slots are returned.
|
|
621
|
+
* You can specify resource filters for each service.
|
|
622
|
+
* @minSize 2
|
|
623
|
+
* @maxSize 8
|
|
624
|
+
*/
|
|
625
|
+
services?: Service[];
|
|
626
|
+
/**
|
|
627
|
+
* Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
628
|
+
* For example, `2026-01-30T13:30:00`.
|
|
629
|
+
* @format LOCAL_DATE_TIME
|
|
630
|
+
*/
|
|
631
|
+
localStartDate?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
|
634
|
+
* For example, `2026-01-30T13:30:00`.
|
|
635
|
+
* @format LOCAL_DATE_TIME
|
|
636
|
+
*/
|
|
637
|
+
localEndDate?: string;
|
|
638
|
+
/**
|
|
639
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
|
640
|
+
* For example, `America/New_York` or `UTC`.
|
|
641
|
+
*
|
|
642
|
+
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
643
|
+
* @minLength 1
|
|
644
|
+
* @maxLength 150
|
|
645
|
+
*/
|
|
646
|
+
timeZone?: string | null;
|
|
647
|
+
/**
|
|
648
|
+
* Location for which the multi-service time slots are returned. If you filter by `{"type": "BUSINESS"}`, you must also specify a location ID. A filter for `location.name` is ignored.
|
|
649
|
+
*
|
|
650
|
+
* Required unless you specify `cursorPaging.cursor`.
|
|
651
|
+
*/
|
|
652
|
+
location?: Location;
|
|
653
|
+
}
|
|
654
|
+
interface GetMultiServiceAvailabilityTimeSlotResponse {
|
|
655
|
+
/** Retrieved time slot. */
|
|
656
|
+
timeSlot?: TimeSlot;
|
|
657
|
+
/**
|
|
658
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
|
659
|
+
* For example, `America/New_York` or `UTC`.
|
|
660
|
+
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
661
|
+
* @minLength 1
|
|
662
|
+
* @maxLength 150
|
|
663
|
+
*/
|
|
664
|
+
timeZone?: string | null;
|
|
665
|
+
}
|
|
447
666
|
interface ListAvailabilityTimeSlotsRequest {
|
|
448
667
|
/**
|
|
449
668
|
* Service ID for which to retrieve time slots. You must specify the ID of an appointment-based service.
|
|
@@ -553,20 +772,6 @@ interface CustomerChoices {
|
|
|
553
772
|
*/
|
|
554
773
|
durationChoiceId?: string | null;
|
|
555
774
|
}
|
|
556
|
-
interface ResourceType {
|
|
557
|
-
/**
|
|
558
|
-
* [Resource type ID](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction).
|
|
559
|
-
* @format GUID
|
|
560
|
-
*/
|
|
561
|
-
resourceTypeId?: string | null;
|
|
562
|
-
/**
|
|
563
|
-
* Resource IDs.
|
|
564
|
-
* Available only if there is at least 1 resource available for the slot.
|
|
565
|
-
* @format GUID
|
|
566
|
-
* @maxSize 135
|
|
567
|
-
*/
|
|
568
|
-
resourceIds?: string[] | null;
|
|
569
|
-
}
|
|
570
775
|
interface ListAvailabilityTimeSlotsResponse {
|
|
571
776
|
/**
|
|
572
777
|
* Retrieved time slots.
|
|
@@ -730,206 +935,155 @@ interface GetAvailabilityTimeSlotResponse {
|
|
|
730
935
|
*/
|
|
731
936
|
timeZone?: string | null;
|
|
732
937
|
}
|
|
733
|
-
interface
|
|
938
|
+
interface DiagnoseAvailabilityRequest {
|
|
734
939
|
/**
|
|
735
|
-
*
|
|
736
|
-
*
|
|
737
|
-
*
|
|
738
|
-
* Required unless you specify `cursorPaging.cursor`.
|
|
739
|
-
*
|
|
740
|
-
* Min: 2 services
|
|
741
|
-
* Max: 8 services
|
|
742
|
-
* @maxSize 8
|
|
940
|
+
* Service to diagnose; provide this or `resource_id`.
|
|
941
|
+
* @format GUID
|
|
743
942
|
*/
|
|
744
|
-
|
|
943
|
+
serviceId?: string | null;
|
|
745
944
|
/**
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
945
|
+
* Staff member / resource to diagnose; provide this or `service_id`.
|
|
946
|
+
* @format GUID
|
|
947
|
+
*/
|
|
948
|
+
resourceId?: string | null;
|
|
949
|
+
/**
|
|
950
|
+
* Lower boundary of the diagnosed range, `YYYY-MM-DDThh:mm:ss` (ISO-8601). Optional; defaults to the current time when omitted.
|
|
751
951
|
* @format LOCAL_DATE_TIME
|
|
752
952
|
*/
|
|
753
953
|
fromLocalDate?: string | null;
|
|
754
954
|
/**
|
|
755
|
-
* Upper boundary
|
|
756
|
-
* For example, `2026-01-30T13:30:00`.
|
|
757
|
-
* Each returned time slot has a `localEndDate` between `fromLocalDate` and `toLocalDate`.
|
|
758
|
-
*
|
|
759
|
-
* Required unless you specify `cursorPaging.cursor`.
|
|
955
|
+
* Upper boundary of the diagnosed range, `YYYY-MM-DDThh:mm:ss` (ISO-8601). Optional; defaults to `fromLocalDate` + 90 days when omitted.
|
|
760
956
|
* @format LOCAL_DATE_TIME
|
|
761
957
|
*/
|
|
762
958
|
toLocalDate?: string | null;
|
|
763
959
|
/**
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
* Required unless you specify `cursorPaging.cursor`.
|
|
767
|
-
*
|
|
768
|
-
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
960
|
+
* IANA tz database time zone for `fromLocalDate`/`toLocalDate`.
|
|
769
961
|
* @minLength 1
|
|
770
962
|
* @maxLength 150
|
|
771
963
|
*/
|
|
772
964
|
timeZone?: string | null;
|
|
773
965
|
/**
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
* Required unless you specify `cursorPaging.cursor`.
|
|
777
|
-
*/
|
|
778
|
-
location?: Location;
|
|
779
|
-
/**
|
|
780
|
-
* Whether the time slot is bookable according to all services' booking policies.
|
|
781
|
-
* If not specified, returns both bookable and non-bookable time slots.
|
|
782
|
-
*/
|
|
783
|
-
bookable?: boolean | null;
|
|
784
|
-
/**
|
|
785
|
-
* Indicators for service's booking policy violations.
|
|
786
|
-
* 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.
|
|
787
|
-
*/
|
|
788
|
-
bookingPolicyViolations?: BookingPolicyViolations;
|
|
789
|
-
/**
|
|
790
|
-
* Maximum number of slots to return for each day in the specified time range.
|
|
791
|
-
* If `bookable` filter isn't specified, bookable slots are returned first.
|
|
966
|
+
* Locations to diagnose; all offered locations when empty.
|
|
967
|
+
* @maxSize 100
|
|
792
968
|
*/
|
|
793
|
-
|
|
969
|
+
locations?: Location[];
|
|
794
970
|
/**
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
971
|
+
* Whether to run a deeper diagnosis. Optional; defaults to `false` — the fast, deterministic
|
|
972
|
+
* configuration/setup checks (resource-availability-window checks are added to this path as they
|
|
973
|
+
* roll out). Set `true` only when the default result is inconclusive (no reasons) and you need to
|
|
974
|
+
* know *why* specific resources have no availability at specific times — it samples resource
|
|
975
|
+
* availability to attribute an empty window to a working-hours gap vs. blocked time, at extra
|
|
976
|
+
* latency. Not supported yet — `true` currently returns `DIAGNOSTIC_DEPTH_NOT_SUPPORTED`.
|
|
799
977
|
*/
|
|
800
|
-
|
|
978
|
+
deep?: boolean;
|
|
801
979
|
}
|
|
802
|
-
interface
|
|
980
|
+
interface DiagnoseAvailabilityResponse {
|
|
803
981
|
/**
|
|
804
|
-
*
|
|
805
|
-
*
|
|
982
|
+
* Whether the service or resource has bookable availability in the diagnosed range.
|
|
983
|
+
* Note: the current diagnosis detects setup/configuration problems and does not positively confirm
|
|
984
|
+
* availability, so this is not set to `true` yet (reserved for the deeper availability-window check).
|
|
806
985
|
*/
|
|
807
|
-
|
|
986
|
+
hasAvailability?: boolean;
|
|
808
987
|
/**
|
|
809
|
-
*
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
* <blockquote>
|
|
813
|
-
* Currently supported only for Staff Member resource type.
|
|
814
|
-
* Staff members belong to resource type ID `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`.
|
|
815
|
-
* </blockquote>
|
|
816
|
-
* @format GUID
|
|
817
|
-
* @maxSize 100
|
|
988
|
+
* Causes of unavailability, most-specific first. When empty, the diagnosis is undetermined: no
|
|
989
|
+
* blocking cause was identified (and availability was not positively confirmed).
|
|
990
|
+
* @maxSize 20
|
|
818
991
|
*/
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
|
|
822
|
-
* If specified, the selected choices are used to calculate service configuration.
|
|
823
|
-
* If not specified, the service default configuration is used.
|
|
824
|
-
* Enforcing this field is the responsibility of the service plugin implementer, and not the Time Slots V2 API.
|
|
825
|
-
*
|
|
826
|
-
* 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.
|
|
827
|
-
*/
|
|
828
|
-
customerChoices?: V2CustomerChoices;
|
|
829
|
-
/**
|
|
830
|
-
* Resource types to filter time slots.
|
|
831
|
-
* Only returns time slots that have these specific resource types available.
|
|
832
|
-
* This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
|
|
833
|
-
* @maxSize 3
|
|
834
|
-
*/
|
|
835
|
-
resourceTypes?: ResourceType[];
|
|
992
|
+
reasons?: DiagnosisReason[];
|
|
993
|
+
/** Resolved inputs used for the diagnosis, echoed for debugging. */
|
|
994
|
+
resolvedContext?: ResolvedContext;
|
|
836
995
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
996
|
+
interface DiagnosisReason {
|
|
997
|
+
/** Machine-readable reason code. */
|
|
998
|
+
code?: ReasonCodeWithLiterals;
|
|
999
|
+
/** Suggested owner-facing action key. Wording and localization are the client's responsibility. */
|
|
1000
|
+
suggestedAction?: SuggestedActionWithLiterals;
|
|
1001
|
+
}
|
|
1002
|
+
/** Machine-readable cause for empty availability. */
|
|
1003
|
+
declare enum ReasonCode {
|
|
1004
|
+
/** No staff or resources are assigned to the service. */
|
|
1005
|
+
NO_ASSIGNED_STAFF_OR_RESOURCES = "NO_ASSIGNED_STAFF_OR_RESOURCES",
|
|
1006
|
+
/** The service's availability configuration is missing. */
|
|
1007
|
+
SERVICE_AVAILABILITY_CONFIGURATION_MISSING = "SERVICE_AVAILABILITY_CONFIGURATION_MISSING",
|
|
1008
|
+
/** The requested location(s) are not offered by the service. */
|
|
1009
|
+
REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE = "REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE",
|
|
1010
|
+
/** The service's resource types could not be resolved. */
|
|
1011
|
+
RESOURCE_TYPE_RESOLUTION_FAILED = "RESOURCE_TYPE_RESOLUTION_FAILED",
|
|
1012
|
+
/** No resource-availability windows exist in the diagnosed range. */
|
|
1013
|
+
NO_RESOURCE_AVAILABILITY_WINDOWS = "NO_RESOURCE_AVAILABILITY_WINDOWS",
|
|
1014
|
+
/** The service duration is longer than every available window. */
|
|
1015
|
+
DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS = "DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS",
|
|
1016
|
+
/** Buffer time eliminates all otherwise-available windows. */
|
|
1017
|
+
BUFFER_TIME_ELIMINATES_WINDOWS = "BUFFER_TIME_ELIMINATES_WINDOWS",
|
|
1018
|
+
/** Resources are not within working hours during the diagnosed range. Reported only at `DEEP` depth. */
|
|
1019
|
+
RESOURCE_NOT_IN_WORKING_HOURS = "RESOURCE_NOT_IN_WORKING_HOURS",
|
|
1020
|
+
/** Resources are blocked by events or external calendars during the range. Reported only at `DEEP` depth. */
|
|
1021
|
+
RESOURCE_BLOCKED = "RESOURCE_BLOCKED",
|
|
1022
|
+
/** The staff member / resource has no working-hours schedule configured. */
|
|
1023
|
+
RESOURCE_HAS_NO_WORKING_HOURS = "RESOURCE_HAS_NO_WORKING_HOURS",
|
|
1024
|
+
/** The staff member / resource is not assigned to the service. */
|
|
1025
|
+
RESOURCE_NOT_ASSIGNED_TO_SERVICE = "RESOURCE_NOT_ASSIGNED_TO_SERVICE"
|
|
1026
|
+
}
|
|
1027
|
+
/** @enumType */
|
|
1028
|
+
type ReasonCodeWithLiterals = ReasonCode | 'NO_ASSIGNED_STAFF_OR_RESOURCES' | 'SERVICE_AVAILABILITY_CONFIGURATION_MISSING' | 'REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE' | 'RESOURCE_TYPE_RESOLUTION_FAILED' | 'NO_RESOURCE_AVAILABILITY_WINDOWS' | 'DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS' | 'BUFFER_TIME_ELIMINATES_WINDOWS' | 'RESOURCE_NOT_IN_WORKING_HOURS' | 'RESOURCE_BLOCKED' | 'RESOURCE_HAS_NO_WORKING_HOURS' | 'RESOURCE_NOT_ASSIGNED_TO_SERVICE';
|
|
1029
|
+
/** Owner-facing action key suggested to resolve a diagnosed reason. */
|
|
1030
|
+
declare enum SuggestedAction {
|
|
1031
|
+
/** Assign staff or resources to the service. */
|
|
1032
|
+
ASSIGN_STAFF_OR_RESOURCES = "ASSIGN_STAFF_OR_RESOURCES",
|
|
1033
|
+
/** Review staff working hours. */
|
|
1034
|
+
CHECK_STAFF_WORKING_HOURS = "CHECK_STAFF_WORKING_HOURS",
|
|
1035
|
+
/** Review staff work locations. */
|
|
1036
|
+
CHECK_WORK_LOCATIONS = "CHECK_WORK_LOCATIONS",
|
|
1037
|
+
/** Review the service's offered locations. */
|
|
1038
|
+
CHECK_SERVICE_LOCATIONS = "CHECK_SERVICE_LOCATIONS",
|
|
1039
|
+
/** Reduce the service duration or buffer time. */
|
|
1040
|
+
REDUCE_DURATION_OR_BUFFER = "REDUCE_DURATION_OR_BUFFER",
|
|
1041
|
+
/** Review blocked time and calendar events. */
|
|
1042
|
+
CHECK_BLOCKED_TIME = "CHECK_BLOCKED_TIME",
|
|
1043
|
+
/** Assign the staff member / resource to the service. */
|
|
1044
|
+
ASSIGN_RESOURCE_TO_SERVICE = "ASSIGN_RESOURCE_TO_SERVICE"
|
|
1045
|
+
}
|
|
1046
|
+
/** @enumType */
|
|
1047
|
+
type SuggestedActionWithLiterals = SuggestedAction | 'ASSIGN_STAFF_OR_RESOURCES' | 'CHECK_STAFF_WORKING_HOURS' | 'CHECK_WORK_LOCATIONS' | 'CHECK_SERVICE_LOCATIONS' | 'REDUCE_DURATION_OR_BUFFER' | 'CHECK_BLOCKED_TIME' | 'ASSIGN_RESOURCE_TO_SERVICE';
|
|
1048
|
+
interface ResolvedContext {
|
|
854
1049
|
/**
|
|
855
|
-
*
|
|
856
|
-
* 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.
|
|
857
|
-
*
|
|
858
|
-
* Max: 21 (3 add-on groups × 7 add-ons per group).
|
|
1050
|
+
* Service ID that was diagnosed.
|
|
859
1051
|
* @format GUID
|
|
860
|
-
* @maxSize 21
|
|
861
1052
|
*/
|
|
862
|
-
|
|
1053
|
+
serviceId?: string | null;
|
|
863
1054
|
/**
|
|
864
|
-
*
|
|
1055
|
+
* Staff member / resource ID that was diagnosed.
|
|
865
1056
|
* @format GUID
|
|
866
1057
|
*/
|
|
867
|
-
|
|
868
|
-
}
|
|
869
|
-
interface ListMultiServiceAvailabilityTimeSlotsResponse {
|
|
1058
|
+
resourceId?: string | null;
|
|
870
1059
|
/**
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
* @maxSize
|
|
874
|
-
*/
|
|
875
|
-
timeSlots?: TimeSlot[];
|
|
876
|
-
/**
|
|
877
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
|
878
|
-
* For example, `America/New_York` or `UTC`.
|
|
879
|
-
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
880
|
-
* @minLength 1
|
|
881
|
-
* @maxLength 150
|
|
1060
|
+
* Locations resolved for the diagnosis (the service's offered locations, capped like the
|
|
1061
|
+
* configuration provider's location list).
|
|
1062
|
+
* @maxSize 100
|
|
882
1063
|
*/
|
|
883
|
-
|
|
1064
|
+
resolvedLocations?: Location[];
|
|
884
1065
|
/**
|
|
885
|
-
*
|
|
886
|
-
*
|
|
1066
|
+
* Service duration in minutes used for the diagnosis. Set only when `serviceId` is provided
|
|
1067
|
+
* (reflects service configuration); absent on the resource-only path.
|
|
887
1068
|
*/
|
|
888
|
-
|
|
889
|
-
}
|
|
890
|
-
interface GetMultiServiceAvailabilityTimeSlotRequest {
|
|
1069
|
+
durationInMinutes?: number | null;
|
|
891
1070
|
/**
|
|
892
|
-
*
|
|
893
|
-
*
|
|
894
|
-
* @minSize 2
|
|
895
|
-
* @maxSize 8
|
|
1071
|
+
* Buffer time in minutes used for the diagnosis. Set only when `serviceId` is provided
|
|
1072
|
+
* (reflects service configuration); absent on the resource-only path.
|
|
896
1073
|
*/
|
|
897
|
-
|
|
1074
|
+
bufferTimeInMinutes?: number | null;
|
|
898
1075
|
/**
|
|
899
|
-
*
|
|
900
|
-
* For example, `2026-01-30T13:30:00`.
|
|
1076
|
+
* Lower boundary of the diagnosed range actually used (the request value, or the default).
|
|
901
1077
|
* @format LOCAL_DATE_TIME
|
|
902
1078
|
*/
|
|
903
|
-
|
|
1079
|
+
fromLocalDate?: string | null;
|
|
904
1080
|
/**
|
|
905
|
-
*
|
|
906
|
-
* For example, `2026-01-30T13:30:00`.
|
|
1081
|
+
* Upper boundary of the diagnosed range actually used (the request value, or the default).
|
|
907
1082
|
* @format LOCAL_DATE_TIME
|
|
908
1083
|
*/
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
|
912
|
-
* For example, `America/New_York` or `UTC`.
|
|
913
|
-
*
|
|
914
|
-
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
915
|
-
* @minLength 1
|
|
916
|
-
* @maxLength 150
|
|
917
|
-
*/
|
|
918
|
-
timeZone?: string | null;
|
|
919
|
-
/**
|
|
920
|
-
* Location for which the multi-service time slots are returned. If you filter by `{"type": "BUSINESS"}`, you must also specify a location ID. A filter for `location.name` is ignored.
|
|
921
|
-
*
|
|
922
|
-
* Required unless you specify `cursorPaging.cursor`.
|
|
923
|
-
*/
|
|
924
|
-
location?: Location;
|
|
925
|
-
}
|
|
926
|
-
interface GetMultiServiceAvailabilityTimeSlotResponse {
|
|
927
|
-
/** Retrieved time slot. */
|
|
928
|
-
timeSlot?: TimeSlot;
|
|
1084
|
+
toLocalDate?: string | null;
|
|
929
1085
|
/**
|
|
930
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)
|
|
931
|
-
* For example, `America/New_York` or `UTC`.
|
|
932
|
-
* Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
|
|
1086
|
+
* Time zone used for the diagnosis, in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
|
|
933
1087
|
* @minLength 1
|
|
934
1088
|
* @maxLength 150
|
|
935
1089
|
*/
|
|
@@ -1276,4 +1430,4 @@ interface GetAvailabilityTimeSlotOptions {
|
|
|
1276
1430
|
resourceTypes?: ResourceType[];
|
|
1277
1431
|
}
|
|
1278
1432
|
|
|
1279
|
-
export { type AvailableResources, type BookingPolicyViolations, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomerChoices, type EventInfo, type GetAvailabilityTimeSlotApplicationErrors, type GetAvailabilityTimeSlotOptions, type GetAvailabilityTimeSlotRequest, type GetAvailabilityTimeSlotRequestCustomerChoices, type GetAvailabilityTimeSlotResponse, type GetEventTimeSlotRequest, type GetEventTimeSlotResponse, type GetMultiServiceAvailabilityTimeSlotRequest, type GetMultiServiceAvailabilityTimeSlotResponse, type ListAvailabilityTimeSlotEndOptions, type ListAvailabilityTimeSlotEndOptionsApplicationErrors, type ListAvailabilityTimeSlotEndOptionsRequest, type ListAvailabilityTimeSlotEndOptionsResponse, type ListAvailabilityTimeSlotsApplicationErrors, type ListAvailabilityTimeSlotsOptions, type ListAvailabilityTimeSlotsRequest, type ListAvailabilityTimeSlotsResponse, type ListEventTimeSlotsRequest, type ListEventTimeSlotsResponse, type ListMultiServiceAvailabilityTimeSlotsRequest, type ListMultiServiceAvailabilityTimeSlotsResponse, type Location, LocationType, type LocationTypeWithLiterals, type NestedTimeSlot, type NonBookableReasons, type Resource, type ResourceType, type Service, type TimeSlot, type V2CustomerChoices, type WaitingList, getAvailabilityTimeSlot, listAvailabilityTimeSlots };
|
|
1433
|
+
export { type AvailableResources, type BookingPolicyViolations, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomerChoices, type DiagnoseAvailabilityRequest, type DiagnoseAvailabilityResponse, type DiagnosisReason, type EventInfo, type GetAvailabilityTimeSlotApplicationErrors, type GetAvailabilityTimeSlotOptions, type GetAvailabilityTimeSlotRequest, type GetAvailabilityTimeSlotRequestCustomerChoices, type GetAvailabilityTimeSlotResponse, type GetEventTimeSlotRequest, type GetEventTimeSlotResponse, type GetMultiServiceAvailabilityTimeSlotRequest, type GetMultiServiceAvailabilityTimeSlotResponse, type ListAvailabilityTimeSlotEndOptions, type ListAvailabilityTimeSlotEndOptionsApplicationErrors, type ListAvailabilityTimeSlotEndOptionsRequest, type ListAvailabilityTimeSlotEndOptionsResponse, type ListAvailabilityTimeSlotsApplicationErrors, type ListAvailabilityTimeSlotsOptions, type ListAvailabilityTimeSlotsRequest, type ListAvailabilityTimeSlotsResponse, type ListEventTimeSlotsRequest, type ListEventTimeSlotsResponse, type ListMultiServiceAvailabilityTimeSlotsRequest, type ListMultiServiceAvailabilityTimeSlotsResponse, type Location, LocationType, type LocationTypeWithLiterals, type NestedTimeSlot, type NonBookableReasons, ReasonCode, type ReasonCodeWithLiterals, type ResolvedContext, type Resource, type ResourceType, type Service, SuggestedAction, type SuggestedActionWithLiterals, type TimeSlot, type V2CustomerChoices, type WaitingList, getAvailabilityTimeSlot, listAvailabilityTimeSlots };
|
|
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_typings_exports = {};
|
|
22
22
|
__export(index_typings_exports, {
|
|
23
23
|
LocationType: () => LocationType,
|
|
24
|
+
ReasonCode: () => ReasonCode,
|
|
25
|
+
SuggestedAction: () => SuggestedAction,
|
|
24
26
|
getAvailabilityTimeSlot: () => getAvailabilityTimeSlot2,
|
|
25
27
|
listAvailabilityTimeSlotEndOptions: () => listAvailabilityTimeSlotEndOptions2,
|
|
26
28
|
listAvailabilityTimeSlots: () => listAvailabilityTimeSlots2
|
|
@@ -271,6 +273,30 @@ var LocationType = /* @__PURE__ */ ((LocationType2) => {
|
|
|
271
273
|
LocationType2["CUSTOMER"] = "CUSTOMER";
|
|
272
274
|
return LocationType2;
|
|
273
275
|
})(LocationType || {});
|
|
276
|
+
var ReasonCode = /* @__PURE__ */ ((ReasonCode2) => {
|
|
277
|
+
ReasonCode2["NO_ASSIGNED_STAFF_OR_RESOURCES"] = "NO_ASSIGNED_STAFF_OR_RESOURCES";
|
|
278
|
+
ReasonCode2["SERVICE_AVAILABILITY_CONFIGURATION_MISSING"] = "SERVICE_AVAILABILITY_CONFIGURATION_MISSING";
|
|
279
|
+
ReasonCode2["REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE"] = "REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE";
|
|
280
|
+
ReasonCode2["RESOURCE_TYPE_RESOLUTION_FAILED"] = "RESOURCE_TYPE_RESOLUTION_FAILED";
|
|
281
|
+
ReasonCode2["NO_RESOURCE_AVAILABILITY_WINDOWS"] = "NO_RESOURCE_AVAILABILITY_WINDOWS";
|
|
282
|
+
ReasonCode2["DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS"] = "DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS";
|
|
283
|
+
ReasonCode2["BUFFER_TIME_ELIMINATES_WINDOWS"] = "BUFFER_TIME_ELIMINATES_WINDOWS";
|
|
284
|
+
ReasonCode2["RESOURCE_NOT_IN_WORKING_HOURS"] = "RESOURCE_NOT_IN_WORKING_HOURS";
|
|
285
|
+
ReasonCode2["RESOURCE_BLOCKED"] = "RESOURCE_BLOCKED";
|
|
286
|
+
ReasonCode2["RESOURCE_HAS_NO_WORKING_HOURS"] = "RESOURCE_HAS_NO_WORKING_HOURS";
|
|
287
|
+
ReasonCode2["RESOURCE_NOT_ASSIGNED_TO_SERVICE"] = "RESOURCE_NOT_ASSIGNED_TO_SERVICE";
|
|
288
|
+
return ReasonCode2;
|
|
289
|
+
})(ReasonCode || {});
|
|
290
|
+
var SuggestedAction = /* @__PURE__ */ ((SuggestedAction2) => {
|
|
291
|
+
SuggestedAction2["ASSIGN_STAFF_OR_RESOURCES"] = "ASSIGN_STAFF_OR_RESOURCES";
|
|
292
|
+
SuggestedAction2["CHECK_STAFF_WORKING_HOURS"] = "CHECK_STAFF_WORKING_HOURS";
|
|
293
|
+
SuggestedAction2["CHECK_WORK_LOCATIONS"] = "CHECK_WORK_LOCATIONS";
|
|
294
|
+
SuggestedAction2["CHECK_SERVICE_LOCATIONS"] = "CHECK_SERVICE_LOCATIONS";
|
|
295
|
+
SuggestedAction2["REDUCE_DURATION_OR_BUFFER"] = "REDUCE_DURATION_OR_BUFFER";
|
|
296
|
+
SuggestedAction2["CHECK_BLOCKED_TIME"] = "CHECK_BLOCKED_TIME";
|
|
297
|
+
SuggestedAction2["ASSIGN_RESOURCE_TO_SERVICE"] = "ASSIGN_RESOURCE_TO_SERVICE";
|
|
298
|
+
return SuggestedAction2;
|
|
299
|
+
})(SuggestedAction || {});
|
|
274
300
|
async function listAvailabilityTimeSlots2(options) {
|
|
275
301
|
const { httpClient, sideEffects } = arguments[1];
|
|
276
302
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -412,6 +438,8 @@ async function getAvailabilityTimeSlot2(serviceId, localStartDate, localEndDate,
|
|
|
412
438
|
// Annotate the CommonJS export names for ESM import in node:
|
|
413
439
|
0 && (module.exports = {
|
|
414
440
|
LocationType,
|
|
441
|
+
ReasonCode,
|
|
442
|
+
SuggestedAction,
|
|
415
443
|
getAvailabilityTimeSlot,
|
|
416
444
|
listAvailabilityTimeSlotEndOptions,
|
|
417
445
|
listAvailabilityTimeSlots
|