@wix/auto_sdk_table-reservations_experiences 1.0.36 → 1.0.37

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 (49) hide show
  1. package/build/cjs/index.d.ts +39 -27
  2. package/build/cjs/index.js +2977 -32
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2 -3
  5. package/build/cjs/index.typings.js +2955 -10
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +7 -7
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/cjs/schemas.d.ts +3 -3
  10. package/build/cjs/schemas.js +2 -2
  11. package/build/cjs/schemas.js.map +1 -1
  12. package/build/cjs/{table-reservations-v1-experience-experiences.universal-BAFNaOzr.d.ts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.ts} +20 -58
  13. package/build/es/index.d.mts +39 -27
  14. package/build/es/index.mjs +2967 -32
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +2 -3
  17. package/build/es/index.typings.mjs +2945 -10
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +7 -7
  20. package/build/es/meta.mjs.map +1 -1
  21. package/build/es/schemas.d.mts +3 -3
  22. package/build/es/schemas.mjs +2 -2
  23. package/build/es/schemas.mjs.map +1 -1
  24. package/build/es/{table-reservations-v1-experience-experiences.universal-BAFNaOzr.d.mts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.mts} +20 -58
  25. package/build/internal/cjs/index.d.ts +39 -27
  26. package/build/internal/cjs/index.js +2977 -32
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +2 -3
  29. package/build/internal/cjs/index.typings.js +2955 -10
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +7 -7
  32. package/build/internal/cjs/meta.js.map +1 -1
  33. package/build/internal/cjs/schemas.d.ts +3 -3
  34. package/build/internal/cjs/schemas.js +2 -2
  35. package/build/internal/cjs/schemas.js.map +1 -1
  36. package/build/internal/cjs/{table-reservations-v1-experience-experiences.universal-BAFNaOzr.d.ts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.ts} +20 -58
  37. package/build/internal/es/index.d.mts +39 -27
  38. package/build/internal/es/index.mjs +2967 -32
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +2 -3
  41. package/build/internal/es/index.typings.mjs +2945 -10
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +7 -7
  44. package/build/internal/es/meta.mjs.map +1 -1
  45. package/build/internal/es/schemas.d.mts +3 -3
  46. package/build/internal/es/schemas.mjs +2 -2
  47. package/build/internal/es/schemas.mjs.map +1 -1
  48. package/build/internal/es/{table-reservations-v1-experience-experiences.universal-BAFNaOzr.d.mts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.mts} +20 -58
  49. package/package.json +2 -2
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // index.ts
@@ -1556,6 +1566,2911 @@ var import_image2 = require("@wix/sdk-runtime/transformations/image");
1556
1566
  var import_page_url_v2 = require("@wix/sdk-runtime/transformations/page-url-v2");
1557
1567
  var import_page_url_v22 = require("@wix/sdk-runtime/transformations/page-url-v2");
1558
1568
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
1569
+
1570
+ // src/table-reservations-v1-experience-experiences.schemas.ts
1571
+ var z = __toESM(require("zod"));
1572
+ var CreateExperienceRequest = z.object({
1573
+ experience: z.object({
1574
+ _id: z.string().describe("Experience ID.").regex(
1575
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1576
+ "Must be a valid GUID"
1577
+ ).optional().nullable(),
1578
+ reservationLocationId: z.string().describe(
1579
+ "ID of the reservation location this experience is assigned to."
1580
+ ).regex(
1581
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1582
+ "Must be a valid GUID"
1583
+ ),
1584
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1585
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
1586
+ ).optional().nullable(),
1587
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
1588
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
1589
+ configuration: z.object({
1590
+ displayInfo: z.object({
1591
+ name: z.string().describe("Experience name.").min(1).max(120),
1592
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
1593
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
1594
+ richContent: z.any().describe(
1595
+ "Detailed description of the experience using rich content formatting."
1596
+ ).optional()
1597
+ }).describe("Display information for the experience."),
1598
+ paymentPolicy: z.intersection(
1599
+ z.object({ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]) }),
1600
+ z.xor([
1601
+ z.object({ perGuestOptions: z.never().optional() }),
1602
+ z.object({
1603
+ perGuestOptions: z.object({
1604
+ price: z.string().describe(
1605
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
1606
+ ).optional().nullable()
1607
+ }).describe("Per-guest pricing settings.")
1608
+ })
1609
+ ])
1610
+ ).describe(
1611
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
1612
+ ),
1613
+ onlineReservations: z.object({
1614
+ partySize: z.object({
1615
+ min: z.number().int().describe(
1616
+ "Minimum number of guests allowed for a reservation."
1617
+ ).min(1).max(1e4),
1618
+ max: z.number().int().describe(
1619
+ "Maximum number of guests allowed for a reservation."
1620
+ ).min(1).max(1e4)
1621
+ }).describe("Party size."),
1622
+ minimumReservationNotice: z.object({
1623
+ number: z.number().int().describe(
1624
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
1625
+ ).min(1).max(1e3),
1626
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"])
1627
+ }).describe("Minimum reservation notice.").optional(),
1628
+ maximumReservationNotice: z.object({
1629
+ number: z.number().int().describe(
1630
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
1631
+ ).min(1).max(1e3),
1632
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"])
1633
+ }).describe("Maximum reservation notice.").optional(),
1634
+ approval: z.object({ mode: z.enum(["AUTOMATIC", "MANUAL"]) }).describe("Approval."),
1635
+ maxGuests: z.object({
1636
+ number: z.number().int().describe(
1637
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
1638
+ ).min(0).max(1e4)
1639
+ }).describe("Maximum number of guests.").optional(),
1640
+ businessSchedule: z.object({
1641
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
1642
+ entries: z.array(
1643
+ z.intersection(
1644
+ z.object({
1645
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).optional()
1646
+ }),
1647
+ z.xor([
1648
+ z.object({
1649
+ weeklyOptions: z.never().optional(),
1650
+ oneTimeOptions: z.never().optional()
1651
+ }),
1652
+ z.object({
1653
+ oneTimeOptions: z.never().optional(),
1654
+ weeklyOptions: z.object({
1655
+ startDate: z.string().describe("Start date.").optional().nullable(),
1656
+ endDate: z.string().describe("End date.").optional().nullable(),
1657
+ startDaysAndTimes: z.array(
1658
+ z.object({
1659
+ day: z.enum([
1660
+ "MONDAY",
1661
+ "TUESDAY",
1662
+ "WEDNESDAY",
1663
+ "THURSDAY",
1664
+ "FRIDAY",
1665
+ "SATURDAY",
1666
+ "SUNDAY"
1667
+ ]).optional(),
1668
+ time: z.string().describe(
1669
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
1670
+ ).max(5).min(5).optional().nullable()
1671
+ })
1672
+ ).max(100).optional()
1673
+ }).describe("Weekly recurrence settings.")
1674
+ }),
1675
+ z.object({
1676
+ weeklyOptions: z.never().optional(),
1677
+ oneTimeOptions: z.object({
1678
+ startDate: z.string().describe("Start date.").optional().nullable(),
1679
+ startTime: z.string().describe(
1680
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
1681
+ ).max(5).min(5).optional().nullable()
1682
+ }).describe("1-time event settings.")
1683
+ })
1684
+ ])
1685
+ )
1686
+ ).max(10).optional()
1687
+ }).describe("Business schedule.").optional()
1688
+ }).describe(
1689
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
1690
+ ),
1691
+ reservationForm: z.object({
1692
+ submitMessage: z.string().describe(
1693
+ "Message displayed to customers when they submit the reservation form."
1694
+ ).max(1e6).optional().nullable(),
1695
+ policiesEnabled: z.boolean().describe(
1696
+ "Whether to display privacy policy and terms and conditions to customers."
1697
+ ).optional().nullable(),
1698
+ privacyPolicy: z.intersection(
1699
+ z.object({
1700
+ enabled: z.boolean().describe(
1701
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
1702
+ ).optional().nullable()
1703
+ }),
1704
+ z.xor([
1705
+ z.object({
1706
+ url: z.never().optional(),
1707
+ text: z.never().optional()
1708
+ }),
1709
+ z.object({
1710
+ text: z.never().optional(),
1711
+ url: z.string().describe("Privacy policy URL.")
1712
+ }),
1713
+ z.object({
1714
+ url: z.never().optional(),
1715
+ text: z.string().describe("Privacy policy text.").max(1e6)
1716
+ })
1717
+ ])
1718
+ ).describe("Privacy policy display settings.").optional(),
1719
+ termsAndConditions: z.intersection(
1720
+ z.object({
1721
+ enabled: z.boolean().describe(
1722
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
1723
+ ).optional().nullable()
1724
+ }),
1725
+ z.xor([
1726
+ z.object({
1727
+ url: z.never().optional(),
1728
+ text: z.never().optional()
1729
+ }),
1730
+ z.object({
1731
+ text: z.never().optional(),
1732
+ url: z.string().describe("Terms and conditions URL.")
1733
+ }),
1734
+ z.object({
1735
+ url: z.never().optional(),
1736
+ text: z.string().describe("Terms and conditions text.").max(1e6)
1737
+ })
1738
+ ])
1739
+ ).describe("Terms and conditions display settings.").optional(),
1740
+ customFieldDefinitions: z.array(
1741
+ z.object({
1742
+ _id: z.string().describe("Custom field ID.").regex(
1743
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1744
+ "Must be a valid GUID"
1745
+ ).optional().nullable(),
1746
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
1747
+ required: z.boolean().describe(
1748
+ "Whether the custom field is required.\n\nDefault: `false`"
1749
+ ).optional().nullable()
1750
+ })
1751
+ ).max(1e3).optional(),
1752
+ lastNameRequired: z.boolean().describe(
1753
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
1754
+ ).optional().nullable(),
1755
+ emailRequired: z.boolean().describe(
1756
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
1757
+ ).optional().nullable(),
1758
+ emailMarketingCheckbox: z.object({
1759
+ enabled: z.boolean().describe(
1760
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
1761
+ ).optional().nullable(),
1762
+ checkedByDefault: z.boolean().describe(
1763
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
1764
+ ).optional().nullable()
1765
+ }).describe("Email marketing checkbox settings.").optional()
1766
+ }).describe(
1767
+ "Custom form fields and settings for the reservation booking form."
1768
+ ).optional(),
1769
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
1770
+ }).describe("Experience configuration."),
1771
+ currency: z.string().describe(
1772
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
1773
+ ).optional().nullable(),
1774
+ extendedFields: z.object({
1775
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1776
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
1777
+ ).optional()
1778
+ }).describe("Extended fields.").optional(),
1779
+ tags: z.object({
1780
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1781
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
1782
+ ).optional(),
1783
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1784
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
1785
+ ).optional()
1786
+ }).describe(
1787
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
1788
+ ).optional(),
1789
+ slug: z.string().describe(
1790
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
1791
+ ).max(300).optional().nullable(),
1792
+ seoSettings: z.object({
1793
+ seoSchema: z.object({
1794
+ tags: z.array(
1795
+ z.object({
1796
+ type: z.string().describe(
1797
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
1798
+ ).optional(),
1799
+ props: z.record(z.string(), z.any()).describe(
1800
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
1801
+ ).optional().nullable(),
1802
+ meta: z.record(z.string(), z.any()).describe(
1803
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
1804
+ ).optional().nullable(),
1805
+ children: z.string().describe(
1806
+ "SEO tag inner content. For example, `<title> inner content </title>`."
1807
+ ).optional(),
1808
+ custom: z.boolean().describe(
1809
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
1810
+ ).optional(),
1811
+ disabled: z.boolean().describe(
1812
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
1813
+ ).optional()
1814
+ })
1815
+ ).optional(),
1816
+ settings: z.object({
1817
+ preventAutoRedirect: z.boolean().describe(
1818
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
1819
+ ).optional(),
1820
+ keywords: z.array(
1821
+ z.object({
1822
+ term: z.string().describe("Keyword value.").optional(),
1823
+ isMain: z.boolean().describe(
1824
+ "Whether the keyword is the main focus keyword."
1825
+ ).optional(),
1826
+ origin: z.string().describe(
1827
+ "The source that added the keyword terms to the SEO settings."
1828
+ ).max(1e3).optional().nullable()
1829
+ })
1830
+ ).max(5).optional()
1831
+ }).describe("SEO general settings.").optional()
1832
+ }).describe(
1833
+ "SEO schema data for customizing meta tags and search engine settings."
1834
+ ).optional()
1835
+ }).describe("SEO settings for the experience page.").optional()
1836
+ }).describe("Experience to create.")
1837
+ });
1838
+ var CreateExperienceResponse = z.object({
1839
+ _id: z.string().describe("Experience ID.").regex(
1840
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1841
+ "Must be a valid GUID"
1842
+ ).optional().nullable(),
1843
+ reservationLocationId: z.string().describe("ID of the reservation location this experience is assigned to.").regex(
1844
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1845
+ "Must be a valid GUID"
1846
+ ).optional().nullable(),
1847
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1848
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
1849
+ ).optional().nullable(),
1850
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
1851
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
1852
+ configuration: z.object({
1853
+ displayInfo: z.object({
1854
+ name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
1855
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
1856
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
1857
+ richContent: z.any().describe(
1858
+ "Detailed description of the experience using rich content formatting."
1859
+ ).optional()
1860
+ }).describe("Display information for the experience.").optional(),
1861
+ paymentPolicy: z.intersection(
1862
+ z.object({
1863
+ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
1864
+ }),
1865
+ z.xor([
1866
+ z.object({ perGuestOptions: z.never().optional() }),
1867
+ z.object({
1868
+ perGuestOptions: z.object({
1869
+ price: z.string().describe(
1870
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
1871
+ ).optional().nullable()
1872
+ }).describe("Per-guest pricing settings.")
1873
+ })
1874
+ ])
1875
+ ).describe(
1876
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
1877
+ ).optional(),
1878
+ onlineReservations: z.object({
1879
+ partySize: z.object({
1880
+ min: z.number().int().describe("Minimum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable(),
1881
+ max: z.number().int().describe("Maximum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable()
1882
+ }).describe("Party size.").optional(),
1883
+ minimumReservationNotice: z.object({
1884
+ number: z.number().int().describe(
1885
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
1886
+ ).min(1).max(1e3).optional().nullable(),
1887
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
1888
+ }).describe("Minimum reservation notice.").optional(),
1889
+ maximumReservationNotice: z.object({
1890
+ number: z.number().int().describe(
1891
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
1892
+ ).min(1).max(1e3).optional().nullable(),
1893
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
1894
+ }).describe("Maximum reservation notice.").optional(),
1895
+ approval: z.object({
1896
+ mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
1897
+ }).describe("Approval.").optional(),
1898
+ maxGuests: z.object({
1899
+ number: z.number().int().describe(
1900
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
1901
+ ).min(0).max(1e4).optional().nullable()
1902
+ }).describe("Maximum number of guests.").optional(),
1903
+ businessSchedule: z.object({
1904
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
1905
+ entries: z.array(
1906
+ z.intersection(
1907
+ z.object({
1908
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
1909
+ }),
1910
+ z.xor([
1911
+ z.object({
1912
+ weeklyOptions: z.never().optional(),
1913
+ oneTimeOptions: z.never().optional()
1914
+ }),
1915
+ z.object({
1916
+ oneTimeOptions: z.never().optional(),
1917
+ weeklyOptions: z.object({
1918
+ startDate: z.string().describe("Start date.").optional().nullable(),
1919
+ endDate: z.string().describe("End date.").optional().nullable(),
1920
+ startDaysAndTimes: z.array(
1921
+ z.object({
1922
+ day: z.enum([
1923
+ "MONDAY",
1924
+ "TUESDAY",
1925
+ "WEDNESDAY",
1926
+ "THURSDAY",
1927
+ "FRIDAY",
1928
+ "SATURDAY",
1929
+ "SUNDAY"
1930
+ ]).describe("Day of week.").optional(),
1931
+ time: z.string().describe(
1932
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
1933
+ ).max(5).min(5).optional().nullable()
1934
+ })
1935
+ ).max(100).optional()
1936
+ }).describe("Weekly recurrence settings.")
1937
+ }),
1938
+ z.object({
1939
+ weeklyOptions: z.never().optional(),
1940
+ oneTimeOptions: z.object({
1941
+ startDate: z.string().describe("Start date.").optional().nullable(),
1942
+ startTime: z.string().describe(
1943
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
1944
+ ).max(5).min(5).optional().nullable()
1945
+ }).describe("1-time event settings.")
1946
+ })
1947
+ ])
1948
+ )
1949
+ ).max(10).optional()
1950
+ }).describe("Business schedule.").optional()
1951
+ }).describe(
1952
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
1953
+ ).optional(),
1954
+ reservationForm: z.object({
1955
+ submitMessage: z.string().describe(
1956
+ "Message displayed to customers when they submit the reservation form."
1957
+ ).max(1e6).optional().nullable(),
1958
+ policiesEnabled: z.boolean().describe(
1959
+ "Whether to display privacy policy and terms and conditions to customers."
1960
+ ).optional().nullable(),
1961
+ privacyPolicy: z.intersection(
1962
+ z.object({
1963
+ enabled: z.boolean().describe(
1964
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
1965
+ ).optional().nullable()
1966
+ }),
1967
+ z.xor([
1968
+ z.object({
1969
+ url: z.never().optional(),
1970
+ text: z.never().optional()
1971
+ }),
1972
+ z.object({
1973
+ text: z.never().optional(),
1974
+ url: z.string().describe("Privacy policy URL.")
1975
+ }),
1976
+ z.object({
1977
+ url: z.never().optional(),
1978
+ text: z.string().describe("Privacy policy text.").max(1e6)
1979
+ })
1980
+ ])
1981
+ ).describe("Privacy policy display settings.").optional(),
1982
+ termsAndConditions: z.intersection(
1983
+ z.object({
1984
+ enabled: z.boolean().describe(
1985
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
1986
+ ).optional().nullable()
1987
+ }),
1988
+ z.xor([
1989
+ z.object({
1990
+ url: z.never().optional(),
1991
+ text: z.never().optional()
1992
+ }),
1993
+ z.object({
1994
+ text: z.never().optional(),
1995
+ url: z.string().describe("Terms and conditions URL.")
1996
+ }),
1997
+ z.object({
1998
+ url: z.never().optional(),
1999
+ text: z.string().describe("Terms and conditions text.").max(1e6)
2000
+ })
2001
+ ])
2002
+ ).describe("Terms and conditions display settings.").optional(),
2003
+ customFieldDefinitions: z.array(
2004
+ z.object({
2005
+ _id: z.string().describe("Custom field ID.").regex(
2006
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2007
+ "Must be a valid GUID"
2008
+ ).optional().nullable(),
2009
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
2010
+ required: z.boolean().describe(
2011
+ "Whether the custom field is required.\n\nDefault: `false`"
2012
+ ).optional().nullable()
2013
+ })
2014
+ ).max(1e3).optional(),
2015
+ lastNameRequired: z.boolean().describe(
2016
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
2017
+ ).optional().nullable(),
2018
+ emailRequired: z.boolean().describe(
2019
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
2020
+ ).optional().nullable(),
2021
+ emailMarketingCheckbox: z.object({
2022
+ enabled: z.boolean().describe(
2023
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
2024
+ ).optional().nullable(),
2025
+ checkedByDefault: z.boolean().describe(
2026
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
2027
+ ).optional().nullable()
2028
+ }).describe("Email marketing checkbox settings.").optional()
2029
+ }).describe(
2030
+ "Custom form fields and settings for the reservation booking form."
2031
+ ).optional(),
2032
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
2033
+ }).describe("Experience configuration.").optional(),
2034
+ currency: z.string().describe(
2035
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
2036
+ ).optional().nullable(),
2037
+ extendedFields: z.object({
2038
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2039
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
2040
+ ).optional()
2041
+ }).describe("Extended fields.").optional(),
2042
+ tags: z.object({
2043
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2044
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2045
+ ).optional(),
2046
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2047
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2048
+ ).optional()
2049
+ }).describe(
2050
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
2051
+ ).optional(),
2052
+ slug: z.string().describe(
2053
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
2054
+ ).max(300).optional().nullable(),
2055
+ seoSettings: z.object({
2056
+ seoSchema: z.object({
2057
+ tags: z.array(
2058
+ z.object({
2059
+ type: z.string().describe(
2060
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2061
+ ).optional(),
2062
+ props: z.record(z.string(), z.any()).describe(
2063
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2064
+ ).optional().nullable(),
2065
+ meta: z.record(z.string(), z.any()).describe(
2066
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2067
+ ).optional().nullable(),
2068
+ children: z.string().describe(
2069
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2070
+ ).optional(),
2071
+ custom: z.boolean().describe(
2072
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2073
+ ).optional(),
2074
+ disabled: z.boolean().describe(
2075
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2076
+ ).optional()
2077
+ })
2078
+ ).optional(),
2079
+ settings: z.object({
2080
+ preventAutoRedirect: z.boolean().describe(
2081
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
2082
+ ).optional(),
2083
+ keywords: z.array(
2084
+ z.object({
2085
+ term: z.string().describe("Keyword value.").optional(),
2086
+ isMain: z.boolean().describe(
2087
+ "Whether the keyword is the main focus keyword."
2088
+ ).optional(),
2089
+ origin: z.string().describe(
2090
+ "The source that added the keyword terms to the SEO settings."
2091
+ ).max(1e3).optional().nullable()
2092
+ })
2093
+ ).max(5).optional()
2094
+ }).describe("SEO general settings.").optional()
2095
+ }).describe(
2096
+ "SEO schema data for customizing meta tags and search engine settings."
2097
+ ).optional()
2098
+ }).describe("SEO settings for the experience page.").optional()
2099
+ });
2100
+ var GetExperienceRequest = z.object({
2101
+ experienceId: z.string().describe("ID of the experience to retrieve.").regex(
2102
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2103
+ "Must be a valid GUID"
2104
+ )
2105
+ });
2106
+ var GetExperienceResponse = z.object({
2107
+ _id: z.string().describe("Experience ID.").regex(
2108
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2109
+ "Must be a valid GUID"
2110
+ ).optional().nullable(),
2111
+ reservationLocationId: z.string().describe("ID of the reservation location this experience is assigned to.").regex(
2112
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2113
+ "Must be a valid GUID"
2114
+ ).optional().nullable(),
2115
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2116
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
2117
+ ).optional().nullable(),
2118
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
2119
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
2120
+ configuration: z.object({
2121
+ displayInfo: z.object({
2122
+ name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
2123
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
2124
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
2125
+ richContent: z.any().describe(
2126
+ "Detailed description of the experience using rich content formatting."
2127
+ ).optional()
2128
+ }).describe("Display information for the experience.").optional(),
2129
+ paymentPolicy: z.intersection(
2130
+ z.object({
2131
+ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
2132
+ }),
2133
+ z.xor([
2134
+ z.object({ perGuestOptions: z.never().optional() }),
2135
+ z.object({
2136
+ perGuestOptions: z.object({
2137
+ price: z.string().describe(
2138
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
2139
+ ).optional().nullable()
2140
+ }).describe("Per-guest pricing settings.")
2141
+ })
2142
+ ])
2143
+ ).describe(
2144
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
2145
+ ).optional(),
2146
+ onlineReservations: z.object({
2147
+ partySize: z.object({
2148
+ min: z.number().int().describe("Minimum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable(),
2149
+ max: z.number().int().describe("Maximum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable()
2150
+ }).describe("Party size.").optional(),
2151
+ minimumReservationNotice: z.object({
2152
+ number: z.number().int().describe(
2153
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2154
+ ).min(1).max(1e3).optional().nullable(),
2155
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
2156
+ }).describe("Minimum reservation notice.").optional(),
2157
+ maximumReservationNotice: z.object({
2158
+ number: z.number().int().describe(
2159
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2160
+ ).min(1).max(1e3).optional().nullable(),
2161
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
2162
+ }).describe("Maximum reservation notice.").optional(),
2163
+ approval: z.object({
2164
+ mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
2165
+ }).describe("Approval.").optional(),
2166
+ maxGuests: z.object({
2167
+ number: z.number().int().describe(
2168
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
2169
+ ).min(0).max(1e4).optional().nullable()
2170
+ }).describe("Maximum number of guests.").optional(),
2171
+ businessSchedule: z.object({
2172
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
2173
+ entries: z.array(
2174
+ z.intersection(
2175
+ z.object({
2176
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
2177
+ }),
2178
+ z.xor([
2179
+ z.object({
2180
+ weeklyOptions: z.never().optional(),
2181
+ oneTimeOptions: z.never().optional()
2182
+ }),
2183
+ z.object({
2184
+ oneTimeOptions: z.never().optional(),
2185
+ weeklyOptions: z.object({
2186
+ startDate: z.string().describe("Start date.").optional().nullable(),
2187
+ endDate: z.string().describe("End date.").optional().nullable(),
2188
+ startDaysAndTimes: z.array(
2189
+ z.object({
2190
+ day: z.enum([
2191
+ "MONDAY",
2192
+ "TUESDAY",
2193
+ "WEDNESDAY",
2194
+ "THURSDAY",
2195
+ "FRIDAY",
2196
+ "SATURDAY",
2197
+ "SUNDAY"
2198
+ ]).describe("Day of week.").optional(),
2199
+ time: z.string().describe(
2200
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
2201
+ ).max(5).min(5).optional().nullable()
2202
+ })
2203
+ ).max(100).optional()
2204
+ }).describe("Weekly recurrence settings.")
2205
+ }),
2206
+ z.object({
2207
+ weeklyOptions: z.never().optional(),
2208
+ oneTimeOptions: z.object({
2209
+ startDate: z.string().describe("Start date.").optional().nullable(),
2210
+ startTime: z.string().describe(
2211
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
2212
+ ).max(5).min(5).optional().nullable()
2213
+ }).describe("1-time event settings.")
2214
+ })
2215
+ ])
2216
+ )
2217
+ ).max(10).optional()
2218
+ }).describe("Business schedule.").optional()
2219
+ }).describe(
2220
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
2221
+ ).optional(),
2222
+ reservationForm: z.object({
2223
+ submitMessage: z.string().describe(
2224
+ "Message displayed to customers when they submit the reservation form."
2225
+ ).max(1e6).optional().nullable(),
2226
+ policiesEnabled: z.boolean().describe(
2227
+ "Whether to display privacy policy and terms and conditions to customers."
2228
+ ).optional().nullable(),
2229
+ privacyPolicy: z.intersection(
2230
+ z.object({
2231
+ enabled: z.boolean().describe(
2232
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
2233
+ ).optional().nullable()
2234
+ }),
2235
+ z.xor([
2236
+ z.object({
2237
+ url: z.never().optional(),
2238
+ text: z.never().optional()
2239
+ }),
2240
+ z.object({
2241
+ text: z.never().optional(),
2242
+ url: z.string().describe("Privacy policy URL.")
2243
+ }),
2244
+ z.object({
2245
+ url: z.never().optional(),
2246
+ text: z.string().describe("Privacy policy text.").max(1e6)
2247
+ })
2248
+ ])
2249
+ ).describe("Privacy policy display settings.").optional(),
2250
+ termsAndConditions: z.intersection(
2251
+ z.object({
2252
+ enabled: z.boolean().describe(
2253
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
2254
+ ).optional().nullable()
2255
+ }),
2256
+ z.xor([
2257
+ z.object({
2258
+ url: z.never().optional(),
2259
+ text: z.never().optional()
2260
+ }),
2261
+ z.object({
2262
+ text: z.never().optional(),
2263
+ url: z.string().describe("Terms and conditions URL.")
2264
+ }),
2265
+ z.object({
2266
+ url: z.never().optional(),
2267
+ text: z.string().describe("Terms and conditions text.").max(1e6)
2268
+ })
2269
+ ])
2270
+ ).describe("Terms and conditions display settings.").optional(),
2271
+ customFieldDefinitions: z.array(
2272
+ z.object({
2273
+ _id: z.string().describe("Custom field ID.").regex(
2274
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2275
+ "Must be a valid GUID"
2276
+ ).optional().nullable(),
2277
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
2278
+ required: z.boolean().describe(
2279
+ "Whether the custom field is required.\n\nDefault: `false`"
2280
+ ).optional().nullable()
2281
+ })
2282
+ ).max(1e3).optional(),
2283
+ lastNameRequired: z.boolean().describe(
2284
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
2285
+ ).optional().nullable(),
2286
+ emailRequired: z.boolean().describe(
2287
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
2288
+ ).optional().nullable(),
2289
+ emailMarketingCheckbox: z.object({
2290
+ enabled: z.boolean().describe(
2291
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
2292
+ ).optional().nullable(),
2293
+ checkedByDefault: z.boolean().describe(
2294
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
2295
+ ).optional().nullable()
2296
+ }).describe("Email marketing checkbox settings.").optional()
2297
+ }).describe(
2298
+ "Custom form fields and settings for the reservation booking form."
2299
+ ).optional(),
2300
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
2301
+ }).describe("Experience configuration.").optional(),
2302
+ currency: z.string().describe(
2303
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
2304
+ ).optional().nullable(),
2305
+ extendedFields: z.object({
2306
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2307
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
2308
+ ).optional()
2309
+ }).describe("Extended fields.").optional(),
2310
+ tags: z.object({
2311
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2312
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2313
+ ).optional(),
2314
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2315
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2316
+ ).optional()
2317
+ }).describe(
2318
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
2319
+ ).optional(),
2320
+ slug: z.string().describe(
2321
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
2322
+ ).max(300).optional().nullable(),
2323
+ seoSettings: z.object({
2324
+ seoSchema: z.object({
2325
+ tags: z.array(
2326
+ z.object({
2327
+ type: z.string().describe(
2328
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2329
+ ).optional(),
2330
+ props: z.record(z.string(), z.any()).describe(
2331
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2332
+ ).optional().nullable(),
2333
+ meta: z.record(z.string(), z.any()).describe(
2334
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2335
+ ).optional().nullable(),
2336
+ children: z.string().describe(
2337
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2338
+ ).optional(),
2339
+ custom: z.boolean().describe(
2340
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2341
+ ).optional(),
2342
+ disabled: z.boolean().describe(
2343
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2344
+ ).optional()
2345
+ })
2346
+ ).optional(),
2347
+ settings: z.object({
2348
+ preventAutoRedirect: z.boolean().describe(
2349
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
2350
+ ).optional(),
2351
+ keywords: z.array(
2352
+ z.object({
2353
+ term: z.string().describe("Keyword value.").optional(),
2354
+ isMain: z.boolean().describe(
2355
+ "Whether the keyword is the main focus keyword."
2356
+ ).optional(),
2357
+ origin: z.string().describe(
2358
+ "The source that added the keyword terms to the SEO settings."
2359
+ ).max(1e3).optional().nullable()
2360
+ })
2361
+ ).max(5).optional()
2362
+ }).describe("SEO general settings.").optional()
2363
+ }).describe(
2364
+ "SEO schema data for customizing meta tags and search engine settings."
2365
+ ).optional()
2366
+ }).describe("SEO settings for the experience page.").optional()
2367
+ });
2368
+ var GetExperienceBySlugRequest = z.object({
2369
+ slug: z.string().describe("Slug of the experience to retrieve.").max(200)
2370
+ });
2371
+ var GetExperienceBySlugResponse = z.object({
2372
+ experience: z.object({
2373
+ _id: z.string().describe("Experience ID.").regex(
2374
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2375
+ "Must be a valid GUID"
2376
+ ).optional().nullable(),
2377
+ reservationLocationId: z.string().describe(
2378
+ "ID of the reservation location this experience is assigned to."
2379
+ ).regex(
2380
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2381
+ "Must be a valid GUID"
2382
+ ).optional().nullable(),
2383
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2384
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
2385
+ ).optional().nullable(),
2386
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
2387
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
2388
+ configuration: z.object({
2389
+ displayInfo: z.object({
2390
+ name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
2391
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
2392
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
2393
+ richContent: z.any().describe(
2394
+ "Detailed description of the experience using rich content formatting."
2395
+ ).optional()
2396
+ }).describe("Display information for the experience.").optional(),
2397
+ paymentPolicy: z.intersection(
2398
+ z.object({
2399
+ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
2400
+ }),
2401
+ z.xor([
2402
+ z.object({ perGuestOptions: z.never().optional() }),
2403
+ z.object({
2404
+ perGuestOptions: z.object({
2405
+ price: z.string().describe(
2406
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
2407
+ ).optional().nullable()
2408
+ }).describe("Per-guest pricing settings.")
2409
+ })
2410
+ ])
2411
+ ).describe(
2412
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
2413
+ ).optional(),
2414
+ onlineReservations: z.object({
2415
+ partySize: z.object({
2416
+ min: z.number().int().describe(
2417
+ "Minimum number of guests allowed for a reservation."
2418
+ ).min(1).max(1e4).optional().nullable(),
2419
+ max: z.number().int().describe(
2420
+ "Maximum number of guests allowed for a reservation."
2421
+ ).min(1).max(1e4).optional().nullable()
2422
+ }).describe("Party size.").optional(),
2423
+ minimumReservationNotice: z.object({
2424
+ number: z.number().int().describe(
2425
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2426
+ ).min(1).max(1e3).optional().nullable(),
2427
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
2428
+ }).describe("Minimum reservation notice.").optional(),
2429
+ maximumReservationNotice: z.object({
2430
+ number: z.number().int().describe(
2431
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2432
+ ).min(1).max(1e3).optional().nullable(),
2433
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
2434
+ }).describe("Maximum reservation notice.").optional(),
2435
+ approval: z.object({
2436
+ mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
2437
+ }).describe("Approval.").optional(),
2438
+ maxGuests: z.object({
2439
+ number: z.number().int().describe(
2440
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
2441
+ ).min(0).max(1e4).optional().nullable()
2442
+ }).describe("Maximum number of guests.").optional(),
2443
+ businessSchedule: z.object({
2444
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
2445
+ entries: z.array(
2446
+ z.intersection(
2447
+ z.object({
2448
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
2449
+ }),
2450
+ z.xor([
2451
+ z.object({
2452
+ weeklyOptions: z.never().optional(),
2453
+ oneTimeOptions: z.never().optional()
2454
+ }),
2455
+ z.object({
2456
+ oneTimeOptions: z.never().optional(),
2457
+ weeklyOptions: z.object({
2458
+ startDate: z.string().describe("Start date.").optional().nullable(),
2459
+ endDate: z.string().describe("End date.").optional().nullable(),
2460
+ startDaysAndTimes: z.array(
2461
+ z.object({
2462
+ day: z.enum([
2463
+ "MONDAY",
2464
+ "TUESDAY",
2465
+ "WEDNESDAY",
2466
+ "THURSDAY",
2467
+ "FRIDAY",
2468
+ "SATURDAY",
2469
+ "SUNDAY"
2470
+ ]).describe("Day of week.").optional(),
2471
+ time: z.string().describe(
2472
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
2473
+ ).max(5).min(5).optional().nullable()
2474
+ })
2475
+ ).max(100).optional()
2476
+ }).describe("Weekly recurrence settings.")
2477
+ }),
2478
+ z.object({
2479
+ weeklyOptions: z.never().optional(),
2480
+ oneTimeOptions: z.object({
2481
+ startDate: z.string().describe("Start date.").optional().nullable(),
2482
+ startTime: z.string().describe(
2483
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
2484
+ ).max(5).min(5).optional().nullable()
2485
+ }).describe("1-time event settings.")
2486
+ })
2487
+ ])
2488
+ )
2489
+ ).max(10).optional()
2490
+ }).describe("Business schedule.").optional()
2491
+ }).describe(
2492
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
2493
+ ).optional(),
2494
+ reservationForm: z.object({
2495
+ submitMessage: z.string().describe(
2496
+ "Message displayed to customers when they submit the reservation form."
2497
+ ).max(1e6).optional().nullable(),
2498
+ policiesEnabled: z.boolean().describe(
2499
+ "Whether to display privacy policy and terms and conditions to customers."
2500
+ ).optional().nullable(),
2501
+ privacyPolicy: z.intersection(
2502
+ z.object({
2503
+ enabled: z.boolean().describe(
2504
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
2505
+ ).optional().nullable()
2506
+ }),
2507
+ z.xor([
2508
+ z.object({
2509
+ url: z.never().optional(),
2510
+ text: z.never().optional()
2511
+ }),
2512
+ z.object({
2513
+ text: z.never().optional(),
2514
+ url: z.string().describe("Privacy policy URL.")
2515
+ }),
2516
+ z.object({
2517
+ url: z.never().optional(),
2518
+ text: z.string().describe("Privacy policy text.").max(1e6)
2519
+ })
2520
+ ])
2521
+ ).describe("Privacy policy display settings.").optional(),
2522
+ termsAndConditions: z.intersection(
2523
+ z.object({
2524
+ enabled: z.boolean().describe(
2525
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
2526
+ ).optional().nullable()
2527
+ }),
2528
+ z.xor([
2529
+ z.object({
2530
+ url: z.never().optional(),
2531
+ text: z.never().optional()
2532
+ }),
2533
+ z.object({
2534
+ text: z.never().optional(),
2535
+ url: z.string().describe("Terms and conditions URL.")
2536
+ }),
2537
+ z.object({
2538
+ url: z.never().optional(),
2539
+ text: z.string().describe("Terms and conditions text.").max(1e6)
2540
+ })
2541
+ ])
2542
+ ).describe("Terms and conditions display settings.").optional(),
2543
+ customFieldDefinitions: z.array(
2544
+ z.object({
2545
+ _id: z.string().describe("Custom field ID.").regex(
2546
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2547
+ "Must be a valid GUID"
2548
+ ).optional().nullable(),
2549
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
2550
+ required: z.boolean().describe(
2551
+ "Whether the custom field is required.\n\nDefault: `false`"
2552
+ ).optional().nullable()
2553
+ })
2554
+ ).max(1e3).optional(),
2555
+ lastNameRequired: z.boolean().describe(
2556
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
2557
+ ).optional().nullable(),
2558
+ emailRequired: z.boolean().describe(
2559
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
2560
+ ).optional().nullable(),
2561
+ emailMarketingCheckbox: z.object({
2562
+ enabled: z.boolean().describe(
2563
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
2564
+ ).optional().nullable(),
2565
+ checkedByDefault: z.boolean().describe(
2566
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
2567
+ ).optional().nullable()
2568
+ }).describe("Email marketing checkbox settings.").optional()
2569
+ }).describe(
2570
+ "Custom form fields and settings for the reservation booking form."
2571
+ ).optional(),
2572
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
2573
+ }).describe("Experience configuration.").optional(),
2574
+ currency: z.string().describe(
2575
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
2576
+ ).optional().nullable(),
2577
+ extendedFields: z.object({
2578
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2579
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
2580
+ ).optional()
2581
+ }).describe("Extended fields.").optional(),
2582
+ tags: z.object({
2583
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2584
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2585
+ ).optional(),
2586
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2587
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2588
+ ).optional()
2589
+ }).describe(
2590
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
2591
+ ).optional(),
2592
+ slug: z.string().describe(
2593
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
2594
+ ).max(300).optional().nullable(),
2595
+ seoSettings: z.object({
2596
+ seoSchema: z.object({
2597
+ tags: z.array(
2598
+ z.object({
2599
+ type: z.string().describe(
2600
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2601
+ ).optional(),
2602
+ props: z.record(z.string(), z.any()).describe(
2603
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2604
+ ).optional().nullable(),
2605
+ meta: z.record(z.string(), z.any()).describe(
2606
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2607
+ ).optional().nullable(),
2608
+ children: z.string().describe(
2609
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2610
+ ).optional(),
2611
+ custom: z.boolean().describe(
2612
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2613
+ ).optional(),
2614
+ disabled: z.boolean().describe(
2615
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2616
+ ).optional()
2617
+ })
2618
+ ).optional(),
2619
+ settings: z.object({
2620
+ preventAutoRedirect: z.boolean().describe(
2621
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
2622
+ ).optional(),
2623
+ keywords: z.array(
2624
+ z.object({
2625
+ term: z.string().describe("Keyword value.").optional(),
2626
+ isMain: z.boolean().describe(
2627
+ "Whether the keyword is the main focus keyword."
2628
+ ).optional(),
2629
+ origin: z.string().describe(
2630
+ "The source that added the keyword terms to the SEO settings."
2631
+ ).max(1e3).optional().nullable()
2632
+ })
2633
+ ).max(5).optional()
2634
+ }).describe("SEO general settings.").optional()
2635
+ }).describe(
2636
+ "SEO schema data for customizing meta tags and search engine settings."
2637
+ ).optional()
2638
+ }).describe("SEO settings for the experience page.").optional()
2639
+ }).describe("Retrieved experience.").optional()
2640
+ });
2641
+ var UpdateExperienceRequest = z.object({
2642
+ _id: z.string().describe("Experience ID.").regex(
2643
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2644
+ "Must be a valid GUID"
2645
+ ),
2646
+ experience: z.object({
2647
+ _id: z.string().describe("Experience ID.").regex(
2648
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2649
+ "Must be a valid GUID"
2650
+ ).optional().nullable(),
2651
+ reservationLocationId: z.string().describe(
2652
+ "ID of the reservation location this experience is assigned to."
2653
+ ).regex(
2654
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2655
+ "Must be a valid GUID"
2656
+ ).optional().nullable(),
2657
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2658
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
2659
+ ),
2660
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
2661
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
2662
+ configuration: z.object({
2663
+ displayInfo: z.object({
2664
+ name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
2665
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
2666
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
2667
+ richContent: z.any().describe(
2668
+ "Detailed description of the experience using rich content formatting."
2669
+ ).optional()
2670
+ }).describe("Display information for the experience.").optional(),
2671
+ paymentPolicy: z.intersection(
2672
+ z.object({
2673
+ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).optional()
2674
+ }),
2675
+ z.xor([
2676
+ z.object({ perGuestOptions: z.never().optional() }),
2677
+ z.object({
2678
+ perGuestOptions: z.object({
2679
+ price: z.string().describe(
2680
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
2681
+ ).optional().nullable()
2682
+ }).describe("Per-guest pricing settings.")
2683
+ })
2684
+ ])
2685
+ ).describe(
2686
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
2687
+ ).optional(),
2688
+ onlineReservations: z.object({
2689
+ partySize: z.object({
2690
+ min: z.number().int().describe(
2691
+ "Minimum number of guests allowed for a reservation."
2692
+ ).min(1).max(1e4).optional().nullable(),
2693
+ max: z.number().int().describe(
2694
+ "Maximum number of guests allowed for a reservation."
2695
+ ).min(1).max(1e4).optional().nullable()
2696
+ }).describe("Party size.").optional(),
2697
+ minimumReservationNotice: z.object({
2698
+ number: z.number().int().describe(
2699
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2700
+ ).min(1).max(1e3).optional().nullable(),
2701
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).optional()
2702
+ }).describe("Minimum reservation notice.").optional(),
2703
+ maximumReservationNotice: z.object({
2704
+ number: z.number().int().describe(
2705
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2706
+ ).min(1).max(1e3).optional().nullable(),
2707
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).optional()
2708
+ }).describe("Maximum reservation notice.").optional(),
2709
+ approval: z.object({ mode: z.enum(["AUTOMATIC", "MANUAL"]).optional() }).describe("Approval.").optional(),
2710
+ maxGuests: z.object({
2711
+ number: z.number().int().describe(
2712
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
2713
+ ).min(0).max(1e4).optional().nullable()
2714
+ }).describe("Maximum number of guests.").optional(),
2715
+ businessSchedule: z.object({
2716
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
2717
+ entries: z.array(
2718
+ z.intersection(
2719
+ z.object({
2720
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).optional()
2721
+ }),
2722
+ z.xor([
2723
+ z.object({
2724
+ weeklyOptions: z.never().optional(),
2725
+ oneTimeOptions: z.never().optional()
2726
+ }),
2727
+ z.object({
2728
+ oneTimeOptions: z.never().optional(),
2729
+ weeklyOptions: z.object({
2730
+ startDate: z.string().describe("Start date.").optional().nullable(),
2731
+ endDate: z.string().describe("End date.").optional().nullable(),
2732
+ startDaysAndTimes: z.array(
2733
+ z.object({
2734
+ day: z.enum([
2735
+ "MONDAY",
2736
+ "TUESDAY",
2737
+ "WEDNESDAY",
2738
+ "THURSDAY",
2739
+ "FRIDAY",
2740
+ "SATURDAY",
2741
+ "SUNDAY"
2742
+ ]).optional(),
2743
+ time: z.string().describe(
2744
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
2745
+ ).max(5).min(5).optional().nullable()
2746
+ })
2747
+ ).max(100).optional()
2748
+ }).describe("Weekly recurrence settings.")
2749
+ }),
2750
+ z.object({
2751
+ weeklyOptions: z.never().optional(),
2752
+ oneTimeOptions: z.object({
2753
+ startDate: z.string().describe("Start date.").optional().nullable(),
2754
+ startTime: z.string().describe(
2755
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
2756
+ ).max(5).min(5).optional().nullable()
2757
+ }).describe("1-time event settings.")
2758
+ })
2759
+ ])
2760
+ )
2761
+ ).max(10).optional()
2762
+ }).describe("Business schedule.").optional()
2763
+ }).describe(
2764
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
2765
+ ).optional(),
2766
+ reservationForm: z.object({
2767
+ submitMessage: z.string().describe(
2768
+ "Message displayed to customers when they submit the reservation form."
2769
+ ).max(1e6).optional().nullable(),
2770
+ policiesEnabled: z.boolean().describe(
2771
+ "Whether to display privacy policy and terms and conditions to customers."
2772
+ ).optional().nullable(),
2773
+ privacyPolicy: z.intersection(
2774
+ z.object({
2775
+ enabled: z.boolean().describe(
2776
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
2777
+ ).optional().nullable()
2778
+ }),
2779
+ z.xor([
2780
+ z.object({
2781
+ url: z.never().optional(),
2782
+ text: z.never().optional()
2783
+ }),
2784
+ z.object({
2785
+ text: z.never().optional(),
2786
+ url: z.string().describe("Privacy policy URL.")
2787
+ }),
2788
+ z.object({
2789
+ url: z.never().optional(),
2790
+ text: z.string().describe("Privacy policy text.").max(1e6)
2791
+ })
2792
+ ])
2793
+ ).describe("Privacy policy display settings.").optional(),
2794
+ termsAndConditions: z.intersection(
2795
+ z.object({
2796
+ enabled: z.boolean().describe(
2797
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
2798
+ ).optional().nullable()
2799
+ }),
2800
+ z.xor([
2801
+ z.object({
2802
+ url: z.never().optional(),
2803
+ text: z.never().optional()
2804
+ }),
2805
+ z.object({
2806
+ text: z.never().optional(),
2807
+ url: z.string().describe("Terms and conditions URL.")
2808
+ }),
2809
+ z.object({
2810
+ url: z.never().optional(),
2811
+ text: z.string().describe("Terms and conditions text.").max(1e6)
2812
+ })
2813
+ ])
2814
+ ).describe("Terms and conditions display settings.").optional(),
2815
+ customFieldDefinitions: z.array(
2816
+ z.object({
2817
+ _id: z.string().describe("Custom field ID.").regex(
2818
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2819
+ "Must be a valid GUID"
2820
+ ).optional().nullable(),
2821
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
2822
+ required: z.boolean().describe(
2823
+ "Whether the custom field is required.\n\nDefault: `false`"
2824
+ ).optional().nullable()
2825
+ })
2826
+ ).max(1e3).optional(),
2827
+ lastNameRequired: z.boolean().describe(
2828
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
2829
+ ).optional().nullable(),
2830
+ emailRequired: z.boolean().describe(
2831
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
2832
+ ).optional().nullable(),
2833
+ emailMarketingCheckbox: z.object({
2834
+ enabled: z.boolean().describe(
2835
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
2836
+ ).optional().nullable(),
2837
+ checkedByDefault: z.boolean().describe(
2838
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
2839
+ ).optional().nullable()
2840
+ }).describe("Email marketing checkbox settings.").optional()
2841
+ }).describe(
2842
+ "Custom form fields and settings for the reservation booking form."
2843
+ ).optional(),
2844
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
2845
+ }).describe("Experience configuration.").optional(),
2846
+ currency: z.string().describe(
2847
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
2848
+ ).optional().nullable(),
2849
+ extendedFields: z.object({
2850
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2851
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
2852
+ ).optional()
2853
+ }).describe("Extended fields.").optional(),
2854
+ tags: z.object({
2855
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2856
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2857
+ ).optional(),
2858
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2859
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2860
+ ).optional()
2861
+ }).describe(
2862
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
2863
+ ).optional(),
2864
+ slug: z.string().describe(
2865
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
2866
+ ).max(300).optional().nullable(),
2867
+ seoSettings: z.object({
2868
+ seoSchema: z.object({
2869
+ tags: z.array(
2870
+ z.object({
2871
+ type: z.string().describe(
2872
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2873
+ ).optional(),
2874
+ props: z.record(z.string(), z.any()).describe(
2875
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2876
+ ).optional().nullable(),
2877
+ meta: z.record(z.string(), z.any()).describe(
2878
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2879
+ ).optional().nullable(),
2880
+ children: z.string().describe(
2881
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2882
+ ).optional(),
2883
+ custom: z.boolean().describe(
2884
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2885
+ ).optional(),
2886
+ disabled: z.boolean().describe(
2887
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2888
+ ).optional()
2889
+ })
2890
+ ).optional(),
2891
+ settings: z.object({
2892
+ preventAutoRedirect: z.boolean().describe(
2893
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
2894
+ ).optional(),
2895
+ keywords: z.array(
2896
+ z.object({
2897
+ term: z.string().describe("Keyword value.").optional(),
2898
+ isMain: z.boolean().describe(
2899
+ "Whether the keyword is the main focus keyword."
2900
+ ).optional(),
2901
+ origin: z.string().describe(
2902
+ "The source that added the keyword terms to the SEO settings."
2903
+ ).max(1e3).optional().nullable()
2904
+ })
2905
+ ).max(5).optional()
2906
+ }).describe("SEO general settings.").optional()
2907
+ }).describe(
2908
+ "SEO schema data for customizing meta tags and search engine settings."
2909
+ ).optional()
2910
+ }).describe("SEO settings for the experience page.").optional()
2911
+ }).describe("Experience to update. May be partial.")
2912
+ });
2913
+ var UpdateExperienceResponse = z.object({
2914
+ _id: z.string().describe("Experience ID.").regex(
2915
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2916
+ "Must be a valid GUID"
2917
+ ).optional().nullable(),
2918
+ reservationLocationId: z.string().describe("ID of the reservation location this experience is assigned to.").regex(
2919
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2920
+ "Must be a valid GUID"
2921
+ ).optional().nullable(),
2922
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2923
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
2924
+ ).optional().nullable(),
2925
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
2926
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
2927
+ configuration: z.object({
2928
+ displayInfo: z.object({
2929
+ name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
2930
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
2931
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
2932
+ richContent: z.any().describe(
2933
+ "Detailed description of the experience using rich content formatting."
2934
+ ).optional()
2935
+ }).describe("Display information for the experience.").optional(),
2936
+ paymentPolicy: z.intersection(
2937
+ z.object({
2938
+ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
2939
+ }),
2940
+ z.xor([
2941
+ z.object({ perGuestOptions: z.never().optional() }),
2942
+ z.object({
2943
+ perGuestOptions: z.object({
2944
+ price: z.string().describe(
2945
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
2946
+ ).optional().nullable()
2947
+ }).describe("Per-guest pricing settings.")
2948
+ })
2949
+ ])
2950
+ ).describe(
2951
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
2952
+ ).optional(),
2953
+ onlineReservations: z.object({
2954
+ partySize: z.object({
2955
+ min: z.number().int().describe("Minimum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable(),
2956
+ max: z.number().int().describe("Maximum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable()
2957
+ }).describe("Party size.").optional(),
2958
+ minimumReservationNotice: z.object({
2959
+ number: z.number().int().describe(
2960
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2961
+ ).min(1).max(1e3).optional().nullable(),
2962
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
2963
+ }).describe("Minimum reservation notice.").optional(),
2964
+ maximumReservationNotice: z.object({
2965
+ number: z.number().int().describe(
2966
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
2967
+ ).min(1).max(1e3).optional().nullable(),
2968
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
2969
+ }).describe("Maximum reservation notice.").optional(),
2970
+ approval: z.object({
2971
+ mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
2972
+ }).describe("Approval.").optional(),
2973
+ maxGuests: z.object({
2974
+ number: z.number().int().describe(
2975
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
2976
+ ).min(0).max(1e4).optional().nullable()
2977
+ }).describe("Maximum number of guests.").optional(),
2978
+ businessSchedule: z.object({
2979
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
2980
+ entries: z.array(
2981
+ z.intersection(
2982
+ z.object({
2983
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
2984
+ }),
2985
+ z.xor([
2986
+ z.object({
2987
+ weeklyOptions: z.never().optional(),
2988
+ oneTimeOptions: z.never().optional()
2989
+ }),
2990
+ z.object({
2991
+ oneTimeOptions: z.never().optional(),
2992
+ weeklyOptions: z.object({
2993
+ startDate: z.string().describe("Start date.").optional().nullable(),
2994
+ endDate: z.string().describe("End date.").optional().nullable(),
2995
+ startDaysAndTimes: z.array(
2996
+ z.object({
2997
+ day: z.enum([
2998
+ "MONDAY",
2999
+ "TUESDAY",
3000
+ "WEDNESDAY",
3001
+ "THURSDAY",
3002
+ "FRIDAY",
3003
+ "SATURDAY",
3004
+ "SUNDAY"
3005
+ ]).describe("Day of week.").optional(),
3006
+ time: z.string().describe(
3007
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
3008
+ ).max(5).min(5).optional().nullable()
3009
+ })
3010
+ ).max(100).optional()
3011
+ }).describe("Weekly recurrence settings.")
3012
+ }),
3013
+ z.object({
3014
+ weeklyOptions: z.never().optional(),
3015
+ oneTimeOptions: z.object({
3016
+ startDate: z.string().describe("Start date.").optional().nullable(),
3017
+ startTime: z.string().describe(
3018
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
3019
+ ).max(5).min(5).optional().nullable()
3020
+ }).describe("1-time event settings.")
3021
+ })
3022
+ ])
3023
+ )
3024
+ ).max(10).optional()
3025
+ }).describe("Business schedule.").optional()
3026
+ }).describe(
3027
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
3028
+ ).optional(),
3029
+ reservationForm: z.object({
3030
+ submitMessage: z.string().describe(
3031
+ "Message displayed to customers when they submit the reservation form."
3032
+ ).max(1e6).optional().nullable(),
3033
+ policiesEnabled: z.boolean().describe(
3034
+ "Whether to display privacy policy and terms and conditions to customers."
3035
+ ).optional().nullable(),
3036
+ privacyPolicy: z.intersection(
3037
+ z.object({
3038
+ enabled: z.boolean().describe(
3039
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
3040
+ ).optional().nullable()
3041
+ }),
3042
+ z.xor([
3043
+ z.object({
3044
+ url: z.never().optional(),
3045
+ text: z.never().optional()
3046
+ }),
3047
+ z.object({
3048
+ text: z.never().optional(),
3049
+ url: z.string().describe("Privacy policy URL.")
3050
+ }),
3051
+ z.object({
3052
+ url: z.never().optional(),
3053
+ text: z.string().describe("Privacy policy text.").max(1e6)
3054
+ })
3055
+ ])
3056
+ ).describe("Privacy policy display settings.").optional(),
3057
+ termsAndConditions: z.intersection(
3058
+ z.object({
3059
+ enabled: z.boolean().describe(
3060
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
3061
+ ).optional().nullable()
3062
+ }),
3063
+ z.xor([
3064
+ z.object({
3065
+ url: z.never().optional(),
3066
+ text: z.never().optional()
3067
+ }),
3068
+ z.object({
3069
+ text: z.never().optional(),
3070
+ url: z.string().describe("Terms and conditions URL.")
3071
+ }),
3072
+ z.object({
3073
+ url: z.never().optional(),
3074
+ text: z.string().describe("Terms and conditions text.").max(1e6)
3075
+ })
3076
+ ])
3077
+ ).describe("Terms and conditions display settings.").optional(),
3078
+ customFieldDefinitions: z.array(
3079
+ z.object({
3080
+ _id: z.string().describe("Custom field ID.").regex(
3081
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3082
+ "Must be a valid GUID"
3083
+ ).optional().nullable(),
3084
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
3085
+ required: z.boolean().describe(
3086
+ "Whether the custom field is required.\n\nDefault: `false`"
3087
+ ).optional().nullable()
3088
+ })
3089
+ ).max(1e3).optional(),
3090
+ lastNameRequired: z.boolean().describe(
3091
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
3092
+ ).optional().nullable(),
3093
+ emailRequired: z.boolean().describe(
3094
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
3095
+ ).optional().nullable(),
3096
+ emailMarketingCheckbox: z.object({
3097
+ enabled: z.boolean().describe(
3098
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
3099
+ ).optional().nullable(),
3100
+ checkedByDefault: z.boolean().describe(
3101
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
3102
+ ).optional().nullable()
3103
+ }).describe("Email marketing checkbox settings.").optional()
3104
+ }).describe(
3105
+ "Custom form fields and settings for the reservation booking form."
3106
+ ).optional(),
3107
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
3108
+ }).describe("Experience configuration.").optional(),
3109
+ currency: z.string().describe(
3110
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
3111
+ ).optional().nullable(),
3112
+ extendedFields: z.object({
3113
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
3114
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
3115
+ ).optional()
3116
+ }).describe("Extended fields.").optional(),
3117
+ tags: z.object({
3118
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
3119
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
3120
+ ).optional(),
3121
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
3122
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
3123
+ ).optional()
3124
+ }).describe(
3125
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
3126
+ ).optional(),
3127
+ slug: z.string().describe(
3128
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
3129
+ ).max(300).optional().nullable(),
3130
+ seoSettings: z.object({
3131
+ seoSchema: z.object({
3132
+ tags: z.array(
3133
+ z.object({
3134
+ type: z.string().describe(
3135
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
3136
+ ).optional(),
3137
+ props: z.record(z.string(), z.any()).describe(
3138
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
3139
+ ).optional().nullable(),
3140
+ meta: z.record(z.string(), z.any()).describe(
3141
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
3142
+ ).optional().nullable(),
3143
+ children: z.string().describe(
3144
+ "SEO tag inner content. For example, `<title> inner content </title>`."
3145
+ ).optional(),
3146
+ custom: z.boolean().describe(
3147
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
3148
+ ).optional(),
3149
+ disabled: z.boolean().describe(
3150
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
3151
+ ).optional()
3152
+ })
3153
+ ).optional(),
3154
+ settings: z.object({
3155
+ preventAutoRedirect: z.boolean().describe(
3156
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
3157
+ ).optional(),
3158
+ keywords: z.array(
3159
+ z.object({
3160
+ term: z.string().describe("Keyword value.").optional(),
3161
+ isMain: z.boolean().describe(
3162
+ "Whether the keyword is the main focus keyword."
3163
+ ).optional(),
3164
+ origin: z.string().describe(
3165
+ "The source that added the keyword terms to the SEO settings."
3166
+ ).max(1e3).optional().nullable()
3167
+ })
3168
+ ).max(5).optional()
3169
+ }).describe("SEO general settings.").optional()
3170
+ }).describe(
3171
+ "SEO schema data for customizing meta tags and search engine settings."
3172
+ ).optional()
3173
+ }).describe("SEO settings for the experience page.").optional()
3174
+ });
3175
+ var QueryExperiencesRequest = z.object({
3176
+ query: z.intersection(
3177
+ z.object({
3178
+ filter: z.record(z.string(), z.any()).describe(
3179
+ "Filter object.\n\nLearn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section)."
3180
+ ).optional().nullable(),
3181
+ sort: z.array(
3182
+ z.object({
3183
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
3184
+ order: z.enum(["ASC", "DESC"]).optional()
3185
+ })
3186
+ ).max(5).optional()
3187
+ }),
3188
+ z.xor([
3189
+ z.object({ cursorPaging: z.never().optional() }),
3190
+ z.object({
3191
+ cursorPaging: z.object({
3192
+ limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
3193
+ cursor: z.string().describe(
3194
+ "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
3195
+ ).max(16e3).optional().nullable()
3196
+ }).describe(
3197
+ "Cursor paging options.\n\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging)."
3198
+ )
3199
+ })
3200
+ ])
3201
+ ).describe("Query criteria for filtering and sorting experiences.")
3202
+ });
3203
+ var QueryExperiencesResponse = z.object({
3204
+ experiences: z.array(
3205
+ z.object({
3206
+ _id: z.string().describe("Experience ID.").regex(
3207
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3208
+ "Must be a valid GUID"
3209
+ ).optional().nullable(),
3210
+ reservationLocationId: z.string().describe(
3211
+ "ID of the reservation location this experience is assigned to."
3212
+ ).regex(
3213
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3214
+ "Must be a valid GUID"
3215
+ ).optional().nullable(),
3216
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
3217
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
3218
+ ).optional().nullable(),
3219
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
3220
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
3221
+ configuration: z.object({
3222
+ displayInfo: z.object({
3223
+ name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
3224
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
3225
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
3226
+ richContent: z.any().describe(
3227
+ "Detailed description of the experience using rich content formatting."
3228
+ ).optional()
3229
+ }).describe("Display information for the experience.").optional(),
3230
+ paymentPolicy: z.intersection(
3231
+ z.object({
3232
+ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
3233
+ }),
3234
+ z.xor([
3235
+ z.object({ perGuestOptions: z.never().optional() }),
3236
+ z.object({
3237
+ perGuestOptions: z.object({
3238
+ price: z.string().describe(
3239
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
3240
+ ).optional().nullable()
3241
+ }).describe("Per-guest pricing settings.")
3242
+ })
3243
+ ])
3244
+ ).describe(
3245
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
3246
+ ).optional(),
3247
+ onlineReservations: z.object({
3248
+ partySize: z.object({
3249
+ min: z.number().int().describe(
3250
+ "Minimum number of guests allowed for a reservation."
3251
+ ).min(1).max(1e4).optional().nullable(),
3252
+ max: z.number().int().describe(
3253
+ "Maximum number of guests allowed for a reservation."
3254
+ ).min(1).max(1e4).optional().nullable()
3255
+ }).describe("Party size.").optional(),
3256
+ minimumReservationNotice: z.object({
3257
+ number: z.number().int().describe(
3258
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
3259
+ ).min(1).max(1e3).optional().nullable(),
3260
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
3261
+ }).describe("Minimum reservation notice.").optional(),
3262
+ maximumReservationNotice: z.object({
3263
+ number: z.number().int().describe(
3264
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
3265
+ ).min(1).max(1e3).optional().nullable(),
3266
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
3267
+ }).describe("Maximum reservation notice.").optional(),
3268
+ approval: z.object({
3269
+ mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
3270
+ }).describe("Approval.").optional(),
3271
+ maxGuests: z.object({
3272
+ number: z.number().int().describe(
3273
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
3274
+ ).min(0).max(1e4).optional().nullable()
3275
+ }).describe("Maximum number of guests.").optional(),
3276
+ businessSchedule: z.object({
3277
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
3278
+ entries: z.array(
3279
+ z.intersection(
3280
+ z.object({
3281
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
3282
+ }),
3283
+ z.xor([
3284
+ z.object({
3285
+ weeklyOptions: z.never().optional(),
3286
+ oneTimeOptions: z.never().optional()
3287
+ }),
3288
+ z.object({
3289
+ oneTimeOptions: z.never().optional(),
3290
+ weeklyOptions: z.object({
3291
+ startDate: z.string().describe("Start date.").optional().nullable(),
3292
+ endDate: z.string().describe("End date.").optional().nullable(),
3293
+ startDaysAndTimes: z.array(
3294
+ z.object({
3295
+ day: z.enum([
3296
+ "MONDAY",
3297
+ "TUESDAY",
3298
+ "WEDNESDAY",
3299
+ "THURSDAY",
3300
+ "FRIDAY",
3301
+ "SATURDAY",
3302
+ "SUNDAY"
3303
+ ]).describe("Day of week.").optional(),
3304
+ time: z.string().describe(
3305
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
3306
+ ).max(5).min(5).optional().nullable()
3307
+ })
3308
+ ).max(100).optional()
3309
+ }).describe("Weekly recurrence settings.")
3310
+ }),
3311
+ z.object({
3312
+ weeklyOptions: z.never().optional(),
3313
+ oneTimeOptions: z.object({
3314
+ startDate: z.string().describe("Start date.").optional().nullable(),
3315
+ startTime: z.string().describe(
3316
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
3317
+ ).max(5).min(5).optional().nullable()
3318
+ }).describe("1-time event settings.")
3319
+ })
3320
+ ])
3321
+ )
3322
+ ).max(10).optional()
3323
+ }).describe("Business schedule.").optional()
3324
+ }).describe(
3325
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
3326
+ ).optional(),
3327
+ reservationForm: z.object({
3328
+ submitMessage: z.string().describe(
3329
+ "Message displayed to customers when they submit the reservation form."
3330
+ ).max(1e6).optional().nullable(),
3331
+ policiesEnabled: z.boolean().describe(
3332
+ "Whether to display privacy policy and terms and conditions to customers."
3333
+ ).optional().nullable(),
3334
+ privacyPolicy: z.intersection(
3335
+ z.object({
3336
+ enabled: z.boolean().describe(
3337
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
3338
+ ).optional().nullable()
3339
+ }),
3340
+ z.xor([
3341
+ z.object({
3342
+ url: z.never().optional(),
3343
+ text: z.never().optional()
3344
+ }),
3345
+ z.object({
3346
+ text: z.never().optional(),
3347
+ url: z.string().describe("Privacy policy URL.")
3348
+ }),
3349
+ z.object({
3350
+ url: z.never().optional(),
3351
+ text: z.string().describe("Privacy policy text.").max(1e6)
3352
+ })
3353
+ ])
3354
+ ).describe("Privacy policy display settings.").optional(),
3355
+ termsAndConditions: z.intersection(
3356
+ z.object({
3357
+ enabled: z.boolean().describe(
3358
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
3359
+ ).optional().nullable()
3360
+ }),
3361
+ z.xor([
3362
+ z.object({
3363
+ url: z.never().optional(),
3364
+ text: z.never().optional()
3365
+ }),
3366
+ z.object({
3367
+ text: z.never().optional(),
3368
+ url: z.string().describe("Terms and conditions URL.")
3369
+ }),
3370
+ z.object({
3371
+ url: z.never().optional(),
3372
+ text: z.string().describe("Terms and conditions text.").max(1e6)
3373
+ })
3374
+ ])
3375
+ ).describe("Terms and conditions display settings.").optional(),
3376
+ customFieldDefinitions: z.array(
3377
+ z.object({
3378
+ _id: z.string().describe("Custom field ID.").regex(
3379
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3380
+ "Must be a valid GUID"
3381
+ ).optional().nullable(),
3382
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
3383
+ required: z.boolean().describe(
3384
+ "Whether the custom field is required.\n\nDefault: `false`"
3385
+ ).optional().nullable()
3386
+ })
3387
+ ).max(1e3).optional(),
3388
+ lastNameRequired: z.boolean().describe(
3389
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
3390
+ ).optional().nullable(),
3391
+ emailRequired: z.boolean().describe(
3392
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
3393
+ ).optional().nullable(),
3394
+ emailMarketingCheckbox: z.object({
3395
+ enabled: z.boolean().describe(
3396
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
3397
+ ).optional().nullable(),
3398
+ checkedByDefault: z.boolean().describe(
3399
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
3400
+ ).optional().nullable()
3401
+ }).describe("Email marketing checkbox settings.").optional()
3402
+ }).describe(
3403
+ "Custom form fields and settings for the reservation booking form."
3404
+ ).optional(),
3405
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
3406
+ }).describe("Experience configuration.").optional(),
3407
+ currency: z.string().describe(
3408
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
3409
+ ).optional().nullable(),
3410
+ extendedFields: z.object({
3411
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
3412
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
3413
+ ).optional()
3414
+ }).describe("Extended fields.").optional(),
3415
+ tags: z.object({
3416
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
3417
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
3418
+ ).optional(),
3419
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
3420
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
3421
+ ).optional()
3422
+ }).describe(
3423
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
3424
+ ).optional(),
3425
+ slug: z.string().describe(
3426
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
3427
+ ).max(300).optional().nullable(),
3428
+ seoSettings: z.object({
3429
+ seoSchema: z.object({
3430
+ tags: z.array(
3431
+ z.object({
3432
+ type: z.string().describe(
3433
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
3434
+ ).optional(),
3435
+ props: z.record(z.string(), z.any()).describe(
3436
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
3437
+ ).optional().nullable(),
3438
+ meta: z.record(z.string(), z.any()).describe(
3439
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
3440
+ ).optional().nullable(),
3441
+ children: z.string().describe(
3442
+ "SEO tag inner content. For example, `<title> inner content </title>`."
3443
+ ).optional(),
3444
+ custom: z.boolean().describe(
3445
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
3446
+ ).optional(),
3447
+ disabled: z.boolean().describe(
3448
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
3449
+ ).optional()
3450
+ })
3451
+ ).optional(),
3452
+ settings: z.object({
3453
+ preventAutoRedirect: z.boolean().describe(
3454
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
3455
+ ).optional(),
3456
+ keywords: z.array(
3457
+ z.object({
3458
+ term: z.string().describe("Keyword value.").optional(),
3459
+ isMain: z.boolean().describe(
3460
+ "Whether the keyword is the main focus keyword."
3461
+ ).optional(),
3462
+ origin: z.string().describe(
3463
+ "The source that added the keyword terms to the SEO settings."
3464
+ ).max(1e3).optional().nullable()
3465
+ })
3466
+ ).max(5).optional()
3467
+ }).describe("SEO general settings.").optional()
3468
+ }).describe(
3469
+ "SEO schema data for customizing meta tags and search engine settings."
3470
+ ).optional()
3471
+ }).describe("SEO settings for the experience page.").optional()
3472
+ })
3473
+ ).optional(),
3474
+ pagingMetadata: z.object({
3475
+ count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
3476
+ cursors: z.object({
3477
+ next: z.string().describe(
3478
+ "Cursor string pointing to the next page in the list of results."
3479
+ ).max(16e3).optional().nullable(),
3480
+ prev: z.string().describe(
3481
+ "Cursor pointing to the previous page in the list of results."
3482
+ ).max(16e3).optional().nullable()
3483
+ }).describe(
3484
+ "Cursor strings that point to the next page, previous page, or both."
3485
+ ).optional(),
3486
+ hasNext: z.boolean().describe(
3487
+ "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
3488
+ ).optional().nullable()
3489
+ }).describe("Pagination information for the query results.").optional()
3490
+ });
3491
+ var SearchExperiencesRequest = z.object({
3492
+ search: z.intersection(
3493
+ z.object({
3494
+ filter: z.record(z.string(), z.any()).describe(
3495
+ "Filter object.\n\nLearn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
3496
+ ).optional().nullable(),
3497
+ sort: z.array(
3498
+ z.object({
3499
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
3500
+ order: z.enum(["ASC", "DESC"]).optional()
3501
+ })
3502
+ ).max(100).optional(),
3503
+ aggregations: z.array(
3504
+ z.intersection(
3505
+ z.object({
3506
+ name: z.string().max(1e3).optional().nullable(),
3507
+ type: z.enum([
3508
+ "UNKNOWN_AGGREGATION_TYPE",
3509
+ "VALUE",
3510
+ "RANGE",
3511
+ "SCALAR",
3512
+ "DATE_HISTOGRAM",
3513
+ "NESTED"
3514
+ ]).optional(),
3515
+ fieldPath: z.string().max(1e3).optional()
3516
+ }),
3517
+ z.xor([
3518
+ z.object({
3519
+ value: z.never().optional(),
3520
+ range: z.never().optional(),
3521
+ scalar: z.never().optional(),
3522
+ dateHistogram: z.never().optional(),
3523
+ nested: z.never().optional()
3524
+ }),
3525
+ z.object({
3526
+ range: z.never().optional(),
3527
+ scalar: z.never().optional(),
3528
+ dateHistogram: z.never().optional(),
3529
+ nested: z.never().optional(),
3530
+ value: z.intersection(
3531
+ z.object({
3532
+ sortType: z.enum(["COUNT", "VALUE"]).describe(
3533
+ "Whether to sort by the number of matches or the value of the field."
3534
+ ).optional(),
3535
+ sortDirection: z.enum(["DESC", "ASC"]).describe(
3536
+ "Whether to sort in ascending or descending order."
3537
+ ).optional(),
3538
+ limit: z.number().int().describe(
3539
+ "Number of aggregation results to return.\nMin: `1`\nMax: `250`\nDefault: `10`"
3540
+ ).optional().nullable(),
3541
+ missingValues: z.enum(["EXCLUDE", "INCLUDE"]).describe(
3542
+ "Whether missing values should be included or excluded from the aggregation results.\nDefault: `EXCLUDE`."
3543
+ ).optional()
3544
+ }),
3545
+ z.xor([
3546
+ z.object({ includeOptions: z.never().optional() }),
3547
+ z.object({
3548
+ includeOptions: z.object({
3549
+ addToBucket: z.string().describe(
3550
+ 'Specify a custom name for the bucket containing the missing values. Defaults are "N/A" for strings, "0" for integers, and "false" for booleans.'
3551
+ ).max(1e3).optional()
3552
+ }).describe(
3553
+ "Options for including missing values in results."
3554
+ )
3555
+ })
3556
+ ])
3557
+ ).describe(
3558
+ 'A value aggregation calculates metrics such as "count" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site.'
3559
+ )
3560
+ }),
3561
+ z.object({
3562
+ value: z.never().optional(),
3563
+ scalar: z.never().optional(),
3564
+ dateHistogram: z.never().optional(),
3565
+ nested: z.never().optional(),
3566
+ range: z.object({
3567
+ buckets: z.array(
3568
+ z.object({
3569
+ from: z.number().describe(
3570
+ "Inclusive lower bound of the range. Required if `to` is not provided."
3571
+ ).optional().nullable(),
3572
+ to: z.number().describe(
3573
+ "Exclusive upper bound of the range. Required if `from` is not provided."
3574
+ ).optional().nullable()
3575
+ })
3576
+ ).max(1e3).optional()
3577
+ }).describe(
3578
+ "A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more."
3579
+ )
3580
+ }),
3581
+ z.object({
3582
+ value: z.never().optional(),
3583
+ range: z.never().optional(),
3584
+ dateHistogram: z.never().optional(),
3585
+ nested: z.never().optional(),
3586
+ scalar: z.object({
3587
+ type: z.enum([
3588
+ "UNKNOWN_SCALAR_TYPE",
3589
+ "COUNT_DISTINCT",
3590
+ "MIN",
3591
+ "MAX"
3592
+ ]).describe("Operation type for the scalar aggregation.").optional()
3593
+ }).describe(
3594
+ "A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site."
3595
+ )
3596
+ }),
3597
+ z.object({
3598
+ value: z.never().optional(),
3599
+ range: z.never().optional(),
3600
+ scalar: z.never().optional(),
3601
+ nested: z.never().optional(),
3602
+ dateHistogram: z.object({
3603
+ interval: z.enum([
3604
+ "YEAR",
3605
+ "MONTH",
3606
+ "WEEK",
3607
+ "DAY",
3608
+ "HOUR",
3609
+ "MINUTE",
3610
+ "SECOND"
3611
+ ]).describe("Interval for date histogram aggregation.").optional()
3612
+ }).describe(
3613
+ "A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week."
3614
+ )
3615
+ }),
3616
+ z.object({
3617
+ value: z.never().optional(),
3618
+ range: z.never().optional(),
3619
+ scalar: z.never().optional(),
3620
+ dateHistogram: z.never().optional(),
3621
+ nested: z.object({
3622
+ nestedAggregations: z.array(
3623
+ z.intersection(
3624
+ z.object({
3625
+ name: z.string().describe(
3626
+ "Aggregation name displayed in the return."
3627
+ ).max(1e3).optional().nullable(),
3628
+ type: z.enum([
3629
+ "UNKNOWN_AGGREGATION_TYPE",
3630
+ "VALUE",
3631
+ "RANGE",
3632
+ "SCALAR",
3633
+ "DATE_HISTOGRAM"
3634
+ ]).optional(),
3635
+ fieldPath: z.string().describe("Field to aggregate by.").max(1e3).optional()
3636
+ }),
3637
+ z.xor([
3638
+ z.object({
3639
+ value: z.never().optional(),
3640
+ range: z.never().optional(),
3641
+ scalar: z.never().optional(),
3642
+ dateHistogram: z.never().optional()
3643
+ }),
3644
+ z.object({
3645
+ range: z.never().optional(),
3646
+ scalar: z.never().optional(),
3647
+ dateHistogram: z.never().optional(),
3648
+ value: z.intersection(
3649
+ z.object({
3650
+ sortType: z.enum(["COUNT", "VALUE"]).describe(
3651
+ "Whether to sort by the number of matches or the value of the field."
3652
+ ).optional(),
3653
+ sortDirection: z.enum(["DESC", "ASC"]).describe(
3654
+ "Whether to sort in ascending or descending order."
3655
+ ).optional(),
3656
+ limit: z.number().int().describe(
3657
+ "Number of aggregation results to return.\nMin: `1`\nMax: `250`\nDefault: `10`"
3658
+ ).optional().nullable(),
3659
+ missingValues: z.enum(["EXCLUDE", "INCLUDE"]).describe(
3660
+ "Whether missing values should be included or excluded from the aggregation results.\nDefault: `EXCLUDE`."
3661
+ ).optional()
3662
+ }),
3663
+ z.xor([
3664
+ z.object({
3665
+ includeOptions: z.never().optional()
3666
+ }),
3667
+ z.object({
3668
+ includeOptions: z.object({
3669
+ addToBucket: z.string().describe(
3670
+ 'Specify a custom name for the bucket containing the missing values. Defaults are "N/A" for strings, "0" for integers, and "false" for booleans.'
3671
+ ).max(1e3).optional()
3672
+ }).describe(
3673
+ "Options for including missing values in results."
3674
+ )
3675
+ })
3676
+ ])
3677
+ ).describe(
3678
+ 'A value aggregation calculates metrics such as "count" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site.'
3679
+ )
3680
+ }),
3681
+ z.object({
3682
+ value: z.never().optional(),
3683
+ scalar: z.never().optional(),
3684
+ dateHistogram: z.never().optional(),
3685
+ range: z.object({
3686
+ buckets: z.array(
3687
+ z.object({
3688
+ from: z.number().describe(
3689
+ "Inclusive lower bound of the range. Required if `to` is not provided."
3690
+ ).optional().nullable(),
3691
+ to: z.number().describe(
3692
+ "Exclusive upper bound of the range. Required if `from` is not provided."
3693
+ ).optional().nullable()
3694
+ })
3695
+ ).max(1e3).optional()
3696
+ }).describe(
3697
+ "A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more."
3698
+ )
3699
+ }),
3700
+ z.object({
3701
+ value: z.never().optional(),
3702
+ range: z.never().optional(),
3703
+ dateHistogram: z.never().optional(),
3704
+ scalar: z.object({
3705
+ type: z.enum([
3706
+ "UNKNOWN_SCALAR_TYPE",
3707
+ "COUNT_DISTINCT",
3708
+ "MIN",
3709
+ "MAX"
3710
+ ]).describe(
3711
+ "Operation type for the scalar aggregation."
3712
+ ).optional()
3713
+ }).describe(
3714
+ "A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site."
3715
+ )
3716
+ }),
3717
+ z.object({
3718
+ value: z.never().optional(),
3719
+ range: z.never().optional(),
3720
+ scalar: z.never().optional(),
3721
+ dateHistogram: z.object({
3722
+ interval: z.enum([
3723
+ "YEAR",
3724
+ "MONTH",
3725
+ "WEEK",
3726
+ "DAY",
3727
+ "HOUR",
3728
+ "MINUTE",
3729
+ "SECOND"
3730
+ ]).describe(
3731
+ "Interval for date histogram aggregation."
3732
+ ).optional()
3733
+ }).describe(
3734
+ "A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week."
3735
+ )
3736
+ })
3737
+ ])
3738
+ )
3739
+ ).min(2).max(10).optional()
3740
+ }).describe(
3741
+ "A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.\nFor example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`."
3742
+ )
3743
+ })
3744
+ ])
3745
+ )
3746
+ ).max(100).optional(),
3747
+ search: z.object({
3748
+ mode: z.enum(["OR", "AND"]).optional(),
3749
+ expression: z.string().describe("Search term or expression.").max(100).optional().nullable(),
3750
+ fields: z.array(z.string()).max(100).optional(),
3751
+ fuzzy: z.boolean().describe(
3752
+ "Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions."
3753
+ ).optional()
3754
+ }).describe("Free text to match in searchable fields.").optional(),
3755
+ timeZone: z.string().describe(
3756
+ 'Time zone to adjust date-time-based filters and aggregations, in ISO 8601 (including offsets) or IANA time zone database (including time zone IDs) format.\nApplies to all relevant filters and aggregations, unless overridden by providing timestamps including time zone. For example, "2023-12-20T10:52:34.795Z".'
3757
+ ).max(100).optional().nullable()
3758
+ }),
3759
+ z.xor([
3760
+ z.object({ cursorPaging: z.never().optional() }),
3761
+ z.object({
3762
+ cursorPaging: z.object({
3763
+ limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
3764
+ cursor: z.string().describe(
3765
+ "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
3766
+ ).max(16e3).optional().nullable()
3767
+ }).describe(
3768
+ "Cursor paging options.\n\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging)."
3769
+ )
3770
+ })
3771
+ ])
3772
+ ).describe("Search query.")
3773
+ });
3774
+ var SearchExperiencesResponse = z.object({
3775
+ experiences: z.array(
3776
+ z.object({
3777
+ _id: z.string().describe("Experience ID.").regex(
3778
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3779
+ "Must be a valid GUID"
3780
+ ).optional().nullable(),
3781
+ reservationLocationId: z.string().describe(
3782
+ "ID of the reservation location this experience is assigned to."
3783
+ ).regex(
3784
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3785
+ "Must be a valid GUID"
3786
+ ).optional().nullable(),
3787
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
3788
+ "Revision number, which increments by 1 each time the experience is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the experience.\n\nIgnored when creating an experience."
3789
+ ).optional().nullable(),
3790
+ _createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
3791
+ _updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
3792
+ configuration: z.object({
3793
+ displayInfo: z.object({
3794
+ name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
3795
+ shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
3796
+ coverImage: z.string().describe("Cover image for the experience.").optional(),
3797
+ richContent: z.any().describe(
3798
+ "Detailed description of the experience using rich content formatting."
3799
+ ).optional()
3800
+ }).describe("Display information for the experience.").optional(),
3801
+ paymentPolicy: z.intersection(
3802
+ z.object({
3803
+ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
3804
+ }),
3805
+ z.xor([
3806
+ z.object({ perGuestOptions: z.never().optional() }),
3807
+ z.object({
3808
+ perGuestOptions: z.object({
3809
+ price: z.string().describe(
3810
+ 'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
3811
+ ).optional().nullable()
3812
+ }).describe("Per-guest pricing settings.")
3813
+ })
3814
+ ])
3815
+ ).describe(
3816
+ "Payment policy for the experience. This policy determines how the restaurant charges for reservations."
3817
+ ).optional(),
3818
+ onlineReservations: z.object({
3819
+ partySize: z.object({
3820
+ min: z.number().int().describe(
3821
+ "Minimum number of guests allowed for a reservation."
3822
+ ).min(1).max(1e4).optional().nullable(),
3823
+ max: z.number().int().describe(
3824
+ "Maximum number of guests allowed for a reservation."
3825
+ ).min(1).max(1e4).optional().nullable()
3826
+ }).describe("Party size.").optional(),
3827
+ minimumReservationNotice: z.object({
3828
+ number: z.number().int().describe(
3829
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
3830
+ ).min(1).max(1e3).optional().nullable(),
3831
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
3832
+ }).describe("Minimum reservation notice.").optional(),
3833
+ maximumReservationNotice: z.object({
3834
+ number: z.number().int().describe(
3835
+ "Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
3836
+ ).min(1).max(1e3).optional().nullable(),
3837
+ unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
3838
+ }).describe("Maximum reservation notice.").optional(),
3839
+ approval: z.object({
3840
+ mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
3841
+ }).describe("Approval.").optional(),
3842
+ maxGuests: z.object({
3843
+ number: z.number().int().describe(
3844
+ "Maximum total number of guests that can have active reservations for this experience at the same time."
3845
+ ).min(0).max(1e4).optional().nullable()
3846
+ }).describe("Maximum number of guests.").optional(),
3847
+ businessSchedule: z.object({
3848
+ durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
3849
+ entries: z.array(
3850
+ z.intersection(
3851
+ z.object({
3852
+ recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
3853
+ }),
3854
+ z.xor([
3855
+ z.object({
3856
+ weeklyOptions: z.never().optional(),
3857
+ oneTimeOptions: z.never().optional()
3858
+ }),
3859
+ z.object({
3860
+ oneTimeOptions: z.never().optional(),
3861
+ weeklyOptions: z.object({
3862
+ startDate: z.string().describe("Start date.").optional().nullable(),
3863
+ endDate: z.string().describe("End date.").optional().nullable(),
3864
+ startDaysAndTimes: z.array(
3865
+ z.object({
3866
+ day: z.enum([
3867
+ "MONDAY",
3868
+ "TUESDAY",
3869
+ "WEDNESDAY",
3870
+ "THURSDAY",
3871
+ "FRIDAY",
3872
+ "SATURDAY",
3873
+ "SUNDAY"
3874
+ ]).describe("Day of week.").optional(),
3875
+ time: z.string().describe(
3876
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
3877
+ ).max(5).min(5).optional().nullable()
3878
+ })
3879
+ ).max(100).optional()
3880
+ }).describe("Weekly recurrence settings.")
3881
+ }),
3882
+ z.object({
3883
+ weeklyOptions: z.never().optional(),
3884
+ oneTimeOptions: z.object({
3885
+ startDate: z.string().describe("Start date.").optional().nullable(),
3886
+ startTime: z.string().describe(
3887
+ 'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
3888
+ ).max(5).min(5).optional().nullable()
3889
+ }).describe("1-time event settings.")
3890
+ })
3891
+ ])
3892
+ )
3893
+ ).max(10).optional()
3894
+ }).describe("Business schedule.").optional()
3895
+ }).describe(
3896
+ "Settings for this experience that are used to determine restaurant availability for reservations made online."
3897
+ ).optional(),
3898
+ reservationForm: z.object({
3899
+ submitMessage: z.string().describe(
3900
+ "Message displayed to customers when they submit the reservation form."
3901
+ ).max(1e6).optional().nullable(),
3902
+ policiesEnabled: z.boolean().describe(
3903
+ "Whether to display privacy policy and terms and conditions to customers."
3904
+ ).optional().nullable(),
3905
+ privacyPolicy: z.intersection(
3906
+ z.object({
3907
+ enabled: z.boolean().describe(
3908
+ "Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
3909
+ ).optional().nullable()
3910
+ }),
3911
+ z.xor([
3912
+ z.object({
3913
+ url: z.never().optional(),
3914
+ text: z.never().optional()
3915
+ }),
3916
+ z.object({
3917
+ text: z.never().optional(),
3918
+ url: z.string().describe("Privacy policy URL.")
3919
+ }),
3920
+ z.object({
3921
+ url: z.never().optional(),
3922
+ text: z.string().describe("Privacy policy text.").max(1e6)
3923
+ })
3924
+ ])
3925
+ ).describe("Privacy policy display settings.").optional(),
3926
+ termsAndConditions: z.intersection(
3927
+ z.object({
3928
+ enabled: z.boolean().describe(
3929
+ "Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
3930
+ ).optional().nullable()
3931
+ }),
3932
+ z.xor([
3933
+ z.object({
3934
+ url: z.never().optional(),
3935
+ text: z.never().optional()
3936
+ }),
3937
+ z.object({
3938
+ text: z.never().optional(),
3939
+ url: z.string().describe("Terms and conditions URL.")
3940
+ }),
3941
+ z.object({
3942
+ url: z.never().optional(),
3943
+ text: z.string().describe("Terms and conditions text.").max(1e6)
3944
+ })
3945
+ ])
3946
+ ).describe("Terms and conditions display settings.").optional(),
3947
+ customFieldDefinitions: z.array(
3948
+ z.object({
3949
+ _id: z.string().describe("Custom field ID.").regex(
3950
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
3951
+ "Must be a valid GUID"
3952
+ ).optional().nullable(),
3953
+ name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
3954
+ required: z.boolean().describe(
3955
+ "Whether the custom field is required.\n\nDefault: `false`"
3956
+ ).optional().nullable()
3957
+ })
3958
+ ).max(1e3).optional(),
3959
+ lastNameRequired: z.boolean().describe(
3960
+ "Whether a last name is required in the reservation form.\n\nDefault: `false`"
3961
+ ).optional().nullable(),
3962
+ emailRequired: z.boolean().describe(
3963
+ "Whether an email is required in the reservation form.\n\nDefault: `false`"
3964
+ ).optional().nullable(),
3965
+ emailMarketingCheckbox: z.object({
3966
+ enabled: z.boolean().describe(
3967
+ "Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
3968
+ ).optional().nullable(),
3969
+ checkedByDefault: z.boolean().describe(
3970
+ "Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
3971
+ ).optional().nullable()
3972
+ }).describe("Email marketing checkbox settings.").optional()
3973
+ }).describe(
3974
+ "Custom form fields and settings for the reservation booking form."
3975
+ ).optional(),
3976
+ visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
3977
+ }).describe("Experience configuration.").optional(),
3978
+ currency: z.string().describe(
3979
+ "3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
3980
+ ).optional().nullable(),
3981
+ extendedFields: z.object({
3982
+ namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
3983
+ "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
3984
+ ).optional()
3985
+ }).describe("Extended fields.").optional(),
3986
+ tags: z.object({
3987
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
3988
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
3989
+ ).optional(),
3990
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
3991
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
3992
+ ).optional()
3993
+ }).describe(
3994
+ "Tags assigned to the experience. Tags must be created using the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction) before they can be assigned."
3995
+ ).optional(),
3996
+ slug: z.string().describe(
3997
+ 'URL-friendly identifier for the experience page, derived from the experience display name in kebab-case format (e.g., "wine-tasting-event"). Used to create readable URLs for the experience page.'
3998
+ ).max(300).optional().nullable(),
3999
+ seoSettings: z.object({
4000
+ seoSchema: z.object({
4001
+ tags: z.array(
4002
+ z.object({
4003
+ type: z.string().describe(
4004
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
4005
+ ).optional(),
4006
+ props: z.record(z.string(), z.any()).describe(
4007
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
4008
+ ).optional().nullable(),
4009
+ meta: z.record(z.string(), z.any()).describe(
4010
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
4011
+ ).optional().nullable(),
4012
+ children: z.string().describe(
4013
+ "SEO tag inner content. For example, `<title> inner content </title>`."
4014
+ ).optional(),
4015
+ custom: z.boolean().describe(
4016
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
4017
+ ).optional(),
4018
+ disabled: z.boolean().describe(
4019
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
4020
+ ).optional()
4021
+ })
4022
+ ).optional(),
4023
+ settings: z.object({
4024
+ preventAutoRedirect: z.boolean().describe(
4025
+ "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.\n\n\nDefault: `false` (automatical redirect is enabled)."
4026
+ ).optional(),
4027
+ keywords: z.array(
4028
+ z.object({
4029
+ term: z.string().describe("Keyword value.").optional(),
4030
+ isMain: z.boolean().describe(
4031
+ "Whether the keyword is the main focus keyword."
4032
+ ).optional(),
4033
+ origin: z.string().describe(
4034
+ "The source that added the keyword terms to the SEO settings."
4035
+ ).max(1e3).optional().nullable()
4036
+ })
4037
+ ).max(5).optional()
4038
+ }).describe("SEO general settings.").optional()
4039
+ }).describe(
4040
+ "SEO schema data for customizing meta tags and search engine settings."
4041
+ ).optional()
4042
+ }).describe("SEO settings for the experience page.").optional()
4043
+ })
4044
+ ).optional(),
4045
+ pagingMetadata: z.object({
4046
+ count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
4047
+ cursors: z.object({
4048
+ next: z.string().describe(
4049
+ "Cursor string pointing to the next page in the list of results."
4050
+ ).max(16e3).optional().nullable(),
4051
+ prev: z.string().describe(
4052
+ "Cursor pointing to the previous page in the list of results."
4053
+ ).max(16e3).optional().nullable()
4054
+ }).describe(
4055
+ "Cursor strings that point to the next page, previous page, or both."
4056
+ ).optional(),
4057
+ hasNext: z.boolean().describe(
4058
+ "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
4059
+ ).optional().nullable()
4060
+ }).describe("Cursor paging metadata.").optional(),
4061
+ aggregationData: z.object({
4062
+ results: z.array(
4063
+ z.intersection(
4064
+ z.object({
4065
+ name: z.string().describe("Aggregation name defined in the request.").max(1e3).optional(),
4066
+ type: z.enum([
4067
+ "UNKNOWN_AGGREGATION_TYPE",
4068
+ "VALUE",
4069
+ "RANGE",
4070
+ "SCALAR",
4071
+ "DATE_HISTOGRAM",
4072
+ "NESTED"
4073
+ ]).describe("Type of aggregation that was performed.").optional(),
4074
+ fieldPath: z.string().describe("Field the data was aggregated by.").max(1e3).optional()
4075
+ }),
4076
+ z.xor([
4077
+ z.object({
4078
+ values: z.never().optional(),
4079
+ ranges: z.never().optional(),
4080
+ scalar: z.never().optional(),
4081
+ groupedByValue: z.never().optional(),
4082
+ dateHistogram: z.never().optional(),
4083
+ nested: z.never().optional()
4084
+ }),
4085
+ z.object({
4086
+ ranges: z.never().optional(),
4087
+ scalar: z.never().optional(),
4088
+ groupedByValue: z.never().optional(),
4089
+ dateHistogram: z.never().optional(),
4090
+ nested: z.never().optional(),
4091
+ values: z.object({
4092
+ results: z.array(
4093
+ z.object({
4094
+ value: z.string().describe("Value of the field").max(1e3).optional(),
4095
+ count: z.number().int().describe("Count of entities with this value").optional()
4096
+ })
4097
+ ).max(1e3).optional()
4098
+ }).describe("Value aggregation results.")
4099
+ }),
4100
+ z.object({
4101
+ values: z.never().optional(),
4102
+ scalar: z.never().optional(),
4103
+ groupedByValue: z.never().optional(),
4104
+ dateHistogram: z.never().optional(),
4105
+ nested: z.never().optional(),
4106
+ ranges: z.object({
4107
+ results: z.array(
4108
+ z.object({
4109
+ from: z.number().describe("Inclusive lower bound of the range.").optional().nullable(),
4110
+ to: z.number().describe("Exclusive upper bound of the range.").optional().nullable(),
4111
+ count: z.number().int().describe("Count of entities in the range.").optional()
4112
+ })
4113
+ ).max(1e3).optional()
4114
+ }).describe("Range aggregation results.")
4115
+ }),
4116
+ z.object({
4117
+ values: z.never().optional(),
4118
+ ranges: z.never().optional(),
4119
+ groupedByValue: z.never().optional(),
4120
+ dateHistogram: z.never().optional(),
4121
+ nested: z.never().optional(),
4122
+ scalar: z.object({
4123
+ type: z.enum([
4124
+ "UNKNOWN_SCALAR_TYPE",
4125
+ "COUNT_DISTINCT",
4126
+ "MIN",
4127
+ "MAX"
4128
+ ]).describe("Type of scalar aggregation.").optional(),
4129
+ value: z.number().describe("Value of the scalar aggregation.").optional()
4130
+ }).describe("Scalar aggregation results.")
4131
+ }),
4132
+ z.object({
4133
+ values: z.never().optional(),
4134
+ ranges: z.never().optional(),
4135
+ scalar: z.never().optional(),
4136
+ dateHistogram: z.never().optional(),
4137
+ nested: z.never().optional(),
4138
+ groupedByValue: z.object({
4139
+ results: z.array(
4140
+ z.object({
4141
+ value: z.string().max(1e3).optional(),
4142
+ nestedResults: z.intersection(
4143
+ z.object({
4144
+ name: z.string().describe(
4145
+ "Aggregation name defined in the request."
4146
+ ).max(1e3).optional(),
4147
+ type: z.enum([
4148
+ "UNKNOWN_AGGREGATION_TYPE",
4149
+ "VALUE",
4150
+ "RANGE",
4151
+ "SCALAR",
4152
+ "DATE_HISTOGRAM",
4153
+ "NESTED"
4154
+ ]).describe("Type of aggregation performed.").optional(),
4155
+ fieldPath: z.string().describe("Field the data was aggregated by.").max(1e3).optional()
4156
+ }),
4157
+ z.xor([
4158
+ z.object({
4159
+ values: z.never().optional(),
4160
+ ranges: z.never().optional(),
4161
+ scalar: z.never().optional()
4162
+ }),
4163
+ z.object({
4164
+ ranges: z.never().optional(),
4165
+ scalar: z.never().optional(),
4166
+ values: z.object({
4167
+ results: z.array(
4168
+ z.object({
4169
+ value: z.string().describe("Value of the field").max(1e3).optional(),
4170
+ count: z.number().int().describe(
4171
+ "Count of entities with this value"
4172
+ ).optional()
4173
+ })
4174
+ ).max(1e3).optional()
4175
+ }).describe(
4176
+ "List of the value aggregation results."
4177
+ )
4178
+ }),
4179
+ z.object({
4180
+ values: z.never().optional(),
4181
+ scalar: z.never().optional(),
4182
+ ranges: z.object({
4183
+ results: z.array(
4184
+ z.object({
4185
+ from: z.number().describe(
4186
+ "Inclusive lower bound of the range."
4187
+ ).optional().nullable(),
4188
+ to: z.number().describe(
4189
+ "Exclusive upper bound of the range."
4190
+ ).optional().nullable(),
4191
+ count: z.number().int().describe(
4192
+ "Count of entities in the range."
4193
+ ).optional()
4194
+ })
4195
+ ).max(1e3).optional()
4196
+ }).describe(
4197
+ "List of the range aggregation results."
4198
+ )
4199
+ }),
4200
+ z.object({
4201
+ values: z.never().optional(),
4202
+ ranges: z.never().optional(),
4203
+ scalar: z.object({
4204
+ type: z.enum([
4205
+ "UNKNOWN_SCALAR_TYPE",
4206
+ "COUNT_DISTINCT",
4207
+ "MIN",
4208
+ "MAX"
4209
+ ]).describe("Type of scalar aggregation.").optional(),
4210
+ value: z.number().describe(
4211
+ "Value of the scalar aggregation."
4212
+ ).optional()
4213
+ }).describe(
4214
+ "List of the scalar aggregation results."
4215
+ )
4216
+ })
4217
+ ])
4218
+ ).optional()
4219
+ })
4220
+ ).max(1e3).optional()
4221
+ }).describe("deprecated")
4222
+ }),
4223
+ z.object({
4224
+ values: z.never().optional(),
4225
+ ranges: z.never().optional(),
4226
+ scalar: z.never().optional(),
4227
+ groupedByValue: z.never().optional(),
4228
+ nested: z.never().optional(),
4229
+ dateHistogram: z.object({
4230
+ results: z.array(
4231
+ z.object({
4232
+ value: z.string().describe("Date in ISO 8601 format.").max(100).optional(),
4233
+ count: z.number().int().describe("Count of entities in the interval.").optional()
4234
+ })
4235
+ ).max(200).optional()
4236
+ }).describe("Date histogram aggregation results.")
4237
+ }),
4238
+ z.object({
4239
+ values: z.never().optional(),
4240
+ ranges: z.never().optional(),
4241
+ scalar: z.never().optional(),
4242
+ groupedByValue: z.never().optional(),
4243
+ dateHistogram: z.never().optional(),
4244
+ nested: z.object({
4245
+ results: z.array(
4246
+ z.object({
4247
+ results: z.record(
4248
+ z.string(),
4249
+ z.intersection(
4250
+ z.object({}),
4251
+ z.xor([
4252
+ z.object({
4253
+ value: z.never().optional(),
4254
+ range: z.never().optional(),
4255
+ scalar: z.never().optional(),
4256
+ dateHistogram: z.never().optional()
4257
+ }),
4258
+ z.object({
4259
+ range: z.never().optional(),
4260
+ scalar: z.never().optional(),
4261
+ dateHistogram: z.never().optional(),
4262
+ value: z.object({
4263
+ value: z.string().describe("Value of the field.").max(1e3).optional(),
4264
+ count: z.number().int().describe(
4265
+ "Count of entities with this value."
4266
+ ).optional().nullable()
4267
+ }).describe("Value aggregation results.")
4268
+ }),
4269
+ z.object({
4270
+ value: z.never().optional(),
4271
+ scalar: z.never().optional(),
4272
+ dateHistogram: z.never().optional(),
4273
+ range: z.object({
4274
+ from: z.number().describe(
4275
+ "Inclusive lower bound of the range."
4276
+ ).optional().nullable(),
4277
+ to: z.number().describe(
4278
+ "Exclusive upper bound of the range."
4279
+ ).optional().nullable(),
4280
+ count: z.number().int().describe(
4281
+ "Count of entities in the range."
4282
+ ).optional().nullable()
4283
+ }).describe("Range aggregation results.")
4284
+ }),
4285
+ z.object({
4286
+ value: z.never().optional(),
4287
+ range: z.never().optional(),
4288
+ dateHistogram: z.never().optional(),
4289
+ scalar: z.object({
4290
+ value: z.number().describe(
4291
+ "Scalar aggregation results."
4292
+ ).optional()
4293
+ }).describe("Scalar aggregation results.")
4294
+ }),
4295
+ z.object({
4296
+ value: z.never().optional(),
4297
+ range: z.never().optional(),
4298
+ scalar: z.never().optional(),
4299
+ dateHistogram: z.object({
4300
+ value: z.string().describe("Value of the field.").max(1e3).optional(),
4301
+ count: z.number().int().describe(
4302
+ "Count of entities with this value."
4303
+ ).optional().nullable()
4304
+ }).describe(
4305
+ "Date histogram aggregation results."
4306
+ )
4307
+ })
4308
+ ])
4309
+ )
4310
+ ).describe("List of nested aggregation results.").optional()
4311
+ })
4312
+ ).max(1e3).optional()
4313
+ }).describe("Nested aggregation results.")
4314
+ })
4315
+ ])
4316
+ )
4317
+ ).max(1e3).optional()
4318
+ }).describe("Aggregation data.").optional()
4319
+ });
4320
+ var BulkUpdateExperienceTagsRequest = z.object({
4321
+ experienceIds: z.array(z.string()).min(1).max(100),
4322
+ options: z.object({
4323
+ assignTags: z.object({
4324
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4325
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4326
+ ).optional(),
4327
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4328
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4329
+ ).optional()
4330
+ }).describe("Tags to assign to the experiences.").optional(),
4331
+ unassignTags: z.object({
4332
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4333
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4334
+ ).optional(),
4335
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4336
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4337
+ ).optional()
4338
+ }).describe("Tags to unassign from the experiences.").optional()
4339
+ }).optional()
4340
+ });
4341
+ var BulkUpdateExperienceTagsResponse = z.object({
4342
+ results: z.array(
4343
+ z.object({
4344
+ itemMetadata: z.object({
4345
+ _id: z.string().describe(
4346
+ "Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed."
4347
+ ).regex(
4348
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
4349
+ "Must be a valid GUID"
4350
+ ).optional().nullable(),
4351
+ originalIndex: z.number().int().describe(
4352
+ "Index of the item within the request array. Allows for correlation between request and response items."
4353
+ ).min(0).optional(),
4354
+ success: z.boolean().describe(
4355
+ "Whether the requested action for this item was successful. When `false`, the `error` field is returned."
4356
+ ).optional(),
4357
+ error: z.object({
4358
+ code: z.string().describe("Error code.").optional(),
4359
+ description: z.string().describe("Description of the error.").optional(),
4360
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
4361
+ }).describe("Details about the error in case of failure.").optional()
4362
+ }).describe(
4363
+ "Metadata about the individual experience tag update operation."
4364
+ ).optional()
4365
+ })
4366
+ ).min(1).max(100).optional(),
4367
+ bulkActionMetadata: z.object({
4368
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").min(0).optional(),
4369
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").min(0).optional(),
4370
+ undetailedFailures: z.number().int().describe(
4371
+ "Number of failures without details because detailed failure threshold was exceeded."
4372
+ ).min(0).optional()
4373
+ }).describe("Metadata about the bulk update operation.").optional()
4374
+ });
4375
+ var BulkUpdateExperienceTagsByFilterRequest = z.object({
4376
+ filter: z.record(z.string(), z.any()).describe("Filter criteria to select experiences for tag updates."),
4377
+ options: z.object({
4378
+ assignTags: z.object({
4379
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4380
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4381
+ ).optional(),
4382
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4383
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4384
+ ).optional()
4385
+ }).describe("Tags to assign to the filtered experiences.").optional(),
4386
+ unassignTags: z.object({
4387
+ privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4388
+ "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4389
+ ).optional(),
4390
+ publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4391
+ "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4392
+ ).optional()
4393
+ }).describe("Tags to unassign from the filtered experiences.").optional()
4394
+ }).optional()
4395
+ });
4396
+ var BulkUpdateExperienceTagsByFilterResponse = z.object({
4397
+ jobId: z.string().describe("Job ID for tracking the asynchronous bulk update operation.").regex(
4398
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
4399
+ "Must be a valid GUID"
4400
+ ).optional()
4401
+ });
4402
+ var BulkArchiveExperiencesRequest = z.object({
4403
+ experienceIds: z.array(z.string()).min(1).max(100)
4404
+ });
4405
+ var BulkArchiveExperiencesResponse = z.object({
4406
+ results: z.array(
4407
+ z.object({
4408
+ itemMetadata: z.object({
4409
+ _id: z.string().describe(
4410
+ "Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed."
4411
+ ).regex(
4412
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
4413
+ "Must be a valid GUID"
4414
+ ).optional().nullable(),
4415
+ originalIndex: z.number().int().describe(
4416
+ "Index of the item within the request array. Allows for correlation between request and response items."
4417
+ ).min(0).optional(),
4418
+ success: z.boolean().describe(
4419
+ "Whether the requested action for this item was successful. When `false`, the `error` field is returned."
4420
+ ).optional(),
4421
+ error: z.object({
4422
+ code: z.string().describe("Error code.").optional(),
4423
+ description: z.string().describe("Description of the error.").optional(),
4424
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
4425
+ }).describe("Details about the error in case of failure.").optional()
4426
+ }).describe("Metadata about archiving the experience.").optional()
4427
+ })
4428
+ ).min(1).max(100).optional(),
4429
+ bulkActionMetadata: z.object({
4430
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").min(0).optional(),
4431
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").min(0).optional(),
4432
+ undetailedFailures: z.number().int().describe(
4433
+ "Number of failures without details because detailed failure threshold was exceeded."
4434
+ ).min(0).optional()
4435
+ }).describe("Bulk action metadata.").optional()
4436
+ });
4437
+ var BulkUnarchiveExperiencesRequest = z.object({
4438
+ experienceIds: z.array(z.string()).min(1).max(100)
4439
+ });
4440
+ var BulkUnarchiveExperiencesResponse = z.object({
4441
+ results: z.array(
4442
+ z.object({
4443
+ itemMetadata: z.object({
4444
+ _id: z.string().describe(
4445
+ "Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed."
4446
+ ).regex(
4447
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
4448
+ "Must be a valid GUID"
4449
+ ).optional().nullable(),
4450
+ originalIndex: z.number().int().describe(
4451
+ "Index of the item within the request array. Allows for correlation between request and response items."
4452
+ ).min(0).optional(),
4453
+ success: z.boolean().describe(
4454
+ "Whether the requested action for this item was successful. When `false`, the `error` field is returned."
4455
+ ).optional(),
4456
+ error: z.object({
4457
+ code: z.string().describe("Error code.").optional(),
4458
+ description: z.string().describe("Description of the error.").optional(),
4459
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
4460
+ }).describe("Details about the error in case of failure.").optional()
4461
+ }).describe("Metadata about unarchiving the experience.").optional()
4462
+ })
4463
+ ).min(1).max(100).optional(),
4464
+ bulkActionMetadata: z.object({
4465
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").min(0).optional(),
4466
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").min(0).optional(),
4467
+ undetailedFailures: z.number().int().describe(
4468
+ "Number of failures without details because detailed failure threshold was exceeded."
4469
+ ).min(0).optional()
4470
+ }).describe("Bulk action metadata.").optional()
4471
+ });
4472
+
4473
+ // src/table-reservations-v1-experience-experiences.universal.ts
1559
4474
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
1560
4475
  var import_search_builder_utils = require("@wix/sdk-runtime/search-builder-utils");
1561
4476
  var TableAvailabilityType = /* @__PURE__ */ ((TableAvailabilityType2) => {
@@ -2084,7 +4999,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
2084
4999
  return WebhookIdentityType2;
2085
5000
  })(WebhookIdentityType || {});
2086
5001
  async function createExperience2(experience) {
2087
- const { httpClient, sideEffects } = arguments[1];
5002
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5003
+ if (validateRequestSchema) {
5004
+ CreateExperienceRequest.parse({ experience });
5005
+ }
2088
5006
  const payload = (0, import_transform_paths2.transformPaths)(
2089
5007
  (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ experience }, [
2090
5008
  "experience.configuration.displayInfo.richContent"
@@ -2149,7 +5067,10 @@ async function createExperience2(experience) {
2149
5067
  }
2150
5068
  }
2151
5069
  async function getExperience2(experienceId) {
2152
- const { httpClient, sideEffects } = arguments[1];
5070
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5071
+ if (validateRequestSchema) {
5072
+ GetExperienceRequest.parse({ experienceId });
5073
+ }
2153
5074
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2154
5075
  { experienceId },
2155
5076
  []
@@ -2195,7 +5116,10 @@ async function getExperience2(experienceId) {
2195
5116
  }
2196
5117
  }
2197
5118
  async function getExperienceBySlug2(slug) {
2198
- const { httpClient, sideEffects } = arguments[1];
5119
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5120
+ if (validateRequestSchema) {
5121
+ GetExperienceBySlugRequest.parse({ slug });
5122
+ }
2199
5123
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ slug }, []);
2200
5124
  const reqOpts = getExperienceBySlug(payload);
2201
5125
  sideEffects?.onSiteCall?.();
@@ -2238,7 +5162,10 @@ async function getExperienceBySlug2(slug) {
2238
5162
  }
2239
5163
  }
2240
5164
  async function updateExperience2(_id, experience) {
2241
- const { httpClient, sideEffects } = arguments[2];
5165
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5166
+ if (validateRequestSchema) {
5167
+ UpdateExperienceRequest.parse({ _id, experience });
5168
+ }
2242
5169
  const payload = (0, import_transform_paths2.transformPaths)(
2243
5170
  (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2244
5171
  { experience: { ...experience, id: _id } },
@@ -2367,7 +5294,10 @@ function queryExperiences2() {
2367
5294
  });
2368
5295
  }
2369
5296
  async function typedQueryExperiences(query) {
2370
- const { httpClient, sideEffects } = arguments[1];
5297
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5298
+ if (validateRequestSchema) {
5299
+ QueryExperiencesRequest.parse({ query });
5300
+ }
2371
5301
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query }, []);
2372
5302
  const reqOpts = queryExperiences(payload);
2373
5303
  sideEffects?.onSiteCall?.();
@@ -2418,7 +5348,10 @@ var utils = {
2418
5348
  }
2419
5349
  };
2420
5350
  async function searchExperiences2(search) {
2421
- const { httpClient, sideEffects } = arguments[1];
5351
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5352
+ if (validateRequestSchema) {
5353
+ SearchExperiencesRequest.parse({ search });
5354
+ }
2422
5355
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ search }, []);
2423
5356
  const reqOpts = searchExperiences(payload);
2424
5357
  sideEffects?.onSiteCall?.();
@@ -2461,7 +5394,10 @@ async function searchExperiences2(search) {
2461
5394
  }
2462
5395
  }
2463
5396
  async function bulkUpdateExperienceTags2(experienceIds, options) {
2464
- const { httpClient, sideEffects } = arguments[2];
5397
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5398
+ if (validateRequestSchema) {
5399
+ BulkUpdateExperienceTagsRequest.parse({ experienceIds, options });
5400
+ }
2465
5401
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2466
5402
  {
2467
5403
  experienceIds,
@@ -2497,7 +5433,10 @@ async function bulkUpdateExperienceTags2(experienceIds, options) {
2497
5433
  }
2498
5434
  }
2499
5435
  async function bulkUpdateExperienceTagsByFilter2(filter, options) {
2500
- const { httpClient, sideEffects } = arguments[2];
5436
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5437
+ if (validateRequestSchema) {
5438
+ BulkUpdateExperienceTagsByFilterRequest.parse({ filter, options });
5439
+ }
2501
5440
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2502
5441
  {
2503
5442
  filter,
@@ -2533,7 +5472,10 @@ async function bulkUpdateExperienceTagsByFilter2(filter, options) {
2533
5472
  }
2534
5473
  }
2535
5474
  async function bulkArchiveExperiences2(experienceIds) {
2536
- const { httpClient, sideEffects } = arguments[1];
5475
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5476
+ if (validateRequestSchema) {
5477
+ BulkArchiveExperiencesRequest.parse({ experienceIds });
5478
+ }
2537
5479
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2538
5480
  { experienceIds },
2539
5481
  []
@@ -2559,7 +5501,10 @@ async function bulkArchiveExperiences2(experienceIds) {
2559
5501
  }
2560
5502
  }
2561
5503
  async function bulkUnarchiveExperiences2(experienceIds) {
2562
- const { httpClient, sideEffects } = arguments[1];
5504
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5505
+ if (validateRequestSchema) {
5506
+ BulkUnarchiveExperiencesRequest.parse({ experienceIds });
5507
+ }
2563
5508
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2564
5509
  { experienceIds },
2565
5510
  []
@@ -2588,83 +5533,83 @@ async function bulkUnarchiveExperiences2(experienceIds) {
2588
5533
  }
2589
5534
 
2590
5535
  // src/table-reservations-v1-experience-experiences.public.ts
2591
- function createExperience3(httpClient) {
5536
+ function createExperience3(httpClient, __options) {
2592
5537
  return (experience) => createExperience2(
2593
5538
  experience,
2594
5539
  // @ts-ignore
2595
- { httpClient }
5540
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2596
5541
  );
2597
5542
  }
2598
- function getExperience3(httpClient) {
5543
+ function getExperience3(httpClient, __options) {
2599
5544
  return (experienceId) => getExperience2(
2600
5545
  experienceId,
2601
5546
  // @ts-ignore
2602
- { httpClient }
5547
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2603
5548
  );
2604
5549
  }
2605
- function getExperienceBySlug3(httpClient) {
5550
+ function getExperienceBySlug3(httpClient, __options) {
2606
5551
  return (slug) => getExperienceBySlug2(
2607
5552
  slug,
2608
5553
  // @ts-ignore
2609
- { httpClient }
5554
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2610
5555
  );
2611
5556
  }
2612
- function updateExperience3(httpClient) {
5557
+ function updateExperience3(httpClient, __options) {
2613
5558
  return (_id, experience) => updateExperience2(
2614
5559
  _id,
2615
5560
  experience,
2616
5561
  // @ts-ignore
2617
- { httpClient }
5562
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2618
5563
  );
2619
5564
  }
2620
- function queryExperiences3(httpClient) {
5565
+ function queryExperiences3(httpClient, __options) {
2621
5566
  return () => queryExperiences2(
2622
5567
  // @ts-ignore
2623
- { httpClient }
5568
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2624
5569
  );
2625
5570
  }
2626
- function typedQueryExperiences2(httpClient) {
5571
+ function typedQueryExperiences2(httpClient, __options) {
2627
5572
  return (query) => typedQueryExperiences(
2628
5573
  query,
2629
5574
  // @ts-ignore
2630
- { httpClient }
5575
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2631
5576
  );
2632
5577
  }
2633
- function searchExperiences3(httpClient) {
5578
+ function searchExperiences3(httpClient, __options) {
2634
5579
  return (search) => searchExperiences2(
2635
5580
  search,
2636
5581
  // @ts-ignore
2637
- { httpClient }
5582
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2638
5583
  );
2639
5584
  }
2640
- function bulkUpdateExperienceTags3(httpClient) {
5585
+ function bulkUpdateExperienceTags3(httpClient, __options) {
2641
5586
  return (experienceIds, options) => bulkUpdateExperienceTags2(
2642
5587
  experienceIds,
2643
5588
  options,
2644
5589
  // @ts-ignore
2645
- { httpClient }
5590
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2646
5591
  );
2647
5592
  }
2648
- function bulkUpdateExperienceTagsByFilter3(httpClient) {
5593
+ function bulkUpdateExperienceTagsByFilter3(httpClient, __options) {
2649
5594
  return (filter, options) => bulkUpdateExperienceTagsByFilter2(
2650
5595
  filter,
2651
5596
  options,
2652
5597
  // @ts-ignore
2653
- { httpClient }
5598
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2654
5599
  );
2655
5600
  }
2656
- function bulkArchiveExperiences3(httpClient) {
5601
+ function bulkArchiveExperiences3(httpClient, __options) {
2657
5602
  return (experienceIds) => bulkArchiveExperiences2(
2658
5603
  experienceIds,
2659
5604
  // @ts-ignore
2660
- { httpClient }
5605
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2661
5606
  );
2662
5607
  }
2663
- function bulkUnarchiveExperiences3(httpClient) {
5608
+ function bulkUnarchiveExperiences3(httpClient, __options) {
2664
5609
  return (experienceIds) => bulkUnarchiveExperiences2(
2665
5610
  experienceIds,
2666
5611
  // @ts-ignore
2667
- { httpClient }
5612
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
2668
5613
  );
2669
5614
  }
2670
5615
  var onExperienceCreated = (0, import_sdk_types.EventDefinition)(