@wix/bookings 1.0.1796 → 1.0.1797

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 (71) hide show
  1. package/build/cjs/context-booking-checkout.d.ts +3 -37
  2. package/build/cjs/context-booking-checkout.js +1350 -1340
  3. package/build/cjs/context-booking-checkout.js.map +1 -1
  4. package/build/cjs/context-categories.d.ts +1 -3
  5. package/build/cjs/context-categories.js +20 -43
  6. package/build/cjs/context-categories.js.map +1 -1
  7. package/build/cjs/context-locations.d.ts +1 -1
  8. package/build/cjs/context-locations.js +20 -43
  9. package/build/cjs/context-locations.js.map +1 -1
  10. package/build/cjs/context-service-addons.d.ts +1 -15
  11. package/build/cjs/context-service-addons.js +20 -43
  12. package/build/cjs/context-service-addons.js.map +1 -1
  13. package/build/cjs/context-service.d.ts +1 -65
  14. package/build/cjs/context-service.js +363 -386
  15. package/build/cjs/context-service.js.map +1 -1
  16. package/build/cjs/context-services.d.ts +1 -23
  17. package/build/cjs/context-services.js +542 -566
  18. package/build/cjs/context-services.js.map +1 -1
  19. package/build/cjs/context-time-slots.d.ts +1 -21
  20. package/build/cjs/context-time-slots.js +588 -615
  21. package/build/cjs/context-time-slots.js.map +1 -1
  22. package/build/es/context-booking-checkout.d.mts +3 -37
  23. package/build/es/context-booking-checkout.mjs +1350 -1340
  24. package/build/es/context-booking-checkout.mjs.map +1 -1
  25. package/build/es/context-categories.d.mts +1 -3
  26. package/build/es/context-categories.mjs +20 -43
  27. package/build/es/context-categories.mjs.map +1 -1
  28. package/build/es/context-locations.d.mts +1 -1
  29. package/build/es/context-locations.mjs +20 -43
  30. package/build/es/context-locations.mjs.map +1 -1
  31. package/build/es/context-service-addons.d.mts +1 -15
  32. package/build/es/context-service-addons.mjs +20 -43
  33. package/build/es/context-service-addons.mjs.map +1 -1
  34. package/build/es/context-service.d.mts +1 -65
  35. package/build/es/context-service.mjs +363 -386
  36. package/build/es/context-service.mjs.map +1 -1
  37. package/build/es/context-services.d.mts +1 -23
  38. package/build/es/context-services.mjs +542 -566
  39. package/build/es/context-services.mjs.map +1 -1
  40. package/build/es/context-time-slots.d.mts +1 -21
  41. package/build/es/context-time-slots.mjs +588 -615
  42. package/build/es/context-time-slots.mjs.map +1 -1
  43. package/build/internal/cjs/context-booking-checkout.d.ts +3 -37
  44. package/build/internal/cjs/context-categories.d.ts +1 -3
  45. package/build/internal/cjs/context-locations.d.ts +1 -1
  46. package/build/internal/cjs/context-service-addons.d.ts +1 -15
  47. package/build/internal/cjs/context-service.d.ts +1 -65
  48. package/build/internal/cjs/context-services.d.ts +1 -23
  49. package/build/internal/cjs/context-time-slots.d.ts +1 -21
  50. package/build/internal/es/context-booking-checkout.d.mts +3 -37
  51. package/build/internal/es/context-categories.d.mts +1 -3
  52. package/build/internal/es/context-locations.d.mts +1 -1
  53. package/build/internal/es/context-service-addons.d.mts +1 -15
  54. package/build/internal/es/context-service.d.mts +1 -65
  55. package/build/internal/es/context-services.d.mts +1 -23
  56. package/build/internal/es/context-time-slots.d.mts +1 -21
  57. package/context-runtime/context-booking-checkout/runtime.d.ts +3 -38
  58. package/context-runtime/context-booking-checkout/runtime.js +3 -3
  59. package/context-runtime/context-categories/runtime.d.ts +1 -4
  60. package/context-runtime/context-categories/runtime.js +2 -2
  61. package/context-runtime/context-locations/runtime.d.ts +1 -2
  62. package/context-runtime/context-locations/runtime.js +2 -2
  63. package/context-runtime/context-service/runtime.d.ts +1 -66
  64. package/context-runtime/context-service/runtime.js +3 -3
  65. package/context-runtime/context-service-addons/runtime.d.ts +1 -16
  66. package/context-runtime/context-service-addons/runtime.js +2 -2
  67. package/context-runtime/context-services/runtime.d.ts +1 -24
  68. package/context-runtime/context-services/runtime.js +3 -3
  69. package/context-runtime/context-time-slots/runtime.d.ts +1 -22
  70. package/context-runtime/context-time-slots/runtime.js +3 -3
  71. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
 
3
- //#region ../../node_modules/type-fest/source/observable-like.d.ts
3
+ // ../../node_modules/type-fest/source/observable-like.d.ts
4
4
  declare global {
5
5
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
6
6
  interface SymbolConstructor {
@@ -17,8 +17,6 @@ As well, some guidance on making an `Observable` to not include `closed` propert
17
17
 
18
18
  @category Observable
19
19
  */
20
- //#endregion
21
- //#region ../../node_modules/@wix/sdk-types/internal/build/index.d.ts
22
20
  declare global {
23
21
  interface ContextualClient {}
24
22
  }
@@ -64,8 +62,6 @@ declare global {
64
62
  */
65
63
  interface SDKTypeMode {}
66
64
  }
67
- //#endregion
68
- //#region ../../node_modules/@wix/auto_sdk_bookings_service-options-and-variants/build/es/index.typings.d.mts
69
65
  /**
70
66
  * The `serviceOptionsAndVariants` object links a [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction)
71
67
  * to its variants.
@@ -523,8 +519,6 @@ interface ExtendedFields$1 {
523
519
  */
524
520
  namespaces?: Record<string, Record<string, any>>;
525
521
  }
526
- //#endregion
527
- //#region ../../node_modules/@wix/auto_sdk_bookings_services/build/es/bookings-services-v2-service-services.universal-p5eQUd5f.d.mts
528
522
  /** The `service` object represents an offering that a business provides to its customers. */
529
523
  interface Service {
530
524
  /**
@@ -2319,8 +2313,6 @@ interface BookedAddOn {
2319
2313
  nameTranslated?: string | null;
2320
2314
  }
2321
2315
  /** Server-computed datetime adjusted to a requested timezone. */
2322
- //#endregion
2323
- //#region ../../node_modules/@wix/auto_sdk_bookings_bookings/build/es/index.typings.d.mts
2324
2316
  declare enum ResourceTransparency {
2325
2317
  OPAQUE = "OPAQUE",
2326
2318
  TRANSPARENT = "TRANSPARENT"
@@ -2467,8 +2459,6 @@ interface SlotLocation {
2467
2459
  locationType?: LocationLocationTypeWithLiterals;
2468
2460
  }
2469
2461
  /** Response for RescheduleBookingAnonymously */
2470
- //#endregion
2471
- //#region ../bookings-flow-data/dist/types.d.ts
2472
2462
  /**
2473
2463
  * Whether the selection holds 1 service or several services booked together. Supported values:
2474
2464
  * - `'single'`: 1 service.
@@ -2559,11 +2549,7 @@ interface BookingPreferences {
2559
2549
  */
2560
2550
  wantsPromoCode?: boolean;
2561
2551
  }
2562
- //#endregion
2563
- //#region src/api/adapters/service/service.d.ts
2564
2552
  type Service$1 = Service;
2565
- //#endregion
2566
- //#region src/domains/payment-options/consts.d.ts
2567
2553
  /**
2568
2554
  * No MEMBERSHIP on purpose: the data panel would let the owner preselect it and the
2569
2555
  * filter would reduce the list to plan rows. Plan rows carry `paymentMethod: null`.
@@ -2595,8 +2581,6 @@ declare const PAYMENT_OPTION_KIND: {
2595
2581
  readonly SUBSCRIPTION: "SUBSCRIPTION";
2596
2582
  };
2597
2583
  type PaymentOptionKind = (typeof PAYMENT_OPTION_KIND)[keyof typeof PAYMENT_OPTION_KIND];
2598
- //#endregion
2599
- //#region ../../node_modules/@wix/auto_sdk_pricing-plans_plans-v-3/build/es/pricing-plans-v3-plan-plans-v-3.universal-CED5HgCd.d.mts
2600
2584
  /**
2601
2585
  * The choices a buyer makes about a plan, carried in the `options` field of an eCommerce line item's
2602
2586
  * `catalogReference`.
@@ -2671,8 +2655,6 @@ declare enum PurchaseFlow {
2671
2655
  }
2672
2656
  /** @enumType */
2673
2657
  type PurchaseFlowWithLiterals = PurchaseFlow | 'MANUAL' | 'ONLINE';
2674
- //#endregion
2675
- //#region src/domains/payment-options/from-plans.d.ts
2676
2658
  /** A plan in the eCommerce catalog: the plan's `options` carry the pricing variant. */
2677
2659
  interface PlanCatalogReference {
2678
2660
  /** ID of the app that sells the plan. */
@@ -2705,8 +2687,6 @@ interface PlanBenefit {
2705
2687
  */
2706
2688
  redemptionCost: number | null;
2707
2689
  }
2708
- //#endregion
2709
- //#region src/domains/payment-options/from-service.d.ts
2710
2690
  type Payment = NonNullable<Service['payment']>;
2711
2691
  type Money = NonNullable<NonNullable<Payment['fixed']>['price']>;
2712
2692
  interface MembershipRowData {
@@ -2823,8 +2803,6 @@ interface PaymentOption {
2823
2803
  * booking summary to show the option's price and how it's paid.
2824
2804
  */
2825
2805
  type CheckoutPaymentOption = Pick<PaymentOption, 'membership' | 'purchasablePlan'> & Partial<Omit<PaymentOption, 'membership' | 'purchasablePlan'>>;
2826
- //#endregion
2827
- //#region src/domains/payment-options/to-booking.d.ts
2828
2806
  interface SelectedMembership {
2829
2807
  /** ID of the visitor's membership. */
2830
2808
  membershipId: string;
@@ -2835,8 +2813,6 @@ interface SelectedMembership {
2835
2813
  */
2836
2814
  serviceId: string;
2837
2815
  }
2838
- //#endregion
2839
- //#region src/api/adapters/pricing/preview-price.d.ts
2840
2816
  /** Participants to book with 1 price choice. */
2841
2817
  interface ParticipantsServiceChoice {
2842
2818
  /** Number of participants to book with the price choice. */
@@ -2861,8 +2837,6 @@ interface ParticipantsPrice {
2861
2837
  /** Price per participant. Absent unless a single price choice prices all the participants. */
2862
2838
  perParticipant?: number;
2863
2839
  }
2864
- //#endregion
2865
- //#region src/domains/booking-checkout/to-booking-entity.d.ts
2866
2840
  interface ContactDetailsInput {
2867
2841
  /** Visitor's first name. */
2868
2842
  firstName: string;
@@ -2896,6 +2870,7 @@ interface BookingPayment {
2896
2870
  subscription?: boolean;
2897
2871
  }
2898
2872
  interface CreateBookingInput {
2873
+ useCartPaymentConfig?: boolean;
2899
2874
  /**
2900
2875
  * Visitor's contact details, for the cart and the order.
2901
2876
  *
@@ -2959,14 +2934,10 @@ interface CreateBookingInput {
2959
2934
  */
2960
2935
  requiresCheckoutPage?: boolean;
2961
2936
  }
2962
- //#endregion
2963
- //#region src/lib/navigation.d.ts
2964
2937
  type OwnerLink = {
2965
2938
  /** URL to go to. */href: string; /** Where the link opens. */
2966
2939
  target?: /** In the current tab. */'_self' /** In a new tab. The visitor stays on the page in the current tab. */ | '_blank';
2967
2940
  };
2968
- //#endregion
2969
- //#region src/domains/plan-and-book/flow.d.ts
2970
2941
  declare const PLAN_AND_BOOK_CTA: {
2971
2942
  readonly BOOK: "BOOK";
2972
2943
  readonly BUY_PLAN_AND_BOOK: "BUY_PLAN_AND_BOOK";
@@ -2998,8 +2969,6 @@ interface PlanAndBookFlow {
2998
2969
  */
2999
2970
  route: PlanAndBookRoute;
3000
2971
  }
3001
- //#endregion
3002
- //#region src/domains/booking-checkout/checkout-error.d.ts
3003
2972
  /** Why a `createBooking()` or `addToCart()` call failed. */
3004
2973
  interface CheckoutError {
3005
2974
  /**
@@ -3025,8 +2994,6 @@ interface CheckoutError {
3025
2994
  /** Text of the first rule the booking breaks, when the server sends one. */
3026
2995
  violation?: string;
3027
2996
  }
3028
- //#endregion
3029
- //#region src/extensions/contexts/booking-checkout-context/use-booking-checkout.d.ts
3030
2997
  interface BookingFormHandle {
3031
2998
  /**
3032
2999
  * Whether the selection can't join the visitor's cart: the cart holds an appointment with the
@@ -3095,6 +3062,7 @@ interface FormFacts {
3095
3062
  */
3096
3063
  paymentOption: BookingPaymentOption; /** Whether the service has a price above 0. */
3097
3064
  hasPrice: boolean;
3065
+ skipsStoredPaymentMethod?: boolean;
3098
3066
  }[];
3099
3067
  /** Whether the visitor's cart holds bookings. Other items in the cart don't count. */
3100
3068
  hasBookingsInCart: boolean;
@@ -3580,8 +3548,6 @@ interface BookingCheckoutState {
3580
3548
  */
3581
3549
  setWantsPromoCode: (wanted: boolean) => void;
3582
3550
  }
3583
- //#endregion
3584
- //#region src/extensions/contexts/booking-checkout-context/booking-checkout-context.d.ts
3585
3551
  /** The booking in progress: the selection decoded from the page URL, its payment options and participant count, and the actions to create the booking or add it to the cart. */
3586
3552
  type BookingCheckoutContextValue = BookingCheckoutState;
3587
3553
  /**