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