@wix/auto_sdk_bookings_availability-time-slots 1.0.252 → 1.0.253

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 +77 -57
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +18 -32
  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 +77 -57
  13. package/build/es/index.typings.mjs.map +1 -1
  14. package/build/es/meta.d.mts +18 -32
  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 +59 -75
  22. package/build/internal/cjs/index.typings.js.map +1 -1
  23. package/build/internal/cjs/meta.d.ts +18 -32
  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 +59 -75
  31. package/build/internal/es/index.typings.mjs.map +1 -1
  32. package/build/internal/es/meta.d.mts +18 -32
  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
@@ -115,7 +115,6 @@ interface TimeSlot {
115
115
  scheduleId?: string | null;
116
116
  /**
117
117
  * Whether this time slot spans one or more full days.
118
- * Populated only for class- and course-based services. Not populated for appointment-based services.
119
118
  * When `true`, `localStartDate` is `00:00:00` of the first day and `localEndDate` is `00:00:00` of the day after the last day (exclusive).
120
119
  * Midnight boundaries are interpreted in the event's `timeZone`.
121
120
  * The time component should be ignored for display purposes.
@@ -739,6 +738,8 @@ interface ListAvailabilityTimeSlotsRequest {
739
738
  * Selected customer choices for service configuration.
740
739
  * If not specified, uses the service's default configuration.
741
740
  *
741
+ * Not supported for services configured with a duration range (`availabilityConstraints.durationRange`).
742
+ *
742
743
  * 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
  */
744
745
  customerChoices?: CustomerChoices;
@@ -796,52 +797,39 @@ interface ListAvailabilityTimeSlotsResponse {
796
797
  }
797
798
  interface ListAvailabilityTimeSlotEndOptionsRequest {
798
799
  /**
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.
800
+ * [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`.
804
801
  * @format GUID
805
802
  */
806
803
  serviceId: string;
807
804
  /**
808
- * The picked start time. Each returned end option pairs with this start.
805
+ * Selected start time in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-03-23T10:00:00`.
806
+ * Each returned end option shares this start time.
809
807
  * @format LOCAL_DATE_TIME
810
808
  */
811
809
  localStartDate: string;
812
810
  /**
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.
811
+ * Latest end time to include in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-03-23T14:00:00`.
812
+ * The service's maximum duration always caps the result, even if a later value is specified.
813
+ *
814
+ * Default: `localStartDate` plus the service's maximum duration from `durationRange.hourConfig`.
817
815
  * @format LOCAL_DATE_TIME
818
816
  */
819
817
  maxLocalEndDate?: string | null;
820
818
  /**
821
- * IANA time zone. Default: site `timeZone` property.
819
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York` or `UTC`.
820
+ *
821
+ * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
822
822
  * @minLength 1
823
823
  * @maxLength 150
824
824
  */
825
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
- */
826
+ /** Location of the selected start time. Must match the location of the slot returned by [List Availability Time Slots](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/list-availability-time-slots). */
831
827
  location: Location;
832
828
  /**
833
829
  * 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`.
830
+ * When the customer has already selected a resource before choosing an end time, pass that resource here so the response only includes end times the selected resource can cover.
831
+ *
832
+ * If no resource has been preselected, omit this field. End options then reflect the full resource pool. Select the resource later by calling [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 chosen `localEndDate`.
845
833
  * @maxSize 3
846
834
  */
847
835
  resourceTypes?: ResourceType[];
@@ -849,14 +837,12 @@ interface ListAvailabilityTimeSlotEndOptionsRequest {
849
837
  interface ListAvailabilityTimeSlotEndOptionsResponse {
850
838
  /**
851
839
  * 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.
840
+ * Each entry is a `TimeSlot` sharing `localStartDate` with the request and varying only in `localEndDate`.
841
+ * Sorted by `localEndDate` in ascending order (shortest duration first).
856
842
  * @maxSize 1000
857
843
  */
858
844
  endOptions?: TimeSlot[];
859
- /** IANA time zone, echoed from the request or resolved from the site default. */
845
+ /** Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York` or `UTC`. */
860
846
  timeZone?: string | null;
861
847
  }
862
848
  interface GetAvailabilityTimeSlotRequest {
@@ -1209,6 +1195,8 @@ type GetAvailabilityTimeSlotApplicationErrors = {
1209
1195
  *
1210
1196
  * Use `customerChoices` to calculate availability based on the customer's selected service duration or add-ons.
1211
1197
  *
1198
+ * `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.
1199
+ *
1212
1200
  * 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.
1213
1201
  *
1214
1202
  * ### Business hours exception
@@ -1305,6 +1293,8 @@ interface ListAvailabilityTimeSlotsOptions {
1305
1293
  * Selected customer choices for service configuration.
1306
1294
  * If not specified, uses the service's default configuration.
1307
1295
  *
1296
+ * Not supported for services configured with a duration range (`availabilityConstraints.durationRange`).
1297
+ *
1308
1298
  * 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.
1309
1299
  */
1310
1300
  customerChoices?: CustomerChoices;
@@ -1316,45 +1306,71 @@ interface ListAvailabilityTimeSlotsOptions {
1316
1306
  */
1317
1307
  resourceTypes?: ResourceType[];
1318
1308
  }
1309
+ /**
1310
+ * Retrieves the available end times for a selected start time of an appointment-based service configured with a duration range.
1311
+ *
1312
+ *
1313
+ * 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.
1314
+ *
1315
+ * 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`.
1316
+ *
1317
+ * ### Resource selection
1318
+ *
1319
+ * Resource selection depends on the booking flow:
1320
+ * - 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.
1321
+ * - 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.
1322
+ *
1323
+ * ### Time slot shape
1324
+ *
1325
+ * The response uses the `TimeSlot` model with constrained semantics:
1326
+ * - `localStartDate` and `location` are identical on every entry, echoing the request.
1327
+ * - `localEndDate` varies across entries and represents each end option.
1328
+ * - `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.
1329
+ * - `eventInfo`, `nestedTimeSlots`, and `allDay` are not populated.
1330
+ * - `totalCapacity` is always `1`.
1331
+ * @param serviceId - [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`.
1332
+ * @public
1333
+ * @documentationMaturity preview
1334
+ * @requiredField options.localStartDate
1335
+ * @requiredField options.location
1336
+ * @requiredField serviceId
1337
+ * @permissionId BOOKINGS.AVAILABILITY_READ_TIME_SLOTS
1338
+ * @applicableIdentity APP
1339
+ * @fqn com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.ListAvailabilityTimeSlotEndOptions
1340
+ */
1341
+ declare function listAvailabilityTimeSlotEndOptions(serviceId: string, options?: NonNullablePaths<ListAvailabilityTimeSlotEndOptions, `localStartDate` | `location`, 2>): Promise<NonNullablePaths<ListAvailabilityTimeSlotEndOptionsResponse, `endOptions` | `endOptions.${number}.location.locationType`, 5> & {
1342
+ __applicationErrorsType?: ListAvailabilityTimeSlotEndOptionsApplicationErrors;
1343
+ }>;
1319
1344
  interface ListAvailabilityTimeSlotEndOptions {
1320
1345
  /**
1321
- * The picked start time. Each returned end option pairs with this start.
1346
+ * Selected start time in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-03-23T10:00:00`.
1347
+ * Each returned end option shares this start time.
1322
1348
  * @format LOCAL_DATE_TIME
1323
1349
  */
1324
1350
  localStartDate: string;
1325
1351
  /**
1326
- * Latest end time to include. Default: `localStartDate + maxDurationInMinutes`
1327
- * from the service's `durationRange.hourConfig` (read from Services V2).
1328
- * A tighter value is honored; `maxDurationInMinutes` always bounds the
1329
- * result.
1352
+ * Latest end time to include in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2026-03-23T14:00:00`.
1353
+ * The service's maximum duration always caps the result, even if a later value is specified.
1354
+ *
1355
+ * Default: `localStartDate` plus the service's maximum duration from `durationRange.hourConfig`.
1330
1356
  * @format LOCAL_DATE_TIME
1331
1357
  */
1332
1358
  maxLocalEndDate?: string | null;
1333
1359
  /**
1334
- * IANA time zone. Default: site `timeZone` property.
1360
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York` or `UTC`.
1361
+ *
1362
+ * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
1335
1363
  * @minLength 1
1336
1364
  * @maxLength 150
1337
1365
  */
1338
1366
  timeZone?: string | null;
1339
- /**
1340
- * Location of the picked start. Required; must match the location of the
1341
- * `localStartDate` slot returned by `ListAvailabilityTimeSlots`. The handler
1342
- * validates that end options reachable from this start at this location.
1343
- */
1367
+ /** Location of the selected start time. Must match the location of the slot returned by [List Availability Time Slots](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/list-availability-time-slots). */
1344
1368
  location: Location;
1345
1369
  /**
1346
1370
  * Resource types to constrain the end options.
1347
- * When the customer has already picked a resource before the end time
1348
- * (e.g. flows that select a resource first, then start, then end), pass the
1349
- * selected resource here so the response surfaces only ends that the
1350
- * chosen resource can actually cover. Without this filter, the response
1351
- * reflects the resource pool — ends valid for the pool but not for a
1352
- * preselected resource would still be returned, and booking would fail
1353
- * later.
1354
- *
1355
- * Omit when no resource has been preselected. In that case, end options
1356
- * reflect any resource in the pool; pick the resource later via
1357
- * `GetAvailabilityTimeSlot` with the chosen `localEndDate`.
1371
+ * When the customer has already selected a resource before choosing an end time, pass that resource here so the response only includes end times the selected resource can cover.
1372
+ *
1373
+ * If no resource has been preselected, omit this field. End options then reflect the full resource pool. Select the resource later by calling [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 chosen `localEndDate`.
1358
1374
  * @maxSize 3
1359
1375
  */
1360
1376
  resourceTypes?: ResourceType[];
@@ -1370,7 +1386,7 @@ interface ListAvailabilityTimeSlotEndOptions {
1370
1386
  * Get Availability Time Slot uses the following defaults:
1371
1387
  *
1372
1388
  * - Returns all available resources unless filtered by `resourceIds` or `includeResourceTypeIds`.
1373
- * - Includes full booking status and capacity details
1389
+ * - Includes full booking status and capacity details.
1374
1390
  *
1375
1391
  * ### Service type limitations
1376
1392
  *
@@ -1380,6 +1396,10 @@ interface ListAvailabilityTimeSlotEndOptions {
1380
1396
  *
1381
1397
  * 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).
1382
1398
  *
1399
+ * ### Duration-range services
1400
+ *
1401
+ * 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.
1402
+ *
1383
1403
  * ### Business hours exception
1384
1404
  *
1385
1405
  * Wix Bookings disregards business opening hours when all of the following conditions are met:
@@ -1433,4 +1453,4 @@ interface GetAvailabilityTimeSlotOptions {
1433
1453
  resourceTypes?: ResourceType[];
1434
1454
  }
1435
1455
 
1436
- 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 };
1456
+ 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, listAvailabilityTimeSlotEndOptions, listAvailabilityTimeSlots };