@wix/bookings 1.0.1753 → 1.0.1755

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 (46) hide show
  1. package/_sdk-exports/context-booking-checkout/runtime.d.ts +750 -143
  2. package/_sdk-exports/context-booking-checkout/runtime.js +2 -2
  3. package/_sdk-exports/context-categories/runtime.d.ts +164 -2
  4. package/_sdk-exports/context-locations/runtime.d.ts +186 -2
  5. package/_sdk-exports/context-service/runtime.d.ts +1499 -144
  6. package/_sdk-exports/context-service/runtime.js +2 -2
  7. package/_sdk-exports/context-service-addons/runtime.d.ts +215 -13
  8. package/_sdk-exports/context-services/runtime.d.ts +330 -77
  9. package/_sdk-exports/context-time-slots/runtime.d.ts +841 -72
  10. package/build/cjs/context-booking-checkout.d.ts +750 -143
  11. package/build/cjs/context-booking-checkout.js +1823 -1706
  12. package/build/cjs/context-booking-checkout.js.map +1 -1
  13. package/build/cjs/context-categories.d.ts +164 -2
  14. package/build/cjs/context-locations.d.ts +186 -2
  15. package/build/cjs/context-service-addons.d.ts +215 -13
  16. package/build/cjs/context-service.d.ts +1499 -144
  17. package/build/cjs/context-service.js +1234 -1230
  18. package/build/cjs/context-service.js.map +1 -1
  19. package/build/cjs/context-services.d.ts +330 -77
  20. package/build/cjs/context-time-slots.d.ts +841 -72
  21. package/build/es/context-booking-checkout.d.mts +750 -143
  22. package/build/es/context-booking-checkout.mjs +1835 -1709
  23. package/build/es/context-booking-checkout.mjs.map +1 -1
  24. package/build/es/context-categories.d.mts +164 -2
  25. package/build/es/context-locations.d.mts +186 -2
  26. package/build/es/context-service-addons.d.mts +215 -13
  27. package/build/es/context-service.d.mts +1499 -144
  28. package/build/es/context-service.mjs +1234 -1230
  29. package/build/es/context-service.mjs.map +1 -1
  30. package/build/es/context-services.d.mts +330 -77
  31. package/build/es/context-time-slots.d.mts +841 -72
  32. package/build/internal/cjs/context-booking-checkout.d.ts +750 -143
  33. package/build/internal/cjs/context-categories.d.ts +164 -2
  34. package/build/internal/cjs/context-locations.d.ts +186 -2
  35. package/build/internal/cjs/context-service-addons.d.ts +215 -13
  36. package/build/internal/cjs/context-service.d.ts +1499 -144
  37. package/build/internal/cjs/context-services.d.ts +330 -77
  38. package/build/internal/cjs/context-time-slots.d.ts +841 -72
  39. package/build/internal/es/context-booking-checkout.d.mts +750 -143
  40. package/build/internal/es/context-categories.d.mts +164 -2
  41. package/build/internal/es/context-locations.d.mts +186 -2
  42. package/build/internal/es/context-service-addons.d.mts +215 -13
  43. package/build/internal/es/context-service.d.mts +1499 -144
  44. package/build/internal/es/context-services.d.mts +330 -77
  45. package/build/internal/es/context-time-slots.d.mts +841 -72
  46. package/package.json +9 -9
@@ -774,7 +774,7 @@ type Link = {
774
774
  * You can use it to offer customers different prices for a service,
775
775
  * depending on which choices they book.
776
776
  */
777
- interface ServiceOptionsAndVariants$1 {
777
+ interface ServiceOptionsAndVariants {
778
778
  /**
779
779
  * ID of the `serviceOptionsAndVariants` object.
780
780
  * @format GUID
@@ -857,6 +857,11 @@ declare enum ServiceOptionType {
857
857
  * @documentationMaturity preview
858
858
  */
859
859
  NUMBER_OF_PARTICIPANTS = "NUMBER_OF_PARTICIPANTS",
860
+ /**
861
+ * The price is resolved by the business location the service is booked at.
862
+ * @documentationMaturity preview
863
+ */
864
+ LOCATION = "LOCATION",
860
865
  /**
861
866
  * The price is resolved from pricing tiers based on the booking duration range.
862
867
  * @documentationMaturity preview
@@ -864,7 +869,7 @@ declare enum ServiceOptionType {
864
869
  DURATION_RANGE = "DURATION_RANGE"
865
870
  }
866
871
  /** @enumType */
867
- type ServiceOptionTypeWithLiterals = ServiceOptionType | 'UNKNOWN' | 'CUSTOM' | 'STAFF_MEMBER' | 'DURATION' | 'DATE_TIME' | 'NUMBER_OF_PARTICIPANTS' | 'DURATION_RANGE';
872
+ type ServiceOptionTypeWithLiterals = ServiceOptionType | 'UNKNOWN' | 'CUSTOM' | 'STAFF_MEMBER' | 'DURATION' | 'DATE_TIME' | 'NUMBER_OF_PARTICIPANTS' | 'LOCATION' | 'DURATION_RANGE';
868
873
  interface CustomServiceOption {
869
874
  /**
870
875
  * Name of the service option. For example, `Age group`, `Location`, `Equipment`,
@@ -925,6 +930,14 @@ interface ServiceChoice extends ServiceChoiceChoiceOneOf {
925
930
  dateTime?: DateTimeRule;
926
931
  /** A rule resolving the price by the number of participants. Available only for `NUMBER_OF_PARTICIPANTS` options. */
927
932
  participantRange?: ParticipantsRange;
933
+ /**
934
+ * ID of the business location the price applies to.
935
+ *
936
+ * Limited to business locations. Custom and customer locations aren't supported.
937
+ * Available only for `LOCATION` options.
938
+ * @format GUID
939
+ */
940
+ businessLocationId?: string;
928
941
  /**
929
942
  * A duration range tier resolving the price by how long the booking is.
930
943
  * Available only for `DURATION_RANGE` options.
@@ -956,6 +969,14 @@ interface ServiceChoiceChoiceOneOf {
956
969
  dateTime?: DateTimeRule;
957
970
  /** A rule resolving the price by the number of participants. Available only for `NUMBER_OF_PARTICIPANTS` options. */
958
971
  participantRange?: ParticipantsRange;
972
+ /**
973
+ * ID of the business location the price applies to.
974
+ *
975
+ * Limited to business locations. Custom and customer locations aren't supported.
976
+ * Available only for `LOCATION` options.
977
+ * @format GUID
978
+ */
979
+ businessLocationId?: string;
959
980
  /**
960
981
  * A duration range tier resolving the price by how long the booking is.
961
982
  * Available only for `DURATION_RANGE` options.
@@ -1205,9 +1226,9 @@ interface ExtendedFields$1 {
1205
1226
  namespaces?: Record<string, Record<string, any>>;
1206
1227
  }
1207
1228
  //#endregion
1208
- //#region ../../node_modules/@wix/auto_sdk_bookings_services/build/es/bookings-services-v2-service-services.universal-Bf4TC5aj.d.mts
1229
+ //#region ../../node_modules/@wix/auto_sdk_bookings_services/build/es/bookings-services-v2-service-services.universal-oLBaHt-W.d.mts
1209
1230
  /** The `service` object represents an offering that a business provides to its customers. */
1210
- interface Service$1 {
1231
+ interface Service {
1211
1232
  /**
1212
1233
  * Service ID.
1213
1234
  * @format GUID
@@ -2251,6 +2272,7 @@ interface CancellationFeePolicy {
2251
2272
  */
2252
2273
  autoCollectFeeEnabled?: boolean | null;
2253
2274
  }
2275
+ /** What happens to the plan credit when the customer cancels a booking paid with a pricing plan. */
2254
2276
  interface CancellationWindow extends CancellationWindowFeeOneOf {
2255
2277
  /** Amount to be charged as a cancellation fee. */
2256
2278
  amount?: Money;
@@ -2459,12 +2481,7 @@ interface DailyConfig {
2459
2481
  */
2460
2482
  maxDurationInDays?: number;
2461
2483
  }
2462
- /**
2463
- * Controls how a service's own working hours combine with the working hours of its assigned
2464
- * staff members and required resources. The hours themselves are not held here. They are the
2465
- * `WORKING_HOURS` events on the service's schedule (`schedule.id`), and this message controls
2466
- * only how they combine with the resources working hours.
2467
- */
2484
+ /** Times of day at which each bookable day of a daily service starts and ends. */
2468
2485
  interface StaffMember {
2469
2486
  /**
2470
2487
  * ID of the [resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction) associated with the staff member providing the service.
@@ -2486,6 +2503,14 @@ interface StaffMember {
2486
2503
  * @readonly
2487
2504
  */
2488
2505
  mainMedia?: StaffMediaItem;
2506
+ /**
2507
+ * Business locations where the staff member is available, based on their working hours.
2508
+ * Returned only when both `STAFF_MEMBER_DETAILS` and `STAFF_WORKING_HOURS_LOCATIONS` are passed in `conditionalFields`.
2509
+ * Can be omitted for a staff member who has no working hours. Treat a missing value the same as `availableAtAllLocations` set to `false` with an empty `locationIds`.
2510
+ * When the working hours data can't be retrieved, the entire request fails.
2511
+ * @readonly
2512
+ */
2513
+ workingHoursLocationCoverage?: WorkingHoursLocationCoverage;
2489
2514
  }
2490
2515
  interface StaffMediaItem extends StaffMediaItemItemOneOf {
2491
2516
  /** Details of the image associated with the staff, such as URL and size. */
@@ -2497,24 +2522,29 @@ interface StaffMediaItemItemOneOf {
2497
2522
  image?: string;
2498
2523
  }
2499
2524
  /**
2500
- * Working hours location coverage derived from Calendar v3 WORKING_HOURS events
2501
- * (`NONE` and `MASTER` recurrence types). The server paginates through Calendar results
2502
- * (100 events per page) until all matching events are collected.
2503
- *
2504
- * Coverage states when enrichment is requested:
2505
- * + `available_at_all_locations = true`: Staff applies to every business location. Set when the staff
2506
- * uses default business working hours, or has any WORKING_HOURS event without a location ID
2507
- * (including when mixed with location-specific events).
2508
- * + `available_at_all_locations = false` with non-empty `location_ids`: Staff has location-specific
2509
- * WORKING_HOURS only. Show the staff member only when the selected location is in `location_ids`.
2510
- * + `available_at_all_locations = false` with empty `location_ids`: Staff has working-hours schedules
2511
- * but no applicable location coverage was found.
2512
- *
2513
- * Recommended client filter:
2514
- * `availableAtAllLocations || locationIds.includes(selectedLocationId)`
2525
+ * Business locations where a staff member is available, based on their current and upcoming working hours.
2515
2526
  *
2516
- * Omitted when `STAFF_WORKING_HOURS_LOCATIONS` is not requested.
2527
+ * Coverage has 3 possible states:
2528
+ * + `availableAtAllLocations` is `true`: The staff member is available at every business location. This is the case when the staff member uses the business's default working hours, or when at least one of their working hours isn't limited to a specific location.
2529
+ * + `availableAtAllLocations` is `false` and `locationIds` isn't empty: The staff member is available at the business locations listed in `locationIds`.
2530
+ * + `availableAtAllLocations` is `false` and `locationIds` is empty: The staff member has no current or upcoming working hours, so they aren't available at any business location.
2531
+ * To check whether a staff member is available at a specific location, use `availableAtAllLocations || locationIds.includes(locationId)`.
2517
2532
  */
2533
+ interface WorkingHoursLocationCoverage {
2534
+ /**
2535
+ * Whether the staff member is available at every business location.
2536
+ * @readonly
2537
+ */
2538
+ availableAtAllLocations?: boolean | null;
2539
+ /**
2540
+ * IDs of the business locations where the staff member has location-specific working hours.
2541
+ * Empty when `availableAtAllLocations` is `true`.
2542
+ * @format GUID
2543
+ * @readonly
2544
+ * @maxSize 100
2545
+ */
2546
+ locationIds?: string[];
2547
+ }
2518
2548
  interface StaffMemberDetails {
2519
2549
  /**
2520
2550
  * Staff members providing the service. For appointments only.
@@ -2614,73 +2644,117 @@ interface ExtendedFields {
2614
2644
  namespaces?: Record<string, Record<string, any>>;
2615
2645
  }
2616
2646
  /**
2617
- * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
2618
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
2619
- * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
2647
+ * The SEO data for a single page or dynamic item, in the shape stored today.
2648
+ *
2649
+ * FROZEN. Existing server code maps onto this message field by field, so its
2650
+ * field set must never change (see the file header). New writers use
2651
+ * `SeoSchemaV2`.
2652
+ *
2653
+ * These tags are rendered into the <head> of the HTML document and are not
2654
+ * visible on the page itself. They override every other source of tags
2655
+ * (site defaults, vertical presets, patterns) for this page.
2620
2656
  */
2621
2657
  interface SeoSchema {
2622
- /** SEO tag information. */
2658
+ /**
2659
+ * The tags rendered into <head>, in no particular order. Render order is
2660
+ * decided by the renderer, not by position in this list.
2661
+ *
2662
+ * No maxSize: this list is already populated by data written years ago, and
2663
+ * a bound added now could reject a page that is already stored.
2664
+ */
2623
2665
  tags?: Tag[];
2624
- /** SEO general settings. */
2666
+ /** Page-level SEO settings that are not themselves tags. */
2625
2667
  settings?: Settings;
2626
2668
  }
2669
+ /** A keyword term the user is targeting. */
2627
2670
  interface Keyword {
2628
- /** Keyword value. */
2671
+ /**
2672
+ * The term itself, e.g. "trail running shoes".
2673
+ *
2674
+ * No maxLength, for the same reason as the legacy tag fields: keywords are
2675
+ * already stored, and a bound added now could reject a record written
2676
+ * before the bound existed. The flynt `missing-string-validations` warning
2677
+ * on this field is accepted deliberately.
2678
+ */
2629
2679
  term?: string;
2630
- /** Whether the keyword is the main focus keyword. */
2680
+ /** Whether this is the page's primary focus keyword. At most one per page. */
2631
2681
  isMain?: boolean;
2632
2682
  /**
2633
- * The source that added the keyword terms to the SEO settings.
2683
+ * Which surface added the term, e.g. a panel or a suggestion flow. Used for
2684
+ * attribution in BI. Opaque to the renderer.
2634
2685
  * @maxLength 1000
2635
2686
  */
2636
2687
  origin?: string | null;
2637
2688
  }
2689
+ /**
2690
+ * One tag in the page's <head>.
2691
+ *
2692
+ * Not deprecated, and with no removal date, deliberately: stored data is
2693
+ * never migrated, so this shape stays valid input forever. `seo-renderer`
2694
+ * normalizes both shapes on READ.
2695
+ */
2638
2696
  interface Tag {
2639
2697
  /**
2640
- * SEO tag type.
2641
- *
2698
+ * Legacy. Was a free-form string: "title" | "meta" | "script" | "link".
2699
+ * The typed replacement is the `kind` oneof on `SeoSchemaV2.Tag`, which makes
2700
+ * the invalid combinations unrepresentable rather than merely discouraged.
2642
2701
  *
2643
- * Supported values: `title`, `meta`, `script`, `link`.
2644
- *
2645
- * Which of these an API actually accepts depends on where the tag is being set: this
2646
- * list is not a blanket guarantee across every API that reuses this message. Site SEO
2647
- * Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects
2648
- * `title`/`script`/`link` with a validation error even though they appear here —
2649
- * check the field description of the specific `tags`-typed field you're writing to
2650
- * for the types it actually supports and the error it returns.
2702
+ * Which of these an API actually accepts depends on where the tag is being
2703
+ * set: this list is not a blanket guarantee across every API that reuses
2704
+ * this message. Site SEO Tags in particular accepts only `meta` (see
2705
+ * `SiteSeoTags.tags`) and rejects `title`/`script`/`link` with a validation
2706
+ * error even though they appear here — check the field description of the
2707
+ * specific `tags`-typed field you are writing to.
2651
2708
  *
2652
2709
  * Limitation: `title` and `script` (e.g. a `script` tag with `props.type`
2653
- * `"application/ld+json"` carrying structured data) are supported only when
2654
- * `custom` is unset or `false`. Setting `custom: true` on a `title` or `script`
2655
- * tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the
2656
- * write through the site's Advanced/Custom Tags list. To write structured data,
2657
- * omit `custom` (or set it to `false`).
2710
+ * "application/ld+json" carrying structured data) are supported only when
2711
+ * `custom` is unset or `false`. Setting `custom: true` on a `title` or
2712
+ * `script` tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because
2713
+ * `custom: true` routes the write through the site's Advanced/Custom Tags
2714
+ * list. To write structured data, omit `custom` (or set it to `false`).
2715
+ *
2716
+ * No length limit: this field holds data written years ago by writers we
2717
+ * are not migrating. A constraint here could reject a record that is
2718
+ * already stored, which is exactly the promise this design makes.
2658
2719
  */
2659
2720
  type?: string;
2660
2721
  /**
2661
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
2662
- * For example: `{"name": "description", "content": "the description itself"}`.
2722
+ * Legacy. Was an untyped bag of HTML attributes.
2723
+ * Typed replacement: `SeoSchemaV2.TitleTag` / `MetaTag` / `LinkTag`.
2663
2724
  */
2664
2725
  props?: Record<string, any> | null;
2665
- /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
2726
+ /**
2727
+ * Legacy. Was an untyped bag of 16 mixed-purpose keys. In `SeoSchemaV2`
2728
+ * its contents are split by purpose: per-page structured-data state moves to
2729
+ * StructuredDataTag, authorship to `written_by`, and render-time preset
2730
+ * logic (variants, enabledByExperiment, removeSchemaIf*) moved out of the
2731
+ * stored document entirely — it belongs to the preset definition, not to the
2732
+ * page. See the design log for the full key-by-key mapping.
2733
+ */
2666
2734
  meta?: Record<string, any> | null;
2667
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
2735
+ /**
2736
+ * Legacy. Was the tag's inner content, doubling as the JSON-LD payload
2737
+ * for script tags. Typed replacement: `SeoSchemaV2.TitleTag.text` and
2738
+ * `StructuredDataTag.json_ld`.
2739
+ * No length limit, for the same reason as `type` above.
2740
+ */
2668
2741
  children?: string;
2669
2742
  /**
2670
2743
  * Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
2671
2744
  * i.e. an entry from the site's Advanced/Custom Tags list.
2672
2745
  *
2673
- * Setting this to `true` on a write restricts which `type` values are accepted
2674
- * — the same restriction the Advanced/Custom Tags UI enforces. `title` and
2675
- * `script` tags (including JSON-LD structured data) must be sent with `custom`
2676
- * omitted or `false`; sending them with `custom: true` is rejected with
2677
- * `TAG_TYPE_NOT_ALLOWED`.
2746
+ * Setting this to `true` on a write restricts which `type` values are
2747
+ * accepted — the same restriction the Advanced/Custom Tags UI enforces.
2748
+ * `title` and `script` tags (including JSON-LD structured data) must be sent
2749
+ * with `custom` omitted or `false`; sending them with `custom: true` is
2750
+ * rejected with `TAG_TYPE_NOT_ALLOWED`.
2678
2751
  *
2679
- * Note this is a separate restriction from Site SEO Tags' own type restriction on
2680
- * `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g.
2681
- * for site-wide structured data) unconditionally. There is currently no way to set
2682
- * site-wide, every-page structured data through any of these APIs — write a per-page
2683
- * `script` tag through the Item SEO Tags API instead.
2752
+ * Note this is a separate restriction from Site SEO Tags' own type
2753
+ * restriction on `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags
2754
+ * rejects `script` (e.g. for site-wide structured data) unconditionally.
2755
+ * There is currently no way to set site-wide, every-page structured data
2756
+ * through any of these APIs — write a per-page `script` tag through the Item
2757
+ * SEO Tags API instead.
2684
2758
  *
2685
2759
  * This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
2686
2760
  * (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
@@ -2693,22 +2767,39 @@ interface Tag {
2693
2767
  * or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
2694
2768
  * response entirely — there, `false` means this API could not tell, not that no custom tag exists.
2695
2769
  * Pass `seoData` explicitly to resolve against a known set of tags.
2770
+ *
2771
+ * `SeoSchemaV2.Tag` expresses this as `written_by = USER_CUSTOM`.
2696
2772
  */
2697
2773
  custom?: boolean;
2698
- /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
2774
+ /**
2775
+ * Whether the tag is excluded from the rendered <head>.
2776
+ *
2777
+ * A disabled tag is still stored, so the user can re-enable it and so a
2778
+ * pattern-provided tag stays suppressed on this page. Default false.
2779
+ */
2699
2780
  disabled?: boolean;
2700
2781
  }
2782
+ /** Page-level SEO settings that are not tags. */
2701
2783
  interface Settings {
2702
2784
  /**
2703
- * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.
2704
- *
2785
+ * Whether to suppress the automatic redirect from this page's previous URL to
2786
+ * its current one after a slug change.
2705
2787
  *
2706
- * Default: `false` (automatical redirect is enabled).
2788
+ * Default false, meaning the redirect IS created. The field is named for the
2789
+ * exception rather than the rule, which reads backwards; kept as-is because
2790
+ * renaming a stored boolean is not worth the migration.
2707
2791
  */
2708
2792
  preventAutoRedirect?: boolean;
2709
2793
  /**
2710
- * User-selected keyword terms for a specific page.
2711
- * @maxSize 5
2794
+ * Keyword terms the user is targeting for this page. Used by the SEO
2795
+ * assistant and checklist; never rendered into <head>.
2796
+ *
2797
+ * 20 is a sanity bound, not the product limit. v1 declared 5 — the number
2798
+ * the panel happens to allow today — which is exactly the mistake we are
2799
+ * fixing for structured data. A product decision to allow 8 should not need
2800
+ * a proto release, so the panel owns that number and the proto only stops
2801
+ * something absurd.
2802
+ * @maxSize 20
2712
2803
  */
2713
2804
  keywords?: Keyword[];
2714
2805
  }
@@ -2777,19 +2868,36 @@ declare enum BasedOn {
2777
2868
  type BasedOnWithLiterals = BasedOn | 'BUSINESS_TIME_ZONE' | 'CUSTOMER_TIME_ZONE';
2778
2869
  //#endregion
2779
2870
  //#region src/api/adapters/service/service.d.ts
2780
- type Service = Service$1;
2781
2871
  //#endregion
2782
2872
  //#region src/api/adapters/service-options-and-variants/service-options-and-variants.d.ts
2783
- type ServiceOptionsAndVariants = ServiceOptionsAndVariants$1;
2784
2873
  //#endregion
2785
2874
  //#region src/api/adapters/bookings-settings/bookings-settings.d.ts
2786
2875
  /** A policy, not an IANA zone: the real zone needs the business zone from site properties. */
2787
2876
  type DisplayTimeZonePolicy = {
2877
+ /**
2878
+ * Time zone the site shows times in by default.
2879
+ *
2880
+ * Supported values:
2881
+ * - `'BUSINESS_TIME_ZONE'`: The business's time zone.
2882
+ * - `'CUSTOMER_TIME_ZONE'`: The time zone of the visitor's browser.
2883
+ */
2788
2884
  basedOn: BasedOnWithLiterals;
2885
+ /**
2886
+ * Whether visitors can switch between the business's time zone and their own when they view
2887
+ * times.
2888
+ */
2789
2889
  customerCanChange: boolean;
2790
2890
  };
2891
+ /**
2892
+ * The business's booking settings that affect how the site shows services and times.
2893
+ *
2894
+ * When loading the settings fails, holds the defaults: times in the business's time zone, which
2895
+ * visitors can't change, and multi-service appointments turned off.
2896
+ */
2791
2897
  interface ExposedBookingsSettings {
2898
+ /** Policy for the time zone the site shows times in. */
2792
2899
  displayTimeZonePolicy: DisplayTimeZonePolicy;
2900
+ /** Whether visitors can book more than 1 service in a single appointment. */
2793
2901
  multiServiceAppointmentsEnabled: boolean;
2794
2902
  }
2795
2903
  //#endregion
@@ -2806,30 +2914,168 @@ interface CategoriesPickerFilter {
2806
2914
  //#region src/extensions/contexts/services-context/services-context.d.ts
2807
2915
  /** Raw data only; the nested service-context derives display values. Not for direct binding. */
2808
2916
  interface ServiceItem {
2917
+ /**
2918
+ * Service ID.
2919
+ *
2920
+ * `null` for the sample services shown in the editor.
2921
+ */
2809
2922
  serviceId: string | null;
2923
+ /**
2924
+ * Number that increases each time the services reload because a service changed while the site
2925
+ * is open in the editor.
2926
+ *
2927
+ * Always `0` on the live site.
2928
+ */
2810
2929
  refreshSignal: number;
2930
+ /**
2931
+ * The service, as the
2932
+ * [Services
2933
+ * API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction)
2934
+ * returns it.
2935
+ */
2811
2936
  service: Service;
2937
+ /**
2938
+ * Calendar events that define the sessions of a class or course, from today on: the events that
2939
+ * repeat on a schedule, and the sessions added one at a time. To get an event's details, use the
2940
+ * [Events
2941
+ * API](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/introduction).
2942
+ *
2943
+ * Times are in the time zone that `bookingsSettings.displayTimeZonePolicy` sets.
2944
+ *
2945
+ * The events load after the service shows, so the array is empty until they arrive. Always empty
2946
+ * for an appointment or a service with no schedule, and when loading the events fails.
2947
+ */
2812
2948
  masterEvents: Event[];
2813
- /** Null when not VARIED, not loaded yet, or failed (a failed refetch keeps the last value). */
2949
+ /**
2950
+ * Service's options and variants, which set the prices of its choices, as the [Service Options
2951
+ * and Variants
2952
+ * API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction)
2953
+ * returns them.
2954
+ *
2955
+ * `null` for a service without varied pricing, while they load, and when they fail to load. When
2956
+ * reloading them fails, it keeps the ones that loaded before.
2957
+ */
2814
2958
  serviceOptionsAndVariants: ServiceOptionsAndVariants | null;
2959
+ /** The business's booking settings. The same object as the context's `bookingsSettings`. */
2815
2960
  bookingsSettings: ExposedBookingsSettings;
2816
2961
  /**
2817
- * The service page, resolved like every in-app link to it (custom URL structure first). Read by
2818
- * the gallery converter (data-conversions), which has no site services to resolve it itself.
2819
- * Runtime-only: not declared in the manifest, so it is not a bindable field (the full item rides
2820
- * through regardless). Null when the page can't be resolved (no slug, no service page section).
2962
+ * Link to the service's page. Its `target` is `'_self'`, and its `href` follows the site's custom
2963
+ * URL structure for service pages, when the site has one.
2964
+ *
2965
+ * `null` when there's no link to build, such as when the site has no service page or the service
2966
+ * has no slug.
2821
2967
  */
2822
2968
  servicePageLink: Link | null;
2823
2969
  }
2824
2970
  /** The loaded bookable services, with load-more paging and the category and location they are filtered by. */
2825
2971
  interface ServicesContextValue {
2972
+ /**
2973
+ * Services loaded so far, with an item for each service.
2974
+ *
2975
+ * Holds only services that aren't hidden, filtered by `categoryId` and `locationId`, and limited
2976
+ * to the services and categories chosen in the list's settings. `loadMore()` adds the next page
2977
+ * of services to the end.
2978
+ *
2979
+ * Empty while the list loads or reloads, such as after `categoryId` or `locationId` changes, and
2980
+ * when `hasError` is `true`. In the editor, outside preview mode, a list that loads no services
2981
+ * holds sample services instead.
2982
+ *
2983
+ * Each item supplies the Service context of an item in the list, which works out the values to
2984
+ * show, such as the service's name and price. To show a service, call `useServiceContext()` from
2985
+ * `@wix/bookings/context/service` in a component inside a list item, rather than reading the
2986
+ * item's fields.
2987
+ */
2826
2988
  serviceItems: ServiceItem[];
2989
+ /**
2990
+ * The business's booking settings that affect how the site shows services and times.
2991
+ *
2992
+ * `null` while the context loads for the first time, and when `hasError` is `true` because of an
2993
+ * unexpected error. Check for `null` before you read it.
2994
+ */
2827
2995
  bookingsSettings: ExposedBookingsSettings | null;
2996
+ /**
2997
+ * Whether more services are available to load with `loadMore()`.
2998
+ *
2999
+ * `false` while the list loads or reloads, and when `hasError` is `true`.
3000
+ */
2828
3001
  hasMore: boolean;
3002
+ /**
3003
+ * Whether services are loading.
3004
+ *
3005
+ * `true` while the list loads or reloads, such as after `categoryId` or `locationId` changes, and
3006
+ * while `loadMore()` loads the next page. While the list loads or reloads, `serviceItems` is
3007
+ * empty.
3008
+ * While `loadMore()` loads a page, `serviceItems` keeps the services already loaded.
3009
+ */
2829
3010
  isLoading: boolean;
3011
+ /**
3012
+ * Whether the services failed to load.
3013
+ *
3014
+ * When `true`, `serviceItems` is empty. A failed `loadMore()` call doesn't set it.
3015
+ */
2830
3016
  hasError: boolean;
3017
+ /**
3018
+ * ID of the category that the list filters services by. To get the category's details, use the
3019
+ * [Categories
3020
+ * API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/introduction).
3021
+ *
3022
+ * Inside an item of a categories list, it's that item's category. Otherwise, it's the category in
3023
+ * the page URL's `category` query parameter.
3024
+ *
3025
+ * `null` when the services aren't filtered by category.
3026
+ */
2831
3027
  categoryId: string | null;
3028
+ /**
3029
+ * ID of the business location that the list filters services by, from the page URL's `location`
3030
+ * query parameter. To get the location's details, use the
3031
+ * [Locations
3032
+ * API](https://dev.wix.com/docs/api-reference/business-management/locations/introduction).
3033
+ *
3034
+ * `'OTHER_LOCATIONS'` stands for every location that isn't a business location, so the list holds
3035
+ * the services offered at a custom address or at the customer's place.
3036
+ *
3037
+ * `null` when the services aren't filtered by location.
3038
+ */
2832
3039
  locationId: string | null;
3040
+ /**
3041
+ * Loads the next page of services and adds them to the end of `serviceItems`.
3042
+ *
3043
+ * A page holds the number of services set in the list's settings, up to 100. `isLoading` is
3044
+ * `true` while the page loads. The page's calendar events load after the page is added, so each
3045
+ * new item's `masterEvents` fills in later.
3046
+ *
3047
+ * `loadMore()` doesn't load a page when:
3048
+ * - No more services are left to load. The promise resolves right away.
3049
+ * - A page is already loading. The call returns the promise of the page that's loading.
3050
+ *
3051
+ * When the list reloads while a page loads, such as after `categoryId` or `locationId` changes,
3052
+ * `loadMore()` discards the page.
3053
+ *
3054
+ * Never rejects. When the page fails to load, `serviceItems` and `hasMore` don't change, so
3055
+ * calling `loadMore()` again retries the same page.
3056
+ *
3057
+ * @returns Promise that resolves when the call ends: after `serviceItems` includes the new page,
3058
+ * after the page fails to load, or right away when there's no page to load.
3059
+ *
3060
+ * @example Add a load-more button
3061
+ * ```tsx
3062
+ * import { useServicesContext } from '@wix/bookings/context/services';
3063
+ *
3064
+ * function LoadMoreButton() {
3065
+ * const { hasMore, isLoading, loadMore } = useServicesContext();
3066
+ *
3067
+ * if (!hasMore) {
3068
+ * return null;
3069
+ * }
3070
+ *
3071
+ * return (
3072
+ * <button disabled={isLoading} onClick={() => loadMore()}>
3073
+ * {isLoading ? 'Loading...' : 'Load more'}
3074
+ * </button>
3075
+ * );
3076
+ * }
3077
+ * ```
3078
+ */
2833
3079
  loadMore: () => Promise<void>;
2834
3080
  }
2835
3081
  interface ServicesPickerFilter {
@@ -2848,7 +3094,14 @@ interface ServicesContextProviderProps {
2848
3094
  }
2849
3095
  declare const servicesContext: React.Context<ServicesContextValue | null>;
2850
3096
  declare const SERVICES_CONTEXT_MISSING_PROVIDER_ERROR = "useServicesContext must be used within ServicesContextProvider";
2851
- /** Reads the services list state; throws when no ServicesContextProvider is above. */
3097
+ /**
3098
+ * The `useServicesContext()` hook provides access to a paged list of Wix Bookings services, such as
3099
+ * appointments, classes, and courses, filtered by category and location. Use it to show a list of
3100
+ * services and its loading, error, and empty states, and to load more services when the visitor
3101
+ * asks for them.
3102
+ *
3103
+ * It throws an error where the context isn't available.
3104
+ */
2852
3105
  declare function useServicesContext(): ServicesContextValue;
2853
3106
  /** Loads a paged list of bookable services, filtered by the category and location in the page URL or a category-list item, and narrowed by the service and category pickers. */
2854
3107
  declare function ServicesContextProvider({