order3000 0.25.0 → 1.0.1
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/dist/client.d.cts +962 -848
- package/dist/client.d.mts +962 -848
- package/dist/schemas.cjs +1649 -230
- package/dist/schemas.d.cts +1537 -183
- package/dist/schemas.d.mts +1537 -183
- package/dist/schemas.mjs +1649 -230
- package/package.json +6 -5
package/dist/schemas.mjs
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
import { t as teamOrderStatusSchema, f as fulfillmentTypeSchema, p as paymentMethodSchema, d as deliveryAddressSchema, a as participantStatusSchema } from './deliveryAddressSchema-8YX7yh5X.mjs';
|
|
3
3
|
|
|
4
|
+
const abandonBasketRequestSchema = z.object({
|
|
5
|
+
sessionId: z.string().min(1)
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const abandonBasketResponseSchema = z.object({
|
|
9
|
+
abandonedCount: z.int().min(0).max(9007199254740991)
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const actorTypeSchema = z.enum(["human", "robot"]);
|
|
13
|
+
|
|
14
|
+
const unitSchema = z.enum([
|
|
15
|
+
"grams",
|
|
16
|
+
"kilograms",
|
|
17
|
+
"liters",
|
|
18
|
+
"milliliters",
|
|
19
|
+
"pieces"
|
|
20
|
+
]);
|
|
21
|
+
|
|
4
22
|
const addToBasketRequestSchema = z.object({
|
|
5
23
|
venueId: z.uuid(),
|
|
6
24
|
sessionId: z.string().min(1),
|
|
@@ -9,16 +27,20 @@ const addToBasketRequestSchema = z.object({
|
|
|
9
27
|
menuItemId: z.string().min(1),
|
|
10
28
|
role: z.optional(z.string()),
|
|
11
29
|
quantity: z.optional(z.number().gt(0)),
|
|
12
|
-
unit
|
|
13
|
-
|
|
14
|
-
|
|
30
|
+
get unit() {
|
|
31
|
+
return unitSchema.optional();
|
|
32
|
+
}
|
|
15
33
|
})
|
|
16
34
|
).min(1),
|
|
17
35
|
metadata: z.optional(z.object({}).catchall(z.any()))
|
|
18
36
|
}).describe("Add an item to the shopping basket");
|
|
19
37
|
|
|
38
|
+
const currencySchema = z.enum(["EUR", "CHF"]);
|
|
39
|
+
|
|
20
40
|
const basketTotalsSchema = z.object({
|
|
21
|
-
currency
|
|
41
|
+
get currency() {
|
|
42
|
+
return currencySchema;
|
|
43
|
+
},
|
|
22
44
|
itemsTotal: z.int().min(0).max(9007199254740991),
|
|
23
45
|
taxAmount: z.int().min(0).max(9007199254740991),
|
|
24
46
|
depositCharge: z.int().min(0).max(9007199254740991),
|
|
@@ -42,7 +64,9 @@ const addToBasketResponseSchema = z.object({
|
|
|
42
64
|
depositwareTemplateId: z.string(),
|
|
43
65
|
name: z.object({}).catchall(z.string()),
|
|
44
66
|
amount: z.int().min(0).max(9007199254740991),
|
|
45
|
-
currency
|
|
67
|
+
get currency() {
|
|
68
|
+
return currencySchema;
|
|
69
|
+
}
|
|
46
70
|
})
|
|
47
71
|
),
|
|
48
72
|
get totals() {
|
|
@@ -50,6 +74,60 @@ const addToBasketResponseSchema = z.object({
|
|
|
50
74
|
}
|
|
51
75
|
});
|
|
52
76
|
|
|
77
|
+
const additiveFunctionSchema = z.enum([
|
|
78
|
+
"acid",
|
|
79
|
+
"acidity_regulator",
|
|
80
|
+
"anti_caking_agent",
|
|
81
|
+
"anti_foaming_agent",
|
|
82
|
+
"antioxidant",
|
|
83
|
+
"bulking_agent",
|
|
84
|
+
"carrier",
|
|
85
|
+
"colour",
|
|
86
|
+
"emulsifier",
|
|
87
|
+
"emulsifying_salt",
|
|
88
|
+
"firming_agent",
|
|
89
|
+
"flavour_enhancer",
|
|
90
|
+
"flour_treatment_agent",
|
|
91
|
+
"foaming_agent",
|
|
92
|
+
"gelling_agent",
|
|
93
|
+
"glazing_agent",
|
|
94
|
+
"humectant",
|
|
95
|
+
"modified_starch",
|
|
96
|
+
"preservative",
|
|
97
|
+
"packaging_gas",
|
|
98
|
+
"propellant_gas",
|
|
99
|
+
"raising_agent",
|
|
100
|
+
"sequestrant",
|
|
101
|
+
"stabiliser",
|
|
102
|
+
"sweetener",
|
|
103
|
+
"thickener"
|
|
104
|
+
]);
|
|
105
|
+
|
|
106
|
+
const areaBookingModeSchema = z.enum(["slot", "day"]);
|
|
107
|
+
|
|
108
|
+
const areaBookingRequestSourceSchema = z.enum([
|
|
109
|
+
"website",
|
|
110
|
+
"phone",
|
|
111
|
+
"walk_in"
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
const areaBookingRequestStatusSchema = z.enum([
|
|
115
|
+
"pending",
|
|
116
|
+
"approved",
|
|
117
|
+
"rejected",
|
|
118
|
+
"cancelled"
|
|
119
|
+
]);
|
|
120
|
+
|
|
121
|
+
const areaBookingStatusSchema = z.enum([
|
|
122
|
+
"confirmed",
|
|
123
|
+
"arrived",
|
|
124
|
+
"completed",
|
|
125
|
+
"cancelled",
|
|
126
|
+
"no_show"
|
|
127
|
+
]);
|
|
128
|
+
|
|
129
|
+
const assetTypeSchema = z.enum(["image", "video", "document"]);
|
|
130
|
+
|
|
53
131
|
const areaSchema = z.object({
|
|
54
132
|
id: z.string(),
|
|
55
133
|
venueId: z.string(),
|
|
@@ -61,7 +139,9 @@ const areaSchema = z.object({
|
|
|
61
139
|
z.int().min(-9007199254740991).max(9007199254740991)
|
|
62
140
|
),
|
|
63
141
|
maxCapacity: z.int().min(-9007199254740991).max(9007199254740991),
|
|
64
|
-
currency
|
|
142
|
+
get currency() {
|
|
143
|
+
return currencySchema;
|
|
144
|
+
},
|
|
65
145
|
basePrice: z.nullable(z.int().min(-9007199254740991).max(9007199254740991)),
|
|
66
146
|
perPersonPrice: z.nullable(
|
|
67
147
|
z.int().min(-9007199254740991).max(9007199254740991)
|
|
@@ -75,12 +155,19 @@ const areaSchema = z.object({
|
|
|
75
155
|
})
|
|
76
156
|
)
|
|
77
157
|
),
|
|
78
|
-
bookingMode
|
|
158
|
+
get bookingMode() {
|
|
159
|
+
return areaBookingModeSchema;
|
|
160
|
+
},
|
|
161
|
+
isBookable: z.optional(z.boolean()),
|
|
162
|
+
isPublic: z.optional(z.boolean()),
|
|
163
|
+
isActive: z.optional(z.boolean()),
|
|
79
164
|
assets: z.optional(
|
|
80
165
|
z.array(
|
|
81
166
|
z.object({
|
|
82
167
|
id: z.string(),
|
|
83
|
-
type
|
|
168
|
+
get type() {
|
|
169
|
+
return assetTypeSchema;
|
|
170
|
+
},
|
|
84
171
|
tags: z.nullable(z.array(z.string())),
|
|
85
172
|
filename: z.string(),
|
|
86
173
|
contentType: z.string(),
|
|
@@ -104,9 +191,16 @@ const areaSchema = z.object({
|
|
|
104
191
|
)
|
|
105
192
|
)
|
|
106
193
|
}).describe(
|
|
107
|
-
"A bookable + public area for a venue. Assets are only included when the request expands them."
|
|
194
|
+
"A bookable + public area for a venue. Assets are only included when the request expands them. Operational flags (`isActive`, `isPublic`, `isBookable`) and audit columns are only populated for authenticated venue staff."
|
|
108
195
|
);
|
|
109
196
|
|
|
197
|
+
const articleEditorSaveStateSchema = z.enum([
|
|
198
|
+
"idle",
|
|
199
|
+
"saving",
|
|
200
|
+
"saved",
|
|
201
|
+
"error"
|
|
202
|
+
]);
|
|
203
|
+
|
|
110
204
|
const articleMentionCountsSchema = z.object({
|
|
111
205
|
dishes: z.int().min(0).max(9007199254740991),
|
|
112
206
|
beverages: z.int().min(0).max(9007199254740991),
|
|
@@ -115,6 +209,41 @@ const articleMentionCountsSchema = z.object({
|
|
|
115
209
|
rituals: z.int().min(0).max(9007199254740991)
|
|
116
210
|
});
|
|
117
211
|
|
|
212
|
+
const articleStatusSchema = z.enum(["draft", "published"]);
|
|
213
|
+
|
|
214
|
+
const autoExtendFulfillmentIfExpiredRequestSchema = z.object({
|
|
215
|
+
publicId: z.string().min(1),
|
|
216
|
+
sessionId: z.string().min(1),
|
|
217
|
+
proposedFulfillmentAt: z.iso.datetime()
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
const autoExtendFulfillmentIfExpiredResponseSchema = z.object({
|
|
221
|
+
extended: z.boolean(),
|
|
222
|
+
teamOrderId: z.string(),
|
|
223
|
+
status: z.string(),
|
|
224
|
+
fulfillmentAt: z.iso.datetime(),
|
|
225
|
+
deadlineAt: z.nullable(z.iso.datetime()),
|
|
226
|
+
previousFulfillmentAt: z.iso.datetime(),
|
|
227
|
+
waitingCount: z.int().min(0).max(9007199254740991)
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
const basketStatusSchema = z.enum(["active", "abandoned", "converted"]);
|
|
231
|
+
|
|
232
|
+
const beverageCategorySchema = z.enum([
|
|
233
|
+
"wine",
|
|
234
|
+
"beer",
|
|
235
|
+
"coffee",
|
|
236
|
+
"tea",
|
|
237
|
+
"cocktail",
|
|
238
|
+
"juice",
|
|
239
|
+
"soft_drink",
|
|
240
|
+
"dairy_drink",
|
|
241
|
+
"spirit",
|
|
242
|
+
"water"
|
|
243
|
+
]);
|
|
244
|
+
|
|
245
|
+
const billingModeSchema = z.enum(["single_anchor", "split"]);
|
|
246
|
+
|
|
118
247
|
const cancelSubscriptionRequestSchema = z.object({
|
|
119
248
|
subscriberId: z.string().min(1)
|
|
120
249
|
});
|
|
@@ -138,6 +267,11 @@ const cancelTeamOrderResponseSchema = z.object({
|
|
|
138
267
|
cancelledAt: z.iso.datetime()
|
|
139
268
|
});
|
|
140
269
|
|
|
270
|
+
const cancellationReasonSchema = z.enum([
|
|
271
|
+
"customer_request",
|
|
272
|
+
"restaurant_request"
|
|
273
|
+
]);
|
|
274
|
+
|
|
141
275
|
const confirmOrderRequestSchema = z.object({
|
|
142
276
|
venueAccessor: z.string().min(1),
|
|
143
277
|
orderId: z.string().min(1),
|
|
@@ -154,11 +288,267 @@ const confirmOrderResponseSchema = z.object({
|
|
|
154
288
|
customerId: z.optional(z.string())
|
|
155
289
|
});
|
|
156
290
|
|
|
291
|
+
const contactPreferenceSchema = z.enum(["email", "phone", "sms", "none"]);
|
|
292
|
+
|
|
293
|
+
const countryCodeSchema = z.enum([
|
|
294
|
+
"AD",
|
|
295
|
+
"AE",
|
|
296
|
+
"AF",
|
|
297
|
+
"AG",
|
|
298
|
+
"AI",
|
|
299
|
+
"AL",
|
|
300
|
+
"AM",
|
|
301
|
+
"AO",
|
|
302
|
+
"AQ",
|
|
303
|
+
"AR",
|
|
304
|
+
"AS",
|
|
305
|
+
"AT",
|
|
306
|
+
"AU",
|
|
307
|
+
"AW",
|
|
308
|
+
"AX",
|
|
309
|
+
"AZ",
|
|
310
|
+
"BA",
|
|
311
|
+
"BB",
|
|
312
|
+
"BD",
|
|
313
|
+
"BE",
|
|
314
|
+
"BF",
|
|
315
|
+
"BG",
|
|
316
|
+
"BH",
|
|
317
|
+
"BI",
|
|
318
|
+
"BJ",
|
|
319
|
+
"BL",
|
|
320
|
+
"BM",
|
|
321
|
+
"BN",
|
|
322
|
+
"BO",
|
|
323
|
+
"BQ",
|
|
324
|
+
"BR",
|
|
325
|
+
"BS",
|
|
326
|
+
"BT",
|
|
327
|
+
"BV",
|
|
328
|
+
"BW",
|
|
329
|
+
"BY",
|
|
330
|
+
"BZ",
|
|
331
|
+
"CA",
|
|
332
|
+
"CC",
|
|
333
|
+
"CD",
|
|
334
|
+
"CF",
|
|
335
|
+
"CG",
|
|
336
|
+
"CH",
|
|
337
|
+
"CI",
|
|
338
|
+
"CK",
|
|
339
|
+
"CL",
|
|
340
|
+
"CM",
|
|
341
|
+
"CN",
|
|
342
|
+
"CO",
|
|
343
|
+
"CR",
|
|
344
|
+
"CU",
|
|
345
|
+
"CV",
|
|
346
|
+
"CW",
|
|
347
|
+
"CX",
|
|
348
|
+
"CY",
|
|
349
|
+
"CZ",
|
|
350
|
+
"DE",
|
|
351
|
+
"DJ",
|
|
352
|
+
"DK",
|
|
353
|
+
"DM",
|
|
354
|
+
"DO",
|
|
355
|
+
"DZ",
|
|
356
|
+
"EC",
|
|
357
|
+
"EE",
|
|
358
|
+
"EG",
|
|
359
|
+
"EH",
|
|
360
|
+
"ER",
|
|
361
|
+
"ES",
|
|
362
|
+
"ET",
|
|
363
|
+
"FI",
|
|
364
|
+
"FJ",
|
|
365
|
+
"FK",
|
|
366
|
+
"FM",
|
|
367
|
+
"FO",
|
|
368
|
+
"FR",
|
|
369
|
+
"GA",
|
|
370
|
+
"GB",
|
|
371
|
+
"GD",
|
|
372
|
+
"GE",
|
|
373
|
+
"GF",
|
|
374
|
+
"GG",
|
|
375
|
+
"GH",
|
|
376
|
+
"GI",
|
|
377
|
+
"GL",
|
|
378
|
+
"GM",
|
|
379
|
+
"GN",
|
|
380
|
+
"GP",
|
|
381
|
+
"GQ",
|
|
382
|
+
"GR",
|
|
383
|
+
"GS",
|
|
384
|
+
"GT",
|
|
385
|
+
"GU",
|
|
386
|
+
"GW",
|
|
387
|
+
"GY",
|
|
388
|
+
"HK",
|
|
389
|
+
"HM",
|
|
390
|
+
"HN",
|
|
391
|
+
"HR",
|
|
392
|
+
"HT",
|
|
393
|
+
"HU",
|
|
394
|
+
"ID",
|
|
395
|
+
"IE",
|
|
396
|
+
"IL",
|
|
397
|
+
"IM",
|
|
398
|
+
"IN",
|
|
399
|
+
"IO",
|
|
400
|
+
"IQ",
|
|
401
|
+
"IR",
|
|
402
|
+
"IS",
|
|
403
|
+
"IT",
|
|
404
|
+
"JE",
|
|
405
|
+
"JM",
|
|
406
|
+
"JO",
|
|
407
|
+
"JP",
|
|
408
|
+
"KE",
|
|
409
|
+
"KG",
|
|
410
|
+
"KH",
|
|
411
|
+
"KI",
|
|
412
|
+
"KM",
|
|
413
|
+
"KN",
|
|
414
|
+
"KP",
|
|
415
|
+
"KR",
|
|
416
|
+
"KW",
|
|
417
|
+
"KY",
|
|
418
|
+
"KZ",
|
|
419
|
+
"LA",
|
|
420
|
+
"LB",
|
|
421
|
+
"LC",
|
|
422
|
+
"LI",
|
|
423
|
+
"LK",
|
|
424
|
+
"LR",
|
|
425
|
+
"LS",
|
|
426
|
+
"LT",
|
|
427
|
+
"LU",
|
|
428
|
+
"LV",
|
|
429
|
+
"LY",
|
|
430
|
+
"MA",
|
|
431
|
+
"MC",
|
|
432
|
+
"MD",
|
|
433
|
+
"ME",
|
|
434
|
+
"MF",
|
|
435
|
+
"MG",
|
|
436
|
+
"MH",
|
|
437
|
+
"MK",
|
|
438
|
+
"ML",
|
|
439
|
+
"MM",
|
|
440
|
+
"MN",
|
|
441
|
+
"MO",
|
|
442
|
+
"MP",
|
|
443
|
+
"MQ",
|
|
444
|
+
"MR",
|
|
445
|
+
"MS",
|
|
446
|
+
"MT",
|
|
447
|
+
"MU",
|
|
448
|
+
"MV",
|
|
449
|
+
"MW",
|
|
450
|
+
"MX",
|
|
451
|
+
"MY",
|
|
452
|
+
"MZ",
|
|
453
|
+
"NA",
|
|
454
|
+
"NC",
|
|
455
|
+
"NE",
|
|
456
|
+
"NF",
|
|
457
|
+
"NG",
|
|
458
|
+
"NI",
|
|
459
|
+
"NL",
|
|
460
|
+
"NO",
|
|
461
|
+
"NP",
|
|
462
|
+
"NR",
|
|
463
|
+
"NU",
|
|
464
|
+
"NZ",
|
|
465
|
+
"OM",
|
|
466
|
+
"PA",
|
|
467
|
+
"PE",
|
|
468
|
+
"PF",
|
|
469
|
+
"PG",
|
|
470
|
+
"PH",
|
|
471
|
+
"PK",
|
|
472
|
+
"PL",
|
|
473
|
+
"PM",
|
|
474
|
+
"PN",
|
|
475
|
+
"PR",
|
|
476
|
+
"PS",
|
|
477
|
+
"PT",
|
|
478
|
+
"PW",
|
|
479
|
+
"PY",
|
|
480
|
+
"QA",
|
|
481
|
+
"RE",
|
|
482
|
+
"RO",
|
|
483
|
+
"RS",
|
|
484
|
+
"RU",
|
|
485
|
+
"RW",
|
|
486
|
+
"SA",
|
|
487
|
+
"SB",
|
|
488
|
+
"SC",
|
|
489
|
+
"SD",
|
|
490
|
+
"SE",
|
|
491
|
+
"SG",
|
|
492
|
+
"SH",
|
|
493
|
+
"SI",
|
|
494
|
+
"SJ",
|
|
495
|
+
"SK",
|
|
496
|
+
"SL",
|
|
497
|
+
"SM",
|
|
498
|
+
"SN",
|
|
499
|
+
"SO",
|
|
500
|
+
"SR",
|
|
501
|
+
"SS",
|
|
502
|
+
"ST",
|
|
503
|
+
"SV",
|
|
504
|
+
"SX",
|
|
505
|
+
"SY",
|
|
506
|
+
"SZ",
|
|
507
|
+
"TC",
|
|
508
|
+
"TD",
|
|
509
|
+
"TF",
|
|
510
|
+
"TG",
|
|
511
|
+
"TH",
|
|
512
|
+
"TJ",
|
|
513
|
+
"TK",
|
|
514
|
+
"TL",
|
|
515
|
+
"TM",
|
|
516
|
+
"TN",
|
|
517
|
+
"TO",
|
|
518
|
+
"TR",
|
|
519
|
+
"TT",
|
|
520
|
+
"TV",
|
|
521
|
+
"TW",
|
|
522
|
+
"TZ",
|
|
523
|
+
"UA",
|
|
524
|
+
"UG",
|
|
525
|
+
"UM",
|
|
526
|
+
"US",
|
|
527
|
+
"UY",
|
|
528
|
+
"UZ",
|
|
529
|
+
"VA",
|
|
530
|
+
"VC",
|
|
531
|
+
"VE",
|
|
532
|
+
"VG",
|
|
533
|
+
"VI",
|
|
534
|
+
"VN",
|
|
535
|
+
"VU",
|
|
536
|
+
"WF",
|
|
537
|
+
"WS",
|
|
538
|
+
"YE",
|
|
539
|
+
"YT",
|
|
540
|
+
"ZA",
|
|
541
|
+
"ZM",
|
|
542
|
+
"ZW"
|
|
543
|
+
]);
|
|
544
|
+
|
|
157
545
|
const createDeltaPaymentIntentRequestSchema = z.object({
|
|
158
546
|
venueAccessor: z.string().min(1),
|
|
159
547
|
basketId: z.string().min(1),
|
|
160
548
|
sessionId: z.string().min(1),
|
|
161
|
-
currency
|
|
549
|
+
get currency() {
|
|
550
|
+
return currencySchema;
|
|
551
|
+
},
|
|
162
552
|
declaredReturns: z.optional(
|
|
163
553
|
z.array(
|
|
164
554
|
z.object({
|
|
@@ -185,6 +575,8 @@ const createDeltaPaymentIntentResponseSchema = z.object({
|
|
|
185
575
|
])
|
|
186
576
|
});
|
|
187
577
|
|
|
578
|
+
const slotModeSchema = z.enum(["interval", "duration"]);
|
|
579
|
+
|
|
188
580
|
const createEventRequestSchema = z.object({
|
|
189
581
|
accessor: z.string().nullish(),
|
|
190
582
|
name: z.union([
|
|
@@ -222,7 +614,9 @@ const createEventRequestSchema = z.object({
|
|
|
222
614
|
lastSeatingTime: z.string().regex(/^\d{2}:\d{2}$/).nullish()
|
|
223
615
|
})
|
|
224
616
|
).min(1),
|
|
225
|
-
slotMode
|
|
617
|
+
get slotMode() {
|
|
618
|
+
return slotModeSchema.optional();
|
|
619
|
+
},
|
|
226
620
|
intervalDuration: z.number().nullish(),
|
|
227
621
|
duration: z.number().nullish()
|
|
228
622
|
}).nullish(),
|
|
@@ -269,7 +663,9 @@ const createEventResponseSchema = z.object({
|
|
|
269
663
|
const createPaymentIntentRequestSchema = z.object({
|
|
270
664
|
venueAccessor: z.string().min(1),
|
|
271
665
|
basketId: z.string().min(1),
|
|
272
|
-
currency
|
|
666
|
+
get currency() {
|
|
667
|
+
return currencySchema;
|
|
668
|
+
},
|
|
273
669
|
sessionId: z.string().min(1),
|
|
274
670
|
get fulfillmentType() {
|
|
275
671
|
return fulfillmentTypeSchema;
|
|
@@ -322,6 +718,33 @@ const createTeamOrderResponseSchema = z.object({
|
|
|
322
718
|
teamOrderId: z.uuid()
|
|
323
719
|
});
|
|
324
720
|
|
|
721
|
+
const dayOfWeekSchema = z.enum([
|
|
722
|
+
"monday",
|
|
723
|
+
"tuesday",
|
|
724
|
+
"wednesday",
|
|
725
|
+
"thursday",
|
|
726
|
+
"friday",
|
|
727
|
+
"saturday",
|
|
728
|
+
"sunday"
|
|
729
|
+
]);
|
|
730
|
+
|
|
731
|
+
const depositTransactionTypeSchema = z.enum([
|
|
732
|
+
"charged",
|
|
733
|
+
"refunded",
|
|
734
|
+
"forfeited",
|
|
735
|
+
"waived",
|
|
736
|
+
"credit_used"
|
|
737
|
+
]);
|
|
738
|
+
|
|
739
|
+
const depositwareStatusSchema = z.enum([
|
|
740
|
+
"available",
|
|
741
|
+
"issued",
|
|
742
|
+
"returned",
|
|
743
|
+
"lost",
|
|
744
|
+
"damaged",
|
|
745
|
+
"retired"
|
|
746
|
+
]);
|
|
747
|
+
|
|
325
748
|
const editArticleRequestSchema = z.object({
|
|
326
749
|
slug: z.optional(z.object({}).catchall(z.any())),
|
|
327
750
|
title: z.optional(z.object({}).catchall(z.any())),
|
|
@@ -367,7 +790,9 @@ const editArticleResponseSchema = z.object({
|
|
|
367
790
|
isActive: z.boolean(),
|
|
368
791
|
isFeatured: z.boolean(),
|
|
369
792
|
priority: z.int().min(-2147483648).max(2147483647),
|
|
370
|
-
status
|
|
793
|
+
get status() {
|
|
794
|
+
return articleStatusSchema;
|
|
795
|
+
},
|
|
371
796
|
publishedAt: z.nullable(z.string()),
|
|
372
797
|
createdAt: z.nullable(z.string()),
|
|
373
798
|
updatedAt: z.nullable(z.string()),
|
|
@@ -381,6 +806,20 @@ const editArticleResponseSchema = z.object({
|
|
|
381
806
|
"A venue's article. `content` is a TipTap JSON document; treat it as opaque on the wire. `featureImage` is resolved per-locale with a fallback to the venue's primary locale. `ogImage` overrides the social-card image when set; `null` means it falls back to `featureImage`."
|
|
382
807
|
);
|
|
383
808
|
|
|
809
|
+
const entityOwnerTypeSchema = z.enum([
|
|
810
|
+
"event",
|
|
811
|
+
"dish",
|
|
812
|
+
"beverage",
|
|
813
|
+
"venue",
|
|
814
|
+
"menu",
|
|
815
|
+
"menuSubscription",
|
|
816
|
+
"ritual"
|
|
817
|
+
]);
|
|
818
|
+
|
|
819
|
+
const enumFalseSchema = z.enum(["false"]);
|
|
820
|
+
|
|
821
|
+
const enumTrueSchema = z.enum(["true"]);
|
|
822
|
+
|
|
384
823
|
const extendDeadlineTeamOrderRequestSchema = z.object({
|
|
385
824
|
publicId: z.string().min(1),
|
|
386
825
|
sessionId: z.string().min(1),
|
|
@@ -395,6 +834,124 @@ const extendDeadlineTeamOrderResponseSchema = z.object({
|
|
|
395
834
|
deadlineAt: z.nullable(z.iso.datetime())
|
|
396
835
|
});
|
|
397
836
|
|
|
837
|
+
const featureCategorySchema = z.enum([
|
|
838
|
+
"articles",
|
|
839
|
+
"auth",
|
|
840
|
+
"billing",
|
|
841
|
+
"core",
|
|
842
|
+
"customers",
|
|
843
|
+
"events",
|
|
844
|
+
"inventory",
|
|
845
|
+
"menus",
|
|
846
|
+
"orders",
|
|
847
|
+
"platform",
|
|
848
|
+
"promotions",
|
|
849
|
+
"reservations",
|
|
850
|
+
"settings",
|
|
851
|
+
"venues"
|
|
852
|
+
]);
|
|
853
|
+
|
|
854
|
+
const featureStatusSchema = z.enum([
|
|
855
|
+
"backlog",
|
|
856
|
+
"in_development",
|
|
857
|
+
"released"
|
|
858
|
+
]);
|
|
859
|
+
|
|
860
|
+
const fetchAreaBookingsResponseSchema = z.array(
|
|
861
|
+
z.object({
|
|
862
|
+
id: z.string(),
|
|
863
|
+
areaId: z.string(),
|
|
864
|
+
bookingDate: z.string(),
|
|
865
|
+
startTime: z.nullable(z.string()),
|
|
866
|
+
endTime: z.nullable(z.string()),
|
|
867
|
+
partySize: z.int().min(-9007199254740991).max(9007199254740991),
|
|
868
|
+
get status() {
|
|
869
|
+
return areaBookingStatusSchema;
|
|
870
|
+
},
|
|
871
|
+
customerFirstName: z.optional(z.string()),
|
|
872
|
+
customerLastName: z.optional(z.string()),
|
|
873
|
+
totalPrice: z.optional(
|
|
874
|
+
z.int().min(-9007199254740991).max(9007199254740991)
|
|
875
|
+
),
|
|
876
|
+
get currency() {
|
|
877
|
+
return currencySchema.optional();
|
|
878
|
+
},
|
|
879
|
+
confirmationCode: z.string().nullish()
|
|
880
|
+
})
|
|
881
|
+
);
|
|
882
|
+
|
|
883
|
+
const fetchAreaResponseSchema = z.object({
|
|
884
|
+
id: z.string(),
|
|
885
|
+
venueId: z.string(),
|
|
886
|
+
accessor: z.string(),
|
|
887
|
+
name: z.object({}).catchall(z.string()),
|
|
888
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
889
|
+
longDescription: z.nullable(z.object({}).catchall(z.string())),
|
|
890
|
+
minCapacity: z.nullable(
|
|
891
|
+
z.int().min(-9007199254740991).max(9007199254740991)
|
|
892
|
+
),
|
|
893
|
+
maxCapacity: z.int().min(-9007199254740991).max(9007199254740991),
|
|
894
|
+
get currency() {
|
|
895
|
+
return currencySchema;
|
|
896
|
+
},
|
|
897
|
+
basePrice: z.nullable(z.int().min(-9007199254740991).max(9007199254740991)),
|
|
898
|
+
perPersonPrice: z.nullable(
|
|
899
|
+
z.int().min(-9007199254740991).max(9007199254740991)
|
|
900
|
+
),
|
|
901
|
+
features: z.nullable(
|
|
902
|
+
z.array(
|
|
903
|
+
z.object({
|
|
904
|
+
icon: z.string(),
|
|
905
|
+
label: z.object({}).catchall(z.string()),
|
|
906
|
+
description: z.optional(z.object({}).catchall(z.string()))
|
|
907
|
+
})
|
|
908
|
+
)
|
|
909
|
+
),
|
|
910
|
+
get bookingMode() {
|
|
911
|
+
return areaBookingModeSchema;
|
|
912
|
+
},
|
|
913
|
+
isBookable: z.optional(z.boolean()),
|
|
914
|
+
isPublic: z.optional(z.boolean()),
|
|
915
|
+
isActive: z.optional(z.boolean()),
|
|
916
|
+
assets: z.optional(
|
|
917
|
+
z.array(
|
|
918
|
+
z.object({
|
|
919
|
+
id: z.string(),
|
|
920
|
+
get type() {
|
|
921
|
+
return assetTypeSchema;
|
|
922
|
+
},
|
|
923
|
+
tags: z.nullable(z.array(z.string())),
|
|
924
|
+
filename: z.string(),
|
|
925
|
+
contentType: z.string(),
|
|
926
|
+
metadata: z.nullable(
|
|
927
|
+
z.object({
|
|
928
|
+
width: z.optional(z.number()),
|
|
929
|
+
height: z.optional(z.number()),
|
|
930
|
+
duration: z.optional(z.number())
|
|
931
|
+
})
|
|
932
|
+
),
|
|
933
|
+
cropArea: z.nullable(
|
|
934
|
+
z.object({
|
|
935
|
+
x: z.number(),
|
|
936
|
+
y: z.number(),
|
|
937
|
+
width: z.number(),
|
|
938
|
+
height: z.number()
|
|
939
|
+
})
|
|
940
|
+
),
|
|
941
|
+
publicUrl: z.url()
|
|
942
|
+
})
|
|
943
|
+
)
|
|
944
|
+
)
|
|
945
|
+
}).describe(
|
|
946
|
+
"A bookable + public area for a venue. Assets are only included when the request expands them. Operational flags (`isActive`, `isPublic`, `isBookable`) and audit columns are only populated for authenticated venue staff."
|
|
947
|
+
);
|
|
948
|
+
|
|
949
|
+
const fetchAreasResponseSchema = z.array(
|
|
950
|
+
z.lazy(() => areaSchema).describe(
|
|
951
|
+
"A bookable + public area for a venue. Assets are only included when the request expands them. Operational flags (`isActive`, `isPublic`, `isBookable`) and audit columns are only populated for authenticated venue staff."
|
|
952
|
+
)
|
|
953
|
+
);
|
|
954
|
+
|
|
398
955
|
const fetchArticleResponseSchema = z.object({
|
|
399
956
|
id: z.string(),
|
|
400
957
|
venueId: z.string(),
|
|
@@ -409,7 +966,9 @@ const fetchArticleResponseSchema = z.object({
|
|
|
409
966
|
isActive: z.boolean(),
|
|
410
967
|
isFeatured: z.boolean(),
|
|
411
968
|
priority: z.int().min(-2147483648).max(2147483647),
|
|
412
|
-
status
|
|
969
|
+
get status() {
|
|
970
|
+
return articleStatusSchema;
|
|
971
|
+
},
|
|
413
972
|
publishedAt: z.nullable(z.string()),
|
|
414
973
|
createdAt: z.nullable(z.string()),
|
|
415
974
|
updatedAt: z.nullable(z.string()),
|
|
@@ -438,7 +997,9 @@ const fetchArticlesResponseSchema = z.array(
|
|
|
438
997
|
isActive: z.boolean(),
|
|
439
998
|
isFeatured: z.boolean(),
|
|
440
999
|
priority: z.int().min(-2147483648).max(2147483647),
|
|
441
|
-
status
|
|
1000
|
+
get status() {
|
|
1001
|
+
return articleStatusSchema;
|
|
1002
|
+
},
|
|
442
1003
|
publishedAt: z.nullable(z.string()),
|
|
443
1004
|
createdAt: z.nullable(z.string()),
|
|
444
1005
|
updatedAt: z.nullable(z.string()),
|
|
@@ -454,22 +1015,424 @@ const fetchArticlesResponseSchema = z.array(
|
|
|
454
1015
|
})
|
|
455
1016
|
);
|
|
456
1017
|
|
|
1018
|
+
const fetchBasketResponseSchema = z.object({
|
|
1019
|
+
id: z.uuid(),
|
|
1020
|
+
sessionId: z.string(),
|
|
1021
|
+
get status() {
|
|
1022
|
+
return basketStatusSchema;
|
|
1023
|
+
},
|
|
1024
|
+
get currency() {
|
|
1025
|
+
return currencySchema;
|
|
1026
|
+
},
|
|
1027
|
+
items: z.array(
|
|
1028
|
+
z.object({
|
|
1029
|
+
id: z.uuid(),
|
|
1030
|
+
metadata: z.nullable(z.object({}).catchall(z.any())),
|
|
1031
|
+
deposit: z.nullable(
|
|
1032
|
+
z.object({
|
|
1033
|
+
depositwareTemplateId: z.string(),
|
|
1034
|
+
name: z.object({}).catchall(z.string()),
|
|
1035
|
+
amount: z.int().min(0).max(9007199254740991),
|
|
1036
|
+
get currency() {
|
|
1037
|
+
return currencySchema;
|
|
1038
|
+
}
|
|
1039
|
+
})
|
|
1040
|
+
),
|
|
1041
|
+
menuItems: z.array(
|
|
1042
|
+
z.object({
|
|
1043
|
+
menuItemId: z.string(),
|
|
1044
|
+
role: z.nullable(z.string()),
|
|
1045
|
+
quantity: z.number().gt(0),
|
|
1046
|
+
get unit() {
|
|
1047
|
+
return unitSchema;
|
|
1048
|
+
}
|
|
1049
|
+
})
|
|
1050
|
+
)
|
|
1051
|
+
})
|
|
1052
|
+
),
|
|
1053
|
+
itemCount: z.int().min(0).max(9007199254740991),
|
|
1054
|
+
get totals() {
|
|
1055
|
+
return basketTotalsSchema;
|
|
1056
|
+
},
|
|
1057
|
+
declaredReturns: z.array(
|
|
1058
|
+
z.object({
|
|
1059
|
+
depositwareTemplateId: z.string(),
|
|
1060
|
+
count: z.int().min(0).max(9007199254740991)
|
|
1061
|
+
})
|
|
1062
|
+
),
|
|
1063
|
+
expiresAt: z.string(),
|
|
1064
|
+
createdAt: z.nullable(z.string()),
|
|
1065
|
+
updatedAt: z.nullable(z.string())
|
|
1066
|
+
});
|
|
1067
|
+
|
|
457
1068
|
const fetchEventResponseSchema = z.object({
|
|
458
1069
|
id: z.string(),
|
|
459
1070
|
venueId: z.string(),
|
|
460
1071
|
accessor: z.nullable(z.string()),
|
|
461
|
-
name: z.object({}).catchall(z.string())
|
|
462
|
-
}).catchall(z.
|
|
1072
|
+
name: z.object({}).catchall(z.string()),
|
|
1073
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1074
|
+
scheduleId: z.nullable(z.string()),
|
|
1075
|
+
maxBookings: z.nullable(z.number()),
|
|
1076
|
+
maxGuests: z.nullable(z.number()),
|
|
1077
|
+
minPartySize: z.nullable(z.number()),
|
|
1078
|
+
maxPartySize: z.nullable(z.number()),
|
|
1079
|
+
isPublic: z.boolean(),
|
|
1080
|
+
isRecurring: z.boolean(),
|
|
1081
|
+
reservationsEnabled: z.boolean(),
|
|
1082
|
+
bookingOpensAtDays: z.nullable(z.number()),
|
|
1083
|
+
bookingClosesAtOffset: z.nullable(z.number()),
|
|
1084
|
+
isActive: z.boolean(),
|
|
1085
|
+
isFeatured: z.boolean(),
|
|
1086
|
+
priority: z.number(),
|
|
1087
|
+
createdAt: z.nullable(z.any()),
|
|
1088
|
+
updatedAt: z.nullable(z.any()),
|
|
1089
|
+
nextOccurrence: z.string().nullish(),
|
|
1090
|
+
schedule: z.optional(
|
|
1091
|
+
z.object({
|
|
1092
|
+
id: z.string(),
|
|
1093
|
+
name: z.object({}).catchall(z.string()),
|
|
1094
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1095
|
+
timezone: z.string(),
|
|
1096
|
+
rrule: z.nullable(z.string()),
|
|
1097
|
+
exdates: z.nullable(z.array(z.string())),
|
|
1098
|
+
validFrom: z.nullable(z.string()),
|
|
1099
|
+
validTo: z.nullable(z.string()),
|
|
1100
|
+
priority: z.nullable(z.number()),
|
|
1101
|
+
isActive: z.boolean(),
|
|
1102
|
+
get slotMode() {
|
|
1103
|
+
return slotModeSchema;
|
|
1104
|
+
},
|
|
1105
|
+
intervalDuration: z.nullable(z.number()),
|
|
1106
|
+
duration: z.nullable(z.number()),
|
|
1107
|
+
scheduleTimeSlots: z.optional(
|
|
1108
|
+
z.array(
|
|
1109
|
+
z.object({
|
|
1110
|
+
get dayOfWeek() {
|
|
1111
|
+
return dayOfWeekSchema;
|
|
1112
|
+
},
|
|
1113
|
+
timeSlot: z.object({
|
|
1114
|
+
id: z.string(),
|
|
1115
|
+
startTime: z.string(),
|
|
1116
|
+
endTime: z.nullable(z.string()),
|
|
1117
|
+
isActive: z.nullable(z.boolean()),
|
|
1118
|
+
isSchedulable: z.nullable(z.boolean())
|
|
1119
|
+
})
|
|
1120
|
+
})
|
|
1121
|
+
)
|
|
1122
|
+
)
|
|
1123
|
+
})
|
|
1124
|
+
),
|
|
1125
|
+
menus: z.optional(
|
|
1126
|
+
z.array(
|
|
1127
|
+
z.object({
|
|
1128
|
+
id: z.string(),
|
|
1129
|
+
accessor: z.string(),
|
|
1130
|
+
name: z.object({}).catchall(z.string()),
|
|
1131
|
+
category: z.string()
|
|
1132
|
+
})
|
|
1133
|
+
)
|
|
1134
|
+
),
|
|
1135
|
+
posters: z.optional(
|
|
1136
|
+
z.array(
|
|
1137
|
+
z.object({
|
|
1138
|
+
id: z.string(),
|
|
1139
|
+
bucket: z.string(),
|
|
1140
|
+
storagePath: z.string(),
|
|
1141
|
+
filename: z.string(),
|
|
1142
|
+
contentType: z.string(),
|
|
1143
|
+
sizeBytes: z.number(),
|
|
1144
|
+
sortIndex: z.nullable(z.string()),
|
|
1145
|
+
publicUrl: z.string()
|
|
1146
|
+
})
|
|
1147
|
+
)
|
|
1148
|
+
)
|
|
1149
|
+
}).describe(
|
|
463
1150
|
"Event details. Nested objects (schedule, timeSlots, menus, posters, nextOccurrence) pass through; their shape follows the SDK Event interface."
|
|
464
1151
|
);
|
|
465
1152
|
|
|
1153
|
+
const promotionBenefitTypeSchema = z.enum([
|
|
1154
|
+
"free_item",
|
|
1155
|
+
"discount_percentage",
|
|
1156
|
+
"discount_amount",
|
|
1157
|
+
"buy_x_get_y"
|
|
1158
|
+
]);
|
|
1159
|
+
|
|
466
1160
|
const fetchEventsResponseSchema = z.array(
|
|
467
1161
|
z.object({
|
|
468
1162
|
id: z.string(),
|
|
469
|
-
venueId: z.string()
|
|
470
|
-
|
|
1163
|
+
venueId: z.string(),
|
|
1164
|
+
accessor: z.nullable(z.string()),
|
|
1165
|
+
name: z.object({}).catchall(z.string()),
|
|
1166
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1167
|
+
scheduleId: z.nullable(z.string()),
|
|
1168
|
+
ritualId: z.nullable(z.string()),
|
|
1169
|
+
maxBookings: z.nullable(z.number()),
|
|
1170
|
+
maxGuests: z.nullable(z.number()),
|
|
1171
|
+
minPartySize: z.nullable(z.number()),
|
|
1172
|
+
maxPartySize: z.nullable(z.number()),
|
|
1173
|
+
isPublic: z.boolean(),
|
|
1174
|
+
isRecurring: z.boolean(),
|
|
1175
|
+
reservationsEnabled: z.boolean(),
|
|
1176
|
+
bookingOpensAtDays: z.nullable(z.number()),
|
|
1177
|
+
bookingClosesAtOffset: z.nullable(z.number()),
|
|
1178
|
+
isActive: z.boolean(),
|
|
1179
|
+
isFeatured: z.boolean(),
|
|
1180
|
+
priority: z.number(),
|
|
1181
|
+
createdBy: z.nullable(z.string()),
|
|
1182
|
+
updatedBy: z.nullable(z.string()),
|
|
1183
|
+
createdAt: z.nullable(z.any()),
|
|
1184
|
+
updatedAt: z.nullable(z.any()),
|
|
1185
|
+
schedule: z.nullable(
|
|
1186
|
+
z.object({
|
|
1187
|
+
id: z.string(),
|
|
1188
|
+
duration: z.nullable(z.number()),
|
|
1189
|
+
name: z.object({}).catchall(z.string()),
|
|
1190
|
+
timezone: z.string(),
|
|
1191
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1192
|
+
rrule: z.nullable(z.string()),
|
|
1193
|
+
exdates: z.nullable(z.array(z.string())),
|
|
1194
|
+
validFrom: z.nullable(z.string()),
|
|
1195
|
+
validTo: z.nullable(z.string()),
|
|
1196
|
+
priority: z.nullable(z.number()),
|
|
1197
|
+
get slotMode() {
|
|
1198
|
+
return slotModeSchema;
|
|
1199
|
+
},
|
|
1200
|
+
intervalDuration: z.nullable(z.number()),
|
|
1201
|
+
isActive: z.boolean(),
|
|
1202
|
+
sortIndex: z.nullable(z.string()),
|
|
1203
|
+
updatedAt: z.nullable(z.any()),
|
|
1204
|
+
updatedBy: z.nullable(z.string()),
|
|
1205
|
+
createdAt: z.nullable(z.any()),
|
|
1206
|
+
createdBy: z.nullable(z.string()),
|
|
1207
|
+
scheduleOverrides: z.array(
|
|
1208
|
+
z.object({
|
|
1209
|
+
id: z.string(),
|
|
1210
|
+
date: z.string(),
|
|
1211
|
+
priority: z.nullable(z.number()),
|
|
1212
|
+
isActive: z.boolean(),
|
|
1213
|
+
updatedAt: z.nullable(z.any()),
|
|
1214
|
+
updatedBy: z.nullable(z.string()),
|
|
1215
|
+
createdAt: z.nullable(z.any()),
|
|
1216
|
+
createdBy: z.nullable(z.string()),
|
|
1217
|
+
scheduleId: z.string(),
|
|
1218
|
+
reason: z.nullable(z.object({}).catchall(z.string())),
|
|
1219
|
+
scheduleOverrideTimeSlots: z.array(
|
|
1220
|
+
z.object({
|
|
1221
|
+
sortIndex: z.nullable(z.string()),
|
|
1222
|
+
overrideId: z.string(),
|
|
1223
|
+
timeSlotId: z.string(),
|
|
1224
|
+
timeSlot: z.object({
|
|
1225
|
+
id: z.string(),
|
|
1226
|
+
isActive: z.nullable(z.boolean()),
|
|
1227
|
+
sortIndex: z.nullable(z.string()),
|
|
1228
|
+
updatedAt: z.nullable(z.any()),
|
|
1229
|
+
updatedBy: z.nullable(z.string()),
|
|
1230
|
+
createdAt: z.nullable(z.any()),
|
|
1231
|
+
createdBy: z.nullable(z.string()),
|
|
1232
|
+
startTime: z.string(),
|
|
1233
|
+
endTime: z.nullable(z.string()),
|
|
1234
|
+
isSchedulable: z.nullable(z.boolean())
|
|
1235
|
+
})
|
|
1236
|
+
})
|
|
1237
|
+
)
|
|
1238
|
+
})
|
|
1239
|
+
),
|
|
1240
|
+
scheduleTimeSlots: z.array(
|
|
1241
|
+
z.object({
|
|
1242
|
+
sortIndex: z.nullable(z.string()),
|
|
1243
|
+
scheduleId: z.nullable(z.string()),
|
|
1244
|
+
timeSlotId: z.nullable(z.string()),
|
|
1245
|
+
get dayOfWeek() {
|
|
1246
|
+
return dayOfWeekSchema;
|
|
1247
|
+
},
|
|
1248
|
+
timeSlot: z.nullable(
|
|
1249
|
+
z.object({
|
|
1250
|
+
id: z.string(),
|
|
1251
|
+
isActive: z.nullable(z.boolean()),
|
|
1252
|
+
sortIndex: z.nullable(z.string()),
|
|
1253
|
+
updatedAt: z.nullable(z.any()),
|
|
1254
|
+
updatedBy: z.nullable(z.string()),
|
|
1255
|
+
createdAt: z.nullable(z.any()),
|
|
1256
|
+
createdBy: z.nullable(z.string()),
|
|
1257
|
+
startTime: z.string(),
|
|
1258
|
+
endTime: z.nullable(z.string()),
|
|
1259
|
+
isSchedulable: z.nullable(z.boolean())
|
|
1260
|
+
})
|
|
1261
|
+
)
|
|
1262
|
+
})
|
|
1263
|
+
)
|
|
1264
|
+
})
|
|
1265
|
+
),
|
|
1266
|
+
nextOccurrence: z.nullable(z.string()),
|
|
1267
|
+
posters: z.array(
|
|
1268
|
+
z.object({
|
|
1269
|
+
id: z.string(),
|
|
1270
|
+
get type() {
|
|
1271
|
+
return assetTypeSchema;
|
|
1272
|
+
},
|
|
1273
|
+
metadata: z.nullable(
|
|
1274
|
+
z.object({
|
|
1275
|
+
width: z.optional(z.number()),
|
|
1276
|
+
height: z.optional(z.number()),
|
|
1277
|
+
duration: z.optional(z.number())
|
|
1278
|
+
})
|
|
1279
|
+
),
|
|
1280
|
+
isActive: z.boolean(),
|
|
1281
|
+
sortIndex: z.nullable(z.string()),
|
|
1282
|
+
updatedAt: z.nullable(z.any()),
|
|
1283
|
+
updatedBy: z.nullable(z.string()),
|
|
1284
|
+
createdAt: z.nullable(z.any()),
|
|
1285
|
+
createdBy: z.nullable(z.string()),
|
|
1286
|
+
venueId: z.nullable(z.string()),
|
|
1287
|
+
tags: z.nullable(z.array(z.string())),
|
|
1288
|
+
bucket: z.string(),
|
|
1289
|
+
storagePath: z.string(),
|
|
1290
|
+
filename: z.string(),
|
|
1291
|
+
contentType: z.string(),
|
|
1292
|
+
sizeBytes: z.number(),
|
|
1293
|
+
caption: z.object({}).catchall(z.any()),
|
|
1294
|
+
alt: z.object({}).catchall(z.any()),
|
|
1295
|
+
cropArea: z.nullable(
|
|
1296
|
+
z.object({
|
|
1297
|
+
x: z.number(),
|
|
1298
|
+
y: z.number(),
|
|
1299
|
+
width: z.number(),
|
|
1300
|
+
height: z.number()
|
|
1301
|
+
})
|
|
1302
|
+
),
|
|
1303
|
+
publicUrl: z.string()
|
|
1304
|
+
})
|
|
1305
|
+
),
|
|
1306
|
+
timeSlots: z.array(
|
|
1307
|
+
z.object({
|
|
1308
|
+
id: z.optional(z.string()),
|
|
1309
|
+
startTime: z.optional(z.string()),
|
|
1310
|
+
endTime: z.string().nullish(),
|
|
1311
|
+
get dayOfWeek() {
|
|
1312
|
+
return dayOfWeekSchema.optional();
|
|
1313
|
+
},
|
|
1314
|
+
isSchedulable: z.boolean().nullish()
|
|
1315
|
+
})
|
|
1316
|
+
),
|
|
1317
|
+
scheduleOverrides: z.array(
|
|
1318
|
+
z.object({
|
|
1319
|
+
id: z.string(),
|
|
1320
|
+
date: z.string(),
|
|
1321
|
+
reason: z.nullable(z.object({}).catchall(z.string())),
|
|
1322
|
+
timeSlots: z.array(
|
|
1323
|
+
z.object({
|
|
1324
|
+
id: z.optional(z.string()),
|
|
1325
|
+
startTime: z.optional(z.string()),
|
|
1326
|
+
endTime: z.string().nullish(),
|
|
1327
|
+
get dayOfWeek() {
|
|
1328
|
+
return dayOfWeekSchema.optional();
|
|
1329
|
+
},
|
|
1330
|
+
isSchedulable: z.boolean().nullish()
|
|
1331
|
+
})
|
|
1332
|
+
)
|
|
1333
|
+
})
|
|
1334
|
+
),
|
|
1335
|
+
promotions: z.array(
|
|
1336
|
+
z.object({
|
|
1337
|
+
id: z.string(),
|
|
1338
|
+
name: z.object({}).catchall(z.string()),
|
|
1339
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1340
|
+
validFrom: z.nullable(z.string()),
|
|
1341
|
+
validTo: z.nullable(z.string()),
|
|
1342
|
+
isActive: z.boolean(),
|
|
1343
|
+
updatedAt: z.nullable(z.any()),
|
|
1344
|
+
updatedBy: z.nullable(z.string()),
|
|
1345
|
+
createdAt: z.nullable(z.any()),
|
|
1346
|
+
createdBy: z.nullable(z.string()),
|
|
1347
|
+
venueId: z.string(),
|
|
1348
|
+
get benefitType() {
|
|
1349
|
+
return promotionBenefitTypeSchema;
|
|
1350
|
+
},
|
|
1351
|
+
benefitValue: z.object({}).catchall(z.any()),
|
|
1352
|
+
conditions: z.nullable(z.object({}).catchall(z.any())),
|
|
1353
|
+
maxRedemptions: z.nullable(z.number()),
|
|
1354
|
+
currentRedemptions: z.nullable(z.number()),
|
|
1355
|
+
timeSlotIds: z.nullable(z.array(z.string()))
|
|
1356
|
+
})
|
|
1357
|
+
)
|
|
1358
|
+
})
|
|
471
1359
|
);
|
|
472
1360
|
|
|
1361
|
+
const orderStatusSchema = z.enum([
|
|
1362
|
+
"pending",
|
|
1363
|
+
"in_progress",
|
|
1364
|
+
"ready",
|
|
1365
|
+
"completed",
|
|
1366
|
+
"cancelled"
|
|
1367
|
+
]);
|
|
1368
|
+
|
|
1369
|
+
const paymentStatusSchema = z.enum([
|
|
1370
|
+
"unpaid",
|
|
1371
|
+
"paid",
|
|
1372
|
+
"refunded",
|
|
1373
|
+
"authorized",
|
|
1374
|
+
"cash_pending"
|
|
1375
|
+
]);
|
|
1376
|
+
|
|
1377
|
+
const fetchLatestOrderResponseSchema = z.object({
|
|
1378
|
+
id: z.uuid(),
|
|
1379
|
+
publicId: z.nullable(z.string()),
|
|
1380
|
+
quickReferenceNumber: z.nullable(
|
|
1381
|
+
z.int().min(-9007199254740991).max(9007199254740991)
|
|
1382
|
+
),
|
|
1383
|
+
get status() {
|
|
1384
|
+
return orderStatusSchema;
|
|
1385
|
+
},
|
|
1386
|
+
get paymentStatus() {
|
|
1387
|
+
return paymentStatusSchema;
|
|
1388
|
+
},
|
|
1389
|
+
get fulfillmentType() {
|
|
1390
|
+
return fulfillmentTypeSchema;
|
|
1391
|
+
},
|
|
1392
|
+
fulfillmentAt: z.nullable(z.string()),
|
|
1393
|
+
orderedAt: z.string(),
|
|
1394
|
+
totalAmount: z.int().min(0).max(9007199254740991),
|
|
1395
|
+
get currency() {
|
|
1396
|
+
return currencySchema;
|
|
1397
|
+
},
|
|
1398
|
+
items: z.array(
|
|
1399
|
+
z.object({
|
|
1400
|
+
id: z.uuid(),
|
|
1401
|
+
metadata: z.nullable(z.object({}).catchall(z.any())),
|
|
1402
|
+
deposit: z.nullable(
|
|
1403
|
+
z.object({
|
|
1404
|
+
depositwareTemplateId: z.string(),
|
|
1405
|
+
name: z.object({}).catchall(z.string()),
|
|
1406
|
+
amount: z.int().min(0).max(9007199254740991),
|
|
1407
|
+
get currency() {
|
|
1408
|
+
return currencySchema;
|
|
1409
|
+
}
|
|
1410
|
+
})
|
|
1411
|
+
),
|
|
1412
|
+
menuItems: z.array(
|
|
1413
|
+
z.object({
|
|
1414
|
+
menuItemId: z.string(),
|
|
1415
|
+
role: z.nullable(z.string()),
|
|
1416
|
+
quantity: z.number().gt(0),
|
|
1417
|
+
get unit() {
|
|
1418
|
+
return unitSchema;
|
|
1419
|
+
}
|
|
1420
|
+
})
|
|
1421
|
+
)
|
|
1422
|
+
})
|
|
1423
|
+
),
|
|
1424
|
+
itemCount: z.int().min(0).max(9007199254740991),
|
|
1425
|
+
get totals() {
|
|
1426
|
+
return basketTotalsSchema;
|
|
1427
|
+
},
|
|
1428
|
+
declaredReturns: z.array(
|
|
1429
|
+
z.object({
|
|
1430
|
+
depositwareTemplateId: z.string(),
|
|
1431
|
+
count: z.int().min(0).max(9007199254740991)
|
|
1432
|
+
})
|
|
1433
|
+
)
|
|
1434
|
+
});
|
|
1435
|
+
|
|
473
1436
|
const fetchMenuBundlesResponseSchema = z.array(
|
|
474
1437
|
z.object({
|
|
475
1438
|
id: z.string(),
|
|
@@ -480,9 +1443,13 @@ const fetchMenuBundlesResponseSchema = z.array(
|
|
|
480
1443
|
tags: z.array(z.string()),
|
|
481
1444
|
price: z.object({
|
|
482
1445
|
amount: z.number(),
|
|
483
|
-
currency
|
|
1446
|
+
get currency() {
|
|
1447
|
+
return currencySchema;
|
|
1448
|
+
}
|
|
484
1449
|
}),
|
|
485
|
-
currency
|
|
1450
|
+
get currency() {
|
|
1451
|
+
return currencySchema;
|
|
1452
|
+
},
|
|
486
1453
|
taxRateId: z.string(),
|
|
487
1454
|
isActive: z.boolean(),
|
|
488
1455
|
sortIndex: z.nullable(z.string()),
|
|
@@ -494,98 +1461,213 @@ const fetchMenuBundlesResponseSchema = z.array(
|
|
|
494
1461
|
),
|
|
495
1462
|
deposit: z.nullable(
|
|
496
1463
|
z.object({
|
|
1464
|
+
depositwareTemplateId: z.string(),
|
|
1465
|
+
accessor: z.string(),
|
|
497
1466
|
amount: z.number(),
|
|
498
|
-
currency
|
|
1467
|
+
get currency() {
|
|
1468
|
+
return currencySchema;
|
|
1469
|
+
}
|
|
499
1470
|
})
|
|
500
1471
|
)
|
|
501
|
-
})
|
|
1472
|
+
})
|
|
502
1473
|
);
|
|
503
1474
|
|
|
1475
|
+
const menuItemTypeSchema = z.enum(["dish", "beverage"]);
|
|
1476
|
+
|
|
504
1477
|
const fetchMenuResponseSchema = z.object({
|
|
505
1478
|
id: z.string(),
|
|
506
|
-
|
|
1479
|
+
name: z.object({}).catchall(z.string()),
|
|
507
1480
|
accessor: z.string(),
|
|
508
|
-
name: z.union([
|
|
509
|
-
z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
|
|
510
|
-
z.array(z.any()),
|
|
511
|
-
z.object({}).catchall(z.any())
|
|
512
|
-
]),
|
|
513
|
-
description: z.nullable(
|
|
514
|
-
z.union([
|
|
515
|
-
z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
|
|
516
|
-
z.array(z.any()),
|
|
517
|
-
z.object({}).catchall(z.any())
|
|
518
|
-
])
|
|
519
|
-
),
|
|
520
1481
|
metadata: z.nullable(
|
|
521
|
-
z.
|
|
522
|
-
z.
|
|
523
|
-
z.array(z.
|
|
524
|
-
z.
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
),
|
|
531
|
-
deliveryThresholdQuantity: z.nullable(
|
|
532
|
-
z.int().min(-2147483648).max(2147483647)
|
|
1482
|
+
z.object({
|
|
1483
|
+
orderingEnabled: z.optional(z.boolean()),
|
|
1484
|
+
compactTags: z.optional(z.array(z.string())),
|
|
1485
|
+
showDepositware: z.optional(z.boolean()),
|
|
1486
|
+
tagSortOrder: z.optional(z.array(z.string())),
|
|
1487
|
+
subscriptionsEnabled: z.optional(z.boolean()),
|
|
1488
|
+
isDeliveryEnabled: z.optional(z.boolean()),
|
|
1489
|
+
assetsEnabled: z.optional(z.boolean())
|
|
1490
|
+
})
|
|
533
1491
|
),
|
|
534
|
-
|
|
1492
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1493
|
+
sortIndex: z.nullable(z.string()),
|
|
535
1494
|
updatedAt: z.nullable(z.any()),
|
|
536
|
-
createdBy: z.nullable(z.string()),
|
|
537
1495
|
updatedBy: z.nullable(z.string()),
|
|
538
|
-
|
|
1496
|
+
createdAt: z.nullable(z.any()),
|
|
1497
|
+
createdBy: z.nullable(z.string()),
|
|
1498
|
+
venueId: z.string(),
|
|
1499
|
+
deliveryThresholdAmount: z.nullable(z.number()),
|
|
1500
|
+
deliveryThresholdQuantity: z.nullable(z.number()),
|
|
1501
|
+
assets: z.array(
|
|
1502
|
+
z.object({
|
|
1503
|
+
id: z.string(),
|
|
1504
|
+
get type() {
|
|
1505
|
+
return assetTypeSchema;
|
|
1506
|
+
},
|
|
1507
|
+
metadata: z.nullable(
|
|
1508
|
+
z.object({
|
|
1509
|
+
width: z.optional(z.number()),
|
|
1510
|
+
height: z.optional(z.number()),
|
|
1511
|
+
duration: z.optional(z.number())
|
|
1512
|
+
})
|
|
1513
|
+
),
|
|
1514
|
+
isActive: z.boolean(),
|
|
1515
|
+
sortIndex: z.nullable(z.string()),
|
|
1516
|
+
updatedAt: z.nullable(z.any()),
|
|
1517
|
+
updatedBy: z.nullable(z.string()),
|
|
1518
|
+
createdAt: z.nullable(z.any()),
|
|
1519
|
+
createdBy: z.nullable(z.string()),
|
|
1520
|
+
venueId: z.nullable(z.string()),
|
|
1521
|
+
tags: z.nullable(z.array(z.string())),
|
|
1522
|
+
bucket: z.string(),
|
|
1523
|
+
storagePath: z.string(),
|
|
1524
|
+
filename: z.string(),
|
|
1525
|
+
contentType: z.string(),
|
|
1526
|
+
sizeBytes: z.number(),
|
|
1527
|
+
caption: z.object({}).catchall(z.any()),
|
|
1528
|
+
alt: z.object({}).catchall(z.any()),
|
|
1529
|
+
cropArea: z.nullable(
|
|
1530
|
+
z.object({
|
|
1531
|
+
x: z.number(),
|
|
1532
|
+
y: z.number(),
|
|
1533
|
+
width: z.number(),
|
|
1534
|
+
height: z.number()
|
|
1535
|
+
})
|
|
1536
|
+
),
|
|
1537
|
+
publicUrl: z.string()
|
|
1538
|
+
})
|
|
1539
|
+
),
|
|
1540
|
+
items: z.optional(
|
|
539
1541
|
z.array(
|
|
540
1542
|
z.object({
|
|
541
1543
|
id: z.string(),
|
|
542
|
-
type
|
|
1544
|
+
get type() {
|
|
1545
|
+
return menuItemTypeSchema;
|
|
1546
|
+
},
|
|
543
1547
|
tags: z.nullable(z.array(z.string())),
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
sizeBytes: z.int().min(-2147483648).max(2147483647),
|
|
549
|
-
caption: z.union([
|
|
550
|
-
z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
|
|
551
|
-
z.array(z.any()),
|
|
552
|
-
z.object({}).catchall(z.any())
|
|
553
|
-
]),
|
|
554
|
-
alt: z.union([
|
|
555
|
-
z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
|
|
556
|
-
z.array(z.any()),
|
|
557
|
-
z.object({}).catchall(z.any())
|
|
558
|
-
]),
|
|
559
|
-
metadata: z.nullable(
|
|
560
|
-
z.union([
|
|
561
|
-
z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
|
|
562
|
-
z.array(z.any()),
|
|
563
|
-
z.object({}).catchall(z.any())
|
|
564
|
-
])
|
|
565
|
-
),
|
|
566
|
-
cropArea: z.nullable(
|
|
567
|
-
z.union([
|
|
568
|
-
z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
|
|
569
|
-
z.array(z.any()),
|
|
570
|
-
z.object({}).catchall(z.any())
|
|
571
|
-
])
|
|
572
|
-
),
|
|
1548
|
+
priceAdjustment: z.number(),
|
|
1549
|
+
get currency() {
|
|
1550
|
+
return currencySchema;
|
|
1551
|
+
},
|
|
573
1552
|
isActive: z.boolean(),
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
1553
|
+
isFeatured: z.boolean(),
|
|
1554
|
+
sortIndex: z.nullable(z.string()),
|
|
1555
|
+
dish: z.nullable(
|
|
1556
|
+
z.object({
|
|
1557
|
+
id: z.string(),
|
|
1558
|
+
accessor: z.string(),
|
|
1559
|
+
name: z.object({}).catchall(z.string()),
|
|
1560
|
+
shortName: z.optional(z.object({}).catchall(z.string())),
|
|
1561
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1562
|
+
longDescription: z.object({}).catchall(z.string()).nullish(),
|
|
1563
|
+
isVegetarian: z.nullable(z.boolean()),
|
|
1564
|
+
isVegan: z.nullable(z.boolean()),
|
|
1565
|
+
isGlutenFree: z.nullable(z.boolean()),
|
|
1566
|
+
isDairyFree: z.nullable(z.boolean()),
|
|
1567
|
+
spiciness: z.nullable(z.number()),
|
|
1568
|
+
assets: z.optional(
|
|
1569
|
+
z.array(
|
|
1570
|
+
z.object({
|
|
1571
|
+
id: z.string(),
|
|
1572
|
+
get type() {
|
|
1573
|
+
return assetTypeSchema;
|
|
1574
|
+
},
|
|
1575
|
+
metadata: z.nullable(
|
|
1576
|
+
z.object({
|
|
1577
|
+
width: z.optional(z.number()),
|
|
1578
|
+
height: z.optional(z.number()),
|
|
1579
|
+
duration: z.optional(z.number())
|
|
1580
|
+
})
|
|
1581
|
+
),
|
|
1582
|
+
isActive: z.boolean(),
|
|
1583
|
+
sortIndex: z.nullable(z.string()),
|
|
1584
|
+
updatedAt: z.nullable(z.any()),
|
|
1585
|
+
updatedBy: z.nullable(z.string()),
|
|
1586
|
+
createdAt: z.nullable(z.any()),
|
|
1587
|
+
createdBy: z.nullable(z.string()),
|
|
1588
|
+
venueId: z.nullable(z.string()),
|
|
1589
|
+
tags: z.nullable(z.array(z.string())),
|
|
1590
|
+
bucket: z.string(),
|
|
1591
|
+
storagePath: z.string(),
|
|
1592
|
+
filename: z.string(),
|
|
1593
|
+
contentType: z.string(),
|
|
1594
|
+
sizeBytes: z.number(),
|
|
1595
|
+
caption: z.object({}).catchall(z.any()),
|
|
1596
|
+
alt: z.object({}).catchall(z.any()),
|
|
1597
|
+
cropArea: z.nullable(
|
|
1598
|
+
z.object({
|
|
1599
|
+
x: z.number(),
|
|
1600
|
+
y: z.number(),
|
|
1601
|
+
width: z.number(),
|
|
1602
|
+
height: z.number()
|
|
1603
|
+
})
|
|
1604
|
+
),
|
|
1605
|
+
publicUrl: z.string()
|
|
1606
|
+
})
|
|
1607
|
+
)
|
|
1608
|
+
)
|
|
1609
|
+
})
|
|
1610
|
+
),
|
|
1611
|
+
beverage: z.nullable(
|
|
1612
|
+
z.object({
|
|
1613
|
+
id: z.string(),
|
|
1614
|
+
accessor: z.string(),
|
|
1615
|
+
name: z.object({}).catchall(z.string()),
|
|
1616
|
+
shortName: z.optional(z.object({}).catchall(z.string())),
|
|
1617
|
+
description: z.nullable(z.object({}).catchall(z.string())),
|
|
1618
|
+
longDescription: z.object({}).catchall(z.string()).nullish(),
|
|
1619
|
+
assets: z.optional(
|
|
1620
|
+
z.array(
|
|
1621
|
+
z.object({
|
|
1622
|
+
id: z.string(),
|
|
1623
|
+
get type() {
|
|
1624
|
+
return assetTypeSchema;
|
|
1625
|
+
},
|
|
1626
|
+
metadata: z.nullable(
|
|
1627
|
+
z.object({
|
|
1628
|
+
width: z.optional(z.number()),
|
|
1629
|
+
height: z.optional(z.number()),
|
|
1630
|
+
duration: z.optional(z.number())
|
|
1631
|
+
})
|
|
1632
|
+
),
|
|
1633
|
+
isActive: z.boolean(),
|
|
1634
|
+
sortIndex: z.nullable(z.string()),
|
|
1635
|
+
updatedAt: z.nullable(z.any()),
|
|
1636
|
+
updatedBy: z.nullable(z.string()),
|
|
1637
|
+
createdAt: z.nullable(z.any()),
|
|
1638
|
+
createdBy: z.nullable(z.string()),
|
|
1639
|
+
venueId: z.nullable(z.string()),
|
|
1640
|
+
tags: z.nullable(z.array(z.string())),
|
|
1641
|
+
bucket: z.string(),
|
|
1642
|
+
storagePath: z.string(),
|
|
1643
|
+
filename: z.string(),
|
|
1644
|
+
contentType: z.string(),
|
|
1645
|
+
sizeBytes: z.number(),
|
|
1646
|
+
caption: z.object({}).catchall(z.any()),
|
|
1647
|
+
alt: z.object({}).catchall(z.any()),
|
|
1648
|
+
cropArea: z.nullable(
|
|
1649
|
+
z.object({
|
|
1650
|
+
x: z.number(),
|
|
1651
|
+
y: z.number(),
|
|
1652
|
+
width: z.number(),
|
|
1653
|
+
height: z.number()
|
|
1654
|
+
})
|
|
1655
|
+
),
|
|
1656
|
+
publicUrl: z.string()
|
|
1657
|
+
})
|
|
1658
|
+
)
|
|
1659
|
+
)
|
|
1660
|
+
})
|
|
1661
|
+
)
|
|
581
1662
|
})
|
|
582
1663
|
)
|
|
583
|
-
)
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
"Menu details. Nested arrays (items, assets, bundles, schedule, etc.) pass through; their shape follows the SDK Menu interface."
|
|
1664
|
+
)
|
|
1665
|
+
}).describe(
|
|
1666
|
+
"Menu details. `assets[]` is always hydrated with public URLs; `items[]` (with nested dish/beverage) is included when `expand=items` is requested. Each dish/beverage always carries its flat, hydrated `assets[]` (public URLs resolved) \u2014 the raw junction relations are never surfaced."
|
|
587
1667
|
);
|
|
588
1668
|
|
|
1669
|
+
const subscriptionPeriodSchema = z.enum(["week", "month", "year"]);
|
|
1670
|
+
|
|
589
1671
|
const fetchMenuSubscriptionsResponseSchema = z.array(
|
|
590
1672
|
z.object({
|
|
591
1673
|
id: z.string(),
|
|
@@ -596,34 +1678,38 @@ const fetchMenuSubscriptionsResponseSchema = z.array(
|
|
|
596
1678
|
description: z.nullable(z.object({}).catchall(z.string())),
|
|
597
1679
|
scheduleId: z.nullable(z.string()),
|
|
598
1680
|
allowance: z.number(),
|
|
599
|
-
billingPeriod
|
|
600
|
-
|
|
1681
|
+
get billingPeriod() {
|
|
1682
|
+
return subscriptionPeriodSchema;
|
|
1683
|
+
},
|
|
1684
|
+
get allowancePeriod() {
|
|
1685
|
+
return subscriptionPeriodSchema;
|
|
1686
|
+
},
|
|
601
1687
|
expiryInDays: z.number(),
|
|
602
1688
|
price: z.number(),
|
|
603
|
-
currency
|
|
1689
|
+
get currency() {
|
|
1690
|
+
return currencySchema;
|
|
1691
|
+
},
|
|
604
1692
|
stripeProductId: z.nullable(z.string()),
|
|
605
1693
|
stripePriceId: z.nullable(z.string()),
|
|
606
1694
|
isActive: z.boolean(),
|
|
607
1695
|
sortIndex: z.nullable(z.string()),
|
|
608
1696
|
subscriberCount: z.number(),
|
|
609
1697
|
redeemableTagSets: z.array(z.array(z.string())),
|
|
610
|
-
posters: z.
|
|
611
|
-
z.
|
|
612
|
-
z.
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
})
|
|
624
|
-
)
|
|
1698
|
+
posters: z.array(
|
|
1699
|
+
z.object({
|
|
1700
|
+
id: z.string(),
|
|
1701
|
+
menuSubscriptionId: z.string(),
|
|
1702
|
+
storagePath: z.string(),
|
|
1703
|
+
publicUrl: z.string(),
|
|
1704
|
+
filename: z.string(),
|
|
1705
|
+
contentType: z.string(),
|
|
1706
|
+
sizeBytes: z.number(),
|
|
1707
|
+
sortIndex: z.nullable(z.string()),
|
|
1708
|
+
createdBy: z.nullable(z.string()),
|
|
1709
|
+
createdAt: z.nullable(z.string())
|
|
1710
|
+
})
|
|
625
1711
|
)
|
|
626
|
-
})
|
|
1712
|
+
})
|
|
627
1713
|
);
|
|
628
1714
|
|
|
629
1715
|
const fetchTeamOrderResponseSchema = z.object({
|
|
@@ -684,19 +1770,15 @@ const fetchTeamOrderResponseSchema = z.object({
|
|
|
684
1770
|
items: z.array(
|
|
685
1771
|
z.object({
|
|
686
1772
|
id: z.string(),
|
|
687
|
-
metadata: z.nullable(z.any()),
|
|
1773
|
+
metadata: z.nullable(z.object({}).catchall(z.any())),
|
|
688
1774
|
menuItems: z.array(
|
|
689
1775
|
z.object({
|
|
690
1776
|
menuItemId: z.string(),
|
|
691
1777
|
role: z.nullable(z.string()),
|
|
692
1778
|
quantity: z.number(),
|
|
693
|
-
unit
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
"liters",
|
|
697
|
-
"milliliters",
|
|
698
|
-
"pieces"
|
|
699
|
-
])
|
|
1779
|
+
get unit() {
|
|
1780
|
+
return unitSchema;
|
|
1781
|
+
}
|
|
700
1782
|
})
|
|
701
1783
|
),
|
|
702
1784
|
isPaid: z.boolean()
|
|
@@ -752,7 +1834,9 @@ const fetchTeamOrderResponseSchema = z.object({
|
|
|
752
1834
|
const getAreaAvailabilityResponseSchema = z.object({
|
|
753
1835
|
from: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
754
1836
|
to: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
755
|
-
bookingMode
|
|
1837
|
+
get bookingMode() {
|
|
1838
|
+
return areaBookingModeSchema;
|
|
1839
|
+
},
|
|
756
1840
|
occupied: z.array(
|
|
757
1841
|
z.object({
|
|
758
1842
|
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
@@ -762,63 +1846,6 @@ const getAreaAvailabilityResponseSchema = z.object({
|
|
|
762
1846
|
)
|
|
763
1847
|
});
|
|
764
1848
|
|
|
765
|
-
const getAreaResponseSchema = z.object({
|
|
766
|
-
id: z.string(),
|
|
767
|
-
venueId: z.string(),
|
|
768
|
-
accessor: z.string(),
|
|
769
|
-
name: z.object({}).catchall(z.string()),
|
|
770
|
-
description: z.nullable(z.object({}).catchall(z.string())),
|
|
771
|
-
longDescription: z.nullable(z.object({}).catchall(z.string())),
|
|
772
|
-
minCapacity: z.nullable(
|
|
773
|
-
z.int().min(-9007199254740991).max(9007199254740991)
|
|
774
|
-
),
|
|
775
|
-
maxCapacity: z.int().min(-9007199254740991).max(9007199254740991),
|
|
776
|
-
currency: z.enum(["EUR", "CHF"]),
|
|
777
|
-
basePrice: z.nullable(z.int().min(-9007199254740991).max(9007199254740991)),
|
|
778
|
-
perPersonPrice: z.nullable(
|
|
779
|
-
z.int().min(-9007199254740991).max(9007199254740991)
|
|
780
|
-
),
|
|
781
|
-
features: z.nullable(
|
|
782
|
-
z.array(
|
|
783
|
-
z.object({
|
|
784
|
-
icon: z.string(),
|
|
785
|
-
label: z.object({}).catchall(z.string()),
|
|
786
|
-
description: z.optional(z.object({}).catchall(z.string()))
|
|
787
|
-
})
|
|
788
|
-
)
|
|
789
|
-
),
|
|
790
|
-
bookingMode: z.enum(["slot", "day"]),
|
|
791
|
-
assets: z.optional(
|
|
792
|
-
z.array(
|
|
793
|
-
z.object({
|
|
794
|
-
id: z.string(),
|
|
795
|
-
type: z.enum(["image", "video", "document"]),
|
|
796
|
-
tags: z.nullable(z.array(z.string())),
|
|
797
|
-
filename: z.string(),
|
|
798
|
-
contentType: z.string(),
|
|
799
|
-
metadata: z.nullable(
|
|
800
|
-
z.object({
|
|
801
|
-
width: z.optional(z.number()),
|
|
802
|
-
height: z.optional(z.number()),
|
|
803
|
-
duration: z.optional(z.number())
|
|
804
|
-
})
|
|
805
|
-
),
|
|
806
|
-
cropArea: z.nullable(
|
|
807
|
-
z.object({
|
|
808
|
-
x: z.number(),
|
|
809
|
-
y: z.number(),
|
|
810
|
-
width: z.number(),
|
|
811
|
-
height: z.number()
|
|
812
|
-
})
|
|
813
|
-
),
|
|
814
|
-
publicUrl: z.url()
|
|
815
|
-
})
|
|
816
|
-
)
|
|
817
|
-
)
|
|
818
|
-
}).describe(
|
|
819
|
-
"A bookable + public area for a venue. Assets are only included when the request expands them."
|
|
820
|
-
);
|
|
821
|
-
|
|
822
1849
|
const getBasketTotalsRequestSchema = z.object({
|
|
823
1850
|
venueAccessor: z.string().min(1),
|
|
824
1851
|
basketId: z.string().min(1),
|
|
@@ -833,7 +1860,9 @@ const getBasketTotalsRequestSchema = z.object({
|
|
|
833
1860
|
});
|
|
834
1861
|
|
|
835
1862
|
const getBasketTotalsResponseSchema = z.object({
|
|
836
|
-
currency
|
|
1863
|
+
get currency() {
|
|
1864
|
+
return currencySchema;
|
|
1865
|
+
},
|
|
837
1866
|
itemsTotal: z.int().min(0).max(9007199254740991),
|
|
838
1867
|
taxAmount: z.int().min(0).max(9007199254740991),
|
|
839
1868
|
depositCharge: z.int().min(0).max(9007199254740991),
|
|
@@ -849,6 +1878,12 @@ const getBasketTotalsResponseSchema = z.object({
|
|
|
849
1878
|
)
|
|
850
1879
|
});
|
|
851
1880
|
|
|
1881
|
+
const subscriptionCreditStatusSchema = z.enum([
|
|
1882
|
+
"available",
|
|
1883
|
+
"redeemed",
|
|
1884
|
+
"expired"
|
|
1885
|
+
]);
|
|
1886
|
+
|
|
852
1887
|
const getSubscriptionCreditsResponseSchema = z.array(
|
|
853
1888
|
z.object({
|
|
854
1889
|
id: z.string(),
|
|
@@ -856,7 +1891,9 @@ const getSubscriptionCreditsResponseSchema = z.array(
|
|
|
856
1891
|
periodStart: z.string(),
|
|
857
1892
|
periodEnd: z.string(),
|
|
858
1893
|
expiresAt: z.nullable(z.string()),
|
|
859
|
-
status
|
|
1894
|
+
get status() {
|
|
1895
|
+
return subscriptionCreditStatusSchema;
|
|
1896
|
+
},
|
|
860
1897
|
redeemedAt: z.nullable(z.string()),
|
|
861
1898
|
orderId: z.nullable(z.string()),
|
|
862
1899
|
createdAt: z.nullable(z.string())
|
|
@@ -872,12 +1909,18 @@ const getSubscriptionResponseSchema = z.object({
|
|
|
872
1909
|
description: z.nullable(z.object({}).catchall(z.string())),
|
|
873
1910
|
scheduleId: z.nullable(z.string()),
|
|
874
1911
|
allowance: z.int().max(9007199254740991),
|
|
875
|
-
billingPeriod
|
|
876
|
-
|
|
1912
|
+
get billingPeriod() {
|
|
1913
|
+
return subscriptionPeriodSchema;
|
|
1914
|
+
},
|
|
1915
|
+
get allowancePeriod() {
|
|
1916
|
+
return subscriptionPeriodSchema;
|
|
1917
|
+
},
|
|
877
1918
|
redeemableTagSets: z.array(z.array(z.string())),
|
|
878
1919
|
expiryInDays: z.nullable(z.int().max(9007199254740991)),
|
|
879
1920
|
price: z.int().min(0).max(9007199254740991),
|
|
880
|
-
currency
|
|
1921
|
+
get currency() {
|
|
1922
|
+
return currencySchema;
|
|
1923
|
+
},
|
|
881
1924
|
isActive: z.boolean(),
|
|
882
1925
|
sortIndex: z.nullable(z.string()),
|
|
883
1926
|
posters: z.array(
|
|
@@ -912,6 +1955,38 @@ const getVenueResponseSchema = z.object({
|
|
|
912
1955
|
"A venue. The public API exposes only the minimal id + accessor + naming + locale fields the CLI's `venues use` / `auth whoami` consume."
|
|
913
1956
|
);
|
|
914
1957
|
|
|
1958
|
+
const integrationNotificationTypeSchema = z.enum([
|
|
1959
|
+
"order_created",
|
|
1960
|
+
"order_cancelled",
|
|
1961
|
+
"order_completed",
|
|
1962
|
+
"team_order_created",
|
|
1963
|
+
"reservation_created",
|
|
1964
|
+
"reservation_confirmed",
|
|
1965
|
+
"reservation_cancelled"
|
|
1966
|
+
]);
|
|
1967
|
+
|
|
1968
|
+
const integrationTypeSchema = z.enum(["telegram"]);
|
|
1969
|
+
|
|
1970
|
+
const inventoryAssetStatusSchema = z.enum([
|
|
1971
|
+
"available",
|
|
1972
|
+
"in_use",
|
|
1973
|
+
"maintenance",
|
|
1974
|
+
"retired"
|
|
1975
|
+
]);
|
|
1976
|
+
|
|
1977
|
+
const inventoryCategorySchema = z.enum([
|
|
1978
|
+
"depositware",
|
|
1979
|
+
"furniture",
|
|
1980
|
+
"equipment",
|
|
1981
|
+
"utensil"
|
|
1982
|
+
]);
|
|
1983
|
+
|
|
1984
|
+
const invitationScenarioSchema = z.enum([
|
|
1985
|
+
"new_user",
|
|
1986
|
+
"already_member",
|
|
1987
|
+
"former_employee"
|
|
1988
|
+
]);
|
|
1989
|
+
|
|
915
1990
|
const joinTeamOrderRequestSchema = z.object({
|
|
916
1991
|
publicId: z.string().min(1),
|
|
917
1992
|
sessionId: z.string().min(1),
|
|
@@ -929,11 +2004,194 @@ const joinTeamOrderResponseSchema = z.object({
|
|
|
929
2004
|
alreadyJoined: z.boolean()
|
|
930
2005
|
});
|
|
931
2006
|
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
2007
|
+
const jurisdictionSchema = z.enum(["DE", "CH", "FR", "IT"]);
|
|
2008
|
+
|
|
2009
|
+
const localeSchema = z.enum([
|
|
2010
|
+
"aa",
|
|
2011
|
+
"ab",
|
|
2012
|
+
"ae",
|
|
2013
|
+
"af",
|
|
2014
|
+
"ak",
|
|
2015
|
+
"am",
|
|
2016
|
+
"an",
|
|
2017
|
+
"ar",
|
|
2018
|
+
"as",
|
|
2019
|
+
"av",
|
|
2020
|
+
"ay",
|
|
2021
|
+
"az",
|
|
2022
|
+
"ba",
|
|
2023
|
+
"be",
|
|
2024
|
+
"bg",
|
|
2025
|
+
"bh",
|
|
2026
|
+
"bi",
|
|
2027
|
+
"bm",
|
|
2028
|
+
"bn",
|
|
2029
|
+
"bo",
|
|
2030
|
+
"br",
|
|
2031
|
+
"bs",
|
|
2032
|
+
"ca",
|
|
2033
|
+
"ce",
|
|
2034
|
+
"ch",
|
|
2035
|
+
"co",
|
|
2036
|
+
"cr",
|
|
2037
|
+
"cs",
|
|
2038
|
+
"cu",
|
|
2039
|
+
"cv",
|
|
2040
|
+
"cy",
|
|
2041
|
+
"da",
|
|
2042
|
+
"de",
|
|
2043
|
+
"dv",
|
|
2044
|
+
"dz",
|
|
2045
|
+
"ee",
|
|
2046
|
+
"el",
|
|
2047
|
+
"en",
|
|
2048
|
+
"eo",
|
|
2049
|
+
"es",
|
|
2050
|
+
"et",
|
|
2051
|
+
"eu",
|
|
2052
|
+
"fa",
|
|
2053
|
+
"ff",
|
|
2054
|
+
"fi",
|
|
2055
|
+
"fj",
|
|
2056
|
+
"fo",
|
|
2057
|
+
"fr",
|
|
2058
|
+
"fy",
|
|
2059
|
+
"ga",
|
|
2060
|
+
"gd",
|
|
2061
|
+
"gl",
|
|
2062
|
+
"gn",
|
|
2063
|
+
"gu",
|
|
2064
|
+
"gv",
|
|
2065
|
+
"ha",
|
|
2066
|
+
"he",
|
|
2067
|
+
"hi",
|
|
2068
|
+
"ho",
|
|
2069
|
+
"hr",
|
|
2070
|
+
"ht",
|
|
2071
|
+
"hu",
|
|
2072
|
+
"hy",
|
|
2073
|
+
"hz",
|
|
2074
|
+
"ia",
|
|
2075
|
+
"id",
|
|
2076
|
+
"ie",
|
|
2077
|
+
"ig",
|
|
2078
|
+
"ii",
|
|
2079
|
+
"ik",
|
|
2080
|
+
"io",
|
|
2081
|
+
"is",
|
|
2082
|
+
"it",
|
|
2083
|
+
"iu",
|
|
2084
|
+
"ja",
|
|
2085
|
+
"jv",
|
|
2086
|
+
"ka",
|
|
2087
|
+
"kg",
|
|
2088
|
+
"ki",
|
|
2089
|
+
"kj",
|
|
2090
|
+
"kk",
|
|
2091
|
+
"kl",
|
|
2092
|
+
"km",
|
|
2093
|
+
"kn",
|
|
2094
|
+
"ko",
|
|
2095
|
+
"kr",
|
|
2096
|
+
"ks",
|
|
2097
|
+
"ku",
|
|
2098
|
+
"kv",
|
|
2099
|
+
"kw",
|
|
2100
|
+
"ky",
|
|
2101
|
+
"la",
|
|
2102
|
+
"lb",
|
|
2103
|
+
"lg",
|
|
2104
|
+
"li",
|
|
2105
|
+
"ln",
|
|
2106
|
+
"lo",
|
|
2107
|
+
"lt",
|
|
2108
|
+
"lu",
|
|
2109
|
+
"lv",
|
|
2110
|
+
"mg",
|
|
2111
|
+
"mh",
|
|
2112
|
+
"mi",
|
|
2113
|
+
"mk",
|
|
2114
|
+
"ml",
|
|
2115
|
+
"mn",
|
|
2116
|
+
"mr",
|
|
2117
|
+
"ms",
|
|
2118
|
+
"mt",
|
|
2119
|
+
"my",
|
|
2120
|
+
"na",
|
|
2121
|
+
"nb",
|
|
2122
|
+
"nd",
|
|
2123
|
+
"ne",
|
|
2124
|
+
"ng",
|
|
2125
|
+
"nl",
|
|
2126
|
+
"nn",
|
|
2127
|
+
"no",
|
|
2128
|
+
"nr",
|
|
2129
|
+
"nv",
|
|
2130
|
+
"ny",
|
|
2131
|
+
"oc",
|
|
2132
|
+
"oj",
|
|
2133
|
+
"om",
|
|
2134
|
+
"or",
|
|
2135
|
+
"os",
|
|
2136
|
+
"pa",
|
|
2137
|
+
"pi",
|
|
2138
|
+
"pl",
|
|
2139
|
+
"ps",
|
|
2140
|
+
"pt",
|
|
2141
|
+
"qu",
|
|
2142
|
+
"rm",
|
|
2143
|
+
"rn",
|
|
2144
|
+
"ro",
|
|
2145
|
+
"ru",
|
|
2146
|
+
"rw",
|
|
2147
|
+
"sa",
|
|
2148
|
+
"sc",
|
|
2149
|
+
"sd",
|
|
2150
|
+
"se",
|
|
2151
|
+
"sg",
|
|
2152
|
+
"si",
|
|
2153
|
+
"sk",
|
|
2154
|
+
"sl",
|
|
2155
|
+
"sm",
|
|
2156
|
+
"sn",
|
|
2157
|
+
"so",
|
|
2158
|
+
"sq",
|
|
2159
|
+
"sr",
|
|
2160
|
+
"ss",
|
|
2161
|
+
"st",
|
|
2162
|
+
"su",
|
|
2163
|
+
"sv",
|
|
2164
|
+
"sw",
|
|
2165
|
+
"ta",
|
|
2166
|
+
"te",
|
|
2167
|
+
"tg",
|
|
2168
|
+
"th",
|
|
2169
|
+
"ti",
|
|
2170
|
+
"tk",
|
|
2171
|
+
"tl",
|
|
2172
|
+
"tn",
|
|
2173
|
+
"to",
|
|
2174
|
+
"tr",
|
|
2175
|
+
"ts",
|
|
2176
|
+
"tt",
|
|
2177
|
+
"tw",
|
|
2178
|
+
"ty",
|
|
2179
|
+
"ug",
|
|
2180
|
+
"uk",
|
|
2181
|
+
"ur",
|
|
2182
|
+
"uz",
|
|
2183
|
+
"ve",
|
|
2184
|
+
"vi",
|
|
2185
|
+
"vo",
|
|
2186
|
+
"wa",
|
|
2187
|
+
"wo",
|
|
2188
|
+
"xh",
|
|
2189
|
+
"yi",
|
|
2190
|
+
"yo",
|
|
2191
|
+
"za",
|
|
2192
|
+
"zh",
|
|
2193
|
+
"zu"
|
|
2194
|
+
]);
|
|
937
2195
|
|
|
938
2196
|
const makeReservationRequestSchema = z.object({
|
|
939
2197
|
venueAccessor: z.string().min(1).describe(
|
|
@@ -953,14 +2211,12 @@ const makeReservationRequestSchema = z.object({
|
|
|
953
2211
|
customerPhone: z.string().min(1).describe(
|
|
954
2212
|
"Phone number for reservation confirmations and updates. Include country code for international numbers."
|
|
955
2213
|
).nullish(),
|
|
956
|
-
contactPreference
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
source
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
)
|
|
963
|
-
),
|
|
2214
|
+
get contactPreference() {
|
|
2215
|
+
return contactPreferenceSchema.optional();
|
|
2216
|
+
},
|
|
2217
|
+
get source() {
|
|
2218
|
+
return areaBookingRequestSourceSchema.optional();
|
|
2219
|
+
},
|
|
964
2220
|
specialRequests: z.string().max(500).describe(
|
|
965
2221
|
"Any dietary restrictions, allergies, or special occasions (max 500 characters)"
|
|
966
2222
|
).nullish(),
|
|
@@ -969,6 +2225,16 @@ const makeReservationRequestSchema = z.object({
|
|
|
969
2225
|
).nullish()
|
|
970
2226
|
}).describe("Request payload for making a new reservation");
|
|
971
2227
|
|
|
2228
|
+
const reservationStatusSchema = z.enum([
|
|
2229
|
+
"pending",
|
|
2230
|
+
"confirmed",
|
|
2231
|
+
"arrived",
|
|
2232
|
+
"seated",
|
|
2233
|
+
"completed",
|
|
2234
|
+
"cancelled",
|
|
2235
|
+
"no_show"
|
|
2236
|
+
]);
|
|
2237
|
+
|
|
972
2238
|
const makeReservationResponseSchema = z.object({
|
|
973
2239
|
id: z.uuid().describe("Unique identifier for the reservation"),
|
|
974
2240
|
venueId: z.uuid().describe("Restaurant/tenant identifier"),
|
|
@@ -987,16 +2253,12 @@ const makeReservationResponseSchema = z.object({
|
|
|
987
2253
|
customerLastName: z.string().describe("Last name of the customer"),
|
|
988
2254
|
customerEmail: z.nullable(z.string().describe("Customer email address")),
|
|
989
2255
|
customerPhone: z.nullable(z.string().describe("Customer phone number")),
|
|
990
|
-
contactPreference
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
"completed",
|
|
997
|
-
"cancelled",
|
|
998
|
-
"no_show"
|
|
999
|
-
]).describe("Current status of the reservation"),
|
|
2256
|
+
get contactPreference() {
|
|
2257
|
+
return contactPreferenceSchema;
|
|
2258
|
+
},
|
|
2259
|
+
get status() {
|
|
2260
|
+
return reservationStatusSchema;
|
|
2261
|
+
},
|
|
1000
2262
|
confirmationCode: z.nullable(
|
|
1001
2263
|
z.string().describe("6-character confirmation code for the reservation")
|
|
1002
2264
|
),
|
|
@@ -1009,13 +2271,15 @@ const makeReservationResponseSchema = z.object({
|
|
|
1009
2271
|
cancelledAt: z.nullable(
|
|
1010
2272
|
z.any().describe("When the reservation was cancelled")
|
|
1011
2273
|
),
|
|
1012
|
-
cancellationReason
|
|
1013
|
-
|
|
1014
|
-
|
|
2274
|
+
get cancellationReason() {
|
|
2275
|
+
return cancellationReasonSchema;
|
|
2276
|
+
},
|
|
1015
2277
|
cancellationNote: z.nullable(
|
|
1016
2278
|
z.string().describe("Additional cancellation details")
|
|
1017
2279
|
),
|
|
1018
|
-
source
|
|
2280
|
+
get source() {
|
|
2281
|
+
return areaBookingRequestSourceSchema;
|
|
2282
|
+
},
|
|
1019
2283
|
specialRequests: z.nullable(
|
|
1020
2284
|
z.string().describe("Any special requirements or notes")
|
|
1021
2285
|
),
|
|
@@ -1032,13 +2296,39 @@ const makeReservationResponseSchema = z.object({
|
|
|
1032
2296
|
updatedAt: z.nullable(z.any().describe("Last update timestamp"))
|
|
1033
2297
|
}).describe("Successfully created reservation");
|
|
1034
2298
|
|
|
1035
|
-
const
|
|
2299
|
+
const mentionEntityTypeSchema = z.enum([
|
|
2300
|
+
"dish",
|
|
2301
|
+
"beverage",
|
|
2302
|
+
"ingredient",
|
|
2303
|
+
"menu",
|
|
2304
|
+
"ritual"
|
|
2305
|
+
]);
|
|
2306
|
+
|
|
2307
|
+
const mentionFieldFormatterSchema = z.enum([
|
|
2308
|
+
"text",
|
|
2309
|
+
"currency",
|
|
2310
|
+
"integer",
|
|
2311
|
+
"percentage",
|
|
2312
|
+
"boolean"
|
|
2313
|
+
]);
|
|
2314
|
+
|
|
2315
|
+
const mentionKindSchema = z.enum(["link", "value"]);
|
|
2316
|
+
|
|
2317
|
+
const patchArticleFeatureImageBodySchema = z.object({
|
|
1036
2318
|
caption: z.optional(z.object({}).catchall(z.any())),
|
|
1037
2319
|
alt: z.optional(z.object({}).catchall(z.any()))
|
|
1038
2320
|
}).describe(
|
|
1039
2321
|
"Locale-keyed merge of the asset-side `caption` and `alt` records. Each locale value may be a plain string OR a TipTap doc; strings are wrapped server-side. Setting `en` does not touch `de`."
|
|
1040
2322
|
);
|
|
1041
2323
|
|
|
2324
|
+
const pendingSuperadminTransferStatusSchema = z.enum([
|
|
2325
|
+
"pending_invite",
|
|
2326
|
+
"accepted_awaiting_payment",
|
|
2327
|
+
"completed",
|
|
2328
|
+
"cancelled",
|
|
2329
|
+
"expired"
|
|
2330
|
+
]);
|
|
2331
|
+
|
|
1042
2332
|
const placeOrderRequestSchema = z.object({
|
|
1043
2333
|
venueAccessor: z.string().min(1),
|
|
1044
2334
|
basketId: z.string().min(1),
|
|
@@ -1071,14 +2361,18 @@ const placeOrderResponseSchema = z.object({
|
|
|
1071
2361
|
quickReferenceNumber: z.nullable(
|
|
1072
2362
|
z.int().min(-9007199254740991).max(9007199254740991)
|
|
1073
2363
|
),
|
|
1074
|
-
currency
|
|
2364
|
+
get currency() {
|
|
2365
|
+
return currencySchema;
|
|
2366
|
+
}
|
|
1075
2367
|
});
|
|
1076
2368
|
|
|
1077
2369
|
const reduceDeltaPaymentIntentRequestSchema = z.object({
|
|
1078
2370
|
venueAccessor: z.string().min(1),
|
|
1079
2371
|
basketId: z.string().min(1),
|
|
1080
2372
|
sessionId: z.string().min(1),
|
|
1081
|
-
currency
|
|
2373
|
+
get currency() {
|
|
2374
|
+
return currencySchema;
|
|
2375
|
+
},
|
|
1082
2376
|
declaredReturns: z.optional(
|
|
1083
2377
|
z.array(
|
|
1084
2378
|
z.object({
|
|
@@ -1104,6 +2398,18 @@ const removeFromBasketResponseSchema = z.object({
|
|
|
1104
2398
|
}
|
|
1105
2399
|
});
|
|
1106
2400
|
|
|
2401
|
+
const reservationPromotionStatusSchema = z.enum([
|
|
2402
|
+
"applied",
|
|
2403
|
+
"redeemed",
|
|
2404
|
+
"expired"
|
|
2405
|
+
]);
|
|
2406
|
+
|
|
2407
|
+
const scanTokenEntityTypeSchema = z.enum(["order", "depositware"]);
|
|
2408
|
+
|
|
2409
|
+
const setArticleFeatureImageUploadBodySchema = z.object({
|
|
2410
|
+
file: z.string().describe("Image file (multipart/form-data field)")
|
|
2411
|
+
});
|
|
2412
|
+
|
|
1107
2413
|
const setBasketDeclaredReturnsRequestSchema = z.object({
|
|
1108
2414
|
venueAccessor: z.string().min(1),
|
|
1109
2415
|
basketId: z.string().min(1),
|
|
@@ -1170,7 +2476,21 @@ const setFulfillmentAtTeamOrderResponseSchema = z.object({
|
|
|
1170
2476
|
deadlineAt: z.nullable(z.iso.datetime())
|
|
1171
2477
|
});
|
|
1172
2478
|
|
|
1173
|
-
const
|
|
2479
|
+
const setOrderLeadSettledRequestSchema = z.object({
|
|
2480
|
+
publicId: z.string().min(1),
|
|
2481
|
+
sessionId: z.string().min(1),
|
|
2482
|
+
orderId: z.uuid(),
|
|
2483
|
+
settled: z.boolean()
|
|
2484
|
+
});
|
|
2485
|
+
|
|
2486
|
+
const setOrderLeadSettledResponseSchema = z.object({
|
|
2487
|
+
orderId: z.uuid(),
|
|
2488
|
+
leadSettledAt: z.nullable(z.string())
|
|
2489
|
+
});
|
|
2490
|
+
|
|
2491
|
+
const sortOrderSchema = z.enum(["asc", "desc"]);
|
|
2492
|
+
|
|
2493
|
+
const submitAreaBookingPayloadSchema = z.object({
|
|
1174
2494
|
requestedDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
1175
2495
|
requestedStartTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
|
|
1176
2496
|
requestedEndTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
|
|
@@ -1180,10 +2500,12 @@ const submitAreaBookingRequestSchema = z.object({
|
|
|
1180
2500
|
customerEmail: z.email(),
|
|
1181
2501
|
customerPhone: z.optional(z.string()),
|
|
1182
2502
|
message: z.optional(z.string()),
|
|
1183
|
-
source
|
|
2503
|
+
get source() {
|
|
2504
|
+
return areaBookingRequestSourceSchema.optional();
|
|
2505
|
+
}
|
|
1184
2506
|
});
|
|
1185
2507
|
|
|
1186
|
-
const
|
|
2508
|
+
const submitAreaBookingRequestResponseSchema = z.object({
|
|
1187
2509
|
id: z.string(),
|
|
1188
2510
|
venueId: z.string(),
|
|
1189
2511
|
areaId: z.string(),
|
|
@@ -1196,8 +2518,12 @@ const submitAreaBookingResponseSchema = z.object({
|
|
|
1196
2518
|
customerEmail: z.string(),
|
|
1197
2519
|
customerPhone: z.nullable(z.string()),
|
|
1198
2520
|
message: z.nullable(z.string()),
|
|
1199
|
-
source
|
|
1200
|
-
|
|
2521
|
+
get source() {
|
|
2522
|
+
return areaBookingRequestSourceSchema;
|
|
2523
|
+
},
|
|
2524
|
+
get status() {
|
|
2525
|
+
return areaBookingRequestStatusSchema;
|
|
2526
|
+
},
|
|
1201
2527
|
areaBookingId: z.nullable(z.string()),
|
|
1202
2528
|
createdAt: z.nullable(z.string()),
|
|
1203
2529
|
updatedAt: z.nullable(z.string())
|
|
@@ -1219,7 +2545,7 @@ const submitTeamOrderResponseSchema = z.object({
|
|
|
1219
2545
|
placedAt: z.iso.datetime()
|
|
1220
2546
|
});
|
|
1221
2547
|
|
|
1222
|
-
const
|
|
2548
|
+
const subscribeToSubscriptionBodySchema = z.object({
|
|
1223
2549
|
email: z.email(),
|
|
1224
2550
|
firstName: z.optional(z.string()),
|
|
1225
2551
|
lastName: z.optional(z.string()),
|
|
@@ -1228,11 +2554,19 @@ const subscribeRequestSchema = z.object({
|
|
|
1228
2554
|
cancelUrl: z.url()
|
|
1229
2555
|
});
|
|
1230
2556
|
|
|
1231
|
-
const
|
|
2557
|
+
const subscribeToSubscriptionResponseSchema = z.object({
|
|
1232
2558
|
checkoutUrl: z.nullable(z.url()),
|
|
1233
2559
|
sessionId: z.string()
|
|
1234
2560
|
});
|
|
1235
2561
|
|
|
2562
|
+
const subscriberStatusSchema = z.enum([
|
|
2563
|
+
"active",
|
|
2564
|
+
"paused",
|
|
2565
|
+
"cancelled",
|
|
2566
|
+
"past_due",
|
|
2567
|
+
"trialing"
|
|
2568
|
+
]);
|
|
2569
|
+
|
|
1236
2570
|
const switchFulfillmentTeamOrderRequestSchema = z.object({
|
|
1237
2571
|
publicId: z.string().min(1),
|
|
1238
2572
|
sessionId: z.string().min(1),
|
|
@@ -1255,6 +2589,15 @@ const switchFulfillmentTeamOrderResponseSchema = z.object({
|
|
|
1255
2589
|
deliveryAddressId: z.nullable(z.string())
|
|
1256
2590
|
});
|
|
1257
2591
|
|
|
2592
|
+
const teamOrderPaymentStatusSchema = z.enum([
|
|
2593
|
+
"authorized",
|
|
2594
|
+
"captured",
|
|
2595
|
+
"cash_pending",
|
|
2596
|
+
"cash_received",
|
|
2597
|
+
"voided",
|
|
2598
|
+
"failed"
|
|
2599
|
+
]);
|
|
2600
|
+
|
|
1258
2601
|
const updateDeliveryAddressTeamOrderRequestSchema = z.object({
|
|
1259
2602
|
publicId: z.string().min(1),
|
|
1260
2603
|
sessionId: z.string().min(1),
|
|
@@ -1268,22 +2611,55 @@ const updateDeliveryAddressTeamOrderResponseSchema = z.object({
|
|
|
1268
2611
|
deliveryAddressId: z.string()
|
|
1269
2612
|
});
|
|
1270
2613
|
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
|
|
2614
|
+
const venueAssetTypeSchema = z.enum([
|
|
2615
|
+
"logomark",
|
|
2616
|
+
"wordmark",
|
|
2617
|
+
"combinationmark_horizontal",
|
|
2618
|
+
"combinationmark_vertical"
|
|
2619
|
+
]);
|
|
2620
|
+
|
|
2621
|
+
const venueChargeKindSchema = z.enum(["base", "addon"]);
|
|
2622
|
+
|
|
2623
|
+
const venueTypeSchema = z.enum([
|
|
2624
|
+
"restaurant",
|
|
2625
|
+
"fine_dining_restaurant",
|
|
2626
|
+
"ghost_kitchen",
|
|
2627
|
+
"food_truck"
|
|
2628
|
+
]);
|
|
2629
|
+
|
|
2630
|
+
const venueUserStatusSchema = z.enum(["pending", "confirmed", "revoked"]);
|
|
1274
2631
|
|
|
1275
2632
|
const schemas = {
|
|
2633
|
+
AbandonBasketRequest: abandonBasketRequestSchema,
|
|
2634
|
+
AbandonBasketResponse: abandonBasketResponseSchema,
|
|
2635
|
+
ActorType: actorTypeSchema,
|
|
1276
2636
|
AddToBasketRequest: addToBasketRequestSchema,
|
|
1277
2637
|
AddToBasketResponse: addToBasketResponseSchema,
|
|
2638
|
+
AdditiveFunction: additiveFunctionSchema,
|
|
2639
|
+
AreaBookingMode: areaBookingModeSchema,
|
|
2640
|
+
AreaBookingRequestSource: areaBookingRequestSourceSchema,
|
|
2641
|
+
AreaBookingRequestStatus: areaBookingRequestStatusSchema,
|
|
2642
|
+
AreaBookingStatus: areaBookingStatusSchema,
|
|
1278
2643
|
Area: areaSchema,
|
|
2644
|
+
ArticleEditorSaveState: articleEditorSaveStateSchema,
|
|
1279
2645
|
ArticleMentionCounts: articleMentionCountsSchema,
|
|
2646
|
+
ArticleStatus: articleStatusSchema,
|
|
2647
|
+
AssetType: assetTypeSchema,
|
|
2648
|
+
AutoExtendFulfillmentIfExpiredRequest: autoExtendFulfillmentIfExpiredRequestSchema,
|
|
2649
|
+
AutoExtendFulfillmentIfExpiredResponse: autoExtendFulfillmentIfExpiredResponseSchema,
|
|
2650
|
+
BasketStatus: basketStatusSchema,
|
|
1280
2651
|
BasketTotals: basketTotalsSchema,
|
|
2652
|
+
BeverageCategory: beverageCategorySchema,
|
|
2653
|
+
BillingMode: billingModeSchema,
|
|
1281
2654
|
CancelSubscriptionRequest: cancelSubscriptionRequestSchema,
|
|
1282
2655
|
CancelSubscriptionResponse: cancelSubscriptionResponseSchema,
|
|
1283
2656
|
CancelTeamOrderRequest: cancelTeamOrderRequestSchema,
|
|
1284
2657
|
CancelTeamOrderResponse: cancelTeamOrderResponseSchema,
|
|
2658
|
+
CancellationReason: cancellationReasonSchema,
|
|
1285
2659
|
ConfirmOrderRequest: confirmOrderRequestSchema,
|
|
1286
2660
|
ConfirmOrderResponse: confirmOrderResponseSchema,
|
|
2661
|
+
ContactPreference: contactPreferenceSchema,
|
|
2662
|
+
CountryCode: countryCodeSchema,
|
|
1287
2663
|
CreateDeltaPaymentIntentRequest: createDeltaPaymentIntentRequestSchema,
|
|
1288
2664
|
CreateDeltaPaymentIntentResponse: createDeltaPaymentIntentResponseSchema,
|
|
1289
2665
|
CreateEventRequest: createEventRequestSchema,
|
|
@@ -1292,42 +2668,73 @@ const schemas = {
|
|
|
1292
2668
|
CreatePaymentIntentResponse: createPaymentIntentResponseSchema,
|
|
1293
2669
|
CreateTeamOrderRequest: createTeamOrderRequestSchema,
|
|
1294
2670
|
CreateTeamOrderResponse: createTeamOrderResponseSchema,
|
|
2671
|
+
Currency: currencySchema,
|
|
2672
|
+
DayOfWeek: dayOfWeekSchema,
|
|
1295
2673
|
DeliveryAddress: deliveryAddressSchema,
|
|
2674
|
+
DepositTransactionType: depositTransactionTypeSchema,
|
|
2675
|
+
DepositwareStatus: depositwareStatusSchema,
|
|
1296
2676
|
EditArticleRequest: editArticleRequestSchema,
|
|
1297
2677
|
EditArticleResponse: editArticleResponseSchema,
|
|
2678
|
+
EntityOwnerType: entityOwnerTypeSchema,
|
|
2679
|
+
EnumFalse: enumFalseSchema,
|
|
2680
|
+
EnumTrue: enumTrueSchema,
|
|
1298
2681
|
ExtendDeadlineTeamOrderRequest: extendDeadlineTeamOrderRequestSchema,
|
|
1299
2682
|
ExtendDeadlineTeamOrderResponse: extendDeadlineTeamOrderResponseSchema,
|
|
2683
|
+
FeatureCategory: featureCategorySchema,
|
|
1300
2684
|
FeatureImage: featureImageSchema,
|
|
2685
|
+
FeatureStatus: featureStatusSchema,
|
|
2686
|
+
FetchAreaBookingsResponse: fetchAreaBookingsResponseSchema,
|
|
2687
|
+
FetchAreaResponse: fetchAreaResponseSchema,
|
|
2688
|
+
FetchAreasResponse: fetchAreasResponseSchema,
|
|
1301
2689
|
FetchArticleResponse: fetchArticleResponseSchema,
|
|
1302
2690
|
FetchArticlesResponse: fetchArticlesResponseSchema,
|
|
2691
|
+
FetchBasketResponse: fetchBasketResponseSchema,
|
|
1303
2692
|
FetchEventResponse: fetchEventResponseSchema,
|
|
1304
2693
|
FetchEventsResponse: fetchEventsResponseSchema,
|
|
2694
|
+
FetchLatestOrderResponse: fetchLatestOrderResponseSchema,
|
|
1305
2695
|
FetchMenuBundlesResponse: fetchMenuBundlesResponseSchema,
|
|
1306
2696
|
FetchMenuResponse: fetchMenuResponseSchema,
|
|
1307
2697
|
FetchMenuSubscriptionsResponse: fetchMenuSubscriptionsResponseSchema,
|
|
1308
2698
|
FetchTeamOrderResponse: fetchTeamOrderResponseSchema,
|
|
1309
2699
|
FulfillmentType: fulfillmentTypeSchema,
|
|
1310
2700
|
GetAreaAvailabilityResponse: getAreaAvailabilityResponseSchema,
|
|
1311
|
-
GetAreaResponse: getAreaResponseSchema,
|
|
1312
2701
|
GetBasketTotalsRequest: getBasketTotalsRequestSchema,
|
|
1313
2702
|
GetBasketTotalsResponse: getBasketTotalsResponseSchema,
|
|
1314
2703
|
GetSubscriptionCreditsResponse: getSubscriptionCreditsResponseSchema,
|
|
1315
2704
|
GetSubscriptionResponse: getSubscriptionResponseSchema,
|
|
1316
2705
|
GetVenueResponse: getVenueResponseSchema,
|
|
2706
|
+
IntegrationNotificationType: integrationNotificationTypeSchema,
|
|
2707
|
+
IntegrationType: integrationTypeSchema,
|
|
2708
|
+
InventoryAssetStatus: inventoryAssetStatusSchema,
|
|
2709
|
+
InventoryCategory: inventoryCategorySchema,
|
|
2710
|
+
InvitationScenario: invitationScenarioSchema,
|
|
1317
2711
|
JoinTeamOrderRequest: joinTeamOrderRequestSchema,
|
|
1318
2712
|
JoinTeamOrderResponse: joinTeamOrderResponseSchema,
|
|
1319
|
-
|
|
2713
|
+
Jurisdiction: jurisdictionSchema,
|
|
2714
|
+
Locale: localeSchema,
|
|
1320
2715
|
MakeReservationRequest: makeReservationRequestSchema,
|
|
1321
2716
|
MakeReservationResponse: makeReservationResponseSchema,
|
|
2717
|
+
MentionEntityType: mentionEntityTypeSchema,
|
|
2718
|
+
MentionFieldFormatter: mentionFieldFormatterSchema,
|
|
2719
|
+
MentionKind: mentionKindSchema,
|
|
2720
|
+
MenuItemType: menuItemTypeSchema,
|
|
1322
2721
|
OgImage: ogImageSchema,
|
|
2722
|
+
OrderStatus: orderStatusSchema,
|
|
1323
2723
|
ParticipantStatus: participantStatusSchema,
|
|
1324
|
-
|
|
2724
|
+
PatchArticleFeatureImageBody: patchArticleFeatureImageBodySchema,
|
|
1325
2725
|
PaymentMethod: paymentMethodSchema,
|
|
2726
|
+
PaymentStatus: paymentStatusSchema,
|
|
2727
|
+
PendingSuperadminTransferStatus: pendingSuperadminTransferStatusSchema,
|
|
1326
2728
|
PlaceOrderRequest: placeOrderRequestSchema,
|
|
1327
2729
|
PlaceOrderResponse: placeOrderResponseSchema,
|
|
2730
|
+
PromotionBenefitType: promotionBenefitTypeSchema,
|
|
1328
2731
|
ReduceDeltaPaymentIntentRequest: reduceDeltaPaymentIntentRequestSchema,
|
|
1329
2732
|
ReduceDeltaPaymentIntentResponse: reduceDeltaPaymentIntentResponseSchema,
|
|
1330
2733
|
RemoveFromBasketResponse: removeFromBasketResponseSchema,
|
|
2734
|
+
ReservationPromotionStatus: reservationPromotionStatusSchema,
|
|
2735
|
+
ReservationStatus: reservationStatusSchema,
|
|
2736
|
+
ScanTokenEntityType: scanTokenEntityTypeSchema,
|
|
2737
|
+
SetArticleFeatureImageUploadBody: setArticleFeatureImageUploadBodySchema,
|
|
1331
2738
|
SetBasketDeclaredReturnsRequest: setBasketDeclaredReturnsRequestSchema,
|
|
1332
2739
|
SetBasketDeclaredReturnsResponse: setBasketDeclaredReturnsResponseSchema,
|
|
1333
2740
|
SetDiningLocationTeamOrderRequest: setDiningLocationTeamOrderRequestSchema,
|
|
@@ -1336,18 +2743,30 @@ const schemas = {
|
|
|
1336
2743
|
SetDiningTimeTeamOrderResponse: setDiningTimeTeamOrderResponseSchema,
|
|
1337
2744
|
SetFulfillmentAtTeamOrderRequest: setFulfillmentAtTeamOrderRequestSchema,
|
|
1338
2745
|
SetFulfillmentAtTeamOrderResponse: setFulfillmentAtTeamOrderResponseSchema,
|
|
1339
|
-
|
|
1340
|
-
|
|
2746
|
+
SetOrderLeadSettledRequest: setOrderLeadSettledRequestSchema,
|
|
2747
|
+
SetOrderLeadSettledResponse: setOrderLeadSettledResponseSchema,
|
|
2748
|
+
SlotMode: slotModeSchema,
|
|
2749
|
+
SortOrder: sortOrderSchema,
|
|
2750
|
+
SubmitAreaBookingPayload: submitAreaBookingPayloadSchema,
|
|
2751
|
+
SubmitAreaBookingRequestResponse: submitAreaBookingRequestResponseSchema,
|
|
1341
2752
|
SubmitTeamOrderRequest: submitTeamOrderRequestSchema,
|
|
1342
2753
|
SubmitTeamOrderResponse: submitTeamOrderResponseSchema,
|
|
1343
|
-
|
|
1344
|
-
|
|
2754
|
+
SubscribeToSubscriptionBody: subscribeToSubscriptionBodySchema,
|
|
2755
|
+
SubscribeToSubscriptionResponse: subscribeToSubscriptionResponseSchema,
|
|
2756
|
+
SubscriberStatus: subscriberStatusSchema,
|
|
2757
|
+
SubscriptionCreditStatus: subscriptionCreditStatusSchema,
|
|
2758
|
+
SubscriptionPeriod: subscriptionPeriodSchema,
|
|
1345
2759
|
SwitchFulfillmentTeamOrderRequest: switchFulfillmentTeamOrderRequestSchema,
|
|
1346
2760
|
SwitchFulfillmentTeamOrderResponse: switchFulfillmentTeamOrderResponseSchema,
|
|
2761
|
+
TeamOrderPaymentStatus: teamOrderPaymentStatusSchema,
|
|
1347
2762
|
TeamOrderStatus: teamOrderStatusSchema,
|
|
2763
|
+
Unit: unitSchema,
|
|
1348
2764
|
UpdateDeliveryAddressTeamOrderRequest: updateDeliveryAddressTeamOrderRequestSchema,
|
|
1349
2765
|
UpdateDeliveryAddressTeamOrderResponse: updateDeliveryAddressTeamOrderResponseSchema,
|
|
1350
|
-
|
|
2766
|
+
VenueAssetType: venueAssetTypeSchema,
|
|
2767
|
+
VenueChargeKind: venueChargeKindSchema,
|
|
2768
|
+
VenueType: venueTypeSchema,
|
|
2769
|
+
VenueUserStatus: venueUserStatusSchema
|
|
1351
2770
|
};
|
|
1352
2771
|
|
|
1353
2772
|
export { schemas };
|