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