@wix/auto_sdk_table-reservations_experiences 1.0.35 → 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.
- package/build/cjs/index.d.ts +39 -27
- package/build/cjs/index.js +3043 -32
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -3
- package/build/cjs/index.typings.js +3009 -10
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +106 -10
- package/build/cjs/meta.js +54 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +3 -3
- package/build/cjs/schemas.js +2 -2
- package/build/cjs/schemas.js.map +1 -1
- package/build/cjs/{table-reservations-v1-experience-experiences.universal-ZFrZgvqh.d.ts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.ts} +119 -61
- package/build/es/index.d.mts +39 -27
- package/build/es/index.mjs +3031 -32
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -3
- package/build/es/index.typings.mjs +2997 -10
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +106 -10
- package/build/es/meta.mjs +52 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +3 -3
- package/build/es/schemas.mjs +2 -2
- package/build/es/schemas.mjs.map +1 -1
- package/build/es/{table-reservations-v1-experience-experiences.universal-ZFrZgvqh.d.mts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.mts} +119 -61
- package/build/internal/cjs/index.d.ts +39 -27
- package/build/internal/cjs/index.js +3043 -32
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -3
- package/build/internal/cjs/index.typings.js +3009 -10
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +106 -10
- package/build/internal/cjs/meta.js +54 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +3 -3
- package/build/internal/cjs/schemas.js +2 -2
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/cjs/{table-reservations-v1-experience-experiences.universal-ZFrZgvqh.d.ts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.ts} +119 -61
- package/build/internal/es/index.d.mts +39 -27
- package/build/internal/es/index.mjs +3031 -32
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -3
- package/build/internal/es/index.typings.mjs +2997 -10
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +106 -10
- package/build/internal/es/meta.mjs +52 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +3 -3
- package/build/internal/es/schemas.mjs +2 -2
- package/build/internal/es/schemas.mjs.map +1 -1
- package/build/internal/es/{table-reservations-v1-experience-experiences.universal-ZFrZgvqh.d.mts → table-reservations-v1-experience-experiences.universal-CHddGarE.d.mts} +119 -61
- package/package.json +4 -4
|
@@ -235,6 +235,9 @@ function createExperience(payload) {
|
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
path: "experience.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
path: "experience.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
238
241
|
}
|
|
239
242
|
]
|
|
240
243
|
}
|
|
@@ -377,6 +380,9 @@ function createExperience(payload) {
|
|
|
377
380
|
},
|
|
378
381
|
{
|
|
379
382
|
path: "experience.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
path: "experience.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
380
386
|
}
|
|
381
387
|
]
|
|
382
388
|
}
|
|
@@ -526,6 +532,9 @@ function getExperience(payload) {
|
|
|
526
532
|
},
|
|
527
533
|
{
|
|
528
534
|
path: "experience.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
path: "experience.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
529
538
|
}
|
|
530
539
|
]
|
|
531
540
|
}
|
|
@@ -675,6 +684,9 @@ function getExperienceBySlug(payload) {
|
|
|
675
684
|
},
|
|
676
685
|
{
|
|
677
686
|
path: "experience.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
path: "experience.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
678
690
|
}
|
|
679
691
|
]
|
|
680
692
|
}
|
|
@@ -814,6 +826,9 @@ function updateExperience(payload) {
|
|
|
814
826
|
},
|
|
815
827
|
{
|
|
816
828
|
path: "experience.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
path: "experience.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
817
832
|
}
|
|
818
833
|
]
|
|
819
834
|
}
|
|
@@ -956,6 +971,9 @@ function updateExperience(payload) {
|
|
|
956
971
|
},
|
|
957
972
|
{
|
|
958
973
|
path: "experience.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
path: "experience.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
959
977
|
}
|
|
960
978
|
]
|
|
961
979
|
}
|
|
@@ -1105,6 +1123,9 @@ function queryExperiences(payload) {
|
|
|
1105
1123
|
},
|
|
1106
1124
|
{
|
|
1107
1125
|
path: "experiences.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
path: "experiences.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
1108
1129
|
}
|
|
1109
1130
|
]
|
|
1110
1131
|
}
|
|
@@ -1281,6 +1302,9 @@ function searchExperiences(payload) {
|
|
|
1281
1302
|
{
|
|
1282
1303
|
path: "experiences.configuration.displayInfo.richContent.nodes.tocData.itemSpacing"
|
|
1283
1304
|
},
|
|
1305
|
+
{
|
|
1306
|
+
path: "experiences.configuration.displayInfo.richContent.nodes.smartBlockCellData.shape.duration"
|
|
1307
|
+
},
|
|
1284
1308
|
{ path: "aggregationData.results.ranges.results.from" },
|
|
1285
1309
|
{ path: "aggregationData.results.ranges.results.to" },
|
|
1286
1310
|
{
|
|
@@ -1412,6 +1436,2911 @@ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/i
|
|
|
1412
1436
|
import { transformSDKPageURLV2ToRESTPageURLV2 } from "@wix/sdk-runtime/transformations/page-url-v2";
|
|
1413
1437
|
import { transformRESTPageURLV2ToSDKPageURLV2 } from "@wix/sdk-runtime/transformations/page-url-v2";
|
|
1414
1438
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
1439
|
+
|
|
1440
|
+
// src/table-reservations-v1-experience-experiences.schemas.ts
|
|
1441
|
+
import * as z from "zod";
|
|
1442
|
+
var CreateExperienceRequest = z.object({
|
|
1443
|
+
experience: z.object({
|
|
1444
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
1445
|
+
/^[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}$/,
|
|
1446
|
+
"Must be a valid GUID"
|
|
1447
|
+
).optional().nullable(),
|
|
1448
|
+
reservationLocationId: z.string().describe(
|
|
1449
|
+
"ID of the reservation location this experience is assigned to."
|
|
1450
|
+
).regex(
|
|
1451
|
+
/^[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}$/,
|
|
1452
|
+
"Must be a valid GUID"
|
|
1453
|
+
),
|
|
1454
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1455
|
+
"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."
|
|
1456
|
+
).optional().nullable(),
|
|
1457
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
1458
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
1459
|
+
configuration: z.object({
|
|
1460
|
+
displayInfo: z.object({
|
|
1461
|
+
name: z.string().describe("Experience name.").min(1).max(120),
|
|
1462
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
1463
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
1464
|
+
richContent: z.any().describe(
|
|
1465
|
+
"Detailed description of the experience using rich content formatting."
|
|
1466
|
+
).optional()
|
|
1467
|
+
}).describe("Display information for the experience."),
|
|
1468
|
+
paymentPolicy: z.intersection(
|
|
1469
|
+
z.object({ paymentPolicyType: z.enum(["PER_GUEST", "FREE"]) }),
|
|
1470
|
+
z.xor([
|
|
1471
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
1472
|
+
z.object({
|
|
1473
|
+
perGuestOptions: z.object({
|
|
1474
|
+
price: z.string().describe(
|
|
1475
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
1476
|
+
).optional().nullable()
|
|
1477
|
+
}).describe("Per-guest pricing settings.")
|
|
1478
|
+
})
|
|
1479
|
+
])
|
|
1480
|
+
).describe(
|
|
1481
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
1482
|
+
),
|
|
1483
|
+
onlineReservations: z.object({
|
|
1484
|
+
partySize: z.object({
|
|
1485
|
+
min: z.number().int().describe(
|
|
1486
|
+
"Minimum number of guests allowed for a reservation."
|
|
1487
|
+
).min(1).max(1e4),
|
|
1488
|
+
max: z.number().int().describe(
|
|
1489
|
+
"Maximum number of guests allowed for a reservation."
|
|
1490
|
+
).min(1).max(1e4)
|
|
1491
|
+
}).describe("Party size."),
|
|
1492
|
+
minimumReservationNotice: z.object({
|
|
1493
|
+
number: z.number().int().describe(
|
|
1494
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
1495
|
+
).min(1).max(1e3),
|
|
1496
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"])
|
|
1497
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
1498
|
+
maximumReservationNotice: z.object({
|
|
1499
|
+
number: z.number().int().describe(
|
|
1500
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
1501
|
+
).min(1).max(1e3),
|
|
1502
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"])
|
|
1503
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
1504
|
+
approval: z.object({ mode: z.enum(["AUTOMATIC", "MANUAL"]) }).describe("Approval."),
|
|
1505
|
+
maxGuests: z.object({
|
|
1506
|
+
number: z.number().int().describe(
|
|
1507
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
1508
|
+
).min(0).max(1e4)
|
|
1509
|
+
}).describe("Maximum number of guests.").optional(),
|
|
1510
|
+
businessSchedule: z.object({
|
|
1511
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
1512
|
+
entries: z.array(
|
|
1513
|
+
z.intersection(
|
|
1514
|
+
z.object({
|
|
1515
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).optional()
|
|
1516
|
+
}),
|
|
1517
|
+
z.xor([
|
|
1518
|
+
z.object({
|
|
1519
|
+
weeklyOptions: z.never().optional(),
|
|
1520
|
+
oneTimeOptions: z.never().optional()
|
|
1521
|
+
}),
|
|
1522
|
+
z.object({
|
|
1523
|
+
oneTimeOptions: z.never().optional(),
|
|
1524
|
+
weeklyOptions: z.object({
|
|
1525
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
1526
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
1527
|
+
startDaysAndTimes: z.array(
|
|
1528
|
+
z.object({
|
|
1529
|
+
day: z.enum([
|
|
1530
|
+
"MONDAY",
|
|
1531
|
+
"TUESDAY",
|
|
1532
|
+
"WEDNESDAY",
|
|
1533
|
+
"THURSDAY",
|
|
1534
|
+
"FRIDAY",
|
|
1535
|
+
"SATURDAY",
|
|
1536
|
+
"SUNDAY"
|
|
1537
|
+
]).optional(),
|
|
1538
|
+
time: z.string().describe(
|
|
1539
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
1540
|
+
).max(5).min(5).optional().nullable()
|
|
1541
|
+
})
|
|
1542
|
+
).max(100).optional()
|
|
1543
|
+
}).describe("Weekly recurrence settings.")
|
|
1544
|
+
}),
|
|
1545
|
+
z.object({
|
|
1546
|
+
weeklyOptions: z.never().optional(),
|
|
1547
|
+
oneTimeOptions: z.object({
|
|
1548
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
1549
|
+
startTime: z.string().describe(
|
|
1550
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
1551
|
+
).max(5).min(5).optional().nullable()
|
|
1552
|
+
}).describe("1-time event settings.")
|
|
1553
|
+
})
|
|
1554
|
+
])
|
|
1555
|
+
)
|
|
1556
|
+
).max(10).optional()
|
|
1557
|
+
}).describe("Business schedule.").optional()
|
|
1558
|
+
}).describe(
|
|
1559
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
1560
|
+
),
|
|
1561
|
+
reservationForm: z.object({
|
|
1562
|
+
submitMessage: z.string().describe(
|
|
1563
|
+
"Message displayed to customers when they submit the reservation form."
|
|
1564
|
+
).max(1e6).optional().nullable(),
|
|
1565
|
+
policiesEnabled: z.boolean().describe(
|
|
1566
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
1567
|
+
).optional().nullable(),
|
|
1568
|
+
privacyPolicy: z.intersection(
|
|
1569
|
+
z.object({
|
|
1570
|
+
enabled: z.boolean().describe(
|
|
1571
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
1572
|
+
).optional().nullable()
|
|
1573
|
+
}),
|
|
1574
|
+
z.xor([
|
|
1575
|
+
z.object({
|
|
1576
|
+
url: z.never().optional(),
|
|
1577
|
+
text: z.never().optional()
|
|
1578
|
+
}),
|
|
1579
|
+
z.object({
|
|
1580
|
+
text: z.never().optional(),
|
|
1581
|
+
url: z.string().describe("Privacy policy URL.")
|
|
1582
|
+
}),
|
|
1583
|
+
z.object({
|
|
1584
|
+
url: z.never().optional(),
|
|
1585
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
1586
|
+
})
|
|
1587
|
+
])
|
|
1588
|
+
).describe("Privacy policy display settings.").optional(),
|
|
1589
|
+
termsAndConditions: z.intersection(
|
|
1590
|
+
z.object({
|
|
1591
|
+
enabled: z.boolean().describe(
|
|
1592
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
1593
|
+
).optional().nullable()
|
|
1594
|
+
}),
|
|
1595
|
+
z.xor([
|
|
1596
|
+
z.object({
|
|
1597
|
+
url: z.never().optional(),
|
|
1598
|
+
text: z.never().optional()
|
|
1599
|
+
}),
|
|
1600
|
+
z.object({
|
|
1601
|
+
text: z.never().optional(),
|
|
1602
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
1603
|
+
}),
|
|
1604
|
+
z.object({
|
|
1605
|
+
url: z.never().optional(),
|
|
1606
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
1607
|
+
})
|
|
1608
|
+
])
|
|
1609
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
1610
|
+
customFieldDefinitions: z.array(
|
|
1611
|
+
z.object({
|
|
1612
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
1613
|
+
/^[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}$/,
|
|
1614
|
+
"Must be a valid GUID"
|
|
1615
|
+
).optional().nullable(),
|
|
1616
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
1617
|
+
required: z.boolean().describe(
|
|
1618
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
1619
|
+
).optional().nullable()
|
|
1620
|
+
})
|
|
1621
|
+
).max(1e3).optional(),
|
|
1622
|
+
lastNameRequired: z.boolean().describe(
|
|
1623
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
1624
|
+
).optional().nullable(),
|
|
1625
|
+
emailRequired: z.boolean().describe(
|
|
1626
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
1627
|
+
).optional().nullable(),
|
|
1628
|
+
emailMarketingCheckbox: z.object({
|
|
1629
|
+
enabled: z.boolean().describe(
|
|
1630
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
1631
|
+
).optional().nullable(),
|
|
1632
|
+
checkedByDefault: z.boolean().describe(
|
|
1633
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
1634
|
+
).optional().nullable()
|
|
1635
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
1636
|
+
}).describe(
|
|
1637
|
+
"Custom form fields and settings for the reservation booking form."
|
|
1638
|
+
).optional(),
|
|
1639
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
1640
|
+
}).describe("Experience configuration."),
|
|
1641
|
+
currency: z.string().describe(
|
|
1642
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
1643
|
+
).optional().nullable(),
|
|
1644
|
+
extendedFields: z.object({
|
|
1645
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1646
|
+
"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)."
|
|
1647
|
+
).optional()
|
|
1648
|
+
}).describe("Extended fields.").optional(),
|
|
1649
|
+
tags: z.object({
|
|
1650
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1651
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
1652
|
+
).optional(),
|
|
1653
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1654
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
1655
|
+
).optional()
|
|
1656
|
+
}).describe(
|
|
1657
|
+
"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."
|
|
1658
|
+
).optional(),
|
|
1659
|
+
slug: z.string().describe(
|
|
1660
|
+
'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.'
|
|
1661
|
+
).max(300).optional().nullable(),
|
|
1662
|
+
seoSettings: z.object({
|
|
1663
|
+
seoSchema: z.object({
|
|
1664
|
+
tags: z.array(
|
|
1665
|
+
z.object({
|
|
1666
|
+
type: z.string().describe(
|
|
1667
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
1668
|
+
).optional(),
|
|
1669
|
+
props: z.record(z.string(), z.any()).describe(
|
|
1670
|
+
'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"}`.'
|
|
1671
|
+
).optional().nullable(),
|
|
1672
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
1673
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
1674
|
+
).optional().nullable(),
|
|
1675
|
+
children: z.string().describe(
|
|
1676
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
1677
|
+
).optional(),
|
|
1678
|
+
custom: z.boolean().describe(
|
|
1679
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
1680
|
+
).optional(),
|
|
1681
|
+
disabled: z.boolean().describe(
|
|
1682
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
1683
|
+
).optional()
|
|
1684
|
+
})
|
|
1685
|
+
).optional(),
|
|
1686
|
+
settings: z.object({
|
|
1687
|
+
preventAutoRedirect: z.boolean().describe(
|
|
1688
|
+
"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)."
|
|
1689
|
+
).optional(),
|
|
1690
|
+
keywords: z.array(
|
|
1691
|
+
z.object({
|
|
1692
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
1693
|
+
isMain: z.boolean().describe(
|
|
1694
|
+
"Whether the keyword is the main focus keyword."
|
|
1695
|
+
).optional(),
|
|
1696
|
+
origin: z.string().describe(
|
|
1697
|
+
"The source that added the keyword terms to the SEO settings."
|
|
1698
|
+
).max(1e3).optional().nullable()
|
|
1699
|
+
})
|
|
1700
|
+
).max(5).optional()
|
|
1701
|
+
}).describe("SEO general settings.").optional()
|
|
1702
|
+
}).describe(
|
|
1703
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
1704
|
+
).optional()
|
|
1705
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
1706
|
+
}).describe("Experience to create.")
|
|
1707
|
+
});
|
|
1708
|
+
var CreateExperienceResponse = z.object({
|
|
1709
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
1710
|
+
/^[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}$/,
|
|
1711
|
+
"Must be a valid GUID"
|
|
1712
|
+
).optional().nullable(),
|
|
1713
|
+
reservationLocationId: z.string().describe("ID of the reservation location this experience is assigned to.").regex(
|
|
1714
|
+
/^[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}$/,
|
|
1715
|
+
"Must be a valid GUID"
|
|
1716
|
+
).optional().nullable(),
|
|
1717
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1718
|
+
"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."
|
|
1719
|
+
).optional().nullable(),
|
|
1720
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
1721
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
1722
|
+
configuration: z.object({
|
|
1723
|
+
displayInfo: z.object({
|
|
1724
|
+
name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
|
|
1725
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
1726
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
1727
|
+
richContent: z.any().describe(
|
|
1728
|
+
"Detailed description of the experience using rich content formatting."
|
|
1729
|
+
).optional()
|
|
1730
|
+
}).describe("Display information for the experience.").optional(),
|
|
1731
|
+
paymentPolicy: z.intersection(
|
|
1732
|
+
z.object({
|
|
1733
|
+
paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
|
|
1734
|
+
}),
|
|
1735
|
+
z.xor([
|
|
1736
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
1737
|
+
z.object({
|
|
1738
|
+
perGuestOptions: z.object({
|
|
1739
|
+
price: z.string().describe(
|
|
1740
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
1741
|
+
).optional().nullable()
|
|
1742
|
+
}).describe("Per-guest pricing settings.")
|
|
1743
|
+
})
|
|
1744
|
+
])
|
|
1745
|
+
).describe(
|
|
1746
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
1747
|
+
).optional(),
|
|
1748
|
+
onlineReservations: z.object({
|
|
1749
|
+
partySize: z.object({
|
|
1750
|
+
min: z.number().int().describe("Minimum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable(),
|
|
1751
|
+
max: z.number().int().describe("Maximum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable()
|
|
1752
|
+
}).describe("Party size.").optional(),
|
|
1753
|
+
minimumReservationNotice: z.object({
|
|
1754
|
+
number: z.number().int().describe(
|
|
1755
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
1756
|
+
).min(1).max(1e3).optional().nullable(),
|
|
1757
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
1758
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
1759
|
+
maximumReservationNotice: z.object({
|
|
1760
|
+
number: z.number().int().describe(
|
|
1761
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
1762
|
+
).min(1).max(1e3).optional().nullable(),
|
|
1763
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
1764
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
1765
|
+
approval: z.object({
|
|
1766
|
+
mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
|
|
1767
|
+
}).describe("Approval.").optional(),
|
|
1768
|
+
maxGuests: z.object({
|
|
1769
|
+
number: z.number().int().describe(
|
|
1770
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
1771
|
+
).min(0).max(1e4).optional().nullable()
|
|
1772
|
+
}).describe("Maximum number of guests.").optional(),
|
|
1773
|
+
businessSchedule: z.object({
|
|
1774
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
1775
|
+
entries: z.array(
|
|
1776
|
+
z.intersection(
|
|
1777
|
+
z.object({
|
|
1778
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
|
|
1779
|
+
}),
|
|
1780
|
+
z.xor([
|
|
1781
|
+
z.object({
|
|
1782
|
+
weeklyOptions: z.never().optional(),
|
|
1783
|
+
oneTimeOptions: z.never().optional()
|
|
1784
|
+
}),
|
|
1785
|
+
z.object({
|
|
1786
|
+
oneTimeOptions: z.never().optional(),
|
|
1787
|
+
weeklyOptions: z.object({
|
|
1788
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
1789
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
1790
|
+
startDaysAndTimes: z.array(
|
|
1791
|
+
z.object({
|
|
1792
|
+
day: z.enum([
|
|
1793
|
+
"MONDAY",
|
|
1794
|
+
"TUESDAY",
|
|
1795
|
+
"WEDNESDAY",
|
|
1796
|
+
"THURSDAY",
|
|
1797
|
+
"FRIDAY",
|
|
1798
|
+
"SATURDAY",
|
|
1799
|
+
"SUNDAY"
|
|
1800
|
+
]).describe("Day of week.").optional(),
|
|
1801
|
+
time: z.string().describe(
|
|
1802
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
1803
|
+
).max(5).min(5).optional().nullable()
|
|
1804
|
+
})
|
|
1805
|
+
).max(100).optional()
|
|
1806
|
+
}).describe("Weekly recurrence settings.")
|
|
1807
|
+
}),
|
|
1808
|
+
z.object({
|
|
1809
|
+
weeklyOptions: z.never().optional(),
|
|
1810
|
+
oneTimeOptions: z.object({
|
|
1811
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
1812
|
+
startTime: z.string().describe(
|
|
1813
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
1814
|
+
).max(5).min(5).optional().nullable()
|
|
1815
|
+
}).describe("1-time event settings.")
|
|
1816
|
+
})
|
|
1817
|
+
])
|
|
1818
|
+
)
|
|
1819
|
+
).max(10).optional()
|
|
1820
|
+
}).describe("Business schedule.").optional()
|
|
1821
|
+
}).describe(
|
|
1822
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
1823
|
+
).optional(),
|
|
1824
|
+
reservationForm: z.object({
|
|
1825
|
+
submitMessage: z.string().describe(
|
|
1826
|
+
"Message displayed to customers when they submit the reservation form."
|
|
1827
|
+
).max(1e6).optional().nullable(),
|
|
1828
|
+
policiesEnabled: z.boolean().describe(
|
|
1829
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
1830
|
+
).optional().nullable(),
|
|
1831
|
+
privacyPolicy: z.intersection(
|
|
1832
|
+
z.object({
|
|
1833
|
+
enabled: z.boolean().describe(
|
|
1834
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
1835
|
+
).optional().nullable()
|
|
1836
|
+
}),
|
|
1837
|
+
z.xor([
|
|
1838
|
+
z.object({
|
|
1839
|
+
url: z.never().optional(),
|
|
1840
|
+
text: z.never().optional()
|
|
1841
|
+
}),
|
|
1842
|
+
z.object({
|
|
1843
|
+
text: z.never().optional(),
|
|
1844
|
+
url: z.string().describe("Privacy policy URL.")
|
|
1845
|
+
}),
|
|
1846
|
+
z.object({
|
|
1847
|
+
url: z.never().optional(),
|
|
1848
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
1849
|
+
})
|
|
1850
|
+
])
|
|
1851
|
+
).describe("Privacy policy display settings.").optional(),
|
|
1852
|
+
termsAndConditions: z.intersection(
|
|
1853
|
+
z.object({
|
|
1854
|
+
enabled: z.boolean().describe(
|
|
1855
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
1856
|
+
).optional().nullable()
|
|
1857
|
+
}),
|
|
1858
|
+
z.xor([
|
|
1859
|
+
z.object({
|
|
1860
|
+
url: z.never().optional(),
|
|
1861
|
+
text: z.never().optional()
|
|
1862
|
+
}),
|
|
1863
|
+
z.object({
|
|
1864
|
+
text: z.never().optional(),
|
|
1865
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
1866
|
+
}),
|
|
1867
|
+
z.object({
|
|
1868
|
+
url: z.never().optional(),
|
|
1869
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
1870
|
+
})
|
|
1871
|
+
])
|
|
1872
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
1873
|
+
customFieldDefinitions: z.array(
|
|
1874
|
+
z.object({
|
|
1875
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
1876
|
+
/^[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}$/,
|
|
1877
|
+
"Must be a valid GUID"
|
|
1878
|
+
).optional().nullable(),
|
|
1879
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
1880
|
+
required: z.boolean().describe(
|
|
1881
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
1882
|
+
).optional().nullable()
|
|
1883
|
+
})
|
|
1884
|
+
).max(1e3).optional(),
|
|
1885
|
+
lastNameRequired: z.boolean().describe(
|
|
1886
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
1887
|
+
).optional().nullable(),
|
|
1888
|
+
emailRequired: z.boolean().describe(
|
|
1889
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
1890
|
+
).optional().nullable(),
|
|
1891
|
+
emailMarketingCheckbox: z.object({
|
|
1892
|
+
enabled: z.boolean().describe(
|
|
1893
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
1894
|
+
).optional().nullable(),
|
|
1895
|
+
checkedByDefault: z.boolean().describe(
|
|
1896
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
1897
|
+
).optional().nullable()
|
|
1898
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
1899
|
+
}).describe(
|
|
1900
|
+
"Custom form fields and settings for the reservation booking form."
|
|
1901
|
+
).optional(),
|
|
1902
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
1903
|
+
}).describe("Experience configuration.").optional(),
|
|
1904
|
+
currency: z.string().describe(
|
|
1905
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
1906
|
+
).optional().nullable(),
|
|
1907
|
+
extendedFields: z.object({
|
|
1908
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1909
|
+
"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)."
|
|
1910
|
+
).optional()
|
|
1911
|
+
}).describe("Extended fields.").optional(),
|
|
1912
|
+
tags: z.object({
|
|
1913
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1914
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
1915
|
+
).optional(),
|
|
1916
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1917
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
1918
|
+
).optional()
|
|
1919
|
+
}).describe(
|
|
1920
|
+
"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."
|
|
1921
|
+
).optional(),
|
|
1922
|
+
slug: z.string().describe(
|
|
1923
|
+
'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.'
|
|
1924
|
+
).max(300).optional().nullable(),
|
|
1925
|
+
seoSettings: z.object({
|
|
1926
|
+
seoSchema: z.object({
|
|
1927
|
+
tags: z.array(
|
|
1928
|
+
z.object({
|
|
1929
|
+
type: z.string().describe(
|
|
1930
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
1931
|
+
).optional(),
|
|
1932
|
+
props: z.record(z.string(), z.any()).describe(
|
|
1933
|
+
'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"}`.'
|
|
1934
|
+
).optional().nullable(),
|
|
1935
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
1936
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
1937
|
+
).optional().nullable(),
|
|
1938
|
+
children: z.string().describe(
|
|
1939
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
1940
|
+
).optional(),
|
|
1941
|
+
custom: z.boolean().describe(
|
|
1942
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
1943
|
+
).optional(),
|
|
1944
|
+
disabled: z.boolean().describe(
|
|
1945
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
1946
|
+
).optional()
|
|
1947
|
+
})
|
|
1948
|
+
).optional(),
|
|
1949
|
+
settings: z.object({
|
|
1950
|
+
preventAutoRedirect: z.boolean().describe(
|
|
1951
|
+
"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)."
|
|
1952
|
+
).optional(),
|
|
1953
|
+
keywords: z.array(
|
|
1954
|
+
z.object({
|
|
1955
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
1956
|
+
isMain: z.boolean().describe(
|
|
1957
|
+
"Whether the keyword is the main focus keyword."
|
|
1958
|
+
).optional(),
|
|
1959
|
+
origin: z.string().describe(
|
|
1960
|
+
"The source that added the keyword terms to the SEO settings."
|
|
1961
|
+
).max(1e3).optional().nullable()
|
|
1962
|
+
})
|
|
1963
|
+
).max(5).optional()
|
|
1964
|
+
}).describe("SEO general settings.").optional()
|
|
1965
|
+
}).describe(
|
|
1966
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
1967
|
+
).optional()
|
|
1968
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
1969
|
+
});
|
|
1970
|
+
var GetExperienceRequest = z.object({
|
|
1971
|
+
experienceId: z.string().describe("ID of the experience to retrieve.").regex(
|
|
1972
|
+
/^[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}$/,
|
|
1973
|
+
"Must be a valid GUID"
|
|
1974
|
+
)
|
|
1975
|
+
});
|
|
1976
|
+
var GetExperienceResponse = z.object({
|
|
1977
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
1978
|
+
/^[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}$/,
|
|
1979
|
+
"Must be a valid GUID"
|
|
1980
|
+
).optional().nullable(),
|
|
1981
|
+
reservationLocationId: z.string().describe("ID of the reservation location this experience is assigned to.").regex(
|
|
1982
|
+
/^[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}$/,
|
|
1983
|
+
"Must be a valid GUID"
|
|
1984
|
+
).optional().nullable(),
|
|
1985
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1986
|
+
"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."
|
|
1987
|
+
).optional().nullable(),
|
|
1988
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
1989
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
1990
|
+
configuration: z.object({
|
|
1991
|
+
displayInfo: z.object({
|
|
1992
|
+
name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
|
|
1993
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
1994
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
1995
|
+
richContent: z.any().describe(
|
|
1996
|
+
"Detailed description of the experience using rich content formatting."
|
|
1997
|
+
).optional()
|
|
1998
|
+
}).describe("Display information for the experience.").optional(),
|
|
1999
|
+
paymentPolicy: z.intersection(
|
|
2000
|
+
z.object({
|
|
2001
|
+
paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
|
|
2002
|
+
}),
|
|
2003
|
+
z.xor([
|
|
2004
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
2005
|
+
z.object({
|
|
2006
|
+
perGuestOptions: z.object({
|
|
2007
|
+
price: z.string().describe(
|
|
2008
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
2009
|
+
).optional().nullable()
|
|
2010
|
+
}).describe("Per-guest pricing settings.")
|
|
2011
|
+
})
|
|
2012
|
+
])
|
|
2013
|
+
).describe(
|
|
2014
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
2015
|
+
).optional(),
|
|
2016
|
+
onlineReservations: z.object({
|
|
2017
|
+
partySize: z.object({
|
|
2018
|
+
min: z.number().int().describe("Minimum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable(),
|
|
2019
|
+
max: z.number().int().describe("Maximum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable()
|
|
2020
|
+
}).describe("Party size.").optional(),
|
|
2021
|
+
minimumReservationNotice: z.object({
|
|
2022
|
+
number: z.number().int().describe(
|
|
2023
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2024
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2025
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
2026
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
2027
|
+
maximumReservationNotice: z.object({
|
|
2028
|
+
number: z.number().int().describe(
|
|
2029
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2030
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2031
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
2032
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
2033
|
+
approval: z.object({
|
|
2034
|
+
mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
|
|
2035
|
+
}).describe("Approval.").optional(),
|
|
2036
|
+
maxGuests: z.object({
|
|
2037
|
+
number: z.number().int().describe(
|
|
2038
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
2039
|
+
).min(0).max(1e4).optional().nullable()
|
|
2040
|
+
}).describe("Maximum number of guests.").optional(),
|
|
2041
|
+
businessSchedule: z.object({
|
|
2042
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
2043
|
+
entries: z.array(
|
|
2044
|
+
z.intersection(
|
|
2045
|
+
z.object({
|
|
2046
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
|
|
2047
|
+
}),
|
|
2048
|
+
z.xor([
|
|
2049
|
+
z.object({
|
|
2050
|
+
weeklyOptions: z.never().optional(),
|
|
2051
|
+
oneTimeOptions: z.never().optional()
|
|
2052
|
+
}),
|
|
2053
|
+
z.object({
|
|
2054
|
+
oneTimeOptions: z.never().optional(),
|
|
2055
|
+
weeklyOptions: z.object({
|
|
2056
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2057
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
2058
|
+
startDaysAndTimes: z.array(
|
|
2059
|
+
z.object({
|
|
2060
|
+
day: z.enum([
|
|
2061
|
+
"MONDAY",
|
|
2062
|
+
"TUESDAY",
|
|
2063
|
+
"WEDNESDAY",
|
|
2064
|
+
"THURSDAY",
|
|
2065
|
+
"FRIDAY",
|
|
2066
|
+
"SATURDAY",
|
|
2067
|
+
"SUNDAY"
|
|
2068
|
+
]).describe("Day of week.").optional(),
|
|
2069
|
+
time: z.string().describe(
|
|
2070
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2071
|
+
).max(5).min(5).optional().nullable()
|
|
2072
|
+
})
|
|
2073
|
+
).max(100).optional()
|
|
2074
|
+
}).describe("Weekly recurrence settings.")
|
|
2075
|
+
}),
|
|
2076
|
+
z.object({
|
|
2077
|
+
weeklyOptions: z.never().optional(),
|
|
2078
|
+
oneTimeOptions: z.object({
|
|
2079
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2080
|
+
startTime: z.string().describe(
|
|
2081
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2082
|
+
).max(5).min(5).optional().nullable()
|
|
2083
|
+
}).describe("1-time event settings.")
|
|
2084
|
+
})
|
|
2085
|
+
])
|
|
2086
|
+
)
|
|
2087
|
+
).max(10).optional()
|
|
2088
|
+
}).describe("Business schedule.").optional()
|
|
2089
|
+
}).describe(
|
|
2090
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
2091
|
+
).optional(),
|
|
2092
|
+
reservationForm: z.object({
|
|
2093
|
+
submitMessage: z.string().describe(
|
|
2094
|
+
"Message displayed to customers when they submit the reservation form."
|
|
2095
|
+
).max(1e6).optional().nullable(),
|
|
2096
|
+
policiesEnabled: z.boolean().describe(
|
|
2097
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
2098
|
+
).optional().nullable(),
|
|
2099
|
+
privacyPolicy: z.intersection(
|
|
2100
|
+
z.object({
|
|
2101
|
+
enabled: z.boolean().describe(
|
|
2102
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
2103
|
+
).optional().nullable()
|
|
2104
|
+
}),
|
|
2105
|
+
z.xor([
|
|
2106
|
+
z.object({
|
|
2107
|
+
url: z.never().optional(),
|
|
2108
|
+
text: z.never().optional()
|
|
2109
|
+
}),
|
|
2110
|
+
z.object({
|
|
2111
|
+
text: z.never().optional(),
|
|
2112
|
+
url: z.string().describe("Privacy policy URL.")
|
|
2113
|
+
}),
|
|
2114
|
+
z.object({
|
|
2115
|
+
url: z.never().optional(),
|
|
2116
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
2117
|
+
})
|
|
2118
|
+
])
|
|
2119
|
+
).describe("Privacy policy display settings.").optional(),
|
|
2120
|
+
termsAndConditions: z.intersection(
|
|
2121
|
+
z.object({
|
|
2122
|
+
enabled: z.boolean().describe(
|
|
2123
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
2124
|
+
).optional().nullable()
|
|
2125
|
+
}),
|
|
2126
|
+
z.xor([
|
|
2127
|
+
z.object({
|
|
2128
|
+
url: z.never().optional(),
|
|
2129
|
+
text: z.never().optional()
|
|
2130
|
+
}),
|
|
2131
|
+
z.object({
|
|
2132
|
+
text: z.never().optional(),
|
|
2133
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
2134
|
+
}),
|
|
2135
|
+
z.object({
|
|
2136
|
+
url: z.never().optional(),
|
|
2137
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
2138
|
+
})
|
|
2139
|
+
])
|
|
2140
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
2141
|
+
customFieldDefinitions: z.array(
|
|
2142
|
+
z.object({
|
|
2143
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
2144
|
+
/^[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}$/,
|
|
2145
|
+
"Must be a valid GUID"
|
|
2146
|
+
).optional().nullable(),
|
|
2147
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
2148
|
+
required: z.boolean().describe(
|
|
2149
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
2150
|
+
).optional().nullable()
|
|
2151
|
+
})
|
|
2152
|
+
).max(1e3).optional(),
|
|
2153
|
+
lastNameRequired: z.boolean().describe(
|
|
2154
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
2155
|
+
).optional().nullable(),
|
|
2156
|
+
emailRequired: z.boolean().describe(
|
|
2157
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
2158
|
+
).optional().nullable(),
|
|
2159
|
+
emailMarketingCheckbox: z.object({
|
|
2160
|
+
enabled: z.boolean().describe(
|
|
2161
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
2162
|
+
).optional().nullable(),
|
|
2163
|
+
checkedByDefault: z.boolean().describe(
|
|
2164
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
2165
|
+
).optional().nullable()
|
|
2166
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
2167
|
+
}).describe(
|
|
2168
|
+
"Custom form fields and settings for the reservation booking form."
|
|
2169
|
+
).optional(),
|
|
2170
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
2171
|
+
}).describe("Experience configuration.").optional(),
|
|
2172
|
+
currency: z.string().describe(
|
|
2173
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
2174
|
+
).optional().nullable(),
|
|
2175
|
+
extendedFields: z.object({
|
|
2176
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
2177
|
+
"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)."
|
|
2178
|
+
).optional()
|
|
2179
|
+
}).describe("Extended fields.").optional(),
|
|
2180
|
+
tags: z.object({
|
|
2181
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2182
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
2183
|
+
).optional(),
|
|
2184
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2185
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
2186
|
+
).optional()
|
|
2187
|
+
}).describe(
|
|
2188
|
+
"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."
|
|
2189
|
+
).optional(),
|
|
2190
|
+
slug: z.string().describe(
|
|
2191
|
+
'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.'
|
|
2192
|
+
).max(300).optional().nullable(),
|
|
2193
|
+
seoSettings: z.object({
|
|
2194
|
+
seoSchema: z.object({
|
|
2195
|
+
tags: z.array(
|
|
2196
|
+
z.object({
|
|
2197
|
+
type: z.string().describe(
|
|
2198
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
2199
|
+
).optional(),
|
|
2200
|
+
props: z.record(z.string(), z.any()).describe(
|
|
2201
|
+
'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"}`.'
|
|
2202
|
+
).optional().nullable(),
|
|
2203
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
2204
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
2205
|
+
).optional().nullable(),
|
|
2206
|
+
children: z.string().describe(
|
|
2207
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
2208
|
+
).optional(),
|
|
2209
|
+
custom: z.boolean().describe(
|
|
2210
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
2211
|
+
).optional(),
|
|
2212
|
+
disabled: z.boolean().describe(
|
|
2213
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
2214
|
+
).optional()
|
|
2215
|
+
})
|
|
2216
|
+
).optional(),
|
|
2217
|
+
settings: z.object({
|
|
2218
|
+
preventAutoRedirect: z.boolean().describe(
|
|
2219
|
+
"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)."
|
|
2220
|
+
).optional(),
|
|
2221
|
+
keywords: z.array(
|
|
2222
|
+
z.object({
|
|
2223
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
2224
|
+
isMain: z.boolean().describe(
|
|
2225
|
+
"Whether the keyword is the main focus keyword."
|
|
2226
|
+
).optional(),
|
|
2227
|
+
origin: z.string().describe(
|
|
2228
|
+
"The source that added the keyword terms to the SEO settings."
|
|
2229
|
+
).max(1e3).optional().nullable()
|
|
2230
|
+
})
|
|
2231
|
+
).max(5).optional()
|
|
2232
|
+
}).describe("SEO general settings.").optional()
|
|
2233
|
+
}).describe(
|
|
2234
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
2235
|
+
).optional()
|
|
2236
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
2237
|
+
});
|
|
2238
|
+
var GetExperienceBySlugRequest = z.object({
|
|
2239
|
+
slug: z.string().describe("Slug of the experience to retrieve.").max(200)
|
|
2240
|
+
});
|
|
2241
|
+
var GetExperienceBySlugResponse = z.object({
|
|
2242
|
+
experience: z.object({
|
|
2243
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
2244
|
+
/^[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}$/,
|
|
2245
|
+
"Must be a valid GUID"
|
|
2246
|
+
).optional().nullable(),
|
|
2247
|
+
reservationLocationId: z.string().describe(
|
|
2248
|
+
"ID of the reservation location this experience is assigned to."
|
|
2249
|
+
).regex(
|
|
2250
|
+
/^[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}$/,
|
|
2251
|
+
"Must be a valid GUID"
|
|
2252
|
+
).optional().nullable(),
|
|
2253
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2254
|
+
"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."
|
|
2255
|
+
).optional().nullable(),
|
|
2256
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
2257
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
2258
|
+
configuration: z.object({
|
|
2259
|
+
displayInfo: z.object({
|
|
2260
|
+
name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
|
|
2261
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
2262
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
2263
|
+
richContent: z.any().describe(
|
|
2264
|
+
"Detailed description of the experience using rich content formatting."
|
|
2265
|
+
).optional()
|
|
2266
|
+
}).describe("Display information for the experience.").optional(),
|
|
2267
|
+
paymentPolicy: z.intersection(
|
|
2268
|
+
z.object({
|
|
2269
|
+
paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
|
|
2270
|
+
}),
|
|
2271
|
+
z.xor([
|
|
2272
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
2273
|
+
z.object({
|
|
2274
|
+
perGuestOptions: z.object({
|
|
2275
|
+
price: z.string().describe(
|
|
2276
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
2277
|
+
).optional().nullable()
|
|
2278
|
+
}).describe("Per-guest pricing settings.")
|
|
2279
|
+
})
|
|
2280
|
+
])
|
|
2281
|
+
).describe(
|
|
2282
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
2283
|
+
).optional(),
|
|
2284
|
+
onlineReservations: z.object({
|
|
2285
|
+
partySize: z.object({
|
|
2286
|
+
min: z.number().int().describe(
|
|
2287
|
+
"Minimum number of guests allowed for a reservation."
|
|
2288
|
+
).min(1).max(1e4).optional().nullable(),
|
|
2289
|
+
max: z.number().int().describe(
|
|
2290
|
+
"Maximum number of guests allowed for a reservation."
|
|
2291
|
+
).min(1).max(1e4).optional().nullable()
|
|
2292
|
+
}).describe("Party size.").optional(),
|
|
2293
|
+
minimumReservationNotice: z.object({
|
|
2294
|
+
number: z.number().int().describe(
|
|
2295
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2296
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2297
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
2298
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
2299
|
+
maximumReservationNotice: z.object({
|
|
2300
|
+
number: z.number().int().describe(
|
|
2301
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2302
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2303
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
2304
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
2305
|
+
approval: z.object({
|
|
2306
|
+
mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
|
|
2307
|
+
}).describe("Approval.").optional(),
|
|
2308
|
+
maxGuests: z.object({
|
|
2309
|
+
number: z.number().int().describe(
|
|
2310
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
2311
|
+
).min(0).max(1e4).optional().nullable()
|
|
2312
|
+
}).describe("Maximum number of guests.").optional(),
|
|
2313
|
+
businessSchedule: z.object({
|
|
2314
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
2315
|
+
entries: z.array(
|
|
2316
|
+
z.intersection(
|
|
2317
|
+
z.object({
|
|
2318
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
|
|
2319
|
+
}),
|
|
2320
|
+
z.xor([
|
|
2321
|
+
z.object({
|
|
2322
|
+
weeklyOptions: z.never().optional(),
|
|
2323
|
+
oneTimeOptions: z.never().optional()
|
|
2324
|
+
}),
|
|
2325
|
+
z.object({
|
|
2326
|
+
oneTimeOptions: z.never().optional(),
|
|
2327
|
+
weeklyOptions: z.object({
|
|
2328
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2329
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
2330
|
+
startDaysAndTimes: z.array(
|
|
2331
|
+
z.object({
|
|
2332
|
+
day: z.enum([
|
|
2333
|
+
"MONDAY",
|
|
2334
|
+
"TUESDAY",
|
|
2335
|
+
"WEDNESDAY",
|
|
2336
|
+
"THURSDAY",
|
|
2337
|
+
"FRIDAY",
|
|
2338
|
+
"SATURDAY",
|
|
2339
|
+
"SUNDAY"
|
|
2340
|
+
]).describe("Day of week.").optional(),
|
|
2341
|
+
time: z.string().describe(
|
|
2342
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2343
|
+
).max(5).min(5).optional().nullable()
|
|
2344
|
+
})
|
|
2345
|
+
).max(100).optional()
|
|
2346
|
+
}).describe("Weekly recurrence settings.")
|
|
2347
|
+
}),
|
|
2348
|
+
z.object({
|
|
2349
|
+
weeklyOptions: z.never().optional(),
|
|
2350
|
+
oneTimeOptions: z.object({
|
|
2351
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2352
|
+
startTime: z.string().describe(
|
|
2353
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2354
|
+
).max(5).min(5).optional().nullable()
|
|
2355
|
+
}).describe("1-time event settings.")
|
|
2356
|
+
})
|
|
2357
|
+
])
|
|
2358
|
+
)
|
|
2359
|
+
).max(10).optional()
|
|
2360
|
+
}).describe("Business schedule.").optional()
|
|
2361
|
+
}).describe(
|
|
2362
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
2363
|
+
).optional(),
|
|
2364
|
+
reservationForm: z.object({
|
|
2365
|
+
submitMessage: z.string().describe(
|
|
2366
|
+
"Message displayed to customers when they submit the reservation form."
|
|
2367
|
+
).max(1e6).optional().nullable(),
|
|
2368
|
+
policiesEnabled: z.boolean().describe(
|
|
2369
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
2370
|
+
).optional().nullable(),
|
|
2371
|
+
privacyPolicy: z.intersection(
|
|
2372
|
+
z.object({
|
|
2373
|
+
enabled: z.boolean().describe(
|
|
2374
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
2375
|
+
).optional().nullable()
|
|
2376
|
+
}),
|
|
2377
|
+
z.xor([
|
|
2378
|
+
z.object({
|
|
2379
|
+
url: z.never().optional(),
|
|
2380
|
+
text: z.never().optional()
|
|
2381
|
+
}),
|
|
2382
|
+
z.object({
|
|
2383
|
+
text: z.never().optional(),
|
|
2384
|
+
url: z.string().describe("Privacy policy URL.")
|
|
2385
|
+
}),
|
|
2386
|
+
z.object({
|
|
2387
|
+
url: z.never().optional(),
|
|
2388
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
2389
|
+
})
|
|
2390
|
+
])
|
|
2391
|
+
).describe("Privacy policy display settings.").optional(),
|
|
2392
|
+
termsAndConditions: z.intersection(
|
|
2393
|
+
z.object({
|
|
2394
|
+
enabled: z.boolean().describe(
|
|
2395
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
2396
|
+
).optional().nullable()
|
|
2397
|
+
}),
|
|
2398
|
+
z.xor([
|
|
2399
|
+
z.object({
|
|
2400
|
+
url: z.never().optional(),
|
|
2401
|
+
text: z.never().optional()
|
|
2402
|
+
}),
|
|
2403
|
+
z.object({
|
|
2404
|
+
text: z.never().optional(),
|
|
2405
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
2406
|
+
}),
|
|
2407
|
+
z.object({
|
|
2408
|
+
url: z.never().optional(),
|
|
2409
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
2410
|
+
})
|
|
2411
|
+
])
|
|
2412
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
2413
|
+
customFieldDefinitions: z.array(
|
|
2414
|
+
z.object({
|
|
2415
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
2416
|
+
/^[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}$/,
|
|
2417
|
+
"Must be a valid GUID"
|
|
2418
|
+
).optional().nullable(),
|
|
2419
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
2420
|
+
required: z.boolean().describe(
|
|
2421
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
2422
|
+
).optional().nullable()
|
|
2423
|
+
})
|
|
2424
|
+
).max(1e3).optional(),
|
|
2425
|
+
lastNameRequired: z.boolean().describe(
|
|
2426
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
2427
|
+
).optional().nullable(),
|
|
2428
|
+
emailRequired: z.boolean().describe(
|
|
2429
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
2430
|
+
).optional().nullable(),
|
|
2431
|
+
emailMarketingCheckbox: z.object({
|
|
2432
|
+
enabled: z.boolean().describe(
|
|
2433
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
2434
|
+
).optional().nullable(),
|
|
2435
|
+
checkedByDefault: z.boolean().describe(
|
|
2436
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
2437
|
+
).optional().nullable()
|
|
2438
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
2439
|
+
}).describe(
|
|
2440
|
+
"Custom form fields and settings for the reservation booking form."
|
|
2441
|
+
).optional(),
|
|
2442
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
2443
|
+
}).describe("Experience configuration.").optional(),
|
|
2444
|
+
currency: z.string().describe(
|
|
2445
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
2446
|
+
).optional().nullable(),
|
|
2447
|
+
extendedFields: z.object({
|
|
2448
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
2449
|
+
"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)."
|
|
2450
|
+
).optional()
|
|
2451
|
+
}).describe("Extended fields.").optional(),
|
|
2452
|
+
tags: z.object({
|
|
2453
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2454
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
2455
|
+
).optional(),
|
|
2456
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2457
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
2458
|
+
).optional()
|
|
2459
|
+
}).describe(
|
|
2460
|
+
"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."
|
|
2461
|
+
).optional(),
|
|
2462
|
+
slug: z.string().describe(
|
|
2463
|
+
'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.'
|
|
2464
|
+
).max(300).optional().nullable(),
|
|
2465
|
+
seoSettings: z.object({
|
|
2466
|
+
seoSchema: z.object({
|
|
2467
|
+
tags: z.array(
|
|
2468
|
+
z.object({
|
|
2469
|
+
type: z.string().describe(
|
|
2470
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
2471
|
+
).optional(),
|
|
2472
|
+
props: z.record(z.string(), z.any()).describe(
|
|
2473
|
+
'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"}`.'
|
|
2474
|
+
).optional().nullable(),
|
|
2475
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
2476
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
2477
|
+
).optional().nullable(),
|
|
2478
|
+
children: z.string().describe(
|
|
2479
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
2480
|
+
).optional(),
|
|
2481
|
+
custom: z.boolean().describe(
|
|
2482
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
2483
|
+
).optional(),
|
|
2484
|
+
disabled: z.boolean().describe(
|
|
2485
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
2486
|
+
).optional()
|
|
2487
|
+
})
|
|
2488
|
+
).optional(),
|
|
2489
|
+
settings: z.object({
|
|
2490
|
+
preventAutoRedirect: z.boolean().describe(
|
|
2491
|
+
"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)."
|
|
2492
|
+
).optional(),
|
|
2493
|
+
keywords: z.array(
|
|
2494
|
+
z.object({
|
|
2495
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
2496
|
+
isMain: z.boolean().describe(
|
|
2497
|
+
"Whether the keyword is the main focus keyword."
|
|
2498
|
+
).optional(),
|
|
2499
|
+
origin: z.string().describe(
|
|
2500
|
+
"The source that added the keyword terms to the SEO settings."
|
|
2501
|
+
).max(1e3).optional().nullable()
|
|
2502
|
+
})
|
|
2503
|
+
).max(5).optional()
|
|
2504
|
+
}).describe("SEO general settings.").optional()
|
|
2505
|
+
}).describe(
|
|
2506
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
2507
|
+
).optional()
|
|
2508
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
2509
|
+
}).describe("Retrieved experience.").optional()
|
|
2510
|
+
});
|
|
2511
|
+
var UpdateExperienceRequest = z.object({
|
|
2512
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
2513
|
+
/^[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}$/,
|
|
2514
|
+
"Must be a valid GUID"
|
|
2515
|
+
),
|
|
2516
|
+
experience: z.object({
|
|
2517
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
2518
|
+
/^[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}$/,
|
|
2519
|
+
"Must be a valid GUID"
|
|
2520
|
+
).optional().nullable(),
|
|
2521
|
+
reservationLocationId: z.string().describe(
|
|
2522
|
+
"ID of the reservation location this experience is assigned to."
|
|
2523
|
+
).regex(
|
|
2524
|
+
/^[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}$/,
|
|
2525
|
+
"Must be a valid GUID"
|
|
2526
|
+
).optional().nullable(),
|
|
2527
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2528
|
+
"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."
|
|
2529
|
+
),
|
|
2530
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
2531
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
2532
|
+
configuration: z.object({
|
|
2533
|
+
displayInfo: z.object({
|
|
2534
|
+
name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
|
|
2535
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
2536
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
2537
|
+
richContent: z.any().describe(
|
|
2538
|
+
"Detailed description of the experience using rich content formatting."
|
|
2539
|
+
).optional()
|
|
2540
|
+
}).describe("Display information for the experience.").optional(),
|
|
2541
|
+
paymentPolicy: z.intersection(
|
|
2542
|
+
z.object({
|
|
2543
|
+
paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).optional()
|
|
2544
|
+
}),
|
|
2545
|
+
z.xor([
|
|
2546
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
2547
|
+
z.object({
|
|
2548
|
+
perGuestOptions: z.object({
|
|
2549
|
+
price: z.string().describe(
|
|
2550
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
2551
|
+
).optional().nullable()
|
|
2552
|
+
}).describe("Per-guest pricing settings.")
|
|
2553
|
+
})
|
|
2554
|
+
])
|
|
2555
|
+
).describe(
|
|
2556
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
2557
|
+
).optional(),
|
|
2558
|
+
onlineReservations: z.object({
|
|
2559
|
+
partySize: z.object({
|
|
2560
|
+
min: z.number().int().describe(
|
|
2561
|
+
"Minimum number of guests allowed for a reservation."
|
|
2562
|
+
).min(1).max(1e4).optional().nullable(),
|
|
2563
|
+
max: z.number().int().describe(
|
|
2564
|
+
"Maximum number of guests allowed for a reservation."
|
|
2565
|
+
).min(1).max(1e4).optional().nullable()
|
|
2566
|
+
}).describe("Party size.").optional(),
|
|
2567
|
+
minimumReservationNotice: z.object({
|
|
2568
|
+
number: z.number().int().describe(
|
|
2569
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2570
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2571
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).optional()
|
|
2572
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
2573
|
+
maximumReservationNotice: z.object({
|
|
2574
|
+
number: z.number().int().describe(
|
|
2575
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2576
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2577
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).optional()
|
|
2578
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
2579
|
+
approval: z.object({ mode: z.enum(["AUTOMATIC", "MANUAL"]).optional() }).describe("Approval.").optional(),
|
|
2580
|
+
maxGuests: z.object({
|
|
2581
|
+
number: z.number().int().describe(
|
|
2582
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
2583
|
+
).min(0).max(1e4).optional().nullable()
|
|
2584
|
+
}).describe("Maximum number of guests.").optional(),
|
|
2585
|
+
businessSchedule: z.object({
|
|
2586
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
2587
|
+
entries: z.array(
|
|
2588
|
+
z.intersection(
|
|
2589
|
+
z.object({
|
|
2590
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).optional()
|
|
2591
|
+
}),
|
|
2592
|
+
z.xor([
|
|
2593
|
+
z.object({
|
|
2594
|
+
weeklyOptions: z.never().optional(),
|
|
2595
|
+
oneTimeOptions: z.never().optional()
|
|
2596
|
+
}),
|
|
2597
|
+
z.object({
|
|
2598
|
+
oneTimeOptions: z.never().optional(),
|
|
2599
|
+
weeklyOptions: z.object({
|
|
2600
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2601
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
2602
|
+
startDaysAndTimes: z.array(
|
|
2603
|
+
z.object({
|
|
2604
|
+
day: z.enum([
|
|
2605
|
+
"MONDAY",
|
|
2606
|
+
"TUESDAY",
|
|
2607
|
+
"WEDNESDAY",
|
|
2608
|
+
"THURSDAY",
|
|
2609
|
+
"FRIDAY",
|
|
2610
|
+
"SATURDAY",
|
|
2611
|
+
"SUNDAY"
|
|
2612
|
+
]).optional(),
|
|
2613
|
+
time: z.string().describe(
|
|
2614
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2615
|
+
).max(5).min(5).optional().nullable()
|
|
2616
|
+
})
|
|
2617
|
+
).max(100).optional()
|
|
2618
|
+
}).describe("Weekly recurrence settings.")
|
|
2619
|
+
}),
|
|
2620
|
+
z.object({
|
|
2621
|
+
weeklyOptions: z.never().optional(),
|
|
2622
|
+
oneTimeOptions: z.object({
|
|
2623
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2624
|
+
startTime: z.string().describe(
|
|
2625
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2626
|
+
).max(5).min(5).optional().nullable()
|
|
2627
|
+
}).describe("1-time event settings.")
|
|
2628
|
+
})
|
|
2629
|
+
])
|
|
2630
|
+
)
|
|
2631
|
+
).max(10).optional()
|
|
2632
|
+
}).describe("Business schedule.").optional()
|
|
2633
|
+
}).describe(
|
|
2634
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
2635
|
+
).optional(),
|
|
2636
|
+
reservationForm: z.object({
|
|
2637
|
+
submitMessage: z.string().describe(
|
|
2638
|
+
"Message displayed to customers when they submit the reservation form."
|
|
2639
|
+
).max(1e6).optional().nullable(),
|
|
2640
|
+
policiesEnabled: z.boolean().describe(
|
|
2641
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
2642
|
+
).optional().nullable(),
|
|
2643
|
+
privacyPolicy: z.intersection(
|
|
2644
|
+
z.object({
|
|
2645
|
+
enabled: z.boolean().describe(
|
|
2646
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
2647
|
+
).optional().nullable()
|
|
2648
|
+
}),
|
|
2649
|
+
z.xor([
|
|
2650
|
+
z.object({
|
|
2651
|
+
url: z.never().optional(),
|
|
2652
|
+
text: z.never().optional()
|
|
2653
|
+
}),
|
|
2654
|
+
z.object({
|
|
2655
|
+
text: z.never().optional(),
|
|
2656
|
+
url: z.string().describe("Privacy policy URL.")
|
|
2657
|
+
}),
|
|
2658
|
+
z.object({
|
|
2659
|
+
url: z.never().optional(),
|
|
2660
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
2661
|
+
})
|
|
2662
|
+
])
|
|
2663
|
+
).describe("Privacy policy display settings.").optional(),
|
|
2664
|
+
termsAndConditions: z.intersection(
|
|
2665
|
+
z.object({
|
|
2666
|
+
enabled: z.boolean().describe(
|
|
2667
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
2668
|
+
).optional().nullable()
|
|
2669
|
+
}),
|
|
2670
|
+
z.xor([
|
|
2671
|
+
z.object({
|
|
2672
|
+
url: z.never().optional(),
|
|
2673
|
+
text: z.never().optional()
|
|
2674
|
+
}),
|
|
2675
|
+
z.object({
|
|
2676
|
+
text: z.never().optional(),
|
|
2677
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
2678
|
+
}),
|
|
2679
|
+
z.object({
|
|
2680
|
+
url: z.never().optional(),
|
|
2681
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
2682
|
+
})
|
|
2683
|
+
])
|
|
2684
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
2685
|
+
customFieldDefinitions: z.array(
|
|
2686
|
+
z.object({
|
|
2687
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
2688
|
+
/^[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}$/,
|
|
2689
|
+
"Must be a valid GUID"
|
|
2690
|
+
).optional().nullable(),
|
|
2691
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
2692
|
+
required: z.boolean().describe(
|
|
2693
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
2694
|
+
).optional().nullable()
|
|
2695
|
+
})
|
|
2696
|
+
).max(1e3).optional(),
|
|
2697
|
+
lastNameRequired: z.boolean().describe(
|
|
2698
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
2699
|
+
).optional().nullable(),
|
|
2700
|
+
emailRequired: z.boolean().describe(
|
|
2701
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
2702
|
+
).optional().nullable(),
|
|
2703
|
+
emailMarketingCheckbox: z.object({
|
|
2704
|
+
enabled: z.boolean().describe(
|
|
2705
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
2706
|
+
).optional().nullable(),
|
|
2707
|
+
checkedByDefault: z.boolean().describe(
|
|
2708
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
2709
|
+
).optional().nullable()
|
|
2710
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
2711
|
+
}).describe(
|
|
2712
|
+
"Custom form fields and settings for the reservation booking form."
|
|
2713
|
+
).optional(),
|
|
2714
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
2715
|
+
}).describe("Experience configuration.").optional(),
|
|
2716
|
+
currency: z.string().describe(
|
|
2717
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
2718
|
+
).optional().nullable(),
|
|
2719
|
+
extendedFields: z.object({
|
|
2720
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
2721
|
+
"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)."
|
|
2722
|
+
).optional()
|
|
2723
|
+
}).describe("Extended fields.").optional(),
|
|
2724
|
+
tags: z.object({
|
|
2725
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2726
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
2727
|
+
).optional(),
|
|
2728
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2729
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
2730
|
+
).optional()
|
|
2731
|
+
}).describe(
|
|
2732
|
+
"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."
|
|
2733
|
+
).optional(),
|
|
2734
|
+
slug: z.string().describe(
|
|
2735
|
+
'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.'
|
|
2736
|
+
).max(300).optional().nullable(),
|
|
2737
|
+
seoSettings: z.object({
|
|
2738
|
+
seoSchema: z.object({
|
|
2739
|
+
tags: z.array(
|
|
2740
|
+
z.object({
|
|
2741
|
+
type: z.string().describe(
|
|
2742
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
2743
|
+
).optional(),
|
|
2744
|
+
props: z.record(z.string(), z.any()).describe(
|
|
2745
|
+
'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"}`.'
|
|
2746
|
+
).optional().nullable(),
|
|
2747
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
2748
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
2749
|
+
).optional().nullable(),
|
|
2750
|
+
children: z.string().describe(
|
|
2751
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
2752
|
+
).optional(),
|
|
2753
|
+
custom: z.boolean().describe(
|
|
2754
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
2755
|
+
).optional(),
|
|
2756
|
+
disabled: z.boolean().describe(
|
|
2757
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
2758
|
+
).optional()
|
|
2759
|
+
})
|
|
2760
|
+
).optional(),
|
|
2761
|
+
settings: z.object({
|
|
2762
|
+
preventAutoRedirect: z.boolean().describe(
|
|
2763
|
+
"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)."
|
|
2764
|
+
).optional(),
|
|
2765
|
+
keywords: z.array(
|
|
2766
|
+
z.object({
|
|
2767
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
2768
|
+
isMain: z.boolean().describe(
|
|
2769
|
+
"Whether the keyword is the main focus keyword."
|
|
2770
|
+
).optional(),
|
|
2771
|
+
origin: z.string().describe(
|
|
2772
|
+
"The source that added the keyword terms to the SEO settings."
|
|
2773
|
+
).max(1e3).optional().nullable()
|
|
2774
|
+
})
|
|
2775
|
+
).max(5).optional()
|
|
2776
|
+
}).describe("SEO general settings.").optional()
|
|
2777
|
+
}).describe(
|
|
2778
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
2779
|
+
).optional()
|
|
2780
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
2781
|
+
}).describe("Experience to update. May be partial.")
|
|
2782
|
+
});
|
|
2783
|
+
var UpdateExperienceResponse = z.object({
|
|
2784
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
2785
|
+
/^[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}$/,
|
|
2786
|
+
"Must be a valid GUID"
|
|
2787
|
+
).optional().nullable(),
|
|
2788
|
+
reservationLocationId: z.string().describe("ID of the reservation location this experience is assigned to.").regex(
|
|
2789
|
+
/^[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}$/,
|
|
2790
|
+
"Must be a valid GUID"
|
|
2791
|
+
).optional().nullable(),
|
|
2792
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
2793
|
+
"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."
|
|
2794
|
+
).optional().nullable(),
|
|
2795
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
2796
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
2797
|
+
configuration: z.object({
|
|
2798
|
+
displayInfo: z.object({
|
|
2799
|
+
name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
|
|
2800
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
2801
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
2802
|
+
richContent: z.any().describe(
|
|
2803
|
+
"Detailed description of the experience using rich content formatting."
|
|
2804
|
+
).optional()
|
|
2805
|
+
}).describe("Display information for the experience.").optional(),
|
|
2806
|
+
paymentPolicy: z.intersection(
|
|
2807
|
+
z.object({
|
|
2808
|
+
paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
|
|
2809
|
+
}),
|
|
2810
|
+
z.xor([
|
|
2811
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
2812
|
+
z.object({
|
|
2813
|
+
perGuestOptions: z.object({
|
|
2814
|
+
price: z.string().describe(
|
|
2815
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
2816
|
+
).optional().nullable()
|
|
2817
|
+
}).describe("Per-guest pricing settings.")
|
|
2818
|
+
})
|
|
2819
|
+
])
|
|
2820
|
+
).describe(
|
|
2821
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
2822
|
+
).optional(),
|
|
2823
|
+
onlineReservations: z.object({
|
|
2824
|
+
partySize: z.object({
|
|
2825
|
+
min: z.number().int().describe("Minimum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable(),
|
|
2826
|
+
max: z.number().int().describe("Maximum number of guests allowed for a reservation.").min(1).max(1e4).optional().nullable()
|
|
2827
|
+
}).describe("Party size.").optional(),
|
|
2828
|
+
minimumReservationNotice: z.object({
|
|
2829
|
+
number: z.number().int().describe(
|
|
2830
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2831
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2832
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
2833
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
2834
|
+
maximumReservationNotice: z.object({
|
|
2835
|
+
number: z.number().int().describe(
|
|
2836
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
2837
|
+
).min(1).max(1e3).optional().nullable(),
|
|
2838
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
2839
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
2840
|
+
approval: z.object({
|
|
2841
|
+
mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
|
|
2842
|
+
}).describe("Approval.").optional(),
|
|
2843
|
+
maxGuests: z.object({
|
|
2844
|
+
number: z.number().int().describe(
|
|
2845
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
2846
|
+
).min(0).max(1e4).optional().nullable()
|
|
2847
|
+
}).describe("Maximum number of guests.").optional(),
|
|
2848
|
+
businessSchedule: z.object({
|
|
2849
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
2850
|
+
entries: z.array(
|
|
2851
|
+
z.intersection(
|
|
2852
|
+
z.object({
|
|
2853
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
|
|
2854
|
+
}),
|
|
2855
|
+
z.xor([
|
|
2856
|
+
z.object({
|
|
2857
|
+
weeklyOptions: z.never().optional(),
|
|
2858
|
+
oneTimeOptions: z.never().optional()
|
|
2859
|
+
}),
|
|
2860
|
+
z.object({
|
|
2861
|
+
oneTimeOptions: z.never().optional(),
|
|
2862
|
+
weeklyOptions: z.object({
|
|
2863
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2864
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
2865
|
+
startDaysAndTimes: z.array(
|
|
2866
|
+
z.object({
|
|
2867
|
+
day: z.enum([
|
|
2868
|
+
"MONDAY",
|
|
2869
|
+
"TUESDAY",
|
|
2870
|
+
"WEDNESDAY",
|
|
2871
|
+
"THURSDAY",
|
|
2872
|
+
"FRIDAY",
|
|
2873
|
+
"SATURDAY",
|
|
2874
|
+
"SUNDAY"
|
|
2875
|
+
]).describe("Day of week.").optional(),
|
|
2876
|
+
time: z.string().describe(
|
|
2877
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2878
|
+
).max(5).min(5).optional().nullable()
|
|
2879
|
+
})
|
|
2880
|
+
).max(100).optional()
|
|
2881
|
+
}).describe("Weekly recurrence settings.")
|
|
2882
|
+
}),
|
|
2883
|
+
z.object({
|
|
2884
|
+
weeklyOptions: z.never().optional(),
|
|
2885
|
+
oneTimeOptions: z.object({
|
|
2886
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
2887
|
+
startTime: z.string().describe(
|
|
2888
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
2889
|
+
).max(5).min(5).optional().nullable()
|
|
2890
|
+
}).describe("1-time event settings.")
|
|
2891
|
+
})
|
|
2892
|
+
])
|
|
2893
|
+
)
|
|
2894
|
+
).max(10).optional()
|
|
2895
|
+
}).describe("Business schedule.").optional()
|
|
2896
|
+
}).describe(
|
|
2897
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
2898
|
+
).optional(),
|
|
2899
|
+
reservationForm: z.object({
|
|
2900
|
+
submitMessage: z.string().describe(
|
|
2901
|
+
"Message displayed to customers when they submit the reservation form."
|
|
2902
|
+
).max(1e6).optional().nullable(),
|
|
2903
|
+
policiesEnabled: z.boolean().describe(
|
|
2904
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
2905
|
+
).optional().nullable(),
|
|
2906
|
+
privacyPolicy: z.intersection(
|
|
2907
|
+
z.object({
|
|
2908
|
+
enabled: z.boolean().describe(
|
|
2909
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
2910
|
+
).optional().nullable()
|
|
2911
|
+
}),
|
|
2912
|
+
z.xor([
|
|
2913
|
+
z.object({
|
|
2914
|
+
url: z.never().optional(),
|
|
2915
|
+
text: z.never().optional()
|
|
2916
|
+
}),
|
|
2917
|
+
z.object({
|
|
2918
|
+
text: z.never().optional(),
|
|
2919
|
+
url: z.string().describe("Privacy policy URL.")
|
|
2920
|
+
}),
|
|
2921
|
+
z.object({
|
|
2922
|
+
url: z.never().optional(),
|
|
2923
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
2924
|
+
})
|
|
2925
|
+
])
|
|
2926
|
+
).describe("Privacy policy display settings.").optional(),
|
|
2927
|
+
termsAndConditions: z.intersection(
|
|
2928
|
+
z.object({
|
|
2929
|
+
enabled: z.boolean().describe(
|
|
2930
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
2931
|
+
).optional().nullable()
|
|
2932
|
+
}),
|
|
2933
|
+
z.xor([
|
|
2934
|
+
z.object({
|
|
2935
|
+
url: z.never().optional(),
|
|
2936
|
+
text: z.never().optional()
|
|
2937
|
+
}),
|
|
2938
|
+
z.object({
|
|
2939
|
+
text: z.never().optional(),
|
|
2940
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
2941
|
+
}),
|
|
2942
|
+
z.object({
|
|
2943
|
+
url: z.never().optional(),
|
|
2944
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
2945
|
+
})
|
|
2946
|
+
])
|
|
2947
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
2948
|
+
customFieldDefinitions: z.array(
|
|
2949
|
+
z.object({
|
|
2950
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
2951
|
+
/^[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}$/,
|
|
2952
|
+
"Must be a valid GUID"
|
|
2953
|
+
).optional().nullable(),
|
|
2954
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
2955
|
+
required: z.boolean().describe(
|
|
2956
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
2957
|
+
).optional().nullable()
|
|
2958
|
+
})
|
|
2959
|
+
).max(1e3).optional(),
|
|
2960
|
+
lastNameRequired: z.boolean().describe(
|
|
2961
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
2962
|
+
).optional().nullable(),
|
|
2963
|
+
emailRequired: z.boolean().describe(
|
|
2964
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
2965
|
+
).optional().nullable(),
|
|
2966
|
+
emailMarketingCheckbox: z.object({
|
|
2967
|
+
enabled: z.boolean().describe(
|
|
2968
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
2969
|
+
).optional().nullable(),
|
|
2970
|
+
checkedByDefault: z.boolean().describe(
|
|
2971
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
2972
|
+
).optional().nullable()
|
|
2973
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
2974
|
+
}).describe(
|
|
2975
|
+
"Custom form fields and settings for the reservation booking form."
|
|
2976
|
+
).optional(),
|
|
2977
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
2978
|
+
}).describe("Experience configuration.").optional(),
|
|
2979
|
+
currency: z.string().describe(
|
|
2980
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
2981
|
+
).optional().nullable(),
|
|
2982
|
+
extendedFields: z.object({
|
|
2983
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
2984
|
+
"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)."
|
|
2985
|
+
).optional()
|
|
2986
|
+
}).describe("Extended fields.").optional(),
|
|
2987
|
+
tags: z.object({
|
|
2988
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2989
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
2990
|
+
).optional(),
|
|
2991
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
2992
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
2993
|
+
).optional()
|
|
2994
|
+
}).describe(
|
|
2995
|
+
"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."
|
|
2996
|
+
).optional(),
|
|
2997
|
+
slug: z.string().describe(
|
|
2998
|
+
'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.'
|
|
2999
|
+
).max(300).optional().nullable(),
|
|
3000
|
+
seoSettings: z.object({
|
|
3001
|
+
seoSchema: z.object({
|
|
3002
|
+
tags: z.array(
|
|
3003
|
+
z.object({
|
|
3004
|
+
type: z.string().describe(
|
|
3005
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
3006
|
+
).optional(),
|
|
3007
|
+
props: z.record(z.string(), z.any()).describe(
|
|
3008
|
+
'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"}`.'
|
|
3009
|
+
).optional().nullable(),
|
|
3010
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
3011
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
3012
|
+
).optional().nullable(),
|
|
3013
|
+
children: z.string().describe(
|
|
3014
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
3015
|
+
).optional(),
|
|
3016
|
+
custom: z.boolean().describe(
|
|
3017
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
3018
|
+
).optional(),
|
|
3019
|
+
disabled: z.boolean().describe(
|
|
3020
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
3021
|
+
).optional()
|
|
3022
|
+
})
|
|
3023
|
+
).optional(),
|
|
3024
|
+
settings: z.object({
|
|
3025
|
+
preventAutoRedirect: z.boolean().describe(
|
|
3026
|
+
"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)."
|
|
3027
|
+
).optional(),
|
|
3028
|
+
keywords: z.array(
|
|
3029
|
+
z.object({
|
|
3030
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
3031
|
+
isMain: z.boolean().describe(
|
|
3032
|
+
"Whether the keyword is the main focus keyword."
|
|
3033
|
+
).optional(),
|
|
3034
|
+
origin: z.string().describe(
|
|
3035
|
+
"The source that added the keyword terms to the SEO settings."
|
|
3036
|
+
).max(1e3).optional().nullable()
|
|
3037
|
+
})
|
|
3038
|
+
).max(5).optional()
|
|
3039
|
+
}).describe("SEO general settings.").optional()
|
|
3040
|
+
}).describe(
|
|
3041
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
3042
|
+
).optional()
|
|
3043
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
3044
|
+
});
|
|
3045
|
+
var QueryExperiencesRequest = z.object({
|
|
3046
|
+
query: z.intersection(
|
|
3047
|
+
z.object({
|
|
3048
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
3049
|
+
"Filter object.\n\nLearn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section)."
|
|
3050
|
+
).optional().nullable(),
|
|
3051
|
+
sort: z.array(
|
|
3052
|
+
z.object({
|
|
3053
|
+
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
3054
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
3055
|
+
})
|
|
3056
|
+
).max(5).optional()
|
|
3057
|
+
}),
|
|
3058
|
+
z.xor([
|
|
3059
|
+
z.object({ cursorPaging: z.never().optional() }),
|
|
3060
|
+
z.object({
|
|
3061
|
+
cursorPaging: z.object({
|
|
3062
|
+
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
3063
|
+
cursor: z.string().describe(
|
|
3064
|
+
"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."
|
|
3065
|
+
).max(16e3).optional().nullable()
|
|
3066
|
+
}).describe(
|
|
3067
|
+
"Cursor paging options.\n\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging)."
|
|
3068
|
+
)
|
|
3069
|
+
})
|
|
3070
|
+
])
|
|
3071
|
+
).describe("Query criteria for filtering and sorting experiences.")
|
|
3072
|
+
});
|
|
3073
|
+
var QueryExperiencesResponse = z.object({
|
|
3074
|
+
experiences: z.array(
|
|
3075
|
+
z.object({
|
|
3076
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
3077
|
+
/^[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}$/,
|
|
3078
|
+
"Must be a valid GUID"
|
|
3079
|
+
).optional().nullable(),
|
|
3080
|
+
reservationLocationId: z.string().describe(
|
|
3081
|
+
"ID of the reservation location this experience is assigned to."
|
|
3082
|
+
).regex(
|
|
3083
|
+
/^[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}$/,
|
|
3084
|
+
"Must be a valid GUID"
|
|
3085
|
+
).optional().nullable(),
|
|
3086
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
3087
|
+
"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."
|
|
3088
|
+
).optional().nullable(),
|
|
3089
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
3090
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
3091
|
+
configuration: z.object({
|
|
3092
|
+
displayInfo: z.object({
|
|
3093
|
+
name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
|
|
3094
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
3095
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
3096
|
+
richContent: z.any().describe(
|
|
3097
|
+
"Detailed description of the experience using rich content formatting."
|
|
3098
|
+
).optional()
|
|
3099
|
+
}).describe("Display information for the experience.").optional(),
|
|
3100
|
+
paymentPolicy: z.intersection(
|
|
3101
|
+
z.object({
|
|
3102
|
+
paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
|
|
3103
|
+
}),
|
|
3104
|
+
z.xor([
|
|
3105
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
3106
|
+
z.object({
|
|
3107
|
+
perGuestOptions: z.object({
|
|
3108
|
+
price: z.string().describe(
|
|
3109
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
3110
|
+
).optional().nullable()
|
|
3111
|
+
}).describe("Per-guest pricing settings.")
|
|
3112
|
+
})
|
|
3113
|
+
])
|
|
3114
|
+
).describe(
|
|
3115
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
3116
|
+
).optional(),
|
|
3117
|
+
onlineReservations: z.object({
|
|
3118
|
+
partySize: z.object({
|
|
3119
|
+
min: z.number().int().describe(
|
|
3120
|
+
"Minimum number of guests allowed for a reservation."
|
|
3121
|
+
).min(1).max(1e4).optional().nullable(),
|
|
3122
|
+
max: z.number().int().describe(
|
|
3123
|
+
"Maximum number of guests allowed for a reservation."
|
|
3124
|
+
).min(1).max(1e4).optional().nullable()
|
|
3125
|
+
}).describe("Party size.").optional(),
|
|
3126
|
+
minimumReservationNotice: z.object({
|
|
3127
|
+
number: z.number().int().describe(
|
|
3128
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
3129
|
+
).min(1).max(1e3).optional().nullable(),
|
|
3130
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
3131
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
3132
|
+
maximumReservationNotice: z.object({
|
|
3133
|
+
number: z.number().int().describe(
|
|
3134
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
3135
|
+
).min(1).max(1e3).optional().nullable(),
|
|
3136
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
3137
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
3138
|
+
approval: z.object({
|
|
3139
|
+
mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
|
|
3140
|
+
}).describe("Approval.").optional(),
|
|
3141
|
+
maxGuests: z.object({
|
|
3142
|
+
number: z.number().int().describe(
|
|
3143
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
3144
|
+
).min(0).max(1e4).optional().nullable()
|
|
3145
|
+
}).describe("Maximum number of guests.").optional(),
|
|
3146
|
+
businessSchedule: z.object({
|
|
3147
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
3148
|
+
entries: z.array(
|
|
3149
|
+
z.intersection(
|
|
3150
|
+
z.object({
|
|
3151
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
|
|
3152
|
+
}),
|
|
3153
|
+
z.xor([
|
|
3154
|
+
z.object({
|
|
3155
|
+
weeklyOptions: z.never().optional(),
|
|
3156
|
+
oneTimeOptions: z.never().optional()
|
|
3157
|
+
}),
|
|
3158
|
+
z.object({
|
|
3159
|
+
oneTimeOptions: z.never().optional(),
|
|
3160
|
+
weeklyOptions: z.object({
|
|
3161
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
3162
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
3163
|
+
startDaysAndTimes: z.array(
|
|
3164
|
+
z.object({
|
|
3165
|
+
day: z.enum([
|
|
3166
|
+
"MONDAY",
|
|
3167
|
+
"TUESDAY",
|
|
3168
|
+
"WEDNESDAY",
|
|
3169
|
+
"THURSDAY",
|
|
3170
|
+
"FRIDAY",
|
|
3171
|
+
"SATURDAY",
|
|
3172
|
+
"SUNDAY"
|
|
3173
|
+
]).describe("Day of week.").optional(),
|
|
3174
|
+
time: z.string().describe(
|
|
3175
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
3176
|
+
).max(5).min(5).optional().nullable()
|
|
3177
|
+
})
|
|
3178
|
+
).max(100).optional()
|
|
3179
|
+
}).describe("Weekly recurrence settings.")
|
|
3180
|
+
}),
|
|
3181
|
+
z.object({
|
|
3182
|
+
weeklyOptions: z.never().optional(),
|
|
3183
|
+
oneTimeOptions: z.object({
|
|
3184
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
3185
|
+
startTime: z.string().describe(
|
|
3186
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
3187
|
+
).max(5).min(5).optional().nullable()
|
|
3188
|
+
}).describe("1-time event settings.")
|
|
3189
|
+
})
|
|
3190
|
+
])
|
|
3191
|
+
)
|
|
3192
|
+
).max(10).optional()
|
|
3193
|
+
}).describe("Business schedule.").optional()
|
|
3194
|
+
}).describe(
|
|
3195
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
3196
|
+
).optional(),
|
|
3197
|
+
reservationForm: z.object({
|
|
3198
|
+
submitMessage: z.string().describe(
|
|
3199
|
+
"Message displayed to customers when they submit the reservation form."
|
|
3200
|
+
).max(1e6).optional().nullable(),
|
|
3201
|
+
policiesEnabled: z.boolean().describe(
|
|
3202
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
3203
|
+
).optional().nullable(),
|
|
3204
|
+
privacyPolicy: z.intersection(
|
|
3205
|
+
z.object({
|
|
3206
|
+
enabled: z.boolean().describe(
|
|
3207
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
3208
|
+
).optional().nullable()
|
|
3209
|
+
}),
|
|
3210
|
+
z.xor([
|
|
3211
|
+
z.object({
|
|
3212
|
+
url: z.never().optional(),
|
|
3213
|
+
text: z.never().optional()
|
|
3214
|
+
}),
|
|
3215
|
+
z.object({
|
|
3216
|
+
text: z.never().optional(),
|
|
3217
|
+
url: z.string().describe("Privacy policy URL.")
|
|
3218
|
+
}),
|
|
3219
|
+
z.object({
|
|
3220
|
+
url: z.never().optional(),
|
|
3221
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
3222
|
+
})
|
|
3223
|
+
])
|
|
3224
|
+
).describe("Privacy policy display settings.").optional(),
|
|
3225
|
+
termsAndConditions: z.intersection(
|
|
3226
|
+
z.object({
|
|
3227
|
+
enabled: z.boolean().describe(
|
|
3228
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
3229
|
+
).optional().nullable()
|
|
3230
|
+
}),
|
|
3231
|
+
z.xor([
|
|
3232
|
+
z.object({
|
|
3233
|
+
url: z.never().optional(),
|
|
3234
|
+
text: z.never().optional()
|
|
3235
|
+
}),
|
|
3236
|
+
z.object({
|
|
3237
|
+
text: z.never().optional(),
|
|
3238
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
3239
|
+
}),
|
|
3240
|
+
z.object({
|
|
3241
|
+
url: z.never().optional(),
|
|
3242
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
3243
|
+
})
|
|
3244
|
+
])
|
|
3245
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
3246
|
+
customFieldDefinitions: z.array(
|
|
3247
|
+
z.object({
|
|
3248
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
3249
|
+
/^[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}$/,
|
|
3250
|
+
"Must be a valid GUID"
|
|
3251
|
+
).optional().nullable(),
|
|
3252
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
3253
|
+
required: z.boolean().describe(
|
|
3254
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
3255
|
+
).optional().nullable()
|
|
3256
|
+
})
|
|
3257
|
+
).max(1e3).optional(),
|
|
3258
|
+
lastNameRequired: z.boolean().describe(
|
|
3259
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
3260
|
+
).optional().nullable(),
|
|
3261
|
+
emailRequired: z.boolean().describe(
|
|
3262
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
3263
|
+
).optional().nullable(),
|
|
3264
|
+
emailMarketingCheckbox: z.object({
|
|
3265
|
+
enabled: z.boolean().describe(
|
|
3266
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
3267
|
+
).optional().nullable(),
|
|
3268
|
+
checkedByDefault: z.boolean().describe(
|
|
3269
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
3270
|
+
).optional().nullable()
|
|
3271
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
3272
|
+
}).describe(
|
|
3273
|
+
"Custom form fields and settings for the reservation booking form."
|
|
3274
|
+
).optional(),
|
|
3275
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
3276
|
+
}).describe("Experience configuration.").optional(),
|
|
3277
|
+
currency: z.string().describe(
|
|
3278
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
3279
|
+
).optional().nullable(),
|
|
3280
|
+
extendedFields: z.object({
|
|
3281
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
3282
|
+
"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)."
|
|
3283
|
+
).optional()
|
|
3284
|
+
}).describe("Extended fields.").optional(),
|
|
3285
|
+
tags: z.object({
|
|
3286
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3287
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
3288
|
+
).optional(),
|
|
3289
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3290
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
3291
|
+
).optional()
|
|
3292
|
+
}).describe(
|
|
3293
|
+
"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."
|
|
3294
|
+
).optional(),
|
|
3295
|
+
slug: z.string().describe(
|
|
3296
|
+
'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.'
|
|
3297
|
+
).max(300).optional().nullable(),
|
|
3298
|
+
seoSettings: z.object({
|
|
3299
|
+
seoSchema: z.object({
|
|
3300
|
+
tags: z.array(
|
|
3301
|
+
z.object({
|
|
3302
|
+
type: z.string().describe(
|
|
3303
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
3304
|
+
).optional(),
|
|
3305
|
+
props: z.record(z.string(), z.any()).describe(
|
|
3306
|
+
'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"}`.'
|
|
3307
|
+
).optional().nullable(),
|
|
3308
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
3309
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
3310
|
+
).optional().nullable(),
|
|
3311
|
+
children: z.string().describe(
|
|
3312
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
3313
|
+
).optional(),
|
|
3314
|
+
custom: z.boolean().describe(
|
|
3315
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
3316
|
+
).optional(),
|
|
3317
|
+
disabled: z.boolean().describe(
|
|
3318
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
3319
|
+
).optional()
|
|
3320
|
+
})
|
|
3321
|
+
).optional(),
|
|
3322
|
+
settings: z.object({
|
|
3323
|
+
preventAutoRedirect: z.boolean().describe(
|
|
3324
|
+
"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)."
|
|
3325
|
+
).optional(),
|
|
3326
|
+
keywords: z.array(
|
|
3327
|
+
z.object({
|
|
3328
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
3329
|
+
isMain: z.boolean().describe(
|
|
3330
|
+
"Whether the keyword is the main focus keyword."
|
|
3331
|
+
).optional(),
|
|
3332
|
+
origin: z.string().describe(
|
|
3333
|
+
"The source that added the keyword terms to the SEO settings."
|
|
3334
|
+
).max(1e3).optional().nullable()
|
|
3335
|
+
})
|
|
3336
|
+
).max(5).optional()
|
|
3337
|
+
}).describe("SEO general settings.").optional()
|
|
3338
|
+
}).describe(
|
|
3339
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
3340
|
+
).optional()
|
|
3341
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
3342
|
+
})
|
|
3343
|
+
).optional(),
|
|
3344
|
+
pagingMetadata: z.object({
|
|
3345
|
+
count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
|
|
3346
|
+
cursors: z.object({
|
|
3347
|
+
next: z.string().describe(
|
|
3348
|
+
"Cursor string pointing to the next page in the list of results."
|
|
3349
|
+
).max(16e3).optional().nullable(),
|
|
3350
|
+
prev: z.string().describe(
|
|
3351
|
+
"Cursor pointing to the previous page in the list of results."
|
|
3352
|
+
).max(16e3).optional().nullable()
|
|
3353
|
+
}).describe(
|
|
3354
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
3355
|
+
).optional(),
|
|
3356
|
+
hasNext: z.boolean().describe(
|
|
3357
|
+
"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."
|
|
3358
|
+
).optional().nullable()
|
|
3359
|
+
}).describe("Pagination information for the query results.").optional()
|
|
3360
|
+
});
|
|
3361
|
+
var SearchExperiencesRequest = z.object({
|
|
3362
|
+
search: z.intersection(
|
|
3363
|
+
z.object({
|
|
3364
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
3365
|
+
"Filter object.\n\nLearn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
|
|
3366
|
+
).optional().nullable(),
|
|
3367
|
+
sort: z.array(
|
|
3368
|
+
z.object({
|
|
3369
|
+
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
3370
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
3371
|
+
})
|
|
3372
|
+
).max(100).optional(),
|
|
3373
|
+
aggregations: z.array(
|
|
3374
|
+
z.intersection(
|
|
3375
|
+
z.object({
|
|
3376
|
+
name: z.string().max(1e3).optional().nullable(),
|
|
3377
|
+
type: z.enum([
|
|
3378
|
+
"UNKNOWN_AGGREGATION_TYPE",
|
|
3379
|
+
"VALUE",
|
|
3380
|
+
"RANGE",
|
|
3381
|
+
"SCALAR",
|
|
3382
|
+
"DATE_HISTOGRAM",
|
|
3383
|
+
"NESTED"
|
|
3384
|
+
]).optional(),
|
|
3385
|
+
fieldPath: z.string().max(1e3).optional()
|
|
3386
|
+
}),
|
|
3387
|
+
z.xor([
|
|
3388
|
+
z.object({
|
|
3389
|
+
value: z.never().optional(),
|
|
3390
|
+
range: z.never().optional(),
|
|
3391
|
+
scalar: z.never().optional(),
|
|
3392
|
+
dateHistogram: z.never().optional(),
|
|
3393
|
+
nested: z.never().optional()
|
|
3394
|
+
}),
|
|
3395
|
+
z.object({
|
|
3396
|
+
range: z.never().optional(),
|
|
3397
|
+
scalar: z.never().optional(),
|
|
3398
|
+
dateHistogram: z.never().optional(),
|
|
3399
|
+
nested: z.never().optional(),
|
|
3400
|
+
value: z.intersection(
|
|
3401
|
+
z.object({
|
|
3402
|
+
sortType: z.enum(["COUNT", "VALUE"]).describe(
|
|
3403
|
+
"Whether to sort by the number of matches or the value of the field."
|
|
3404
|
+
).optional(),
|
|
3405
|
+
sortDirection: z.enum(["DESC", "ASC"]).describe(
|
|
3406
|
+
"Whether to sort in ascending or descending order."
|
|
3407
|
+
).optional(),
|
|
3408
|
+
limit: z.number().int().describe(
|
|
3409
|
+
"Number of aggregation results to return.\nMin: `1`\nMax: `250`\nDefault: `10`"
|
|
3410
|
+
).optional().nullable(),
|
|
3411
|
+
missingValues: z.enum(["EXCLUDE", "INCLUDE"]).describe(
|
|
3412
|
+
"Whether missing values should be included or excluded from the aggregation results.\nDefault: `EXCLUDE`."
|
|
3413
|
+
).optional()
|
|
3414
|
+
}),
|
|
3415
|
+
z.xor([
|
|
3416
|
+
z.object({ includeOptions: z.never().optional() }),
|
|
3417
|
+
z.object({
|
|
3418
|
+
includeOptions: z.object({
|
|
3419
|
+
addToBucket: z.string().describe(
|
|
3420
|
+
'Specify a custom name for the bucket containing the missing values. Defaults are "N/A" for strings, "0" for integers, and "false" for booleans.'
|
|
3421
|
+
).max(1e3).optional()
|
|
3422
|
+
}).describe(
|
|
3423
|
+
"Options for including missing values in results."
|
|
3424
|
+
)
|
|
3425
|
+
})
|
|
3426
|
+
])
|
|
3427
|
+
).describe(
|
|
3428
|
+
'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.'
|
|
3429
|
+
)
|
|
3430
|
+
}),
|
|
3431
|
+
z.object({
|
|
3432
|
+
value: z.never().optional(),
|
|
3433
|
+
scalar: z.never().optional(),
|
|
3434
|
+
dateHistogram: z.never().optional(),
|
|
3435
|
+
nested: z.never().optional(),
|
|
3436
|
+
range: z.object({
|
|
3437
|
+
buckets: z.array(
|
|
3438
|
+
z.object({
|
|
3439
|
+
from: z.number().describe(
|
|
3440
|
+
"Inclusive lower bound of the range. Required if `to` is not provided."
|
|
3441
|
+
).optional().nullable(),
|
|
3442
|
+
to: z.number().describe(
|
|
3443
|
+
"Exclusive upper bound of the range. Required if `from` is not provided."
|
|
3444
|
+
).optional().nullable()
|
|
3445
|
+
})
|
|
3446
|
+
).max(1e3).optional()
|
|
3447
|
+
}).describe(
|
|
3448
|
+
"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."
|
|
3449
|
+
)
|
|
3450
|
+
}),
|
|
3451
|
+
z.object({
|
|
3452
|
+
value: z.never().optional(),
|
|
3453
|
+
range: z.never().optional(),
|
|
3454
|
+
dateHistogram: z.never().optional(),
|
|
3455
|
+
nested: z.never().optional(),
|
|
3456
|
+
scalar: z.object({
|
|
3457
|
+
type: z.enum([
|
|
3458
|
+
"UNKNOWN_SCALAR_TYPE",
|
|
3459
|
+
"COUNT_DISTINCT",
|
|
3460
|
+
"MIN",
|
|
3461
|
+
"MAX"
|
|
3462
|
+
]).describe("Operation type for the scalar aggregation.").optional()
|
|
3463
|
+
}).describe(
|
|
3464
|
+
"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."
|
|
3465
|
+
)
|
|
3466
|
+
}),
|
|
3467
|
+
z.object({
|
|
3468
|
+
value: z.never().optional(),
|
|
3469
|
+
range: z.never().optional(),
|
|
3470
|
+
scalar: z.never().optional(),
|
|
3471
|
+
nested: z.never().optional(),
|
|
3472
|
+
dateHistogram: z.object({
|
|
3473
|
+
interval: z.enum([
|
|
3474
|
+
"YEAR",
|
|
3475
|
+
"MONTH",
|
|
3476
|
+
"WEEK",
|
|
3477
|
+
"DAY",
|
|
3478
|
+
"HOUR",
|
|
3479
|
+
"MINUTE",
|
|
3480
|
+
"SECOND"
|
|
3481
|
+
]).describe("Interval for date histogram aggregation.").optional()
|
|
3482
|
+
}).describe(
|
|
3483
|
+
"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."
|
|
3484
|
+
)
|
|
3485
|
+
}),
|
|
3486
|
+
z.object({
|
|
3487
|
+
value: z.never().optional(),
|
|
3488
|
+
range: z.never().optional(),
|
|
3489
|
+
scalar: z.never().optional(),
|
|
3490
|
+
dateHistogram: z.never().optional(),
|
|
3491
|
+
nested: z.object({
|
|
3492
|
+
nestedAggregations: z.array(
|
|
3493
|
+
z.intersection(
|
|
3494
|
+
z.object({
|
|
3495
|
+
name: z.string().describe(
|
|
3496
|
+
"Aggregation name displayed in the return."
|
|
3497
|
+
).max(1e3).optional().nullable(),
|
|
3498
|
+
type: z.enum([
|
|
3499
|
+
"UNKNOWN_AGGREGATION_TYPE",
|
|
3500
|
+
"VALUE",
|
|
3501
|
+
"RANGE",
|
|
3502
|
+
"SCALAR",
|
|
3503
|
+
"DATE_HISTOGRAM"
|
|
3504
|
+
]).optional(),
|
|
3505
|
+
fieldPath: z.string().describe("Field to aggregate by.").max(1e3).optional()
|
|
3506
|
+
}),
|
|
3507
|
+
z.xor([
|
|
3508
|
+
z.object({
|
|
3509
|
+
value: z.never().optional(),
|
|
3510
|
+
range: z.never().optional(),
|
|
3511
|
+
scalar: z.never().optional(),
|
|
3512
|
+
dateHistogram: z.never().optional()
|
|
3513
|
+
}),
|
|
3514
|
+
z.object({
|
|
3515
|
+
range: z.never().optional(),
|
|
3516
|
+
scalar: z.never().optional(),
|
|
3517
|
+
dateHistogram: z.never().optional(),
|
|
3518
|
+
value: z.intersection(
|
|
3519
|
+
z.object({
|
|
3520
|
+
sortType: z.enum(["COUNT", "VALUE"]).describe(
|
|
3521
|
+
"Whether to sort by the number of matches or the value of the field."
|
|
3522
|
+
).optional(),
|
|
3523
|
+
sortDirection: z.enum(["DESC", "ASC"]).describe(
|
|
3524
|
+
"Whether to sort in ascending or descending order."
|
|
3525
|
+
).optional(),
|
|
3526
|
+
limit: z.number().int().describe(
|
|
3527
|
+
"Number of aggregation results to return.\nMin: `1`\nMax: `250`\nDefault: `10`"
|
|
3528
|
+
).optional().nullable(),
|
|
3529
|
+
missingValues: z.enum(["EXCLUDE", "INCLUDE"]).describe(
|
|
3530
|
+
"Whether missing values should be included or excluded from the aggregation results.\nDefault: `EXCLUDE`."
|
|
3531
|
+
).optional()
|
|
3532
|
+
}),
|
|
3533
|
+
z.xor([
|
|
3534
|
+
z.object({
|
|
3535
|
+
includeOptions: z.never().optional()
|
|
3536
|
+
}),
|
|
3537
|
+
z.object({
|
|
3538
|
+
includeOptions: z.object({
|
|
3539
|
+
addToBucket: z.string().describe(
|
|
3540
|
+
'Specify a custom name for the bucket containing the missing values. Defaults are "N/A" for strings, "0" for integers, and "false" for booleans.'
|
|
3541
|
+
).max(1e3).optional()
|
|
3542
|
+
}).describe(
|
|
3543
|
+
"Options for including missing values in results."
|
|
3544
|
+
)
|
|
3545
|
+
})
|
|
3546
|
+
])
|
|
3547
|
+
).describe(
|
|
3548
|
+
'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.'
|
|
3549
|
+
)
|
|
3550
|
+
}),
|
|
3551
|
+
z.object({
|
|
3552
|
+
value: z.never().optional(),
|
|
3553
|
+
scalar: z.never().optional(),
|
|
3554
|
+
dateHistogram: z.never().optional(),
|
|
3555
|
+
range: z.object({
|
|
3556
|
+
buckets: z.array(
|
|
3557
|
+
z.object({
|
|
3558
|
+
from: z.number().describe(
|
|
3559
|
+
"Inclusive lower bound of the range. Required if `to` is not provided."
|
|
3560
|
+
).optional().nullable(),
|
|
3561
|
+
to: z.number().describe(
|
|
3562
|
+
"Exclusive upper bound of the range. Required if `from` is not provided."
|
|
3563
|
+
).optional().nullable()
|
|
3564
|
+
})
|
|
3565
|
+
).max(1e3).optional()
|
|
3566
|
+
}).describe(
|
|
3567
|
+
"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."
|
|
3568
|
+
)
|
|
3569
|
+
}),
|
|
3570
|
+
z.object({
|
|
3571
|
+
value: z.never().optional(),
|
|
3572
|
+
range: z.never().optional(),
|
|
3573
|
+
dateHistogram: z.never().optional(),
|
|
3574
|
+
scalar: z.object({
|
|
3575
|
+
type: z.enum([
|
|
3576
|
+
"UNKNOWN_SCALAR_TYPE",
|
|
3577
|
+
"COUNT_DISTINCT",
|
|
3578
|
+
"MIN",
|
|
3579
|
+
"MAX"
|
|
3580
|
+
]).describe(
|
|
3581
|
+
"Operation type for the scalar aggregation."
|
|
3582
|
+
).optional()
|
|
3583
|
+
}).describe(
|
|
3584
|
+
"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."
|
|
3585
|
+
)
|
|
3586
|
+
}),
|
|
3587
|
+
z.object({
|
|
3588
|
+
value: z.never().optional(),
|
|
3589
|
+
range: z.never().optional(),
|
|
3590
|
+
scalar: z.never().optional(),
|
|
3591
|
+
dateHistogram: z.object({
|
|
3592
|
+
interval: z.enum([
|
|
3593
|
+
"YEAR",
|
|
3594
|
+
"MONTH",
|
|
3595
|
+
"WEEK",
|
|
3596
|
+
"DAY",
|
|
3597
|
+
"HOUR",
|
|
3598
|
+
"MINUTE",
|
|
3599
|
+
"SECOND"
|
|
3600
|
+
]).describe(
|
|
3601
|
+
"Interval for date histogram aggregation."
|
|
3602
|
+
).optional()
|
|
3603
|
+
}).describe(
|
|
3604
|
+
"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."
|
|
3605
|
+
)
|
|
3606
|
+
})
|
|
3607
|
+
])
|
|
3608
|
+
)
|
|
3609
|
+
).min(2).max(10).optional()
|
|
3610
|
+
}).describe(
|
|
3611
|
+
"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`."
|
|
3612
|
+
)
|
|
3613
|
+
})
|
|
3614
|
+
])
|
|
3615
|
+
)
|
|
3616
|
+
).max(100).optional(),
|
|
3617
|
+
search: z.object({
|
|
3618
|
+
mode: z.enum(["OR", "AND"]).optional(),
|
|
3619
|
+
expression: z.string().describe("Search term or expression.").max(100).optional().nullable(),
|
|
3620
|
+
fields: z.array(z.string()).max(100).optional(),
|
|
3621
|
+
fuzzy: z.boolean().describe(
|
|
3622
|
+
"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."
|
|
3623
|
+
).optional()
|
|
3624
|
+
}).describe("Free text to match in searchable fields.").optional(),
|
|
3625
|
+
timeZone: z.string().describe(
|
|
3626
|
+
'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".'
|
|
3627
|
+
).max(100).optional().nullable()
|
|
3628
|
+
}),
|
|
3629
|
+
z.xor([
|
|
3630
|
+
z.object({ cursorPaging: z.never().optional() }),
|
|
3631
|
+
z.object({
|
|
3632
|
+
cursorPaging: z.object({
|
|
3633
|
+
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
3634
|
+
cursor: z.string().describe(
|
|
3635
|
+
"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."
|
|
3636
|
+
).max(16e3).optional().nullable()
|
|
3637
|
+
}).describe(
|
|
3638
|
+
"Cursor paging options.\n\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging)."
|
|
3639
|
+
)
|
|
3640
|
+
})
|
|
3641
|
+
])
|
|
3642
|
+
).describe("Search query.")
|
|
3643
|
+
});
|
|
3644
|
+
var SearchExperiencesResponse = z.object({
|
|
3645
|
+
experiences: z.array(
|
|
3646
|
+
z.object({
|
|
3647
|
+
_id: z.string().describe("Experience ID.").regex(
|
|
3648
|
+
/^[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}$/,
|
|
3649
|
+
"Must be a valid GUID"
|
|
3650
|
+
).optional().nullable(),
|
|
3651
|
+
reservationLocationId: z.string().describe(
|
|
3652
|
+
"ID of the reservation location this experience is assigned to."
|
|
3653
|
+
).regex(
|
|
3654
|
+
/^[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}$/,
|
|
3655
|
+
"Must be a valid GUID"
|
|
3656
|
+
).optional().nullable(),
|
|
3657
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
3658
|
+
"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."
|
|
3659
|
+
).optional().nullable(),
|
|
3660
|
+
_createdDate: z.date().describe("Date and time the experience was created.").optional().nullable(),
|
|
3661
|
+
_updatedDate: z.date().describe("Date and time the experience was last updated.").optional().nullable(),
|
|
3662
|
+
configuration: z.object({
|
|
3663
|
+
displayInfo: z.object({
|
|
3664
|
+
name: z.string().describe("Experience name.").min(1).max(120).optional().nullable(),
|
|
3665
|
+
shortDescription: z.string().describe("Brief description of the experience.").max(300).optional().nullable(),
|
|
3666
|
+
coverImage: z.string().describe("Cover image for the experience.").optional(),
|
|
3667
|
+
richContent: z.any().describe(
|
|
3668
|
+
"Detailed description of the experience using rich content formatting."
|
|
3669
|
+
).optional()
|
|
3670
|
+
}).describe("Display information for the experience.").optional(),
|
|
3671
|
+
paymentPolicy: z.intersection(
|
|
3672
|
+
z.object({
|
|
3673
|
+
paymentPolicyType: z.enum(["PER_GUEST", "FREE"]).describe("Payment policy type for the experience.").optional()
|
|
3674
|
+
}),
|
|
3675
|
+
z.xor([
|
|
3676
|
+
z.object({ perGuestOptions: z.never().optional() }),
|
|
3677
|
+
z.object({
|
|
3678
|
+
perGuestOptions: z.object({
|
|
3679
|
+
price: z.string().describe(
|
|
3680
|
+
'Monetary amount to charge. Decimal string with a period as a decimal separator. For example, `"3.99"`.'
|
|
3681
|
+
).optional().nullable()
|
|
3682
|
+
}).describe("Per-guest pricing settings.")
|
|
3683
|
+
})
|
|
3684
|
+
])
|
|
3685
|
+
).describe(
|
|
3686
|
+
"Payment policy for the experience. This policy determines how the restaurant charges for reservations."
|
|
3687
|
+
).optional(),
|
|
3688
|
+
onlineReservations: z.object({
|
|
3689
|
+
partySize: z.object({
|
|
3690
|
+
min: z.number().int().describe(
|
|
3691
|
+
"Minimum number of guests allowed for a reservation."
|
|
3692
|
+
).min(1).max(1e4).optional().nullable(),
|
|
3693
|
+
max: z.number().int().describe(
|
|
3694
|
+
"Maximum number of guests allowed for a reservation."
|
|
3695
|
+
).min(1).max(1e4).optional().nullable()
|
|
3696
|
+
}).describe("Party size.").optional(),
|
|
3697
|
+
minimumReservationNotice: z.object({
|
|
3698
|
+
number: z.number().int().describe(
|
|
3699
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
3700
|
+
).min(1).max(1e3).optional().nullable(),
|
|
3701
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
3702
|
+
}).describe("Minimum reservation notice.").optional(),
|
|
3703
|
+
maximumReservationNotice: z.object({
|
|
3704
|
+
number: z.number().int().describe(
|
|
3705
|
+
"Number of time units for the notice period. For example, `2` for 2 hours or `30` for 30 days."
|
|
3706
|
+
).min(1).max(1e3).optional().nullable(),
|
|
3707
|
+
unit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the notice period.").optional()
|
|
3708
|
+
}).describe("Maximum reservation notice.").optional(),
|
|
3709
|
+
approval: z.object({
|
|
3710
|
+
mode: z.enum(["AUTOMATIC", "MANUAL"]).describe("Approval mode.").optional()
|
|
3711
|
+
}).describe("Approval.").optional(),
|
|
3712
|
+
maxGuests: z.object({
|
|
3713
|
+
number: z.number().int().describe(
|
|
3714
|
+
"Maximum total number of guests that can have active reservations for this experience at the same time."
|
|
3715
|
+
).min(0).max(1e4).optional().nullable()
|
|
3716
|
+
}).describe("Maximum number of guests.").optional(),
|
|
3717
|
+
businessSchedule: z.object({
|
|
3718
|
+
durationInMinutes: z.number().int().describe("Duration of the experience in minutes.").min(1).max(1440).optional().nullable(),
|
|
3719
|
+
entries: z.array(
|
|
3720
|
+
z.intersection(
|
|
3721
|
+
z.object({
|
|
3722
|
+
recurrence: z.enum(["WEEKLY", "ONE_TIME"]).describe("Recurrence settings for this entry.").optional()
|
|
3723
|
+
}),
|
|
3724
|
+
z.xor([
|
|
3725
|
+
z.object({
|
|
3726
|
+
weeklyOptions: z.never().optional(),
|
|
3727
|
+
oneTimeOptions: z.never().optional()
|
|
3728
|
+
}),
|
|
3729
|
+
z.object({
|
|
3730
|
+
oneTimeOptions: z.never().optional(),
|
|
3731
|
+
weeklyOptions: z.object({
|
|
3732
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
3733
|
+
endDate: z.string().describe("End date.").optional().nullable(),
|
|
3734
|
+
startDaysAndTimes: z.array(
|
|
3735
|
+
z.object({
|
|
3736
|
+
day: z.enum([
|
|
3737
|
+
"MONDAY",
|
|
3738
|
+
"TUESDAY",
|
|
3739
|
+
"WEDNESDAY",
|
|
3740
|
+
"THURSDAY",
|
|
3741
|
+
"FRIDAY",
|
|
3742
|
+
"SATURDAY",
|
|
3743
|
+
"SUNDAY"
|
|
3744
|
+
]).describe("Day of week.").optional(),
|
|
3745
|
+
time: z.string().describe(
|
|
3746
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
3747
|
+
).max(5).min(5).optional().nullable()
|
|
3748
|
+
})
|
|
3749
|
+
).max(100).optional()
|
|
3750
|
+
}).describe("Weekly recurrence settings.")
|
|
3751
|
+
}),
|
|
3752
|
+
z.object({
|
|
3753
|
+
weeklyOptions: z.never().optional(),
|
|
3754
|
+
oneTimeOptions: z.object({
|
|
3755
|
+
startDate: z.string().describe("Start date.").optional().nullable(),
|
|
3756
|
+
startTime: z.string().describe(
|
|
3757
|
+
'Start time. ISO-8601 extended local time format (hh:mm). For example, `"11:00"`, or `"23:30"`.'
|
|
3758
|
+
).max(5).min(5).optional().nullable()
|
|
3759
|
+
}).describe("1-time event settings.")
|
|
3760
|
+
})
|
|
3761
|
+
])
|
|
3762
|
+
)
|
|
3763
|
+
).max(10).optional()
|
|
3764
|
+
}).describe("Business schedule.").optional()
|
|
3765
|
+
}).describe(
|
|
3766
|
+
"Settings for this experience that are used to determine restaurant availability for reservations made online."
|
|
3767
|
+
).optional(),
|
|
3768
|
+
reservationForm: z.object({
|
|
3769
|
+
submitMessage: z.string().describe(
|
|
3770
|
+
"Message displayed to customers when they submit the reservation form."
|
|
3771
|
+
).max(1e6).optional().nullable(),
|
|
3772
|
+
policiesEnabled: z.boolean().describe(
|
|
3773
|
+
"Whether to display privacy policy and terms and conditions to customers."
|
|
3774
|
+
).optional().nullable(),
|
|
3775
|
+
privacyPolicy: z.intersection(
|
|
3776
|
+
z.object({
|
|
3777
|
+
enabled: z.boolean().describe(
|
|
3778
|
+
"Whether the privacy policy is displayed to customers.\n\nDefault: `false`"
|
|
3779
|
+
).optional().nullable()
|
|
3780
|
+
}),
|
|
3781
|
+
z.xor([
|
|
3782
|
+
z.object({
|
|
3783
|
+
url: z.never().optional(),
|
|
3784
|
+
text: z.never().optional()
|
|
3785
|
+
}),
|
|
3786
|
+
z.object({
|
|
3787
|
+
text: z.never().optional(),
|
|
3788
|
+
url: z.string().describe("Privacy policy URL.")
|
|
3789
|
+
}),
|
|
3790
|
+
z.object({
|
|
3791
|
+
url: z.never().optional(),
|
|
3792
|
+
text: z.string().describe("Privacy policy text.").max(1e6)
|
|
3793
|
+
})
|
|
3794
|
+
])
|
|
3795
|
+
).describe("Privacy policy display settings.").optional(),
|
|
3796
|
+
termsAndConditions: z.intersection(
|
|
3797
|
+
z.object({
|
|
3798
|
+
enabled: z.boolean().describe(
|
|
3799
|
+
"Whether the terms and conditions are displayed to customers.\n\nDefault: `false`"
|
|
3800
|
+
).optional().nullable()
|
|
3801
|
+
}),
|
|
3802
|
+
z.xor([
|
|
3803
|
+
z.object({
|
|
3804
|
+
url: z.never().optional(),
|
|
3805
|
+
text: z.never().optional()
|
|
3806
|
+
}),
|
|
3807
|
+
z.object({
|
|
3808
|
+
text: z.never().optional(),
|
|
3809
|
+
url: z.string().describe("Terms and conditions URL.")
|
|
3810
|
+
}),
|
|
3811
|
+
z.object({
|
|
3812
|
+
url: z.never().optional(),
|
|
3813
|
+
text: z.string().describe("Terms and conditions text.").max(1e6)
|
|
3814
|
+
})
|
|
3815
|
+
])
|
|
3816
|
+
).describe("Terms and conditions display settings.").optional(),
|
|
3817
|
+
customFieldDefinitions: z.array(
|
|
3818
|
+
z.object({
|
|
3819
|
+
_id: z.string().describe("Custom field ID.").regex(
|
|
3820
|
+
/^[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}$/,
|
|
3821
|
+
"Must be a valid GUID"
|
|
3822
|
+
).optional().nullable(),
|
|
3823
|
+
name: z.string().describe("Custom field name.").min(1).max(1e3).optional().nullable(),
|
|
3824
|
+
required: z.boolean().describe(
|
|
3825
|
+
"Whether the custom field is required.\n\nDefault: `false`"
|
|
3826
|
+
).optional().nullable()
|
|
3827
|
+
})
|
|
3828
|
+
).max(1e3).optional(),
|
|
3829
|
+
lastNameRequired: z.boolean().describe(
|
|
3830
|
+
"Whether a last name is required in the reservation form.\n\nDefault: `false`"
|
|
3831
|
+
).optional().nullable(),
|
|
3832
|
+
emailRequired: z.boolean().describe(
|
|
3833
|
+
"Whether an email is required in the reservation form.\n\nDefault: `false`"
|
|
3834
|
+
).optional().nullable(),
|
|
3835
|
+
emailMarketingCheckbox: z.object({
|
|
3836
|
+
enabled: z.boolean().describe(
|
|
3837
|
+
"Whether the email marketing checkbox is displayed to customers.\n\nDefault: `false`"
|
|
3838
|
+
).optional().nullable(),
|
|
3839
|
+
checkedByDefault: z.boolean().describe(
|
|
3840
|
+
"Whether the email marketing checkbox is checked by default.\n\nDefault: `false`"
|
|
3841
|
+
).optional().nullable()
|
|
3842
|
+
}).describe("Email marketing checkbox settings.").optional()
|
|
3843
|
+
}).describe(
|
|
3844
|
+
"Custom form fields and settings for the reservation booking form."
|
|
3845
|
+
).optional(),
|
|
3846
|
+
visible: z.boolean().describe("Whether the experience is visible on the live site.").optional().nullable()
|
|
3847
|
+
}).describe("Experience configuration.").optional(),
|
|
3848
|
+
currency: z.string().describe(
|
|
3849
|
+
"3-letter currency code in ISO-4217 alphabetic format. For exampled, `USD`."
|
|
3850
|
+
).optional().nullable(),
|
|
3851
|
+
extendedFields: z.object({
|
|
3852
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
3853
|
+
"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)."
|
|
3854
|
+
).optional()
|
|
3855
|
+
}).describe("Extended fields.").optional(),
|
|
3856
|
+
tags: z.object({
|
|
3857
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3858
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
3859
|
+
).optional(),
|
|
3860
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3861
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
3862
|
+
).optional()
|
|
3863
|
+
}).describe(
|
|
3864
|
+
"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."
|
|
3865
|
+
).optional(),
|
|
3866
|
+
slug: z.string().describe(
|
|
3867
|
+
'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.'
|
|
3868
|
+
).max(300).optional().nullable(),
|
|
3869
|
+
seoSettings: z.object({
|
|
3870
|
+
seoSchema: z.object({
|
|
3871
|
+
tags: z.array(
|
|
3872
|
+
z.object({
|
|
3873
|
+
type: z.string().describe(
|
|
3874
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
3875
|
+
).optional(),
|
|
3876
|
+
props: z.record(z.string(), z.any()).describe(
|
|
3877
|
+
'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"}`.'
|
|
3878
|
+
).optional().nullable(),
|
|
3879
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
3880
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
3881
|
+
).optional().nullable(),
|
|
3882
|
+
children: z.string().describe(
|
|
3883
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
3884
|
+
).optional(),
|
|
3885
|
+
custom: z.boolean().describe(
|
|
3886
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
3887
|
+
).optional(),
|
|
3888
|
+
disabled: z.boolean().describe(
|
|
3889
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
3890
|
+
).optional()
|
|
3891
|
+
})
|
|
3892
|
+
).optional(),
|
|
3893
|
+
settings: z.object({
|
|
3894
|
+
preventAutoRedirect: z.boolean().describe(
|
|
3895
|
+
"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)."
|
|
3896
|
+
).optional(),
|
|
3897
|
+
keywords: z.array(
|
|
3898
|
+
z.object({
|
|
3899
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
3900
|
+
isMain: z.boolean().describe(
|
|
3901
|
+
"Whether the keyword is the main focus keyword."
|
|
3902
|
+
).optional(),
|
|
3903
|
+
origin: z.string().describe(
|
|
3904
|
+
"The source that added the keyword terms to the SEO settings."
|
|
3905
|
+
).max(1e3).optional().nullable()
|
|
3906
|
+
})
|
|
3907
|
+
).max(5).optional()
|
|
3908
|
+
}).describe("SEO general settings.").optional()
|
|
3909
|
+
}).describe(
|
|
3910
|
+
"SEO schema data for customizing meta tags and search engine settings."
|
|
3911
|
+
).optional()
|
|
3912
|
+
}).describe("SEO settings for the experience page.").optional()
|
|
3913
|
+
})
|
|
3914
|
+
).optional(),
|
|
3915
|
+
pagingMetadata: z.object({
|
|
3916
|
+
count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
|
|
3917
|
+
cursors: z.object({
|
|
3918
|
+
next: z.string().describe(
|
|
3919
|
+
"Cursor string pointing to the next page in the list of results."
|
|
3920
|
+
).max(16e3).optional().nullable(),
|
|
3921
|
+
prev: z.string().describe(
|
|
3922
|
+
"Cursor pointing to the previous page in the list of results."
|
|
3923
|
+
).max(16e3).optional().nullable()
|
|
3924
|
+
}).describe(
|
|
3925
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
3926
|
+
).optional(),
|
|
3927
|
+
hasNext: z.boolean().describe(
|
|
3928
|
+
"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."
|
|
3929
|
+
).optional().nullable()
|
|
3930
|
+
}).describe("Cursor paging metadata.").optional(),
|
|
3931
|
+
aggregationData: z.object({
|
|
3932
|
+
results: z.array(
|
|
3933
|
+
z.intersection(
|
|
3934
|
+
z.object({
|
|
3935
|
+
name: z.string().describe("Aggregation name defined in the request.").max(1e3).optional(),
|
|
3936
|
+
type: z.enum([
|
|
3937
|
+
"UNKNOWN_AGGREGATION_TYPE",
|
|
3938
|
+
"VALUE",
|
|
3939
|
+
"RANGE",
|
|
3940
|
+
"SCALAR",
|
|
3941
|
+
"DATE_HISTOGRAM",
|
|
3942
|
+
"NESTED"
|
|
3943
|
+
]).describe("Type of aggregation that was performed.").optional(),
|
|
3944
|
+
fieldPath: z.string().describe("Field the data was aggregated by.").max(1e3).optional()
|
|
3945
|
+
}),
|
|
3946
|
+
z.xor([
|
|
3947
|
+
z.object({
|
|
3948
|
+
values: z.never().optional(),
|
|
3949
|
+
ranges: z.never().optional(),
|
|
3950
|
+
scalar: z.never().optional(),
|
|
3951
|
+
groupedByValue: z.never().optional(),
|
|
3952
|
+
dateHistogram: z.never().optional(),
|
|
3953
|
+
nested: z.never().optional()
|
|
3954
|
+
}),
|
|
3955
|
+
z.object({
|
|
3956
|
+
ranges: z.never().optional(),
|
|
3957
|
+
scalar: z.never().optional(),
|
|
3958
|
+
groupedByValue: z.never().optional(),
|
|
3959
|
+
dateHistogram: z.never().optional(),
|
|
3960
|
+
nested: z.never().optional(),
|
|
3961
|
+
values: z.object({
|
|
3962
|
+
results: z.array(
|
|
3963
|
+
z.object({
|
|
3964
|
+
value: z.string().describe("Value of the field").max(1e3).optional(),
|
|
3965
|
+
count: z.number().int().describe("Count of entities with this value").optional()
|
|
3966
|
+
})
|
|
3967
|
+
).max(1e3).optional()
|
|
3968
|
+
}).describe("Value aggregation results.")
|
|
3969
|
+
}),
|
|
3970
|
+
z.object({
|
|
3971
|
+
values: z.never().optional(),
|
|
3972
|
+
scalar: z.never().optional(),
|
|
3973
|
+
groupedByValue: z.never().optional(),
|
|
3974
|
+
dateHistogram: z.never().optional(),
|
|
3975
|
+
nested: z.never().optional(),
|
|
3976
|
+
ranges: z.object({
|
|
3977
|
+
results: z.array(
|
|
3978
|
+
z.object({
|
|
3979
|
+
from: z.number().describe("Inclusive lower bound of the range.").optional().nullable(),
|
|
3980
|
+
to: z.number().describe("Exclusive upper bound of the range.").optional().nullable(),
|
|
3981
|
+
count: z.number().int().describe("Count of entities in the range.").optional()
|
|
3982
|
+
})
|
|
3983
|
+
).max(1e3).optional()
|
|
3984
|
+
}).describe("Range aggregation results.")
|
|
3985
|
+
}),
|
|
3986
|
+
z.object({
|
|
3987
|
+
values: z.never().optional(),
|
|
3988
|
+
ranges: z.never().optional(),
|
|
3989
|
+
groupedByValue: z.never().optional(),
|
|
3990
|
+
dateHistogram: z.never().optional(),
|
|
3991
|
+
nested: z.never().optional(),
|
|
3992
|
+
scalar: z.object({
|
|
3993
|
+
type: z.enum([
|
|
3994
|
+
"UNKNOWN_SCALAR_TYPE",
|
|
3995
|
+
"COUNT_DISTINCT",
|
|
3996
|
+
"MIN",
|
|
3997
|
+
"MAX"
|
|
3998
|
+
]).describe("Type of scalar aggregation.").optional(),
|
|
3999
|
+
value: z.number().describe("Value of the scalar aggregation.").optional()
|
|
4000
|
+
}).describe("Scalar aggregation results.")
|
|
4001
|
+
}),
|
|
4002
|
+
z.object({
|
|
4003
|
+
values: z.never().optional(),
|
|
4004
|
+
ranges: z.never().optional(),
|
|
4005
|
+
scalar: z.never().optional(),
|
|
4006
|
+
dateHistogram: z.never().optional(),
|
|
4007
|
+
nested: z.never().optional(),
|
|
4008
|
+
groupedByValue: z.object({
|
|
4009
|
+
results: z.array(
|
|
4010
|
+
z.object({
|
|
4011
|
+
value: z.string().max(1e3).optional(),
|
|
4012
|
+
nestedResults: z.intersection(
|
|
4013
|
+
z.object({
|
|
4014
|
+
name: z.string().describe(
|
|
4015
|
+
"Aggregation name defined in the request."
|
|
4016
|
+
).max(1e3).optional(),
|
|
4017
|
+
type: z.enum([
|
|
4018
|
+
"UNKNOWN_AGGREGATION_TYPE",
|
|
4019
|
+
"VALUE",
|
|
4020
|
+
"RANGE",
|
|
4021
|
+
"SCALAR",
|
|
4022
|
+
"DATE_HISTOGRAM",
|
|
4023
|
+
"NESTED"
|
|
4024
|
+
]).describe("Type of aggregation performed.").optional(),
|
|
4025
|
+
fieldPath: z.string().describe("Field the data was aggregated by.").max(1e3).optional()
|
|
4026
|
+
}),
|
|
4027
|
+
z.xor([
|
|
4028
|
+
z.object({
|
|
4029
|
+
values: z.never().optional(),
|
|
4030
|
+
ranges: z.never().optional(),
|
|
4031
|
+
scalar: z.never().optional()
|
|
4032
|
+
}),
|
|
4033
|
+
z.object({
|
|
4034
|
+
ranges: z.never().optional(),
|
|
4035
|
+
scalar: z.never().optional(),
|
|
4036
|
+
values: z.object({
|
|
4037
|
+
results: z.array(
|
|
4038
|
+
z.object({
|
|
4039
|
+
value: z.string().describe("Value of the field").max(1e3).optional(),
|
|
4040
|
+
count: z.number().int().describe(
|
|
4041
|
+
"Count of entities with this value"
|
|
4042
|
+
).optional()
|
|
4043
|
+
})
|
|
4044
|
+
).max(1e3).optional()
|
|
4045
|
+
}).describe(
|
|
4046
|
+
"List of the value aggregation results."
|
|
4047
|
+
)
|
|
4048
|
+
}),
|
|
4049
|
+
z.object({
|
|
4050
|
+
values: z.never().optional(),
|
|
4051
|
+
scalar: z.never().optional(),
|
|
4052
|
+
ranges: z.object({
|
|
4053
|
+
results: z.array(
|
|
4054
|
+
z.object({
|
|
4055
|
+
from: z.number().describe(
|
|
4056
|
+
"Inclusive lower bound of the range."
|
|
4057
|
+
).optional().nullable(),
|
|
4058
|
+
to: z.number().describe(
|
|
4059
|
+
"Exclusive upper bound of the range."
|
|
4060
|
+
).optional().nullable(),
|
|
4061
|
+
count: z.number().int().describe(
|
|
4062
|
+
"Count of entities in the range."
|
|
4063
|
+
).optional()
|
|
4064
|
+
})
|
|
4065
|
+
).max(1e3).optional()
|
|
4066
|
+
}).describe(
|
|
4067
|
+
"List of the range aggregation results."
|
|
4068
|
+
)
|
|
4069
|
+
}),
|
|
4070
|
+
z.object({
|
|
4071
|
+
values: z.never().optional(),
|
|
4072
|
+
ranges: z.never().optional(),
|
|
4073
|
+
scalar: z.object({
|
|
4074
|
+
type: z.enum([
|
|
4075
|
+
"UNKNOWN_SCALAR_TYPE",
|
|
4076
|
+
"COUNT_DISTINCT",
|
|
4077
|
+
"MIN",
|
|
4078
|
+
"MAX"
|
|
4079
|
+
]).describe("Type of scalar aggregation.").optional(),
|
|
4080
|
+
value: z.number().describe(
|
|
4081
|
+
"Value of the scalar aggregation."
|
|
4082
|
+
).optional()
|
|
4083
|
+
}).describe(
|
|
4084
|
+
"List of the scalar aggregation results."
|
|
4085
|
+
)
|
|
4086
|
+
})
|
|
4087
|
+
])
|
|
4088
|
+
).optional()
|
|
4089
|
+
})
|
|
4090
|
+
).max(1e3).optional()
|
|
4091
|
+
}).describe("deprecated")
|
|
4092
|
+
}),
|
|
4093
|
+
z.object({
|
|
4094
|
+
values: z.never().optional(),
|
|
4095
|
+
ranges: z.never().optional(),
|
|
4096
|
+
scalar: z.never().optional(),
|
|
4097
|
+
groupedByValue: z.never().optional(),
|
|
4098
|
+
nested: z.never().optional(),
|
|
4099
|
+
dateHistogram: z.object({
|
|
4100
|
+
results: z.array(
|
|
4101
|
+
z.object({
|
|
4102
|
+
value: z.string().describe("Date in ISO 8601 format.").max(100).optional(),
|
|
4103
|
+
count: z.number().int().describe("Count of entities in the interval.").optional()
|
|
4104
|
+
})
|
|
4105
|
+
).max(200).optional()
|
|
4106
|
+
}).describe("Date histogram aggregation results.")
|
|
4107
|
+
}),
|
|
4108
|
+
z.object({
|
|
4109
|
+
values: z.never().optional(),
|
|
4110
|
+
ranges: z.never().optional(),
|
|
4111
|
+
scalar: z.never().optional(),
|
|
4112
|
+
groupedByValue: z.never().optional(),
|
|
4113
|
+
dateHistogram: z.never().optional(),
|
|
4114
|
+
nested: z.object({
|
|
4115
|
+
results: z.array(
|
|
4116
|
+
z.object({
|
|
4117
|
+
results: z.record(
|
|
4118
|
+
z.string(),
|
|
4119
|
+
z.intersection(
|
|
4120
|
+
z.object({}),
|
|
4121
|
+
z.xor([
|
|
4122
|
+
z.object({
|
|
4123
|
+
value: z.never().optional(),
|
|
4124
|
+
range: z.never().optional(),
|
|
4125
|
+
scalar: z.never().optional(),
|
|
4126
|
+
dateHistogram: z.never().optional()
|
|
4127
|
+
}),
|
|
4128
|
+
z.object({
|
|
4129
|
+
range: z.never().optional(),
|
|
4130
|
+
scalar: z.never().optional(),
|
|
4131
|
+
dateHistogram: z.never().optional(),
|
|
4132
|
+
value: z.object({
|
|
4133
|
+
value: z.string().describe("Value of the field.").max(1e3).optional(),
|
|
4134
|
+
count: z.number().int().describe(
|
|
4135
|
+
"Count of entities with this value."
|
|
4136
|
+
).optional().nullable()
|
|
4137
|
+
}).describe("Value aggregation results.")
|
|
4138
|
+
}),
|
|
4139
|
+
z.object({
|
|
4140
|
+
value: z.never().optional(),
|
|
4141
|
+
scalar: z.never().optional(),
|
|
4142
|
+
dateHistogram: z.never().optional(),
|
|
4143
|
+
range: z.object({
|
|
4144
|
+
from: z.number().describe(
|
|
4145
|
+
"Inclusive lower bound of the range."
|
|
4146
|
+
).optional().nullable(),
|
|
4147
|
+
to: z.number().describe(
|
|
4148
|
+
"Exclusive upper bound of the range."
|
|
4149
|
+
).optional().nullable(),
|
|
4150
|
+
count: z.number().int().describe(
|
|
4151
|
+
"Count of entities in the range."
|
|
4152
|
+
).optional().nullable()
|
|
4153
|
+
}).describe("Range aggregation results.")
|
|
4154
|
+
}),
|
|
4155
|
+
z.object({
|
|
4156
|
+
value: z.never().optional(),
|
|
4157
|
+
range: z.never().optional(),
|
|
4158
|
+
dateHistogram: z.never().optional(),
|
|
4159
|
+
scalar: z.object({
|
|
4160
|
+
value: z.number().describe(
|
|
4161
|
+
"Scalar aggregation results."
|
|
4162
|
+
).optional()
|
|
4163
|
+
}).describe("Scalar aggregation results.")
|
|
4164
|
+
}),
|
|
4165
|
+
z.object({
|
|
4166
|
+
value: z.never().optional(),
|
|
4167
|
+
range: z.never().optional(),
|
|
4168
|
+
scalar: z.never().optional(),
|
|
4169
|
+
dateHistogram: z.object({
|
|
4170
|
+
value: z.string().describe("Value of the field.").max(1e3).optional(),
|
|
4171
|
+
count: z.number().int().describe(
|
|
4172
|
+
"Count of entities with this value."
|
|
4173
|
+
).optional().nullable()
|
|
4174
|
+
}).describe(
|
|
4175
|
+
"Date histogram aggregation results."
|
|
4176
|
+
)
|
|
4177
|
+
})
|
|
4178
|
+
])
|
|
4179
|
+
)
|
|
4180
|
+
).describe("List of nested aggregation results.").optional()
|
|
4181
|
+
})
|
|
4182
|
+
).max(1e3).optional()
|
|
4183
|
+
}).describe("Nested aggregation results.")
|
|
4184
|
+
})
|
|
4185
|
+
])
|
|
4186
|
+
)
|
|
4187
|
+
).max(1e3).optional()
|
|
4188
|
+
}).describe("Aggregation data.").optional()
|
|
4189
|
+
});
|
|
4190
|
+
var BulkUpdateExperienceTagsRequest = z.object({
|
|
4191
|
+
experienceIds: z.array(z.string()).min(1).max(100),
|
|
4192
|
+
options: z.object({
|
|
4193
|
+
assignTags: z.object({
|
|
4194
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4195
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
4196
|
+
).optional(),
|
|
4197
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4198
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
4199
|
+
).optional()
|
|
4200
|
+
}).describe("Tags to assign to the experiences.").optional(),
|
|
4201
|
+
unassignTags: z.object({
|
|
4202
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4203
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
4204
|
+
).optional(),
|
|
4205
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4206
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
4207
|
+
).optional()
|
|
4208
|
+
}).describe("Tags to unassign from the experiences.").optional()
|
|
4209
|
+
}).optional()
|
|
4210
|
+
});
|
|
4211
|
+
var BulkUpdateExperienceTagsResponse = z.object({
|
|
4212
|
+
results: z.array(
|
|
4213
|
+
z.object({
|
|
4214
|
+
itemMetadata: z.object({
|
|
4215
|
+
_id: z.string().describe(
|
|
4216
|
+
"Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed."
|
|
4217
|
+
).regex(
|
|
4218
|
+
/^[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}$/,
|
|
4219
|
+
"Must be a valid GUID"
|
|
4220
|
+
).optional().nullable(),
|
|
4221
|
+
originalIndex: z.number().int().describe(
|
|
4222
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
4223
|
+
).min(0).optional(),
|
|
4224
|
+
success: z.boolean().describe(
|
|
4225
|
+
"Whether the requested action for this item was successful. When `false`, the `error` field is returned."
|
|
4226
|
+
).optional(),
|
|
4227
|
+
error: z.object({
|
|
4228
|
+
code: z.string().describe("Error code.").optional(),
|
|
4229
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
4230
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
4231
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
4232
|
+
}).describe(
|
|
4233
|
+
"Metadata about the individual experience tag update operation."
|
|
4234
|
+
).optional()
|
|
4235
|
+
})
|
|
4236
|
+
).min(1).max(100).optional(),
|
|
4237
|
+
bulkActionMetadata: z.object({
|
|
4238
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").min(0).optional(),
|
|
4239
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").min(0).optional(),
|
|
4240
|
+
undetailedFailures: z.number().int().describe(
|
|
4241
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
4242
|
+
).min(0).optional()
|
|
4243
|
+
}).describe("Metadata about the bulk update operation.").optional()
|
|
4244
|
+
});
|
|
4245
|
+
var BulkUpdateExperienceTagsByFilterRequest = z.object({
|
|
4246
|
+
filter: z.record(z.string(), z.any()).describe("Filter criteria to select experiences for tag updates."),
|
|
4247
|
+
options: z.object({
|
|
4248
|
+
assignTags: z.object({
|
|
4249
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4250
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
4251
|
+
).optional(),
|
|
4252
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4253
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
4254
|
+
).optional()
|
|
4255
|
+
}).describe("Tags to assign to the filtered experiences.").optional(),
|
|
4256
|
+
unassignTags: z.object({
|
|
4257
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4258
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
4259
|
+
).optional(),
|
|
4260
|
+
publicTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
4261
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
4262
|
+
).optional()
|
|
4263
|
+
}).describe("Tags to unassign from the filtered experiences.").optional()
|
|
4264
|
+
}).optional()
|
|
4265
|
+
});
|
|
4266
|
+
var BulkUpdateExperienceTagsByFilterResponse = z.object({
|
|
4267
|
+
jobId: z.string().describe("Job ID for tracking the asynchronous bulk update operation.").regex(
|
|
4268
|
+
/^[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}$/,
|
|
4269
|
+
"Must be a valid GUID"
|
|
4270
|
+
).optional()
|
|
4271
|
+
});
|
|
4272
|
+
var BulkArchiveExperiencesRequest = z.object({
|
|
4273
|
+
experienceIds: z.array(z.string()).min(1).max(100)
|
|
4274
|
+
});
|
|
4275
|
+
var BulkArchiveExperiencesResponse = z.object({
|
|
4276
|
+
results: z.array(
|
|
4277
|
+
z.object({
|
|
4278
|
+
itemMetadata: z.object({
|
|
4279
|
+
_id: z.string().describe(
|
|
4280
|
+
"Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed."
|
|
4281
|
+
).regex(
|
|
4282
|
+
/^[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}$/,
|
|
4283
|
+
"Must be a valid GUID"
|
|
4284
|
+
).optional().nullable(),
|
|
4285
|
+
originalIndex: z.number().int().describe(
|
|
4286
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
4287
|
+
).min(0).optional(),
|
|
4288
|
+
success: z.boolean().describe(
|
|
4289
|
+
"Whether the requested action for this item was successful. When `false`, the `error` field is returned."
|
|
4290
|
+
).optional(),
|
|
4291
|
+
error: z.object({
|
|
4292
|
+
code: z.string().describe("Error code.").optional(),
|
|
4293
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
4294
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
4295
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
4296
|
+
}).describe("Metadata about archiving the experience.").optional()
|
|
4297
|
+
})
|
|
4298
|
+
).min(1).max(100).optional(),
|
|
4299
|
+
bulkActionMetadata: z.object({
|
|
4300
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").min(0).optional(),
|
|
4301
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").min(0).optional(),
|
|
4302
|
+
undetailedFailures: z.number().int().describe(
|
|
4303
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
4304
|
+
).min(0).optional()
|
|
4305
|
+
}).describe("Bulk action metadata.").optional()
|
|
4306
|
+
});
|
|
4307
|
+
var BulkUnarchiveExperiencesRequest = z.object({
|
|
4308
|
+
experienceIds: z.array(z.string()).min(1).max(100)
|
|
4309
|
+
});
|
|
4310
|
+
var BulkUnarchiveExperiencesResponse = z.object({
|
|
4311
|
+
results: z.array(
|
|
4312
|
+
z.object({
|
|
4313
|
+
itemMetadata: z.object({
|
|
4314
|
+
_id: z.string().describe(
|
|
4315
|
+
"Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed."
|
|
4316
|
+
).regex(
|
|
4317
|
+
/^[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}$/,
|
|
4318
|
+
"Must be a valid GUID"
|
|
4319
|
+
).optional().nullable(),
|
|
4320
|
+
originalIndex: z.number().int().describe(
|
|
4321
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
4322
|
+
).min(0).optional(),
|
|
4323
|
+
success: z.boolean().describe(
|
|
4324
|
+
"Whether the requested action for this item was successful. When `false`, the `error` field is returned."
|
|
4325
|
+
).optional(),
|
|
4326
|
+
error: z.object({
|
|
4327
|
+
code: z.string().describe("Error code.").optional(),
|
|
4328
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
4329
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
4330
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
4331
|
+
}).describe("Metadata about unarchiving the experience.").optional()
|
|
4332
|
+
})
|
|
4333
|
+
).min(1).max(100).optional(),
|
|
4334
|
+
bulkActionMetadata: z.object({
|
|
4335
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").min(0).optional(),
|
|
4336
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").min(0).optional(),
|
|
4337
|
+
undetailedFailures: z.number().int().describe(
|
|
4338
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
4339
|
+
).min(0).optional()
|
|
4340
|
+
}).describe("Bulk action metadata.").optional()
|
|
4341
|
+
});
|
|
4342
|
+
|
|
4343
|
+
// src/table-reservations-v1-experience-experiences.universal.ts
|
|
1415
4344
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
1416
4345
|
import { createSearchUtils } from "@wix/sdk-runtime/search-builder-utils";
|
|
1417
4346
|
var TableAvailabilityType = /* @__PURE__ */ ((TableAvailabilityType2) => {
|
|
@@ -1492,6 +4421,8 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
|
|
|
1492
4421
|
NodeType2["SHAPE"] = "SHAPE";
|
|
1493
4422
|
NodeType2["CARD"] = "CARD";
|
|
1494
4423
|
NodeType2["TOC"] = "TOC";
|
|
4424
|
+
NodeType2["SMART_BLOCK"] = "SMART_BLOCK";
|
|
4425
|
+
NodeType2["SMART_BLOCK_CELL"] = "SMART_BLOCK_CELL";
|
|
1495
4426
|
return NodeType2;
|
|
1496
4427
|
})(NodeType || {});
|
|
1497
4428
|
var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
|
|
@@ -1819,6 +4750,30 @@ var Indentation = /* @__PURE__ */ ((Indentation2) => {
|
|
|
1819
4750
|
Indentation2["FLAT"] = "FLAT";
|
|
1820
4751
|
return Indentation2;
|
|
1821
4752
|
})(Indentation || {});
|
|
4753
|
+
var SmartBlockDataType = /* @__PURE__ */ ((SmartBlockDataType2) => {
|
|
4754
|
+
SmartBlockDataType2["SOLID_BOXES"] = "SOLID_BOXES";
|
|
4755
|
+
SmartBlockDataType2["NUMBERED_BOXES"] = "NUMBERED_BOXES";
|
|
4756
|
+
SmartBlockDataType2["STATS"] = "STATS";
|
|
4757
|
+
SmartBlockDataType2["CIRCLE_STATS"] = "CIRCLE_STATS";
|
|
4758
|
+
SmartBlockDataType2["SOLID_BOXES_ALTERNATING"] = "SOLID_BOXES_ALTERNATING";
|
|
4759
|
+
SmartBlockDataType2["SOLID_JOINED_BOXES"] = "SOLID_JOINED_BOXES";
|
|
4760
|
+
SmartBlockDataType2["SIDE_LINE_TEXT"] = "SIDE_LINE_TEXT";
|
|
4761
|
+
SmartBlockDataType2["TOP_LINE_TEXT"] = "TOP_LINE_TEXT";
|
|
4762
|
+
SmartBlockDataType2["OUTLINE_BOXES_WITH_TOP_CIRCLE"] = "OUTLINE_BOXES_WITH_TOP_CIRCLE";
|
|
4763
|
+
SmartBlockDataType2["BIG_BULLETS"] = "BIG_BULLETS";
|
|
4764
|
+
SmartBlockDataType2["SMALL_BULLETS"] = "SMALL_BULLETS";
|
|
4765
|
+
SmartBlockDataType2["ARROW_BULLETS"] = "ARROW_BULLETS";
|
|
4766
|
+
SmartBlockDataType2["PROCESS_STEPS"] = "PROCESS_STEPS";
|
|
4767
|
+
SmartBlockDataType2["BAR_STATS"] = "BAR_STATS";
|
|
4768
|
+
return SmartBlockDataType2;
|
|
4769
|
+
})(SmartBlockDataType || {});
|
|
4770
|
+
var ColumnSize = /* @__PURE__ */ ((ColumnSize2) => {
|
|
4771
|
+
ColumnSize2["SMALL"] = "SMALL";
|
|
4772
|
+
ColumnSize2["MEDIUM"] = "MEDIUM";
|
|
4773
|
+
ColumnSize2["LARGE"] = "LARGE";
|
|
4774
|
+
ColumnSize2["EXTRA_LARGE"] = "EXTRA_LARGE";
|
|
4775
|
+
return ColumnSize2;
|
|
4776
|
+
})(ColumnSize || {});
|
|
1822
4777
|
var PaymentPolicyType = /* @__PURE__ */ ((PaymentPolicyType2) => {
|
|
1823
4778
|
PaymentPolicyType2["PER_GUEST"] = "PER_GUEST";
|
|
1824
4779
|
PaymentPolicyType2["FREE"] = "FREE";
|
|
@@ -1914,7 +4869,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
1914
4869
|
return WebhookIdentityType2;
|
|
1915
4870
|
})(WebhookIdentityType || {});
|
|
1916
4871
|
async function createExperience2(experience) {
|
|
1917
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4872
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4873
|
+
if (validateRequestSchema) {
|
|
4874
|
+
CreateExperienceRequest.parse({ experience });
|
|
4875
|
+
}
|
|
1918
4876
|
const payload = transformPaths2(
|
|
1919
4877
|
renameKeysFromSDKRequestToRESTRequest({ experience }, [
|
|
1920
4878
|
"experience.configuration.displayInfo.richContent"
|
|
@@ -1979,7 +4937,10 @@ async function createExperience2(experience) {
|
|
|
1979
4937
|
}
|
|
1980
4938
|
}
|
|
1981
4939
|
async function getExperience2(experienceId) {
|
|
1982
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4940
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4941
|
+
if (validateRequestSchema) {
|
|
4942
|
+
GetExperienceRequest.parse({ experienceId });
|
|
4943
|
+
}
|
|
1983
4944
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
1984
4945
|
{ experienceId },
|
|
1985
4946
|
[]
|
|
@@ -2025,7 +4986,10 @@ async function getExperience2(experienceId) {
|
|
|
2025
4986
|
}
|
|
2026
4987
|
}
|
|
2027
4988
|
async function getExperienceBySlug2(slug) {
|
|
2028
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4989
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4990
|
+
if (validateRequestSchema) {
|
|
4991
|
+
GetExperienceBySlugRequest.parse({ slug });
|
|
4992
|
+
}
|
|
2029
4993
|
const payload = renameKeysFromSDKRequestToRESTRequest({ slug }, []);
|
|
2030
4994
|
const reqOpts = getExperienceBySlug(payload);
|
|
2031
4995
|
sideEffects?.onSiteCall?.();
|
|
@@ -2068,7 +5032,10 @@ async function getExperienceBySlug2(slug) {
|
|
|
2068
5032
|
}
|
|
2069
5033
|
}
|
|
2070
5034
|
async function updateExperience2(_id, experience) {
|
|
2071
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
5035
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
5036
|
+
if (validateRequestSchema) {
|
|
5037
|
+
UpdateExperienceRequest.parse({ _id, experience });
|
|
5038
|
+
}
|
|
2072
5039
|
const payload = transformPaths2(
|
|
2073
5040
|
renameKeysFromSDKRequestToRESTRequest(
|
|
2074
5041
|
{ experience: { ...experience, id: _id } },
|
|
@@ -2197,7 +5164,10 @@ function queryExperiences2() {
|
|
|
2197
5164
|
});
|
|
2198
5165
|
}
|
|
2199
5166
|
async function typedQueryExperiences(query) {
|
|
2200
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
5167
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
5168
|
+
if (validateRequestSchema) {
|
|
5169
|
+
QueryExperiencesRequest.parse({ query });
|
|
5170
|
+
}
|
|
2201
5171
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query }, []);
|
|
2202
5172
|
const reqOpts = queryExperiences(payload);
|
|
2203
5173
|
sideEffects?.onSiteCall?.();
|
|
@@ -2248,7 +5218,10 @@ var utils = {
|
|
|
2248
5218
|
}
|
|
2249
5219
|
};
|
|
2250
5220
|
async function searchExperiences2(search) {
|
|
2251
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
5221
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
5222
|
+
if (validateRequestSchema) {
|
|
5223
|
+
SearchExperiencesRequest.parse({ search });
|
|
5224
|
+
}
|
|
2252
5225
|
const payload = renameKeysFromSDKRequestToRESTRequest({ search }, []);
|
|
2253
5226
|
const reqOpts = searchExperiences(payload);
|
|
2254
5227
|
sideEffects?.onSiteCall?.();
|
|
@@ -2291,7 +5264,10 @@ async function searchExperiences2(search) {
|
|
|
2291
5264
|
}
|
|
2292
5265
|
}
|
|
2293
5266
|
async function bulkUpdateExperienceTags2(experienceIds, options) {
|
|
2294
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
5267
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
5268
|
+
if (validateRequestSchema) {
|
|
5269
|
+
BulkUpdateExperienceTagsRequest.parse({ experienceIds, options });
|
|
5270
|
+
}
|
|
2295
5271
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
2296
5272
|
{
|
|
2297
5273
|
experienceIds,
|
|
@@ -2327,7 +5303,10 @@ async function bulkUpdateExperienceTags2(experienceIds, options) {
|
|
|
2327
5303
|
}
|
|
2328
5304
|
}
|
|
2329
5305
|
async function bulkUpdateExperienceTagsByFilter2(filter, options) {
|
|
2330
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
5306
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
5307
|
+
if (validateRequestSchema) {
|
|
5308
|
+
BulkUpdateExperienceTagsByFilterRequest.parse({ filter, options });
|
|
5309
|
+
}
|
|
2331
5310
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
2332
5311
|
{
|
|
2333
5312
|
filter,
|
|
@@ -2363,7 +5342,10 @@ async function bulkUpdateExperienceTagsByFilter2(filter, options) {
|
|
|
2363
5342
|
}
|
|
2364
5343
|
}
|
|
2365
5344
|
async function bulkArchiveExperiences2(experienceIds) {
|
|
2366
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
5345
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
5346
|
+
if (validateRequestSchema) {
|
|
5347
|
+
BulkArchiveExperiencesRequest.parse({ experienceIds });
|
|
5348
|
+
}
|
|
2367
5349
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
2368
5350
|
{ experienceIds },
|
|
2369
5351
|
[]
|
|
@@ -2389,7 +5371,10 @@ async function bulkArchiveExperiences2(experienceIds) {
|
|
|
2389
5371
|
}
|
|
2390
5372
|
}
|
|
2391
5373
|
async function bulkUnarchiveExperiences2(experienceIds) {
|
|
2392
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
5374
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
5375
|
+
if (validateRequestSchema) {
|
|
5376
|
+
BulkUnarchiveExperiencesRequest.parse({ experienceIds });
|
|
5377
|
+
}
|
|
2393
5378
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
2394
5379
|
{ experienceIds },
|
|
2395
5380
|
[]
|
|
@@ -2425,6 +5410,7 @@ export {
|
|
|
2425
5410
|
BackgroundType,
|
|
2426
5411
|
ButtonDataType,
|
|
2427
5412
|
CardDataBackgroundType,
|
|
5413
|
+
ColumnSize,
|
|
2428
5414
|
Crop,
|
|
2429
5415
|
DayOfWeek,
|
|
2430
5416
|
DecorationType,
|
|
@@ -2468,6 +5454,7 @@ export {
|
|
|
2468
5454
|
ScalarType,
|
|
2469
5455
|
Scaling,
|
|
2470
5456
|
SearchDetailsMode,
|
|
5457
|
+
SmartBlockDataType,
|
|
2471
5458
|
SortDirection,
|
|
2472
5459
|
SortOrder,
|
|
2473
5460
|
SortType,
|