@wix/headless-bookings 1.0.7 → 1.0.9

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 (33) hide show
  1. package/cjs/dist/__mocks__/booking/booking-client-service.js +1 -0
  2. package/cjs/dist/services/booking/book-action/bookAction.js +9 -14
  3. package/cjs/dist/services/booking/book-action/buildBookingRequest.js +0 -2
  4. package/cjs/dist/services/booking/book-action/buildCartRequest.d.ts +7 -18
  5. package/cjs/dist/services/booking/book-action/buildCartRequest.js +0 -7
  6. package/cjs/dist/services/booking/book-action/buildDayRangeBookingRequest.d.ts +8 -3
  7. package/cjs/dist/services/booking/book-action/buildDayRangeBookingRequest.js +12 -9
  8. package/cjs/dist/services/booking/book-action/createBookingsForCart.d.ts +4 -3
  9. package/cjs/dist/services/booking/book-action/createBookingsForCart.js +10 -15
  10. package/cjs/dist/services/booking/book-action/dayRange.d.ts +2 -1
  11. package/cjs/dist/services/booking/book-action/dayRange.js +2 -1
  12. package/cjs/dist/services/booking/book-action/types.d.ts +7 -0
  13. package/cjs/dist/services/booking/booking.d.ts +8 -1
  14. package/cjs/dist/services/booking/booking.js +11 -0
  15. package/cjs/dist/services/index.d.ts +1 -1
  16. package/cjs/dist/services/index.js +1 -2
  17. package/dist/__mocks__/booking/booking-client-service.js +1 -0
  18. package/dist/services/booking/book-action/bookAction.js +10 -15
  19. package/dist/services/booking/book-action/buildBookingRequest.js +0 -2
  20. package/dist/services/booking/book-action/buildCartRequest.d.ts +7 -18
  21. package/dist/services/booking/book-action/buildCartRequest.js +0 -6
  22. package/dist/services/booking/book-action/buildDayRangeBookingRequest.d.ts +8 -3
  23. package/dist/services/booking/book-action/buildDayRangeBookingRequest.js +12 -9
  24. package/dist/services/booking/book-action/createBookingsForCart.d.ts +4 -3
  25. package/dist/services/booking/book-action/createBookingsForCart.js +8 -13
  26. package/dist/services/booking/book-action/dayRange.d.ts +2 -1
  27. package/dist/services/booking/book-action/dayRange.js +2 -1
  28. package/dist/services/booking/book-action/types.d.ts +7 -0
  29. package/dist/services/booking/booking.d.ts +8 -1
  30. package/dist/services/booking/booking.js +11 -0
  31. package/dist/services/index.d.ts +1 -1
  32. package/dist/services/index.js +1 -1
  33. package/package.json +3 -2
@@ -56,6 +56,7 @@ function createMockBookingService(config = {}) {
56
56
  setFormSubmission: vitest_1.vi.fn(),
57
57
  clearFormSubmission: vitest_1.vi.fn(),
58
58
  setSelectedPaymentOption: vitest_1.vi.fn(),
59
+ setAllDay: vitest_1.vi.fn(),
59
60
  clearAll: vitest_1.vi.fn(),
60
61
  book: vitest_1.vi.fn(),
61
62
  },
@@ -17,7 +17,7 @@ async function executeBookAction(params) {
17
17
  })) {
18
18
  throw new Error('Cannot book: missing required data');
19
19
  }
20
- // Step 1: Create booking(s). The helper picks single vs bulk vs
20
+ // Step 1: Create booking(s). The helper picks single vs
21
21
  // multi-service (DAY-range routing) and returns a uniform
22
22
  // { bookingIds, contactDetails } shape.
23
23
  const { bookingIds, contactDetails } = await (0, createBookingsForCart_js_1.createBookingsForCart)(params);
@@ -38,19 +38,14 @@ async function executeBookAction(params) {
38
38
  // it from the service's first configured location.
39
39
  firstSelection.service.locations?.[0]?._id
40
40
  : firstSelection.timeSlot?.location?._id;
41
- const cartRequest = isDayRange
42
- ? (0, buildCartRequest_js_1.buildDayRangeCartRequest)({
43
- bookingIds,
44
- contactDetails,
45
- businessLocationId,
46
- appId: params.appId,
47
- })
48
- : (0, buildCartRequest_js_1.buildCartRequest)({
49
- bookingId: bookingIds[0],
50
- contactDetails,
51
- businessLocationId,
52
- appId: params.appId,
53
- });
41
+ // One cart item per booking ID. Single-day and allDay ranges produce one
42
+ // booking ID; DAY-range expansion produces one per day.
43
+ const cartRequest = (0, buildCartRequest_js_1.buildCartRequest)({
44
+ bookingIds,
45
+ contactDetails,
46
+ businessLocationId,
47
+ appId: params.appId,
48
+ });
54
49
  const cart = await (0, index_js_1.createCart)(cartRequest);
55
50
  if (!cart._id) {
56
51
  throw new Error('Failed to create cart');
@@ -110,8 +110,6 @@ function mapTimeSlotLocationTypeToBookingLocationType(slotLocationType) {
110
110
  return auto_sdk_bookings_bookings_1.LocationType.CUSTOM;
111
111
  case auto_sdk_bookings_availability_time_slots_1.LocationType.CUSTOM:
112
112
  return auto_sdk_bookings_bookings_1.LocationType.OWNER_CUSTOM;
113
- case auto_sdk_bookings_availability_time_slots_1.LocationType.UNKNOWN_LOCATION_TYPE:
114
- return auto_sdk_bookings_bookings_1.LocationType.UNDEFINED;
115
113
  default:
116
114
  return auto_sdk_bookings_bookings_1.LocationType.OWNER_BUSINESS;
117
115
  }
@@ -1,23 +1,12 @@
1
1
  import { type CreateCartOptions } from '../../../api/create-cart/index.js';
2
2
  import type { ContactDetails } from '@wix/auto_sdk_bookings_bookings';
3
3
  export interface BuildCartParams {
4
- bookingId: string;
5
- contactDetails?: ContactDetails;
6
- /** `null` accepted so callers can forward SDK fields typed `string | null`. */
7
- businessLocationId?: string | null;
8
- /** Optional app ID override for the catalog reference. Defaults to BOOKING_APP_ID. */
9
- appId?: string;
10
- }
11
- export declare function buildCartRequest(params: BuildCartParams): CreateCartOptions;
12
- /**
13
- * DAY-range variant of `buildCartRequest`. Takes the N booking IDs returned
14
- * by `bulkCreateBooking` (1 slot) or `createMultiServiceBooking` (2-8 slots)
15
- * and emits one catalog item per ID. Per SDK guidance, never use
16
- * `multiServiceBooking._id` here; always feed the per-day single-service
17
- * booking IDs into the cart.
18
- */
19
- export interface BuildDayRangeCartParams {
20
- /** One catalog item per booking id. Bulk / multi-service responses produce N>=1 ids. */
4
+ /**
5
+ * One catalog item is emitted per booking id. Single-service and allDay
6
+ * bookings produce one id; DAY-range expansion produces one per day. Per SDK
7
+ * guidance, never use `multiServiceBooking._id` here; always feed the
8
+ * per-day single-service booking IDs into the cart.
9
+ */
21
10
  bookingIds: string[];
22
11
  contactDetails?: ContactDetails;
23
12
  /** `null` accepted so callers can forward SDK fields typed `string | null`. */
@@ -25,4 +14,4 @@ export interface BuildDayRangeCartParams {
25
14
  /** Optional app ID override for the catalog reference. Defaults to BOOKING_APP_ID. */
26
15
  appId?: string;
27
16
  }
28
- export declare function buildDayRangeCartRequest(params: BuildDayRangeCartParams): CreateCartOptions;
17
+ export declare function buildCartRequest(params: BuildCartParams): CreateCartOptions;
@@ -1,16 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildCartRequest = buildCartRequest;
4
- exports.buildDayRangeCartRequest = buildDayRangeCartRequest;
5
4
  const index_js_1 = require("../../../api/create-cart/index.js");
6
5
  const constants_js_1 = require("../../constants.js");
7
6
  function buildCartRequest(params) {
8
- return {
9
- catalogItems: [buildCatalogItem(params.bookingId, params.appId)],
10
- cart: buildCartShape(params),
11
- };
12
- }
13
- function buildDayRangeCartRequest(params) {
14
7
  return {
15
8
  catalogItems: params.bookingIds.map((id) => buildCatalogItem(id, params.appId)),
16
9
  cart: buildCartShape(params),
@@ -6,9 +6,12 @@
6
6
  * and the picker emits one slot per day in `rangeTimeSlots`. The client just
7
7
  * packages them as one Booking each. Routing is decided by `bookings.length`
8
8
  * in `createBookingsForCart`:
9
- * - length 1 -> `bulkCreateBooking`
9
+ * - length 1 -> `createBooking`
10
10
  * - length 2-8 -> `createMultiServiceBooking`
11
11
  *
12
+ * With `allDay`, the picked slots collapse into one Booking spanning the full
13
+ * range, so that case routes through `createBooking`.
14
+ *
12
15
  * The 8-day cap is enforced server-side; the builder does not gate on it.
13
16
  */
14
17
  import type { Booking, ParticipantNotification } from '@wix/auto_sdk_bookings_bookings';
@@ -16,8 +19,10 @@ import type { FormValues } from '@wix/forms/components';
16
19
  import type { BookActionParams } from './types.js';
17
20
  export interface BuildDayRangeBookingRequest {
18
21
  /**
19
- * One Booking per picked per-day slot. Length 1 routes to bulkCreateBooking,
20
- * length >=2 routes to createMultiServiceBooking.
22
+ * The Bookings to create. With `allDay`, this is a single Booking spanning
23
+ * the whole range. Otherwise it is one Booking per picked per-day slot:
24
+ * length 1 routes to createBooking, length >=2 routes to
25
+ * createMultiServiceBooking.
21
26
  */
22
27
  bookings: Booking[];
23
28
  /** Notification settings forwarded to the server. */
@@ -7,9 +7,12 @@
7
7
  * and the picker emits one slot per day in `rangeTimeSlots`. The client just
8
8
  * packages them as one Booking each. Routing is decided by `bookings.length`
9
9
  * in `createBookingsForCart`:
10
- * - length 1 -> `bulkCreateBooking`
10
+ * - length 1 -> `createBooking`
11
11
  * - length 2-8 -> `createMultiServiceBooking`
12
12
  *
13
+ * With `allDay`, the picked slots collapse into one Booking spanning the full
14
+ * range, so that case routes through `createBooking`.
15
+ *
13
16
  * The 8-day cap is enforced server-side; the builder does not gate on it.
14
17
  */
15
18
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -47,21 +50,21 @@ function buildDayRangeBookingRequest(params) {
47
50
  ...params,
48
51
  serviceSelections: [baseSelection, ...params.serviceSelections.slice(1)],
49
52
  });
50
- const bookings = slots.map((slot) => ({
53
+ // Clone the base Booking, overriding only the slot start/end.
54
+ const buildBooking = (startDate, endDate) => ({
51
55
  ...baseRequest.booking,
52
56
  bookedEntity: {
53
57
  ...baseRequest.booking.bookedEntity,
54
58
  slot: {
55
59
  ...baseRequest.booking.bookedEntity?.slot,
56
- startDate: slot.startDate,
57
- endDate: slot.endDate,
60
+ startDate,
61
+ endDate,
58
62
  },
59
63
  },
60
- }));
61
- // TODO(createAsOneBooking): when the server flag lands, this builder should
62
- // optionally collapse all slots into a single Booking spanning
63
- // `slots[0].startDate -> slots[N-1].endDate` with `fullDay: true`, and
64
- // routing should use plain `createBooking` (not bulk / multi-service).
64
+ });
65
+ const bookings = params.allDay
66
+ ? [buildBooking(slots[0].startDate, slots[slots.length - 1].endDate)]
67
+ : slots.map((slot) => buildBooking(slot.startDate, slot.endDate));
65
68
  return {
66
69
  bookings,
67
70
  participantNotification: baseRequest.participantNotification,
@@ -2,9 +2,10 @@
2
2
  * Creates the booking(s) needed for cart construction.
3
3
  *
4
4
  * Branches on the service selection:
5
- * - DAY-range path with 1 picked slot -> `bulkCreateBooking`
6
- * - DAY-range path with 2..8 picked slots -> `createMultiServiceBooking`
7
- * - default path -> `createBooking`
5
+ * - DAY-range path with 1 picked day -> `createBooking`
6
+ * - DAY-range path with `allDay` -> `createBooking` (one combined Booking)
7
+ * - DAY-range path with 2..8 picked days -> `createMultiServiceBooking`
8
+ * - default path -> `createBooking`
8
9
  *
9
10
  * All branches return the same shape so `executeBookAction` can stay
10
11
  * branchless from cart-creation onwards. Cart construction reads each
@@ -3,9 +3,10 @@
3
3
  * Creates the booking(s) needed for cart construction.
4
4
  *
5
5
  * Branches on the service selection:
6
- * - DAY-range path with 1 picked slot -> `bulkCreateBooking`
7
- * - DAY-range path with 2..8 picked slots -> `createMultiServiceBooking`
8
- * - default path -> `createBooking`
6
+ * - DAY-range path with 1 picked day -> `createBooking`
7
+ * - DAY-range path with `allDay` -> `createBooking` (one combined Booking)
8
+ * - DAY-range path with 2..8 picked days -> `createMultiServiceBooking`
9
+ * - default path -> `createBooking`
9
10
  *
10
11
  * All branches return the same shape so `executeBookAction` can stay
11
12
  * branchless from cart-creation onwards. Cart construction reads each
@@ -15,8 +16,7 @@
15
16
  Object.defineProperty(exports, "__esModule", { value: true });
16
17
  exports.createBookingsForCart = createBookingsForCart;
17
18
  const index_js_1 = require("../../../api/create-booking/index.js");
18
- const index_js_2 = require("../../../api/create-bulk-booking/index.js");
19
- const index_js_3 = require("../../../api/create-multi-service-booking/index.js");
19
+ const index_js_2 = require("../../../api/create-multi-service-booking/index.js");
20
20
  const buildBookingRequest_js_1 = require("./buildBookingRequest.js");
21
21
  const buildDayRangeBookingRequest_js_1 = require("./buildDayRangeBookingRequest.js");
22
22
  const dayRange_js_1 = require("./dayRange.js");
@@ -27,24 +27,19 @@ async function createBookingsForCart(params) {
27
27
  }
28
28
  if ((0, dayRange_js_1.isDayRangeService)(firstSelection.service)) {
29
29
  const req = (0, buildDayRangeBookingRequest_js_1.buildDayRangeBookingRequest)(params);
30
- // TODO(createAsOneBooking): when the server flag lands, branch here:
31
- // if (createAsOneBooking) -> createBooking({ ...wideRange, fullDay: true })
32
- // collapsing all slots into one combined Booking. Until then, we always
33
- // use one Booking per picked slot.
34
30
  if (req.bookings.length === 1) {
35
- const response = await (0, index_js_2.bulkCreateBooking)([{ booking: req.bookings[0] }], {
31
+ const bookingResponse = await (0, index_js_1.createBooking)(req.bookings[0], {
36
32
  participantNotification: req.participantNotification,
37
33
  sendSmsReminder: req.sendSmsReminder,
38
34
  formSubmission: req.formSubmission,
39
35
  });
40
- const results = response.results ?? [];
36
+ const bookingId = bookingResponse.booking?._id;
41
37
  return {
42
- bookingIds: results.map((r) => r.item?._id).filter(Boolean),
43
- // All N daily bookings share the same customer; read from the first.
44
- contactDetails: results[0]?.item?.contactDetails,
38
+ bookingIds: bookingId ? [bookingId] : [],
39
+ contactDetails: bookingResponse.booking?.contactDetails,
45
40
  };
46
41
  }
47
- const response = await (0, index_js_3.createMultiServiceBooking)(req.bookings, {
42
+ const response = await (0, index_js_2.createMultiServiceBooking)(req.bookings, {
48
43
  participantNotification: req.participantNotification,
49
44
  sendSmsReminder: req.sendSmsReminder,
50
45
  formSubmission: req.formSubmission,
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * APPOINTMENT services whose schedule has a `durationRange` with
5
5
  * `unitType === DAY` route through the per-day slot path:
6
- * - 1 picked slot -> `bulkCreateBooking`
6
+ * - 1 picked slot -> `createBooking`
7
7
  * - 2..8 picked slots -> `createMultiServiceBooking`
8
+ * - 2..8 picked slots with `allDay` -> `createBooking`
8
9
  *
9
10
  * CLASS/COURSE selections and HOUR-range / fixed-duration APPOINTMENT
10
11
  * selections keep using the existing `createBooking` path.
@@ -4,8 +4,9 @@
4
4
  *
5
5
  * APPOINTMENT services whose schedule has a `durationRange` with
6
6
  * `unitType === DAY` route through the per-day slot path:
7
- * - 1 picked slot -> `bulkCreateBooking`
7
+ * - 1 picked slot -> `createBooking`
8
8
  * - 2..8 picked slots -> `createMultiServiceBooking`
9
+ * - 2..8 picked slots with `allDay` -> `createBooking`
9
10
  *
10
11
  * CLASS/COURSE selections and HOUR-range / fixed-duration APPOINTMENT
11
12
  * selections keep using the existing `createBooking` path.
@@ -53,6 +53,13 @@ export interface BookActionParams {
53
53
  * service. When omitted, the existing service-config heuristic applies.
54
54
  */
55
55
  selectedPaymentOption?: SelectedPaymentOption;
56
+ /**
57
+ * DAY-range only. When `true`, the picked per-day slots are collapsed into a
58
+ * single Booking spanning the whole range (`firstSlot.startDate ->
59
+ * lastSlot.endDate`) and created via plain `createBooking`. Ignored for
60
+ * non-DAY-range services.
61
+ */
62
+ allDay?: boolean;
56
63
  }
57
64
  /**
58
65
  * Props passed to children of Book component
@@ -48,8 +48,9 @@ export interface ServiceSelection {
48
48
  * picker after the customer picks a start + end date: one entry per day
49
49
  * in the picked range. When set, supersedes `timeSlot` for the DAY-range
50
50
  * builder, which produces one Booking per entry and routes via length:
51
- * - 1 -> bulkCreateBooking
51
+ * - 1 -> createBooking
52
52
  * - 2-8 -> createMultiServiceBooking
53
+ * - 2-8 with allDay -> createBooking
53
54
  * Optional & additive: existing single-slot callers stay on `timeSlot`.
54
55
  */
55
56
  rangeTimeSlots?: ServiceSelectionTimeSlot[];
@@ -88,6 +89,12 @@ export interface BookingServiceActions {
88
89
  * is cleared and the heuristic applies again.
89
90
  */
90
91
  setSelectedPaymentOption(value: SelectedPaymentOption | null): void;
92
+ /**
93
+ * Toggle the DAY-range `allDay` flag. When `true`, `book()` collapses the
94
+ * picked per-day slots into one range-spanning Booking created via
95
+ * `createBooking`. Ignored for non-DAY-range services.
96
+ */
97
+ setAllDay(value: boolean): void;
91
98
  clearAll(): void;
92
99
  book(): Promise<BookResult>;
93
100
  }
@@ -74,6 +74,10 @@ exports.BookingService = services_definitions_1.implementService.withConfig()(ex
74
74
  const timezoneSignal = signalsService.signal(config.timezone ?? getClientTimezone());
75
75
  const formSubmissionSignal = signalsService.signal(config.formSubmission || null);
76
76
  const selectedPaymentOptionSignal = signalsService.signal(config.selectedPaymentOption);
77
+ // Internal-only signal: set via `setAllDay`, read by `book()`. Not
78
+ // exposed on the service surface — consumers derive and push the value
79
+ // (e.g. from the picker's selection mode), so there's no read-back.
80
+ const allDaySignal = signalsService.signal(false);
77
81
  // ========================================================================
78
82
  // Helpers
79
83
  // ========================================================================
@@ -172,11 +176,16 @@ exports.BookingService = services_definitions_1.implementService.withConfig()(ex
172
176
  setSelectedPaymentOption(value) {
173
177
  selectedPaymentOptionSignal.set(value ?? undefined);
174
178
  },
179
+ // All-day (DAY-range) action
180
+ setAllDay(value) {
181
+ allDaySignal.set(value);
182
+ },
175
183
  // Clear all
176
184
  clearAll() {
177
185
  this.clearItems();
178
186
  this.clearLocation();
179
187
  this.clearFormSubmission();
188
+ this.setAllDay(false);
180
189
  },
181
190
  // Book action - collects data from signals and delegates to executeBookAction
182
191
  // Loading/error state management is handled in Book.tsx component
@@ -186,6 +195,7 @@ exports.BookingService = services_definitions_1.implementService.withConfig()(ex
186
195
  const location = locationSignal.get();
187
196
  const timezone = timezoneSignal.get();
188
197
  const selectedPaymentOption = selectedPaymentOptionSignal.get();
198
+ const allDay = allDaySignal.get();
189
199
  // Validation happens inside executeBookAction
190
200
  return (0, bookAction_js_1.executeBookAction)({
191
201
  serviceSelections,
@@ -194,6 +204,7 @@ exports.BookingService = services_definitions_1.implementService.withConfig()(ex
194
204
  timezone,
195
205
  appId: config.appId,
196
206
  selectedPaymentOption,
207
+ allDay,
197
208
  });
198
209
  },
199
210
  };
@@ -7,7 +7,7 @@ export { BookingService, BookingServiceDefinition, type BookingServiceConfig, ty
7
7
  export { TimeSlotListService, TimeSlotListServiceDefinition, TimeSlotService, TimeSlotServiceDefinition, ViewMode, loadTimeSlotListConfig, type TimeSlotListServiceAPI, type TimeSlotListServiceActions, type TimeSlotListServiceConfig, type TimeSlotServiceAPI, type TimeSlotServiceConfig, type LoadTimeSlotListConfigOptions, type LoadTimeSlotListConfigResult, } from './time-slot-list/index.js';
8
8
  export { ServiceListService, ServiceListServiceDefinition, type ServiceListServiceAPI, type ServiceListServiceConfig, type ServiceListActions, type QueryOptions, loadServiceListServiceInitialData, type SuccessServiceListServiceConfigResult, type ErrorServiceListServiceConfigResult, } from './service-list/service-list.js';
9
9
  export { SYNTHETIC_CUSTOM_ID, SYNTHETIC_CUSTOMER_ID, } from '../api/query-services/index.js';
10
- export { executeBookAction, canBook, buildBookingRequest, buildCartRequest, buildDayRangeCartRequest, buildDayRangeBookingRequest, createBookingsForCart, isDayRangeService, getDayRangeBounds, type CanBookParams, type BookResult, type BookingError, type BookActionParams, type BookChildProps, type BookProps, type BuildCartParams, type BuildDayRangeCartParams, type BuildDayRangeBookingRequest, type CreatedBookings, type DayRangeBounds, } from './booking/book-action/index.js';
10
+ export { executeBookAction, canBook, buildBookingRequest, buildCartRequest, buildDayRangeBookingRequest, createBookingsForCart, isDayRangeService, getDayRangeBounds, type CanBookParams, type BookResult, type BookingError, type BookActionParams, type BookChildProps, type BookProps, type BuildCartParams, type BuildDayRangeBookingRequest, type CreatedBookings, type DayRangeBounds, } from './booking/book-action/index.js';
11
11
  export { BookingFormService, BookingFormServiceDefinition, type BookingFormServiceAPI, type BookingFormServiceConfig, } from './booking-form/booking-form.js';
12
12
  export { PaymentService, PaymentServiceDefinition, type PaymentServiceAPI, type PaymentServiceConfig, type PaymentDetails, type PricingServiceSelection, type LineItemAdditionalInfo, type ServicePaymentOptions, loadPaymentConfig, type SuccessPaymentConfigResult, type ErrorPaymentConfigResult, } from './payment/payment.js';
13
13
  export { LocationListService, LocationListServiceDefinition, LocationType, loadLocationListServiceInitialData, locationListServiceBinding, type LocationListServiceAPI, type LocationListServiceConfig, type LocationListActions, type Location, type LoadLocationListServiceResult, getLocationById, } from './location-list/location-list.js';
@@ -4,7 +4,7 @@
4
4
  * Main export file for all service definitions and implementations
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.staffMemberListServiceBinding = exports.loadStaffMemberListServiceInitialData = exports.StaffMemberListServiceDefinition = exports.StaffMemberListService = exports.getLocationById = exports.locationListServiceBinding = exports.loadLocationListServiceInitialData = exports.LocationType = exports.LocationListServiceDefinition = exports.LocationListService = exports.loadPaymentConfig = exports.PaymentServiceDefinition = exports.PaymentService = exports.BookingFormServiceDefinition = exports.BookingFormService = exports.getDayRangeBounds = exports.isDayRangeService = exports.createBookingsForCart = exports.buildDayRangeBookingRequest = exports.buildDayRangeCartRequest = exports.buildCartRequest = exports.buildBookingRequest = exports.canBook = exports.executeBookAction = exports.SYNTHETIC_CUSTOMER_ID = exports.SYNTHETIC_CUSTOM_ID = exports.loadServiceListServiceInitialData = exports.ServiceListServiceDefinition = exports.ServiceListService = exports.loadTimeSlotListConfig = exports.ViewMode = exports.TimeSlotServiceDefinition = exports.TimeSlotService = exports.TimeSlotListServiceDefinition = exports.TimeSlotListService = exports.BookingServiceDefinition = exports.BookingService = exports.loadServiceServiceInitialData = exports.ServiceServiceDefinition = exports.ServiceService = void 0;
7
+ exports.staffMemberListServiceBinding = exports.loadStaffMemberListServiceInitialData = exports.StaffMemberListServiceDefinition = exports.StaffMemberListService = exports.getLocationById = exports.locationListServiceBinding = exports.loadLocationListServiceInitialData = exports.LocationType = exports.LocationListServiceDefinition = exports.LocationListService = exports.loadPaymentConfig = exports.PaymentServiceDefinition = exports.PaymentService = exports.BookingFormServiceDefinition = exports.BookingFormService = exports.getDayRangeBounds = exports.isDayRangeService = exports.createBookingsForCart = exports.buildDayRangeBookingRequest = exports.buildCartRequest = exports.buildBookingRequest = exports.canBook = exports.executeBookAction = exports.SYNTHETIC_CUSTOMER_ID = exports.SYNTHETIC_CUSTOM_ID = exports.loadServiceListServiceInitialData = exports.ServiceListServiceDefinition = exports.ServiceListService = exports.loadTimeSlotListConfig = exports.ViewMode = exports.TimeSlotServiceDefinition = exports.TimeSlotService = exports.TimeSlotListServiceDefinition = exports.TimeSlotListService = exports.BookingServiceDefinition = exports.BookingService = exports.loadServiceServiceInitialData = exports.ServiceServiceDefinition = exports.ServiceService = void 0;
8
8
  var service_js_1 = require("./service/service.js");
9
9
  Object.defineProperty(exports, "ServiceService", { enumerable: true, get: function () { return service_js_1.ServiceService; } });
10
10
  Object.defineProperty(exports, "ServiceServiceDefinition", { enumerable: true, get: function () { return service_js_1.ServiceServiceDefinition; } });
@@ -31,7 +31,6 @@ Object.defineProperty(exports, "executeBookAction", { enumerable: true, get: fun
31
31
  Object.defineProperty(exports, "canBook", { enumerable: true, get: function () { return index_js_3.canBook; } });
32
32
  Object.defineProperty(exports, "buildBookingRequest", { enumerable: true, get: function () { return index_js_3.buildBookingRequest; } });
33
33
  Object.defineProperty(exports, "buildCartRequest", { enumerable: true, get: function () { return index_js_3.buildCartRequest; } });
34
- Object.defineProperty(exports, "buildDayRangeCartRequest", { enumerable: true, get: function () { return index_js_3.buildDayRangeCartRequest; } });
35
34
  Object.defineProperty(exports, "buildDayRangeBookingRequest", { enumerable: true, get: function () { return index_js_3.buildDayRangeBookingRequest; } });
36
35
  Object.defineProperty(exports, "createBookingsForCart", { enumerable: true, get: function () { return index_js_3.createBookingsForCart; } });
37
36
  Object.defineProperty(exports, "isDayRangeService", { enumerable: true, get: function () { return index_js_3.isDayRangeService; } });
@@ -51,6 +51,7 @@ export function createMockBookingService(config = {}) {
51
51
  setFormSubmission: vi.fn(),
52
52
  clearFormSubmission: vi.fn(),
53
53
  setSelectedPaymentOption: vi.fn(),
54
+ setAllDay: vi.fn(),
54
55
  clearAll: vi.fn(),
55
56
  book: vi.fn(),
56
57
  },
@@ -1,7 +1,7 @@
1
1
  import { createCart } from '../../../api/create-cart/index.js';
2
2
  import { calculateCart } from '../../../api/calculate-cart/index.js';
3
3
  import { placeOrder } from '../../../api/place-order/index.js';
4
- import { buildCartRequest, buildDayRangeCartRequest, } from './buildCartRequest.js';
4
+ import { buildCartRequest } from './buildCartRequest.js';
5
5
  import { canBook } from './canBook.js';
6
6
  import { createBookingsForCart } from './createBookingsForCart.js';
7
7
  import { isCheckoutRequired } from './isCheckoutRequired.js';
@@ -14,7 +14,7 @@ export async function executeBookAction(params) {
14
14
  })) {
15
15
  throw new Error('Cannot book: missing required data');
16
16
  }
17
- // Step 1: Create booking(s). The helper picks single vs bulk vs
17
+ // Step 1: Create booking(s). The helper picks single vs
18
18
  // multi-service (DAY-range routing) and returns a uniform
19
19
  // { bookingIds, contactDetails } shape.
20
20
  const { bookingIds, contactDetails } = await createBookingsForCart(params);
@@ -35,19 +35,14 @@ export async function executeBookAction(params) {
35
35
  // it from the service's first configured location.
36
36
  firstSelection.service.locations?.[0]?._id
37
37
  : firstSelection.timeSlot?.location?._id;
38
- const cartRequest = isDayRange
39
- ? buildDayRangeCartRequest({
40
- bookingIds,
41
- contactDetails,
42
- businessLocationId,
43
- appId: params.appId,
44
- })
45
- : buildCartRequest({
46
- bookingId: bookingIds[0],
47
- contactDetails,
48
- businessLocationId,
49
- appId: params.appId,
50
- });
38
+ // One cart item per booking ID. Single-day and allDay ranges produce one
39
+ // booking ID; DAY-range expansion produces one per day.
40
+ const cartRequest = buildCartRequest({
41
+ bookingIds,
42
+ contactDetails,
43
+ businessLocationId,
44
+ appId: params.appId,
45
+ });
51
46
  const cart = await createCart(cartRequest);
52
47
  if (!cart._id) {
53
48
  throw new Error('Failed to create cart');
@@ -107,8 +107,6 @@ function mapTimeSlotLocationTypeToBookingLocationType(slotLocationType) {
107
107
  return BookingLocationType.CUSTOM;
108
108
  case TimeSlotLocationType.CUSTOM:
109
109
  return BookingLocationType.OWNER_CUSTOM;
110
- case TimeSlotLocationType.UNKNOWN_LOCATION_TYPE:
111
- return BookingLocationType.UNDEFINED;
112
110
  default:
113
111
  return BookingLocationType.OWNER_BUSINESS;
114
112
  }
@@ -1,23 +1,12 @@
1
1
  import { type CreateCartOptions } from '../../../api/create-cart/index.js';
2
2
  import type { ContactDetails } from '@wix/auto_sdk_bookings_bookings';
3
3
  export interface BuildCartParams {
4
- bookingId: string;
5
- contactDetails?: ContactDetails;
6
- /** `null` accepted so callers can forward SDK fields typed `string | null`. */
7
- businessLocationId?: string | null;
8
- /** Optional app ID override for the catalog reference. Defaults to BOOKING_APP_ID. */
9
- appId?: string;
10
- }
11
- export declare function buildCartRequest(params: BuildCartParams): CreateCartOptions;
12
- /**
13
- * DAY-range variant of `buildCartRequest`. Takes the N booking IDs returned
14
- * by `bulkCreateBooking` (1 slot) or `createMultiServiceBooking` (2-8 slots)
15
- * and emits one catalog item per ID. Per SDK guidance, never use
16
- * `multiServiceBooking._id` here; always feed the per-day single-service
17
- * booking IDs into the cart.
18
- */
19
- export interface BuildDayRangeCartParams {
20
- /** One catalog item per booking id. Bulk / multi-service responses produce N>=1 ids. */
4
+ /**
5
+ * One catalog item is emitted per booking id. Single-service and allDay
6
+ * bookings produce one id; DAY-range expansion produces one per day. Per SDK
7
+ * guidance, never use `multiServiceBooking._id` here; always feed the
8
+ * per-day single-service booking IDs into the cart.
9
+ */
21
10
  bookingIds: string[];
22
11
  contactDetails?: ContactDetails;
23
12
  /** `null` accepted so callers can forward SDK fields typed `string | null`. */
@@ -25,4 +14,4 @@ export interface BuildDayRangeCartParams {
25
14
  /** Optional app ID override for the catalog reference. Defaults to BOOKING_APP_ID. */
26
15
  appId?: string;
27
16
  }
28
- export declare function buildDayRangeCartRequest(params: BuildDayRangeCartParams): CreateCartOptions;
17
+ export declare function buildCartRequest(params: BuildCartParams): CreateCartOptions;
@@ -1,12 +1,6 @@
1
1
  import { ChannelType, } from '../../../api/create-cart/index.js';
2
2
  import { BOOKING_APP_ID } from '../../constants.js';
3
3
  export function buildCartRequest(params) {
4
- return {
5
- catalogItems: [buildCatalogItem(params.bookingId, params.appId)],
6
- cart: buildCartShape(params),
7
- };
8
- }
9
- export function buildDayRangeCartRequest(params) {
10
4
  return {
11
5
  catalogItems: params.bookingIds.map((id) => buildCatalogItem(id, params.appId)),
12
6
  cart: buildCartShape(params),
@@ -6,9 +6,12 @@
6
6
  * and the picker emits one slot per day in `rangeTimeSlots`. The client just
7
7
  * packages them as one Booking each. Routing is decided by `bookings.length`
8
8
  * in `createBookingsForCart`:
9
- * - length 1 -> `bulkCreateBooking`
9
+ * - length 1 -> `createBooking`
10
10
  * - length 2-8 -> `createMultiServiceBooking`
11
11
  *
12
+ * With `allDay`, the picked slots collapse into one Booking spanning the full
13
+ * range, so that case routes through `createBooking`.
14
+ *
12
15
  * The 8-day cap is enforced server-side; the builder does not gate on it.
13
16
  */
14
17
  import type { Booking, ParticipantNotification } from '@wix/auto_sdk_bookings_bookings';
@@ -16,8 +19,10 @@ import type { FormValues } from '@wix/forms/components';
16
19
  import type { BookActionParams } from './types.js';
17
20
  export interface BuildDayRangeBookingRequest {
18
21
  /**
19
- * One Booking per picked per-day slot. Length 1 routes to bulkCreateBooking,
20
- * length >=2 routes to createMultiServiceBooking.
22
+ * The Bookings to create. With `allDay`, this is a single Booking spanning
23
+ * the whole range. Otherwise it is one Booking per picked per-day slot:
24
+ * length 1 routes to createBooking, length >=2 routes to
25
+ * createMultiServiceBooking.
21
26
  */
22
27
  bookings: Booking[];
23
28
  /** Notification settings forwarded to the server. */
@@ -6,9 +6,12 @@
6
6
  * and the picker emits one slot per day in `rangeTimeSlots`. The client just
7
7
  * packages them as one Booking each. Routing is decided by `bookings.length`
8
8
  * in `createBookingsForCart`:
9
- * - length 1 -> `bulkCreateBooking`
9
+ * - length 1 -> `createBooking`
10
10
  * - length 2-8 -> `createMultiServiceBooking`
11
11
  *
12
+ * With `allDay`, the picked slots collapse into one Booking spanning the full
13
+ * range, so that case routes through `createBooking`.
14
+ *
12
15
  * The 8-day cap is enforced server-side; the builder does not gate on it.
13
16
  */
14
17
  import { buildBookingRequest } from './buildBookingRequest.js';
@@ -44,21 +47,21 @@ export function buildDayRangeBookingRequest(params) {
44
47
  ...params,
45
48
  serviceSelections: [baseSelection, ...params.serviceSelections.slice(1)],
46
49
  });
47
- const bookings = slots.map((slot) => ({
50
+ // Clone the base Booking, overriding only the slot start/end.
51
+ const buildBooking = (startDate, endDate) => ({
48
52
  ...baseRequest.booking,
49
53
  bookedEntity: {
50
54
  ...baseRequest.booking.bookedEntity,
51
55
  slot: {
52
56
  ...baseRequest.booking.bookedEntity?.slot,
53
- startDate: slot.startDate,
54
- endDate: slot.endDate,
57
+ startDate,
58
+ endDate,
55
59
  },
56
60
  },
57
- }));
58
- // TODO(createAsOneBooking): when the server flag lands, this builder should
59
- // optionally collapse all slots into a single Booking spanning
60
- // `slots[0].startDate -> slots[N-1].endDate` with `fullDay: true`, and
61
- // routing should use plain `createBooking` (not bulk / multi-service).
61
+ });
62
+ const bookings = params.allDay
63
+ ? [buildBooking(slots[0].startDate, slots[slots.length - 1].endDate)]
64
+ : slots.map((slot) => buildBooking(slot.startDate, slot.endDate));
62
65
  return {
63
66
  bookings,
64
67
  participantNotification: baseRequest.participantNotification,
@@ -2,9 +2,10 @@
2
2
  * Creates the booking(s) needed for cart construction.
3
3
  *
4
4
  * Branches on the service selection:
5
- * - DAY-range path with 1 picked slot -> `bulkCreateBooking`
6
- * - DAY-range path with 2..8 picked slots -> `createMultiServiceBooking`
7
- * - default path -> `createBooking`
5
+ * - DAY-range path with 1 picked day -> `createBooking`
6
+ * - DAY-range path with `allDay` -> `createBooking` (one combined Booking)
7
+ * - DAY-range path with 2..8 picked days -> `createMultiServiceBooking`
8
+ * - default path -> `createBooking`
8
9
  *
9
10
  * All branches return the same shape so `executeBookAction` can stay
10
11
  * branchless from cart-creation onwards. Cart construction reads each
@@ -2,9 +2,10 @@
2
2
  * Creates the booking(s) needed for cart construction.
3
3
  *
4
4
  * Branches on the service selection:
5
- * - DAY-range path with 1 picked slot -> `bulkCreateBooking`
6
- * - DAY-range path with 2..8 picked slots -> `createMultiServiceBooking`
7
- * - default path -> `createBooking`
5
+ * - DAY-range path with 1 picked day -> `createBooking`
6
+ * - DAY-range path with `allDay` -> `createBooking` (one combined Booking)
7
+ * - DAY-range path with 2..8 picked days -> `createMultiServiceBooking`
8
+ * - default path -> `createBooking`
8
9
  *
9
10
  * All branches return the same shape so `executeBookAction` can stay
10
11
  * branchless from cart-creation onwards. Cart construction reads each
@@ -12,7 +13,6 @@
12
13
  * `multiServiceBooking._id`.
13
14
  */
14
15
  import { createBooking } from '../../../api/create-booking/index.js';
15
- import { bulkCreateBooking } from '../../../api/create-bulk-booking/index.js';
16
16
  import { createMultiServiceBooking } from '../../../api/create-multi-service-booking/index.js';
17
17
  import { buildBookingRequest } from './buildBookingRequest.js';
18
18
  import { buildDayRangeBookingRequest } from './buildDayRangeBookingRequest.js';
@@ -24,21 +24,16 @@ export async function createBookingsForCart(params) {
24
24
  }
25
25
  if (isDayRangeService(firstSelection.service)) {
26
26
  const req = buildDayRangeBookingRequest(params);
27
- // TODO(createAsOneBooking): when the server flag lands, branch here:
28
- // if (createAsOneBooking) -> createBooking({ ...wideRange, fullDay: true })
29
- // collapsing all slots into one combined Booking. Until then, we always
30
- // use one Booking per picked slot.
31
27
  if (req.bookings.length === 1) {
32
- const response = await bulkCreateBooking([{ booking: req.bookings[0] }], {
28
+ const bookingResponse = await createBooking(req.bookings[0], {
33
29
  participantNotification: req.participantNotification,
34
30
  sendSmsReminder: req.sendSmsReminder,
35
31
  formSubmission: req.formSubmission,
36
32
  });
37
- const results = response.results ?? [];
33
+ const bookingId = bookingResponse.booking?._id;
38
34
  return {
39
- bookingIds: results.map((r) => r.item?._id).filter(Boolean),
40
- // All N daily bookings share the same customer; read from the first.
41
- contactDetails: results[0]?.item?.contactDetails,
35
+ bookingIds: bookingId ? [bookingId] : [],
36
+ contactDetails: bookingResponse.booking?.contactDetails,
42
37
  };
43
38
  }
44
39
  const response = await createMultiServiceBooking(req.bookings, {
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * APPOINTMENT services whose schedule has a `durationRange` with
5
5
  * `unitType === DAY` route through the per-day slot path:
6
- * - 1 picked slot -> `bulkCreateBooking`
6
+ * - 1 picked slot -> `createBooking`
7
7
  * - 2..8 picked slots -> `createMultiServiceBooking`
8
+ * - 2..8 picked slots with `allDay` -> `createBooking`
8
9
  *
9
10
  * CLASS/COURSE selections and HOUR-range / fixed-duration APPOINTMENT
10
11
  * selections keep using the existing `createBooking` path.
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * APPOINTMENT services whose schedule has a `durationRange` with
5
5
  * `unitType === DAY` route through the per-day slot path:
6
- * - 1 picked slot -> `bulkCreateBooking`
6
+ * - 1 picked slot -> `createBooking`
7
7
  * - 2..8 picked slots -> `createMultiServiceBooking`
8
+ * - 2..8 picked slots with `allDay` -> `createBooking`
8
9
  *
9
10
  * CLASS/COURSE selections and HOUR-range / fixed-duration APPOINTMENT
10
11
  * selections keep using the existing `createBooking` path.
@@ -53,6 +53,13 @@ export interface BookActionParams {
53
53
  * service. When omitted, the existing service-config heuristic applies.
54
54
  */
55
55
  selectedPaymentOption?: SelectedPaymentOption;
56
+ /**
57
+ * DAY-range only. When `true`, the picked per-day slots are collapsed into a
58
+ * single Booking spanning the whole range (`firstSlot.startDate ->
59
+ * lastSlot.endDate`) and created via plain `createBooking`. Ignored for
60
+ * non-DAY-range services.
61
+ */
62
+ allDay?: boolean;
56
63
  }
57
64
  /**
58
65
  * Props passed to children of Book component
@@ -48,8 +48,9 @@ export interface ServiceSelection {
48
48
  * picker after the customer picks a start + end date: one entry per day
49
49
  * in the picked range. When set, supersedes `timeSlot` for the DAY-range
50
50
  * builder, which produces one Booking per entry and routes via length:
51
- * - 1 -> bulkCreateBooking
51
+ * - 1 -> createBooking
52
52
  * - 2-8 -> createMultiServiceBooking
53
+ * - 2-8 with allDay -> createBooking
53
54
  * Optional & additive: existing single-slot callers stay on `timeSlot`.
54
55
  */
55
56
  rangeTimeSlots?: ServiceSelectionTimeSlot[];
@@ -88,6 +89,12 @@ export interface BookingServiceActions {
88
89
  * is cleared and the heuristic applies again.
89
90
  */
90
91
  setSelectedPaymentOption(value: SelectedPaymentOption | null): void;
92
+ /**
93
+ * Toggle the DAY-range `allDay` flag. When `true`, `book()` collapses the
94
+ * picked per-day slots into one range-spanning Booking created via
95
+ * `createBooking`. Ignored for non-DAY-range services.
96
+ */
97
+ setAllDay(value: boolean): void;
91
98
  clearAll(): void;
92
99
  book(): Promise<BookResult>;
93
100
  }
@@ -71,6 +71,10 @@ export const BookingService = implementService.withConfig()(BookingServiceDefini
71
71
  const timezoneSignal = signalsService.signal(config.timezone ?? getClientTimezone());
72
72
  const formSubmissionSignal = signalsService.signal(config.formSubmission || null);
73
73
  const selectedPaymentOptionSignal = signalsService.signal(config.selectedPaymentOption);
74
+ // Internal-only signal: set via `setAllDay`, read by `book()`. Not
75
+ // exposed on the service surface — consumers derive and push the value
76
+ // (e.g. from the picker's selection mode), so there's no read-back.
77
+ const allDaySignal = signalsService.signal(false);
74
78
  // ========================================================================
75
79
  // Helpers
76
80
  // ========================================================================
@@ -169,11 +173,16 @@ export const BookingService = implementService.withConfig()(BookingServiceDefini
169
173
  setSelectedPaymentOption(value) {
170
174
  selectedPaymentOptionSignal.set(value ?? undefined);
171
175
  },
176
+ // All-day (DAY-range) action
177
+ setAllDay(value) {
178
+ allDaySignal.set(value);
179
+ },
172
180
  // Clear all
173
181
  clearAll() {
174
182
  this.clearItems();
175
183
  this.clearLocation();
176
184
  this.clearFormSubmission();
185
+ this.setAllDay(false);
177
186
  },
178
187
  // Book action - collects data from signals and delegates to executeBookAction
179
188
  // Loading/error state management is handled in Book.tsx component
@@ -183,6 +192,7 @@ export const BookingService = implementService.withConfig()(BookingServiceDefini
183
192
  const location = locationSignal.get();
184
193
  const timezone = timezoneSignal.get();
185
194
  const selectedPaymentOption = selectedPaymentOptionSignal.get();
195
+ const allDay = allDaySignal.get();
186
196
  // Validation happens inside executeBookAction
187
197
  return executeBookAction({
188
198
  serviceSelections,
@@ -191,6 +201,7 @@ export const BookingService = implementService.withConfig()(BookingServiceDefini
191
201
  timezone,
192
202
  appId: config.appId,
193
203
  selectedPaymentOption,
204
+ allDay,
194
205
  });
195
206
  },
196
207
  };
@@ -7,7 +7,7 @@ export { BookingService, BookingServiceDefinition, type BookingServiceConfig, ty
7
7
  export { TimeSlotListService, TimeSlotListServiceDefinition, TimeSlotService, TimeSlotServiceDefinition, ViewMode, loadTimeSlotListConfig, type TimeSlotListServiceAPI, type TimeSlotListServiceActions, type TimeSlotListServiceConfig, type TimeSlotServiceAPI, type TimeSlotServiceConfig, type LoadTimeSlotListConfigOptions, type LoadTimeSlotListConfigResult, } from './time-slot-list/index.js';
8
8
  export { ServiceListService, ServiceListServiceDefinition, type ServiceListServiceAPI, type ServiceListServiceConfig, type ServiceListActions, type QueryOptions, loadServiceListServiceInitialData, type SuccessServiceListServiceConfigResult, type ErrorServiceListServiceConfigResult, } from './service-list/service-list.js';
9
9
  export { SYNTHETIC_CUSTOM_ID, SYNTHETIC_CUSTOMER_ID, } from '../api/query-services/index.js';
10
- export { executeBookAction, canBook, buildBookingRequest, buildCartRequest, buildDayRangeCartRequest, buildDayRangeBookingRequest, createBookingsForCart, isDayRangeService, getDayRangeBounds, type CanBookParams, type BookResult, type BookingError, type BookActionParams, type BookChildProps, type BookProps, type BuildCartParams, type BuildDayRangeCartParams, type BuildDayRangeBookingRequest, type CreatedBookings, type DayRangeBounds, } from './booking/book-action/index.js';
10
+ export { executeBookAction, canBook, buildBookingRequest, buildCartRequest, buildDayRangeBookingRequest, createBookingsForCart, isDayRangeService, getDayRangeBounds, type CanBookParams, type BookResult, type BookingError, type BookActionParams, type BookChildProps, type BookProps, type BuildCartParams, type BuildDayRangeBookingRequest, type CreatedBookings, type DayRangeBounds, } from './booking/book-action/index.js';
11
11
  export { BookingFormService, BookingFormServiceDefinition, type BookingFormServiceAPI, type BookingFormServiceConfig, } from './booking-form/booking-form.js';
12
12
  export { PaymentService, PaymentServiceDefinition, type PaymentServiceAPI, type PaymentServiceConfig, type PaymentDetails, type PricingServiceSelection, type LineItemAdditionalInfo, type ServicePaymentOptions, loadPaymentConfig, type SuccessPaymentConfigResult, type ErrorPaymentConfigResult, } from './payment/payment.js';
13
13
  export { LocationListService, LocationListServiceDefinition, LocationType, loadLocationListServiceInitialData, locationListServiceBinding, type LocationListServiceAPI, type LocationListServiceConfig, type LocationListActions, type Location, type LoadLocationListServiceResult, getLocationById, } from './location-list/location-list.js';
@@ -7,7 +7,7 @@ export { BookingService, BookingServiceDefinition, } from './booking/booking.js'
7
7
  export { TimeSlotListService, TimeSlotListServiceDefinition, TimeSlotService, TimeSlotServiceDefinition, ViewMode, loadTimeSlotListConfig, } from './time-slot-list/index.js';
8
8
  export { ServiceListService, ServiceListServiceDefinition, loadServiceListServiceInitialData, } from './service-list/service-list.js';
9
9
  export { SYNTHETIC_CUSTOM_ID, SYNTHETIC_CUSTOMER_ID, } from '../api/query-services/index.js';
10
- export { executeBookAction, canBook, buildBookingRequest, buildCartRequest, buildDayRangeCartRequest, buildDayRangeBookingRequest, createBookingsForCart, isDayRangeService, getDayRangeBounds, } from './booking/book-action/index.js';
10
+ export { executeBookAction, canBook, buildBookingRequest, buildCartRequest, buildDayRangeBookingRequest, createBookingsForCart, isDayRangeService, getDayRangeBounds, } from './booking/book-action/index.js';
11
11
  export { BookingFormService, BookingFormServiceDefinition, } from './booking-form/booking-form.js';
12
12
  export { PaymentService, PaymentServiceDefinition, loadPaymentConfig, } from './payment/payment.js';
13
13
  export { LocationListService, LocationListServiceDefinition, LocationType, loadLocationListServiceInitialData, locationListServiceBinding, getLocationById, } from './location-list/location-list.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/headless-bookings",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -34,6 +34,7 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
+ "@wix/auto_sdk_bookings_availability-time-slots": "^1.0.244",
37
38
  "@wix/auto_sdk_bookings_bookings": "^1.0.192",
38
39
  "@wix/auto_sdk_bookings_event-time-slots": "^1.0.112",
39
40
  "@wix/auto_sdk_bookings_pricing": "^1.0.87",
@@ -75,5 +76,5 @@
75
76
  "groupId": "com.wixpress.headless-components"
76
77
  }
77
78
  },
78
- "falconPackageHash": "60796dfbabc73eb7b2ec7543eb4062986b78906203ede122471a8080"
79
+ "falconPackageHash": "1d7f35a0513a0780cb412d80a034e1ed5b5e3bccbbc1bb20f4ad1481"
79
80
  }