@wix/bookings 1.0.1777 → 1.0.1778
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/context-booking-checkout.d.ts +243 -108
- package/build/cjs/context-booking-checkout.js +176 -182
- package/build/cjs/context-booking-checkout.js.map +1 -1
- package/build/cjs/context-categories.d.ts +16 -143
- package/build/cjs/context-categories.js +411 -411
- package/build/cjs/context-categories.js.map +1 -1
- package/build/cjs/context-locations.d.ts +16 -287
- package/build/cjs/context-locations.js +335 -335
- package/build/cjs/context-locations.js.map +1 -1
- package/build/cjs/context-service-addons.d.ts +2 -2
- package/build/cjs/context-service.d.ts +71 -33
- package/build/cjs/context-service.js +97 -95
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-time-slots.d.ts +10 -0
- package/build/cjs/context-time-slots.js +1 -1
- package/build/cjs/context-time-slots.js.map +1 -1
- package/build/es/context-booking-checkout.d.mts +243 -108
- package/build/es/context-booking-checkout.mjs +176 -179
- package/build/es/context-booking-checkout.mjs.map +1 -1
- package/build/es/context-categories.d.mts +16 -143
- package/build/es/context-categories.mjs +411 -411
- package/build/es/context-categories.mjs.map +1 -1
- package/build/es/context-locations.d.mts +16 -287
- package/build/es/context-locations.mjs +335 -335
- package/build/es/context-locations.mjs.map +1 -1
- package/build/es/context-service-addons.d.mts +2 -2
- package/build/es/context-service.d.mts +71 -33
- package/build/es/context-service.mjs +97 -95
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-time-slots.d.mts +10 -0
- package/build/es/context-time-slots.mjs +1 -1
- package/build/es/context-time-slots.mjs.map +1 -1
- package/build/internal/cjs/context-booking-checkout.d.ts +243 -108
- package/build/internal/cjs/context-categories.d.ts +16 -143
- package/build/internal/cjs/context-locations.d.ts +16 -287
- package/build/internal/cjs/context-service-addons.d.ts +2 -2
- package/build/internal/cjs/context-service.d.ts +71 -33
- package/build/internal/cjs/context-time-slots.d.ts +10 -0
- package/build/internal/es/context-booking-checkout.d.mts +243 -108
- package/build/internal/es/context-categories.d.mts +16 -143
- package/build/internal/es/context-locations.d.mts +16 -287
- package/build/internal/es/context-service-addons.d.mts +2 -2
- package/build/internal/es/context-service.d.mts +71 -33
- package/build/internal/es/context-time-slots.d.mts +10 -0
- package/context-runtime/context-booking-checkout/runtime.d.ts +243 -108
- package/context-runtime/context-booking-checkout/runtime.js +3 -3
- package/context-runtime/context-categories/runtime.d.ts +16 -143
- package/context-runtime/context-categories/runtime.js +2 -2
- package/context-runtime/context-locations/runtime.d.ts +16 -287
- package/context-runtime/context-locations/runtime.js +2 -2
- package/context-runtime/context-service/runtime.d.ts +71 -33
- package/context-runtime/context-service/runtime.js +3 -3
- package/context-runtime/context-service-addons/runtime.d.ts +2 -2
- package/context-runtime/context-time-slots/runtime.d.ts +10 -0
- package/context-runtime/context-time-slots/runtime.js +2 -2
- package/package.json +6 -6
|
@@ -2696,62 +2696,94 @@ declare const SERVICE_CTA_STATES: {
|
|
|
2696
2696
|
type ServiceCtaState = (typeof SERVICE_CTA_STATES)[keyof typeof SERVICE_CTA_STATES];
|
|
2697
2697
|
//#endregion
|
|
2698
2698
|
//#region ../bookings-flow-data/dist/types.d.ts
|
|
2699
|
-
/**
|
|
2700
|
-
*
|
|
2701
|
-
*
|
|
2702
|
-
|
|
2703
|
-
/** A committed resource selection for one resource *type* (staff, room, equipment…).
|
|
2704
|
-
* Carried as ids — the server accepts ids via `resourceSelections`, so the full resource
|
|
2705
|
-
* object (name, schedule) is never needed in the contract.
|
|
2699
|
+
/**
|
|
2700
|
+
* Whether the selection holds 1 service or several services booked together. Supported values:
|
|
2701
|
+
* - `'single'`: 1 service.
|
|
2702
|
+
* - `'multi'`: 2 or more services, booked together as a multi-service appointment.
|
|
2706
2703
|
*
|
|
2707
|
-
*
|
|
2704
|
+
* It follows the number of entries in `services`, so count those instead of reading it.
|
|
2705
|
+
*/
|
|
2706
|
+
type BookingMode = 'single' | 'multi';
|
|
2707
|
+
/** Resources the visitor chose for 1 resource type, such as a staff member or a room. */
|
|
2708
2708
|
interface ResourceSelection {
|
|
2709
|
+
/** ID of the resource type, such as the staff member resource type. */
|
|
2709
2710
|
type: string;
|
|
2711
|
+
/** IDs of the chosen resources of this type. */
|
|
2710
2712
|
ids: string[];
|
|
2711
|
-
/**
|
|
2713
|
+
/** Whether the visitor chose any available resource of this type, instead of a specific one. */
|
|
2712
2714
|
anyResource?: boolean;
|
|
2713
2715
|
}
|
|
2714
|
-
/** A
|
|
2716
|
+
/** A variant the visitor chose for a service with variants: a number of participants, option choices, or both. */
|
|
2715
2717
|
type SelectedVariant = Pick<ServiceChoices, 'numberOfParticipants'> & {
|
|
2716
|
-
/**
|
|
2718
|
+
/** The chosen option values: a choice ID, or the text of a custom choice. */choices?: string[];
|
|
2717
2719
|
};
|
|
2718
2720
|
/** Genders a visitor can narrow "any staff member" to, in display order. Same literals as the
|
|
2719
2721
|
* availability API's `requestedGender.gender`, single- and multi-service alike. */
|
|
2720
2722
|
declare const REQUESTED_GENDERS: readonly ["ANY_FEMALE", "ANY_MALE"];
|
|
2721
2723
|
type RequestedGender = (typeof REQUESTED_GENDERS)[number];
|
|
2722
|
-
/**
|
|
2724
|
+
/** An add-on the visitor chose, with its quantity. */
|
|
2723
2725
|
type AddOn = {
|
|
2724
|
-
id: NonNullable<BookedAddOn['_id']>;
|
|
2726
|
+
/** ID of the add-on. */id: NonNullable<BookedAddOn['_id']>; /** Number of the add-on to book. */
|
|
2725
2727
|
quantity: NonNullable<BookedAddOn['quantity']>;
|
|
2726
2728
|
};
|
|
2727
|
-
/**
|
|
2729
|
+
/** What the visitor chose for 1 service: the service, its time slot, and their choices. */
|
|
2728
2730
|
type ServicePreference = {
|
|
2729
|
-
serviceId: NonNullable<V2Slot['serviceId']>;
|
|
2731
|
+
/** ID of the service. */serviceId: NonNullable<V2Slot['serviceId']>; /** Slug of the service, as in its page URL. */
|
|
2730
2732
|
slug?: NonNullable<Slug['name']>;
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
/**
|
|
2744
|
-
|
|
2745
|
-
|
|
2733
|
+
/**
|
|
2734
|
+
* Type of the service. Supported values:
|
|
2735
|
+
* - `'APPOINTMENT'`: An appointment, booked by time slot.
|
|
2736
|
+
* - `'CLASS'`: A class session.
|
|
2737
|
+
* - `'COURSE'`: A course, booked as a whole by its schedule.
|
|
2738
|
+
*/
|
|
2739
|
+
serviceType?: Service['type'];
|
|
2740
|
+
/**
|
|
2741
|
+
* Start of the time slot, as a local date and time without an offset, such as
|
|
2742
|
+
* `'2026-10-08T10:00:00'`. It's in the selection's `timezone`. Each service has its own, because
|
|
2743
|
+
* services booked together can start at different times. Absent for a course.
|
|
2744
|
+
*/
|
|
2745
|
+
slotStart?: V2Slot['startDate']; /** End of the time slot, in the same format as `slotStart`. Absent for a course. */
|
|
2746
|
+
slotEnd?: V2Slot['endDate']; /** ID of the calendar event of a class session. */
|
|
2747
|
+
eventId?: V2Slot['eventId']; /** ID of the schedule the slot belongs to. For a course, the course's schedule. */
|
|
2748
|
+
scheduleId?: V2Slot['scheduleId']; /** ID of the class session. */
|
|
2749
|
+
sessionId?: V2Slot['sessionId']; /** ID of the business location of the slot. */
|
|
2750
|
+
locationId?: NonNullable<SlotLocation['_id']>;
|
|
2751
|
+
/**
|
|
2752
|
+
* Where the service takes place. Supported values:
|
|
2753
|
+
* - `'BUSINESS'`: At one of the business's locations, in `locationId`.
|
|
2754
|
+
* - `'CUSTOM'`: At an address the business set for the service.
|
|
2755
|
+
* - `'CUSTOMER'`: At the customer's address.
|
|
2756
|
+
*/
|
|
2757
|
+
locationType?: 'BUSINESS' | 'CUSTOM' | 'CUSTOMER'; /** Resources the visitor chose, such as a staff member, by resource type. */
|
|
2758
|
+
resources?: ResourceSelection[]; /** Variants the visitor chose, for a service with variants. */
|
|
2759
|
+
selectedVariants?: SelectedVariant[]; /** Add-ons the visitor chose. */
|
|
2760
|
+
addOns?: AddOn[]; /** ID of the duration choice the visitor chose, for a service with a choice of durations. */
|
|
2761
|
+
durationChoiceId?: string; /** Duration the visitor chose, in minutes. */
|
|
2762
|
+
durationInMinutes?: number;
|
|
2763
|
+
/**
|
|
2764
|
+
* Gender the visitor asked for when they chose any available staff member. Supported values:
|
|
2765
|
+
* `'ANY_FEMALE'`, `'ANY_MALE'`.
|
|
2766
|
+
*/
|
|
2746
2767
|
requestedGender?: RequestedGender;
|
|
2747
2768
|
};
|
|
2748
|
-
/**
|
|
2769
|
+
/** What the visitor selected to book: the services, their time slots, and their choices. */
|
|
2749
2770
|
interface BookingPreferences {
|
|
2771
|
+
/** Whether the selection holds 1 service or several. Count `services` instead of reading it. */
|
|
2750
2772
|
mode: BookingMode;
|
|
2773
|
+
/**
|
|
2774
|
+
* Time zone of the slots' local dates and times, as an IANA name such as `'Europe/London'`.
|
|
2775
|
+
* Can be absent when the selection has no time slot, such as a course.
|
|
2776
|
+
*/
|
|
2751
2777
|
timezone?: V2Slot['timezone'];
|
|
2778
|
+
/** The selected services, in booking order. */
|
|
2752
2779
|
services: ServicePreference[];
|
|
2753
|
-
/**
|
|
2754
|
-
*
|
|
2780
|
+
/**
|
|
2781
|
+
* Whether the visitor asked to enter a promo code, in the booking summary. When it's `true`, a
|
|
2782
|
+
* priced booking paid in person goes through the checkout page, where the visitor enters the
|
|
2783
|
+
* code.
|
|
2784
|
+
*
|
|
2785
|
+
* Default: `false`
|
|
2786
|
+
*/
|
|
2755
2787
|
wantsPromoCode?: boolean;
|
|
2756
2788
|
}
|
|
2757
2789
|
//#endregion
|
|
@@ -3943,6 +3975,12 @@ interface Reschedule {
|
|
|
3943
3975
|
* couldn't be read.
|
|
3944
3976
|
*/
|
|
3945
3977
|
validUntil: string | null;
|
|
3978
|
+
/**
|
|
3979
|
+
* Name of the plan that the booking was paid with, in the site's language when it's translated.
|
|
3980
|
+
*
|
|
3981
|
+
* `null` when the booking wasn't paid with a plan, or the plan couldn't be read.
|
|
3982
|
+
*/
|
|
3983
|
+
planName: string | null;
|
|
3946
3984
|
}
|
|
3947
3985
|
//#endregion
|
|
3948
3986
|
//#region src/api/adapters/booking/reschedule-booking.d.ts
|