@wix/bookings 1.0.1786 → 1.0.1787
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 +22 -6
- package/build/cjs/context-booking-checkout.js +2296 -2253
- package/build/cjs/context-booking-checkout.js.map +1 -1
- package/build/cjs/context-categories.js +285 -275
- package/build/cjs/context-categories.js.map +1 -1
- package/build/cjs/context-locations.js +465 -455
- package/build/cjs/context-locations.js.map +1 -1
- package/build/cjs/context-service-addons.js +964 -917
- package/build/cjs/context-service-addons.js.map +1 -1
- package/build/cjs/context-service.d.ts +14 -5
- package/build/cjs/context-service.js +3514 -3337
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-services.js +878 -832
- package/build/cjs/context-services.js.map +1 -1
- package/build/cjs/context-time-slots.d.ts +10 -0
- package/build/cjs/context-time-slots.js +1202 -1159
- package/build/cjs/context-time-slots.js.map +1 -1
- package/build/es/context-booking-checkout.d.mts +22 -6
- package/build/es/context-booking-checkout.mjs +2304 -2261
- package/build/es/context-booking-checkout.mjs.map +1 -1
- package/build/es/context-categories.mjs +285 -275
- package/build/es/context-categories.mjs.map +1 -1
- package/build/es/context-locations.mjs +465 -455
- package/build/es/context-locations.mjs.map +1 -1
- package/build/es/context-service-addons.mjs +971 -924
- package/build/es/context-service-addons.mjs.map +1 -1
- package/build/es/context-service.d.mts +14 -5
- package/build/es/context-service.mjs +3383 -3206
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-services.mjs +878 -832
- package/build/es/context-services.mjs.map +1 -1
- package/build/es/context-time-slots.d.mts +10 -0
- package/build/es/context-time-slots.mjs +1222 -1179
- package/build/es/context-time-slots.mjs.map +1 -1
- package/build/internal/cjs/context-booking-checkout.d.ts +22 -6
- package/build/internal/cjs/context-service.d.ts +14 -5
- package/build/internal/cjs/context-time-slots.d.ts +10 -0
- package/build/internal/es/context-booking-checkout.d.mts +22 -6
- package/build/internal/es/context-service.d.mts +14 -5
- package/build/internal/es/context-time-slots.d.mts +10 -0
- package/context-runtime/context-booking-checkout/runtime.d.ts +22 -6
- package/context-runtime/context-booking-checkout/runtime.js +3 -3
- package/context-runtime/context-categories/runtime.js +2 -2
- package/context-runtime/context-locations/runtime.js +2 -2
- package/context-runtime/context-service/runtime.d.ts +14 -5
- package/context-runtime/context-service/runtime.js +3 -3
- package/context-runtime/context-service-addons/runtime.js +2 -2
- package/context-runtime/context-services/runtime.js +3 -3
- package/context-runtime/context-time-slots/runtime.d.ts +10 -0
- package/context-runtime/context-time-slots/runtime.js +3 -3
- package/package.json +2 -2
|
@@ -2591,7 +2591,8 @@ declare const PAYMENT_OPTION_KIND: {
|
|
|
2591
2591
|
readonly FREE: "FREE"; /** CUSTOM rate: a price description instead of an amount. */
|
|
2592
2592
|
readonly CUSTOM_PRICE: "CUSTOM_PRICE";
|
|
2593
2593
|
readonly MEMBERSHIP: "MEMBERSHIP";
|
|
2594
|
-
readonly BUY_PLAN: "BUY_PLAN";
|
|
2594
|
+
readonly BUY_PLAN: "BUY_PLAN"; /** SUBSCRIPTION rate: paid online every billing cycle. The service's only row. */
|
|
2595
|
+
readonly SUBSCRIPTION: "SUBSCRIPTION";
|
|
2595
2596
|
};
|
|
2596
2597
|
type PaymentOptionKind = (typeof PAYMENT_OPTION_KIND)[keyof typeof PAYMENT_OPTION_KIND];
|
|
2597
2598
|
//#endregion
|
|
@@ -2743,6 +2744,7 @@ interface PaymentOption {
|
|
|
2743
2744
|
* - `'CUSTOM_PRICE'`: The service has a price description instead of an amount, in `priceText`.
|
|
2744
2745
|
* - `'MEMBERSHIP'`: Pay with a membership the visitor has, in `membership`.
|
|
2745
2746
|
* - `'BUY_PLAN'`: Buy a plan and pay with it, in `purchasablePlan`.
|
|
2747
|
+
* - `'SUBSCRIPTION'`: Pay online every billing cycle. `amount` is what each cycle costs.
|
|
2746
2748
|
*/
|
|
2747
2749
|
kind: PaymentOptionKind;
|
|
2748
2750
|
/**
|
|
@@ -2757,7 +2759,8 @@ interface PaymentOption {
|
|
|
2757
2759
|
* Amount to pay with the option, with its currency. Format it for the visitor's locale before you
|
|
2758
2760
|
* show it.
|
|
2759
2761
|
*
|
|
2760
|
-
* `null` for a free service, a custom price, a membership, and a plan to buy.
|
|
2762
|
+
* `null` for a free service, a custom price, a membership, and a plan to buy. For a
|
|
2763
|
+
* `'SUBSCRIPTION'` option, the amount of each billing cycle.
|
|
2761
2764
|
*/
|
|
2762
2765
|
amount: Money | null;
|
|
2763
2766
|
/**
|
|
@@ -2886,6 +2889,11 @@ interface BookingPayment {
|
|
|
2886
2889
|
depositSelected: boolean | null;
|
|
2887
2890
|
/** The plan bought in the same cart that pays this entry. */
|
|
2888
2891
|
purchase?: PlanPurchase | null;
|
|
2892
|
+
/**
|
|
2893
|
+
* Whether the entry is paid by subscription, every billing cycle. Its card is taken on the
|
|
2894
|
+
* checkout page, so the booking always goes there.
|
|
2895
|
+
*/
|
|
2896
|
+
subscription?: boolean;
|
|
2889
2897
|
}
|
|
2890
2898
|
interface CreateBookingInput {
|
|
2891
2899
|
/**
|
|
@@ -3134,13 +3142,21 @@ type CreateBookingOutcome = {
|
|
|
3134
3142
|
interface BookingCheckoutState {
|
|
3135
3143
|
/**
|
|
3136
3144
|
* The services the visitor selected, with their time slots and choices, read from the page URL's
|
|
3137
|
-
* `
|
|
3138
|
-
* visitor to the Booking Form page. To build a link that carries the selection
|
|
3139
|
-
* Service context's `withSelectionParam()`. The parameter's format is internal
|
|
3145
|
+
* `bookingSelection` query parameter. The Service and Time Slots contexts write that parameter when
|
|
3146
|
+
* they send the visitor to the Booking Form page. To build a link that carries the selection
|
|
3147
|
+
* yourself, use the Service context's `withSelectionParam()`. The parameter's format is internal
|
|
3148
|
+
* and can change.
|
|
3140
3149
|
*
|
|
3141
|
-
* `null` when the URL has no selection, or it holds no service
|
|
3150
|
+
* `null` when the URL has no selection, or it holds no service, and while `isSelectionPending` is
|
|
3151
|
+
* `true`.
|
|
3142
3152
|
*/
|
|
3143
3153
|
selection: BookingPreferences | null;
|
|
3154
|
+
/**
|
|
3155
|
+
* Whether the booking preferences in the page's URL are still unread. The page's first render
|
|
3156
|
+
* ignores them, so its server HTML is the same for every visitor; they apply right after. While
|
|
3157
|
+
* `true`, show a loading state rather than "nothing selected".
|
|
3158
|
+
*/
|
|
3159
|
+
isSelectionPending: boolean;
|
|
3144
3160
|
/**
|
|
3145
3161
|
* Whether the selection has everything a booking needs and a booking form is registered. Every
|
|
3146
3162
|
* service needs a service type, a time slot with a time zone, and a schedule or session ID. A
|