@wix/auto_sdk_bookings_availability-time-slots 1.0.252 → 1.0.254

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +41 -4
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +82 -62
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +23 -37
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/cjs/schemas.d.ts +89 -1
  8. package/build/cjs/schemas.js +211 -3
  9. package/build/cjs/schemas.js.map +1 -1
  10. package/build/es/index.d.mts +41 -4
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/index.typings.d.mts +82 -62
  13. package/build/es/index.typings.mjs.map +1 -1
  14. package/build/es/meta.d.mts +23 -37
  15. package/build/es/meta.mjs.map +1 -1
  16. package/build/es/schemas.d.mts +89 -1
  17. package/build/es/schemas.mjs +209 -3
  18. package/build/es/schemas.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +24 -21
  20. package/build/internal/cjs/index.js.map +1 -1
  21. package/build/internal/cjs/index.typings.d.ts +64 -80
  22. package/build/internal/cjs/index.typings.js.map +1 -1
  23. package/build/internal/cjs/meta.d.ts +23 -37
  24. package/build/internal/cjs/meta.js.map +1 -1
  25. package/build/internal/cjs/schemas.d.ts +89 -1
  26. package/build/internal/cjs/schemas.js +211 -3
  27. package/build/internal/cjs/schemas.js.map +1 -1
  28. package/build/internal/es/index.d.mts +24 -21
  29. package/build/internal/es/index.mjs.map +1 -1
  30. package/build/internal/es/index.typings.d.mts +64 -80
  31. package/build/internal/es/index.typings.mjs.map +1 -1
  32. package/build/internal/es/meta.d.mts +23 -37
  33. package/build/internal/es/meta.mjs.map +1 -1
  34. package/build/internal/es/schemas.d.mts +89 -1
  35. package/build/internal/es/schemas.mjs +209 -3
  36. package/build/internal/es/schemas.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { ListAvailabilityTimeSlotsOptions, ListAvailabilityTimeSlotsResponse, ListAvailabilityTimeSlotsApplicationErrors, Location, GetAvailabilityTimeSlotOptions, GetAvailabilityTimeSlotResponse, GetAvailabilityTimeSlotApplicationErrors } from './index.typings.js';
3
- export { AvailableResources, BookingPolicyViolations, CursorPaging, CursorPagingMetadata, Cursors, CustomerChoices, DiagnoseAvailabilityRequest, DiagnoseAvailabilityResponse, DiagnosisReason, EventInfo, GetAvailabilityTimeSlotRequest, GetAvailabilityTimeSlotRequestCustomerChoices, GetEventTimeSlotRequest, GetEventTimeSlotResponse, GetMultiServiceAvailabilityTimeSlotRequest, GetMultiServiceAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotEndOptions, ListAvailabilityTimeSlotEndOptionsApplicationErrors, ListAvailabilityTimeSlotEndOptionsRequest, ListAvailabilityTimeSlotEndOptionsResponse, ListAvailabilityTimeSlotsRequest, ListEventTimeSlotsRequest, ListEventTimeSlotsResponse, ListMultiServiceAvailabilityTimeSlotsRequest, ListMultiServiceAvailabilityTimeSlotsResponse, LocationType, LocationTypeWithLiterals, NestedTimeSlot, NonBookableReasons, ReasonCode, ReasonCodeWithLiterals, ResolvedContext, Resource, ResourceType, Service, SuggestedAction, SuggestedActionWithLiterals, TimeSlot, V2CustomerChoices, WaitingList } from './index.typings.js';
2
+ import { ListAvailabilityTimeSlotsOptions, ListAvailabilityTimeSlotsResponse, ListAvailabilityTimeSlotsApplicationErrors, ListAvailabilityTimeSlotEndOptions, ListAvailabilityTimeSlotEndOptionsResponse, ListAvailabilityTimeSlotEndOptionsApplicationErrors, Location, GetAvailabilityTimeSlotOptions, GetAvailabilityTimeSlotResponse, GetAvailabilityTimeSlotApplicationErrors } from './index.typings.js';
3
+ export { AvailableResources, BookingPolicyViolations, CursorPaging, CursorPagingMetadata, Cursors, CustomerChoices, DiagnoseAvailabilityRequest, DiagnoseAvailabilityResponse, DiagnosisReason, EventInfo, GetAvailabilityTimeSlotRequest, GetAvailabilityTimeSlotRequestCustomerChoices, GetEventTimeSlotRequest, GetEventTimeSlotResponse, GetMultiServiceAvailabilityTimeSlotRequest, GetMultiServiceAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotEndOptionsRequest, ListAvailabilityTimeSlotsRequest, ListEventTimeSlotsRequest, ListEventTimeSlotsResponse, ListMultiServiceAvailabilityTimeSlotsRequest, ListMultiServiceAvailabilityTimeSlotsResponse, LocationType, LocationTypeWithLiterals, NestedTimeSlot, NonBookableReasons, ReasonCode, ReasonCodeWithLiterals, ResolvedContext, Resource, ResourceType, Service, SuggestedAction, SuggestedActionWithLiterals, TimeSlot, V2CustomerChoices, WaitingList } from './index.typings.js';
4
4
 
5
5
  declare function listAvailabilityTimeSlots$1(httpClient: HttpClient): ListAvailabilityTimeSlotsSignature;
6
6
  interface ListAvailabilityTimeSlotsSignature {
@@ -55,6 +55,8 @@ interface ListAvailabilityTimeSlotsSignature {
55
55
  *
56
56
  * Use `customerChoices` to calculate availability based on the customer's selected service duration or add-ons.
57
57
  *
58
+ * `customerChoices` is not supported for services configured with a duration range (`availabilityConstraints.durationRange`). For these services, availability is calculated based on the duration range configuration.
59
+ *
58
60
  * When using [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction), we recommend passing only `addOnIds` in `customerChoices` 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.
59
61
  *
60
62
  * ### Business hours exception
@@ -72,6 +74,36 @@ interface ListAvailabilityTimeSlotsSignature {
72
74
  __applicationErrorsType?: ListAvailabilityTimeSlotsApplicationErrors;
73
75
  }>;
74
76
  }
77
+ declare function listAvailabilityTimeSlotEndOptions$1(httpClient: HttpClient): ListAvailabilityTimeSlotEndOptionsSignature;
78
+ interface ListAvailabilityTimeSlotEndOptionsSignature {
79
+ /**
80
+ * Retrieves the available end times for a selected start time of an appointment-based service configured with a duration range.
81
+ *
82
+ *
83
+ * Call this after the customer selects a start time with [List Availability Time Slots](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/list-availability-time-slots). Each returned entry is a `TimeSlot` that shares the requested `localStartDate` and differs only in `localEndDate`. The response doesn't include resource lists.
84
+ *
85
+ * Only supported for hourly duration-range services (services with `availabilityConstraints.durationRange.hourConfig` configured in [Services V2](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction)). Calling this for a fixed-duration or daily duration-range service returns `END_OPTIONS_NOT_SUPPORTED`.
86
+ *
87
+ * ### Resource selection
88
+ *
89
+ * Resource selection depends on the booking flow:
90
+ * - If the customer hasn't selected a resource yet, call [Get Availability Time Slot](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/get-availability-time-slot) with the selected `localEndDate` to retrieve candidate resources before booking.
91
+ * - If the customer selected a resource before the end time, pass that resource in `resourceTypes` so the response only includes end times that the selected resource can cover.
92
+ *
93
+ * ### Time slot shape
94
+ *
95
+ * The response uses the `TimeSlot` model with constrained semantics:
96
+ * - `localStartDate` and `location` are identical on every entry, echoing the request.
97
+ * - `localEndDate` varies across entries and represents each end option.
98
+ * - `availableResources` is always empty. Use [Get Availability Time Slot](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/get-availability-time-slot) to retrieve resources for a selected end time.
99
+ * - `eventInfo`, `nestedTimeSlots`, and `allDay` are not populated.
100
+ * - `totalCapacity` is always `1`.
101
+ * @param - [Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction) ID. Must be an appointment-based service configured with `availabilityConstraints.durationRange.hourConfig`.
102
+ */
103
+ (serviceId: string, options?: NonNullablePaths<ListAvailabilityTimeSlotEndOptions, `localStartDate` | `location`, 2>): Promise<NonNullablePaths<ListAvailabilityTimeSlotEndOptionsResponse, `endOptions` | `endOptions.${number}.location.locationType`, 5> & {
104
+ __applicationErrorsType?: ListAvailabilityTimeSlotEndOptionsApplicationErrors;
105
+ }>;
106
+ }
75
107
  declare function getAvailabilityTimeSlot$1(httpClient: HttpClient): GetAvailabilityTimeSlotSignature;
76
108
  interface GetAvailabilityTimeSlotSignature {
77
109
  /**
@@ -85,7 +117,7 @@ interface GetAvailabilityTimeSlotSignature {
85
117
  * Get Availability Time Slot uses the following defaults:
86
118
  *
87
119
  * - Returns all available resources unless filtered by `resourceIds` or `includeResourceTypeIds`.
88
- * - Includes full booking status and capacity details
120
+ * - Includes full booking status and capacity details.
89
121
  *
90
122
  * ### Service type limitations
91
123
  *
@@ -95,6 +127,10 @@ interface GetAvailabilityTimeSlotSignature {
95
127
  *
96
128
  * To retrieve course availability, you can follow the [End-to-End Booking Flow for courses](https://dev.wix.com/docs/api-reference/business-solutions/bookings/end-to-end-booking-flows#book-a-course).
97
129
  *
130
+ * ### Duration-range services
131
+ *
132
+ * For services configured with a duration range (`availabilityConstraints.durationRange`), `customerChoices` is not supported. The duration is derived from the `localStartDate` and `localEndDate` specified in the request.
133
+ *
98
134
  * ### Business hours exception
99
135
  *
100
136
  * Wix Bookings disregards business opening hours when all of the following conditions are met:
@@ -126,6 +162,7 @@ interface GetAvailabilityTimeSlotSignature {
126
162
  }
127
163
 
128
164
  declare const listAvailabilityTimeSlots: MaybeContext<BuildRESTFunction<typeof listAvailabilityTimeSlots$1> & typeof listAvailabilityTimeSlots$1>;
165
+ declare const listAvailabilityTimeSlotEndOptions: MaybeContext<BuildRESTFunction<typeof listAvailabilityTimeSlotEndOptions$1> & typeof listAvailabilityTimeSlotEndOptions$1>;
129
166
  declare const getAvailabilityTimeSlot: MaybeContext<BuildRESTFunction<typeof getAvailabilityTimeSlot$1> & typeof getAvailabilityTimeSlot$1>;
130
167
 
131
- export { GetAvailabilityTimeSlotApplicationErrors, GetAvailabilityTimeSlotOptions, GetAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotsApplicationErrors, ListAvailabilityTimeSlotsOptions, ListAvailabilityTimeSlotsResponse, Location, getAvailabilityTimeSlot, listAvailabilityTimeSlots };
168
+ export { GetAvailabilityTimeSlotApplicationErrors, GetAvailabilityTimeSlotOptions, GetAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotEndOptions, ListAvailabilityTimeSlotEndOptionsApplicationErrors, ListAvailabilityTimeSlotEndOptionsResponse, ListAvailabilityTimeSlotsApplicationErrors, ListAvailabilityTimeSlotsOptions, ListAvailabilityTimeSlotsResponse, Location, getAvailabilityTimeSlot, listAvailabilityTimeSlotEndOptions, listAvailabilityTimeSlots };