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