@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.
- package/build/cjs/index.d.ts +80 -114
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +353 -558
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +147 -216
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +80 -114
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +353 -558
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +147 -216
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +80 -114
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +353 -558
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +147 -216
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +80 -114
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +353 -558
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +147 -216
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -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
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
126
|
-
* @param - Local start date of the time slot
|
|
127
|
-
* For example,
|
|
128
|
-
* @param - Local end date of the time slot
|
|
129
|
-
* For example,
|
|
130
|
-
* @param - Time zone
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
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}`;
|