@wix/auto_sdk_restaurants_operations 1.0.84 → 1.0.85
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.js +0 -12
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +12 -35
- package/build/cjs/index.typings.js +0 -12
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +12 -35
- package/build/cjs/meta.js +0 -12
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +2457 -0
- package/build/cjs/schemas.js +3703 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.mjs +0 -12
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +12 -35
- package/build/es/index.typings.mjs +0 -12
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +12 -35
- package/build/es/meta.mjs +0 -12
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +2457 -0
- package/build/es/schemas.mjs +3623 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.js +0 -12
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +12 -35
- package/build/internal/cjs/index.typings.js +0 -12
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +12 -35
- package/build/internal/cjs/meta.js +0 -12
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +2457 -0
- package/build/internal/cjs/schemas.js +3703 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.mjs +0 -12
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +12 -35
- package/build/internal/es/index.typings.mjs +0 -12
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +12 -35
- package/build/internal/es/meta.mjs +0 -12
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +2457 -0
- package/build/internal/es/schemas.mjs +3623 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,3703 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// schemas.ts
|
|
31
|
+
var schemas_exports = {};
|
|
32
|
+
__export(schemas_exports, {
|
|
33
|
+
BulkUpdateOperationTagsByFilterRequest: () => BulkUpdateOperationTagsByFilterRequest,
|
|
34
|
+
BulkUpdateOperationTagsByFilterResponse: () => BulkUpdateOperationTagsByFilterResponse,
|
|
35
|
+
BulkUpdateOperationTagsRequest: () => BulkUpdateOperationTagsRequest,
|
|
36
|
+
BulkUpdateOperationTagsResponse: () => BulkUpdateOperationTagsResponse,
|
|
37
|
+
CalculateAvailableDatesInRangeRequest: () => CalculateAvailableDatesInRangeRequest,
|
|
38
|
+
CalculateAvailableDatesInRangeResponse: () => CalculateAvailableDatesInRangeResponse,
|
|
39
|
+
CalculateAvailableTimeSlotsForDateRequest: () => CalculateAvailableTimeSlotsForDateRequest,
|
|
40
|
+
CalculateAvailableTimeSlotsForDateResponse: () => CalculateAvailableTimeSlotsForDateResponse,
|
|
41
|
+
CalculateFirstAvailableTimeSlotPerFulfillmentTypeRequest: () => CalculateFirstAvailableTimeSlotPerFulfillmentTypeRequest,
|
|
42
|
+
CalculateFirstAvailableTimeSlotPerFulfillmentTypeResponse: () => CalculateFirstAvailableTimeSlotPerFulfillmentTypeResponse,
|
|
43
|
+
CalculateFirstAvailableTimeSlotsForItemRequest: () => CalculateFirstAvailableTimeSlotsForItemRequest,
|
|
44
|
+
CalculateFirstAvailableTimeSlotsForItemResponse: () => CalculateFirstAvailableTimeSlotsForItemResponse,
|
|
45
|
+
CalculateFirstAvailableTimeSlotsPerMenuRequest: () => CalculateFirstAvailableTimeSlotsPerMenuRequest,
|
|
46
|
+
CalculateFirstAvailableTimeSlotsPerMenuResponse: () => CalculateFirstAvailableTimeSlotsPerMenuResponse,
|
|
47
|
+
CalculateFirstAvailableTimeSlotsPerOperationRequest: () => CalculateFirstAvailableTimeSlotsPerOperationRequest,
|
|
48
|
+
CalculateFirstAvailableTimeSlotsPerOperationResponse: () => CalculateFirstAvailableTimeSlotsPerOperationResponse,
|
|
49
|
+
CreateOperationRequest: () => CreateOperationRequest,
|
|
50
|
+
CreateOperationResponse: () => CreateOperationResponse,
|
|
51
|
+
DeleteOperationRequest: () => DeleteOperationRequest,
|
|
52
|
+
DeleteOperationResponse: () => DeleteOperationResponse,
|
|
53
|
+
GetOperationRequest: () => GetOperationRequest,
|
|
54
|
+
GetOperationResponse: () => GetOperationResponse,
|
|
55
|
+
ListAvailableDatesInRangeRequest: () => ListAvailableDatesInRangeRequest,
|
|
56
|
+
ListAvailableDatesInRangeResponse: () => ListAvailableDatesInRangeResponse,
|
|
57
|
+
ListAvailableFulfillmentOptionsRequest: () => ListAvailableFulfillmentOptionsRequest,
|
|
58
|
+
ListAvailableFulfillmentOptionsResponse: () => ListAvailableFulfillmentOptionsResponse,
|
|
59
|
+
ListAvailableTimeSlotsForDateRequest: () => ListAvailableTimeSlotsForDateRequest,
|
|
60
|
+
ListAvailableTimeSlotsForDateResponse: () => ListAvailableTimeSlotsForDateResponse,
|
|
61
|
+
ListBlockedPeriodsRequest: () => ListBlockedPeriodsRequest,
|
|
62
|
+
ListBlockedPeriodsResponse: () => ListBlockedPeriodsResponse,
|
|
63
|
+
ListFirstAvailableTimeSlotForFulfillmentTypesRequest: () => ListFirstAvailableTimeSlotForFulfillmentTypesRequest,
|
|
64
|
+
ListFirstAvailableTimeSlotForFulfillmentTypesResponse: () => ListFirstAvailableTimeSlotForFulfillmentTypesResponse,
|
|
65
|
+
ListFirstAvailableTimeSlotsForMenusRequest: () => ListFirstAvailableTimeSlotsForMenusRequest,
|
|
66
|
+
ListFirstAvailableTimeSlotsForMenusResponse: () => ListFirstAvailableTimeSlotsForMenusResponse,
|
|
67
|
+
ListFirstAvailableTimeSlotsForOperationsRequest: () => ListFirstAvailableTimeSlotsForOperationsRequest,
|
|
68
|
+
ListFirstAvailableTimeSlotsForOperationsResponse: () => ListFirstAvailableTimeSlotsForOperationsResponse,
|
|
69
|
+
ListOperationsRequest: () => ListOperationsRequest,
|
|
70
|
+
ListOperationsResponse: () => ListOperationsResponse,
|
|
71
|
+
QueryOperationRequest: () => QueryOperationRequest,
|
|
72
|
+
QueryOperationResponse: () => QueryOperationResponse,
|
|
73
|
+
UpdateOperationRequest: () => UpdateOperationRequest,
|
|
74
|
+
UpdateOperationResponse: () => UpdateOperationResponse,
|
|
75
|
+
ValidateOperationAddressRequest: () => ValidateOperationAddressRequest,
|
|
76
|
+
ValidateOperationAddressResponse: () => ValidateOperationAddressResponse
|
|
77
|
+
});
|
|
78
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
79
|
+
|
|
80
|
+
// src/restaurants-operations-v1-operation-operations.schemas.ts
|
|
81
|
+
var z = __toESM(require("zod"));
|
|
82
|
+
var ListBlockedPeriodsRequest = z.object({
|
|
83
|
+
operationId: z.string().describe(
|
|
84
|
+
"ID of the restaurant operation this blocked period is associated with. (See the Restaurants Operations API for more information.)"
|
|
85
|
+
).regex(
|
|
86
|
+
/^[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}$/,
|
|
87
|
+
"Must be a valid GUID"
|
|
88
|
+
),
|
|
89
|
+
options: z.object({
|
|
90
|
+
from: z.date().describe(
|
|
91
|
+
"Start time of the desired window. If not specified, the current time is used."
|
|
92
|
+
).optional().nullable(),
|
|
93
|
+
until: z.date().describe("End time of the desired window.")
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
var ListBlockedPeriodsResponse = z.object({
|
|
97
|
+
blockPeriods: z.array(
|
|
98
|
+
z.object({
|
|
99
|
+
from: z.date().describe("The start time at which the restaurant can accept orders").optional().nullable(),
|
|
100
|
+
until: z.date().describe("The end time at which the restaurant can accept orders").optional().nullable()
|
|
101
|
+
})
|
|
102
|
+
).max(1e3).optional()
|
|
103
|
+
});
|
|
104
|
+
var CreateOperationRequest = z.object({
|
|
105
|
+
operation: z.intersection(
|
|
106
|
+
z.object({
|
|
107
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
108
|
+
/^[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}$/,
|
|
109
|
+
"Must be a valid GUID"
|
|
110
|
+
).optional().nullable(),
|
|
111
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
112
|
+
"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."
|
|
113
|
+
).optional().nullable(),
|
|
114
|
+
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
115
|
+
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
116
|
+
name: z.string().describe("Operation name.").optional().nullable(),
|
|
117
|
+
default: z.boolean().describe(
|
|
118
|
+
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
119
|
+
).optional().nullable(),
|
|
120
|
+
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
121
|
+
onlineOrderingStatus: z.enum([
|
|
122
|
+
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
123
|
+
"ENABLED",
|
|
124
|
+
"DISABLED",
|
|
125
|
+
"PAUSED_UNTIL"
|
|
126
|
+
]).optional(),
|
|
127
|
+
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).optional(),
|
|
128
|
+
orderScheduling: z.intersection(
|
|
129
|
+
z.object({ type: z.enum(["ASAP", "PREORDER"]).optional() }),
|
|
130
|
+
z.xor([
|
|
131
|
+
z.object({
|
|
132
|
+
asapOptions: z.never().optional(),
|
|
133
|
+
preorderOptions: z.never().optional()
|
|
134
|
+
}),
|
|
135
|
+
z.object({
|
|
136
|
+
preorderOptions: z.never().optional(),
|
|
137
|
+
asapOptions: z.intersection(
|
|
138
|
+
z.object({
|
|
139
|
+
preparationTime: z.intersection(
|
|
140
|
+
z.object({
|
|
141
|
+
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
142
|
+
}),
|
|
143
|
+
z.xor([
|
|
144
|
+
z.object({
|
|
145
|
+
maxTimeOptions: z.never().optional(),
|
|
146
|
+
timeRangeOptions: z.never().optional()
|
|
147
|
+
}),
|
|
148
|
+
z.object({
|
|
149
|
+
timeRangeOptions: z.never().optional(),
|
|
150
|
+
maxTimeOptions: z.object({
|
|
151
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
152
|
+
duration: z.number().int().describe(
|
|
153
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
154
|
+
).min(0).optional().nullable()
|
|
155
|
+
}).describe(
|
|
156
|
+
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
157
|
+
)
|
|
158
|
+
}),
|
|
159
|
+
z.object({
|
|
160
|
+
maxTimeOptions: z.never().optional(),
|
|
161
|
+
timeRangeOptions: z.object({
|
|
162
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
163
|
+
minDuration: z.number().int().describe(
|
|
164
|
+
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
165
|
+
).min(1).optional().nullable(),
|
|
166
|
+
maxDuration: z.number().int().describe(
|
|
167
|
+
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
168
|
+
).min(1).optional().nullable()
|
|
169
|
+
}).describe(
|
|
170
|
+
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
171
|
+
)
|
|
172
|
+
})
|
|
173
|
+
])
|
|
174
|
+
).describe(
|
|
175
|
+
"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."
|
|
176
|
+
).optional(),
|
|
177
|
+
asapFutureHandlingType: z.enum([
|
|
178
|
+
"NO_FUTURE_HANDLING",
|
|
179
|
+
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
180
|
+
]).describe(
|
|
181
|
+
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
182
|
+
).optional()
|
|
183
|
+
}),
|
|
184
|
+
z.xor([
|
|
185
|
+
z.object({
|
|
186
|
+
businessDaysAheadHandlingOptions: z.never().optional()
|
|
187
|
+
}),
|
|
188
|
+
z.object({
|
|
189
|
+
businessDaysAheadHandlingOptions: z.object({
|
|
190
|
+
daysCount: z.number().int().describe(
|
|
191
|
+
"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."
|
|
192
|
+
).min(0).optional().nullable()
|
|
193
|
+
}).describe(
|
|
194
|
+
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
195
|
+
)
|
|
196
|
+
})
|
|
197
|
+
])
|
|
198
|
+
).describe(
|
|
199
|
+
"Options for scheduling. Required if `type` is `ASAP`."
|
|
200
|
+
)
|
|
201
|
+
}),
|
|
202
|
+
z.object({
|
|
203
|
+
asapOptions: z.never().optional(),
|
|
204
|
+
preorderOptions: z.object({
|
|
205
|
+
method: z.intersection(
|
|
206
|
+
z.object({
|
|
207
|
+
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
208
|
+
"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."
|
|
209
|
+
).optional()
|
|
210
|
+
}),
|
|
211
|
+
z.xor([
|
|
212
|
+
z.object({
|
|
213
|
+
timeBoundedOptions: z.never().optional(),
|
|
214
|
+
weeklyScheduleOptions: z.never().optional()
|
|
215
|
+
}),
|
|
216
|
+
z.object({
|
|
217
|
+
weeklyScheduleOptions: z.never().optional(),
|
|
218
|
+
timeBoundedOptions: z.object({
|
|
219
|
+
minTimeInAdvance: z.object({
|
|
220
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
221
|
+
"Unit of time for the duration."
|
|
222
|
+
).optional(),
|
|
223
|
+
duration: z.number().int().describe(
|
|
224
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
225
|
+
).min(0).optional().nullable()
|
|
226
|
+
}).describe(
|
|
227
|
+
"Minimum time required to schedule the order."
|
|
228
|
+
).optional(),
|
|
229
|
+
maxTimeInAdvance: z.object({
|
|
230
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
231
|
+
"Unit of time for the duration."
|
|
232
|
+
).optional(),
|
|
233
|
+
duration: z.number().int().describe(
|
|
234
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
235
|
+
).min(0).optional().nullable()
|
|
236
|
+
}).describe(
|
|
237
|
+
"Maximum time allowed to schedule the order."
|
|
238
|
+
).optional()
|
|
239
|
+
}).describe(
|
|
240
|
+
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
241
|
+
)
|
|
242
|
+
}),
|
|
243
|
+
z.object({
|
|
244
|
+
timeBoundedOptions: z.never().optional(),
|
|
245
|
+
weeklyScheduleOptions: z.object({
|
|
246
|
+
cutOffTime: z.object({
|
|
247
|
+
dayOfWeek: z.enum([
|
|
248
|
+
"MON",
|
|
249
|
+
"TUE",
|
|
250
|
+
"WED",
|
|
251
|
+
"THU",
|
|
252
|
+
"FRI",
|
|
253
|
+
"SAT",
|
|
254
|
+
"SUN"
|
|
255
|
+
]).describe("Day of the week.").optional(),
|
|
256
|
+
timeOfDay: z.object({
|
|
257
|
+
hours: z.number().int().describe(
|
|
258
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
259
|
+
).optional(),
|
|
260
|
+
minutes: z.number().int().describe(
|
|
261
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
262
|
+
).optional()
|
|
263
|
+
}).describe("Time of the day.").optional()
|
|
264
|
+
}).describe(
|
|
265
|
+
"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."
|
|
266
|
+
).optional()
|
|
267
|
+
}).describe(
|
|
268
|
+
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
269
|
+
)
|
|
270
|
+
})
|
|
271
|
+
])
|
|
272
|
+
).optional(),
|
|
273
|
+
fulfillmentTimesDisplay: z.intersection(
|
|
274
|
+
z.object({
|
|
275
|
+
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
276
|
+
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
277
|
+
).optional()
|
|
278
|
+
}),
|
|
279
|
+
z.xor([
|
|
280
|
+
z.object({
|
|
281
|
+
timeWindowsOptions: z.never().optional()
|
|
282
|
+
}),
|
|
283
|
+
z.object({
|
|
284
|
+
timeWindowsOptions: z.object({
|
|
285
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
286
|
+
duration: z.number().int().describe(
|
|
287
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
288
|
+
).min(0).optional().nullable()
|
|
289
|
+
}).describe(
|
|
290
|
+
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
291
|
+
)
|
|
292
|
+
})
|
|
293
|
+
])
|
|
294
|
+
).describe(
|
|
295
|
+
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
296
|
+
).optional()
|
|
297
|
+
}).describe(
|
|
298
|
+
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
299
|
+
)
|
|
300
|
+
})
|
|
301
|
+
])
|
|
302
|
+
).describe("Information about when an order can be placed for.").optional(),
|
|
303
|
+
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
304
|
+
/^[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}$/,
|
|
305
|
+
"Must be a valid GUID"
|
|
306
|
+
).optional().nullable(),
|
|
307
|
+
businessLocationId: z.string().describe(
|
|
308
|
+
"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."
|
|
309
|
+
).regex(
|
|
310
|
+
/^[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}$/,
|
|
311
|
+
"Must be a valid GUID"
|
|
312
|
+
).optional().nullable(),
|
|
313
|
+
extendedFields: z.object({
|
|
314
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
315
|
+
"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)."
|
|
316
|
+
).optional()
|
|
317
|
+
}).describe("Extended fields.").optional(),
|
|
318
|
+
tags: z.object({
|
|
319
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
320
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
321
|
+
).optional(),
|
|
322
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
323
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
324
|
+
).optional()
|
|
325
|
+
}).describe(
|
|
326
|
+
"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."
|
|
327
|
+
).optional()
|
|
328
|
+
}),
|
|
329
|
+
z.xor([
|
|
330
|
+
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
331
|
+
z.object({
|
|
332
|
+
pausedUntilOptions: z.object({
|
|
333
|
+
time: z.date().describe(
|
|
334
|
+
"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."
|
|
335
|
+
).optional().nullable()
|
|
336
|
+
}).describe(
|
|
337
|
+
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
338
|
+
)
|
|
339
|
+
})
|
|
340
|
+
])
|
|
341
|
+
).describe("Operation to create.")
|
|
342
|
+
});
|
|
343
|
+
var CreateOperationResponse = z.intersection(
|
|
344
|
+
z.object({
|
|
345
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
346
|
+
/^[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}$/,
|
|
347
|
+
"Must be a valid GUID"
|
|
348
|
+
).optional().nullable(),
|
|
349
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
350
|
+
"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."
|
|
351
|
+
).optional().nullable(),
|
|
352
|
+
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
353
|
+
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
354
|
+
name: z.string().describe("Operation name.").optional().nullable(),
|
|
355
|
+
default: z.boolean().describe(
|
|
356
|
+
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
357
|
+
).optional().nullable(),
|
|
358
|
+
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
359
|
+
onlineOrderingStatus: z.enum([
|
|
360
|
+
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
361
|
+
"ENABLED",
|
|
362
|
+
"DISABLED",
|
|
363
|
+
"PAUSED_UNTIL"
|
|
364
|
+
]).describe("Online ordering status of the operation. <br />").optional(),
|
|
365
|
+
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
|
|
366
|
+
orderScheduling: z.intersection(
|
|
367
|
+
z.object({
|
|
368
|
+
type: z.enum(["ASAP", "PREORDER"]).describe(
|
|
369
|
+
"Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
|
|
370
|
+
).optional()
|
|
371
|
+
}),
|
|
372
|
+
z.xor([
|
|
373
|
+
z.object({
|
|
374
|
+
asapOptions: z.never().optional(),
|
|
375
|
+
preorderOptions: z.never().optional()
|
|
376
|
+
}),
|
|
377
|
+
z.object({
|
|
378
|
+
preorderOptions: z.never().optional(),
|
|
379
|
+
asapOptions: z.intersection(
|
|
380
|
+
z.object({
|
|
381
|
+
preparationTime: z.intersection(
|
|
382
|
+
z.object({
|
|
383
|
+
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
384
|
+
}),
|
|
385
|
+
z.xor([
|
|
386
|
+
z.object({
|
|
387
|
+
maxTimeOptions: z.never().optional(),
|
|
388
|
+
timeRangeOptions: z.never().optional()
|
|
389
|
+
}),
|
|
390
|
+
z.object({
|
|
391
|
+
timeRangeOptions: z.never().optional(),
|
|
392
|
+
maxTimeOptions: z.object({
|
|
393
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
394
|
+
duration: z.number().int().describe(
|
|
395
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
396
|
+
).min(0).optional().nullable()
|
|
397
|
+
}).describe(
|
|
398
|
+
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
399
|
+
)
|
|
400
|
+
}),
|
|
401
|
+
z.object({
|
|
402
|
+
maxTimeOptions: z.never().optional(),
|
|
403
|
+
timeRangeOptions: z.object({
|
|
404
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
405
|
+
minDuration: z.number().int().describe(
|
|
406
|
+
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
407
|
+
).min(1).optional().nullable(),
|
|
408
|
+
maxDuration: z.number().int().describe(
|
|
409
|
+
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
410
|
+
).min(1).optional().nullable()
|
|
411
|
+
}).describe(
|
|
412
|
+
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
413
|
+
)
|
|
414
|
+
})
|
|
415
|
+
])
|
|
416
|
+
).describe(
|
|
417
|
+
"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."
|
|
418
|
+
).optional(),
|
|
419
|
+
asapFutureHandlingType: z.enum([
|
|
420
|
+
"NO_FUTURE_HANDLING",
|
|
421
|
+
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
422
|
+
]).describe(
|
|
423
|
+
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
424
|
+
).optional()
|
|
425
|
+
}),
|
|
426
|
+
z.xor([
|
|
427
|
+
z.object({
|
|
428
|
+
businessDaysAheadHandlingOptions: z.never().optional()
|
|
429
|
+
}),
|
|
430
|
+
z.object({
|
|
431
|
+
businessDaysAheadHandlingOptions: z.object({
|
|
432
|
+
daysCount: z.number().int().describe(
|
|
433
|
+
"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."
|
|
434
|
+
).min(0).optional().nullable()
|
|
435
|
+
}).describe(
|
|
436
|
+
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
437
|
+
)
|
|
438
|
+
})
|
|
439
|
+
])
|
|
440
|
+
).describe(
|
|
441
|
+
"Options for scheduling. Required if `type` is `ASAP`."
|
|
442
|
+
)
|
|
443
|
+
}),
|
|
444
|
+
z.object({
|
|
445
|
+
asapOptions: z.never().optional(),
|
|
446
|
+
preorderOptions: z.object({
|
|
447
|
+
method: z.intersection(
|
|
448
|
+
z.object({
|
|
449
|
+
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
450
|
+
"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."
|
|
451
|
+
).optional()
|
|
452
|
+
}),
|
|
453
|
+
z.xor([
|
|
454
|
+
z.object({
|
|
455
|
+
timeBoundedOptions: z.never().optional(),
|
|
456
|
+
weeklyScheduleOptions: z.never().optional()
|
|
457
|
+
}),
|
|
458
|
+
z.object({
|
|
459
|
+
weeklyScheduleOptions: z.never().optional(),
|
|
460
|
+
timeBoundedOptions: z.object({
|
|
461
|
+
minTimeInAdvance: z.object({
|
|
462
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
463
|
+
duration: z.number().int().describe(
|
|
464
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
465
|
+
).min(0).optional().nullable()
|
|
466
|
+
}).describe(
|
|
467
|
+
"Minimum time required to schedule the order."
|
|
468
|
+
).optional(),
|
|
469
|
+
maxTimeInAdvance: z.object({
|
|
470
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
471
|
+
duration: z.number().int().describe(
|
|
472
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
473
|
+
).min(0).optional().nullable()
|
|
474
|
+
}).describe(
|
|
475
|
+
"Maximum time allowed to schedule the order."
|
|
476
|
+
).optional()
|
|
477
|
+
}).describe(
|
|
478
|
+
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
479
|
+
)
|
|
480
|
+
}),
|
|
481
|
+
z.object({
|
|
482
|
+
timeBoundedOptions: z.never().optional(),
|
|
483
|
+
weeklyScheduleOptions: z.object({
|
|
484
|
+
cutOffTime: z.object({
|
|
485
|
+
dayOfWeek: z.enum([
|
|
486
|
+
"MON",
|
|
487
|
+
"TUE",
|
|
488
|
+
"WED",
|
|
489
|
+
"THU",
|
|
490
|
+
"FRI",
|
|
491
|
+
"SAT",
|
|
492
|
+
"SUN"
|
|
493
|
+
]).describe("Day of the week.").optional(),
|
|
494
|
+
timeOfDay: z.object({
|
|
495
|
+
hours: z.number().int().describe(
|
|
496
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
497
|
+
).optional(),
|
|
498
|
+
minutes: z.number().int().describe(
|
|
499
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
500
|
+
).optional()
|
|
501
|
+
}).describe("Time of the day.").optional()
|
|
502
|
+
}).describe(
|
|
503
|
+
"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."
|
|
504
|
+
).optional()
|
|
505
|
+
}).describe(
|
|
506
|
+
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
507
|
+
)
|
|
508
|
+
})
|
|
509
|
+
])
|
|
510
|
+
).optional(),
|
|
511
|
+
fulfillmentTimesDisplay: z.intersection(
|
|
512
|
+
z.object({
|
|
513
|
+
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
514
|
+
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
515
|
+
).optional()
|
|
516
|
+
}),
|
|
517
|
+
z.xor([
|
|
518
|
+
z.object({ timeWindowsOptions: z.never().optional() }),
|
|
519
|
+
z.object({
|
|
520
|
+
timeWindowsOptions: z.object({
|
|
521
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
522
|
+
duration: z.number().int().describe(
|
|
523
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
524
|
+
).min(0).optional().nullable()
|
|
525
|
+
}).describe(
|
|
526
|
+
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
527
|
+
)
|
|
528
|
+
})
|
|
529
|
+
])
|
|
530
|
+
).describe(
|
|
531
|
+
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
532
|
+
).optional()
|
|
533
|
+
}).describe(
|
|
534
|
+
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
535
|
+
)
|
|
536
|
+
})
|
|
537
|
+
])
|
|
538
|
+
).describe("Information about when an order can be placed for.").optional(),
|
|
539
|
+
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
540
|
+
/^[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}$/,
|
|
541
|
+
"Must be a valid GUID"
|
|
542
|
+
).optional().nullable(),
|
|
543
|
+
businessLocationId: z.string().describe(
|
|
544
|
+
"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."
|
|
545
|
+
).regex(
|
|
546
|
+
/^[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}$/,
|
|
547
|
+
"Must be a valid GUID"
|
|
548
|
+
).optional().nullable(),
|
|
549
|
+
extendedFields: z.object({
|
|
550
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
551
|
+
"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)."
|
|
552
|
+
).optional()
|
|
553
|
+
}).describe("Extended fields.").optional(),
|
|
554
|
+
tags: z.object({
|
|
555
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
556
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
557
|
+
).optional(),
|
|
558
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
559
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
560
|
+
).optional()
|
|
561
|
+
}).describe(
|
|
562
|
+
"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."
|
|
563
|
+
).optional()
|
|
564
|
+
}),
|
|
565
|
+
z.xor([
|
|
566
|
+
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
567
|
+
z.object({
|
|
568
|
+
pausedUntilOptions: z.object({
|
|
569
|
+
time: z.date().describe(
|
|
570
|
+
"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."
|
|
571
|
+
).optional().nullable()
|
|
572
|
+
}).describe(
|
|
573
|
+
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
574
|
+
)
|
|
575
|
+
})
|
|
576
|
+
])
|
|
577
|
+
);
|
|
578
|
+
var GetOperationRequest = z.object({
|
|
579
|
+
operationId: z.string().describe("ID of the operation to retrieve.").regex(
|
|
580
|
+
/^[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}$/,
|
|
581
|
+
"Must be a valid GUID"
|
|
582
|
+
)
|
|
583
|
+
});
|
|
584
|
+
var GetOperationResponse = z.intersection(
|
|
585
|
+
z.object({
|
|
586
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
587
|
+
/^[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}$/,
|
|
588
|
+
"Must be a valid GUID"
|
|
589
|
+
).optional().nullable(),
|
|
590
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
591
|
+
"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."
|
|
592
|
+
).optional().nullable(),
|
|
593
|
+
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
594
|
+
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
595
|
+
name: z.string().describe("Operation name.").optional().nullable(),
|
|
596
|
+
default: z.boolean().describe(
|
|
597
|
+
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
598
|
+
).optional().nullable(),
|
|
599
|
+
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
600
|
+
onlineOrderingStatus: z.enum([
|
|
601
|
+
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
602
|
+
"ENABLED",
|
|
603
|
+
"DISABLED",
|
|
604
|
+
"PAUSED_UNTIL"
|
|
605
|
+
]).describe("Online ordering status of the operation. <br />").optional(),
|
|
606
|
+
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
|
|
607
|
+
orderScheduling: z.intersection(
|
|
608
|
+
z.object({
|
|
609
|
+
type: z.enum(["ASAP", "PREORDER"]).describe(
|
|
610
|
+
"Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
|
|
611
|
+
).optional()
|
|
612
|
+
}),
|
|
613
|
+
z.xor([
|
|
614
|
+
z.object({
|
|
615
|
+
asapOptions: z.never().optional(),
|
|
616
|
+
preorderOptions: z.never().optional()
|
|
617
|
+
}),
|
|
618
|
+
z.object({
|
|
619
|
+
preorderOptions: z.never().optional(),
|
|
620
|
+
asapOptions: z.intersection(
|
|
621
|
+
z.object({
|
|
622
|
+
preparationTime: z.intersection(
|
|
623
|
+
z.object({
|
|
624
|
+
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
625
|
+
}),
|
|
626
|
+
z.xor([
|
|
627
|
+
z.object({
|
|
628
|
+
maxTimeOptions: z.never().optional(),
|
|
629
|
+
timeRangeOptions: z.never().optional()
|
|
630
|
+
}),
|
|
631
|
+
z.object({
|
|
632
|
+
timeRangeOptions: z.never().optional(),
|
|
633
|
+
maxTimeOptions: z.object({
|
|
634
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
635
|
+
duration: z.number().int().describe(
|
|
636
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
637
|
+
).min(0).optional().nullable()
|
|
638
|
+
}).describe(
|
|
639
|
+
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
640
|
+
)
|
|
641
|
+
}),
|
|
642
|
+
z.object({
|
|
643
|
+
maxTimeOptions: z.never().optional(),
|
|
644
|
+
timeRangeOptions: z.object({
|
|
645
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
646
|
+
minDuration: z.number().int().describe(
|
|
647
|
+
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
648
|
+
).min(1).optional().nullable(),
|
|
649
|
+
maxDuration: z.number().int().describe(
|
|
650
|
+
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
651
|
+
).min(1).optional().nullable()
|
|
652
|
+
}).describe(
|
|
653
|
+
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
654
|
+
)
|
|
655
|
+
})
|
|
656
|
+
])
|
|
657
|
+
).describe(
|
|
658
|
+
"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."
|
|
659
|
+
).optional(),
|
|
660
|
+
asapFutureHandlingType: z.enum([
|
|
661
|
+
"NO_FUTURE_HANDLING",
|
|
662
|
+
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
663
|
+
]).describe(
|
|
664
|
+
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
665
|
+
).optional()
|
|
666
|
+
}),
|
|
667
|
+
z.xor([
|
|
668
|
+
z.object({
|
|
669
|
+
businessDaysAheadHandlingOptions: z.never().optional()
|
|
670
|
+
}),
|
|
671
|
+
z.object({
|
|
672
|
+
businessDaysAheadHandlingOptions: z.object({
|
|
673
|
+
daysCount: z.number().int().describe(
|
|
674
|
+
"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."
|
|
675
|
+
).min(0).optional().nullable()
|
|
676
|
+
}).describe(
|
|
677
|
+
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
678
|
+
)
|
|
679
|
+
})
|
|
680
|
+
])
|
|
681
|
+
).describe(
|
|
682
|
+
"Options for scheduling. Required if `type` is `ASAP`."
|
|
683
|
+
)
|
|
684
|
+
}),
|
|
685
|
+
z.object({
|
|
686
|
+
asapOptions: z.never().optional(),
|
|
687
|
+
preorderOptions: z.object({
|
|
688
|
+
method: z.intersection(
|
|
689
|
+
z.object({
|
|
690
|
+
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
691
|
+
"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."
|
|
692
|
+
).optional()
|
|
693
|
+
}),
|
|
694
|
+
z.xor([
|
|
695
|
+
z.object({
|
|
696
|
+
timeBoundedOptions: z.never().optional(),
|
|
697
|
+
weeklyScheduleOptions: z.never().optional()
|
|
698
|
+
}),
|
|
699
|
+
z.object({
|
|
700
|
+
weeklyScheduleOptions: z.never().optional(),
|
|
701
|
+
timeBoundedOptions: z.object({
|
|
702
|
+
minTimeInAdvance: z.object({
|
|
703
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
704
|
+
duration: z.number().int().describe(
|
|
705
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
706
|
+
).min(0).optional().nullable()
|
|
707
|
+
}).describe(
|
|
708
|
+
"Minimum time required to schedule the order."
|
|
709
|
+
).optional(),
|
|
710
|
+
maxTimeInAdvance: z.object({
|
|
711
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
712
|
+
duration: z.number().int().describe(
|
|
713
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
714
|
+
).min(0).optional().nullable()
|
|
715
|
+
}).describe(
|
|
716
|
+
"Maximum time allowed to schedule the order."
|
|
717
|
+
).optional()
|
|
718
|
+
}).describe(
|
|
719
|
+
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
720
|
+
)
|
|
721
|
+
}),
|
|
722
|
+
z.object({
|
|
723
|
+
timeBoundedOptions: z.never().optional(),
|
|
724
|
+
weeklyScheduleOptions: z.object({
|
|
725
|
+
cutOffTime: z.object({
|
|
726
|
+
dayOfWeek: z.enum([
|
|
727
|
+
"MON",
|
|
728
|
+
"TUE",
|
|
729
|
+
"WED",
|
|
730
|
+
"THU",
|
|
731
|
+
"FRI",
|
|
732
|
+
"SAT",
|
|
733
|
+
"SUN"
|
|
734
|
+
]).describe("Day of the week.").optional(),
|
|
735
|
+
timeOfDay: z.object({
|
|
736
|
+
hours: z.number().int().describe(
|
|
737
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
738
|
+
).optional(),
|
|
739
|
+
minutes: z.number().int().describe(
|
|
740
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
741
|
+
).optional()
|
|
742
|
+
}).describe("Time of the day.").optional()
|
|
743
|
+
}).describe(
|
|
744
|
+
"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."
|
|
745
|
+
).optional()
|
|
746
|
+
}).describe(
|
|
747
|
+
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
748
|
+
)
|
|
749
|
+
})
|
|
750
|
+
])
|
|
751
|
+
).optional(),
|
|
752
|
+
fulfillmentTimesDisplay: z.intersection(
|
|
753
|
+
z.object({
|
|
754
|
+
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
755
|
+
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
756
|
+
).optional()
|
|
757
|
+
}),
|
|
758
|
+
z.xor([
|
|
759
|
+
z.object({ timeWindowsOptions: z.never().optional() }),
|
|
760
|
+
z.object({
|
|
761
|
+
timeWindowsOptions: z.object({
|
|
762
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
763
|
+
duration: z.number().int().describe(
|
|
764
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
765
|
+
).min(0).optional().nullable()
|
|
766
|
+
}).describe(
|
|
767
|
+
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
768
|
+
)
|
|
769
|
+
})
|
|
770
|
+
])
|
|
771
|
+
).describe(
|
|
772
|
+
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
773
|
+
).optional()
|
|
774
|
+
}).describe(
|
|
775
|
+
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
776
|
+
)
|
|
777
|
+
})
|
|
778
|
+
])
|
|
779
|
+
).describe("Information about when an order can be placed for.").optional(),
|
|
780
|
+
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
781
|
+
/^[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}$/,
|
|
782
|
+
"Must be a valid GUID"
|
|
783
|
+
).optional().nullable(),
|
|
784
|
+
businessLocationId: z.string().describe(
|
|
785
|
+
"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."
|
|
786
|
+
).regex(
|
|
787
|
+
/^[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}$/,
|
|
788
|
+
"Must be a valid GUID"
|
|
789
|
+
).optional().nullable(),
|
|
790
|
+
extendedFields: z.object({
|
|
791
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
792
|
+
"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)."
|
|
793
|
+
).optional()
|
|
794
|
+
}).describe("Extended fields.").optional(),
|
|
795
|
+
tags: z.object({
|
|
796
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
797
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
798
|
+
).optional(),
|
|
799
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
800
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
801
|
+
).optional()
|
|
802
|
+
}).describe(
|
|
803
|
+
"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."
|
|
804
|
+
).optional()
|
|
805
|
+
}),
|
|
806
|
+
z.xor([
|
|
807
|
+
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
808
|
+
z.object({
|
|
809
|
+
pausedUntilOptions: z.object({
|
|
810
|
+
time: z.date().describe(
|
|
811
|
+
"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."
|
|
812
|
+
).optional().nullable()
|
|
813
|
+
}).describe(
|
|
814
|
+
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
815
|
+
)
|
|
816
|
+
})
|
|
817
|
+
])
|
|
818
|
+
);
|
|
819
|
+
var UpdateOperationRequest = z.object({
|
|
820
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
821
|
+
/^[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}$/,
|
|
822
|
+
"Must be a valid GUID"
|
|
823
|
+
),
|
|
824
|
+
operation: z.intersection(
|
|
825
|
+
z.object({
|
|
826
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
827
|
+
/^[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}$/,
|
|
828
|
+
"Must be a valid GUID"
|
|
829
|
+
).optional().nullable(),
|
|
830
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
831
|
+
"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."
|
|
832
|
+
),
|
|
833
|
+
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
834
|
+
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
835
|
+
name: z.string().describe("Operation name.").optional().nullable(),
|
|
836
|
+
default: z.boolean().describe(
|
|
837
|
+
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
838
|
+
).optional().nullable(),
|
|
839
|
+
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
840
|
+
onlineOrderingStatus: z.enum([
|
|
841
|
+
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
842
|
+
"ENABLED",
|
|
843
|
+
"DISABLED",
|
|
844
|
+
"PAUSED_UNTIL"
|
|
845
|
+
]).optional(),
|
|
846
|
+
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).optional(),
|
|
847
|
+
orderScheduling: z.intersection(
|
|
848
|
+
z.object({ type: z.enum(["ASAP", "PREORDER"]).optional() }),
|
|
849
|
+
z.xor([
|
|
850
|
+
z.object({
|
|
851
|
+
asapOptions: z.never().optional(),
|
|
852
|
+
preorderOptions: z.never().optional()
|
|
853
|
+
}),
|
|
854
|
+
z.object({
|
|
855
|
+
preorderOptions: z.never().optional(),
|
|
856
|
+
asapOptions: z.intersection(
|
|
857
|
+
z.object({
|
|
858
|
+
preparationTime: z.intersection(
|
|
859
|
+
z.object({
|
|
860
|
+
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
861
|
+
}),
|
|
862
|
+
z.xor([
|
|
863
|
+
z.object({
|
|
864
|
+
maxTimeOptions: z.never().optional(),
|
|
865
|
+
timeRangeOptions: z.never().optional()
|
|
866
|
+
}),
|
|
867
|
+
z.object({
|
|
868
|
+
timeRangeOptions: z.never().optional(),
|
|
869
|
+
maxTimeOptions: z.object({
|
|
870
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
871
|
+
duration: z.number().int().describe(
|
|
872
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
873
|
+
).min(0).optional().nullable()
|
|
874
|
+
}).describe(
|
|
875
|
+
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
876
|
+
)
|
|
877
|
+
}),
|
|
878
|
+
z.object({
|
|
879
|
+
maxTimeOptions: z.never().optional(),
|
|
880
|
+
timeRangeOptions: z.object({
|
|
881
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
882
|
+
minDuration: z.number().int().describe(
|
|
883
|
+
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
884
|
+
).min(1).optional().nullable(),
|
|
885
|
+
maxDuration: z.number().int().describe(
|
|
886
|
+
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
887
|
+
).min(1).optional().nullable()
|
|
888
|
+
}).describe(
|
|
889
|
+
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
890
|
+
)
|
|
891
|
+
})
|
|
892
|
+
])
|
|
893
|
+
).describe(
|
|
894
|
+
"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."
|
|
895
|
+
).optional(),
|
|
896
|
+
asapFutureHandlingType: z.enum([
|
|
897
|
+
"NO_FUTURE_HANDLING",
|
|
898
|
+
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
899
|
+
]).describe(
|
|
900
|
+
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
901
|
+
).optional()
|
|
902
|
+
}),
|
|
903
|
+
z.xor([
|
|
904
|
+
z.object({
|
|
905
|
+
businessDaysAheadHandlingOptions: z.never().optional()
|
|
906
|
+
}),
|
|
907
|
+
z.object({
|
|
908
|
+
businessDaysAheadHandlingOptions: z.object({
|
|
909
|
+
daysCount: z.number().int().describe(
|
|
910
|
+
"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."
|
|
911
|
+
).min(0).optional().nullable()
|
|
912
|
+
}).describe(
|
|
913
|
+
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
914
|
+
)
|
|
915
|
+
})
|
|
916
|
+
])
|
|
917
|
+
).describe(
|
|
918
|
+
"Options for scheduling. Required if `type` is `ASAP`."
|
|
919
|
+
)
|
|
920
|
+
}),
|
|
921
|
+
z.object({
|
|
922
|
+
asapOptions: z.never().optional(),
|
|
923
|
+
preorderOptions: z.object({
|
|
924
|
+
method: z.intersection(
|
|
925
|
+
z.object({
|
|
926
|
+
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
927
|
+
"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."
|
|
928
|
+
).optional()
|
|
929
|
+
}),
|
|
930
|
+
z.xor([
|
|
931
|
+
z.object({
|
|
932
|
+
timeBoundedOptions: z.never().optional(),
|
|
933
|
+
weeklyScheduleOptions: z.never().optional()
|
|
934
|
+
}),
|
|
935
|
+
z.object({
|
|
936
|
+
weeklyScheduleOptions: z.never().optional(),
|
|
937
|
+
timeBoundedOptions: z.object({
|
|
938
|
+
minTimeInAdvance: z.object({
|
|
939
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
940
|
+
"Unit of time for the duration."
|
|
941
|
+
).optional(),
|
|
942
|
+
duration: z.number().int().describe(
|
|
943
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
944
|
+
).min(0).optional().nullable()
|
|
945
|
+
}).describe(
|
|
946
|
+
"Minimum time required to schedule the order."
|
|
947
|
+
).optional(),
|
|
948
|
+
maxTimeInAdvance: z.object({
|
|
949
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
950
|
+
"Unit of time for the duration."
|
|
951
|
+
).optional(),
|
|
952
|
+
duration: z.number().int().describe(
|
|
953
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
954
|
+
).min(0).optional().nullable()
|
|
955
|
+
}).describe(
|
|
956
|
+
"Maximum time allowed to schedule the order."
|
|
957
|
+
).optional()
|
|
958
|
+
}).describe(
|
|
959
|
+
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
960
|
+
)
|
|
961
|
+
}),
|
|
962
|
+
z.object({
|
|
963
|
+
timeBoundedOptions: z.never().optional(),
|
|
964
|
+
weeklyScheduleOptions: z.object({
|
|
965
|
+
cutOffTime: z.object({
|
|
966
|
+
dayOfWeek: z.enum([
|
|
967
|
+
"MON",
|
|
968
|
+
"TUE",
|
|
969
|
+
"WED",
|
|
970
|
+
"THU",
|
|
971
|
+
"FRI",
|
|
972
|
+
"SAT",
|
|
973
|
+
"SUN"
|
|
974
|
+
]).describe("Day of the week.").optional(),
|
|
975
|
+
timeOfDay: z.object({
|
|
976
|
+
hours: z.number().int().describe(
|
|
977
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
978
|
+
).optional(),
|
|
979
|
+
minutes: z.number().int().describe(
|
|
980
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
981
|
+
).optional()
|
|
982
|
+
}).describe("Time of the day.").optional()
|
|
983
|
+
}).describe(
|
|
984
|
+
"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."
|
|
985
|
+
).optional()
|
|
986
|
+
}).describe(
|
|
987
|
+
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
988
|
+
)
|
|
989
|
+
})
|
|
990
|
+
])
|
|
991
|
+
).optional(),
|
|
992
|
+
fulfillmentTimesDisplay: z.intersection(
|
|
993
|
+
z.object({
|
|
994
|
+
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
995
|
+
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
996
|
+
).optional()
|
|
997
|
+
}),
|
|
998
|
+
z.xor([
|
|
999
|
+
z.object({
|
|
1000
|
+
timeWindowsOptions: z.never().optional()
|
|
1001
|
+
}),
|
|
1002
|
+
z.object({
|
|
1003
|
+
timeWindowsOptions: z.object({
|
|
1004
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
1005
|
+
duration: z.number().int().describe(
|
|
1006
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1007
|
+
).min(0).optional().nullable()
|
|
1008
|
+
}).describe(
|
|
1009
|
+
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
1010
|
+
)
|
|
1011
|
+
})
|
|
1012
|
+
])
|
|
1013
|
+
).describe(
|
|
1014
|
+
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
1015
|
+
).optional()
|
|
1016
|
+
}).describe(
|
|
1017
|
+
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
1018
|
+
)
|
|
1019
|
+
})
|
|
1020
|
+
])
|
|
1021
|
+
).describe("Information about when an order can be placed for.").optional(),
|
|
1022
|
+
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
1023
|
+
/^[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}$/,
|
|
1024
|
+
"Must be a valid GUID"
|
|
1025
|
+
).optional().nullable(),
|
|
1026
|
+
businessLocationId: z.string().describe(
|
|
1027
|
+
"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."
|
|
1028
|
+
).regex(
|
|
1029
|
+
/^[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}$/,
|
|
1030
|
+
"Must be a valid GUID"
|
|
1031
|
+
).optional().nullable(),
|
|
1032
|
+
extendedFields: z.object({
|
|
1033
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1034
|
+
"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)."
|
|
1035
|
+
).optional()
|
|
1036
|
+
}).describe("Extended fields.").optional(),
|
|
1037
|
+
tags: z.object({
|
|
1038
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1039
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
1040
|
+
).optional(),
|
|
1041
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1042
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
1043
|
+
).optional()
|
|
1044
|
+
}).describe(
|
|
1045
|
+
"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."
|
|
1046
|
+
).optional()
|
|
1047
|
+
}),
|
|
1048
|
+
z.xor([
|
|
1049
|
+
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
1050
|
+
z.object({
|
|
1051
|
+
pausedUntilOptions: z.object({
|
|
1052
|
+
time: z.date().describe(
|
|
1053
|
+
"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."
|
|
1054
|
+
).optional().nullable()
|
|
1055
|
+
}).describe(
|
|
1056
|
+
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
1057
|
+
)
|
|
1058
|
+
})
|
|
1059
|
+
])
|
|
1060
|
+
).describe("Operation to update.")
|
|
1061
|
+
});
|
|
1062
|
+
var UpdateOperationResponse = z.intersection(
|
|
1063
|
+
z.object({
|
|
1064
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
1065
|
+
/^[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}$/,
|
|
1066
|
+
"Must be a valid GUID"
|
|
1067
|
+
).optional().nullable(),
|
|
1068
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1069
|
+
"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."
|
|
1070
|
+
).optional().nullable(),
|
|
1071
|
+
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
1072
|
+
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
1073
|
+
name: z.string().describe("Operation name.").optional().nullable(),
|
|
1074
|
+
default: z.boolean().describe(
|
|
1075
|
+
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
1076
|
+
).optional().nullable(),
|
|
1077
|
+
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
1078
|
+
onlineOrderingStatus: z.enum([
|
|
1079
|
+
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
1080
|
+
"ENABLED",
|
|
1081
|
+
"DISABLED",
|
|
1082
|
+
"PAUSED_UNTIL"
|
|
1083
|
+
]).describe("Online ordering status of the operation. <br />").optional(),
|
|
1084
|
+
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
|
|
1085
|
+
orderScheduling: z.intersection(
|
|
1086
|
+
z.object({
|
|
1087
|
+
type: z.enum(["ASAP", "PREORDER"]).describe(
|
|
1088
|
+
"Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
|
|
1089
|
+
).optional()
|
|
1090
|
+
}),
|
|
1091
|
+
z.xor([
|
|
1092
|
+
z.object({
|
|
1093
|
+
asapOptions: z.never().optional(),
|
|
1094
|
+
preorderOptions: z.never().optional()
|
|
1095
|
+
}),
|
|
1096
|
+
z.object({
|
|
1097
|
+
preorderOptions: z.never().optional(),
|
|
1098
|
+
asapOptions: z.intersection(
|
|
1099
|
+
z.object({
|
|
1100
|
+
preparationTime: z.intersection(
|
|
1101
|
+
z.object({
|
|
1102
|
+
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
1103
|
+
}),
|
|
1104
|
+
z.xor([
|
|
1105
|
+
z.object({
|
|
1106
|
+
maxTimeOptions: z.never().optional(),
|
|
1107
|
+
timeRangeOptions: z.never().optional()
|
|
1108
|
+
}),
|
|
1109
|
+
z.object({
|
|
1110
|
+
timeRangeOptions: z.never().optional(),
|
|
1111
|
+
maxTimeOptions: z.object({
|
|
1112
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
1113
|
+
duration: z.number().int().describe(
|
|
1114
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1115
|
+
).min(0).optional().nullable()
|
|
1116
|
+
}).describe(
|
|
1117
|
+
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
1118
|
+
)
|
|
1119
|
+
}),
|
|
1120
|
+
z.object({
|
|
1121
|
+
maxTimeOptions: z.never().optional(),
|
|
1122
|
+
timeRangeOptions: z.object({
|
|
1123
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
1124
|
+
minDuration: z.number().int().describe(
|
|
1125
|
+
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
1126
|
+
).min(1).optional().nullable(),
|
|
1127
|
+
maxDuration: z.number().int().describe(
|
|
1128
|
+
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
1129
|
+
).min(1).optional().nullable()
|
|
1130
|
+
}).describe(
|
|
1131
|
+
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
1132
|
+
)
|
|
1133
|
+
})
|
|
1134
|
+
])
|
|
1135
|
+
).describe(
|
|
1136
|
+
"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."
|
|
1137
|
+
).optional(),
|
|
1138
|
+
asapFutureHandlingType: z.enum([
|
|
1139
|
+
"NO_FUTURE_HANDLING",
|
|
1140
|
+
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
1141
|
+
]).describe(
|
|
1142
|
+
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
1143
|
+
).optional()
|
|
1144
|
+
}),
|
|
1145
|
+
z.xor([
|
|
1146
|
+
z.object({
|
|
1147
|
+
businessDaysAheadHandlingOptions: z.never().optional()
|
|
1148
|
+
}),
|
|
1149
|
+
z.object({
|
|
1150
|
+
businessDaysAheadHandlingOptions: z.object({
|
|
1151
|
+
daysCount: z.number().int().describe(
|
|
1152
|
+
"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."
|
|
1153
|
+
).min(0).optional().nullable()
|
|
1154
|
+
}).describe(
|
|
1155
|
+
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
1156
|
+
)
|
|
1157
|
+
})
|
|
1158
|
+
])
|
|
1159
|
+
).describe(
|
|
1160
|
+
"Options for scheduling. Required if `type` is `ASAP`."
|
|
1161
|
+
)
|
|
1162
|
+
}),
|
|
1163
|
+
z.object({
|
|
1164
|
+
asapOptions: z.never().optional(),
|
|
1165
|
+
preorderOptions: z.object({
|
|
1166
|
+
method: z.intersection(
|
|
1167
|
+
z.object({
|
|
1168
|
+
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
1169
|
+
"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."
|
|
1170
|
+
).optional()
|
|
1171
|
+
}),
|
|
1172
|
+
z.xor([
|
|
1173
|
+
z.object({
|
|
1174
|
+
timeBoundedOptions: z.never().optional(),
|
|
1175
|
+
weeklyScheduleOptions: z.never().optional()
|
|
1176
|
+
}),
|
|
1177
|
+
z.object({
|
|
1178
|
+
weeklyScheduleOptions: z.never().optional(),
|
|
1179
|
+
timeBoundedOptions: z.object({
|
|
1180
|
+
minTimeInAdvance: z.object({
|
|
1181
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
1182
|
+
duration: z.number().int().describe(
|
|
1183
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1184
|
+
).min(0).optional().nullable()
|
|
1185
|
+
}).describe(
|
|
1186
|
+
"Minimum time required to schedule the order."
|
|
1187
|
+
).optional(),
|
|
1188
|
+
maxTimeInAdvance: z.object({
|
|
1189
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
1190
|
+
duration: z.number().int().describe(
|
|
1191
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1192
|
+
).min(0).optional().nullable()
|
|
1193
|
+
}).describe(
|
|
1194
|
+
"Maximum time allowed to schedule the order."
|
|
1195
|
+
).optional()
|
|
1196
|
+
}).describe(
|
|
1197
|
+
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
1198
|
+
)
|
|
1199
|
+
}),
|
|
1200
|
+
z.object({
|
|
1201
|
+
timeBoundedOptions: z.never().optional(),
|
|
1202
|
+
weeklyScheduleOptions: z.object({
|
|
1203
|
+
cutOffTime: z.object({
|
|
1204
|
+
dayOfWeek: z.enum([
|
|
1205
|
+
"MON",
|
|
1206
|
+
"TUE",
|
|
1207
|
+
"WED",
|
|
1208
|
+
"THU",
|
|
1209
|
+
"FRI",
|
|
1210
|
+
"SAT",
|
|
1211
|
+
"SUN"
|
|
1212
|
+
]).describe("Day of the week.").optional(),
|
|
1213
|
+
timeOfDay: z.object({
|
|
1214
|
+
hours: z.number().int().describe(
|
|
1215
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
1216
|
+
).optional(),
|
|
1217
|
+
minutes: z.number().int().describe(
|
|
1218
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
1219
|
+
).optional()
|
|
1220
|
+
}).describe("Time of the day.").optional()
|
|
1221
|
+
}).describe(
|
|
1222
|
+
"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."
|
|
1223
|
+
).optional()
|
|
1224
|
+
}).describe(
|
|
1225
|
+
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
1226
|
+
)
|
|
1227
|
+
})
|
|
1228
|
+
])
|
|
1229
|
+
).optional(),
|
|
1230
|
+
fulfillmentTimesDisplay: z.intersection(
|
|
1231
|
+
z.object({
|
|
1232
|
+
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
1233
|
+
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
1234
|
+
).optional()
|
|
1235
|
+
}),
|
|
1236
|
+
z.xor([
|
|
1237
|
+
z.object({ timeWindowsOptions: z.never().optional() }),
|
|
1238
|
+
z.object({
|
|
1239
|
+
timeWindowsOptions: z.object({
|
|
1240
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
1241
|
+
duration: z.number().int().describe(
|
|
1242
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1243
|
+
).min(0).optional().nullable()
|
|
1244
|
+
}).describe(
|
|
1245
|
+
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
1246
|
+
)
|
|
1247
|
+
})
|
|
1248
|
+
])
|
|
1249
|
+
).describe(
|
|
1250
|
+
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
1251
|
+
).optional()
|
|
1252
|
+
}).describe(
|
|
1253
|
+
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
1254
|
+
)
|
|
1255
|
+
})
|
|
1256
|
+
])
|
|
1257
|
+
).describe("Information about when an order can be placed for.").optional(),
|
|
1258
|
+
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
1259
|
+
/^[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}$/,
|
|
1260
|
+
"Must be a valid GUID"
|
|
1261
|
+
).optional().nullable(),
|
|
1262
|
+
businessLocationId: z.string().describe(
|
|
1263
|
+
"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."
|
|
1264
|
+
).regex(
|
|
1265
|
+
/^[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}$/,
|
|
1266
|
+
"Must be a valid GUID"
|
|
1267
|
+
).optional().nullable(),
|
|
1268
|
+
extendedFields: z.object({
|
|
1269
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1270
|
+
"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)."
|
|
1271
|
+
).optional()
|
|
1272
|
+
}).describe("Extended fields.").optional(),
|
|
1273
|
+
tags: z.object({
|
|
1274
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1275
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
1276
|
+
).optional(),
|
|
1277
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1278
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
1279
|
+
).optional()
|
|
1280
|
+
}).describe(
|
|
1281
|
+
"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."
|
|
1282
|
+
).optional()
|
|
1283
|
+
}),
|
|
1284
|
+
z.xor([
|
|
1285
|
+
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
1286
|
+
z.object({
|
|
1287
|
+
pausedUntilOptions: z.object({
|
|
1288
|
+
time: z.date().describe(
|
|
1289
|
+
"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."
|
|
1290
|
+
).optional().nullable()
|
|
1291
|
+
}).describe(
|
|
1292
|
+
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
1293
|
+
)
|
|
1294
|
+
})
|
|
1295
|
+
])
|
|
1296
|
+
);
|
|
1297
|
+
var DeleteOperationRequest = z.object({
|
|
1298
|
+
operationId: z.string().describe("ID of the operation to delete.").regex(
|
|
1299
|
+
/^[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}$/,
|
|
1300
|
+
"Must be a valid GUID"
|
|
1301
|
+
)
|
|
1302
|
+
});
|
|
1303
|
+
var DeleteOperationResponse = z.object({});
|
|
1304
|
+
var QueryOperationRequest = z.object({
|
|
1305
|
+
query: z.object({
|
|
1306
|
+
filter: z.object({
|
|
1307
|
+
_id: z.object({
|
|
1308
|
+
$eq: z.string(),
|
|
1309
|
+
$exists: z.boolean(),
|
|
1310
|
+
$gt: z.string(),
|
|
1311
|
+
$gte: z.string(),
|
|
1312
|
+
$hasAll: z.array(z.string()),
|
|
1313
|
+
$hasSome: z.array(z.string()),
|
|
1314
|
+
$in: z.array(z.string()),
|
|
1315
|
+
$lt: z.string(),
|
|
1316
|
+
$lte: z.string(),
|
|
1317
|
+
$ne: z.string(),
|
|
1318
|
+
$nin: z.array(z.string()),
|
|
1319
|
+
$startsWith: z.string()
|
|
1320
|
+
}).partial().strict().optional(),
|
|
1321
|
+
_createdDate: z.object({
|
|
1322
|
+
$eq: z.string(),
|
|
1323
|
+
$exists: z.boolean(),
|
|
1324
|
+
$gt: z.string(),
|
|
1325
|
+
$gte: z.string(),
|
|
1326
|
+
$hasAll: z.array(z.string()),
|
|
1327
|
+
$hasSome: z.array(z.string()),
|
|
1328
|
+
$in: z.array(z.string()),
|
|
1329
|
+
$lt: z.string(),
|
|
1330
|
+
$lte: z.string(),
|
|
1331
|
+
$ne: z.string(),
|
|
1332
|
+
$nin: z.array(z.string()),
|
|
1333
|
+
$startsWith: z.string()
|
|
1334
|
+
}).partial().strict().optional(),
|
|
1335
|
+
_updatedDate: z.object({
|
|
1336
|
+
$eq: z.string(),
|
|
1337
|
+
$exists: z.boolean(),
|
|
1338
|
+
$gt: z.string(),
|
|
1339
|
+
$gte: z.string(),
|
|
1340
|
+
$hasAll: z.array(z.string()),
|
|
1341
|
+
$hasSome: z.array(z.string()),
|
|
1342
|
+
$in: z.array(z.string()),
|
|
1343
|
+
$lt: z.string(),
|
|
1344
|
+
$lte: z.string(),
|
|
1345
|
+
$ne: z.string(),
|
|
1346
|
+
$nin: z.array(z.string()),
|
|
1347
|
+
$startsWith: z.string()
|
|
1348
|
+
}).partial().strict().optional(),
|
|
1349
|
+
name: z.object({
|
|
1350
|
+
$eq: z.string(),
|
|
1351
|
+
$exists: z.boolean(),
|
|
1352
|
+
$gt: z.string(),
|
|
1353
|
+
$gte: z.string(),
|
|
1354
|
+
$hasAll: z.array(z.string()),
|
|
1355
|
+
$hasSome: z.array(z.string()),
|
|
1356
|
+
$in: z.array(z.string()),
|
|
1357
|
+
$lt: z.string(),
|
|
1358
|
+
$lte: z.string(),
|
|
1359
|
+
$ne: z.string(),
|
|
1360
|
+
$nin: z.array(z.string()),
|
|
1361
|
+
$startsWith: z.string()
|
|
1362
|
+
}).partial().strict().optional(),
|
|
1363
|
+
default: z.object({
|
|
1364
|
+
$eq: z.boolean(),
|
|
1365
|
+
$exists: z.boolean(),
|
|
1366
|
+
$gt: z.boolean(),
|
|
1367
|
+
$gte: z.boolean(),
|
|
1368
|
+
$hasAll: z.array(z.boolean()),
|
|
1369
|
+
$hasSome: z.array(z.boolean()),
|
|
1370
|
+
$in: z.array(z.boolean()),
|
|
1371
|
+
$lt: z.boolean(),
|
|
1372
|
+
$lte: z.boolean(),
|
|
1373
|
+
$ne: z.boolean(),
|
|
1374
|
+
$nin: z.array(z.boolean()),
|
|
1375
|
+
$startsWith: z.string()
|
|
1376
|
+
}).partial().strict().optional(),
|
|
1377
|
+
fulfillmentIds: z.object({
|
|
1378
|
+
$eq: z.string(),
|
|
1379
|
+
$exists: z.boolean(),
|
|
1380
|
+
$gt: z.string(),
|
|
1381
|
+
$gte: z.string(),
|
|
1382
|
+
$hasAll: z.array(z.string()),
|
|
1383
|
+
$hasSome: z.array(z.string()),
|
|
1384
|
+
$in: z.array(z.string()),
|
|
1385
|
+
$lt: z.string(),
|
|
1386
|
+
$lte: z.string(),
|
|
1387
|
+
$ne: z.string(),
|
|
1388
|
+
$nin: z.array(z.string()),
|
|
1389
|
+
$startsWith: z.string()
|
|
1390
|
+
}).partial().strict().optional(),
|
|
1391
|
+
defaultFulfillmentType: z.object({
|
|
1392
|
+
$eq: z.string(),
|
|
1393
|
+
$exists: z.boolean(),
|
|
1394
|
+
$gt: z.string(),
|
|
1395
|
+
$gte: z.string(),
|
|
1396
|
+
$hasAll: z.array(z.string()),
|
|
1397
|
+
$hasSome: z.array(z.string()),
|
|
1398
|
+
$in: z.array(z.string()),
|
|
1399
|
+
$lt: z.string(),
|
|
1400
|
+
$lte: z.string(),
|
|
1401
|
+
$ne: z.string(),
|
|
1402
|
+
$nin: z.array(z.string()),
|
|
1403
|
+
$startsWith: z.string()
|
|
1404
|
+
}).partial().strict().optional(),
|
|
1405
|
+
onlineOrderingStatus: z.object({
|
|
1406
|
+
$eq: z.string(),
|
|
1407
|
+
$exists: z.boolean(),
|
|
1408
|
+
$gt: z.string(),
|
|
1409
|
+
$gte: z.string(),
|
|
1410
|
+
$hasAll: z.array(z.string()),
|
|
1411
|
+
$hasSome: z.array(z.string()),
|
|
1412
|
+
$in: z.array(z.string()),
|
|
1413
|
+
$lt: z.string(),
|
|
1414
|
+
$lte: z.string(),
|
|
1415
|
+
$ne: z.string(),
|
|
1416
|
+
$nin: z.array(z.string()),
|
|
1417
|
+
$startsWith: z.string()
|
|
1418
|
+
}).partial().strict().optional(),
|
|
1419
|
+
"businessLocationDetails.archived": z.object({
|
|
1420
|
+
$eq: z.any(),
|
|
1421
|
+
$exists: z.boolean(),
|
|
1422
|
+
$gt: z.any(),
|
|
1423
|
+
$gte: z.any(),
|
|
1424
|
+
$hasAll: z.array(z.any()),
|
|
1425
|
+
$hasSome: z.array(z.any()),
|
|
1426
|
+
$in: z.array(z.any()),
|
|
1427
|
+
$lt: z.any(),
|
|
1428
|
+
$lte: z.any(),
|
|
1429
|
+
$ne: z.any(),
|
|
1430
|
+
$nin: z.array(z.any()),
|
|
1431
|
+
$startsWith: z.string()
|
|
1432
|
+
}).partial().strict().optional(),
|
|
1433
|
+
businessLocationId: z.object({
|
|
1434
|
+
$eq: z.string(),
|
|
1435
|
+
$exists: z.boolean(),
|
|
1436
|
+
$gt: z.string(),
|
|
1437
|
+
$gte: z.string(),
|
|
1438
|
+
$hasAll: z.array(z.string()),
|
|
1439
|
+
$hasSome: z.array(z.string()),
|
|
1440
|
+
$in: z.array(z.string()),
|
|
1441
|
+
$lt: z.string(),
|
|
1442
|
+
$lte: z.string(),
|
|
1443
|
+
$ne: z.string(),
|
|
1444
|
+
$nin: z.array(z.string()),
|
|
1445
|
+
$startsWith: z.string()
|
|
1446
|
+
}).partial().strict().optional(),
|
|
1447
|
+
$and: z.array(z.any()).optional(),
|
|
1448
|
+
$or: z.array(z.any()).optional(),
|
|
1449
|
+
$not: z.any().optional()
|
|
1450
|
+
}).strict().optional(),
|
|
1451
|
+
sort: z.array(
|
|
1452
|
+
z.object({
|
|
1453
|
+
fieldName: z.enum([
|
|
1454
|
+
"_id",
|
|
1455
|
+
"_createdDate",
|
|
1456
|
+
"_updatedDate",
|
|
1457
|
+
"name",
|
|
1458
|
+
"default",
|
|
1459
|
+
"fulfillmentIds",
|
|
1460
|
+
"defaultFulfillmentType",
|
|
1461
|
+
"onlineOrderingStatus",
|
|
1462
|
+
"businessLocationDetails.archived",
|
|
1463
|
+
"businessLocationId"
|
|
1464
|
+
]).optional(),
|
|
1465
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
1466
|
+
})
|
|
1467
|
+
).optional()
|
|
1468
|
+
}).catchall(z.any()).describe("Query options.")
|
|
1469
|
+
});
|
|
1470
|
+
var QueryOperationResponse = z.object({
|
|
1471
|
+
operations: z.array(
|
|
1472
|
+
z.intersection(
|
|
1473
|
+
z.object({
|
|
1474
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
1475
|
+
/^[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}$/,
|
|
1476
|
+
"Must be a valid GUID"
|
|
1477
|
+
).optional().nullable(),
|
|
1478
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1479
|
+
"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."
|
|
1480
|
+
).optional().nullable(),
|
|
1481
|
+
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
1482
|
+
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
1483
|
+
name: z.string().describe("Operation name.").optional().nullable(),
|
|
1484
|
+
default: z.boolean().describe(
|
|
1485
|
+
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
1486
|
+
).optional().nullable(),
|
|
1487
|
+
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
1488
|
+
onlineOrderingStatus: z.enum([
|
|
1489
|
+
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
1490
|
+
"ENABLED",
|
|
1491
|
+
"DISABLED",
|
|
1492
|
+
"PAUSED_UNTIL"
|
|
1493
|
+
]).describe("Online ordering status of the operation. <br />").optional(),
|
|
1494
|
+
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
|
|
1495
|
+
orderScheduling: z.intersection(
|
|
1496
|
+
z.object({
|
|
1497
|
+
type: z.enum(["ASAP", "PREORDER"]).describe(
|
|
1498
|
+
"Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
|
|
1499
|
+
).optional()
|
|
1500
|
+
}),
|
|
1501
|
+
z.xor([
|
|
1502
|
+
z.object({
|
|
1503
|
+
asapOptions: z.never().optional(),
|
|
1504
|
+
preorderOptions: z.never().optional()
|
|
1505
|
+
}),
|
|
1506
|
+
z.object({
|
|
1507
|
+
preorderOptions: z.never().optional(),
|
|
1508
|
+
asapOptions: z.intersection(
|
|
1509
|
+
z.object({
|
|
1510
|
+
preparationTime: z.intersection(
|
|
1511
|
+
z.object({
|
|
1512
|
+
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
1513
|
+
}),
|
|
1514
|
+
z.xor([
|
|
1515
|
+
z.object({
|
|
1516
|
+
maxTimeOptions: z.never().optional(),
|
|
1517
|
+
timeRangeOptions: z.never().optional()
|
|
1518
|
+
}),
|
|
1519
|
+
z.object({
|
|
1520
|
+
timeRangeOptions: z.never().optional(),
|
|
1521
|
+
maxTimeOptions: z.object({
|
|
1522
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
1523
|
+
"Unit of time for the duration."
|
|
1524
|
+
).optional(),
|
|
1525
|
+
duration: z.number().int().describe(
|
|
1526
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1527
|
+
).min(0).optional().nullable()
|
|
1528
|
+
}).describe(
|
|
1529
|
+
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
1530
|
+
)
|
|
1531
|
+
}),
|
|
1532
|
+
z.object({
|
|
1533
|
+
maxTimeOptions: z.never().optional(),
|
|
1534
|
+
timeRangeOptions: z.object({
|
|
1535
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
1536
|
+
minDuration: z.number().int().describe(
|
|
1537
|
+
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
1538
|
+
).min(1).optional().nullable(),
|
|
1539
|
+
maxDuration: z.number().int().describe(
|
|
1540
|
+
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
1541
|
+
).min(1).optional().nullable()
|
|
1542
|
+
}).describe(
|
|
1543
|
+
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
1544
|
+
)
|
|
1545
|
+
})
|
|
1546
|
+
])
|
|
1547
|
+
).describe(
|
|
1548
|
+
"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."
|
|
1549
|
+
).optional(),
|
|
1550
|
+
asapFutureHandlingType: z.enum([
|
|
1551
|
+
"NO_FUTURE_HANDLING",
|
|
1552
|
+
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
1553
|
+
]).describe(
|
|
1554
|
+
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
1555
|
+
).optional()
|
|
1556
|
+
}),
|
|
1557
|
+
z.xor([
|
|
1558
|
+
z.object({
|
|
1559
|
+
businessDaysAheadHandlingOptions: z.never().optional()
|
|
1560
|
+
}),
|
|
1561
|
+
z.object({
|
|
1562
|
+
businessDaysAheadHandlingOptions: z.object({
|
|
1563
|
+
daysCount: z.number().int().describe(
|
|
1564
|
+
"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."
|
|
1565
|
+
).min(0).optional().nullable()
|
|
1566
|
+
}).describe(
|
|
1567
|
+
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
1568
|
+
)
|
|
1569
|
+
})
|
|
1570
|
+
])
|
|
1571
|
+
).describe(
|
|
1572
|
+
"Options for scheduling. Required if `type` is `ASAP`."
|
|
1573
|
+
)
|
|
1574
|
+
}),
|
|
1575
|
+
z.object({
|
|
1576
|
+
asapOptions: z.never().optional(),
|
|
1577
|
+
preorderOptions: z.object({
|
|
1578
|
+
method: z.intersection(
|
|
1579
|
+
z.object({
|
|
1580
|
+
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
1581
|
+
"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."
|
|
1582
|
+
).optional()
|
|
1583
|
+
}),
|
|
1584
|
+
z.xor([
|
|
1585
|
+
z.object({
|
|
1586
|
+
timeBoundedOptions: z.never().optional(),
|
|
1587
|
+
weeklyScheduleOptions: z.never().optional()
|
|
1588
|
+
}),
|
|
1589
|
+
z.object({
|
|
1590
|
+
weeklyScheduleOptions: z.never().optional(),
|
|
1591
|
+
timeBoundedOptions: z.object({
|
|
1592
|
+
minTimeInAdvance: z.object({
|
|
1593
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
1594
|
+
"Unit of time for the duration."
|
|
1595
|
+
).optional(),
|
|
1596
|
+
duration: z.number().int().describe(
|
|
1597
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1598
|
+
).min(0).optional().nullable()
|
|
1599
|
+
}).describe(
|
|
1600
|
+
"Minimum time required to schedule the order."
|
|
1601
|
+
).optional(),
|
|
1602
|
+
maxTimeInAdvance: z.object({
|
|
1603
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
1604
|
+
"Unit of time for the duration."
|
|
1605
|
+
).optional(),
|
|
1606
|
+
duration: z.number().int().describe(
|
|
1607
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1608
|
+
).min(0).optional().nullable()
|
|
1609
|
+
}).describe(
|
|
1610
|
+
"Maximum time allowed to schedule the order."
|
|
1611
|
+
).optional()
|
|
1612
|
+
}).describe(
|
|
1613
|
+
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
1614
|
+
)
|
|
1615
|
+
}),
|
|
1616
|
+
z.object({
|
|
1617
|
+
timeBoundedOptions: z.never().optional(),
|
|
1618
|
+
weeklyScheduleOptions: z.object({
|
|
1619
|
+
cutOffTime: z.object({
|
|
1620
|
+
dayOfWeek: z.enum([
|
|
1621
|
+
"MON",
|
|
1622
|
+
"TUE",
|
|
1623
|
+
"WED",
|
|
1624
|
+
"THU",
|
|
1625
|
+
"FRI",
|
|
1626
|
+
"SAT",
|
|
1627
|
+
"SUN"
|
|
1628
|
+
]).describe("Day of the week.").optional(),
|
|
1629
|
+
timeOfDay: z.object({
|
|
1630
|
+
hours: z.number().int().describe(
|
|
1631
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
1632
|
+
).optional(),
|
|
1633
|
+
minutes: z.number().int().describe(
|
|
1634
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
1635
|
+
).optional()
|
|
1636
|
+
}).describe("Time of the day.").optional()
|
|
1637
|
+
}).describe(
|
|
1638
|
+
"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."
|
|
1639
|
+
).optional()
|
|
1640
|
+
}).describe(
|
|
1641
|
+
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
1642
|
+
)
|
|
1643
|
+
})
|
|
1644
|
+
])
|
|
1645
|
+
).optional(),
|
|
1646
|
+
fulfillmentTimesDisplay: z.intersection(
|
|
1647
|
+
z.object({
|
|
1648
|
+
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
1649
|
+
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
1650
|
+
).optional()
|
|
1651
|
+
}),
|
|
1652
|
+
z.xor([
|
|
1653
|
+
z.object({
|
|
1654
|
+
timeWindowsOptions: z.never().optional()
|
|
1655
|
+
}),
|
|
1656
|
+
z.object({
|
|
1657
|
+
timeWindowsOptions: z.object({
|
|
1658
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
1659
|
+
duration: z.number().int().describe(
|
|
1660
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1661
|
+
).min(0).optional().nullable()
|
|
1662
|
+
}).describe(
|
|
1663
|
+
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
1664
|
+
)
|
|
1665
|
+
})
|
|
1666
|
+
])
|
|
1667
|
+
).describe(
|
|
1668
|
+
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
1669
|
+
).optional()
|
|
1670
|
+
}).describe(
|
|
1671
|
+
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
1672
|
+
)
|
|
1673
|
+
})
|
|
1674
|
+
])
|
|
1675
|
+
).describe("Information about when an order can be placed for.").optional(),
|
|
1676
|
+
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
1677
|
+
/^[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}$/,
|
|
1678
|
+
"Must be a valid GUID"
|
|
1679
|
+
).optional().nullable(),
|
|
1680
|
+
businessLocationId: z.string().describe(
|
|
1681
|
+
"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."
|
|
1682
|
+
).regex(
|
|
1683
|
+
/^[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}$/,
|
|
1684
|
+
"Must be a valid GUID"
|
|
1685
|
+
).optional().nullable(),
|
|
1686
|
+
extendedFields: z.object({
|
|
1687
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1688
|
+
"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)."
|
|
1689
|
+
).optional()
|
|
1690
|
+
}).describe("Extended fields.").optional(),
|
|
1691
|
+
tags: z.object({
|
|
1692
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1693
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
1694
|
+
).optional(),
|
|
1695
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1696
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
1697
|
+
).optional()
|
|
1698
|
+
}).describe(
|
|
1699
|
+
"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."
|
|
1700
|
+
).optional()
|
|
1701
|
+
}),
|
|
1702
|
+
z.xor([
|
|
1703
|
+
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
1704
|
+
z.object({
|
|
1705
|
+
pausedUntilOptions: z.object({
|
|
1706
|
+
time: z.date().describe(
|
|
1707
|
+
"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."
|
|
1708
|
+
).optional().nullable()
|
|
1709
|
+
}).describe(
|
|
1710
|
+
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
1711
|
+
)
|
|
1712
|
+
})
|
|
1713
|
+
])
|
|
1714
|
+
)
|
|
1715
|
+
).optional(),
|
|
1716
|
+
pagingMetadata: z.object({
|
|
1717
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
1718
|
+
cursors: z.object({
|
|
1719
|
+
next: z.string().describe(
|
|
1720
|
+
"Cursor string pointing to the next page in the list of results."
|
|
1721
|
+
).max(16e3).optional().nullable(),
|
|
1722
|
+
prev: z.string().describe(
|
|
1723
|
+
"Cursor pointing to the previous page in the list of results."
|
|
1724
|
+
).max(16e3).optional().nullable()
|
|
1725
|
+
}).describe(
|
|
1726
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
1727
|
+
).optional(),
|
|
1728
|
+
hasNext: z.boolean().describe(
|
|
1729
|
+
"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."
|
|
1730
|
+
).optional().nullable()
|
|
1731
|
+
}).describe("Metadata of the paginated results.").optional()
|
|
1732
|
+
});
|
|
1733
|
+
var ListOperationsRequest = z.object({});
|
|
1734
|
+
var ListOperationsResponse = z.object({
|
|
1735
|
+
operations: z.array(
|
|
1736
|
+
z.intersection(
|
|
1737
|
+
z.object({
|
|
1738
|
+
_id: z.string().describe("Operation ID.").regex(
|
|
1739
|
+
/^[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}$/,
|
|
1740
|
+
"Must be a valid GUID"
|
|
1741
|
+
).optional().nullable(),
|
|
1742
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1743
|
+
"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."
|
|
1744
|
+
).optional().nullable(),
|
|
1745
|
+
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
1746
|
+
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
1747
|
+
name: z.string().describe("Operation name.").optional().nullable(),
|
|
1748
|
+
default: z.boolean().describe(
|
|
1749
|
+
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
1750
|
+
).optional().nullable(),
|
|
1751
|
+
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
1752
|
+
onlineOrderingStatus: z.enum([
|
|
1753
|
+
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
1754
|
+
"ENABLED",
|
|
1755
|
+
"DISABLED",
|
|
1756
|
+
"PAUSED_UNTIL"
|
|
1757
|
+
]).describe("Online ordering status of the operation. <br />").optional(),
|
|
1758
|
+
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
|
|
1759
|
+
orderScheduling: z.intersection(
|
|
1760
|
+
z.object({
|
|
1761
|
+
type: z.enum(["ASAP", "PREORDER"]).describe(
|
|
1762
|
+
"Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
|
|
1763
|
+
).optional()
|
|
1764
|
+
}),
|
|
1765
|
+
z.xor([
|
|
1766
|
+
z.object({
|
|
1767
|
+
asapOptions: z.never().optional(),
|
|
1768
|
+
preorderOptions: z.never().optional()
|
|
1769
|
+
}),
|
|
1770
|
+
z.object({
|
|
1771
|
+
preorderOptions: z.never().optional(),
|
|
1772
|
+
asapOptions: z.intersection(
|
|
1773
|
+
z.object({
|
|
1774
|
+
preparationTime: z.intersection(
|
|
1775
|
+
z.object({
|
|
1776
|
+
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
1777
|
+
}),
|
|
1778
|
+
z.xor([
|
|
1779
|
+
z.object({
|
|
1780
|
+
maxTimeOptions: z.never().optional(),
|
|
1781
|
+
timeRangeOptions: z.never().optional()
|
|
1782
|
+
}),
|
|
1783
|
+
z.object({
|
|
1784
|
+
timeRangeOptions: z.never().optional(),
|
|
1785
|
+
maxTimeOptions: z.object({
|
|
1786
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
1787
|
+
"Unit of time for the duration."
|
|
1788
|
+
).optional(),
|
|
1789
|
+
duration: z.number().int().describe(
|
|
1790
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1791
|
+
).min(0).optional().nullable()
|
|
1792
|
+
}).describe(
|
|
1793
|
+
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
1794
|
+
)
|
|
1795
|
+
}),
|
|
1796
|
+
z.object({
|
|
1797
|
+
maxTimeOptions: z.never().optional(),
|
|
1798
|
+
timeRangeOptions: z.object({
|
|
1799
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
1800
|
+
minDuration: z.number().int().describe(
|
|
1801
|
+
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
1802
|
+
).min(1).optional().nullable(),
|
|
1803
|
+
maxDuration: z.number().int().describe(
|
|
1804
|
+
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
1805
|
+
).min(1).optional().nullable()
|
|
1806
|
+
}).describe(
|
|
1807
|
+
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
1808
|
+
)
|
|
1809
|
+
})
|
|
1810
|
+
])
|
|
1811
|
+
).describe(
|
|
1812
|
+
"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."
|
|
1813
|
+
).optional(),
|
|
1814
|
+
asapFutureHandlingType: z.enum([
|
|
1815
|
+
"NO_FUTURE_HANDLING",
|
|
1816
|
+
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
1817
|
+
]).describe(
|
|
1818
|
+
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
1819
|
+
).optional()
|
|
1820
|
+
}),
|
|
1821
|
+
z.xor([
|
|
1822
|
+
z.object({
|
|
1823
|
+
businessDaysAheadHandlingOptions: z.never().optional()
|
|
1824
|
+
}),
|
|
1825
|
+
z.object({
|
|
1826
|
+
businessDaysAheadHandlingOptions: z.object({
|
|
1827
|
+
daysCount: z.number().int().describe(
|
|
1828
|
+
"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."
|
|
1829
|
+
).min(0).optional().nullable()
|
|
1830
|
+
}).describe(
|
|
1831
|
+
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
1832
|
+
)
|
|
1833
|
+
})
|
|
1834
|
+
])
|
|
1835
|
+
).describe(
|
|
1836
|
+
"Options for scheduling. Required if `type` is `ASAP`."
|
|
1837
|
+
)
|
|
1838
|
+
}),
|
|
1839
|
+
z.object({
|
|
1840
|
+
asapOptions: z.never().optional(),
|
|
1841
|
+
preorderOptions: z.object({
|
|
1842
|
+
method: z.intersection(
|
|
1843
|
+
z.object({
|
|
1844
|
+
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
1845
|
+
"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."
|
|
1846
|
+
).optional()
|
|
1847
|
+
}),
|
|
1848
|
+
z.xor([
|
|
1849
|
+
z.object({
|
|
1850
|
+
timeBoundedOptions: z.never().optional(),
|
|
1851
|
+
weeklyScheduleOptions: z.never().optional()
|
|
1852
|
+
}),
|
|
1853
|
+
z.object({
|
|
1854
|
+
weeklyScheduleOptions: z.never().optional(),
|
|
1855
|
+
timeBoundedOptions: z.object({
|
|
1856
|
+
minTimeInAdvance: z.object({
|
|
1857
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
1858
|
+
"Unit of time for the duration."
|
|
1859
|
+
).optional(),
|
|
1860
|
+
duration: z.number().int().describe(
|
|
1861
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1862
|
+
).min(0).optional().nullable()
|
|
1863
|
+
}).describe(
|
|
1864
|
+
"Minimum time required to schedule the order."
|
|
1865
|
+
).optional(),
|
|
1866
|
+
maxTimeInAdvance: z.object({
|
|
1867
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
1868
|
+
"Unit of time for the duration."
|
|
1869
|
+
).optional(),
|
|
1870
|
+
duration: z.number().int().describe(
|
|
1871
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1872
|
+
).min(0).optional().nullable()
|
|
1873
|
+
}).describe(
|
|
1874
|
+
"Maximum time allowed to schedule the order."
|
|
1875
|
+
).optional()
|
|
1876
|
+
}).describe(
|
|
1877
|
+
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
1878
|
+
)
|
|
1879
|
+
}),
|
|
1880
|
+
z.object({
|
|
1881
|
+
timeBoundedOptions: z.never().optional(),
|
|
1882
|
+
weeklyScheduleOptions: z.object({
|
|
1883
|
+
cutOffTime: z.object({
|
|
1884
|
+
dayOfWeek: z.enum([
|
|
1885
|
+
"MON",
|
|
1886
|
+
"TUE",
|
|
1887
|
+
"WED",
|
|
1888
|
+
"THU",
|
|
1889
|
+
"FRI",
|
|
1890
|
+
"SAT",
|
|
1891
|
+
"SUN"
|
|
1892
|
+
]).describe("Day of the week.").optional(),
|
|
1893
|
+
timeOfDay: z.object({
|
|
1894
|
+
hours: z.number().int().describe(
|
|
1895
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
1896
|
+
).optional(),
|
|
1897
|
+
minutes: z.number().int().describe(
|
|
1898
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
1899
|
+
).optional()
|
|
1900
|
+
}).describe("Time of the day.").optional()
|
|
1901
|
+
}).describe(
|
|
1902
|
+
"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."
|
|
1903
|
+
).optional()
|
|
1904
|
+
}).describe(
|
|
1905
|
+
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
1906
|
+
)
|
|
1907
|
+
})
|
|
1908
|
+
])
|
|
1909
|
+
).optional(),
|
|
1910
|
+
fulfillmentTimesDisplay: z.intersection(
|
|
1911
|
+
z.object({
|
|
1912
|
+
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
1913
|
+
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
1914
|
+
).optional()
|
|
1915
|
+
}),
|
|
1916
|
+
z.xor([
|
|
1917
|
+
z.object({
|
|
1918
|
+
timeWindowsOptions: z.never().optional()
|
|
1919
|
+
}),
|
|
1920
|
+
z.object({
|
|
1921
|
+
timeWindowsOptions: z.object({
|
|
1922
|
+
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
1923
|
+
duration: z.number().int().describe(
|
|
1924
|
+
"Duration value. Unit of time specified in `timeUnit`."
|
|
1925
|
+
).min(0).optional().nullable()
|
|
1926
|
+
}).describe(
|
|
1927
|
+
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
1928
|
+
)
|
|
1929
|
+
})
|
|
1930
|
+
])
|
|
1931
|
+
).describe(
|
|
1932
|
+
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
1933
|
+
).optional()
|
|
1934
|
+
}).describe(
|
|
1935
|
+
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
1936
|
+
)
|
|
1937
|
+
})
|
|
1938
|
+
])
|
|
1939
|
+
).describe("Information about when an order can be placed for.").optional(),
|
|
1940
|
+
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
1941
|
+
/^[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}$/,
|
|
1942
|
+
"Must be a valid GUID"
|
|
1943
|
+
).optional().nullable(),
|
|
1944
|
+
businessLocationId: z.string().describe(
|
|
1945
|
+
"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."
|
|
1946
|
+
).regex(
|
|
1947
|
+
/^[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}$/,
|
|
1948
|
+
"Must be a valid GUID"
|
|
1949
|
+
).optional().nullable(),
|
|
1950
|
+
extendedFields: z.object({
|
|
1951
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1952
|
+
"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)."
|
|
1953
|
+
).optional()
|
|
1954
|
+
}).describe("Extended fields.").optional(),
|
|
1955
|
+
tags: z.object({
|
|
1956
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1957
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
1958
|
+
).optional(),
|
|
1959
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
1960
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
1961
|
+
).optional()
|
|
1962
|
+
}).describe(
|
|
1963
|
+
"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."
|
|
1964
|
+
).optional()
|
|
1965
|
+
}),
|
|
1966
|
+
z.xor([
|
|
1967
|
+
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
1968
|
+
z.object({
|
|
1969
|
+
pausedUntilOptions: z.object({
|
|
1970
|
+
time: z.date().describe(
|
|
1971
|
+
"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."
|
|
1972
|
+
).optional().nullable()
|
|
1973
|
+
}).describe(
|
|
1974
|
+
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
1975
|
+
)
|
|
1976
|
+
})
|
|
1977
|
+
])
|
|
1978
|
+
)
|
|
1979
|
+
).optional()
|
|
1980
|
+
});
|
|
1981
|
+
var ListAvailableFulfillmentOptionsRequest = z.object({
|
|
1982
|
+
operationId: z.string().describe(
|
|
1983
|
+
"Operation ID. Returned fulfillment options will belong to this operation."
|
|
1984
|
+
).regex(
|
|
1985
|
+
/^[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}$/,
|
|
1986
|
+
"Must be a valid GUID"
|
|
1987
|
+
),
|
|
1988
|
+
options: z.object({
|
|
1989
|
+
deliveryAddress: z.intersection(
|
|
1990
|
+
z.object({
|
|
1991
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
1992
|
+
subdivision: z.string().describe(
|
|
1993
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
1994
|
+
).optional().nullable(),
|
|
1995
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1996
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
1997
|
+
addressLine2: z.string().describe(
|
|
1998
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
1999
|
+
).optional().nullable(),
|
|
2000
|
+
formattedAddress: z.string().describe(
|
|
2001
|
+
"A string containing the full address of this location."
|
|
2002
|
+
).optional().nullable(),
|
|
2003
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
2004
|
+
geocode: z.object({
|
|
2005
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2006
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2007
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
2008
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
2009
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
2010
|
+
subdivisions: z.array(
|
|
2011
|
+
z.object({
|
|
2012
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
2013
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
2014
|
+
})
|
|
2015
|
+
).max(6).optional()
|
|
2016
|
+
}),
|
|
2017
|
+
z.xor([
|
|
2018
|
+
z.object({
|
|
2019
|
+
streetAddress: z.never().optional(),
|
|
2020
|
+
addressLine: z.never().optional()
|
|
2021
|
+
}),
|
|
2022
|
+
z.object({
|
|
2023
|
+
addressLine: z.never().optional(),
|
|
2024
|
+
streetAddress: z.object({
|
|
2025
|
+
number: z.string().describe("Street number.").optional(),
|
|
2026
|
+
name: z.string().describe("Street name.").optional(),
|
|
2027
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
2028
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
2029
|
+
}).describe("Street name and number.")
|
|
2030
|
+
}),
|
|
2031
|
+
z.object({
|
|
2032
|
+
streetAddress: z.never().optional(),
|
|
2033
|
+
addressLine: z.string().describe(
|
|
2034
|
+
"Main address line, usually street and number as free text."
|
|
2035
|
+
)
|
|
2036
|
+
})
|
|
2037
|
+
])
|
|
2038
|
+
).describe(
|
|
2039
|
+
"Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
|
|
2040
|
+
).optional()
|
|
2041
|
+
}).optional()
|
|
2042
|
+
});
|
|
2043
|
+
var ListAvailableFulfillmentOptionsResponse = z.object({
|
|
2044
|
+
pickupConfigured: z.boolean().describe(
|
|
2045
|
+
"Whether pickup fulfillment method is configured for the requested operation."
|
|
2046
|
+
).optional(),
|
|
2047
|
+
deliveryConfigured: z.boolean().describe(
|
|
2048
|
+
"Whether delivery fulfillment method is configured for the requested operation."
|
|
2049
|
+
).optional(),
|
|
2050
|
+
fulfillmentOptions: z.array(
|
|
2051
|
+
z.intersection(
|
|
2052
|
+
z.object({
|
|
2053
|
+
_id: z.string().describe("Fulfillment method ID.").regex(
|
|
2054
|
+
/^[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}$/,
|
|
2055
|
+
"Must be a valid GUID"
|
|
2056
|
+
).optional().nullable(),
|
|
2057
|
+
type: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment option type.").optional(),
|
|
2058
|
+
minOrderPrice: z.string().describe(
|
|
2059
|
+
"Minimum order price to qualify for the fulfillment option."
|
|
2060
|
+
).optional().nullable(),
|
|
2061
|
+
fee: z.string().describe("Fee for using the fulfillment option.").optional().nullable(),
|
|
2062
|
+
availability: z.object({
|
|
2063
|
+
startTime: z.date().describe(
|
|
2064
|
+
"Date and time at which the fulfillment option's availability starts."
|
|
2065
|
+
).optional().nullable(),
|
|
2066
|
+
endTime: z.date().describe(
|
|
2067
|
+
"Date and time at which the fulfillment option's availability ends."
|
|
2068
|
+
).optional().nullable(),
|
|
2069
|
+
availableTimes: z.array(
|
|
2070
|
+
z.object({
|
|
2071
|
+
dayOfWeek: z.enum(["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]).describe("The day of week this availability relates to.").optional(),
|
|
2072
|
+
timeRanges: z.array(
|
|
2073
|
+
z.object({
|
|
2074
|
+
startTime: z.object({
|
|
2075
|
+
hours: z.number().int().describe(
|
|
2076
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
2077
|
+
).optional(),
|
|
2078
|
+
minutes: z.number().int().describe(
|
|
2079
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
2080
|
+
).optional()
|
|
2081
|
+
}).describe(
|
|
2082
|
+
"The start time in time of day representation."
|
|
2083
|
+
).optional(),
|
|
2084
|
+
endTime: z.object({
|
|
2085
|
+
hours: z.number().int().describe(
|
|
2086
|
+
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
2087
|
+
).optional(),
|
|
2088
|
+
minutes: z.number().int().describe(
|
|
2089
|
+
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
2090
|
+
).optional()
|
|
2091
|
+
}).describe(
|
|
2092
|
+
"The end time in time of day representation."
|
|
2093
|
+
).optional()
|
|
2094
|
+
})
|
|
2095
|
+
).optional()
|
|
2096
|
+
})
|
|
2097
|
+
).optional(),
|
|
2098
|
+
exceptions: z.array(
|
|
2099
|
+
z.object({
|
|
2100
|
+
startTime: z.date().describe("The start time of the availability exception.").optional().nullable(),
|
|
2101
|
+
endTime: z.date().describe("The end time of the availability exception.").optional().nullable(),
|
|
2102
|
+
available: z.boolean().describe(
|
|
2103
|
+
"An indication whether the exception makes the [`start_time`, `end_time`] range available."
|
|
2104
|
+
).optional(),
|
|
2105
|
+
reason: z.string().describe("The reason for the exception.").optional().nullable()
|
|
2106
|
+
})
|
|
2107
|
+
).optional(),
|
|
2108
|
+
timeZone: z.string().describe("Timezone for which the available times are given.").optional().nullable(),
|
|
2109
|
+
asapHandlingAvailable: z.boolean().describe(
|
|
2110
|
+
"Whether it's possible to submit an order for as soon as possible handling."
|
|
2111
|
+
).optional(),
|
|
2112
|
+
futureHandlingAvailable: z.boolean().describe(
|
|
2113
|
+
"Whether it's possible to submit an order for future handling."
|
|
2114
|
+
).optional().nullable()
|
|
2115
|
+
}).describe("Availability of the fulfillment option.").optional(),
|
|
2116
|
+
fulfillmentTimeType: z.enum(["UNDEFINED_FULFILLMENT_TIME", "MAX_TIME", "DURATION_RANGE"]).describe(
|
|
2117
|
+
"Fulfillment time type.\nRelevant only to ASAP operations."
|
|
2118
|
+
).optional(),
|
|
2119
|
+
fulfillmentTimesDisplayType: z.enum(["UNDEFINED_FULFILLMENT_TIMES_DISPLAY", "TIME_WINDOWS"]).describe(
|
|
2120
|
+
"Fulfillment times display type. Relevant to preorder operations."
|
|
2121
|
+
).optional(),
|
|
2122
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
2123
|
+
"Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
|
|
2124
|
+
).optional().nullable(),
|
|
2125
|
+
instructions: z.string().describe("Instructions for the fulfillment.").max(250).optional().nullable(),
|
|
2126
|
+
businessLocationId: z.string().regex(
|
|
2127
|
+
/^[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}$/,
|
|
2128
|
+
"Must be a valid GUID"
|
|
2129
|
+
).optional().nullable()
|
|
2130
|
+
}),
|
|
2131
|
+
z.intersection(
|
|
2132
|
+
z.intersection(
|
|
2133
|
+
z.xor([
|
|
2134
|
+
z.object({
|
|
2135
|
+
maxTimeOptions: z.never().optional(),
|
|
2136
|
+
durationRangeOptions: z.never().optional()
|
|
2137
|
+
}),
|
|
2138
|
+
z.object({
|
|
2139
|
+
durationRangeOptions: z.never().optional(),
|
|
2140
|
+
maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum time.")
|
|
2141
|
+
}),
|
|
2142
|
+
z.object({
|
|
2143
|
+
maxTimeOptions: z.never().optional(),
|
|
2144
|
+
durationRangeOptions: z.object({
|
|
2145
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
2146
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
2147
|
+
}).describe("Fulfillment time is limited by a range.")
|
|
2148
|
+
})
|
|
2149
|
+
]),
|
|
2150
|
+
z.xor([
|
|
2151
|
+
z.object({ timeWindowsOptions: z.never().optional() }),
|
|
2152
|
+
z.object({
|
|
2153
|
+
timeWindowsOptions: z.object({
|
|
2154
|
+
durationInMinutes: z.number().int().describe("Time window duration in minutes.").optional()
|
|
2155
|
+
}).describe(
|
|
2156
|
+
"Options for fulfillment time. Required when `type` is `TIME_WINDOWS`."
|
|
2157
|
+
)
|
|
2158
|
+
})
|
|
2159
|
+
])
|
|
2160
|
+
),
|
|
2161
|
+
z.xor([
|
|
2162
|
+
z.object({
|
|
2163
|
+
pickupOptions: z.never().optional(),
|
|
2164
|
+
deliveryOptions: z.never().optional(),
|
|
2165
|
+
dineInOptions: z.never().optional()
|
|
2166
|
+
}),
|
|
2167
|
+
z.object({
|
|
2168
|
+
deliveryOptions: z.never().optional(),
|
|
2169
|
+
dineInOptions: z.never().optional(),
|
|
2170
|
+
pickupOptions: z.object({
|
|
2171
|
+
address: z.object({
|
|
2172
|
+
city: z.string().optional().nullable(),
|
|
2173
|
+
subdivision: z.string().optional().nullable(),
|
|
2174
|
+
country: z.string().optional().nullable(),
|
|
2175
|
+
postalCode: z.string().optional().nullable(),
|
|
2176
|
+
addressLine1: z.string().optional().nullable(),
|
|
2177
|
+
addressLine2: z.string().optional().nullable()
|
|
2178
|
+
}).describe(
|
|
2179
|
+
"Pickup address. This is the restaurant's address."
|
|
2180
|
+
).optional()
|
|
2181
|
+
}).describe("Information about pickup fulfillment types.")
|
|
2182
|
+
}),
|
|
2183
|
+
z.object({
|
|
2184
|
+
pickupOptions: z.never().optional(),
|
|
2185
|
+
dineInOptions: z.never().optional(),
|
|
2186
|
+
deliveryOptions: z.object({
|
|
2187
|
+
deliveryProviderAppId: z.string().describe("Delivery provider app id.").regex(
|
|
2188
|
+
/^[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}$/,
|
|
2189
|
+
"Must be a valid GUID"
|
|
2190
|
+
).optional().nullable(),
|
|
2191
|
+
courierPickupInstructions: z.string().describe("Pickup instructions for couriers.").max(250).optional().nullable(),
|
|
2192
|
+
deliveryTimeInMinutes: z.number().int().describe(
|
|
2193
|
+
"how much time it takes to deliver the order in minutes."
|
|
2194
|
+
).min(0).optional().nullable()
|
|
2195
|
+
}).describe("Information about delivery fulfillment types.")
|
|
2196
|
+
}),
|
|
2197
|
+
z.object({
|
|
2198
|
+
pickupOptions: z.never().optional(),
|
|
2199
|
+
deliveryOptions: z.never().optional(),
|
|
2200
|
+
dineInOptions: z.object({
|
|
2201
|
+
address: z.object({
|
|
2202
|
+
city: z.string().optional().nullable(),
|
|
2203
|
+
subdivision: z.string().optional().nullable(),
|
|
2204
|
+
country: z.string().optional().nullable(),
|
|
2205
|
+
postalCode: z.string().optional().nullable(),
|
|
2206
|
+
addressLine1: z.string().optional().nullable(),
|
|
2207
|
+
addressLine2: z.string().optional().nullable()
|
|
2208
|
+
}).describe(
|
|
2209
|
+
"Dine-in address. This is the restaurant's address."
|
|
2210
|
+
).optional()
|
|
2211
|
+
}).describe("Information about dine-in fulfillment types.")
|
|
2212
|
+
})
|
|
2213
|
+
])
|
|
2214
|
+
)
|
|
2215
|
+
)
|
|
2216
|
+
).optional(),
|
|
2217
|
+
blockedByAvailabilityExceptions: z.boolean().describe("Whether availability exceptions block the fulfillment options.").optional().nullable(),
|
|
2218
|
+
blockedByPausedOrdering: z.boolean().describe(
|
|
2219
|
+
"Whether availability exceptions from type = PAUSED_ORDERING block the fulfillment options."
|
|
2220
|
+
).optional().nullable()
|
|
2221
|
+
});
|
|
2222
|
+
var ListFirstAvailableTimeSlotForFulfillmentTypesRequest = z.object({
|
|
2223
|
+
operationId: z.string().describe(
|
|
2224
|
+
"Operation ID.\nReturned fulfillment options will belong to this operation."
|
|
2225
|
+
).regex(
|
|
2226
|
+
/^[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}$/,
|
|
2227
|
+
"Must be a valid GUID"
|
|
2228
|
+
),
|
|
2229
|
+
options: z.object({
|
|
2230
|
+
deliveryAddress: z.intersection(
|
|
2231
|
+
z.object({
|
|
2232
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
2233
|
+
subdivision: z.string().describe(
|
|
2234
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
2235
|
+
).optional().nullable(),
|
|
2236
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2237
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
2238
|
+
addressLine2: z.string().describe(
|
|
2239
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
2240
|
+
).optional().nullable(),
|
|
2241
|
+
formattedAddress: z.string().describe(
|
|
2242
|
+
"A string containing the full address of this location."
|
|
2243
|
+
).optional().nullable(),
|
|
2244
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
2245
|
+
geocode: z.object({
|
|
2246
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2247
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2248
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
2249
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
2250
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
2251
|
+
subdivisions: z.array(
|
|
2252
|
+
z.object({
|
|
2253
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
2254
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
2255
|
+
})
|
|
2256
|
+
).max(6).optional()
|
|
2257
|
+
}),
|
|
2258
|
+
z.xor([
|
|
2259
|
+
z.object({
|
|
2260
|
+
streetAddress: z.never().optional(),
|
|
2261
|
+
addressLine: z.never().optional()
|
|
2262
|
+
}),
|
|
2263
|
+
z.object({
|
|
2264
|
+
addressLine: z.never().optional(),
|
|
2265
|
+
streetAddress: z.object({
|
|
2266
|
+
number: z.string().describe("Street number.").optional(),
|
|
2267
|
+
name: z.string().describe("Street name.").optional(),
|
|
2268
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
2269
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
2270
|
+
}).describe("Street name and number.")
|
|
2271
|
+
}),
|
|
2272
|
+
z.object({
|
|
2273
|
+
streetAddress: z.never().optional(),
|
|
2274
|
+
addressLine: z.string().describe(
|
|
2275
|
+
"Main address line, usually street and number as free text."
|
|
2276
|
+
)
|
|
2277
|
+
})
|
|
2278
|
+
])
|
|
2279
|
+
).describe(
|
|
2280
|
+
"Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
|
|
2281
|
+
).optional()
|
|
2282
|
+
}).optional()
|
|
2283
|
+
});
|
|
2284
|
+
var ListFirstAvailableTimeSlotForFulfillmentTypesResponse = z.object({
|
|
2285
|
+
timeSlots: z.array(
|
|
2286
|
+
z.object({
|
|
2287
|
+
startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
|
|
2288
|
+
endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
|
|
2289
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
|
|
2290
|
+
startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
|
|
2291
|
+
fulfillmentDetails: z.array(
|
|
2292
|
+
z.intersection(
|
|
2293
|
+
z.object({
|
|
2294
|
+
fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
|
|
2295
|
+
minOrderPrice: z.string().describe(
|
|
2296
|
+
"Minimum order price to qualify for using this fulfillment."
|
|
2297
|
+
).optional().nullable(),
|
|
2298
|
+
fulfillmentTimeType: z.enum([
|
|
2299
|
+
"UNDEFINED_FULFILLMENT_TIME",
|
|
2300
|
+
"MAX_TIME",
|
|
2301
|
+
"DURATION_RANGE"
|
|
2302
|
+
]).describe(
|
|
2303
|
+
"Fulfillment time type. Only be relevant to `ASAP` operations."
|
|
2304
|
+
).optional(),
|
|
2305
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
2306
|
+
"Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
|
|
2307
|
+
).optional().nullable()
|
|
2308
|
+
}),
|
|
2309
|
+
z.xor([
|
|
2310
|
+
z.object({
|
|
2311
|
+
maxTimeOptions: z.never().optional(),
|
|
2312
|
+
durationRangeOptions: z.never().optional()
|
|
2313
|
+
}),
|
|
2314
|
+
z.object({
|
|
2315
|
+
durationRangeOptions: z.never().optional(),
|
|
2316
|
+
maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
|
|
2317
|
+
}),
|
|
2318
|
+
z.object({
|
|
2319
|
+
maxTimeOptions: z.never().optional(),
|
|
2320
|
+
durationRangeOptions: z.object({
|
|
2321
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
2322
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
2323
|
+
}).describe("Fulfillment time has a minimum and a maximum.")
|
|
2324
|
+
})
|
|
2325
|
+
])
|
|
2326
|
+
)
|
|
2327
|
+
).max(500).optional(),
|
|
2328
|
+
fulfillmentAddress: z.object({
|
|
2329
|
+
address: z.object({
|
|
2330
|
+
city: z.string().optional().nullable(),
|
|
2331
|
+
subdivision: z.string().optional().nullable(),
|
|
2332
|
+
country: z.string().optional().nullable(),
|
|
2333
|
+
postalCode: z.string().optional().nullable(),
|
|
2334
|
+
addressLine1: z.string().optional().nullable(),
|
|
2335
|
+
addressLine2: z.string().optional().nullable()
|
|
2336
|
+
}).describe(
|
|
2337
|
+
"Pickup address. This is the address of the restaurant."
|
|
2338
|
+
).optional()
|
|
2339
|
+
}).describe("Address of the fulfillment.").optional()
|
|
2340
|
+
})
|
|
2341
|
+
).optional()
|
|
2342
|
+
});
|
|
2343
|
+
var CalculateFirstAvailableTimeSlotPerFulfillmentTypeRequest = z.object({
|
|
2344
|
+
operationId: z.string().describe("Operation ID.").regex(
|
|
2345
|
+
/^[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}$/,
|
|
2346
|
+
"Must be a valid GUID"
|
|
2347
|
+
),
|
|
2348
|
+
options: z.object({
|
|
2349
|
+
deliveryAddress: z.intersection(
|
|
2350
|
+
z.object({
|
|
2351
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
2352
|
+
subdivision: z.string().describe(
|
|
2353
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
2354
|
+
).optional().nullable(),
|
|
2355
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2356
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
2357
|
+
addressLine2: z.string().describe(
|
|
2358
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
2359
|
+
).optional().nullable(),
|
|
2360
|
+
formattedAddress: z.string().describe(
|
|
2361
|
+
"A string containing the full address of this location."
|
|
2362
|
+
).optional().nullable(),
|
|
2363
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
2364
|
+
geocode: z.object({
|
|
2365
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2366
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2367
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
2368
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
2369
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
2370
|
+
subdivisions: z.array(
|
|
2371
|
+
z.object({
|
|
2372
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
2373
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
2374
|
+
})
|
|
2375
|
+
).max(6).optional()
|
|
2376
|
+
}),
|
|
2377
|
+
z.xor([
|
|
2378
|
+
z.object({
|
|
2379
|
+
streetAddress: z.never().optional(),
|
|
2380
|
+
addressLine: z.never().optional()
|
|
2381
|
+
}),
|
|
2382
|
+
z.object({
|
|
2383
|
+
addressLine: z.never().optional(),
|
|
2384
|
+
streetAddress: z.object({
|
|
2385
|
+
number: z.string().describe("Street number.").optional(),
|
|
2386
|
+
name: z.string().describe("Street name.").optional(),
|
|
2387
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
2388
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
2389
|
+
}).describe("Street name and number.")
|
|
2390
|
+
}),
|
|
2391
|
+
z.object({
|
|
2392
|
+
streetAddress: z.never().optional(),
|
|
2393
|
+
addressLine: z.string().describe(
|
|
2394
|
+
"Main address line, usually street and number as free text."
|
|
2395
|
+
)
|
|
2396
|
+
})
|
|
2397
|
+
])
|
|
2398
|
+
).describe(
|
|
2399
|
+
"Delivery address.\n\nThe response includes a time slot with the delivery fulfillment type only if you specify a delivery address."
|
|
2400
|
+
).optional()
|
|
2401
|
+
}).optional()
|
|
2402
|
+
});
|
|
2403
|
+
var CalculateFirstAvailableTimeSlotPerFulfillmentTypeResponse = z.object({
|
|
2404
|
+
timeslotsPerFulfillmentType: z.array(
|
|
2405
|
+
z.object({
|
|
2406
|
+
timeSlot: z.object({
|
|
2407
|
+
startTime: z.date().describe(
|
|
2408
|
+
"Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
2409
|
+
).optional().nullable(),
|
|
2410
|
+
endTime: z.date().describe(
|
|
2411
|
+
"End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
2412
|
+
).optional().nullable(),
|
|
2413
|
+
orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
|
|
2414
|
+
}).describe("Time Slot details.").optional(),
|
|
2415
|
+
fulfillmentInfo: z.array(
|
|
2416
|
+
z.intersection(
|
|
2417
|
+
z.object({
|
|
2418
|
+
fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
|
|
2419
|
+
minOrderPrice: z.string().describe(
|
|
2420
|
+
"Minimum order price to qualify for using this fulfillment option."
|
|
2421
|
+
).optional().nullable(),
|
|
2422
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
2423
|
+
"Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
|
|
2424
|
+
).optional().nullable(),
|
|
2425
|
+
address: z.object({
|
|
2426
|
+
city: z.string().optional().nullable(),
|
|
2427
|
+
subdivision: z.string().optional().nullable(),
|
|
2428
|
+
country: z.string().optional().nullable(),
|
|
2429
|
+
postalCode: z.string().optional().nullable(),
|
|
2430
|
+
addressLine1: z.string().optional().nullable(),
|
|
2431
|
+
addressLine2: z.string().optional().nullable()
|
|
2432
|
+
}).describe(
|
|
2433
|
+
"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."
|
|
2434
|
+
).optional()
|
|
2435
|
+
}),
|
|
2436
|
+
z.xor([
|
|
2437
|
+
z.object({
|
|
2438
|
+
maxTime: z.never().optional(),
|
|
2439
|
+
durationRange: z.never().optional()
|
|
2440
|
+
}),
|
|
2441
|
+
z.object({
|
|
2442
|
+
durationRange: z.never().optional(),
|
|
2443
|
+
maxTime: z.number().int().describe("Maximum time to fulfill the order.")
|
|
2444
|
+
}),
|
|
2445
|
+
z.object({
|
|
2446
|
+
maxTime: z.never().optional(),
|
|
2447
|
+
durationRange: z.object({
|
|
2448
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
2449
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
2450
|
+
}).describe("Time range in which to fulfill the order.")
|
|
2451
|
+
})
|
|
2452
|
+
])
|
|
2453
|
+
)
|
|
2454
|
+
).max(500).optional(),
|
|
2455
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
|
|
2456
|
+
})
|
|
2457
|
+
).max(2).optional()
|
|
2458
|
+
});
|
|
2459
|
+
var ListFirstAvailableTimeSlotsForOperationsRequest = z.object({
|
|
2460
|
+
operationIds: z.array(z.string()).max(100),
|
|
2461
|
+
options: z.object({
|
|
2462
|
+
deliveryAddress: z.intersection(
|
|
2463
|
+
z.object({
|
|
2464
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
2465
|
+
subdivision: z.string().describe(
|
|
2466
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
2467
|
+
).optional().nullable(),
|
|
2468
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2469
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
2470
|
+
addressLine2: z.string().describe(
|
|
2471
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
2472
|
+
).optional().nullable(),
|
|
2473
|
+
formattedAddress: z.string().describe(
|
|
2474
|
+
"A string containing the full address of this location."
|
|
2475
|
+
).optional().nullable(),
|
|
2476
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
2477
|
+
geocode: z.object({
|
|
2478
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2479
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2480
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
2481
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
2482
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
2483
|
+
subdivisions: z.array(
|
|
2484
|
+
z.object({
|
|
2485
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
2486
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
2487
|
+
})
|
|
2488
|
+
).max(6).optional()
|
|
2489
|
+
}),
|
|
2490
|
+
z.xor([
|
|
2491
|
+
z.object({
|
|
2492
|
+
streetAddress: z.never().optional(),
|
|
2493
|
+
addressLine: z.never().optional()
|
|
2494
|
+
}),
|
|
2495
|
+
z.object({
|
|
2496
|
+
addressLine: z.never().optional(),
|
|
2497
|
+
streetAddress: z.object({
|
|
2498
|
+
number: z.string().describe("Street number.").optional(),
|
|
2499
|
+
name: z.string().describe("Street name.").optional(),
|
|
2500
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
2501
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
2502
|
+
}).describe("Street name and number.")
|
|
2503
|
+
}),
|
|
2504
|
+
z.object({
|
|
2505
|
+
streetAddress: z.never().optional(),
|
|
2506
|
+
addressLine: z.string().describe(
|
|
2507
|
+
"Main address line, usually street and number as free text."
|
|
2508
|
+
)
|
|
2509
|
+
})
|
|
2510
|
+
])
|
|
2511
|
+
).describe(
|
|
2512
|
+
"Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
|
|
2513
|
+
).optional()
|
|
2514
|
+
}).optional()
|
|
2515
|
+
});
|
|
2516
|
+
var ListFirstAvailableTimeSlotsForOperationsResponse = z.object({
|
|
2517
|
+
timeSlots: z.array(
|
|
2518
|
+
z.object({
|
|
2519
|
+
operationId: z.string().describe("Operation ID.").regex(
|
|
2520
|
+
/^[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}$/,
|
|
2521
|
+
"Must be a valid GUID"
|
|
2522
|
+
).optional(),
|
|
2523
|
+
timeSlots: z.array(
|
|
2524
|
+
z.object({
|
|
2525
|
+
startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
|
|
2526
|
+
endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
|
|
2527
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
|
|
2528
|
+
startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
|
|
2529
|
+
fulfillmentDetails: z.array(
|
|
2530
|
+
z.intersection(
|
|
2531
|
+
z.object({
|
|
2532
|
+
fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
|
|
2533
|
+
minOrderPrice: z.string().describe(
|
|
2534
|
+
"Minimum order price to qualify for using this fulfillment."
|
|
2535
|
+
).optional().nullable(),
|
|
2536
|
+
fulfillmentTimeType: z.enum([
|
|
2537
|
+
"UNDEFINED_FULFILLMENT_TIME",
|
|
2538
|
+
"MAX_TIME",
|
|
2539
|
+
"DURATION_RANGE"
|
|
2540
|
+
]).describe(
|
|
2541
|
+
"Fulfillment time type. Only be relevant to `ASAP` operations."
|
|
2542
|
+
).optional(),
|
|
2543
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
2544
|
+
"Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
|
|
2545
|
+
).optional().nullable()
|
|
2546
|
+
}),
|
|
2547
|
+
z.xor([
|
|
2548
|
+
z.object({
|
|
2549
|
+
maxTimeOptions: z.never().optional(),
|
|
2550
|
+
durationRangeOptions: z.never().optional()
|
|
2551
|
+
}),
|
|
2552
|
+
z.object({
|
|
2553
|
+
durationRangeOptions: z.never().optional(),
|
|
2554
|
+
maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
|
|
2555
|
+
}),
|
|
2556
|
+
z.object({
|
|
2557
|
+
maxTimeOptions: z.never().optional(),
|
|
2558
|
+
durationRangeOptions: z.object({
|
|
2559
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
2560
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
2561
|
+
}).describe(
|
|
2562
|
+
"Fulfillment time has a minimum and a maximum."
|
|
2563
|
+
)
|
|
2564
|
+
})
|
|
2565
|
+
])
|
|
2566
|
+
)
|
|
2567
|
+
).max(500).optional(),
|
|
2568
|
+
fulfillmentAddress: z.object({
|
|
2569
|
+
address: z.object({
|
|
2570
|
+
city: z.string().optional().nullable(),
|
|
2571
|
+
subdivision: z.string().optional().nullable(),
|
|
2572
|
+
country: z.string().optional().nullable(),
|
|
2573
|
+
postalCode: z.string().optional().nullable(),
|
|
2574
|
+
addressLine1: z.string().optional().nullable(),
|
|
2575
|
+
addressLine2: z.string().optional().nullable()
|
|
2576
|
+
}).describe(
|
|
2577
|
+
"Pickup address. This is the address of the restaurant."
|
|
2578
|
+
).optional()
|
|
2579
|
+
}).describe("Address of the fulfillment.").optional()
|
|
2580
|
+
})
|
|
2581
|
+
).max(100).optional()
|
|
2582
|
+
})
|
|
2583
|
+
).max(100).optional()
|
|
2584
|
+
});
|
|
2585
|
+
var CalculateFirstAvailableTimeSlotsPerOperationRequest = z.object({
|
|
2586
|
+
operationIds: z.array(z.string()).max(100),
|
|
2587
|
+
options: z.object({
|
|
2588
|
+
deliveryAddress: z.intersection(
|
|
2589
|
+
z.object({
|
|
2590
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
2591
|
+
subdivision: z.string().describe(
|
|
2592
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
2593
|
+
).optional().nullable(),
|
|
2594
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2595
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
2596
|
+
addressLine2: z.string().describe(
|
|
2597
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
2598
|
+
).optional().nullable(),
|
|
2599
|
+
formattedAddress: z.string().describe(
|
|
2600
|
+
"A string containing the full address of this location."
|
|
2601
|
+
).optional().nullable(),
|
|
2602
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
2603
|
+
geocode: z.object({
|
|
2604
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2605
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2606
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
2607
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
2608
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
2609
|
+
subdivisions: z.array(
|
|
2610
|
+
z.object({
|
|
2611
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
2612
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
2613
|
+
})
|
|
2614
|
+
).max(6).optional()
|
|
2615
|
+
}),
|
|
2616
|
+
z.xor([
|
|
2617
|
+
z.object({
|
|
2618
|
+
streetAddress: z.never().optional(),
|
|
2619
|
+
addressLine: z.never().optional()
|
|
2620
|
+
}),
|
|
2621
|
+
z.object({
|
|
2622
|
+
addressLine: z.never().optional(),
|
|
2623
|
+
streetAddress: z.object({
|
|
2624
|
+
number: z.string().describe("Street number.").optional(),
|
|
2625
|
+
name: z.string().describe("Street name.").optional(),
|
|
2626
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
2627
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
2628
|
+
}).describe("Street name and number.")
|
|
2629
|
+
}),
|
|
2630
|
+
z.object({
|
|
2631
|
+
streetAddress: z.never().optional(),
|
|
2632
|
+
addressLine: z.string().describe(
|
|
2633
|
+
"Main address line, usually street and number as free text."
|
|
2634
|
+
)
|
|
2635
|
+
})
|
|
2636
|
+
])
|
|
2637
|
+
).describe(
|
|
2638
|
+
"Delivery address.\n\nThe response includes time slots with delivery fulfillment types only if you specify a delivery address."
|
|
2639
|
+
).optional()
|
|
2640
|
+
}).optional()
|
|
2641
|
+
});
|
|
2642
|
+
var CalculateFirstAvailableTimeSlotsPerOperationResponse = z.object({
|
|
2643
|
+
timeSlotsPerOperation: z.array(
|
|
2644
|
+
z.object({
|
|
2645
|
+
operationId: z.string().describe("Operation ID.").regex(
|
|
2646
|
+
/^[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}$/,
|
|
2647
|
+
"Must be a valid GUID"
|
|
2648
|
+
).optional(),
|
|
2649
|
+
timeslotsPerFulfillmentType: z.array(
|
|
2650
|
+
z.object({
|
|
2651
|
+
timeSlot: z.object({
|
|
2652
|
+
startTime: z.date().describe(
|
|
2653
|
+
"Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
2654
|
+
).optional().nullable(),
|
|
2655
|
+
endTime: z.date().describe(
|
|
2656
|
+
"End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
2657
|
+
).optional().nullable(),
|
|
2658
|
+
orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
|
|
2659
|
+
}).describe("Time Slot details.").optional(),
|
|
2660
|
+
fulfillmentInfo: z.array(
|
|
2661
|
+
z.intersection(
|
|
2662
|
+
z.object({
|
|
2663
|
+
fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
|
|
2664
|
+
minOrderPrice: z.string().describe(
|
|
2665
|
+
"Minimum order price to qualify for using this fulfillment option."
|
|
2666
|
+
).optional().nullable(),
|
|
2667
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
2668
|
+
"Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
|
|
2669
|
+
).optional().nullable(),
|
|
2670
|
+
address: z.object({
|
|
2671
|
+
city: z.string().optional().nullable(),
|
|
2672
|
+
subdivision: z.string().optional().nullable(),
|
|
2673
|
+
country: z.string().optional().nullable(),
|
|
2674
|
+
postalCode: z.string().optional().nullable(),
|
|
2675
|
+
addressLine1: z.string().optional().nullable(),
|
|
2676
|
+
addressLine2: z.string().optional().nullable()
|
|
2677
|
+
}).describe(
|
|
2678
|
+
"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."
|
|
2679
|
+
).optional()
|
|
2680
|
+
}),
|
|
2681
|
+
z.xor([
|
|
2682
|
+
z.object({
|
|
2683
|
+
maxTime: z.never().optional(),
|
|
2684
|
+
durationRange: z.never().optional()
|
|
2685
|
+
}),
|
|
2686
|
+
z.object({
|
|
2687
|
+
durationRange: z.never().optional(),
|
|
2688
|
+
maxTime: z.number().int().describe("Maximum time to fulfill the order.")
|
|
2689
|
+
}),
|
|
2690
|
+
z.object({
|
|
2691
|
+
maxTime: z.never().optional(),
|
|
2692
|
+
durationRange: z.object({
|
|
2693
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
2694
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
2695
|
+
}).describe(
|
|
2696
|
+
"Time range in which to fulfill the order."
|
|
2697
|
+
)
|
|
2698
|
+
})
|
|
2699
|
+
])
|
|
2700
|
+
)
|
|
2701
|
+
).max(500).optional(),
|
|
2702
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
|
|
2703
|
+
})
|
|
2704
|
+
).max(2).optional()
|
|
2705
|
+
})
|
|
2706
|
+
).max(100).optional()
|
|
2707
|
+
});
|
|
2708
|
+
var ListFirstAvailableTimeSlotsForMenusRequest = z.object({
|
|
2709
|
+
operationId: z.string().describe(
|
|
2710
|
+
"Operation ID.\nReturned timeslots that are belong to this operation."
|
|
2711
|
+
).regex(
|
|
2712
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2713
|
+
"Must be a valid GUID"
|
|
2714
|
+
),
|
|
2715
|
+
options: z.object({
|
|
2716
|
+
deliveryAddress: z.intersection(
|
|
2717
|
+
z.object({
|
|
2718
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
2719
|
+
subdivision: z.string().describe(
|
|
2720
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
2721
|
+
).optional().nullable(),
|
|
2722
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2723
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
2724
|
+
addressLine2: z.string().describe(
|
|
2725
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
2726
|
+
).optional().nullable(),
|
|
2727
|
+
formattedAddress: z.string().describe(
|
|
2728
|
+
"A string containing the full address of this location."
|
|
2729
|
+
).optional().nullable(),
|
|
2730
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
2731
|
+
geocode: z.object({
|
|
2732
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2733
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2734
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
2735
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
2736
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
2737
|
+
subdivisions: z.array(
|
|
2738
|
+
z.object({
|
|
2739
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
2740
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
2741
|
+
})
|
|
2742
|
+
).max(6).optional()
|
|
2743
|
+
}),
|
|
2744
|
+
z.xor([
|
|
2745
|
+
z.object({
|
|
2746
|
+
streetAddress: z.never().optional(),
|
|
2747
|
+
addressLine: z.never().optional()
|
|
2748
|
+
}),
|
|
2749
|
+
z.object({
|
|
2750
|
+
addressLine: z.never().optional(),
|
|
2751
|
+
streetAddress: z.object({
|
|
2752
|
+
number: z.string().describe("Street number.").optional(),
|
|
2753
|
+
name: z.string().describe("Street name.").optional(),
|
|
2754
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
2755
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
2756
|
+
}).describe("Street name and number.")
|
|
2757
|
+
}),
|
|
2758
|
+
z.object({
|
|
2759
|
+
streetAddress: z.never().optional(),
|
|
2760
|
+
addressLine: z.string().describe(
|
|
2761
|
+
"Main address line, usually street and number as free text."
|
|
2762
|
+
)
|
|
2763
|
+
})
|
|
2764
|
+
])
|
|
2765
|
+
).describe(
|
|
2766
|
+
"Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
|
|
2767
|
+
).optional(),
|
|
2768
|
+
cursorPaging: z.object({
|
|
2769
|
+
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
2770
|
+
cursor: z.string().describe(
|
|
2771
|
+
"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."
|
|
2772
|
+
).max(16e3).optional().nullable()
|
|
2773
|
+
}).describe("Cursor paging").optional()
|
|
2774
|
+
}).optional()
|
|
2775
|
+
});
|
|
2776
|
+
var ListFirstAvailableTimeSlotsForMenusResponse = z.object({
|
|
2777
|
+
timeSlotsPerMenu: z.array(
|
|
2778
|
+
z.object({
|
|
2779
|
+
menuId: z.string().describe("Menu ID.").regex(
|
|
2780
|
+
/^[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}$/,
|
|
2781
|
+
"Must be a valid GUID"
|
|
2782
|
+
).optional().nullable(),
|
|
2783
|
+
timeslotsPerFulfillmentType: z.array(
|
|
2784
|
+
z.object({
|
|
2785
|
+
startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
|
|
2786
|
+
endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
|
|
2787
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
|
|
2788
|
+
startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
|
|
2789
|
+
fulfillmentDetails: z.array(
|
|
2790
|
+
z.intersection(
|
|
2791
|
+
z.object({
|
|
2792
|
+
fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
|
|
2793
|
+
minOrderPrice: z.string().describe(
|
|
2794
|
+
"Minimum order price to qualify for using this fulfillment."
|
|
2795
|
+
).optional().nullable(),
|
|
2796
|
+
fulfillmentTimeType: z.enum([
|
|
2797
|
+
"UNDEFINED_FULFILLMENT_TIME",
|
|
2798
|
+
"MAX_TIME",
|
|
2799
|
+
"DURATION_RANGE"
|
|
2800
|
+
]).describe(
|
|
2801
|
+
"Fulfillment time type. Only be relevant to `ASAP` operations."
|
|
2802
|
+
).optional(),
|
|
2803
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
2804
|
+
"Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
|
|
2805
|
+
).optional().nullable()
|
|
2806
|
+
}),
|
|
2807
|
+
z.xor([
|
|
2808
|
+
z.object({
|
|
2809
|
+
maxTimeOptions: z.never().optional(),
|
|
2810
|
+
durationRangeOptions: z.never().optional()
|
|
2811
|
+
}),
|
|
2812
|
+
z.object({
|
|
2813
|
+
durationRangeOptions: z.never().optional(),
|
|
2814
|
+
maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
|
|
2815
|
+
}),
|
|
2816
|
+
z.object({
|
|
2817
|
+
maxTimeOptions: z.never().optional(),
|
|
2818
|
+
durationRangeOptions: z.object({
|
|
2819
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
2820
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
2821
|
+
}).describe(
|
|
2822
|
+
"Fulfillment time has a minimum and a maximum."
|
|
2823
|
+
)
|
|
2824
|
+
})
|
|
2825
|
+
])
|
|
2826
|
+
)
|
|
2827
|
+
).max(500).optional(),
|
|
2828
|
+
fulfillmentAddress: z.object({
|
|
2829
|
+
address: z.object({
|
|
2830
|
+
city: z.string().optional().nullable(),
|
|
2831
|
+
subdivision: z.string().optional().nullable(),
|
|
2832
|
+
country: z.string().optional().nullable(),
|
|
2833
|
+
postalCode: z.string().optional().nullable(),
|
|
2834
|
+
addressLine1: z.string().optional().nullable(),
|
|
2835
|
+
addressLine2: z.string().optional().nullable()
|
|
2836
|
+
}).describe(
|
|
2837
|
+
"Pickup address. This is the address of the restaurant."
|
|
2838
|
+
).optional()
|
|
2839
|
+
}).describe("Address of the fulfillment.").optional()
|
|
2840
|
+
})
|
|
2841
|
+
).max(2).optional()
|
|
2842
|
+
})
|
|
2843
|
+
).max(100).optional(),
|
|
2844
|
+
cursor: z.string().describe("Cursor to next request.").max(16e3).optional().nullable()
|
|
2845
|
+
});
|
|
2846
|
+
var CalculateFirstAvailableTimeSlotsPerMenuRequest = z.object({
|
|
2847
|
+
operationId: z.string().describe("Operation ID.").regex(
|
|
2848
|
+
/^[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}$/,
|
|
2849
|
+
"Must be a valid GUID"
|
|
2850
|
+
),
|
|
2851
|
+
options: z.object({
|
|
2852
|
+
deliveryAddress: z.intersection(
|
|
2853
|
+
z.object({
|
|
2854
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
2855
|
+
subdivision: z.string().describe(
|
|
2856
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
2857
|
+
).optional().nullable(),
|
|
2858
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2859
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
2860
|
+
addressLine2: z.string().describe(
|
|
2861
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
2862
|
+
).optional().nullable(),
|
|
2863
|
+
formattedAddress: z.string().describe(
|
|
2864
|
+
"A string containing the full address of this location."
|
|
2865
|
+
).optional().nullable(),
|
|
2866
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
2867
|
+
geocode: z.object({
|
|
2868
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
2869
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
2870
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
2871
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
2872
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
2873
|
+
subdivisions: z.array(
|
|
2874
|
+
z.object({
|
|
2875
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
2876
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
2877
|
+
})
|
|
2878
|
+
).max(6).optional()
|
|
2879
|
+
}),
|
|
2880
|
+
z.xor([
|
|
2881
|
+
z.object({
|
|
2882
|
+
streetAddress: z.never().optional(),
|
|
2883
|
+
addressLine: z.never().optional()
|
|
2884
|
+
}),
|
|
2885
|
+
z.object({
|
|
2886
|
+
addressLine: z.never().optional(),
|
|
2887
|
+
streetAddress: z.object({
|
|
2888
|
+
number: z.string().describe("Street number.").optional(),
|
|
2889
|
+
name: z.string().describe("Street name.").optional(),
|
|
2890
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
2891
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
2892
|
+
}).describe("Street name and number.")
|
|
2893
|
+
}),
|
|
2894
|
+
z.object({
|
|
2895
|
+
streetAddress: z.never().optional(),
|
|
2896
|
+
addressLine: z.string().describe(
|
|
2897
|
+
"Main address line, usually street and number as free text."
|
|
2898
|
+
)
|
|
2899
|
+
})
|
|
2900
|
+
])
|
|
2901
|
+
).describe(
|
|
2902
|
+
"Delivery address.\n\nThe response includes time slots with delivery fulfillment types only if you specify a delivery address."
|
|
2903
|
+
).optional(),
|
|
2904
|
+
cursorPaging: z.object({
|
|
2905
|
+
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
2906
|
+
cursor: z.string().describe(
|
|
2907
|
+
"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."
|
|
2908
|
+
).max(16e3).optional().nullable()
|
|
2909
|
+
}).describe("Cursor paging.").optional(),
|
|
2910
|
+
onlyOnlineOrderingEnabled: z.boolean().describe(
|
|
2911
|
+
"Only retrieve time slots for menus with online ordering enabled."
|
|
2912
|
+
).optional().nullable()
|
|
2913
|
+
}).optional()
|
|
2914
|
+
});
|
|
2915
|
+
var CalculateFirstAvailableTimeSlotsPerMenuResponse = z.object({
|
|
2916
|
+
timeSlotsPerMenu: z.array(
|
|
2917
|
+
z.object({
|
|
2918
|
+
menuId: z.string().describe("Menu ID.").regex(
|
|
2919
|
+
/^[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}$/,
|
|
2920
|
+
"Must be a valid GUID"
|
|
2921
|
+
).optional().nullable(),
|
|
2922
|
+
timeslotsPerFulfillmentType: z.array(
|
|
2923
|
+
z.object({
|
|
2924
|
+
timeSlot: z.object({
|
|
2925
|
+
startTime: z.date().describe(
|
|
2926
|
+
"Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
2927
|
+
).optional().nullable(),
|
|
2928
|
+
endTime: z.date().describe(
|
|
2929
|
+
"End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
2930
|
+
).optional().nullable(),
|
|
2931
|
+
orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
|
|
2932
|
+
}).describe("Time Slot details.").optional(),
|
|
2933
|
+
fulfillmentInfo: z.array(
|
|
2934
|
+
z.intersection(
|
|
2935
|
+
z.object({
|
|
2936
|
+
fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
|
|
2937
|
+
minOrderPrice: z.string().describe(
|
|
2938
|
+
"Minimum order price to qualify for using this fulfillment option."
|
|
2939
|
+
).optional().nullable(),
|
|
2940
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
2941
|
+
"Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
|
|
2942
|
+
).optional().nullable(),
|
|
2943
|
+
address: z.object({
|
|
2944
|
+
city: z.string().optional().nullable(),
|
|
2945
|
+
subdivision: z.string().optional().nullable(),
|
|
2946
|
+
country: z.string().optional().nullable(),
|
|
2947
|
+
postalCode: z.string().optional().nullable(),
|
|
2948
|
+
addressLine1: z.string().optional().nullable(),
|
|
2949
|
+
addressLine2: z.string().optional().nullable()
|
|
2950
|
+
}).describe(
|
|
2951
|
+
"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."
|
|
2952
|
+
).optional()
|
|
2953
|
+
}),
|
|
2954
|
+
z.xor([
|
|
2955
|
+
z.object({
|
|
2956
|
+
maxTime: z.never().optional(),
|
|
2957
|
+
durationRange: z.never().optional()
|
|
2958
|
+
}),
|
|
2959
|
+
z.object({
|
|
2960
|
+
durationRange: z.never().optional(),
|
|
2961
|
+
maxTime: z.number().int().describe("Maximum time to fulfill the order.")
|
|
2962
|
+
}),
|
|
2963
|
+
z.object({
|
|
2964
|
+
maxTime: z.never().optional(),
|
|
2965
|
+
durationRange: z.object({
|
|
2966
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
2967
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
2968
|
+
}).describe(
|
|
2969
|
+
"Time range in which to fulfill the order."
|
|
2970
|
+
)
|
|
2971
|
+
})
|
|
2972
|
+
])
|
|
2973
|
+
)
|
|
2974
|
+
).max(500).optional(),
|
|
2975
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
|
|
2976
|
+
})
|
|
2977
|
+
).max(2).optional()
|
|
2978
|
+
})
|
|
2979
|
+
).max(100).optional(),
|
|
2980
|
+
pagingMetadata: z.object({
|
|
2981
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
2982
|
+
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
2983
|
+
total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
|
|
2984
|
+
tooManyToCount: z.boolean().describe(
|
|
2985
|
+
"Flag that indicates the server failed to calculate the `total` field."
|
|
2986
|
+
).optional().nullable()
|
|
2987
|
+
}).describe("Metadata for the paginated results.").optional(),
|
|
2988
|
+
cursorPagingMetadata: z.object({
|
|
2989
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
2990
|
+
cursors: z.object({
|
|
2991
|
+
next: z.string().describe(
|
|
2992
|
+
"Cursor string pointing to the next page in the list of results."
|
|
2993
|
+
).max(16e3).optional().nullable(),
|
|
2994
|
+
prev: z.string().describe(
|
|
2995
|
+
"Cursor pointing to the previous page in the list of results."
|
|
2996
|
+
).max(16e3).optional().nullable()
|
|
2997
|
+
}).describe(
|
|
2998
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
2999
|
+
).optional(),
|
|
3000
|
+
hasNext: z.boolean().describe(
|
|
3001
|
+
"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."
|
|
3002
|
+
).optional().nullable()
|
|
3003
|
+
}).describe("Metadata for the paginated results.").optional()
|
|
3004
|
+
});
|
|
3005
|
+
var CalculateFirstAvailableTimeSlotsForItemRequest = z.object({
|
|
3006
|
+
operationId: z.string().regex(
|
|
3007
|
+
/^[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}$/,
|
|
3008
|
+
"Must be a valid GUID"
|
|
3009
|
+
),
|
|
3010
|
+
menuId: z.object({ value: z.string().optional() }).describe("Menu ID to get the first available time slots for."),
|
|
3011
|
+
options: z.object({
|
|
3012
|
+
sectionId: z.string().describe("Section ID to get the first available time slots for.").regex(
|
|
3013
|
+
/^[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}$/,
|
|
3014
|
+
"Must be a valid GUID"
|
|
3015
|
+
),
|
|
3016
|
+
itemId: z.string().describe("Item ID to get the first available time slots for.").regex(
|
|
3017
|
+
/^[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}$/,
|
|
3018
|
+
"Must be a valid GUID"
|
|
3019
|
+
),
|
|
3020
|
+
deliveryAddress: z.intersection(
|
|
3021
|
+
z.object({
|
|
3022
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
3023
|
+
subdivision: z.string().describe(
|
|
3024
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
3025
|
+
).optional().nullable(),
|
|
3026
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3027
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
3028
|
+
addressLine2: z.string().describe(
|
|
3029
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
3030
|
+
).optional().nullable(),
|
|
3031
|
+
formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
|
|
3032
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
3033
|
+
geocode: z.object({
|
|
3034
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
3035
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
3036
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
3037
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
3038
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
3039
|
+
subdivisions: z.array(
|
|
3040
|
+
z.object({
|
|
3041
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
3042
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
3043
|
+
})
|
|
3044
|
+
).max(6).optional()
|
|
3045
|
+
}),
|
|
3046
|
+
z.xor([
|
|
3047
|
+
z.object({
|
|
3048
|
+
streetAddress: z.never().optional(),
|
|
3049
|
+
addressLine: z.never().optional()
|
|
3050
|
+
}),
|
|
3051
|
+
z.object({
|
|
3052
|
+
addressLine: z.never().optional(),
|
|
3053
|
+
streetAddress: z.object({
|
|
3054
|
+
number: z.string().describe("Street number.").optional(),
|
|
3055
|
+
name: z.string().describe("Street name.").optional(),
|
|
3056
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
3057
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
3058
|
+
}).describe("Street name and number.")
|
|
3059
|
+
}),
|
|
3060
|
+
z.object({
|
|
3061
|
+
streetAddress: z.never().optional(),
|
|
3062
|
+
addressLine: z.string().describe(
|
|
3063
|
+
"Main address line, usually street and number as free text."
|
|
3064
|
+
)
|
|
3065
|
+
})
|
|
3066
|
+
])
|
|
3067
|
+
).describe(
|
|
3068
|
+
"Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
|
|
3069
|
+
).optional()
|
|
3070
|
+
})
|
|
3071
|
+
});
|
|
3072
|
+
var CalculateFirstAvailableTimeSlotsForItemResponse = z.object({
|
|
3073
|
+
timeslotsPerFulfillmentType: z.array(
|
|
3074
|
+
z.object({
|
|
3075
|
+
timeSlot: z.object({
|
|
3076
|
+
startTime: z.date().describe(
|
|
3077
|
+
"Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
3078
|
+
).optional().nullable(),
|
|
3079
|
+
endTime: z.date().describe(
|
|
3080
|
+
"End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
3081
|
+
).optional().nullable(),
|
|
3082
|
+
orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
|
|
3083
|
+
}).describe("Time Slot details.").optional(),
|
|
3084
|
+
fulfillmentInfo: z.array(
|
|
3085
|
+
z.intersection(
|
|
3086
|
+
z.object({
|
|
3087
|
+
fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
|
|
3088
|
+
minOrderPrice: z.string().describe(
|
|
3089
|
+
"Minimum order price to qualify for using this fulfillment option."
|
|
3090
|
+
).optional().nullable(),
|
|
3091
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
3092
|
+
"Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
|
|
3093
|
+
).optional().nullable(),
|
|
3094
|
+
address: z.object({
|
|
3095
|
+
city: z.string().optional().nullable(),
|
|
3096
|
+
subdivision: z.string().optional().nullable(),
|
|
3097
|
+
country: z.string().optional().nullable(),
|
|
3098
|
+
postalCode: z.string().optional().nullable(),
|
|
3099
|
+
addressLine1: z.string().optional().nullable(),
|
|
3100
|
+
addressLine2: z.string().optional().nullable()
|
|
3101
|
+
}).describe(
|
|
3102
|
+
"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."
|
|
3103
|
+
).optional()
|
|
3104
|
+
}),
|
|
3105
|
+
z.xor([
|
|
3106
|
+
z.object({
|
|
3107
|
+
maxTime: z.never().optional(),
|
|
3108
|
+
durationRange: z.never().optional()
|
|
3109
|
+
}),
|
|
3110
|
+
z.object({
|
|
3111
|
+
durationRange: z.never().optional(),
|
|
3112
|
+
maxTime: z.number().int().describe("Maximum time to fulfill the order.")
|
|
3113
|
+
}),
|
|
3114
|
+
z.object({
|
|
3115
|
+
maxTime: z.never().optional(),
|
|
3116
|
+
durationRange: z.object({
|
|
3117
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
3118
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
3119
|
+
}).describe("Time range in which to fulfill the order.")
|
|
3120
|
+
})
|
|
3121
|
+
])
|
|
3122
|
+
)
|
|
3123
|
+
).max(500).optional(),
|
|
3124
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
|
|
3125
|
+
})
|
|
3126
|
+
).optional(),
|
|
3127
|
+
cursorPagingMetadata: z.object({
|
|
3128
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
3129
|
+
cursors: z.object({
|
|
3130
|
+
next: z.string().describe(
|
|
3131
|
+
"Cursor string pointing to the next page in the list of results."
|
|
3132
|
+
).max(16e3).optional().nullable(),
|
|
3133
|
+
prev: z.string().describe(
|
|
3134
|
+
"Cursor pointing to the previous page in the list of results."
|
|
3135
|
+
).max(16e3).optional().nullable()
|
|
3136
|
+
}).describe(
|
|
3137
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
3138
|
+
).optional(),
|
|
3139
|
+
hasNext: z.boolean().describe(
|
|
3140
|
+
"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."
|
|
3141
|
+
).optional().nullable()
|
|
3142
|
+
}).describe("Metadata for the paginated results.").optional()
|
|
3143
|
+
});
|
|
3144
|
+
var ListAvailableTimeSlotsForDateRequest = z.object({
|
|
3145
|
+
operationId: z.string().describe(
|
|
3146
|
+
"Operation ID.\nThe returned fulfillment options will belong to this operation."
|
|
3147
|
+
).regex(
|
|
3148
|
+
/^[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}$/,
|
|
3149
|
+
"Must be a valid GUID"
|
|
3150
|
+
),
|
|
3151
|
+
options: z.object({
|
|
3152
|
+
deliveryAddress: z.intersection(
|
|
3153
|
+
z.object({
|
|
3154
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
3155
|
+
subdivision: z.string().describe(
|
|
3156
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
3157
|
+
).optional().nullable(),
|
|
3158
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3159
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
3160
|
+
addressLine2: z.string().describe(
|
|
3161
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
3162
|
+
).optional().nullable(),
|
|
3163
|
+
formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
|
|
3164
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
3165
|
+
geocode: z.object({
|
|
3166
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
3167
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
3168
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
3169
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
3170
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
3171
|
+
subdivisions: z.array(
|
|
3172
|
+
z.object({
|
|
3173
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
3174
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
3175
|
+
})
|
|
3176
|
+
).max(6).optional()
|
|
3177
|
+
}),
|
|
3178
|
+
z.xor([
|
|
3179
|
+
z.object({
|
|
3180
|
+
streetAddress: z.never().optional(),
|
|
3181
|
+
addressLine: z.never().optional()
|
|
3182
|
+
}),
|
|
3183
|
+
z.object({
|
|
3184
|
+
addressLine: z.never().optional(),
|
|
3185
|
+
streetAddress: z.object({
|
|
3186
|
+
number: z.string().describe("Street number.").optional(),
|
|
3187
|
+
name: z.string().describe("Street name.").optional(),
|
|
3188
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
3189
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
3190
|
+
}).describe("Street name and number.")
|
|
3191
|
+
}),
|
|
3192
|
+
z.object({
|
|
3193
|
+
streetAddress: z.never().optional(),
|
|
3194
|
+
addressLine: z.string().describe(
|
|
3195
|
+
"Main address line, usually street and number as free text."
|
|
3196
|
+
)
|
|
3197
|
+
})
|
|
3198
|
+
])
|
|
3199
|
+
).describe(
|
|
3200
|
+
"Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
|
|
3201
|
+
).optional(),
|
|
3202
|
+
date: z.object({
|
|
3203
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31),
|
|
3204
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12),
|
|
3205
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200)
|
|
3206
|
+
}).describe("Date and time to get the available time slots for.")
|
|
3207
|
+
})
|
|
3208
|
+
});
|
|
3209
|
+
var ListAvailableTimeSlotsForDateResponse = z.object({
|
|
3210
|
+
timeSlots: z.array(
|
|
3211
|
+
z.object({
|
|
3212
|
+
startTime: z.date().describe("Start time and date of the time slot.").optional().nullable(),
|
|
3213
|
+
endTime: z.date().describe("End time and date of the time slot.").optional().nullable(),
|
|
3214
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Type of the fulfillment.").optional(),
|
|
3215
|
+
startsNow: z.boolean().describe("Whether the time slot starts now.").optional(),
|
|
3216
|
+
fulfillmentDetails: z.array(
|
|
3217
|
+
z.intersection(
|
|
3218
|
+
z.object({
|
|
3219
|
+
fee: z.string().describe("Fee for using this fulfillment.").optional().nullable(),
|
|
3220
|
+
minOrderPrice: z.string().describe(
|
|
3221
|
+
"Minimum order price to qualify for using this fulfillment."
|
|
3222
|
+
).optional().nullable(),
|
|
3223
|
+
fulfillmentTimeType: z.enum([
|
|
3224
|
+
"UNDEFINED_FULFILLMENT_TIME",
|
|
3225
|
+
"MAX_TIME",
|
|
3226
|
+
"DURATION_RANGE"
|
|
3227
|
+
]).describe(
|
|
3228
|
+
"Fulfillment time type. Only be relevant to `ASAP` operations."
|
|
3229
|
+
).optional(),
|
|
3230
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
3231
|
+
"Minimum order price for free fulfillment.\nIf order price exceeds this amount, the given `fee` is waived."
|
|
3232
|
+
).optional().nullable()
|
|
3233
|
+
}),
|
|
3234
|
+
z.xor([
|
|
3235
|
+
z.object({
|
|
3236
|
+
maxTimeOptions: z.never().optional(),
|
|
3237
|
+
durationRangeOptions: z.never().optional()
|
|
3238
|
+
}),
|
|
3239
|
+
z.object({
|
|
3240
|
+
durationRangeOptions: z.never().optional(),
|
|
3241
|
+
maxTimeOptions: z.number().int().describe("Fulfillment time has a maximum.")
|
|
3242
|
+
}),
|
|
3243
|
+
z.object({
|
|
3244
|
+
maxTimeOptions: z.never().optional(),
|
|
3245
|
+
durationRangeOptions: z.object({
|
|
3246
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
3247
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
3248
|
+
}).describe("Fulfillment time has a minimum and a maximum.")
|
|
3249
|
+
})
|
|
3250
|
+
])
|
|
3251
|
+
)
|
|
3252
|
+
).max(500).optional(),
|
|
3253
|
+
fulfillmentAddress: z.object({
|
|
3254
|
+
address: z.object({
|
|
3255
|
+
city: z.string().optional().nullable(),
|
|
3256
|
+
subdivision: z.string().optional().nullable(),
|
|
3257
|
+
country: z.string().optional().nullable(),
|
|
3258
|
+
postalCode: z.string().optional().nullable(),
|
|
3259
|
+
addressLine1: z.string().optional().nullable(),
|
|
3260
|
+
addressLine2: z.string().optional().nullable()
|
|
3261
|
+
}).describe(
|
|
3262
|
+
"Pickup address. This is the address of the restaurant."
|
|
3263
|
+
).optional()
|
|
3264
|
+
}).describe("Address of the fulfillment.").optional()
|
|
3265
|
+
})
|
|
3266
|
+
).optional()
|
|
3267
|
+
});
|
|
3268
|
+
var CalculateAvailableTimeSlotsForDateRequest = z.object({
|
|
3269
|
+
operationId: z.string().describe("Operation ID.").regex(
|
|
3270
|
+
/^[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}$/,
|
|
3271
|
+
"Must be a valid GUID"
|
|
3272
|
+
),
|
|
3273
|
+
options: z.object({
|
|
3274
|
+
deliveryAddress: z.intersection(
|
|
3275
|
+
z.object({
|
|
3276
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
3277
|
+
subdivision: z.string().describe(
|
|
3278
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
3279
|
+
).optional().nullable(),
|
|
3280
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3281
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
3282
|
+
addressLine2: z.string().describe(
|
|
3283
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
3284
|
+
).optional().nullable(),
|
|
3285
|
+
formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
|
|
3286
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
3287
|
+
geocode: z.object({
|
|
3288
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
3289
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
3290
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
3291
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
3292
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
3293
|
+
subdivisions: z.array(
|
|
3294
|
+
z.object({
|
|
3295
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
3296
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
3297
|
+
})
|
|
3298
|
+
).max(6).optional()
|
|
3299
|
+
}),
|
|
3300
|
+
z.xor([
|
|
3301
|
+
z.object({
|
|
3302
|
+
streetAddress: z.never().optional(),
|
|
3303
|
+
addressLine: z.never().optional()
|
|
3304
|
+
}),
|
|
3305
|
+
z.object({
|
|
3306
|
+
addressLine: z.never().optional(),
|
|
3307
|
+
streetAddress: z.object({
|
|
3308
|
+
number: z.string().describe("Street number.").optional(),
|
|
3309
|
+
name: z.string().describe("Street name.").optional(),
|
|
3310
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
3311
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
3312
|
+
}).describe("Street name and number.")
|
|
3313
|
+
}),
|
|
3314
|
+
z.object({
|
|
3315
|
+
streetAddress: z.never().optional(),
|
|
3316
|
+
addressLine: z.string().describe(
|
|
3317
|
+
"Main address line, usually street and number as free text."
|
|
3318
|
+
)
|
|
3319
|
+
})
|
|
3320
|
+
])
|
|
3321
|
+
).describe(
|
|
3322
|
+
"Delivery address.\n\nThe response includes time slots with delivery fulfillment types only if you specify a delivery address."
|
|
3323
|
+
).optional(),
|
|
3324
|
+
date: z.object({
|
|
3325
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31),
|
|
3326
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12),
|
|
3327
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200)
|
|
3328
|
+
}).describe("Date and time to get the available time slots for.")
|
|
3329
|
+
})
|
|
3330
|
+
});
|
|
3331
|
+
var CalculateAvailableTimeSlotsForDateResponse = z.object({
|
|
3332
|
+
timeslotsPerFulfillmentType: z.array(
|
|
3333
|
+
z.object({
|
|
3334
|
+
timeSlot: z.object({
|
|
3335
|
+
startTime: z.date().describe(
|
|
3336
|
+
"Start time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
3337
|
+
).optional().nullable(),
|
|
3338
|
+
endTime: z.date().describe(
|
|
3339
|
+
"End time and date of the time slot in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format."
|
|
3340
|
+
).optional().nullable(),
|
|
3341
|
+
orderSchedulingType: z.enum(["ASAP", "PREORDER"]).describe("Order scheduling type used by the operation.").optional()
|
|
3342
|
+
}).describe("Time Slot details.").optional(),
|
|
3343
|
+
fulfillmentInfo: z.array(
|
|
3344
|
+
z.intersection(
|
|
3345
|
+
z.object({
|
|
3346
|
+
fee: z.string().describe("Fee for using this fulfillment option.").optional().nullable(),
|
|
3347
|
+
minOrderPrice: z.string().describe(
|
|
3348
|
+
"Minimum order price to qualify for using this fulfillment option."
|
|
3349
|
+
).optional().nullable(),
|
|
3350
|
+
freeFulfillmentPriceThreshold: z.string().describe(
|
|
3351
|
+
"Minimum order price to qualify for free fulfillment.\nIf the order price exceeds this amount, the `fee` is waived."
|
|
3352
|
+
).optional().nullable(),
|
|
3353
|
+
address: z.object({
|
|
3354
|
+
city: z.string().optional().nullable(),
|
|
3355
|
+
subdivision: z.string().optional().nullable(),
|
|
3356
|
+
country: z.string().optional().nullable(),
|
|
3357
|
+
postalCode: z.string().optional().nullable(),
|
|
3358
|
+
addressLine1: z.string().optional().nullable(),
|
|
3359
|
+
addressLine2: z.string().optional().nullable()
|
|
3360
|
+
}).describe(
|
|
3361
|
+
"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."
|
|
3362
|
+
).optional()
|
|
3363
|
+
}),
|
|
3364
|
+
z.xor([
|
|
3365
|
+
z.object({
|
|
3366
|
+
maxTime: z.never().optional(),
|
|
3367
|
+
durationRange: z.never().optional()
|
|
3368
|
+
}),
|
|
3369
|
+
z.object({
|
|
3370
|
+
durationRange: z.never().optional(),
|
|
3371
|
+
maxTime: z.number().int().describe("Maximum time to fulfill the order.")
|
|
3372
|
+
}),
|
|
3373
|
+
z.object({
|
|
3374
|
+
maxTime: z.never().optional(),
|
|
3375
|
+
durationRange: z.object({
|
|
3376
|
+
minDuration: z.number().int().describe("Minimum duration in minutes.").optional(),
|
|
3377
|
+
maxDuration: z.number().int().describe("Maximum duration in minutes.").optional()
|
|
3378
|
+
}).describe("Time range in which to fulfill the order.")
|
|
3379
|
+
})
|
|
3380
|
+
])
|
|
3381
|
+
)
|
|
3382
|
+
).max(500).optional(),
|
|
3383
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional()
|
|
3384
|
+
})
|
|
3385
|
+
).max(2).optional()
|
|
3386
|
+
});
|
|
3387
|
+
var ListAvailableDatesInRangeRequest = z.object({
|
|
3388
|
+
operationId: z.string().describe(
|
|
3389
|
+
"Operation ID.\nThe returned fulfillment options will belong to this operation."
|
|
3390
|
+
).regex(
|
|
3391
|
+
/^[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}$/,
|
|
3392
|
+
"Must be a valid GUID"
|
|
3393
|
+
),
|
|
3394
|
+
options: z.object({
|
|
3395
|
+
deliveryAddress: z.intersection(
|
|
3396
|
+
z.object({
|
|
3397
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
3398
|
+
subdivision: z.string().describe(
|
|
3399
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
3400
|
+
).optional().nullable(),
|
|
3401
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3402
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
3403
|
+
addressLine2: z.string().describe(
|
|
3404
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
3405
|
+
).optional().nullable(),
|
|
3406
|
+
formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
|
|
3407
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
3408
|
+
geocode: z.object({
|
|
3409
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
3410
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
3411
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
3412
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
3413
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
3414
|
+
subdivisions: z.array(
|
|
3415
|
+
z.object({
|
|
3416
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
3417
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
3418
|
+
})
|
|
3419
|
+
).max(6).optional()
|
|
3420
|
+
}),
|
|
3421
|
+
z.xor([
|
|
3422
|
+
z.object({
|
|
3423
|
+
streetAddress: z.never().optional(),
|
|
3424
|
+
addressLine: z.never().optional()
|
|
3425
|
+
}),
|
|
3426
|
+
z.object({
|
|
3427
|
+
addressLine: z.never().optional(),
|
|
3428
|
+
streetAddress: z.object({
|
|
3429
|
+
number: z.string().describe("Street number.").optional(),
|
|
3430
|
+
name: z.string().describe("Street name.").optional(),
|
|
3431
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
3432
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
3433
|
+
}).describe("Street name and number.")
|
|
3434
|
+
}),
|
|
3435
|
+
z.object({
|
|
3436
|
+
streetAddress: z.never().optional(),
|
|
3437
|
+
addressLine: z.string().describe(
|
|
3438
|
+
"Main address line, usually street and number as free text."
|
|
3439
|
+
)
|
|
3440
|
+
})
|
|
3441
|
+
])
|
|
3442
|
+
).describe(
|
|
3443
|
+
"Delivery address. Optional.\n\nIf provided, the returned delivery fulfillment options will be able to deliver to this address."
|
|
3444
|
+
).optional(),
|
|
3445
|
+
from: z.object({
|
|
3446
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
|
|
3447
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
|
|
3448
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
|
|
3449
|
+
}).describe("Start date and time of the range."),
|
|
3450
|
+
until: z.object({
|
|
3451
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
|
|
3452
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
|
|
3453
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
|
|
3454
|
+
}).describe("End date and time of the range.")
|
|
3455
|
+
})
|
|
3456
|
+
});
|
|
3457
|
+
var ListAvailableDatesInRangeResponse = z.object({
|
|
3458
|
+
availableDates: z.array(
|
|
3459
|
+
z.object({
|
|
3460
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional(),
|
|
3461
|
+
dates: z.array(
|
|
3462
|
+
z.object({
|
|
3463
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
|
|
3464
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
|
|
3465
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
|
|
3466
|
+
})
|
|
3467
|
+
).min(1).max(100).optional()
|
|
3468
|
+
})
|
|
3469
|
+
).optional()
|
|
3470
|
+
});
|
|
3471
|
+
var CalculateAvailableDatesInRangeRequest = z.object({
|
|
3472
|
+
operationId: z.string().describe("Operation ID.").regex(
|
|
3473
|
+
/^[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}$/,
|
|
3474
|
+
"Must be a valid GUID"
|
|
3475
|
+
),
|
|
3476
|
+
options: z.object({
|
|
3477
|
+
deliveryAddress: z.intersection(
|
|
3478
|
+
z.object({
|
|
3479
|
+
country: z.string().describe("Country code.").optional().nullable(),
|
|
3480
|
+
subdivision: z.string().describe(
|
|
3481
|
+
"Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)."
|
|
3482
|
+
).optional().nullable(),
|
|
3483
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3484
|
+
postalCode: z.string().describe("Zip/postal code.").optional().nullable(),
|
|
3485
|
+
addressLine2: z.string().describe(
|
|
3486
|
+
"Free text providing more detailed address info. Usually contains Apt, Suite, and Floor."
|
|
3487
|
+
).optional().nullable(),
|
|
3488
|
+
formattedAddress: z.string().describe("A string containing the full address of this location.").optional().nullable(),
|
|
3489
|
+
hint: z.string().describe("Free text to help find the address.").optional().nullable(),
|
|
3490
|
+
geocode: z.object({
|
|
3491
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
3492
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
3493
|
+
}).describe("Coordinates of the physical address.").optional(),
|
|
3494
|
+
countryFullname: z.string().describe("Country full name.").optional().nullable(),
|
|
3495
|
+
subdivisionFullname: z.string().describe("Subdivision full name.").optional().nullable(),
|
|
3496
|
+
subdivisions: z.array(
|
|
3497
|
+
z.object({
|
|
3498
|
+
code: z.string().describe("Short subdivision code.").optional(),
|
|
3499
|
+
name: z.string().describe("Subdivision full name.").optional()
|
|
3500
|
+
})
|
|
3501
|
+
).max(6).optional()
|
|
3502
|
+
}),
|
|
3503
|
+
z.xor([
|
|
3504
|
+
z.object({
|
|
3505
|
+
streetAddress: z.never().optional(),
|
|
3506
|
+
addressLine: z.never().optional()
|
|
3507
|
+
}),
|
|
3508
|
+
z.object({
|
|
3509
|
+
addressLine: z.never().optional(),
|
|
3510
|
+
streetAddress: z.object({
|
|
3511
|
+
number: z.string().describe("Street number.").optional(),
|
|
3512
|
+
name: z.string().describe("Street name.").optional(),
|
|
3513
|
+
apt: z.string().describe("Apartment number.").optional(),
|
|
3514
|
+
formattedAddressLine: z.string().describe("Optional address line 1").optional().nullable()
|
|
3515
|
+
}).describe("Street name and number.")
|
|
3516
|
+
}),
|
|
3517
|
+
z.object({
|
|
3518
|
+
streetAddress: z.never().optional(),
|
|
3519
|
+
addressLine: z.string().describe(
|
|
3520
|
+
"Main address line, usually street and number as free text."
|
|
3521
|
+
)
|
|
3522
|
+
})
|
|
3523
|
+
])
|
|
3524
|
+
).describe(
|
|
3525
|
+
"Delivery address.\n\nDelivery fulfillment methods are only considered when calculating date availability if a delivery address is specified."
|
|
3526
|
+
).optional(),
|
|
3527
|
+
from: z.object({
|
|
3528
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
|
|
3529
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
|
|
3530
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
|
|
3531
|
+
}).describe("Start date and time of the range."),
|
|
3532
|
+
until: z.object({
|
|
3533
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
|
|
3534
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
|
|
3535
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
|
|
3536
|
+
}).describe("End date and time of the range.")
|
|
3537
|
+
})
|
|
3538
|
+
});
|
|
3539
|
+
var CalculateAvailableDatesInRangeResponse = z.object({
|
|
3540
|
+
availableDatesPerFulfillmentType: z.array(
|
|
3541
|
+
z.object({
|
|
3542
|
+
fulfilmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Fulfillment type.").optional(),
|
|
3543
|
+
dates: z.array(
|
|
3544
|
+
z.object({
|
|
3545
|
+
day: z.number().int().describe("The day of the month.").min(1).max(31).optional(),
|
|
3546
|
+
month: z.number().int().describe("The month of the year.").min(1).max(12).optional(),
|
|
3547
|
+
year: z.number().int().describe("The year of the date.").min(2023).max(2200).optional()
|
|
3548
|
+
})
|
|
3549
|
+
).min(1).max(100).optional()
|
|
3550
|
+
})
|
|
3551
|
+
).optional()
|
|
3552
|
+
});
|
|
3553
|
+
var ValidateOperationAddressRequest = z.object({
|
|
3554
|
+
operationId: z.string().describe("The ID of the operation whose address should be validated.").regex(
|
|
3555
|
+
/^[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}$/,
|
|
3556
|
+
"Must be a valid GUID"
|
|
3557
|
+
)
|
|
3558
|
+
});
|
|
3559
|
+
var ValidateOperationAddressResponse = z.object({
|
|
3560
|
+
valid: z.boolean().describe("Whether the address is valid.").optional(),
|
|
3561
|
+
violations: z.array(
|
|
3562
|
+
z.object({
|
|
3563
|
+
type: z.enum([
|
|
3564
|
+
"UNKNOWN",
|
|
3565
|
+
"NO_ADDRESS",
|
|
3566
|
+
"MISSING_FORMATTED_ADDRESS",
|
|
3567
|
+
"INVALID_GEOCODE",
|
|
3568
|
+
"MISSING_COUNTRY",
|
|
3569
|
+
"MISSING_SUBDIVISION"
|
|
3570
|
+
]).describe("Type of violation in the address.").optional()
|
|
3571
|
+
})
|
|
3572
|
+
).max(5).optional()
|
|
3573
|
+
});
|
|
3574
|
+
var BulkUpdateOperationTagsRequest = z.object({
|
|
3575
|
+
operationIds: z.array(z.string()).min(1).max(100),
|
|
3576
|
+
options: z.object({
|
|
3577
|
+
assignTags: z.object({
|
|
3578
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3579
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
3580
|
+
).optional(),
|
|
3581
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3582
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
3583
|
+
).optional()
|
|
3584
|
+
}).describe("Tags to assign to the operations.").optional(),
|
|
3585
|
+
unassignTags: z.object({
|
|
3586
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3587
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
3588
|
+
).optional(),
|
|
3589
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3590
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
3591
|
+
).optional()
|
|
3592
|
+
}).describe("Tags to unassign from the operations.").optional()
|
|
3593
|
+
}).optional()
|
|
3594
|
+
});
|
|
3595
|
+
var BulkUpdateOperationTagsResponse = z.object({
|
|
3596
|
+
results: z.array(
|
|
3597
|
+
z.object({
|
|
3598
|
+
itemMetadata: z.object({
|
|
3599
|
+
_id: z.string().describe(
|
|
3600
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
3601
|
+
).regex(
|
|
3602
|
+
/^[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}$/,
|
|
3603
|
+
"Must be a valid GUID"
|
|
3604
|
+
).optional().nullable(),
|
|
3605
|
+
originalIndex: z.number().int().describe(
|
|
3606
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
3607
|
+
).optional(),
|
|
3608
|
+
success: z.boolean().describe(
|
|
3609
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
3610
|
+
).optional(),
|
|
3611
|
+
error: z.object({
|
|
3612
|
+
code: z.string().describe("Error code.").optional(),
|
|
3613
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
3614
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
3615
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
3616
|
+
}).describe("Metadata for the updated operation.").optional()
|
|
3617
|
+
})
|
|
3618
|
+
).min(1).max(100).optional(),
|
|
3619
|
+
bulkActionMetadata: z.object({
|
|
3620
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
3621
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
3622
|
+
undetailedFailures: z.number().int().describe(
|
|
3623
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
3624
|
+
).optional()
|
|
3625
|
+
}).describe("Metadata for the bulk update.").optional()
|
|
3626
|
+
});
|
|
3627
|
+
var BulkUpdateOperationTagsByFilterRequest = z.object({
|
|
3628
|
+
filter: z.record(z.string(), z.any()).describe("Filter that determines which operations to update tags for."),
|
|
3629
|
+
options: z.object({
|
|
3630
|
+
assignTags: z.object({
|
|
3631
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3632
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
3633
|
+
).optional(),
|
|
3634
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3635
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
3636
|
+
).optional()
|
|
3637
|
+
}).describe("Tags to assign to the operations.").optional(),
|
|
3638
|
+
unassignTags: z.object({
|
|
3639
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3640
|
+
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
3641
|
+
).optional(),
|
|
3642
|
+
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
3643
|
+
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
3644
|
+
).optional()
|
|
3645
|
+
}).describe("Tags to unassign from the operations.").optional()
|
|
3646
|
+
}).optional()
|
|
3647
|
+
});
|
|
3648
|
+
var BulkUpdateOperationTagsByFilterResponse = z.object({
|
|
3649
|
+
jobId: z.string().describe(
|
|
3650
|
+
"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."
|
|
3651
|
+
).regex(
|
|
3652
|
+
/^[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}$/,
|
|
3653
|
+
"Must be a valid GUID"
|
|
3654
|
+
).optional()
|
|
3655
|
+
});
|
|
3656
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3657
|
+
0 && (module.exports = {
|
|
3658
|
+
BulkUpdateOperationTagsByFilterRequest,
|
|
3659
|
+
BulkUpdateOperationTagsByFilterResponse,
|
|
3660
|
+
BulkUpdateOperationTagsRequest,
|
|
3661
|
+
BulkUpdateOperationTagsResponse,
|
|
3662
|
+
CalculateAvailableDatesInRangeRequest,
|
|
3663
|
+
CalculateAvailableDatesInRangeResponse,
|
|
3664
|
+
CalculateAvailableTimeSlotsForDateRequest,
|
|
3665
|
+
CalculateAvailableTimeSlotsForDateResponse,
|
|
3666
|
+
CalculateFirstAvailableTimeSlotPerFulfillmentTypeRequest,
|
|
3667
|
+
CalculateFirstAvailableTimeSlotPerFulfillmentTypeResponse,
|
|
3668
|
+
CalculateFirstAvailableTimeSlotsForItemRequest,
|
|
3669
|
+
CalculateFirstAvailableTimeSlotsForItemResponse,
|
|
3670
|
+
CalculateFirstAvailableTimeSlotsPerMenuRequest,
|
|
3671
|
+
CalculateFirstAvailableTimeSlotsPerMenuResponse,
|
|
3672
|
+
CalculateFirstAvailableTimeSlotsPerOperationRequest,
|
|
3673
|
+
CalculateFirstAvailableTimeSlotsPerOperationResponse,
|
|
3674
|
+
CreateOperationRequest,
|
|
3675
|
+
CreateOperationResponse,
|
|
3676
|
+
DeleteOperationRequest,
|
|
3677
|
+
DeleteOperationResponse,
|
|
3678
|
+
GetOperationRequest,
|
|
3679
|
+
GetOperationResponse,
|
|
3680
|
+
ListAvailableDatesInRangeRequest,
|
|
3681
|
+
ListAvailableDatesInRangeResponse,
|
|
3682
|
+
ListAvailableFulfillmentOptionsRequest,
|
|
3683
|
+
ListAvailableFulfillmentOptionsResponse,
|
|
3684
|
+
ListAvailableTimeSlotsForDateRequest,
|
|
3685
|
+
ListAvailableTimeSlotsForDateResponse,
|
|
3686
|
+
ListBlockedPeriodsRequest,
|
|
3687
|
+
ListBlockedPeriodsResponse,
|
|
3688
|
+
ListFirstAvailableTimeSlotForFulfillmentTypesRequest,
|
|
3689
|
+
ListFirstAvailableTimeSlotForFulfillmentTypesResponse,
|
|
3690
|
+
ListFirstAvailableTimeSlotsForMenusRequest,
|
|
3691
|
+
ListFirstAvailableTimeSlotsForMenusResponse,
|
|
3692
|
+
ListFirstAvailableTimeSlotsForOperationsRequest,
|
|
3693
|
+
ListFirstAvailableTimeSlotsForOperationsResponse,
|
|
3694
|
+
ListOperationsRequest,
|
|
3695
|
+
ListOperationsResponse,
|
|
3696
|
+
QueryOperationRequest,
|
|
3697
|
+
QueryOperationResponse,
|
|
3698
|
+
UpdateOperationRequest,
|
|
3699
|
+
UpdateOperationResponse,
|
|
3700
|
+
ValidateOperationAddressRequest,
|
|
3701
|
+
ValidateOperationAddressResponse
|
|
3702
|
+
});
|
|
3703
|
+
//# sourceMappingURL=schemas.js.map
|