@wix/auto_sdk_bookings_availability-time-slots 1.0.155 → 1.0.157

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.
@@ -6,87 +6,50 @@ type TimeSlotNonNullablePaths = `location.locationType` | `availableResources` |
6
6
  declare function listAvailabilityTimeSlots$1(httpClient: HttpClient): ListAvailabilityTimeSlotsSignature;
7
7
  interface ListAvailabilityTimeSlotsSignature {
8
8
  /**
9
- * Retrieves a list of `TimeSlot`s that match the provided filters.
10
- *
11
- * <blockquote class="important">
12
- * <p><strong>Important:</strong>
13
- * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
14
- * </blockquote>
15
- *
16
- * The request body __must__ include either:
17
- * + All of the following filters: `serviceId`, `fromLocalDate`, `toLocalDate`, and `timeZone`.
18
- * You may add additional filters as you wish.
19
- * + A `cursorPaging` with a valid `cursor` from previous response.
20
- *
21
- *
22
- * Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
23
- * represents the availability of the service in a specific location,
24
- * and has a `localStartDate` within the range of the provided `fromLocalDate` and `toLocalDate` exclusive.
25
- * The `localEndDate` of a `TimeSlot` is calculated as the sum of the `TimeSlot`'s `localStartDate` and the duration of the service.
26
- *
27
- * By default,
28
- * the response contains at most 1000 results.
29
- * If there are more than 1000 results, we return a `cursorPagingMetadata` with
30
- * a cursor for the next page of results, regardless of whether a `cursorPaging`
31
- * was provided in request.
32
- *
33
- * ### AvailableResources in response
34
- * The `TimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service
35
- * within the time slot. Each `AvailableResources` contains information about available resources of the same type.
36
- *
37
- * <blockquote class="important">
38
- * <p><strong>Important:</strong><br/>
39
- * By default,
40
- * if you don't specify <code class="grey-background">includeResourceTypeIds</code>
41
- * or <code class="grey-background">resourceIds</code> filters in request,
42
- * we return TimeSlots with an empty <code class="grey-background">AvailableResources</code>.
43
- * <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
44
- * interested of whether the time slots are available. [Finding the next available slot within the next 3 months](https://bo.wix.com/wix-docs/rest/all-apis/service-availability/availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-the-selected-service-is-available-for)
45
- * is an example for such flow.
46
- * </p>
47
- * </blockquote>
48
- *
49
- * If you wish to get a list of available resources for each `TimeSlot` you should either:
50
- * + provide `resourceIds` in request.
51
- * + provide `includeResourceTypeIds` in request.
52
- *
53
- * __Notes:__
54
- * + In both cases the returned TimeSlots contains __up__ to 10 `AvailableResources` that match the provided filters.
55
- * Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.
56
- * + If an `AvailableResources` has more available resources which are not listed within it,
57
- * we return `AvailableResources`.`hasMoreAvailableResources` as true.
58
- * > __Note:__
59
- * > If you wish to get the full available resources list for a specific `TimeSlot`,
60
- * > you should call [GetAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/get-availability-time-slot).
61
- *
62
- *
63
- * ### Availability VS Bookability
64
- * An `available` time slot is not necessarily `bookable`.
65
- * The `bookable` field of a `TimeSlot` indicates whether a customer can book the service within the given time slot,
66
- * at a specific period of time.
67
- * Read more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/introduction#all-apis_wix-service-availability_service-availability-time-slots_introduction_availability-vs-bookability).
68
- *
69
- * By default,
70
- * + The response does not contains `unavailable` TimeSlots.
71
- * For example,
72
- * if there are no available resources to provide the service from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`,
73
- * we don't return TimeSlots with `localStartDate` within this range.
74
- * + The response contains both `bookable` and `un-bookable` TimeSlots.
75
- * For example,
76
- * if the service has a booking policy which enforces booking the service up to 10 minutes before the session starts,
77
- * we return TimeSlots with the violating `localStartDate` with `bookable` as false.
78
- * If you wish to list only available __bookable__ TimeSlots you should pass `bookable` filter as true.
79
- *
80
- * <blockquote class="important">
81
- * <p><strong>Important:</strong>
82
- * Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
83
- * Read more about <a href="https://bo.wix.com/wix-docs/rest/all-apis/service-availability/availability-time-slots/introduction?localViewerId=inbari#all-apis_service-availability_availability-time-slots_introduction_daylight-saving-time-dst-handling">DST Handling</a></p>
84
- * </blockquote>
85
- *
86
- *
87
- * ### ListAvailabilityTimeSlots runs with the following defaults
88
- * + `localStartDate` is sorted in `ASC` order
89
- * + `cursorPaging`.`limit` is `1000`
9
+ * Retrieves a list of appointment time slots that match the provided filters.
10
+ *
11
+ *
12
+ * ## Defaults
13
+ *
14
+ * List Availability Time Slots uses the following defaults:
15
+ *
16
+ * - Sorts time slots by `localStartDate` in ascending order.
17
+ * - `cursorPaging.limit` set to `1000`.
18
+ * - Returns both bookable and un-bookable time slots.
19
+ * - If `bookable` filter isn't specified, bookable slots are returned first.
20
+ * - Wix Bookings uses the current time as the default for `fromLocalDate`.
21
+ *
22
+ * ## Filtering behavior
23
+ *
24
+ * The method automatically filters time slots:
25
+ *
26
+ * - **Past time slots**: Only time slots starting from the specified `fromLocalDate` are included. When you omit `fromLocalDate`, Wix Bookings uses the current time as the default.
27
+ * - **Resource availability**: Only time slots with at least some available resources are returned.
28
+ *
29
+ * ## Service type limitations
30
+ *
31
+ * Only appointment-based services are supported when calling List Availability Time Slots.
32
+ *
33
+ * To retrieve class availability, you can call List Event Time Slots([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/event-time-slots/list-event-time-slots) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/list-event-time-slots)).
34
+ *
35
+ * To retrieve course availability, you can follow the End-to-End Booking Flow for course([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/end-to-end-booking-flow#book-a-course) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/end-to-end-booking-flow#book-a-course)).
36
+ *
37
+ * ## Available resources
38
+ *
39
+ * Time slots aren't returned when they have no available resources.
40
+ *
41
+ * Each time slots include details for up to 10 available resources.
42
+ * If there are more than 10 resources, you can call Get Availability Time Slots ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/availability/availability-time-slots/get-availability-time-slot) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/availability/availability-time-slots/get-availability-time-slot)) filtering by the resource Type ID to get details for the remaining resources.
43
+ *
44
+ * ## Business hours exception
45
+ *
46
+ * Wix Bookings disregards business opening hours when all of the following conditions are met:
47
+ *
48
+ * 1. 1 or more staff members ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction)) are needed to provide the service.
49
+ * 2. No other resource type ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resource-types-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)) is needed to provide the service.
50
+ * 3. The service doesn't have duration-based variants ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/service-options-and-variants/introduction)).
51
+ *
52
+ * In these cases, the working hours of the relevant staff member are used instead for availability calculation.
90
53
  */
91
54
  (options?: ListAvailabilityTimeSlotsOptions): Promise<NonNullablePaths<ListAvailabilityTimeSlotsResponse, {
92
55
  [P in TimeSlotNonNullablePaths]: `timeSlots.${number}.${P}`;
@@ -97,46 +60,49 @@ interface ListAvailabilityTimeSlotsSignature {
97
60
  declare function getAvailabilityTimeSlot$1(httpClient: HttpClient): GetAvailabilityTimeSlotSignature;
98
61
  interface GetAvailabilityTimeSlotSignature {
99
62
  /**
100
- * Retrieves an available `TimeSlot` that match the provided filters.
63
+ * Retrieves detailed information about a specific appointment time slot.
64
+ *
65
+ *
66
+ * Call this method to get complete resource availability after finding a suitable slot with List Availability Time Slots ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/availability/availability-time-slots/list-availability-time-slots) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/availability/availability-time-slots/list-availability-time-slots)).
67
+ *
68
+ * ## Defaults
69
+ *
70
+ * Get Availability Time Slot uses the following defaults:
71
+ *
72
+ * - Returns all available resources unless filtered by `resourceIds` or `includeResourceTypeIds`.
73
+ * - Includes full booking status and capacity details
74
+ *
75
+ * ## Service type limitations
76
+ *
77
+ * Only appointment-based services are supported when calling Get Availability Time Slot.
101
78
  *
102
- * Throws `SlotNotFound` if there is no such available time slot.
79
+ * To retrieve class session availability, you can call Get Event Time Slot ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/get-event-time-slot) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/time-slots/time-slots-v2/get-event-time-slot)).
103
80
  *
104
- * <blockquote class="important">
105
- * <p><strong>Important:</strong><br/>
106
- * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
107
- * </blockquote>
81
+ * To retrieve course availability, you can follow the End-to-End Booking Flow for courses ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/end-to-end-booking-flows#book-a-course) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/end-to-end-booking-flow#book-a-course)).
108
82
  *
109
- * By default,
110
- * if you don't provide `includeResourceTypeIds` or `resourceIds` in request,
111
- * we return all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
112
- * the service within the time slot.
83
+ * ## Business hours exception
113
84
  *
114
- * If you specify `includeResourceTypeIds` or `resourceIds` in request,
115
- * the returned `TimeSlot` will contain only `AvailableResources` with at least one available resource
116
- * which match the given resources filters,
117
- * each contains all available resources out of those requested.
85
+ * Wix Bookings disregards business opening hours when all of the following conditions are met:
118
86
  *
87
+ * 1. 1 or more staff members ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction)) are needed to provide the service.
88
+ * 2. No other resource type ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resource-types-v2/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)) is needed to provide the service.
89
+ * 3. The service doesn't have duration-based variants ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/service-options-and-variants/introduction)).
119
90
  *
120
- * <blockquote class="tip">
121
- * <p><strong>Tip:</strong><br/>
122
- * Use this API in order to get the availability of a specific <code class="grey-background">TimeSlot</code> out of those returned from <code class="grey-background">ListAvailabilityTimeSlots</code> API.</p>
123
- * </blockquote>
91
+ * In these cases, the working hours of the relevant staff member are used instead for availability calculation.
124
92
  * @param - Service ID of the time slot.
125
- * Currently supported only for services of type `APPOINTMENT`.
126
- * @param - Local start date of the time slot, in ISO-8601 format.
127
- * For example, "2024-01-30T13:30:00".
128
- * @param - Local end date of the time slot, in ISO-8601 format.
129
- * For example, "2024-01-30T14:30:00".
130
- * @param - Time zone, in IANA time zone format.
131
- * @param - The location of the time slot.
132
- *
133
- * You must provide a specific `locationType`.
134
- * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
135
- *
136
- * <blockquote class="warning">
137
- * <p>Supports filtering by location type, or by location ID.
138
- * Other fields like <code class="grey-background">name</code> are ignored.</p>
139
- * </blockquote>
93
+ * You must specify the ID of an appointment-based service.
94
+ * @param - Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
95
+ * For example, `2026-01-30T13:30:00`.
96
+ * @param - Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
97
+ * For example, `2026-01-30T13:30:00`.
98
+ * @param - Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
99
+ * For example, `America/New_York` or `UTC`.
100
+ *
101
+ * Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
102
+ * @param - Location to filter time slots by.
103
+ *
104
+ * For business locations, you must specify a location ID.
105
+ * When specifying a location ID, all other location field filters are ignored.
140
106
  */
141
107
  (serviceId: string, localStartDate: string, localEndDate: string, timeZone: string, location: Location, options?: GetAvailabilityTimeSlotOptions): Promise<NonNullablePaths<GetAvailabilityTimeSlotResponse, {
142
108
  [P in TimeSlotNonNullablePaths]: `timeSlot.${P}`;