@wix/auto_sdk_restaurants_operations 1.0.89 → 1.0.91

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