@wix/auto_sdk_restaurants_operations 1.0.90 → 1.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +3 -19
- package/build/cjs/index.js +0 -135
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -40
- package/build/cjs/index.typings.js +0 -103
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -11
- package/build/cjs/meta.js +0 -83
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +1 -321
- package/build/cjs/schemas.js +0 -478
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +3 -19
- package/build/es/index.mjs +0 -133
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -40
- package/build/es/index.typings.mjs +0 -102
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -11
- package/build/es/meta.mjs +0 -82
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +1 -321
- package/build/es/schemas.mjs +0 -476
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -19
- package/build/internal/cjs/index.js +0 -135
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -40
- package/build/internal/cjs/index.typings.js +0 -103
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -11
- package/build/internal/cjs/meta.js +0 -83
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +1 -321
- package/build/internal/cjs/schemas.js +0 -478
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -19
- package/build/internal/es/index.mjs +0 -133
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -40
- package/build/internal/es/index.typings.mjs +0 -102
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -11
- package/build/internal/es/meta.mjs +0 -82
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +1 -321
- package/build/internal/es/schemas.mjs +0 -476
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -22,480 +22,6 @@ var ListBlockedPeriodsResponse = z.object({
|
|
|
22
22
|
})
|
|
23
23
|
).max(1e3).optional()
|
|
24
24
|
});
|
|
25
|
-
var CreateOperationRequest = z.object({
|
|
26
|
-
operation: z.intersection(
|
|
27
|
-
z.object({
|
|
28
|
-
_id: z.string().describe("Operation ID.").regex(
|
|
29
|
-
/^[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}$/,
|
|
30
|
-
"Must be a valid GUID"
|
|
31
|
-
).optional().nullable(),
|
|
32
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
33
|
-
"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."
|
|
34
|
-
).optional().nullable(),
|
|
35
|
-
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
36
|
-
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
37
|
-
name: z.string().describe("Operation name.").optional().nullable(),
|
|
38
|
-
default: z.boolean().describe(
|
|
39
|
-
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
40
|
-
).optional().nullable(),
|
|
41
|
-
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
42
|
-
onlineOrderingStatus: z.enum([
|
|
43
|
-
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
44
|
-
"ENABLED",
|
|
45
|
-
"DISABLED",
|
|
46
|
-
"PAUSED_UNTIL"
|
|
47
|
-
]).optional(),
|
|
48
|
-
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).optional(),
|
|
49
|
-
orderScheduling: z.intersection(
|
|
50
|
-
z.object({ type: z.enum(["ASAP", "PREORDER"]).optional() }),
|
|
51
|
-
z.xor([
|
|
52
|
-
z.object({
|
|
53
|
-
asapOptions: z.never().optional(),
|
|
54
|
-
preorderOptions: z.never().optional()
|
|
55
|
-
}),
|
|
56
|
-
z.object({
|
|
57
|
-
preorderOptions: z.never().optional(),
|
|
58
|
-
asapOptions: z.intersection(
|
|
59
|
-
z.object({
|
|
60
|
-
preparationTime: z.intersection(
|
|
61
|
-
z.object({
|
|
62
|
-
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
63
|
-
}),
|
|
64
|
-
z.xor([
|
|
65
|
-
z.object({
|
|
66
|
-
maxTimeOptions: z.never().optional(),
|
|
67
|
-
timeRangeOptions: z.never().optional()
|
|
68
|
-
}),
|
|
69
|
-
z.object({
|
|
70
|
-
timeRangeOptions: z.never().optional(),
|
|
71
|
-
maxTimeOptions: z.object({
|
|
72
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
73
|
-
duration: z.number().int().describe(
|
|
74
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
75
|
-
).min(0).optional().nullable()
|
|
76
|
-
}).describe(
|
|
77
|
-
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
78
|
-
)
|
|
79
|
-
}),
|
|
80
|
-
z.object({
|
|
81
|
-
maxTimeOptions: z.never().optional(),
|
|
82
|
-
timeRangeOptions: z.object({
|
|
83
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
84
|
-
minDuration: z.number().int().describe(
|
|
85
|
-
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
86
|
-
).min(1).optional().nullable(),
|
|
87
|
-
maxDuration: z.number().int().describe(
|
|
88
|
-
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
89
|
-
).min(1).optional().nullable()
|
|
90
|
-
}).describe(
|
|
91
|
-
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
92
|
-
)
|
|
93
|
-
})
|
|
94
|
-
])
|
|
95
|
-
).describe(
|
|
96
|
-
"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."
|
|
97
|
-
).optional(),
|
|
98
|
-
asapFutureHandlingType: z.enum([
|
|
99
|
-
"NO_FUTURE_HANDLING",
|
|
100
|
-
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
101
|
-
]).describe(
|
|
102
|
-
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
103
|
-
).optional()
|
|
104
|
-
}),
|
|
105
|
-
z.xor([
|
|
106
|
-
z.object({
|
|
107
|
-
businessDaysAheadHandlingOptions: z.never().optional()
|
|
108
|
-
}),
|
|
109
|
-
z.object({
|
|
110
|
-
businessDaysAheadHandlingOptions: z.object({
|
|
111
|
-
daysCount: z.number().int().describe(
|
|
112
|
-
"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."
|
|
113
|
-
).min(0).optional().nullable()
|
|
114
|
-
}).describe(
|
|
115
|
-
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
116
|
-
)
|
|
117
|
-
})
|
|
118
|
-
])
|
|
119
|
-
).describe(
|
|
120
|
-
"Options for scheduling. Required if `type` is `ASAP`."
|
|
121
|
-
)
|
|
122
|
-
}),
|
|
123
|
-
z.object({
|
|
124
|
-
asapOptions: z.never().optional(),
|
|
125
|
-
preorderOptions: z.object({
|
|
126
|
-
method: z.intersection(
|
|
127
|
-
z.object({
|
|
128
|
-
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
129
|
-
"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."
|
|
130
|
-
).optional()
|
|
131
|
-
}),
|
|
132
|
-
z.xor([
|
|
133
|
-
z.object({
|
|
134
|
-
timeBoundedOptions: z.never().optional(),
|
|
135
|
-
weeklyScheduleOptions: z.never().optional()
|
|
136
|
-
}),
|
|
137
|
-
z.object({
|
|
138
|
-
weeklyScheduleOptions: z.never().optional(),
|
|
139
|
-
timeBoundedOptions: z.object({
|
|
140
|
-
minTimeInAdvance: z.object({
|
|
141
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
142
|
-
"Unit of time for the duration."
|
|
143
|
-
).optional(),
|
|
144
|
-
duration: z.number().int().describe(
|
|
145
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
146
|
-
).min(0).optional().nullable()
|
|
147
|
-
}).describe(
|
|
148
|
-
"Minimum time required to schedule the order."
|
|
149
|
-
).optional(),
|
|
150
|
-
maxTimeInAdvance: z.object({
|
|
151
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe(
|
|
152
|
-
"Unit of time for the duration."
|
|
153
|
-
).optional(),
|
|
154
|
-
duration: z.number().int().describe(
|
|
155
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
156
|
-
).min(0).optional().nullable()
|
|
157
|
-
}).describe(
|
|
158
|
-
"Maximum time allowed to schedule the order."
|
|
159
|
-
).optional()
|
|
160
|
-
}).describe(
|
|
161
|
-
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
162
|
-
)
|
|
163
|
-
}),
|
|
164
|
-
z.object({
|
|
165
|
-
timeBoundedOptions: z.never().optional(),
|
|
166
|
-
weeklyScheduleOptions: z.object({
|
|
167
|
-
cutOffTime: z.object({
|
|
168
|
-
dayOfWeek: z.enum([
|
|
169
|
-
"MON",
|
|
170
|
-
"TUE",
|
|
171
|
-
"WED",
|
|
172
|
-
"THU",
|
|
173
|
-
"FRI",
|
|
174
|
-
"SAT",
|
|
175
|
-
"SUN"
|
|
176
|
-
]).describe("Day of the week.").optional(),
|
|
177
|
-
timeOfDay: z.object({
|
|
178
|
-
hours: z.number().int().describe(
|
|
179
|
-
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
180
|
-
).optional(),
|
|
181
|
-
minutes: z.number().int().describe(
|
|
182
|
-
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
183
|
-
).optional()
|
|
184
|
-
}).describe("Time of the day.").optional()
|
|
185
|
-
}).describe(
|
|
186
|
-
"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."
|
|
187
|
-
).optional()
|
|
188
|
-
}).describe(
|
|
189
|
-
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
190
|
-
)
|
|
191
|
-
})
|
|
192
|
-
])
|
|
193
|
-
).optional(),
|
|
194
|
-
fulfillmentTimesDisplay: z.intersection(
|
|
195
|
-
z.object({
|
|
196
|
-
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
197
|
-
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
198
|
-
).optional()
|
|
199
|
-
}),
|
|
200
|
-
z.xor([
|
|
201
|
-
z.object({
|
|
202
|
-
timeWindowsOptions: z.never().optional()
|
|
203
|
-
}),
|
|
204
|
-
z.object({
|
|
205
|
-
timeWindowsOptions: z.object({
|
|
206
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
207
|
-
duration: z.number().int().describe(
|
|
208
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
209
|
-
).min(0).optional().nullable()
|
|
210
|
-
}).describe(
|
|
211
|
-
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
212
|
-
)
|
|
213
|
-
})
|
|
214
|
-
])
|
|
215
|
-
).describe(
|
|
216
|
-
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
217
|
-
).optional()
|
|
218
|
-
}).describe(
|
|
219
|
-
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
220
|
-
)
|
|
221
|
-
})
|
|
222
|
-
])
|
|
223
|
-
).describe("Information about when an order can be placed for.").optional(),
|
|
224
|
-
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
225
|
-
/^[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}$/,
|
|
226
|
-
"Must be a valid GUID"
|
|
227
|
-
).optional().nullable(),
|
|
228
|
-
businessLocationId: z.string().describe(
|
|
229
|
-
"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."
|
|
230
|
-
).regex(
|
|
231
|
-
/^[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}$/,
|
|
232
|
-
"Must be a valid GUID"
|
|
233
|
-
).optional().nullable(),
|
|
234
|
-
extendedFields: z.object({
|
|
235
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
236
|
-
"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)."
|
|
237
|
-
).optional()
|
|
238
|
-
}).describe("Extended fields.").optional(),
|
|
239
|
-
tags: z.object({
|
|
240
|
-
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
241
|
-
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
242
|
-
).optional(),
|
|
243
|
-
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
244
|
-
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
245
|
-
).optional()
|
|
246
|
-
}).describe(
|
|
247
|
-
"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."
|
|
248
|
-
).optional()
|
|
249
|
-
}),
|
|
250
|
-
z.xor([
|
|
251
|
-
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
252
|
-
z.object({
|
|
253
|
-
pausedUntilOptions: z.object({
|
|
254
|
-
time: z.date().describe(
|
|
255
|
-
"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."
|
|
256
|
-
).optional().nullable()
|
|
257
|
-
}).describe(
|
|
258
|
-
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
259
|
-
)
|
|
260
|
-
})
|
|
261
|
-
])
|
|
262
|
-
).describe("Operation to create.")
|
|
263
|
-
});
|
|
264
|
-
var CreateOperationResponse = z.intersection(
|
|
265
|
-
z.object({
|
|
266
|
-
_id: z.string().describe("Operation ID.").regex(
|
|
267
|
-
/^[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}$/,
|
|
268
|
-
"Must be a valid GUID"
|
|
269
|
-
).optional().nullable(),
|
|
270
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
271
|
-
"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."
|
|
272
|
-
).optional().nullable(),
|
|
273
|
-
_createdDate: z.date().describe("Date and time the operation was created.").optional().nullable(),
|
|
274
|
-
_updatedDate: z.date().describe("Date and time the operation was updated.").optional().nullable(),
|
|
275
|
-
name: z.string().describe("Operation name.").optional().nullable(),
|
|
276
|
-
default: z.boolean().describe(
|
|
277
|
-
"Whether the operation is the default operation. <br />\nDefault: `false`."
|
|
278
|
-
).optional().nullable(),
|
|
279
|
-
fulfillmentIds: z.array(z.string()).max(500).optional(),
|
|
280
|
-
onlineOrderingStatus: z.enum([
|
|
281
|
-
"UNDEFINED_ONLINE_ORDERING_STATUS",
|
|
282
|
-
"ENABLED",
|
|
283
|
-
"DISABLED",
|
|
284
|
-
"PAUSED_UNTIL"
|
|
285
|
-
]).describe("Online ordering status of the operation. <br />").optional(),
|
|
286
|
-
defaultFulfillmentType: z.enum(["PICKUP", "DELIVERY"]).describe("Default fulfillment type of the operation.").optional(),
|
|
287
|
-
orderScheduling: z.intersection(
|
|
288
|
-
z.object({
|
|
289
|
-
type: z.enum(["ASAP", "PREORDER"]).describe(
|
|
290
|
-
"Scheduling type. <br />\n- When `ASAP`, `asapOptions` is a required field.\n- When `PREORDER`, `preorderOptions` is a required field."
|
|
291
|
-
).optional()
|
|
292
|
-
}),
|
|
293
|
-
z.xor([
|
|
294
|
-
z.object({
|
|
295
|
-
asapOptions: z.never().optional(),
|
|
296
|
-
preorderOptions: z.never().optional()
|
|
297
|
-
}),
|
|
298
|
-
z.object({
|
|
299
|
-
preorderOptions: z.never().optional(),
|
|
300
|
-
asapOptions: z.intersection(
|
|
301
|
-
z.object({
|
|
302
|
-
preparationTime: z.intersection(
|
|
303
|
-
z.object({
|
|
304
|
-
type: z.enum(["MAX_TIME", "TIME_RANGE"]).describe("Preparation time type.").optional()
|
|
305
|
-
}),
|
|
306
|
-
z.xor([
|
|
307
|
-
z.object({
|
|
308
|
-
maxTimeOptions: z.never().optional(),
|
|
309
|
-
timeRangeOptions: z.never().optional()
|
|
310
|
-
}),
|
|
311
|
-
z.object({
|
|
312
|
-
timeRangeOptions: z.never().optional(),
|
|
313
|
-
maxTimeOptions: z.object({
|
|
314
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
315
|
-
duration: z.number().int().describe(
|
|
316
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
317
|
-
).min(0).optional().nullable()
|
|
318
|
-
}).describe(
|
|
319
|
-
"Options for preparation time. Required when `type` is `MAX_TIME`."
|
|
320
|
-
)
|
|
321
|
-
}),
|
|
322
|
-
z.object({
|
|
323
|
-
maxTimeOptions: z.never().optional(),
|
|
324
|
-
timeRangeOptions: z.object({
|
|
325
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Time unit for the time range.").optional(),
|
|
326
|
-
minDuration: z.number().int().describe(
|
|
327
|
-
"Minimum duration value. Unit of time specified in `timeUnit`."
|
|
328
|
-
).min(1).optional().nullable(),
|
|
329
|
-
maxDuration: z.number().int().describe(
|
|
330
|
-
"Maximum duration value. Unit of time specified in `timeUnit`."
|
|
331
|
-
).min(1).optional().nullable()
|
|
332
|
-
}).describe(
|
|
333
|
-
"Options for preparation time. Required when `type` is `TIME_RANGE`."
|
|
334
|
-
)
|
|
335
|
-
})
|
|
336
|
-
])
|
|
337
|
-
).describe(
|
|
338
|
-
"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."
|
|
339
|
-
).optional(),
|
|
340
|
-
asapFutureHandlingType: z.enum([
|
|
341
|
-
"NO_FUTURE_HANDLING",
|
|
342
|
-
"BUSINESS_DAYS_AHEAD_HANDLING"
|
|
343
|
-
]).describe(
|
|
344
|
-
"Defines if and how non-immediate orders should be handled. <br />\nWhen this value is `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is a required field."
|
|
345
|
-
).optional()
|
|
346
|
-
}),
|
|
347
|
-
z.xor([
|
|
348
|
-
z.object({
|
|
349
|
-
businessDaysAheadHandlingOptions: z.never().optional()
|
|
350
|
-
}),
|
|
351
|
-
z.object({
|
|
352
|
-
businessDaysAheadHandlingOptions: z.object({
|
|
353
|
-
daysCount: z.number().int().describe(
|
|
354
|
-
"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."
|
|
355
|
-
).min(0).optional().nullable()
|
|
356
|
-
}).describe(
|
|
357
|
-
"Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`."
|
|
358
|
-
)
|
|
359
|
-
})
|
|
360
|
-
])
|
|
361
|
-
).describe(
|
|
362
|
-
"Options for scheduling. Required if `type` is `ASAP`."
|
|
363
|
-
)
|
|
364
|
-
}),
|
|
365
|
-
z.object({
|
|
366
|
-
asapOptions: z.never().optional(),
|
|
367
|
-
preorderOptions: z.object({
|
|
368
|
-
method: z.intersection(
|
|
369
|
-
z.object({
|
|
370
|
-
type: z.enum(["TIME_BOUNDED", "WEEKLY_SCHEDULE"]).describe(
|
|
371
|
-
"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."
|
|
372
|
-
).optional()
|
|
373
|
-
}),
|
|
374
|
-
z.xor([
|
|
375
|
-
z.object({
|
|
376
|
-
timeBoundedOptions: z.never().optional(),
|
|
377
|
-
weeklyScheduleOptions: z.never().optional()
|
|
378
|
-
}),
|
|
379
|
-
z.object({
|
|
380
|
-
weeklyScheduleOptions: z.never().optional(),
|
|
381
|
-
timeBoundedOptions: z.object({
|
|
382
|
-
minTimeInAdvance: z.object({
|
|
383
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
384
|
-
duration: z.number().int().describe(
|
|
385
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
386
|
-
).min(0).optional().nullable()
|
|
387
|
-
}).describe(
|
|
388
|
-
"Minimum time required to schedule the order."
|
|
389
|
-
).optional(),
|
|
390
|
-
maxTimeInAdvance: z.object({
|
|
391
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
392
|
-
duration: z.number().int().describe(
|
|
393
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
394
|
-
).min(0).optional().nullable()
|
|
395
|
-
}).describe(
|
|
396
|
-
"Maximum time allowed to schedule the order."
|
|
397
|
-
).optional()
|
|
398
|
-
}).describe(
|
|
399
|
-
"Options for the method. Required when `type` is `TIME_BOUNDED`."
|
|
400
|
-
)
|
|
401
|
-
}),
|
|
402
|
-
z.object({
|
|
403
|
-
timeBoundedOptions: z.never().optional(),
|
|
404
|
-
weeklyScheduleOptions: z.object({
|
|
405
|
-
cutOffTime: z.object({
|
|
406
|
-
dayOfWeek: z.enum([
|
|
407
|
-
"MON",
|
|
408
|
-
"TUE",
|
|
409
|
-
"WED",
|
|
410
|
-
"THU",
|
|
411
|
-
"FRI",
|
|
412
|
-
"SAT",
|
|
413
|
-
"SUN"
|
|
414
|
-
]).describe("Day of the week.").optional(),
|
|
415
|
-
timeOfDay: z.object({
|
|
416
|
-
hours: z.number().int().describe(
|
|
417
|
-
"Hours. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
418
|
-
).optional(),
|
|
419
|
-
minutes: z.number().int().describe(
|
|
420
|
-
"Minutes. <br />\nMin: `0`. <br />\nMax: `23`."
|
|
421
|
-
).optional()
|
|
422
|
-
}).describe("Time of the day.").optional()
|
|
423
|
-
}).describe(
|
|
424
|
-
"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."
|
|
425
|
-
).optional()
|
|
426
|
-
}).describe(
|
|
427
|
-
"Options for the method. Required when `type` is `WEEKLY_SCHEDULE`."
|
|
428
|
-
)
|
|
429
|
-
})
|
|
430
|
-
])
|
|
431
|
-
).optional(),
|
|
432
|
-
fulfillmentTimesDisplay: z.intersection(
|
|
433
|
-
z.object({
|
|
434
|
-
type: z.enum(["TIME_WINDOWS"]).describe(
|
|
435
|
-
"Type of the fulfillment times. <br />\nWhen `TIME_WINDOWS`, `timeWindowsOptions` is a required field."
|
|
436
|
-
).optional()
|
|
437
|
-
}),
|
|
438
|
-
z.xor([
|
|
439
|
-
z.object({ timeWindowsOptions: z.never().optional() }),
|
|
440
|
-
z.object({
|
|
441
|
-
timeWindowsOptions: z.object({
|
|
442
|
-
timeUnit: z.enum(["MINUTES", "HOURS", "DAYS"]).describe("Unit of time for the duration.").optional(),
|
|
443
|
-
duration: z.number().int().describe(
|
|
444
|
-
"Duration value. Unit of time specified in `timeUnit`."
|
|
445
|
-
).min(0).optional().nullable()
|
|
446
|
-
}).describe(
|
|
447
|
-
"Options for fulfillment time. Required when `fulfillmentTimesType` is `TIME_WINDOWS`."
|
|
448
|
-
)
|
|
449
|
-
})
|
|
450
|
-
])
|
|
451
|
-
).describe(
|
|
452
|
-
"Configuration of the fulfillment times. <br />\nCurrently, only `TIME_WINDOWS` is supported."
|
|
453
|
-
).optional()
|
|
454
|
-
}).describe(
|
|
455
|
-
"Options for scheduling. Required if `type` is `PREORDER`."
|
|
456
|
-
)
|
|
457
|
-
})
|
|
458
|
-
])
|
|
459
|
-
).describe("Information about when an order can be placed for.").optional(),
|
|
460
|
-
operationGroupId: z.string().describe("ID of the operation group this operation belongs to.").regex(
|
|
461
|
-
/^[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}$/,
|
|
462
|
-
"Must be a valid GUID"
|
|
463
|
-
).optional().nullable(),
|
|
464
|
-
businessLocationId: z.string().describe(
|
|
465
|
-
"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."
|
|
466
|
-
).regex(
|
|
467
|
-
/^[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}$/,
|
|
468
|
-
"Must be a valid GUID"
|
|
469
|
-
).optional().nullable(),
|
|
470
|
-
extendedFields: z.object({
|
|
471
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
472
|
-
"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)."
|
|
473
|
-
).optional()
|
|
474
|
-
}).describe("Extended fields.").optional(),
|
|
475
|
-
tags: z.object({
|
|
476
|
-
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
477
|
-
"Tags that require an additional permission in order to access them, normally not given to site members or visitors."
|
|
478
|
-
).optional(),
|
|
479
|
-
tags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
480
|
-
"Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors."
|
|
481
|
-
).optional()
|
|
482
|
-
}).describe(
|
|
483
|
-
"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."
|
|
484
|
-
).optional()
|
|
485
|
-
}),
|
|
486
|
-
z.xor([
|
|
487
|
-
z.object({ pausedUntilOptions: z.never().optional() }),
|
|
488
|
-
z.object({
|
|
489
|
-
pausedUntilOptions: z.object({
|
|
490
|
-
time: z.date().describe(
|
|
491
|
-
"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."
|
|
492
|
-
).optional().nullable()
|
|
493
|
-
}).describe(
|
|
494
|
-
"Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`."
|
|
495
|
-
)
|
|
496
|
-
})
|
|
497
|
-
])
|
|
498
|
-
);
|
|
499
25
|
var GetOperationRequest = z.object({
|
|
500
26
|
operationId: z.string().describe("ID of the operation to retrieve.").regex(
|
|
501
27
|
/^[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}$/,
|
|
@@ -3591,8 +3117,6 @@ export {
|
|
|
3591
3117
|
CalculateFirstAvailableTimeSlotsPerMenuResponse,
|
|
3592
3118
|
CalculateFirstAvailableTimeSlotsPerOperationRequest,
|
|
3593
3119
|
CalculateFirstAvailableTimeSlotsPerOperationResponse,
|
|
3594
|
-
CreateOperationRequest,
|
|
3595
|
-
CreateOperationResponse,
|
|
3596
3120
|
DeleteOperationRequest,
|
|
3597
3121
|
DeleteOperationResponse,
|
|
3598
3122
|
GetOperationRequest,
|