@wix/auto_sdk_restaurants_operations 1.0.89 → 1.0.90

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.
@@ -1105,3585 +1105,6 @@ function bulkUpdateOperationTagsByFilter(payload) {
1105
1105
  import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
1106
1106
  import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
1107
1107
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
1108
-
1109
- // src/restaurants-operations-v1-operation-operations.schemas.ts
1110
- import * as z from "zod";
1111
- var ListBlockedPeriodsRequest = z.object({
1112
- operationId: z.string().describe(
1113
- "ID of the restaurant operation this blocked period is associated with. (See the Restaurants Operations API for more information.)"
1114
- ).regex(
1115
- /^[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}$/,
1116
- "Must be a valid GUID"
1117
- ),
1118
- options: z.object({
1119
- from: z.date().describe(
1120
- "Start time of the desired window. If not specified, the current time is used."
1121
- ).optional().nullable(),
1122
- until: z.date().describe("End time of the desired window.")
1123
- })
1124
- });
1125
- var ListBlockedPeriodsResponse = z.object({
1126
- blockPeriods: z.array(
1127
- z.object({
1128
- from: z.date().describe("The start time at which the restaurant can accept orders").optional().nullable(),
1129
- until: z.date().describe("The end time at which the restaurant can accept orders").optional().nullable()
1130
- })
1131
- ).max(1e3).optional()
1132
- });
1133
- var CreateOperationRequest = z.object({
1134
- operation: z.intersection(
1135
- z.object({
1136
- _id: z.string().describe("Operation ID.").regex(
1137
- /^[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}$/,
1138
- "Must be a valid GUID"
1139
- ).optional().nullable(),
1140
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1141
- "Revision number. Increments by 1 each time the operation is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating an operation."
1142
- ).optional().nullable(),
1143
- _createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
1144
- _updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
1145
- name: z.string().describe("Operation name.").optional().nullable(),
1146
- default: z.boolean().describe(
1147
- "Whether the operation is the default operation. <br />\nDefault: `false`."
1148
- ).optional().nullable(),
1149
- fulfillmentIds: z.array(z.string()).max(500).optional(),
1150
- onlineOrderingStatus: z.enum([
1151
- "UNDEFINED_ONLINE_ORDERING_STATUS",
1152
- "ENABLED",
1153
- "DISABLED",
1154
- "PAUSED_UNTIL"
1155
- ]).optional(),
1156
- defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).optional(),
1157
- orderScheduling: z.intersection(
1158
- z.object({ type: z.enum(["ASAP", "PREORDER"]).optional() }),
1159
- z.xor([
1160
- z.object({
1161
- asapOptions: z.never().optional(),
1162
- preorderOptions: z.never().optional()
1163
- }),
1164
- z.object({
1165
- preorderOptions: z.never().optional(),
1166
- asapOptions: z.intersection(
1167
- z.object({
1168
- preparationTime: z.intersection(
1169
- z.object({
1170
- type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
1171
- }),
1172
- z.xor([
1173
- z.object({
1174
- maxTimeOptions: z.never().optional(),
1175
- timeRangeOptions: z.never().optional()
1176
- }),
1177
- z.object({
1178
- timeRangeOptions: z.never().optional(),
1179
- maxTimeOptions: z.object({
1180
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1181
- duration: z.number().int().describe(
1182
- "Duration value. Unit of time specified in `timeUnit`."
1183
- ).min(0).optional().nullable()
1184
- }).describe(
1185
- "Options for preparation time. Required when `type` is `MAX_TIME`."
1186
- )
1187
- }),
1188
- z.object({
1189
- maxTimeOptions: z.never().optional(),
1190
- timeRangeOptions: z.object({
1191
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
1192
- minDuration: z.number().int().describe(
1193
- "Minimum duration value. Unit of time specified in `timeUnit`."
1194
- ).min(1).optional().nullable(),
1195
- maxDuration: z.number().int().describe(
1196
- "Maximum duration value. Unit of time specified in `timeUnit`."
1197
- ).min(1).optional().nullable()
1198
- }).describe(
1199
- "Options for preparation time. Required when `type` is `TIME_RANGE`."
1200
- )
1201
- })
1202
- ])
1203
- ).describe(
1204
- "Amount of time needed to prepare the order. <br />\n- When `MAX_TIME`, `maxTimeOptions` is a required field.\n- When `MAX_RANGE`, `timeRangeOptions` is a required field."
1205
- ).optional(),
1206
- asapFutureHandlingType: z.enum([
1207
- "NO_FUTURE_HANDLING",
1208
- "BUSINESS_DAYS_AHEAD_HANDLING"
1209
- ]).describe(
1210
- "Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
1211
- ).optional()
1212
- }),
1213
- z.xor([
1214
- z.object({
1215
- businessDaysAheadHandlingOptions: z.never().optional()
1216
- }),
1217
- z.object({
1218
- businessDaysAheadHandlingOptions: z.object({
1219
- daysCount: z.number().int().describe(
1220
- "Number of business days ahead for which orders can be scheduled. <br />\nSetting the `daysCount` to 0 means that orders can be scheduled until the end of the current business day."
1221
- ).min(0).optional().nullable()
1222
- }).describe(
1223
- "Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
1224
- )
1225
- })
1226
- ])
1227
- ).describe(
1228
- "Options for scheduling. Required if `type` is `ASAP`."
1229
- )
1230
- }),
1231
- z.object({
1232
- asapOptions: z.never().optional(),
1233
- preorderOptions: z.object({
1234
- method: z.intersection(
1235
- z.object({
1236
- type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
1237
- "Type of time frame for how long in advance preorders can be made. <br />\n- When `TIME_BOUNDED`, `timeBoundedOptions` is a required field.\n- When `WEEKLY_SCHEDULE`, `weeklyScheduleOptions` is a required field."
1238
- ).optional()
1239
- }),
1240
- z.xor([
1241
- z.object({
1242
- timeBoundedOptions: z.never().optional(),
1243
- weeklyScheduleOptions: z.never().optional()
1244
- }),
1245
- z.object({
1246
- weeklyScheduleOptions: z.never().optional(),
1247
- timeBoundedOptions: z.object({
1248
- minTimeInAdvance: z.object({
1249
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
1250
- "Unit of time for the duration."
1251
- ).optional(),
1252
- duration: z.number().int().describe(
1253
- "Duration value. Unit of time specified in `timeUnit`."
1254
- ).min(0).optional().nullable()
1255
- }).describe(
1256
- "Minimum time required to schedule the order."
1257
- ).optional(),
1258
- maxTimeInAdvance: z.object({
1259
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
1260
- "Unit of time for the duration."
1261
- ).optional(),
1262
- duration: z.number().int().describe(
1263
- "Duration value. Unit of time specified in `timeUnit`."
1264
- ).min(0).optional().nullable()
1265
- }).describe(
1266
- "Maximum time allowed to schedule the order."
1267
- ).optional()
1268
- }).describe(
1269
- "Options for the method. Required when `type` is `TIME_BOUNDED`."
1270
- )
1271
- }),
1272
- z.object({
1273
- timeBoundedOptions: z.never().optional(),
1274
- weeklyScheduleOptions: z.object({
1275
- cutOffTime: z.object({
1276
- dayOfWeek: z.enum([
1277
- "MON",
1278
- "TUE",
1279
- "WED",
1280
- "THU",
1281
- "FRI",
1282
- "SAT",
1283
- "SUN"
1284
- ]).describe("Day of the week.").optional(),
1285
- timeOfDay: z.object({
1286
- hours: z.number().int().describe(
1287
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
1288
- ).optional(),
1289
- minutes: z.number().int().describe(
1290
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
1291
- ).optional()
1292
- }).describe("Time of the day.").optional()
1293
- }).describe(
1294
- "The weekly schedule cutoff time. <br />\nOrders placed before the cutoff time are scheduled for the current week. <br />\nOrders placed after the cutoff time are scheduled for the next week."
1295
- ).optional()
1296
- }).describe(
1297
- "Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
1298
- )
1299
- })
1300
- ])
1301
- ).optional(),
1302
- fulfillmentTimesDisplay: z.intersection(
1303
- z.object({
1304
- type: z.enum(["TIME_WINDOWS"]).describe(
1305
- "Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
1306
- ).optional()
1307
- }),
1308
- z.xor([
1309
- z.object({
1310
- timeWindowsOptions: z.never().optional()
1311
- }),
1312
- z.object({
1313
- timeWindowsOptions: z.object({
1314
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1315
- duration: z.number().int().describe(
1316
- "Duration value. Unit of time specified in `timeUnit`."
1317
- ).min(0).optional().nullable()
1318
- }).describe(
1319
- "Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
1320
- )
1321
- })
1322
- ])
1323
- ).describe(
1324
- "Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
1325
- ).optional()
1326
- }).describe(
1327
- "Options for scheduling. Required if `type` is `PREORDER`."
1328
- )
1329
- })
1330
- ])
1331
- ).describe("Information about when an order can be placed for.").optional(),
1332
- operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
1333
- /^[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}$/,
1334
- "Must be a valid GUID"
1335
- ).optional().nullable(),
1336
- businessLocationId: z.string().describe(
1337
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of this operation."
1338
- ).regex(
1339
- /^[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}$/,
1340
- "Must be a valid GUID"
1341
- ).optional().nullable(),
1342
- extendedFields: z.object({
1343
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1344
- "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)."
1345
- ).optional()
1346
- }).describe("Extended fields.").optional(),
1347
- tags: z.object({
1348
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1349
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
1350
- ).optional(),
1351
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1352
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
1353
- ).optional()
1354
- }).describe(
1355
- "Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of operations."
1356
- ).optional()
1357
- }),
1358
- z.xor([
1359
- z.object({ pausedUntilOptions: z.never().optional() }),
1360
- z.object({
1361
- pausedUntilOptions: z.object({
1362
- time: z.date().describe(
1363
- "Date and time until which online ordering is paused. <br />\n\nBefore the specified time, behavior is the same as when `onlineOrderingStatus` is `DISABLED`. <br />\n\nAfter the specified time, behavior is the same as when `onlineOrderingStatus` is `ENABLED`. <br />\n\nPassing the time does not trigger any changes to value of any properties."
1364
- ).optional().nullable()
1365
- }).describe(
1366
- "Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
1367
- )
1368
- })
1369
- ])
1370
- ).describe("Operation to create.")
1371
- });
1372
- var CreateOperationResponse = z.intersection(
1373
- z.object({
1374
- _id: z.string().describe("Operation ID.").regex(
1375
- /^[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}$/,
1376
- "Must be a valid GUID"
1377
- ).optional().nullable(),
1378
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1379
- "Revision number. Increments by 1 each time the operation is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating an operation."
1380
- ).optional().nullable(),
1381
- _createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
1382
- _updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
1383
- name: z.string().describe("Operation name.").optional().nullable(),
1384
- default: z.boolean().describe(
1385
- "Whether the operation is the default operation. <br />\nDefault: `false`."
1386
- ).optional().nullable(),
1387
- fulfillmentIds: z.array(z.string()).max(500).optional(),
1388
- onlineOrderingStatus: z.enum([
1389
- "UNDEFINED_ONLINE_ORDERING_STATUS",
1390
- "ENABLED",
1391
- "DISABLED",
1392
- "PAUSED_UNTIL"
1393
- ]).describe("Online ordering status of the operation. <br />").optional(),
1394
- defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
1395
- orderScheduling: z.intersection(
1396
- z.object({
1397
- type: z.enum(["ASAP", "PREORDER"]).describe(
1398
- "Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
1399
- ).optional()
1400
- }),
1401
- z.xor([
1402
- z.object({
1403
- asapOptions: z.never().optional(),
1404
- preorderOptions: z.never().optional()
1405
- }),
1406
- z.object({
1407
- preorderOptions: z.never().optional(),
1408
- asapOptions: z.intersection(
1409
- z.object({
1410
- preparationTime: z.intersection(
1411
- z.object({
1412
- type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
1413
- }),
1414
- z.xor([
1415
- z.object({
1416
- maxTimeOptions: z.never().optional(),
1417
- timeRangeOptions: z.never().optional()
1418
- }),
1419
- z.object({
1420
- timeRangeOptions: z.never().optional(),
1421
- maxTimeOptions: z.object({
1422
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1423
- duration: z.number().int().describe(
1424
- "Duration value. Unit of time specified in `timeUnit`."
1425
- ).min(0).optional().nullable()
1426
- }).describe(
1427
- "Options for preparation time. Required when `type` is `MAX_TIME`."
1428
- )
1429
- }),
1430
- z.object({
1431
- maxTimeOptions: z.never().optional(),
1432
- timeRangeOptions: z.object({
1433
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
1434
- minDuration: z.number().int().describe(
1435
- "Minimum duration value. Unit of time specified in `timeUnit`."
1436
- ).min(1).optional().nullable(),
1437
- maxDuration: z.number().int().describe(
1438
- "Maximum duration value. Unit of time specified in `timeUnit`."
1439
- ).min(1).optional().nullable()
1440
- }).describe(
1441
- "Options for preparation time. Required when `type` is `TIME_RANGE`."
1442
- )
1443
- })
1444
- ])
1445
- ).describe(
1446
- "Amount of time needed to prepare the order. <br />\n- When `MAX_TIME`, `maxTimeOptions` is a required field.\n- When `MAX_RANGE`, `timeRangeOptions` is a required field."
1447
- ).optional(),
1448
- asapFutureHandlingType: z.enum([
1449
- "NO_FUTURE_HANDLING",
1450
- "BUSINESS_DAYS_AHEAD_HANDLING"
1451
- ]).describe(
1452
- "Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
1453
- ).optional()
1454
- }),
1455
- z.xor([
1456
- z.object({
1457
- businessDaysAheadHandlingOptions: z.never().optional()
1458
- }),
1459
- z.object({
1460
- businessDaysAheadHandlingOptions: z.object({
1461
- daysCount: z.number().int().describe(
1462
- "Number of business days ahead for which orders can be scheduled. <br />\nSetting the `daysCount` to 0 means that orders can be scheduled until the end of the current business day."
1463
- ).min(0).optional().nullable()
1464
- }).describe(
1465
- "Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
1466
- )
1467
- })
1468
- ])
1469
- ).describe(
1470
- "Options for scheduling. Required if `type` is `ASAP`."
1471
- )
1472
- }),
1473
- z.object({
1474
- asapOptions: z.never().optional(),
1475
- preorderOptions: z.object({
1476
- method: z.intersection(
1477
- z.object({
1478
- type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
1479
- "Type of time frame for how long in advance preorders can be made. <br />\n- When `TIME_BOUNDED`, `timeBoundedOptions` is a required field.\n- When `WEEKLY_SCHEDULE`, `weeklyScheduleOptions` is a required field."
1480
- ).optional()
1481
- }),
1482
- z.xor([
1483
- z.object({
1484
- timeBoundedOptions: z.never().optional(),
1485
- weeklyScheduleOptions: z.never().optional()
1486
- }),
1487
- z.object({
1488
- weeklyScheduleOptions: z.never().optional(),
1489
- timeBoundedOptions: z.object({
1490
- minTimeInAdvance: z.object({
1491
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1492
- duration: z.number().int().describe(
1493
- "Duration value. Unit of time specified in `timeUnit`."
1494
- ).min(0).optional().nullable()
1495
- }).describe(
1496
- "Minimum time required to schedule the order."
1497
- ).optional(),
1498
- maxTimeInAdvance: z.object({
1499
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1500
- duration: z.number().int().describe(
1501
- "Duration value. Unit of time specified in `timeUnit`."
1502
- ).min(0).optional().nullable()
1503
- }).describe(
1504
- "Maximum time allowed to schedule the order."
1505
- ).optional()
1506
- }).describe(
1507
- "Options for the method. Required when `type` is `TIME_BOUNDED`."
1508
- )
1509
- }),
1510
- z.object({
1511
- timeBoundedOptions: z.never().optional(),
1512
- weeklyScheduleOptions: z.object({
1513
- cutOffTime: z.object({
1514
- dayOfWeek: z.enum([
1515
- "MON",
1516
- "TUE",
1517
- "WED",
1518
- "THU",
1519
- "FRI",
1520
- "SAT",
1521
- "SUN"
1522
- ]).describe("Day of the week.").optional(),
1523
- timeOfDay: z.object({
1524
- hours: z.number().int().describe(
1525
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
1526
- ).optional(),
1527
- minutes: z.number().int().describe(
1528
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
1529
- ).optional()
1530
- }).describe("Time of the day.").optional()
1531
- }).describe(
1532
- "The weekly schedule cutoff time. <br />\nOrders placed before the cutoff time are scheduled for the current week. <br />\nOrders placed after the cutoff time are scheduled for the next week."
1533
- ).optional()
1534
- }).describe(
1535
- "Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
1536
- )
1537
- })
1538
- ])
1539
- ).optional(),
1540
- fulfillmentTimesDisplay: z.intersection(
1541
- z.object({
1542
- type: z.enum(["TIME_WINDOWS"]).describe(
1543
- "Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
1544
- ).optional()
1545
- }),
1546
- z.xor([
1547
- z.object({ timeWindowsOptions: z.never().optional() }),
1548
- z.object({
1549
- timeWindowsOptions: z.object({
1550
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1551
- duration: z.number().int().describe(
1552
- "Duration value. Unit of time specified in `timeUnit`."
1553
- ).min(0).optional().nullable()
1554
- }).describe(
1555
- "Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
1556
- )
1557
- })
1558
- ])
1559
- ).describe(
1560
- "Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
1561
- ).optional()
1562
- }).describe(
1563
- "Options for scheduling. Required if `type` is `PREORDER`."
1564
- )
1565
- })
1566
- ])
1567
- ).describe("Information about when an order can be placed for.").optional(),
1568
- operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
1569
- /^[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}$/,
1570
- "Must be a valid GUID"
1571
- ).optional().nullable(),
1572
- businessLocationId: z.string().describe(
1573
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of this operation."
1574
- ).regex(
1575
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1576
- "Must be a valid GUID"
1577
- ).optional().nullable(),
1578
- extendedFields: z.object({
1579
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1580
- "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)."
1581
- ).optional()
1582
- }).describe("Extended fields.").optional(),
1583
- tags: z.object({
1584
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1585
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
1586
- ).optional(),
1587
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1588
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
1589
- ).optional()
1590
- }).describe(
1591
- "Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of operations."
1592
- ).optional()
1593
- }),
1594
- z.xor([
1595
- z.object({ pausedUntilOptions: z.never().optional() }),
1596
- z.object({
1597
- pausedUntilOptions: z.object({
1598
- time: z.date().describe(
1599
- "Date and time until which online ordering is paused. <br />\n\nBefore the specified time, behavior is the same as when `onlineOrderingStatus` is `DISABLED`. <br />\n\nAfter the specified time, behavior is the same as when `onlineOrderingStatus` is `ENABLED`. <br />\n\nPassing the time does not trigger any changes to value of any properties."
1600
- ).optional().nullable()
1601
- }).describe(
1602
- "Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
1603
- )
1604
- })
1605
- ])
1606
- );
1607
- var GetOperationRequest = z.object({
1608
- operationId: z.string().describe("ID of the operation to retrieve.").regex(
1609
- /^[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}$/,
1610
- "Must be a valid GUID"
1611
- )
1612
- });
1613
- var GetOperationResponse = z.intersection(
1614
- z.object({
1615
- _id: z.string().describe("Operation ID.").regex(
1616
- /^[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}$/,
1617
- "Must be a valid GUID"
1618
- ).optional().nullable(),
1619
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1620
- "Revision number. Increments by 1 each time the operation is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating an operation."
1621
- ).optional().nullable(),
1622
- _createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
1623
- _updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
1624
- name: z.string().describe("Operation name.").optional().nullable(),
1625
- default: z.boolean().describe(
1626
- "Whether the operation is the default operation. <br />\nDefault: `false`."
1627
- ).optional().nullable(),
1628
- fulfillmentIds: z.array(z.string()).max(500).optional(),
1629
- onlineOrderingStatus: z.enum([
1630
- "UNDEFINED_ONLINE_ORDERING_STATUS",
1631
- "ENABLED",
1632
- "DISABLED",
1633
- "PAUSED_UNTIL"
1634
- ]).describe("Online ordering status of the operation. <br />").optional(),
1635
- defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
1636
- orderScheduling: z.intersection(
1637
- z.object({
1638
- type: z.enum(["ASAP", "PREORDER"]).describe(
1639
- "Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
1640
- ).optional()
1641
- }),
1642
- z.xor([
1643
- z.object({
1644
- asapOptions: z.never().optional(),
1645
- preorderOptions: z.never().optional()
1646
- }),
1647
- z.object({
1648
- preorderOptions: z.never().optional(),
1649
- asapOptions: z.intersection(
1650
- z.object({
1651
- preparationTime: z.intersection(
1652
- z.object({
1653
- type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
1654
- }),
1655
- z.xor([
1656
- z.object({
1657
- maxTimeOptions: z.never().optional(),
1658
- timeRangeOptions: z.never().optional()
1659
- }),
1660
- z.object({
1661
- timeRangeOptions: z.never().optional(),
1662
- maxTimeOptions: z.object({
1663
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1664
- duration: z.number().int().describe(
1665
- "Duration value. Unit of time specified in `timeUnit`."
1666
- ).min(0).optional().nullable()
1667
- }).describe(
1668
- "Options for preparation time. Required when `type` is `MAX_TIME`."
1669
- )
1670
- }),
1671
- z.object({
1672
- maxTimeOptions: z.never().optional(),
1673
- timeRangeOptions: z.object({
1674
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
1675
- minDuration: z.number().int().describe(
1676
- "Minimum duration value. Unit of time specified in `timeUnit`."
1677
- ).min(1).optional().nullable(),
1678
- maxDuration: z.number().int().describe(
1679
- "Maximum duration value. Unit of time specified in `timeUnit`."
1680
- ).min(1).optional().nullable()
1681
- }).describe(
1682
- "Options for preparation time. Required when `type` is `TIME_RANGE`."
1683
- )
1684
- })
1685
- ])
1686
- ).describe(
1687
- "Amount of time needed to prepare the order. <br />\n- When `MAX_TIME`, `maxTimeOptions` is a required field.\n- When `MAX_RANGE`, `timeRangeOptions` is a required field."
1688
- ).optional(),
1689
- asapFutureHandlingType: z.enum([
1690
- "NO_FUTURE_HANDLING",
1691
- "BUSINESS_DAYS_AHEAD_HANDLING"
1692
- ]).describe(
1693
- "Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
1694
- ).optional()
1695
- }),
1696
- z.xor([
1697
- z.object({
1698
- businessDaysAheadHandlingOptions: z.never().optional()
1699
- }),
1700
- z.object({
1701
- businessDaysAheadHandlingOptions: z.object({
1702
- daysCount: z.number().int().describe(
1703
- "Number of business days ahead for which orders can be scheduled. <br />\nSetting the `daysCount` to 0 means that orders can be scheduled until the end of the current business day."
1704
- ).min(0).optional().nullable()
1705
- }).describe(
1706
- "Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
1707
- )
1708
- })
1709
- ])
1710
- ).describe(
1711
- "Options for scheduling. Required if `type` is `ASAP`."
1712
- )
1713
- }),
1714
- z.object({
1715
- asapOptions: z.never().optional(),
1716
- preorderOptions: z.object({
1717
- method: z.intersection(
1718
- z.object({
1719
- type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
1720
- "Type of time frame for how long in advance preorders can be made. <br />\n- When `TIME_BOUNDED`, `timeBoundedOptions` is a required field.\n- When `WEEKLY_SCHEDULE`, `weeklyScheduleOptions` is a required field."
1721
- ).optional()
1722
- }),
1723
- z.xor([
1724
- z.object({
1725
- timeBoundedOptions: z.never().optional(),
1726
- weeklyScheduleOptions: z.never().optional()
1727
- }),
1728
- z.object({
1729
- weeklyScheduleOptions: z.never().optional(),
1730
- timeBoundedOptions: z.object({
1731
- minTimeInAdvance: z.object({
1732
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1733
- duration: z.number().int().describe(
1734
- "Duration value. Unit of time specified in `timeUnit`."
1735
- ).min(0).optional().nullable()
1736
- }).describe(
1737
- "Minimum time required to schedule the order."
1738
- ).optional(),
1739
- maxTimeInAdvance: z.object({
1740
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1741
- duration: z.number().int().describe(
1742
- "Duration value. Unit of time specified in `timeUnit`."
1743
- ).min(0).optional().nullable()
1744
- }).describe(
1745
- "Maximum time allowed to schedule the order."
1746
- ).optional()
1747
- }).describe(
1748
- "Options for the method. Required when `type` is `TIME_BOUNDED`."
1749
- )
1750
- }),
1751
- z.object({
1752
- timeBoundedOptions: z.never().optional(),
1753
- weeklyScheduleOptions: z.object({
1754
- cutOffTime: z.object({
1755
- dayOfWeek: z.enum([
1756
- "MON",
1757
- "TUE",
1758
- "WED",
1759
- "THU",
1760
- "FRI",
1761
- "SAT",
1762
- "SUN"
1763
- ]).describe("Day of the week.").optional(),
1764
- timeOfDay: z.object({
1765
- hours: z.number().int().describe(
1766
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
1767
- ).optional(),
1768
- minutes: z.number().int().describe(
1769
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
1770
- ).optional()
1771
- }).describe("Time of the day.").optional()
1772
- }).describe(
1773
- "The weekly schedule cutoff time. <br />\nOrders placed before the cutoff time are scheduled for the current week. <br />\nOrders placed after the cutoff time are scheduled for the next week."
1774
- ).optional()
1775
- }).describe(
1776
- "Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
1777
- )
1778
- })
1779
- ])
1780
- ).optional(),
1781
- fulfillmentTimesDisplay: z.intersection(
1782
- z.object({
1783
- type: z.enum(["TIME_WINDOWS"]).describe(
1784
- "Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
1785
- ).optional()
1786
- }),
1787
- z.xor([
1788
- z.object({ timeWindowsOptions: z.never().optional() }),
1789
- z.object({
1790
- timeWindowsOptions: z.object({
1791
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1792
- duration: z.number().int().describe(
1793
- "Duration value. Unit of time specified in `timeUnit`."
1794
- ).min(0).optional().nullable()
1795
- }).describe(
1796
- "Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
1797
- )
1798
- })
1799
- ])
1800
- ).describe(
1801
- "Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
1802
- ).optional()
1803
- }).describe(
1804
- "Options for scheduling. Required if `type` is `PREORDER`."
1805
- )
1806
- })
1807
- ])
1808
- ).describe("Information about when an order can be placed for.").optional(),
1809
- operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
1810
- /^[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}$/,
1811
- "Must be a valid GUID"
1812
- ).optional().nullable(),
1813
- businessLocationId: z.string().describe(
1814
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of this operation."
1815
- ).regex(
1816
- /^[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}$/,
1817
- "Must be a valid GUID"
1818
- ).optional().nullable(),
1819
- extendedFields: z.object({
1820
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1821
- "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)."
1822
- ).optional()
1823
- }).describe("Extended fields.").optional(),
1824
- tags: z.object({
1825
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1826
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
1827
- ).optional(),
1828
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
1829
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
1830
- ).optional()
1831
- }).describe(
1832
- "Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of operations."
1833
- ).optional()
1834
- }),
1835
- z.xor([
1836
- z.object({ pausedUntilOptions: z.never().optional() }),
1837
- z.object({
1838
- pausedUntilOptions: z.object({
1839
- time: z.date().describe(
1840
- "Date and time until which online ordering is paused. <br />\n\nBefore the specified time, behavior is the same as when `onlineOrderingStatus` is `DISABLED`. <br />\n\nAfter the specified time, behavior is the same as when `onlineOrderingStatus` is `ENABLED`. <br />\n\nPassing the time does not trigger any changes to value of any properties."
1841
- ).optional().nullable()
1842
- }).describe(
1843
- "Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
1844
- )
1845
- })
1846
- ])
1847
- );
1848
- var UpdateOperationRequest = z.object({
1849
- _id: z.string().describe("Operation ID.").regex(
1850
- /^[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}$/,
1851
- "Must be a valid GUID"
1852
- ),
1853
- operation: z.intersection(
1854
- z.object({
1855
- _id: z.string().describe("Operation ID.").regex(
1856
- /^[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}$/,
1857
- "Must be a valid GUID"
1858
- ).optional().nullable(),
1859
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1860
- "Revision number. Increments by 1 each time the operation is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating an operation."
1861
- ),
1862
- _createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
1863
- _updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
1864
- name: z.string().describe("Operation name.").optional().nullable(),
1865
- default: z.boolean().describe(
1866
- "Whether the operation is the default operation. <br />\nDefault: `false`."
1867
- ).optional().nullable(),
1868
- fulfillmentIds: z.array(z.string()).max(500).optional(),
1869
- onlineOrderingStatus: z.enum([
1870
- "UNDEFINED_ONLINE_ORDERING_STATUS",
1871
- "ENABLED",
1872
- "DISABLED",
1873
- "PAUSED_UNTIL"
1874
- ]).optional(),
1875
- defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).optional(),
1876
- orderScheduling: z.intersection(
1877
- z.object({ type: z.enum(["ASAP", "PREORDER"]).optional() }),
1878
- z.xor([
1879
- z.object({
1880
- asapOptions: z.never().optional(),
1881
- preorderOptions: z.never().optional()
1882
- }),
1883
- z.object({
1884
- preorderOptions: z.never().optional(),
1885
- asapOptions: z.intersection(
1886
- z.object({
1887
- preparationTime: z.intersection(
1888
- z.object({
1889
- type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
1890
- }),
1891
- z.xor([
1892
- z.object({
1893
- maxTimeOptions: z.never().optional(),
1894
- timeRangeOptions: z.never().optional()
1895
- }),
1896
- z.object({
1897
- timeRangeOptions: z.never().optional(),
1898
- maxTimeOptions: z.object({
1899
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
1900
- duration: z.number().int().describe(
1901
- "Duration value. Unit of time specified in `timeUnit`."
1902
- ).min(0).optional().nullable()
1903
- }).describe(
1904
- "Options for preparation time. Required when `type` is `MAX_TIME`."
1905
- )
1906
- }),
1907
- z.object({
1908
- maxTimeOptions: z.never().optional(),
1909
- timeRangeOptions: z.object({
1910
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
1911
- minDuration: z.number().int().describe(
1912
- "Minimum duration value. Unit of time specified in `timeUnit`."
1913
- ).min(1).optional().nullable(),
1914
- maxDuration: z.number().int().describe(
1915
- "Maximum duration value. Unit of time specified in `timeUnit`."
1916
- ).min(1).optional().nullable()
1917
- }).describe(
1918
- "Options for preparation time. Required when `type` is `TIME_RANGE`."
1919
- )
1920
- })
1921
- ])
1922
- ).describe(
1923
- "Amount of time needed to prepare the order. <br />\n- When `MAX_TIME`, `maxTimeOptions` is a required field.\n- When `MAX_RANGE`, `timeRangeOptions` is a required field."
1924
- ).optional(),
1925
- asapFutureHandlingType: z.enum([
1926
- "NO_FUTURE_HANDLING",
1927
- "BUSINESS_DAYS_AHEAD_HANDLING"
1928
- ]).describe(
1929
- "Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
1930
- ).optional()
1931
- }),
1932
- z.xor([
1933
- z.object({
1934
- businessDaysAheadHandlingOptions: z.never().optional()
1935
- }),
1936
- z.object({
1937
- businessDaysAheadHandlingOptions: z.object({
1938
- daysCount: z.number().int().describe(
1939
- "Number of business days ahead for which orders can be scheduled. <br />\nSetting the `daysCount` to 0 means that orders can be scheduled until the end of the current business day."
1940
- ).min(0).optional().nullable()
1941
- }).describe(
1942
- "Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
1943
- )
1944
- })
1945
- ])
1946
- ).describe(
1947
- "Options for scheduling. Required if `type` is `ASAP`."
1948
- )
1949
- }),
1950
- z.object({
1951
- asapOptions: z.never().optional(),
1952
- preorderOptions: z.object({
1953
- method: z.intersection(
1954
- z.object({
1955
- type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
1956
- "Type of time frame for how long in advance preorders can be made. <br />\n- When `TIME_BOUNDED`, `timeBoundedOptions` is a required field.\n- When `WEEKLY_SCHEDULE`, `weeklyScheduleOptions` is a required field."
1957
- ).optional()
1958
- }),
1959
- z.xor([
1960
- z.object({
1961
- timeBoundedOptions: z.never().optional(),
1962
- weeklyScheduleOptions: z.never().optional()
1963
- }),
1964
- z.object({
1965
- weeklyScheduleOptions: z.never().optional(),
1966
- timeBoundedOptions: z.object({
1967
- minTimeInAdvance: z.object({
1968
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
1969
- "Unit of time for the duration."
1970
- ).optional(),
1971
- duration: z.number().int().describe(
1972
- "Duration value. Unit of time specified in `timeUnit`."
1973
- ).min(0).optional().nullable()
1974
- }).describe(
1975
- "Minimum time required to schedule the order."
1976
- ).optional(),
1977
- maxTimeInAdvance: z.object({
1978
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
1979
- "Unit of time for the duration."
1980
- ).optional(),
1981
- duration: z.number().int().describe(
1982
- "Duration value. Unit of time specified in `timeUnit`."
1983
- ).min(0).optional().nullable()
1984
- }).describe(
1985
- "Maximum time allowed to schedule the order."
1986
- ).optional()
1987
- }).describe(
1988
- "Options for the method. Required when `type` is `TIME_BOUNDED`."
1989
- )
1990
- }),
1991
- z.object({
1992
- timeBoundedOptions: z.never().optional(),
1993
- weeklyScheduleOptions: z.object({
1994
- cutOffTime: z.object({
1995
- dayOfWeek: z.enum([
1996
- "MON",
1997
- "TUE",
1998
- "WED",
1999
- "THU",
2000
- "FRI",
2001
- "SAT",
2002
- "SUN"
2003
- ]).describe("Day of the week.").optional(),
2004
- timeOfDay: z.object({
2005
- hours: z.number().int().describe(
2006
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
2007
- ).optional(),
2008
- minutes: z.number().int().describe(
2009
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
2010
- ).optional()
2011
- }).describe("Time of the day.").optional()
2012
- }).describe(
2013
- "The weekly schedule cutoff time. <br />\nOrders placed before the cutoff time are scheduled for the current week. <br />\nOrders placed after the cutoff time are scheduled for the next week."
2014
- ).optional()
2015
- }).describe(
2016
- "Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
2017
- )
2018
- })
2019
- ])
2020
- ).optional(),
2021
- fulfillmentTimesDisplay: z.intersection(
2022
- z.object({
2023
- type: z.enum(["TIME_WINDOWS"]).describe(
2024
- "Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
2025
- ).optional()
2026
- }),
2027
- z.xor([
2028
- z.object({
2029
- timeWindowsOptions: z.never().optional()
2030
- }),
2031
- z.object({
2032
- timeWindowsOptions: z.object({
2033
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
2034
- duration: z.number().int().describe(
2035
- "Duration value. Unit of time specified in `timeUnit`."
2036
- ).min(0).optional().nullable()
2037
- }).describe(
2038
- "Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
2039
- )
2040
- })
2041
- ])
2042
- ).describe(
2043
- "Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
2044
- ).optional()
2045
- }).describe(
2046
- "Options for scheduling. Required if `type` is `PREORDER`."
2047
- )
2048
- })
2049
- ])
2050
- ).describe("Information about when an order can be placed for.").optional(),
2051
- operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
2052
- /^[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}$/,
2053
- "Must be a valid GUID"
2054
- ).optional().nullable(),
2055
- businessLocationId: z.string().describe(
2056
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of this operation."
2057
- ).regex(
2058
- /^[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}$/,
2059
- "Must be a valid GUID"
2060
- ).optional().nullable(),
2061
- extendedFields: z.object({
2062
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2063
- "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)."
2064
- ).optional()
2065
- }).describe("Extended fields.").optional(),
2066
- tags: z.object({
2067
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2068
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2069
- ).optional(),
2070
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2071
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2072
- ).optional()
2073
- }).describe(
2074
- "Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of operations."
2075
- ).optional()
2076
- }),
2077
- z.xor([
2078
- z.object({ pausedUntilOptions: z.never().optional() }),
2079
- z.object({
2080
- pausedUntilOptions: z.object({
2081
- time: z.date().describe(
2082
- "Date and time until which online ordering is paused. <br />\n\nBefore the specified time, behavior is the same as when `onlineOrderingStatus` is `DISABLED`. <br />\n\nAfter the specified time, behavior is the same as when `onlineOrderingStatus` is `ENABLED`. <br />\n\nPassing the time does not trigger any changes to value of any properties."
2083
- ).optional().nullable()
2084
- }).describe(
2085
- "Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
2086
- )
2087
- })
2088
- ])
2089
- ).describe("Operation to update.")
2090
- });
2091
- var UpdateOperationResponse = z.intersection(
2092
- z.object({
2093
- _id: z.string().describe("Operation ID.").regex(
2094
- /^[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}$/,
2095
- "Must be a valid GUID"
2096
- ).optional().nullable(),
2097
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2098
- "Revision number. Increments by 1 each time the operation is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating an operation."
2099
- ).optional().nullable(),
2100
- _createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
2101
- _updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
2102
- name: z.string().describe("Operation name.").optional().nullable(),
2103
- default: z.boolean().describe(
2104
- "Whether the operation is the default operation. <br />\nDefault: `false`."
2105
- ).optional().nullable(),
2106
- fulfillmentIds: z.array(z.string()).max(500).optional(),
2107
- onlineOrderingStatus: z.enum([
2108
- "UNDEFINED_ONLINE_ORDERING_STATUS",
2109
- "ENABLED",
2110
- "DISABLED",
2111
- "PAUSED_UNTIL"
2112
- ]).describe("Online ordering status of the operation. <br />").optional(),
2113
- defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
2114
- orderScheduling: z.intersection(
2115
- z.object({
2116
- type: z.enum(["ASAP", "PREORDER"]).describe(
2117
- "Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
2118
- ).optional()
2119
- }),
2120
- z.xor([
2121
- z.object({
2122
- asapOptions: z.never().optional(),
2123
- preorderOptions: z.never().optional()
2124
- }),
2125
- z.object({
2126
- preorderOptions: z.never().optional(),
2127
- asapOptions: z.intersection(
2128
- z.object({
2129
- preparationTime: z.intersection(
2130
- z.object({
2131
- type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
2132
- }),
2133
- z.xor([
2134
- z.object({
2135
- maxTimeOptions: z.never().optional(),
2136
- timeRangeOptions: z.never().optional()
2137
- }),
2138
- z.object({
2139
- timeRangeOptions: z.never().optional(),
2140
- maxTimeOptions: z.object({
2141
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
2142
- duration: z.number().int().describe(
2143
- "Duration value. Unit of time specified in `timeUnit`."
2144
- ).min(0).optional().nullable()
2145
- }).describe(
2146
- "Options for preparation time. Required when `type` is `MAX_TIME`."
2147
- )
2148
- }),
2149
- z.object({
2150
- maxTimeOptions: z.never().optional(),
2151
- timeRangeOptions: z.object({
2152
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
2153
- minDuration: z.number().int().describe(
2154
- "Minimum duration value. Unit of time specified in `timeUnit`."
2155
- ).min(1).optional().nullable(),
2156
- maxDuration: z.number().int().describe(
2157
- "Maximum duration value. Unit of time specified in `timeUnit`."
2158
- ).min(1).optional().nullable()
2159
- }).describe(
2160
- "Options for preparation time. Required when `type` is `TIME_RANGE`."
2161
- )
2162
- })
2163
- ])
2164
- ).describe(
2165
- "Amount of time needed to prepare the order. <br />\n- When `MAX_TIME`, `maxTimeOptions` is a required field.\n- When `MAX_RANGE`, `timeRangeOptions` is a required field."
2166
- ).optional(),
2167
- asapFutureHandlingType: z.enum([
2168
- "NO_FUTURE_HANDLING",
2169
- "BUSINESS_DAYS_AHEAD_HANDLING"
2170
- ]).describe(
2171
- "Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
2172
- ).optional()
2173
- }),
2174
- z.xor([
2175
- z.object({
2176
- businessDaysAheadHandlingOptions: z.never().optional()
2177
- }),
2178
- z.object({
2179
- businessDaysAheadHandlingOptions: z.object({
2180
- daysCount: z.number().int().describe(
2181
- "Number of business days ahead for which orders can be scheduled. <br />\nSetting the `daysCount` to 0 means that orders can be scheduled until the end of the current business day."
2182
- ).min(0).optional().nullable()
2183
- }).describe(
2184
- "Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
2185
- )
2186
- })
2187
- ])
2188
- ).describe(
2189
- "Options for scheduling. Required if `type` is `ASAP`."
2190
- )
2191
- }),
2192
- z.object({
2193
- asapOptions: z.never().optional(),
2194
- preorderOptions: z.object({
2195
- method: z.intersection(
2196
- z.object({
2197
- type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
2198
- "Type of time frame for how long in advance preorders can be made. <br />\n- When `TIME_BOUNDED`, `timeBoundedOptions` is a required field.\n- When `WEEKLY_SCHEDULE`, `weeklyScheduleOptions` is a required field."
2199
- ).optional()
2200
- }),
2201
- z.xor([
2202
- z.object({
2203
- timeBoundedOptions: z.never().optional(),
2204
- weeklyScheduleOptions: z.never().optional()
2205
- }),
2206
- z.object({
2207
- weeklyScheduleOptions: z.never().optional(),
2208
- timeBoundedOptions: z.object({
2209
- minTimeInAdvance: z.object({
2210
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
2211
- duration: z.number().int().describe(
2212
- "Duration value. Unit of time specified in `timeUnit`."
2213
- ).min(0).optional().nullable()
2214
- }).describe(
2215
- "Minimum time required to schedule the order."
2216
- ).optional(),
2217
- maxTimeInAdvance: z.object({
2218
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
2219
- duration: z.number().int().describe(
2220
- "Duration value. Unit of time specified in `timeUnit`."
2221
- ).min(0).optional().nullable()
2222
- }).describe(
2223
- "Maximum time allowed to schedule the order."
2224
- ).optional()
2225
- }).describe(
2226
- "Options for the method. Required when `type` is `TIME_BOUNDED`."
2227
- )
2228
- }),
2229
- z.object({
2230
- timeBoundedOptions: z.never().optional(),
2231
- weeklyScheduleOptions: z.object({
2232
- cutOffTime: z.object({
2233
- dayOfWeek: z.enum([
2234
- "MON",
2235
- "TUE",
2236
- "WED",
2237
- "THU",
2238
- "FRI",
2239
- "SAT",
2240
- "SUN"
2241
- ]).describe("Day of the week.").optional(),
2242
- timeOfDay: z.object({
2243
- hours: z.number().int().describe(
2244
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
2245
- ).optional(),
2246
- minutes: z.number().int().describe(
2247
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
2248
- ).optional()
2249
- }).describe("Time of the day.").optional()
2250
- }).describe(
2251
- "The weekly schedule cutoff time. <br />\nOrders placed before the cutoff time are scheduled for the current week. <br />\nOrders placed after the cutoff time are scheduled for the next week."
2252
- ).optional()
2253
- }).describe(
2254
- "Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
2255
- )
2256
- })
2257
- ])
2258
- ).optional(),
2259
- fulfillmentTimesDisplay: z.intersection(
2260
- z.object({
2261
- type: z.enum(["TIME_WINDOWS"]).describe(
2262
- "Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
2263
- ).optional()
2264
- }),
2265
- z.xor([
2266
- z.object({ timeWindowsOptions: z.never().optional() }),
2267
- z.object({
2268
- timeWindowsOptions: z.object({
2269
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
2270
- duration: z.number().int().describe(
2271
- "Duration value. Unit of time specified in `timeUnit`."
2272
- ).min(0).optional().nullable()
2273
- }).describe(
2274
- "Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
2275
- )
2276
- })
2277
- ])
2278
- ).describe(
2279
- "Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
2280
- ).optional()
2281
- }).describe(
2282
- "Options for scheduling. Required if `type` is `PREORDER`."
2283
- )
2284
- })
2285
- ])
2286
- ).describe("Information about when an order can be placed for.").optional(),
2287
- operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
2288
- /^[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}$/,
2289
- "Must be a valid GUID"
2290
- ).optional().nullable(),
2291
- businessLocationId: z.string().describe(
2292
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of this operation."
2293
- ).regex(
2294
- /^[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}$/,
2295
- "Must be a valid GUID"
2296
- ).optional().nullable(),
2297
- extendedFields: z.object({
2298
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2299
- "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)."
2300
- ).optional()
2301
- }).describe("Extended fields.").optional(),
2302
- tags: z.object({
2303
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2304
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2305
- ).optional(),
2306
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2307
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2308
- ).optional()
2309
- }).describe(
2310
- "Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of operations."
2311
- ).optional()
2312
- }),
2313
- z.xor([
2314
- z.object({ pausedUntilOptions: z.never().optional() }),
2315
- z.object({
2316
- pausedUntilOptions: z.object({
2317
- time: z.date().describe(
2318
- "Date and time until which online ordering is paused. <br />\n\nBefore the specified time, behavior is the same as when `onlineOrderingStatus` is `DISABLED`. <br />\n\nAfter the specified time, behavior is the same as when `onlineOrderingStatus` is `ENABLED`. <br />\n\nPassing the time does not trigger any changes to value of any properties."
2319
- ).optional().nullable()
2320
- }).describe(
2321
- "Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
2322
- )
2323
- })
2324
- ])
2325
- );
2326
- var DeleteOperationRequest = z.object({
2327
- operationId: z.string().describe("ID of the operation to delete.").regex(
2328
- /^[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}$/,
2329
- "Must be a valid GUID"
2330
- )
2331
- });
2332
- var DeleteOperationResponse = z.object({});
2333
- var QueryOperationRequest = z.object({
2334
- query: z.object({
2335
- filter: z.object({
2336
- _id: z.object({
2337
- $eq: z.string(),
2338
- $exists: z.boolean(),
2339
- $gt: z.string(),
2340
- $gte: z.string(),
2341
- $hasAll: z.array(z.string()),
2342
- $hasSome: z.array(z.string()),
2343
- $in: z.array(z.string()),
2344
- $lt: z.string(),
2345
- $lte: z.string(),
2346
- $ne: z.string(),
2347
- $nin: z.array(z.string()),
2348
- $startsWith: z.string()
2349
- }).partial().strict().optional(),
2350
- _createdDate: z.object({
2351
- $eq: z.string(),
2352
- $exists: z.boolean(),
2353
- $gt: z.string(),
2354
- $gte: z.string(),
2355
- $hasAll: z.array(z.string()),
2356
- $hasSome: z.array(z.string()),
2357
- $in: z.array(z.string()),
2358
- $lt: z.string(),
2359
- $lte: z.string(),
2360
- $ne: z.string(),
2361
- $nin: z.array(z.string()),
2362
- $startsWith: z.string()
2363
- }).partial().strict().optional(),
2364
- _updatedDate: z.object({
2365
- $eq: z.string(),
2366
- $exists: z.boolean(),
2367
- $gt: z.string(),
2368
- $gte: z.string(),
2369
- $hasAll: z.array(z.string()),
2370
- $hasSome: z.array(z.string()),
2371
- $in: z.array(z.string()),
2372
- $lt: z.string(),
2373
- $lte: z.string(),
2374
- $ne: z.string(),
2375
- $nin: z.array(z.string()),
2376
- $startsWith: z.string()
2377
- }).partial().strict().optional(),
2378
- name: z.object({
2379
- $eq: z.string(),
2380
- $exists: z.boolean(),
2381
- $gt: z.string(),
2382
- $gte: z.string(),
2383
- $hasAll: z.array(z.string()),
2384
- $hasSome: z.array(z.string()),
2385
- $in: z.array(z.string()),
2386
- $lt: z.string(),
2387
- $lte: z.string(),
2388
- $ne: z.string(),
2389
- $nin: z.array(z.string()),
2390
- $startsWith: z.string()
2391
- }).partial().strict().optional(),
2392
- default: z.object({
2393
- $eq: z.boolean(),
2394
- $exists: z.boolean(),
2395
- $gt: z.boolean(),
2396
- $gte: z.boolean(),
2397
- $hasAll: z.array(z.boolean()),
2398
- $hasSome: z.array(z.boolean()),
2399
- $in: z.array(z.boolean()),
2400
- $lt: z.boolean(),
2401
- $lte: z.boolean(),
2402
- $ne: z.boolean(),
2403
- $nin: z.array(z.boolean()),
2404
- $startsWith: z.string()
2405
- }).partial().strict().optional(),
2406
- fulfillmentIds: z.object({
2407
- $eq: z.string(),
2408
- $exists: z.boolean(),
2409
- $gt: z.string(),
2410
- $gte: z.string(),
2411
- $hasAll: z.array(z.string()),
2412
- $hasSome: z.array(z.string()),
2413
- $in: z.array(z.string()),
2414
- $lt: z.string(),
2415
- $lte: z.string(),
2416
- $ne: z.string(),
2417
- $nin: z.array(z.string()),
2418
- $startsWith: z.string()
2419
- }).partial().strict().optional(),
2420
- defaultFulfillmentType: z.object({
2421
- $eq: z.string(),
2422
- $exists: z.boolean(),
2423
- $gt: z.string(),
2424
- $gte: z.string(),
2425
- $hasAll: z.array(z.string()),
2426
- $hasSome: z.array(z.string()),
2427
- $in: z.array(z.string()),
2428
- $lt: z.string(),
2429
- $lte: z.string(),
2430
- $ne: z.string(),
2431
- $nin: z.array(z.string()),
2432
- $startsWith: z.string()
2433
- }).partial().strict().optional(),
2434
- onlineOrderingStatus: z.object({
2435
- $eq: z.string(),
2436
- $exists: z.boolean(),
2437
- $gt: z.string(),
2438
- $gte: z.string(),
2439
- $hasAll: z.array(z.string()),
2440
- $hasSome: z.array(z.string()),
2441
- $in: z.array(z.string()),
2442
- $lt: z.string(),
2443
- $lte: z.string(),
2444
- $ne: z.string(),
2445
- $nin: z.array(z.string()),
2446
- $startsWith: z.string()
2447
- }).partial().strict().optional(),
2448
- "businessLocationDetails.archived": z.object({
2449
- $eq: z.any(),
2450
- $exists: z.boolean(),
2451
- $gt: z.any(),
2452
- $gte: z.any(),
2453
- $hasAll: z.array(z.any()),
2454
- $hasSome: z.array(z.any()),
2455
- $in: z.array(z.any()),
2456
- $lt: z.any(),
2457
- $lte: z.any(),
2458
- $ne: z.any(),
2459
- $nin: z.array(z.any()),
2460
- $startsWith: z.string()
2461
- }).partial().strict().optional(),
2462
- businessLocationId: z.object({
2463
- $eq: z.string(),
2464
- $exists: z.boolean(),
2465
- $gt: z.string(),
2466
- $gte: z.string(),
2467
- $hasAll: z.array(z.string()),
2468
- $hasSome: z.array(z.string()),
2469
- $in: z.array(z.string()),
2470
- $lt: z.string(),
2471
- $lte: z.string(),
2472
- $ne: z.string(),
2473
- $nin: z.array(z.string()),
2474
- $startsWith: z.string()
2475
- }).partial().strict().optional(),
2476
- $and: z.array(z.any()).optional(),
2477
- $or: z.array(z.any()).optional(),
2478
- $not: z.any().optional()
2479
- }).strict().optional(),
2480
- sort: z.array(
2481
- z.object({
2482
- fieldName: z.enum([
2483
- "_id",
2484
- "_createdDate",
2485
- "_updatedDate",
2486
- "name",
2487
- "default",
2488
- "fulfillmentIds",
2489
- "defaultFulfillmentType",
2490
- "onlineOrderingStatus",
2491
- "businessLocationDetails.archived",
2492
- "businessLocationId"
2493
- ]).optional(),
2494
- order: z.enum(["ASC", "DESC"]).optional()
2495
- })
2496
- ).optional()
2497
- }).catchall(z.any()).describe("Query options.")
2498
- });
2499
- var QueryOperationResponse = z.object({
2500
- operations: z.array(
2501
- z.intersection(
2502
- z.object({
2503
- _id: z.string().describe("Operation ID.").regex(
2504
- /^[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}$/,
2505
- "Must be a valid GUID"
2506
- ).optional().nullable(),
2507
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2508
- "Revision number. Increments by 1 each time the operation is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating an operation."
2509
- ).optional().nullable(),
2510
- _createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
2511
- _updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
2512
- name: z.string().describe("Operation name.").optional().nullable(),
2513
- default: z.boolean().describe(
2514
- "Whether the operation is the default operation. <br />\nDefault: `false`."
2515
- ).optional().nullable(),
2516
- fulfillmentIds: z.array(z.string()).max(500).optional(),
2517
- onlineOrderingStatus: z.enum([
2518
- "UNDEFINED_ONLINE_ORDERING_STATUS",
2519
- "ENABLED",
2520
- "DISABLED",
2521
- "PAUSED_UNTIL"
2522
- ]).describe("Online ordering status of the operation. <br />").optional(),
2523
- defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
2524
- orderScheduling: z.intersection(
2525
- z.object({
2526
- type: z.enum(["ASAP", "PREORDER"]).describe(
2527
- "Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
2528
- ).optional()
2529
- }),
2530
- z.xor([
2531
- z.object({
2532
- asapOptions: z.never().optional(),
2533
- preorderOptions: z.never().optional()
2534
- }),
2535
- z.object({
2536
- preorderOptions: z.never().optional(),
2537
- asapOptions: z.intersection(
2538
- z.object({
2539
- preparationTime: z.intersection(
2540
- z.object({
2541
- type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
2542
- }),
2543
- z.xor([
2544
- z.object({
2545
- maxTimeOptions: z.never().optional(),
2546
- timeRangeOptions: z.never().optional()
2547
- }),
2548
- z.object({
2549
- timeRangeOptions: z.never().optional(),
2550
- maxTimeOptions: z.object({
2551
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
2552
- "Unit of time for the duration."
2553
- ).optional(),
2554
- duration: z.number().int().describe(
2555
- "Duration value. Unit of time specified in `timeUnit`."
2556
- ).min(0).optional().nullable()
2557
- }).describe(
2558
- "Options for preparation time. Required when `type` is `MAX_TIME`."
2559
- )
2560
- }),
2561
- z.object({
2562
- maxTimeOptions: z.never().optional(),
2563
- timeRangeOptions: z.object({
2564
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
2565
- minDuration: z.number().int().describe(
2566
- "Minimum duration value. Unit of time specified in `timeUnit`."
2567
- ).min(1).optional().nullable(),
2568
- maxDuration: z.number().int().describe(
2569
- "Maximum duration value. Unit of time specified in `timeUnit`."
2570
- ).min(1).optional().nullable()
2571
- }).describe(
2572
- "Options for preparation time. Required when `type` is `TIME_RANGE`."
2573
- )
2574
- })
2575
- ])
2576
- ).describe(
2577
- "Amount of time needed to prepare the order. <br />\n- When `MAX_TIME`, `maxTimeOptions` is a required field.\n- When `MAX_RANGE`, `timeRangeOptions` is a required field."
2578
- ).optional(),
2579
- asapFutureHandlingType: z.enum([
2580
- "NO_FUTURE_HANDLING",
2581
- "BUSINESS_DAYS_AHEAD_HANDLING"
2582
- ]).describe(
2583
- "Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
2584
- ).optional()
2585
- }),
2586
- z.xor([
2587
- z.object({
2588
- businessDaysAheadHandlingOptions: z.never().optional()
2589
- }),
2590
- z.object({
2591
- businessDaysAheadHandlingOptions: z.object({
2592
- daysCount: z.number().int().describe(
2593
- "Number of business days ahead for which orders can be scheduled. <br />\nSetting the `daysCount` to 0 means that orders can be scheduled until the end of the current business day."
2594
- ).min(0).optional().nullable()
2595
- }).describe(
2596
- "Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
2597
- )
2598
- })
2599
- ])
2600
- ).describe(
2601
- "Options for scheduling. Required if `type` is `ASAP`."
2602
- )
2603
- }),
2604
- z.object({
2605
- asapOptions: z.never().optional(),
2606
- preorderOptions: z.object({
2607
- method: z.intersection(
2608
- z.object({
2609
- type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
2610
- "Type of time frame for how long in advance preorders can be made. <br />\n- When `TIME_BOUNDED`, `timeBoundedOptions` is a required field.\n- When `WEEKLY_SCHEDULE`, `weeklyScheduleOptions` is a required field."
2611
- ).optional()
2612
- }),
2613
- z.xor([
2614
- z.object({
2615
- timeBoundedOptions: z.never().optional(),
2616
- weeklyScheduleOptions: z.never().optional()
2617
- }),
2618
- z.object({
2619
- weeklyScheduleOptions: z.never().optional(),
2620
- timeBoundedOptions: z.object({
2621
- minTimeInAdvance: z.object({
2622
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
2623
- "Unit of time for the duration."
2624
- ).optional(),
2625
- duration: z.number().int().describe(
2626
- "Duration value. Unit of time specified in `timeUnit`."
2627
- ).min(0).optional().nullable()
2628
- }).describe(
2629
- "Minimum time required to schedule the order."
2630
- ).optional(),
2631
- maxTimeInAdvance: z.object({
2632
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
2633
- "Unit of time for the duration."
2634
- ).optional(),
2635
- duration: z.number().int().describe(
2636
- "Duration value. Unit of time specified in `timeUnit`."
2637
- ).min(0).optional().nullable()
2638
- }).describe(
2639
- "Maximum time allowed to schedule the order."
2640
- ).optional()
2641
- }).describe(
2642
- "Options for the method. Required when `type` is `TIME_BOUNDED`."
2643
- )
2644
- }),
2645
- z.object({
2646
- timeBoundedOptions: z.never().optional(),
2647
- weeklyScheduleOptions: z.object({
2648
- cutOffTime: z.object({
2649
- dayOfWeek: z.enum([
2650
- "MON",
2651
- "TUE",
2652
- "WED",
2653
- "THU",
2654
- "FRI",
2655
- "SAT",
2656
- "SUN"
2657
- ]).describe("Day of the week.").optional(),
2658
- timeOfDay: z.object({
2659
- hours: z.number().int().describe(
2660
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
2661
- ).optional(),
2662
- minutes: z.number().int().describe(
2663
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
2664
- ).optional()
2665
- }).describe("Time of the day.").optional()
2666
- }).describe(
2667
- "The weekly schedule cutoff time. <br />\nOrders placed before the cutoff time are scheduled for the current week. <br />\nOrders placed after the cutoff time are scheduled for the next week."
2668
- ).optional()
2669
- }).describe(
2670
- "Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
2671
- )
2672
- })
2673
- ])
2674
- ).optional(),
2675
- fulfillmentTimesDisplay: z.intersection(
2676
- z.object({
2677
- type: z.enum(["TIME_WINDOWS"]).describe(
2678
- "Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
2679
- ).optional()
2680
- }),
2681
- z.xor([
2682
- z.object({
2683
- timeWindowsOptions: z.never().optional()
2684
- }),
2685
- z.object({
2686
- timeWindowsOptions: z.object({
2687
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
2688
- duration: z.number().int().describe(
2689
- "Duration value. Unit of time specified in `timeUnit`."
2690
- ).min(0).optional().nullable()
2691
- }).describe(
2692
- "Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
2693
- )
2694
- })
2695
- ])
2696
- ).describe(
2697
- "Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
2698
- ).optional()
2699
- }).describe(
2700
- "Options for scheduling. Required if `type` is `PREORDER`."
2701
- )
2702
- })
2703
- ])
2704
- ).describe("Information about when an order can be placed for.").optional(),
2705
- operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
2706
- /^[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}$/,
2707
- "Must be a valid GUID"
2708
- ).optional().nullable(),
2709
- businessLocationId: z.string().describe(
2710
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of this operation."
2711
- ).regex(
2712
- /^[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}$/,
2713
- "Must be a valid GUID"
2714
- ).optional().nullable(),
2715
- extendedFields: z.object({
2716
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2717
- "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)."
2718
- ).optional()
2719
- }).describe("Extended fields.").optional(),
2720
- tags: z.object({
2721
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2722
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2723
- ).optional(),
2724
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2725
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2726
- ).optional()
2727
- }).describe(
2728
- "Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of operations."
2729
- ).optional()
2730
- }),
2731
- z.xor([
2732
- z.object({ pausedUntilOptions: z.never().optional() }),
2733
- z.object({
2734
- pausedUntilOptions: z.object({
2735
- time: z.date().describe(
2736
- "Date and time until which online ordering is paused. <br />\n\nBefore the specified time, behavior is the same as when `onlineOrderingStatus` is `DISABLED`. <br />\n\nAfter the specified time, behavior is the same as when `onlineOrderingStatus` is `ENABLED`. <br />\n\nPassing the time does not trigger any changes to value of any properties."
2737
- ).optional().nullable()
2738
- }).describe(
2739
- "Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
2740
- )
2741
- })
2742
- ])
2743
- )
2744
- ).optional(),
2745
- pagingMetadata: z.object({
2746
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
2747
- cursors: z.object({
2748
- next: z.string().describe(
2749
- "Cursor string pointing to the next page in the list of results."
2750
- ).max(16e3).optional().nullable(),
2751
- prev: z.string().describe(
2752
- "Cursor pointing to the previous page in the list of results."
2753
- ).max(16e3).optional().nullable()
2754
- }).describe(
2755
- "Cursor strings that point to the next page, previous page, or both."
2756
- ).optional(),
2757
- hasNext: z.boolean().describe(
2758
- "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."
2759
- ).optional().nullable()
2760
- }).describe("Metadata of the paginated results.").optional()
2761
- });
2762
- var ListOperationsRequest = z.object({});
2763
- var ListOperationsResponse = z.object({
2764
- operations: z.array(
2765
- z.intersection(
2766
- z.object({
2767
- _id: z.string().describe("Operation ID.").regex(
2768
- /^[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}$/,
2769
- "Must be a valid GUID"
2770
- ).optional().nullable(),
2771
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2772
- "Revision number. Increments by 1 each time the operation is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating an operation."
2773
- ).optional().nullable(),
2774
- _createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
2775
- _updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
2776
- name: z.string().describe("Operation name.").optional().nullable(),
2777
- default: z.boolean().describe(
2778
- "Whether the operation is the default operation. <br />\nDefault: `false`."
2779
- ).optional().nullable(),
2780
- fulfillmentIds: z.array(z.string()).max(500).optional(),
2781
- onlineOrderingStatus: z.enum([
2782
- "UNDEFINED_ONLINE_ORDERING_STATUS",
2783
- "ENABLED",
2784
- "DISABLED",
2785
- "PAUSED_UNTIL"
2786
- ]).describe("Online ordering status of the operation. <br />").optional(),
2787
- defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
2788
- orderScheduling: z.intersection(
2789
- z.object({
2790
- type: z.enum(["ASAP", "PREORDER"]).describe(
2791
- "Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
2792
- ).optional()
2793
- }),
2794
- z.xor([
2795
- z.object({
2796
- asapOptions: z.never().optional(),
2797
- preorderOptions: z.never().optional()
2798
- }),
2799
- z.object({
2800
- preorderOptions: z.never().optional(),
2801
- asapOptions: z.intersection(
2802
- z.object({
2803
- preparationTime: z.intersection(
2804
- z.object({
2805
- type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
2806
- }),
2807
- z.xor([
2808
- z.object({
2809
- maxTimeOptions: z.never().optional(),
2810
- timeRangeOptions: z.never().optional()
2811
- }),
2812
- z.object({
2813
- timeRangeOptions: z.never().optional(),
2814
- maxTimeOptions: z.object({
2815
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
2816
- "Unit of time for the duration."
2817
- ).optional(),
2818
- duration: z.number().int().describe(
2819
- "Duration value. Unit of time specified in `timeUnit`."
2820
- ).min(0).optional().nullable()
2821
- }).describe(
2822
- "Options for preparation time. Required when `type` is `MAX_TIME`."
2823
- )
2824
- }),
2825
- z.object({
2826
- maxTimeOptions: z.never().optional(),
2827
- timeRangeOptions: z.object({
2828
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
2829
- minDuration: z.number().int().describe(
2830
- "Minimum duration value. Unit of time specified in `timeUnit`."
2831
- ).min(1).optional().nullable(),
2832
- maxDuration: z.number().int().describe(
2833
- "Maximum duration value. Unit of time specified in `timeUnit`."
2834
- ).min(1).optional().nullable()
2835
- }).describe(
2836
- "Options for preparation time. Required when `type` is `TIME_RANGE`."
2837
- )
2838
- })
2839
- ])
2840
- ).describe(
2841
- "Amount of time needed to prepare the order. <br />\n- When `MAX_TIME`, `maxTimeOptions` is a required field.\n- When `MAX_RANGE`, `timeRangeOptions` is a required field."
2842
- ).optional(),
2843
- asapFutureHandlingType: z.enum([
2844
- "NO_FUTURE_HANDLING",
2845
- "BUSINESS_DAYS_AHEAD_HANDLING"
2846
- ]).describe(
2847
- "Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
2848
- ).optional()
2849
- }),
2850
- z.xor([
2851
- z.object({
2852
- businessDaysAheadHandlingOptions: z.never().optional()
2853
- }),
2854
- z.object({
2855
- businessDaysAheadHandlingOptions: z.object({
2856
- daysCount: z.number().int().describe(
2857
- "Number of business days ahead for which orders can be scheduled. <br />\nSetting the `daysCount` to 0 means that orders can be scheduled until the end of the current business day."
2858
- ).min(0).optional().nullable()
2859
- }).describe(
2860
- "Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
2861
- )
2862
- })
2863
- ])
2864
- ).describe(
2865
- "Options for scheduling. Required if `type` is `ASAP`."
2866
- )
2867
- }),
2868
- z.object({
2869
- asapOptions: z.never().optional(),
2870
- preorderOptions: z.object({
2871
- method: z.intersection(
2872
- z.object({
2873
- type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
2874
- "Type of time frame for how long in advance preorders can be made. <br />\n- When `TIME_BOUNDED`, `timeBoundedOptions` is a required field.\n- When `WEEKLY_SCHEDULE`, `weeklyScheduleOptions` is a required field."
2875
- ).optional()
2876
- }),
2877
- z.xor([
2878
- z.object({
2879
- timeBoundedOptions: z.never().optional(),
2880
- weeklyScheduleOptions: z.never().optional()
2881
- }),
2882
- z.object({
2883
- weeklyScheduleOptions: z.never().optional(),
2884
- timeBoundedOptions: z.object({
2885
- minTimeInAdvance: z.object({
2886
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
2887
- "Unit of time for the duration."
2888
- ).optional(),
2889
- duration: z.number().int().describe(
2890
- "Duration value. Unit of time specified in `timeUnit`."
2891
- ).min(0).optional().nullable()
2892
- }).describe(
2893
- "Minimum time required to schedule the order."
2894
- ).optional(),
2895
- maxTimeInAdvance: z.object({
2896
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
2897
- "Unit of time for the duration."
2898
- ).optional(),
2899
- duration: z.number().int().describe(
2900
- "Duration value. Unit of time specified in `timeUnit`."
2901
- ).min(0).optional().nullable()
2902
- }).describe(
2903
- "Maximum time allowed to schedule the order."
2904
- ).optional()
2905
- }).describe(
2906
- "Options for the method. Required when `type` is `TIME_BOUNDED`."
2907
- )
2908
- }),
2909
- z.object({
2910
- timeBoundedOptions: z.never().optional(),
2911
- weeklyScheduleOptions: z.object({
2912
- cutOffTime: z.object({
2913
- dayOfWeek: z.enum([
2914
- "MON",
2915
- "TUE",
2916
- "WED",
2917
- "THU",
2918
- "FRI",
2919
- "SAT",
2920
- "SUN"
2921
- ]).describe("Day of the week.").optional(),
2922
- timeOfDay: z.object({
2923
- hours: z.number().int().describe(
2924
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
2925
- ).optional(),
2926
- minutes: z.number().int().describe(
2927
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
2928
- ).optional()
2929
- }).describe("Time of the day.").optional()
2930
- }).describe(
2931
- "The weekly schedule cutoff time. <br />\nOrders placed before the cutoff time are scheduled for the current week. <br />\nOrders placed after the cutoff time are scheduled for the next week."
2932
- ).optional()
2933
- }).describe(
2934
- "Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
2935
- )
2936
- })
2937
- ])
2938
- ).optional(),
2939
- fulfillmentTimesDisplay: z.intersection(
2940
- z.object({
2941
- type: z.enum(["TIME_WINDOWS"]).describe(
2942
- "Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
2943
- ).optional()
2944
- }),
2945
- z.xor([
2946
- z.object({
2947
- timeWindowsOptions: z.never().optional()
2948
- }),
2949
- z.object({
2950
- timeWindowsOptions: z.object({
2951
- timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
2952
- duration: z.number().int().describe(
2953
- "Duration value. Unit of time specified in `timeUnit`."
2954
- ).min(0).optional().nullable()
2955
- }).describe(
2956
- "Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
2957
- )
2958
- })
2959
- ])
2960
- ).describe(
2961
- "Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
2962
- ).optional()
2963
- }).describe(
2964
- "Options for scheduling. Required if `type` is `PREORDER`."
2965
- )
2966
- })
2967
- ])
2968
- ).describe("Information about when an order can be placed for.").optional(),
2969
- operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
2970
- /^[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}$/,
2971
- "Must be a valid GUID"
2972
- ).optional().nullable(),
2973
- businessLocationId: z.string().describe(
2974
- "ID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of this operation."
2975
- ).regex(
2976
- /^[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}$/,
2977
- "Must be a valid GUID"
2978
- ).optional().nullable(),
2979
- extendedFields: z.object({
2980
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
2981
- "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)."
2982
- ).optional()
2983
- }).describe("Extended fields.").optional(),
2984
- tags: z.object({
2985
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2986
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
2987
- ).optional(),
2988
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
2989
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
2990
- ).optional()
2991
- }).describe(
2992
- "Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of operations."
2993
- ).optional()
2994
- }),
2995
- z.xor([
2996
- z.object({ pausedUntilOptions: z.never().optional() }),
2997
- z.object({
2998
- pausedUntilOptions: z.object({
2999
- time: z.date().describe(
3000
- "Date and time until which online ordering is paused. <br />\n\nBefore the specified time, behavior is the same as when `onlineOrderingStatus` is `DISABLED`. <br />\n\nAfter the specified time, behavior is the same as when `onlineOrderingStatus` is `ENABLED`. <br />\n\nPassing the time does not trigger any changes to value of any properties."
3001
- ).optional().nullable()
3002
- }).describe(
3003
- "Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
3004
- )
3005
- })
3006
- ])
3007
- )
3008
- ).optional()
3009
- });
3010
- var ListAvailableFulfillmentOptionsRequest = z.object({
3011
- operationId: z.string().describe(
3012
- "Operation ID. Returned fulfillment options will belong to this operation."
3013
- ).regex(
3014
- /^[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}$/,
3015
- "Must be a valid GUID"
3016
- ),
3017
- options: z.object({
3018
- deliveryAddress: z.intersection(
3019
- z.object({
3020
- country: z.string().describe("Country code.").optional().nullable(),
3021
- subdivision: z.string().describe(
3022
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
3023
- ).optional().nullable(),
3024
- city: z.string().describe("City name.").optional().nullable(),
3025
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
3026
- addressLine2: z.string().describe(
3027
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
3028
- ).optional().nullable(),
3029
- formattedAddress: z.string().describe(
3030
- "A string containing the full address of this location."
3031
- ).optional().nullable(),
3032
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
3033
- geocode: z.object({
3034
- latitude: z.number().describe("Address latitude.").optional().nullable(),
3035
- longitude: z.number().describe("Address longitude.").optional().nullable()
3036
- }).describe("Coordinates of the physical address.").optional(),
3037
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
3038
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
3039
- subdivisions: z.array(
3040
- z.object({
3041
- code: z.string().describe("Short subdivision code.").optional(),
3042
- name: z.string().describe("Subdivision full name.").optional()
3043
- })
3044
- ).max(6).optional()
3045
- }),
3046
- z.xor([
3047
- z.object({
3048
- streetAddress: z.never().optional(),
3049
- addressLine: z.never().optional()
3050
- }),
3051
- z.object({
3052
- addressLine: z.never().optional(),
3053
- streetAddress: z.object({
3054
- number: z.string().describe("Street number.").optional(),
3055
- name: z.string().describe("Street name.").optional(),
3056
- apt: z.string().describe("Apartment number.").optional(),
3057
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
3058
- }).describe("Street name and number.")
3059
- }),
3060
- z.object({
3061
- streetAddress: z.never().optional(),
3062
- addressLine: z.string().describe(
3063
- "Main address line, usually street and number as free text."
3064
- )
3065
- })
3066
- ])
3067
- ).describe(
3068
- "Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
3069
- ).optional()
3070
- }).optional()
3071
- });
3072
- var ListAvailableFulfillmentOptionsResponse = z.object({
3073
- pickupConfigured: z.boolean().describe(
3074
- "Whether pickup fulfillment method is configured for the requested operation."
3075
- ).optional(),
3076
- deliveryConfigured: z.boolean().describe(
3077
- "Whether delivery fulfillment method is configured for the requested operation."
3078
- ).optional(),
3079
- fulfillmentOptions: z.array(
3080
- z.intersection(
3081
- z.object({
3082
- _id: z.string().describe("Fulfillment method ID.").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
- type: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment option type.").optional(),
3087
- minOrderPrice: z.string().describe(
3088
- "Minimum order price to qualify for the fulfillment option."
3089
- ).optional().nullable(),
3090
- fee: z.string().describe("Fee for using the fulfillment option.").optional().nullable(),
3091
- availability: z.object({
3092
- startTime: z.date().describe(
3093
- "Date and time at which the fulfillment option's availability starts."
3094
- ).optional().nullable(),
3095
- endTime: z.date().describe(
3096
- "Date and time at which the fulfillment option's availability ends."
3097
- ).optional().nullable(),
3098
- availableTimes: z.array(
3099
- z.object({
3100
- dayOfWeek: z.enum(["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]).describe("The day of week this availability relates to.").optional(),
3101
- timeRanges: z.array(
3102
- z.object({
3103
- startTime: z.object({
3104
- hours: z.number().int().describe(
3105
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
3106
- ).optional(),
3107
- minutes: z.number().int().describe(
3108
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
3109
- ).optional()
3110
- }).describe(
3111
- "The start time in time of day representation."
3112
- ).optional(),
3113
- endTime: z.object({
3114
- hours: z.number().int().describe(
3115
- "Hours. <br />\nMin: `0`. <br />\nMax: `23`."
3116
- ).optional(),
3117
- minutes: z.number().int().describe(
3118
- "Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
3119
- ).optional()
3120
- }).describe(
3121
- "The end time in time of day representation."
3122
- ).optional()
3123
- })
3124
- ).optional()
3125
- })
3126
- ).optional(),
3127
- exceptions: z.array(
3128
- z.object({
3129
- startTime: z.date().describe("The start time of the availability exception.").optional().nullable(),
3130
- endTime: z.date().describe("The end time of the availability exception.").optional().nullable(),
3131
- available: z.boolean().describe(
3132
- "An indication whether the exception makes the [`start_time`, `end_time`] range available."
3133
- ).optional(),
3134
- reason: z.string().describe("The reason for the exception.").optional().nullable()
3135
- })
3136
- ).optional(),
3137
- timeZone: z.string().describe("Timezone for which the available times are given.").optional().nullable(),
3138
- asapHandlingAvailable: z.boolean().describe(
3139
- "Whether it's possible to submit an order for as soon as possible handling."
3140
- ).optional(),
3141
- futureHandlingAvailable: z.boolean().describe(
3142
- "Whether it's possible to submit an order for future handling."
3143
- ).optional().nullable()
3144
- }).describe("Availability of the fulfillment option.").optional(),
3145
- fulfillmentTimeType: z.enum(["UNDEFINED_FULFILLMENT_TIME", "MAX_TIME", "DURATION_RANGE"]).describe(
3146
- "Fulfillment time type.\nRelevant only to ASAP operations."
3147
- ).optional(),
3148
- fulfillmentTimesDisplayType: z.enum(["UNDEFINED_FULFILLMENT_TIMES_DISPLAY", "TIME_WINDOWS"]).describe(
3149
- "Fulfillment times display type. Relevant to preorder operations."
3150
- ).optional(),
3151
- freeFulfillmentPriceThreshold: z.string().describe(
3152
- "Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
3153
- ).optional().nullable(),
3154
- instructions: z.string().describe("Instructions for the fulfillment.").max(250).optional().nullable(),
3155
- businessLocationId: z.string().regex(
3156
- /^[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}$/,
3157
- "Must be a valid GUID"
3158
- ).optional().nullable()
3159
- }),
3160
- z.intersection(
3161
- z.intersection(
3162
- z.xor([
3163
- z.object({
3164
- maxTimeOptions: z.never().optional(),
3165
- durationRangeOptions: z.never().optional()
3166
- }),
3167
- z.object({
3168
- durationRangeOptions: z.never().optional(),
3169
- maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum time.")
3170
- }),
3171
- z.object({
3172
- maxTimeOptions: z.never().optional(),
3173
- durationRangeOptions: z.object({
3174
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
3175
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
3176
- }).describe("Fulfillment time is limited by a range.")
3177
- })
3178
- ]),
3179
- z.xor([
3180
- z.object({ timeWindowsOptions: z.never().optional() }),
3181
- z.object({
3182
- timeWindowsOptions: z.object({
3183
- durationInMinutes: z.number().int().describe("Time window duration in minutes.").optional()
3184
- }).describe(
3185
- "Options for fulfillment time. Required when `type` is `TIME_WINDOWS`."
3186
- )
3187
- })
3188
- ])
3189
- ),
3190
- z.xor([
3191
- z.object({
3192
- pickupOptions: z.never().optional(),
3193
- deliveryOptions: z.never().optional(),
3194
- dineInOptions: z.never().optional()
3195
- }),
3196
- z.object({
3197
- deliveryOptions: z.never().optional(),
3198
- dineInOptions: z.never().optional(),
3199
- pickupOptions: z.object({
3200
- address: z.object({
3201
- city: z.string().optional().nullable(),
3202
- subdivision: z.string().optional().nullable(),
3203
- country: z.string().optional().nullable(),
3204
- postalCode: z.string().optional().nullable(),
3205
- addressLine1: z.string().optional().nullable(),
3206
- addressLine2: z.string().optional().nullable()
3207
- }).describe(
3208
- "Pickup address. This is the restaurant's address."
3209
- ).optional()
3210
- }).describe("Information about pickup fulfillment types.")
3211
- }),
3212
- z.object({
3213
- pickupOptions: z.never().optional(),
3214
- dineInOptions: z.never().optional(),
3215
- deliveryOptions: z.object({
3216
- deliveryProviderAppId: z.string().describe("Delivery provider app id.").regex(
3217
- /^[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}$/,
3218
- "Must be a valid GUID"
3219
- ).optional().nullable(),
3220
- courierPickupInstructions: z.string().describe("Pickup instructions for couriers.").max(250).optional().nullable(),
3221
- deliveryTimeInMinutes: z.number().int().describe(
3222
- "how much time it takes to deliver the order in minutes."
3223
- ).min(0).optional().nullable()
3224
- }).describe("Information about delivery fulfillment types.")
3225
- }),
3226
- z.object({
3227
- pickupOptions: z.never().optional(),
3228
- deliveryOptions: z.never().optional(),
3229
- dineInOptions: z.object({
3230
- address: z.object({
3231
- city: z.string().optional().nullable(),
3232
- subdivision: z.string().optional().nullable(),
3233
- country: z.string().optional().nullable(),
3234
- postalCode: z.string().optional().nullable(),
3235
- addressLine1: z.string().optional().nullable(),
3236
- addressLine2: z.string().optional().nullable()
3237
- }).describe(
3238
- "Dine-in address. This is the restaurant's address."
3239
- ).optional()
3240
- }).describe("Information about dine-in fulfillment types.")
3241
- })
3242
- ])
3243
- )
3244
- )
3245
- ).optional(),
3246
- blockedByAvailabilityExceptions: z.boolean().describe("Whether availability exceptions block the fulfillment options.").optional().nullable(),
3247
- blockedByPausedOrdering: z.boolean().describe(
3248
- "Whether availability exceptions from type = PAUSED_ORDERING block the fulfillment options."
3249
- ).optional().nullable()
3250
- });
3251
- var ListFirstAvailableTimeSlotForFulfillmentTypesRequest = z.object({
3252
- operationId: z.string().describe(
3253
- "Operation ID.\nReturned fulfillment options will belong to this operation."
3254
- ).regex(
3255
- /^[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}$/,
3256
- "Must be a valid GUID"
3257
- ),
3258
- options: z.object({
3259
- deliveryAddress: z.intersection(
3260
- z.object({
3261
- country: z.string().describe("Country code.").optional().nullable(),
3262
- subdivision: z.string().describe(
3263
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
3264
- ).optional().nullable(),
3265
- city: z.string().describe("City name.").optional().nullable(),
3266
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
3267
- addressLine2: z.string().describe(
3268
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
3269
- ).optional().nullable(),
3270
- formattedAddress: z.string().describe(
3271
- "A string containing the full address of this location."
3272
- ).optional().nullable(),
3273
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
3274
- geocode: z.object({
3275
- latitude: z.number().describe("Address latitude.").optional().nullable(),
3276
- longitude: z.number().describe("Address longitude.").optional().nullable()
3277
- }).describe("Coordinates of the physical address.").optional(),
3278
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
3279
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
3280
- subdivisions: z.array(
3281
- z.object({
3282
- code: z.string().describe("Short subdivision code.").optional(),
3283
- name: z.string().describe("Subdivision full name.").optional()
3284
- })
3285
- ).max(6).optional()
3286
- }),
3287
- z.xor([
3288
- z.object({
3289
- streetAddress: z.never().optional(),
3290
- addressLine: z.never().optional()
3291
- }),
3292
- z.object({
3293
- addressLine: z.never().optional(),
3294
- streetAddress: z.object({
3295
- number: z.string().describe("Street number.").optional(),
3296
- name: z.string().describe("Street name.").optional(),
3297
- apt: z.string().describe("Apartment number.").optional(),
3298
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
3299
- }).describe("Street name and number.")
3300
- }),
3301
- z.object({
3302
- streetAddress: z.never().optional(),
3303
- addressLine: z.string().describe(
3304
- "Main address line, usually street and number as free text."
3305
- )
3306
- })
3307
- ])
3308
- ).describe(
3309
- "Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
3310
- ).optional()
3311
- }).optional()
3312
- });
3313
- var ListFirstAvailableTimeSlotForFulfillmentTypesResponse = z.object({
3314
- timeSlots: z.array(
3315
- z.object({
3316
- startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
3317
- endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
3318
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
3319
- startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
3320
- fulfillmentDetails: z.array(
3321
- z.intersection(
3322
- z.object({
3323
- fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
3324
- minOrderPrice: z.string().describe(
3325
- "Minimum order price to qualify for using this fulfillment."
3326
- ).optional().nullable(),
3327
- fulfillmentTimeType: z.enum([
3328
- "UNDEFINED_FULFILLMENT_TIME",
3329
- "MAX_TIME",
3330
- "DURATION_RANGE"
3331
- ]).describe(
3332
- "Fulfillment time type. Only be relevant to `ASAP` operations."
3333
- ).optional(),
3334
- freeFulfillmentPriceThreshold: z.string().describe(
3335
- "Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
3336
- ).optional().nullable()
3337
- }),
3338
- z.xor([
3339
- z.object({
3340
- maxTimeOptions: z.never().optional(),
3341
- durationRangeOptions: z.never().optional()
3342
- }),
3343
- z.object({
3344
- durationRangeOptions: z.never().optional(),
3345
- maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
3346
- }),
3347
- z.object({
3348
- maxTimeOptions: z.never().optional(),
3349
- durationRangeOptions: z.object({
3350
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
3351
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
3352
- }).describe("Fulfillment time has a minimum and a maximum.")
3353
- })
3354
- ])
3355
- )
3356
- ).max(500).optional(),
3357
- fulfillmentAddress: z.object({
3358
- address: z.object({
3359
- city: z.string().optional().nullable(),
3360
- subdivision: z.string().optional().nullable(),
3361
- country: z.string().optional().nullable(),
3362
- postalCode: z.string().optional().nullable(),
3363
- addressLine1: z.string().optional().nullable(),
3364
- addressLine2: z.string().optional().nullable()
3365
- }).describe(
3366
- "Pickup address. This is the address of the restaurant."
3367
- ).optional()
3368
- }).describe("Address of the fulfillment.").optional()
3369
- })
3370
- ).optional()
3371
- });
3372
- var CalculateFirstAvailableTimeSlotPerFulfillmentTypeRequest = z.object({
3373
- operationId: z.string().describe("Operation ID.").regex(
3374
- /^[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}$/,
3375
- "Must be a valid GUID"
3376
- ),
3377
- options: z.object({
3378
- deliveryAddress: z.intersection(
3379
- z.object({
3380
- country: z.string().describe("Country code.").optional().nullable(),
3381
- subdivision: z.string().describe(
3382
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
3383
- ).optional().nullable(),
3384
- city: z.string().describe("City name.").optional().nullable(),
3385
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
3386
- addressLine2: z.string().describe(
3387
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
3388
- ).optional().nullable(),
3389
- formattedAddress: z.string().describe(
3390
- "A string containing the full address of this location."
3391
- ).optional().nullable(),
3392
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
3393
- geocode: z.object({
3394
- latitude: z.number().describe("Address latitude.").optional().nullable(),
3395
- longitude: z.number().describe("Address longitude.").optional().nullable()
3396
- }).describe("Coordinates of the physical address.").optional(),
3397
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
3398
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
3399
- subdivisions: z.array(
3400
- z.object({
3401
- code: z.string().describe("Short subdivision code.").optional(),
3402
- name: z.string().describe("Subdivision full name.").optional()
3403
- })
3404
- ).max(6).optional()
3405
- }),
3406
- z.xor([
3407
- z.object({
3408
- streetAddress: z.never().optional(),
3409
- addressLine: z.never().optional()
3410
- }),
3411
- z.object({
3412
- addressLine: z.never().optional(),
3413
- streetAddress: z.object({
3414
- number: z.string().describe("Street number.").optional(),
3415
- name: z.string().describe("Street name.").optional(),
3416
- apt: z.string().describe("Apartment number.").optional(),
3417
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
3418
- }).describe("Street name and number.")
3419
- }),
3420
- z.object({
3421
- streetAddress: z.never().optional(),
3422
- addressLine: z.string().describe(
3423
- "Main address line, usually street and number as free text."
3424
- )
3425
- })
3426
- ])
3427
- ).describe(
3428
- "Delivery address.\n\nThe response includes a time slot with the delivery fulfillment type only if you specify a delivery address."
3429
- ).optional()
3430
- }).optional()
3431
- });
3432
- var CalculateFirstAvailableTimeSlotPerFulfillmentTypeResponse = z.object({
3433
- timeslotsPerFulfillmentType: z.array(
3434
- z.object({
3435
- timeSlot: z.object({
3436
- startTime: z.date().describe(
3437
- "Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
3438
- ).optional().nullable(),
3439
- endTime: z.date().describe(
3440
- "End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
3441
- ).optional().nullable(),
3442
- orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
3443
- }).describe("Time Slot details.").optional(),
3444
- fulfillmentInfo: z.array(
3445
- z.intersection(
3446
- z.object({
3447
- fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
3448
- minOrderPrice: z.string().describe(
3449
- "Minimum order price to qualify for using this fulfillment option."
3450
- ).optional().nullable(),
3451
- freeFulfillmentPriceThreshold: z.string().describe(
3452
- "Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
3453
- ).optional().nullable(),
3454
- address: z.object({
3455
- city: z.string().optional().nullable(),
3456
- subdivision: z.string().optional().nullable(),
3457
- country: z.string().optional().nullable(),
3458
- postalCode: z.string().optional().nullable(),
3459
- addressLine1: z.string().optional().nullable(),
3460
- addressLine2: z.string().optional().nullable()
3461
- }).describe(
3462
- "Details on the address of the fulfillment.\nFor pickup fulfillment types, this is the address to take the order from.\nFor delivery fulfillment types, this is the address to deliver the order to."
3463
- ).optional()
3464
- }),
3465
- z.xor([
3466
- z.object({
3467
- maxTime: z.never().optional(),
3468
- durationRange: z.never().optional()
3469
- }),
3470
- z.object({
3471
- durationRange: z.never().optional(),
3472
- maxTime: z.number().int().describe("Maximum time to fulfill the order.")
3473
- }),
3474
- z.object({
3475
- maxTime: z.never().optional(),
3476
- durationRange: z.object({
3477
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
3478
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
3479
- }).describe("Time range in which to fulfill the order.")
3480
- })
3481
- ])
3482
- )
3483
- ).max(500).optional(),
3484
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
3485
- })
3486
- ).max(2).optional()
3487
- });
3488
- var ListFirstAvailableTimeSlotsForOperationsRequest = z.object({
3489
- operationIds: z.array(z.string()).max(100),
3490
- options: z.object({
3491
- deliveryAddress: z.intersection(
3492
- z.object({
3493
- country: z.string().describe("Country code.").optional().nullable(),
3494
- subdivision: z.string().describe(
3495
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
3496
- ).optional().nullable(),
3497
- city: z.string().describe("City name.").optional().nullable(),
3498
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
3499
- addressLine2: z.string().describe(
3500
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
3501
- ).optional().nullable(),
3502
- formattedAddress: z.string().describe(
3503
- "A string containing the full address of this location."
3504
- ).optional().nullable(),
3505
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
3506
- geocode: z.object({
3507
- latitude: z.number().describe("Address latitude.").optional().nullable(),
3508
- longitude: z.number().describe("Address longitude.").optional().nullable()
3509
- }).describe("Coordinates of the physical address.").optional(),
3510
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
3511
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
3512
- subdivisions: z.array(
3513
- z.object({
3514
- code: z.string().describe("Short subdivision code.").optional(),
3515
- name: z.string().describe("Subdivision full name.").optional()
3516
- })
3517
- ).max(6).optional()
3518
- }),
3519
- z.xor([
3520
- z.object({
3521
- streetAddress: z.never().optional(),
3522
- addressLine: z.never().optional()
3523
- }),
3524
- z.object({
3525
- addressLine: z.never().optional(),
3526
- streetAddress: z.object({
3527
- number: z.string().describe("Street number.").optional(),
3528
- name: z.string().describe("Street name.").optional(),
3529
- apt: z.string().describe("Apartment number.").optional(),
3530
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
3531
- }).describe("Street name and number.")
3532
- }),
3533
- z.object({
3534
- streetAddress: z.never().optional(),
3535
- addressLine: z.string().describe(
3536
- "Main address line, usually street and number as free text."
3537
- )
3538
- })
3539
- ])
3540
- ).describe(
3541
- "Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
3542
- ).optional()
3543
- }).optional()
3544
- });
3545
- var ListFirstAvailableTimeSlotsForOperationsResponse = z.object({
3546
- timeSlots: z.array(
3547
- z.object({
3548
- operationId: z.string().describe("Operation ID.").regex(
3549
- /^[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}$/,
3550
- "Must be a valid GUID"
3551
- ).optional(),
3552
- timeSlots: z.array(
3553
- z.object({
3554
- startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
3555
- endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
3556
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
3557
- startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
3558
- fulfillmentDetails: z.array(
3559
- z.intersection(
3560
- z.object({
3561
- fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
3562
- minOrderPrice: z.string().describe(
3563
- "Minimum order price to qualify for using this fulfillment."
3564
- ).optional().nullable(),
3565
- fulfillmentTimeType: z.enum([
3566
- "UNDEFINED_FULFILLMENT_TIME",
3567
- "MAX_TIME",
3568
- "DURATION_RANGE"
3569
- ]).describe(
3570
- "Fulfillment time type. Only be relevant to `ASAP` operations."
3571
- ).optional(),
3572
- freeFulfillmentPriceThreshold: z.string().describe(
3573
- "Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
3574
- ).optional().nullable()
3575
- }),
3576
- z.xor([
3577
- z.object({
3578
- maxTimeOptions: z.never().optional(),
3579
- durationRangeOptions: z.never().optional()
3580
- }),
3581
- z.object({
3582
- durationRangeOptions: z.never().optional(),
3583
- maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
3584
- }),
3585
- z.object({
3586
- maxTimeOptions: z.never().optional(),
3587
- durationRangeOptions: z.object({
3588
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
3589
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
3590
- }).describe(
3591
- "Fulfillment time has a minimum and a maximum."
3592
- )
3593
- })
3594
- ])
3595
- )
3596
- ).max(500).optional(),
3597
- fulfillmentAddress: z.object({
3598
- address: z.object({
3599
- city: z.string().optional().nullable(),
3600
- subdivision: z.string().optional().nullable(),
3601
- country: z.string().optional().nullable(),
3602
- postalCode: z.string().optional().nullable(),
3603
- addressLine1: z.string().optional().nullable(),
3604
- addressLine2: z.string().optional().nullable()
3605
- }).describe(
3606
- "Pickup address. This is the address of the restaurant."
3607
- ).optional()
3608
- }).describe("Address of the fulfillment.").optional()
3609
- })
3610
- ).max(100).optional()
3611
- })
3612
- ).max(100).optional()
3613
- });
3614
- var CalculateFirstAvailableTimeSlotsPerOperationRequest = z.object({
3615
- operationIds: z.array(z.string()).max(100),
3616
- options: z.object({
3617
- deliveryAddress: z.intersection(
3618
- z.object({
3619
- country: z.string().describe("Country code.").optional().nullable(),
3620
- subdivision: z.string().describe(
3621
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
3622
- ).optional().nullable(),
3623
- city: z.string().describe("City name.").optional().nullable(),
3624
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
3625
- addressLine2: z.string().describe(
3626
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
3627
- ).optional().nullable(),
3628
- formattedAddress: z.string().describe(
3629
- "A string containing the full address of this location."
3630
- ).optional().nullable(),
3631
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
3632
- geocode: z.object({
3633
- latitude: z.number().describe("Address latitude.").optional().nullable(),
3634
- longitude: z.number().describe("Address longitude.").optional().nullable()
3635
- }).describe("Coordinates of the physical address.").optional(),
3636
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
3637
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
3638
- subdivisions: z.array(
3639
- z.object({
3640
- code: z.string().describe("Short subdivision code.").optional(),
3641
- name: z.string().describe("Subdivision full name.").optional()
3642
- })
3643
- ).max(6).optional()
3644
- }),
3645
- z.xor([
3646
- z.object({
3647
- streetAddress: z.never().optional(),
3648
- addressLine: z.never().optional()
3649
- }),
3650
- z.object({
3651
- addressLine: z.never().optional(),
3652
- streetAddress: z.object({
3653
- number: z.string().describe("Street number.").optional(),
3654
- name: z.string().describe("Street name.").optional(),
3655
- apt: z.string().describe("Apartment number.").optional(),
3656
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
3657
- }).describe("Street name and number.")
3658
- }),
3659
- z.object({
3660
- streetAddress: z.never().optional(),
3661
- addressLine: z.string().describe(
3662
- "Main address line, usually street and number as free text."
3663
- )
3664
- })
3665
- ])
3666
- ).describe(
3667
- "Delivery address.\n\nThe response includes time slots with delivery fulfillment types only if you specify a delivery address."
3668
- ).optional()
3669
- }).optional()
3670
- });
3671
- var CalculateFirstAvailableTimeSlotsPerOperationResponse = z.object({
3672
- timeSlotsPerOperation: z.array(
3673
- z.object({
3674
- operationId: z.string().describe("Operation ID.").regex(
3675
- /^[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}$/,
3676
- "Must be a valid GUID"
3677
- ).optional(),
3678
- timeslotsPerFulfillmentType: z.array(
3679
- z.object({
3680
- timeSlot: z.object({
3681
- startTime: z.date().describe(
3682
- "Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
3683
- ).optional().nullable(),
3684
- endTime: z.date().describe(
3685
- "End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
3686
- ).optional().nullable(),
3687
- orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
3688
- }).describe("Time Slot details.").optional(),
3689
- fulfillmentInfo: z.array(
3690
- z.intersection(
3691
- z.object({
3692
- fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
3693
- minOrderPrice: z.string().describe(
3694
- "Minimum order price to qualify for using this fulfillment option."
3695
- ).optional().nullable(),
3696
- freeFulfillmentPriceThreshold: z.string().describe(
3697
- "Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
3698
- ).optional().nullable(),
3699
- address: z.object({
3700
- city: z.string().optional().nullable(),
3701
- subdivision: z.string().optional().nullable(),
3702
- country: z.string().optional().nullable(),
3703
- postalCode: z.string().optional().nullable(),
3704
- addressLine1: z.string().optional().nullable(),
3705
- addressLine2: z.string().optional().nullable()
3706
- }).describe(
3707
- "Details on the address of the fulfillment.\nFor pickup fulfillment types, this is the address to take the order from.\nFor delivery fulfillment types, this is the address to deliver the order to."
3708
- ).optional()
3709
- }),
3710
- z.xor([
3711
- z.object({
3712
- maxTime: z.never().optional(),
3713
- durationRange: z.never().optional()
3714
- }),
3715
- z.object({
3716
- durationRange: z.never().optional(),
3717
- maxTime: z.number().int().describe("Maximum time to fulfill the order.")
3718
- }),
3719
- z.object({
3720
- maxTime: z.never().optional(),
3721
- durationRange: z.object({
3722
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
3723
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
3724
- }).describe(
3725
- "Time range in which to fulfill the order."
3726
- )
3727
- })
3728
- ])
3729
- )
3730
- ).max(500).optional(),
3731
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
3732
- })
3733
- ).max(2).optional()
3734
- })
3735
- ).max(100).optional()
3736
- });
3737
- var ListFirstAvailableTimeSlotsForMenusRequest = z.object({
3738
- operationId: z.string().describe(
3739
- "Operation ID.\nReturned timeslots that are belong to this operation."
3740
- ).regex(
3741
- /^[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}$/,
3742
- "Must be a valid GUID"
3743
- ),
3744
- options: z.object({
3745
- deliveryAddress: z.intersection(
3746
- z.object({
3747
- country: z.string().describe("Country code.").optional().nullable(),
3748
- subdivision: z.string().describe(
3749
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
3750
- ).optional().nullable(),
3751
- city: z.string().describe("City name.").optional().nullable(),
3752
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
3753
- addressLine2: z.string().describe(
3754
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
3755
- ).optional().nullable(),
3756
- formattedAddress: z.string().describe(
3757
- "A string containing the full address of this location."
3758
- ).optional().nullable(),
3759
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
3760
- geocode: z.object({
3761
- latitude: z.number().describe("Address latitude.").optional().nullable(),
3762
- longitude: z.number().describe("Address longitude.").optional().nullable()
3763
- }).describe("Coordinates of the physical address.").optional(),
3764
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
3765
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
3766
- subdivisions: z.array(
3767
- z.object({
3768
- code: z.string().describe("Short subdivision code.").optional(),
3769
- name: z.string().describe("Subdivision full name.").optional()
3770
- })
3771
- ).max(6).optional()
3772
- }),
3773
- z.xor([
3774
- z.object({
3775
- streetAddress: z.never().optional(),
3776
- addressLine: z.never().optional()
3777
- }),
3778
- z.object({
3779
- addressLine: z.never().optional(),
3780
- streetAddress: z.object({
3781
- number: z.string().describe("Street number.").optional(),
3782
- name: z.string().describe("Street name.").optional(),
3783
- apt: z.string().describe("Apartment number.").optional(),
3784
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
3785
- }).describe("Street name and number.")
3786
- }),
3787
- z.object({
3788
- streetAddress: z.never().optional(),
3789
- addressLine: z.string().describe(
3790
- "Main address line, usually street and number as free text."
3791
- )
3792
- })
3793
- ])
3794
- ).describe(
3795
- "Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
3796
- ).optional(),
3797
- cursorPaging: z.object({
3798
- limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
3799
- cursor: z.string().describe(
3800
- "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."
3801
- ).max(16e3).optional().nullable()
3802
- }).describe("Cursor paging").optional()
3803
- }).optional()
3804
- });
3805
- var ListFirstAvailableTimeSlotsForMenusResponse = z.object({
3806
- timeSlotsPerMenu: z.array(
3807
- z.object({
3808
- menuId: z.string().describe("Menu ID.").regex(
3809
- /^[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}$/,
3810
- "Must be a valid GUID"
3811
- ).optional().nullable(),
3812
- timeslotsPerFulfillmentType: z.array(
3813
- z.object({
3814
- startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
3815
- endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
3816
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
3817
- startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
3818
- fulfillmentDetails: z.array(
3819
- z.intersection(
3820
- z.object({
3821
- fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
3822
- minOrderPrice: z.string().describe(
3823
- "Minimum order price to qualify for using this fulfillment."
3824
- ).optional().nullable(),
3825
- fulfillmentTimeType: z.enum([
3826
- "UNDEFINED_FULFILLMENT_TIME",
3827
- "MAX_TIME",
3828
- "DURATION_RANGE"
3829
- ]).describe(
3830
- "Fulfillment time type. Only be relevant to `ASAP` operations."
3831
- ).optional(),
3832
- freeFulfillmentPriceThreshold: z.string().describe(
3833
- "Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
3834
- ).optional().nullable()
3835
- }),
3836
- z.xor([
3837
- z.object({
3838
- maxTimeOptions: z.never().optional(),
3839
- durationRangeOptions: z.never().optional()
3840
- }),
3841
- z.object({
3842
- durationRangeOptions: z.never().optional(),
3843
- maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
3844
- }),
3845
- z.object({
3846
- maxTimeOptions: z.never().optional(),
3847
- durationRangeOptions: z.object({
3848
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
3849
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
3850
- }).describe(
3851
- "Fulfillment time has a minimum and a maximum."
3852
- )
3853
- })
3854
- ])
3855
- )
3856
- ).max(500).optional(),
3857
- fulfillmentAddress: z.object({
3858
- address: z.object({
3859
- city: z.string().optional().nullable(),
3860
- subdivision: z.string().optional().nullable(),
3861
- country: z.string().optional().nullable(),
3862
- postalCode: z.string().optional().nullable(),
3863
- addressLine1: z.string().optional().nullable(),
3864
- addressLine2: z.string().optional().nullable()
3865
- }).describe(
3866
- "Pickup address. This is the address of the restaurant."
3867
- ).optional()
3868
- }).describe("Address of the fulfillment.").optional()
3869
- })
3870
- ).max(2).optional()
3871
- })
3872
- ).max(100).optional(),
3873
- cursor: z.string().describe("Cursor to next request.").max(16e3).optional().nullable()
3874
- });
3875
- var CalculateFirstAvailableTimeSlotsPerMenuRequest = z.object({
3876
- operationId: z.string().describe("Operation ID.").regex(
3877
- /^[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}$/,
3878
- "Must be a valid GUID"
3879
- ),
3880
- options: z.object({
3881
- deliveryAddress: z.intersection(
3882
- z.object({
3883
- country: z.string().describe("Country code.").optional().nullable(),
3884
- subdivision: z.string().describe(
3885
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
3886
- ).optional().nullable(),
3887
- city: z.string().describe("City name.").optional().nullable(),
3888
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
3889
- addressLine2: z.string().describe(
3890
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
3891
- ).optional().nullable(),
3892
- formattedAddress: z.string().describe(
3893
- "A string containing the full address of this location."
3894
- ).optional().nullable(),
3895
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
3896
- geocode: z.object({
3897
- latitude: z.number().describe("Address latitude.").optional().nullable(),
3898
- longitude: z.number().describe("Address longitude.").optional().nullable()
3899
- }).describe("Coordinates of the physical address.").optional(),
3900
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
3901
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
3902
- subdivisions: z.array(
3903
- z.object({
3904
- code: z.string().describe("Short subdivision code.").optional(),
3905
- name: z.string().describe("Subdivision full name.").optional()
3906
- })
3907
- ).max(6).optional()
3908
- }),
3909
- z.xor([
3910
- z.object({
3911
- streetAddress: z.never().optional(),
3912
- addressLine: z.never().optional()
3913
- }),
3914
- z.object({
3915
- addressLine: z.never().optional(),
3916
- streetAddress: z.object({
3917
- number: z.string().describe("Street number.").optional(),
3918
- name: z.string().describe("Street name.").optional(),
3919
- apt: z.string().describe("Apartment number.").optional(),
3920
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
3921
- }).describe("Street name and number.")
3922
- }),
3923
- z.object({
3924
- streetAddress: z.never().optional(),
3925
- addressLine: z.string().describe(
3926
- "Main address line, usually street and number as free text."
3927
- )
3928
- })
3929
- ])
3930
- ).describe(
3931
- "Delivery address.\n\nThe response includes time slots with delivery fulfillment types only if you specify a delivery address."
3932
- ).optional(),
3933
- cursorPaging: z.object({
3934
- limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
3935
- cursor: z.string().describe(
3936
- "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."
3937
- ).max(16e3).optional().nullable()
3938
- }).describe("Cursor paging.").optional(),
3939
- onlyOnlineOrderingEnabled: z.boolean().describe(
3940
- "Only retrieve time slots for menus with online ordering enabled."
3941
- ).optional().nullable()
3942
- }).optional()
3943
- });
3944
- var CalculateFirstAvailableTimeSlotsPerMenuResponse = z.object({
3945
- timeSlotsPerMenu: z.array(
3946
- z.object({
3947
- menuId: z.string().describe("Menu ID.").regex(
3948
- /^[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}$/,
3949
- "Must be a valid GUID"
3950
- ).optional().nullable(),
3951
- timeslotsPerFulfillmentType: z.array(
3952
- z.object({
3953
- timeSlot: z.object({
3954
- startTime: z.date().describe(
3955
- "Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
3956
- ).optional().nullable(),
3957
- endTime: z.date().describe(
3958
- "End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
3959
- ).optional().nullable(),
3960
- orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
3961
- }).describe("Time Slot details.").optional(),
3962
- fulfillmentInfo: z.array(
3963
- z.intersection(
3964
- z.object({
3965
- fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
3966
- minOrderPrice: z.string().describe(
3967
- "Minimum order price to qualify for using this fulfillment option."
3968
- ).optional().nullable(),
3969
- freeFulfillmentPriceThreshold: z.string().describe(
3970
- "Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
3971
- ).optional().nullable(),
3972
- address: z.object({
3973
- city: z.string().optional().nullable(),
3974
- subdivision: z.string().optional().nullable(),
3975
- country: z.string().optional().nullable(),
3976
- postalCode: z.string().optional().nullable(),
3977
- addressLine1: z.string().optional().nullable(),
3978
- addressLine2: z.string().optional().nullable()
3979
- }).describe(
3980
- "Details on the address of the fulfillment.\nFor pickup fulfillment types, this is the address to take the order from.\nFor delivery fulfillment types, this is the address to deliver the order to."
3981
- ).optional()
3982
- }),
3983
- z.xor([
3984
- z.object({
3985
- maxTime: z.never().optional(),
3986
- durationRange: z.never().optional()
3987
- }),
3988
- z.object({
3989
- durationRange: z.never().optional(),
3990
- maxTime: z.number().int().describe("Maximum time to fulfill the order.")
3991
- }),
3992
- z.object({
3993
- maxTime: z.never().optional(),
3994
- durationRange: z.object({
3995
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
3996
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
3997
- }).describe(
3998
- "Time range in which to fulfill the order."
3999
- )
4000
- })
4001
- ])
4002
- )
4003
- ).max(500).optional(),
4004
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
4005
- })
4006
- ).max(2).optional()
4007
- })
4008
- ).max(100).optional(),
4009
- pagingMetadata: z.object({
4010
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
4011
- offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
4012
- total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
4013
- tooManyToCount: z.boolean().describe(
4014
- "Flag that indicates the server failed to calculate the `total` field."
4015
- ).optional().nullable()
4016
- }).describe("Metadata for the paginated results.").optional(),
4017
- cursorPagingMetadata: z.object({
4018
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
4019
- cursors: z.object({
4020
- next: z.string().describe(
4021
- "Cursor string pointing to the next page in the list of results."
4022
- ).max(16e3).optional().nullable(),
4023
- prev: z.string().describe(
4024
- "Cursor pointing to the previous page in the list of results."
4025
- ).max(16e3).optional().nullable()
4026
- }).describe(
4027
- "Cursor strings that point to the next page, previous page, or both."
4028
- ).optional(),
4029
- hasNext: z.boolean().describe(
4030
- "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."
4031
- ).optional().nullable()
4032
- }).describe("Metadata for the paginated results.").optional()
4033
- });
4034
- var CalculateFirstAvailableTimeSlotsForItemRequest = z.object({
4035
- operationId: z.string().regex(
4036
- /^[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}$/,
4037
- "Must be a valid GUID"
4038
- ),
4039
- menuId: z.object({ value: z.string().optional() }).describe("Menu ID to get the first available time slots for."),
4040
- options: z.object({
4041
- sectionId: z.string().describe("Section ID to get the first available time slots for.").regex(
4042
- /^[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}$/,
4043
- "Must be a valid GUID"
4044
- ),
4045
- itemId: z.string().describe("Item ID to get the first available time slots for.").regex(
4046
- /^[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}$/,
4047
- "Must be a valid GUID"
4048
- ),
4049
- deliveryAddress: z.intersection(
4050
- z.object({
4051
- country: z.string().describe("Country code.").optional().nullable(),
4052
- subdivision: z.string().describe(
4053
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
4054
- ).optional().nullable(),
4055
- city: z.string().describe("City name.").optional().nullable(),
4056
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
4057
- addressLine2: z.string().describe(
4058
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
4059
- ).optional().nullable(),
4060
- formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
4061
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
4062
- geocode: z.object({
4063
- latitude: z.number().describe("Address latitude.").optional().nullable(),
4064
- longitude: z.number().describe("Address longitude.").optional().nullable()
4065
- }).describe("Coordinates of the physical address.").optional(),
4066
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
4067
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
4068
- subdivisions: z.array(
4069
- z.object({
4070
- code: z.string().describe("Short subdivision code.").optional(),
4071
- name: z.string().describe("Subdivision full name.").optional()
4072
- })
4073
- ).max(6).optional()
4074
- }),
4075
- z.xor([
4076
- z.object({
4077
- streetAddress: z.never().optional(),
4078
- addressLine: z.never().optional()
4079
- }),
4080
- z.object({
4081
- addressLine: z.never().optional(),
4082
- streetAddress: z.object({
4083
- number: z.string().describe("Street number.").optional(),
4084
- name: z.string().describe("Street name.").optional(),
4085
- apt: z.string().describe("Apartment number.").optional(),
4086
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
4087
- }).describe("Street name and number.")
4088
- }),
4089
- z.object({
4090
- streetAddress: z.never().optional(),
4091
- addressLine: z.string().describe(
4092
- "Main address line, usually street and number as free text."
4093
- )
4094
- })
4095
- ])
4096
- ).describe(
4097
- "Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
4098
- ).optional()
4099
- })
4100
- });
4101
- var CalculateFirstAvailableTimeSlotsForItemResponse = z.object({
4102
- timeslotsPerFulfillmentType: z.array(
4103
- z.object({
4104
- timeSlot: z.object({
4105
- startTime: z.date().describe(
4106
- "Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
4107
- ).optional().nullable(),
4108
- endTime: z.date().describe(
4109
- "End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
4110
- ).optional().nullable(),
4111
- orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
4112
- }).describe("Time Slot details.").optional(),
4113
- fulfillmentInfo: z.array(
4114
- z.intersection(
4115
- z.object({
4116
- fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
4117
- minOrderPrice: z.string().describe(
4118
- "Minimum order price to qualify for using this fulfillment option."
4119
- ).optional().nullable(),
4120
- freeFulfillmentPriceThreshold: z.string().describe(
4121
- "Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
4122
- ).optional().nullable(),
4123
- address: z.object({
4124
- city: z.string().optional().nullable(),
4125
- subdivision: z.string().optional().nullable(),
4126
- country: z.string().optional().nullable(),
4127
- postalCode: z.string().optional().nullable(),
4128
- addressLine1: z.string().optional().nullable(),
4129
- addressLine2: z.string().optional().nullable()
4130
- }).describe(
4131
- "Details on the address of the fulfillment.\nFor pickup fulfillment types, this is the address to take the order from.\nFor delivery fulfillment types, this is the address to deliver the order to."
4132
- ).optional()
4133
- }),
4134
- z.xor([
4135
- z.object({
4136
- maxTime: z.never().optional(),
4137
- durationRange: z.never().optional()
4138
- }),
4139
- z.object({
4140
- durationRange: z.never().optional(),
4141
- maxTime: z.number().int().describe("Maximum time to fulfill the order.")
4142
- }),
4143
- z.object({
4144
- maxTime: z.never().optional(),
4145
- durationRange: z.object({
4146
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
4147
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
4148
- }).describe("Time range in which to fulfill the order.")
4149
- })
4150
- ])
4151
- )
4152
- ).max(500).optional(),
4153
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
4154
- })
4155
- ).optional(),
4156
- cursorPagingMetadata: z.object({
4157
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
4158
- cursors: z.object({
4159
- next: z.string().describe(
4160
- "Cursor string pointing to the next page in the list of results."
4161
- ).max(16e3).optional().nullable(),
4162
- prev: z.string().describe(
4163
- "Cursor pointing to the previous page in the list of results."
4164
- ).max(16e3).optional().nullable()
4165
- }).describe(
4166
- "Cursor strings that point to the next page, previous page, or both."
4167
- ).optional(),
4168
- hasNext: z.boolean().describe(
4169
- "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."
4170
- ).optional().nullable()
4171
- }).describe("Metadata for the paginated results.").optional()
4172
- });
4173
- var ListAvailableTimeSlotsForDateRequest = z.object({
4174
- operationId: z.string().describe(
4175
- "Operation ID.\nThe returned fulfillment options will belong to this operation."
4176
- ).regex(
4177
- /^[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}$/,
4178
- "Must be a valid GUID"
4179
- ),
4180
- options: z.object({
4181
- deliveryAddress: z.intersection(
4182
- z.object({
4183
- country: z.string().describe("Country code.").optional().nullable(),
4184
- subdivision: z.string().describe(
4185
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
4186
- ).optional().nullable(),
4187
- city: z.string().describe("City name.").optional().nullable(),
4188
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
4189
- addressLine2: z.string().describe(
4190
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
4191
- ).optional().nullable(),
4192
- formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
4193
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
4194
- geocode: z.object({
4195
- latitude: z.number().describe("Address latitude.").optional().nullable(),
4196
- longitude: z.number().describe("Address longitude.").optional().nullable()
4197
- }).describe("Coordinates of the physical address.").optional(),
4198
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
4199
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
4200
- subdivisions: z.array(
4201
- z.object({
4202
- code: z.string().describe("Short subdivision code.").optional(),
4203
- name: z.string().describe("Subdivision full name.").optional()
4204
- })
4205
- ).max(6).optional()
4206
- }),
4207
- z.xor([
4208
- z.object({
4209
- streetAddress: z.never().optional(),
4210
- addressLine: z.never().optional()
4211
- }),
4212
- z.object({
4213
- addressLine: z.never().optional(),
4214
- streetAddress: z.object({
4215
- number: z.string().describe("Street number.").optional(),
4216
- name: z.string().describe("Street name.").optional(),
4217
- apt: z.string().describe("Apartment number.").optional(),
4218
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
4219
- }).describe("Street name and number.")
4220
- }),
4221
- z.object({
4222
- streetAddress: z.never().optional(),
4223
- addressLine: z.string().describe(
4224
- "Main address line, usually street and number as free text."
4225
- )
4226
- })
4227
- ])
4228
- ).describe(
4229
- "Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
4230
- ).optional(),
4231
- date: z.object({
4232
- day: z.number().int().describe("The day of the month.").min(1).max(31),
4233
- month: z.number().int().describe("The month of the year.").min(1).max(12),
4234
- year: z.number().int().describe("The year of the date.").min(2023).max(2200)
4235
- }).describe("Date and time to get the available time slots for.")
4236
- })
4237
- });
4238
- var ListAvailableTimeSlotsForDateResponse = z.object({
4239
- timeSlots: z.array(
4240
- z.object({
4241
- startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
4242
- endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
4243
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
4244
- startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
4245
- fulfillmentDetails: z.array(
4246
- z.intersection(
4247
- z.object({
4248
- fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
4249
- minOrderPrice: z.string().describe(
4250
- "Minimum order price to qualify for using this fulfillment."
4251
- ).optional().nullable(),
4252
- fulfillmentTimeType: z.enum([
4253
- "UNDEFINED_FULFILLMENT_TIME",
4254
- "MAX_TIME",
4255
- "DURATION_RANGE"
4256
- ]).describe(
4257
- "Fulfillment time type. Only be relevant to `ASAP` operations."
4258
- ).optional(),
4259
- freeFulfillmentPriceThreshold: z.string().describe(
4260
- "Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
4261
- ).optional().nullable()
4262
- }),
4263
- z.xor([
4264
- z.object({
4265
- maxTimeOptions: z.never().optional(),
4266
- durationRangeOptions: z.never().optional()
4267
- }),
4268
- z.object({
4269
- durationRangeOptions: z.never().optional(),
4270
- maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
4271
- }),
4272
- z.object({
4273
- maxTimeOptions: z.never().optional(),
4274
- durationRangeOptions: z.object({
4275
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
4276
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
4277
- }).describe("Fulfillment time has a minimum and a maximum.")
4278
- })
4279
- ])
4280
- )
4281
- ).max(500).optional(),
4282
- fulfillmentAddress: z.object({
4283
- address: z.object({
4284
- city: z.string().optional().nullable(),
4285
- subdivision: z.string().optional().nullable(),
4286
- country: z.string().optional().nullable(),
4287
- postalCode: z.string().optional().nullable(),
4288
- addressLine1: z.string().optional().nullable(),
4289
- addressLine2: z.string().optional().nullable()
4290
- }).describe(
4291
- "Pickup address. This is the address of the restaurant."
4292
- ).optional()
4293
- }).describe("Address of the fulfillment.").optional()
4294
- })
4295
- ).optional()
4296
- });
4297
- var CalculateAvailableTimeSlotsForDateRequest = z.object({
4298
- operationId: z.string().describe("Operation ID.").regex(
4299
- /^[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}$/,
4300
- "Must be a valid GUID"
4301
- ),
4302
- options: z.object({
4303
- deliveryAddress: z.intersection(
4304
- z.object({
4305
- country: z.string().describe("Country code.").optional().nullable(),
4306
- subdivision: z.string().describe(
4307
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
4308
- ).optional().nullable(),
4309
- city: z.string().describe("City name.").optional().nullable(),
4310
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
4311
- addressLine2: z.string().describe(
4312
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
4313
- ).optional().nullable(),
4314
- formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
4315
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
4316
- geocode: z.object({
4317
- latitude: z.number().describe("Address latitude.").optional().nullable(),
4318
- longitude: z.number().describe("Address longitude.").optional().nullable()
4319
- }).describe("Coordinates of the physical address.").optional(),
4320
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
4321
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
4322
- subdivisions: z.array(
4323
- z.object({
4324
- code: z.string().describe("Short subdivision code.").optional(),
4325
- name: z.string().describe("Subdivision full name.").optional()
4326
- })
4327
- ).max(6).optional()
4328
- }),
4329
- z.xor([
4330
- z.object({
4331
- streetAddress: z.never().optional(),
4332
- addressLine: z.never().optional()
4333
- }),
4334
- z.object({
4335
- addressLine: z.never().optional(),
4336
- streetAddress: z.object({
4337
- number: z.string().describe("Street number.").optional(),
4338
- name: z.string().describe("Street name.").optional(),
4339
- apt: z.string().describe("Apartment number.").optional(),
4340
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
4341
- }).describe("Street name and number.")
4342
- }),
4343
- z.object({
4344
- streetAddress: z.never().optional(),
4345
- addressLine: z.string().describe(
4346
- "Main address line, usually street and number as free text."
4347
- )
4348
- })
4349
- ])
4350
- ).describe(
4351
- "Delivery address.\n\nThe response includes time slots with delivery fulfillment types only if you specify a delivery address."
4352
- ).optional(),
4353
- date: z.object({
4354
- day: z.number().int().describe("The day of the month.").min(1).max(31),
4355
- month: z.number().int().describe("The month of the year.").min(1).max(12),
4356
- year: z.number().int().describe("The year of the date.").min(2023).max(2200)
4357
- }).describe("Date and time to get the available time slots for.")
4358
- })
4359
- });
4360
- var CalculateAvailableTimeSlotsForDateResponse = z.object({
4361
- timeslotsPerFulfillmentType: z.array(
4362
- z.object({
4363
- timeSlot: z.object({
4364
- startTime: z.date().describe(
4365
- "Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
4366
- ).optional().nullable(),
4367
- endTime: z.date().describe(
4368
- "End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
4369
- ).optional().nullable(),
4370
- orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
4371
- }).describe("Time Slot details.").optional(),
4372
- fulfillmentInfo: z.array(
4373
- z.intersection(
4374
- z.object({
4375
- fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
4376
- minOrderPrice: z.string().describe(
4377
- "Minimum order price to qualify for using this fulfillment option."
4378
- ).optional().nullable(),
4379
- freeFulfillmentPriceThreshold: z.string().describe(
4380
- "Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
4381
- ).optional().nullable(),
4382
- address: z.object({
4383
- city: z.string().optional().nullable(),
4384
- subdivision: z.string().optional().nullable(),
4385
- country: z.string().optional().nullable(),
4386
- postalCode: z.string().optional().nullable(),
4387
- addressLine1: z.string().optional().nullable(),
4388
- addressLine2: z.string().optional().nullable()
4389
- }).describe(
4390
- "Details on the address of the fulfillment.\nFor pickup fulfillment types, this is the address to take the order from.\nFor delivery fulfillment types, this is the address to deliver the order to."
4391
- ).optional()
4392
- }),
4393
- z.xor([
4394
- z.object({
4395
- maxTime: z.never().optional(),
4396
- durationRange: z.never().optional()
4397
- }),
4398
- z.object({
4399
- durationRange: z.never().optional(),
4400
- maxTime: z.number().int().describe("Maximum time to fulfill the order.")
4401
- }),
4402
- z.object({
4403
- maxTime: z.never().optional(),
4404
- durationRange: z.object({
4405
- minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
4406
- maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
4407
- }).describe("Time range in which to fulfill the order.")
4408
- })
4409
- ])
4410
- )
4411
- ).max(500).optional(),
4412
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
4413
- })
4414
- ).max(2).optional()
4415
- });
4416
- var ListAvailableDatesInRangeRequest = z.object({
4417
- operationId: z.string().describe(
4418
- "Operation ID.\nThe returned fulfillment options will belong to this operation."
4419
- ).regex(
4420
- /^[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}$/,
4421
- "Must be a valid GUID"
4422
- ),
4423
- options: z.object({
4424
- deliveryAddress: z.intersection(
4425
- z.object({
4426
- country: z.string().describe("Country code.").optional().nullable(),
4427
- subdivision: z.string().describe(
4428
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
4429
- ).optional().nullable(),
4430
- city: z.string().describe("City name.").optional().nullable(),
4431
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
4432
- addressLine2: z.string().describe(
4433
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
4434
- ).optional().nullable(),
4435
- formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
4436
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
4437
- geocode: z.object({
4438
- latitude: z.number().describe("Address latitude.").optional().nullable(),
4439
- longitude: z.number().describe("Address longitude.").optional().nullable()
4440
- }).describe("Coordinates of the physical address.").optional(),
4441
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
4442
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
4443
- subdivisions: z.array(
4444
- z.object({
4445
- code: z.string().describe("Short subdivision code.").optional(),
4446
- name: z.string().describe("Subdivision full name.").optional()
4447
- })
4448
- ).max(6).optional()
4449
- }),
4450
- z.xor([
4451
- z.object({
4452
- streetAddress: z.never().optional(),
4453
- addressLine: z.never().optional()
4454
- }),
4455
- z.object({
4456
- addressLine: z.never().optional(),
4457
- streetAddress: z.object({
4458
- number: z.string().describe("Street number.").optional(),
4459
- name: z.string().describe("Street name.").optional(),
4460
- apt: z.string().describe("Apartment number.").optional(),
4461
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
4462
- }).describe("Street name and number.")
4463
- }),
4464
- z.object({
4465
- streetAddress: z.never().optional(),
4466
- addressLine: z.string().describe(
4467
- "Main address line, usually street and number as free text."
4468
- )
4469
- })
4470
- ])
4471
- ).describe(
4472
- "Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
4473
- ).optional(),
4474
- from: z.object({
4475
- day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
4476
- month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
4477
- year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
4478
- }).describe("Start date and time of the range."),
4479
- until: z.object({
4480
- day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
4481
- month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
4482
- year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
4483
- }).describe("End date and time of the range.")
4484
- })
4485
- });
4486
- var ListAvailableDatesInRangeResponse = z.object({
4487
- availableDates: z.array(
4488
- z.object({
4489
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional(),
4490
- dates: z.array(
4491
- z.object({
4492
- day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
4493
- month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
4494
- year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
4495
- })
4496
- ).min(1).max(100).optional()
4497
- })
4498
- ).optional()
4499
- });
4500
- var CalculateAvailableDatesInRangeRequest = z.object({
4501
- operationId: z.string().describe("Operation ID.").regex(
4502
- /^[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}$/,
4503
- "Must be a valid GUID"
4504
- ),
4505
- options: z.object({
4506
- deliveryAddress: z.intersection(
4507
- z.object({
4508
- country: z.string().describe("Country code.").optional().nullable(),
4509
- subdivision: z.string().describe(
4510
- "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
4511
- ).optional().nullable(),
4512
- city: z.string().describe("City name.").optional().nullable(),
4513
- postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
4514
- addressLine2: z.string().describe(
4515
- "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
4516
- ).optional().nullable(),
4517
- formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
4518
- hint: z.string().describe("Free text to help find the address.").optional().nullable(),
4519
- geocode: z.object({
4520
- latitude: z.number().describe("Address latitude.").optional().nullable(),
4521
- longitude: z.number().describe("Address longitude.").optional().nullable()
4522
- }).describe("Coordinates of the physical address.").optional(),
4523
- countryFullname: z.string().describe("Country full name.").optional().nullable(),
4524
- subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
4525
- subdivisions: z.array(
4526
- z.object({
4527
- code: z.string().describe("Short subdivision code.").optional(),
4528
- name: z.string().describe("Subdivision full name.").optional()
4529
- })
4530
- ).max(6).optional()
4531
- }),
4532
- z.xor([
4533
- z.object({
4534
- streetAddress: z.never().optional(),
4535
- addressLine: z.never().optional()
4536
- }),
4537
- z.object({
4538
- addressLine: z.never().optional(),
4539
- streetAddress: z.object({
4540
- number: z.string().describe("Street number.").optional(),
4541
- name: z.string().describe("Street name.").optional(),
4542
- apt: z.string().describe("Apartment number.").optional(),
4543
- formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
4544
- }).describe("Street name and number.")
4545
- }),
4546
- z.object({
4547
- streetAddress: z.never().optional(),
4548
- addressLine: z.string().describe(
4549
- "Main address line, usually street and number as free text."
4550
- )
4551
- })
4552
- ])
4553
- ).describe(
4554
- "Delivery address.\n\nDelivery fulfillment methods are only considered when calculating date availability if a delivery address is specified."
4555
- ).optional(),
4556
- from: z.object({
4557
- day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
4558
- month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
4559
- year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
4560
- }).describe("Start date and time of the range."),
4561
- until: z.object({
4562
- day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
4563
- month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
4564
- year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
4565
- }).describe("End date and time of the range.")
4566
- })
4567
- });
4568
- var CalculateAvailableDatesInRangeResponse = z.object({
4569
- availableDatesPerFulfillmentType: z.array(
4570
- z.object({
4571
- fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional(),
4572
- dates: z.array(
4573
- z.object({
4574
- day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
4575
- month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
4576
- year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
4577
- })
4578
- ).min(1).max(100).optional()
4579
- })
4580
- ).optional()
4581
- });
4582
- var ValidateOperationAddressRequest = z.object({
4583
- operationId: z.string().describe("The ID of the operation whose address should be validated.").regex(
4584
- /^[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}$/,
4585
- "Must be a valid GUID"
4586
- )
4587
- });
4588
- var ValidateOperationAddressResponse = z.object({
4589
- valid: z.boolean().describe("Whether the address is valid.").optional(),
4590
- violations: z.array(
4591
- z.object({
4592
- type: z.enum([
4593
- "UNKNOWN",
4594
- "NO_ADDRESS",
4595
- "MISSING_FORMATTED_ADDRESS",
4596
- "INVALID_GEOCODE",
4597
- "MISSING_COUNTRY",
4598
- "MISSING_SUBDIVISION"
4599
- ]).describe("Type of violation in the address.").optional()
4600
- })
4601
- ).max(5).optional()
4602
- });
4603
- var BulkUpdateOperationTagsRequest = z.object({
4604
- operationIds: z.array(z.string()).min(1).max(100),
4605
- options: z.object({
4606
- assignTags: z.object({
4607
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4608
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4609
- ).optional(),
4610
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4611
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4612
- ).optional()
4613
- }).describe("Tags to assign to the operations.").optional(),
4614
- unassignTags: z.object({
4615
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4616
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4617
- ).optional(),
4618
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4619
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4620
- ).optional()
4621
- }).describe("Tags to unassign from the operations.").optional()
4622
- }).optional()
4623
- });
4624
- var BulkUpdateOperationTagsResponse = z.object({
4625
- results: z.array(
4626
- z.object({
4627
- itemMetadata: z.object({
4628
- _id: z.string().describe(
4629
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
4630
- ).regex(
4631
- /^[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}$/,
4632
- "Must be a valid GUID"
4633
- ).optional().nullable(),
4634
- originalIndex: z.number().int().describe(
4635
- "Index of the item within the request array. Allows for correlation between request and response items."
4636
- ).optional(),
4637
- success: z.boolean().describe(
4638
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
4639
- ).optional(),
4640
- error: z.object({
4641
- code: z.string().describe("Error code.").optional(),
4642
- description: z.string().describe("Description of the error.").optional(),
4643
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
4644
- }).describe("Details about the error in case of failure.").optional()
4645
- }).describe("Metadata for the updated operation.").optional()
4646
- })
4647
- ).min(1).max(100).optional(),
4648
- bulkActionMetadata: z.object({
4649
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
4650
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
4651
- undetailedFailures: z.number().int().describe(
4652
- "Number of failures without details because detailed failure threshold was exceeded."
4653
- ).optional()
4654
- }).describe("Metadata for the bulk update.").optional()
4655
- });
4656
- var BulkUpdateOperationTagsByFilterRequest = z.object({
4657
- filter: z.record(z.string(), z.any()).describe("Filter that determines which operations to update tags for."),
4658
- options: z.object({
4659
- assignTags: z.object({
4660
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4661
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4662
- ).optional(),
4663
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4664
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4665
- ).optional()
4666
- }).describe("Tags to assign to the operations.").optional(),
4667
- unassignTags: z.object({
4668
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4669
- "Tags that require an additional permission in order to access them, normally not given to site members or visitors."
4670
- ).optional(),
4671
- tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
4672
- "Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
4673
- ).optional()
4674
- }).describe("Tags to unassign from the operations.").optional()
4675
- }).optional()
4676
- });
4677
- var BulkUpdateOperationTagsByFilterResponse = z.object({
4678
- jobId: z.string().describe(
4679
- "Job ID. Pass this ID to Get Async Job ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/get-async-job) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/get-async-job)) to track the job's status."
4680
- ).regex(
4681
- /^[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}$/,
4682
- "Must be a valid GUID"
4683
- ).optional()
4684
- });
4685
-
4686
- // src/restaurants-operations-v1-operation-operations.universal.ts
4687
1108
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
4688
1109
  var SchedulingType = /* @__PURE__ */ ((SchedulingType2) => {
4689
1110
  SchedulingType2["ASAP"] = "ASAP";
@@ -4904,10 +1325,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
4904
1325
  return WebhookIdentityType2;
4905
1326
  })(WebhookIdentityType || {});
4906
1327
  async function listBlockedPeriods2(operationId, options) {
4907
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
4908
- if (validateRequestSchema) {
4909
- ListBlockedPeriodsRequest.parse({ operationId, options });
4910
- }
1328
+ const { httpClient, sideEffects } = arguments[2];
4911
1329
  const payload = renameKeysFromSDKRequestToRESTRequest({
4912
1330
  operationId,
4913
1331
  from: options?.from,
@@ -4938,10 +1356,7 @@ async function listBlockedPeriods2(operationId, options) {
4938
1356
  }
4939
1357
  }
4940
1358
  async function createOperation2(operation) {
4941
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4942
- if (validateRequestSchema) {
4943
- CreateOperationRequest.parse({ operation });
4944
- }
1359
+ const { httpClient, sideEffects } = arguments[1];
4945
1360
  const payload = transformPaths2(
4946
1361
  renameKeysFromSDKRequestToRESTRequest({ operation }),
4947
1362
  [
@@ -4979,10 +1394,7 @@ async function createOperation2(operation) {
4979
1394
  }
4980
1395
  }
4981
1396
  async function getOperation2(operationId) {
4982
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4983
- if (validateRequestSchema) {
4984
- GetOperationRequest.parse({ operationId });
4985
- }
1397
+ const { httpClient, sideEffects } = arguments[1];
4986
1398
  const payload = renameKeysFromSDKRequestToRESTRequest({
4987
1399
  operationId
4988
1400
  });
@@ -5014,10 +1426,7 @@ async function getOperation2(operationId) {
5014
1426
  }
5015
1427
  }
5016
1428
  async function updateOperation2(_id, operation) {
5017
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5018
- if (validateRequestSchema) {
5019
- UpdateOperationRequest.parse({ _id, operation });
5020
- }
1429
+ const { httpClient, sideEffects } = arguments[2];
5021
1430
  const payload = transformPaths2(
5022
1431
  renameKeysFromSDKRequestToRESTRequest({
5023
1432
  operation: { ...operation, id: _id }
@@ -5057,10 +1466,7 @@ async function updateOperation2(_id, operation) {
5057
1466
  }
5058
1467
  }
5059
1468
  async function deleteOperation2(operationId) {
5060
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5061
- if (validateRequestSchema) {
5062
- DeleteOperationRequest.parse({ operationId });
5063
- }
1469
+ const { httpClient, sideEffects } = arguments[1];
5064
1470
  const payload = renameKeysFromSDKRequestToRESTRequest({
5065
1471
  operationId
5066
1472
  });
@@ -5132,10 +1538,7 @@ function queryOperation2() {
5132
1538
  });
5133
1539
  }
5134
1540
  async function typedQueryOperation(query) {
5135
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5136
- if (validateRequestSchema) {
5137
- QueryOperationRequest.parse({ query });
5138
- }
1541
+ const { httpClient, sideEffects } = arguments[1];
5139
1542
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
5140
1543
  const reqOpts = queryOperation(payload);
5141
1544
  sideEffects?.onSiteCall?.();
@@ -5170,10 +1573,7 @@ var utils = {
5170
1573
  }
5171
1574
  };
5172
1575
  async function listOperations2() {
5173
- const { httpClient, sideEffects, validateRequestSchema } = arguments[0];
5174
- if (validateRequestSchema) {
5175
- ListOperationsRequest.parse({});
5176
- }
1576
+ const { httpClient, sideEffects } = arguments[0];
5177
1577
  const payload = renameKeysFromSDKRequestToRESTRequest({});
5178
1578
  const reqOpts = listOperations(payload);
5179
1579
  sideEffects?.onSiteCall?.();
@@ -5203,13 +1603,7 @@ async function listOperations2() {
5203
1603
  }
5204
1604
  }
5205
1605
  async function listAvailableFulfillmentOptions2(operationId, options) {
5206
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5207
- if (validateRequestSchema) {
5208
- ListAvailableFulfillmentOptionsRequest.parse({
5209
- operationId,
5210
- options
5211
- });
5212
- }
1606
+ const { httpClient, sideEffects } = arguments[2];
5213
1607
  const payload = transformPaths2(
5214
1608
  renameKeysFromSDKRequestToRESTRequest({
5215
1609
  operationId,
@@ -5258,13 +1652,7 @@ async function listAvailableFulfillmentOptions2(operationId, options) {
5258
1652
  }
5259
1653
  }
5260
1654
  async function listFirstAvailableTimeSlotForFulfillmentTypes2(operationId, options) {
5261
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5262
- if (validateRequestSchema) {
5263
- ListFirstAvailableTimeSlotForFulfillmentTypesRequest.parse({
5264
- operationId,
5265
- options
5266
- });
5267
- }
1655
+ const { httpClient, sideEffects } = arguments[2];
5268
1656
  const payload = transformPaths2(
5269
1657
  renameKeysFromSDKRequestToRESTRequest({
5270
1658
  operationId,
@@ -5310,13 +1698,7 @@ async function listFirstAvailableTimeSlotForFulfillmentTypes2(operationId, optio
5310
1698
  }
5311
1699
  }
5312
1700
  async function calculateFirstAvailableTimeSlotPerFulfillmentType2(operationId, options) {
5313
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5314
- if (validateRequestSchema) {
5315
- CalculateFirstAvailableTimeSlotPerFulfillmentTypeRequest.parse({
5316
- operationId,
5317
- options
5318
- });
5319
- }
1701
+ const { httpClient, sideEffects } = arguments[2];
5320
1702
  const payload = transformPaths2(
5321
1703
  renameKeysFromSDKRequestToRESTRequest({
5322
1704
  operationId,
@@ -5364,13 +1746,7 @@ async function calculateFirstAvailableTimeSlotPerFulfillmentType2(operationId, o
5364
1746
  }
5365
1747
  }
5366
1748
  async function listFirstAvailableTimeSlotsForOperations2(operationIds, options) {
5367
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5368
- if (validateRequestSchema) {
5369
- ListFirstAvailableTimeSlotsForOperationsRequest.parse({
5370
- operationIds,
5371
- options
5372
- });
5373
- }
1749
+ const { httpClient, sideEffects } = arguments[2];
5374
1750
  const payload = transformPaths2(
5375
1751
  renameKeysFromSDKRequestToRESTRequest({
5376
1752
  operationIds,
@@ -5416,13 +1792,7 @@ async function listFirstAvailableTimeSlotsForOperations2(operationIds, options)
5416
1792
  }
5417
1793
  }
5418
1794
  async function calculateFirstAvailableTimeSlotsPerOperation2(operationIds, options) {
5419
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5420
- if (validateRequestSchema) {
5421
- CalculateFirstAvailableTimeSlotsPerOperationRequest.parse({
5422
- operationIds,
5423
- options
5424
- });
5425
- }
1795
+ const { httpClient, sideEffects } = arguments[2];
5426
1796
  const payload = transformPaths2(
5427
1797
  renameKeysFromSDKRequestToRESTRequest({
5428
1798
  operationIds,
@@ -5472,13 +1842,7 @@ async function calculateFirstAvailableTimeSlotsPerOperation2(operationIds, optio
5472
1842
  }
5473
1843
  }
5474
1844
  async function listFirstAvailableTimeSlotsForMenus2(operationId, options) {
5475
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5476
- if (validateRequestSchema) {
5477
- ListFirstAvailableTimeSlotsForMenusRequest.parse({
5478
- operationId,
5479
- options
5480
- });
5481
- }
1845
+ const { httpClient, sideEffects } = arguments[2];
5482
1846
  const payload = transformPaths2(
5483
1847
  renameKeysFromSDKRequestToRESTRequest({
5484
1848
  operationId,
@@ -5530,13 +1894,7 @@ async function listFirstAvailableTimeSlotsForMenus2(operationId, options) {
5530
1894
  }
5531
1895
  }
5532
1896
  async function calculateFirstAvailableTimeSlotsPerMenu2(operationId, options) {
5533
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5534
- if (validateRequestSchema) {
5535
- CalculateFirstAvailableTimeSlotsPerMenuRequest.parse({
5536
- operationId,
5537
- options
5538
- });
5539
- }
1897
+ const { httpClient, sideEffects } = arguments[2];
5540
1898
  const payload = transformPaths2(
5541
1899
  renameKeysFromSDKRequestToRESTRequest({
5542
1900
  operationId,
@@ -5590,14 +1948,7 @@ async function calculateFirstAvailableTimeSlotsPerMenu2(operationId, options) {
5590
1948
  }
5591
1949
  }
5592
1950
  async function calculateFirstAvailableTimeSlotsForItem2(operationId, menuId, options) {
5593
- const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
5594
- if (validateRequestSchema) {
5595
- CalculateFirstAvailableTimeSlotsForItemRequest.parse({
5596
- operationId,
5597
- menuId,
5598
- options
5599
- });
5600
- }
1951
+ const { httpClient, sideEffects } = arguments[3];
5601
1952
  const payload = transformPaths2(
5602
1953
  renameKeysFromSDKRequestToRESTRequest({
5603
1954
  operationId,
@@ -5651,10 +2002,7 @@ async function calculateFirstAvailableTimeSlotsForItem2(operationId, menuId, opt
5651
2002
  }
5652
2003
  }
5653
2004
  async function listAvailableTimeSlotsForDate2(operationId, options) {
5654
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5655
- if (validateRequestSchema) {
5656
- ListAvailableTimeSlotsForDateRequest.parse({ operationId, options });
5657
- }
2005
+ const { httpClient, sideEffects } = arguments[2];
5658
2006
  const payload = transformPaths2(
5659
2007
  renameKeysFromSDKRequestToRESTRequest({
5660
2008
  operationId,
@@ -5702,13 +2050,7 @@ async function listAvailableTimeSlotsForDate2(operationId, options) {
5702
2050
  }
5703
2051
  }
5704
2052
  async function calculateAvailableTimeSlotsForDate2(operationId, options) {
5705
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5706
- if (validateRequestSchema) {
5707
- CalculateAvailableTimeSlotsForDateRequest.parse({
5708
- operationId,
5709
- options
5710
- });
5711
- }
2053
+ const { httpClient, sideEffects } = arguments[2];
5712
2054
  const payload = transformPaths2(
5713
2055
  renameKeysFromSDKRequestToRESTRequest({
5714
2056
  operationId,
@@ -5758,10 +2100,7 @@ async function calculateAvailableTimeSlotsForDate2(operationId, options) {
5758
2100
  }
5759
2101
  }
5760
2102
  async function listAvailableDatesInRange2(operationId, options) {
5761
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5762
- if (validateRequestSchema) {
5763
- ListAvailableDatesInRangeRequest.parse({ operationId, options });
5764
- }
2103
+ const { httpClient, sideEffects } = arguments[2];
5765
2104
  const payload = transformPaths2(
5766
2105
  renameKeysFromSDKRequestToRESTRequest({
5767
2106
  operationId,
@@ -5804,10 +2143,7 @@ async function listAvailableDatesInRange2(operationId, options) {
5804
2143
  }
5805
2144
  }
5806
2145
  async function calculateAvailableDatesInRange2(operationId, options) {
5807
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5808
- if (validateRequestSchema) {
5809
- CalculateAvailableDatesInRangeRequest.parse({ operationId, options });
5810
- }
2146
+ const { httpClient, sideEffects } = arguments[2];
5811
2147
  const payload = transformPaths2(
5812
2148
  renameKeysFromSDKRequestToRESTRequest({
5813
2149
  operationId,
@@ -5850,10 +2186,7 @@ async function calculateAvailableDatesInRange2(operationId, options) {
5850
2186
  }
5851
2187
  }
5852
2188
  async function validateOperationAddress2(operationId) {
5853
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
5854
- if (validateRequestSchema) {
5855
- ValidateOperationAddressRequest.parse({ operationId });
5856
- }
2189
+ const { httpClient, sideEffects } = arguments[1];
5857
2190
  const payload = renameKeysFromSDKRequestToRESTRequest({
5858
2191
  operationId
5859
2192
  });
@@ -5880,10 +2213,7 @@ async function validateOperationAddress2(operationId) {
5880
2213
  }
5881
2214
  }
5882
2215
  async function bulkUpdateOperationTags2(operationIds, options) {
5883
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5884
- if (validateRequestSchema) {
5885
- BulkUpdateOperationTagsRequest.parse({ operationIds, options });
5886
- }
2216
+ const { httpClient, sideEffects } = arguments[2];
5887
2217
  const payload = renameKeysFromSDKRequestToRESTRequest({
5888
2218
  operationIds,
5889
2219
  assignTags: options?.assignTags,
@@ -5916,10 +2246,7 @@ async function bulkUpdateOperationTags2(operationIds, options) {
5916
2246
  }
5917
2247
  }
5918
2248
  async function bulkUpdateOperationTagsByFilter2(filter, options) {
5919
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
5920
- if (validateRequestSchema) {
5921
- BulkUpdateOperationTagsByFilterRequest.parse({ filter, options });
5922
- }
2249
+ const { httpClient, sideEffects } = arguments[2];
5923
2250
  const payload = renameKeysFromSDKRequestToRESTRequest({
5924
2251
  filter,
5925
2252
  assignTags: options?.assignTags,