order3000 0.25.0 → 1.0.0

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/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: z.optional(
13
- z.enum(["grams", "kilograms", "liters", "milliliters", "pieces"])
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: z.enum(["EUR", "CHF"]),
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: z.enum(["EUR", "CHF"])
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: z.enum(["EUR", "CHF"]),
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: z.enum(["slot", "day"]),
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: z.enum(["image", "video", "document"]),
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: z.enum(["EUR", "CHF"]),
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: z.enum(["interval", "duration"]).nullish(),
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: z.enum(["EUR", "CHF"]),
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: z.enum(["draft", "published"]),
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: z.enum(["draft", "published"]),
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: z.enum(["draft", "published"]),
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,421 @@ 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.any()).describe(
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
- }).catchall(z.any())
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;
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.string(),
1325
+ startTime: z.string(),
1326
+ endTime: z.nullable(z.string()),
1327
+ isSchedulable: z.nullable(z.boolean())
1328
+ })
1329
+ )
1330
+ })
1331
+ ),
1332
+ promotions: z.array(
1333
+ z.object({
1334
+ id: z.string(),
1335
+ name: z.object({}).catchall(z.string()),
1336
+ description: z.nullable(z.object({}).catchall(z.string())),
1337
+ validFrom: z.nullable(z.string()),
1338
+ validTo: z.nullable(z.string()),
1339
+ isActive: z.boolean(),
1340
+ updatedAt: z.nullable(z.any()),
1341
+ updatedBy: z.nullable(z.string()),
1342
+ createdAt: z.nullable(z.any()),
1343
+ createdBy: z.nullable(z.string()),
1344
+ venueId: z.string(),
1345
+ get benefitType() {
1346
+ return promotionBenefitTypeSchema;
1347
+ },
1348
+ benefitValue: z.object({}).catchall(z.any()),
1349
+ conditions: z.nullable(z.object({}).catchall(z.any())),
1350
+ maxRedemptions: z.nullable(z.number()),
1351
+ currentRedemptions: z.nullable(z.number()),
1352
+ timeSlotIds: z.nullable(z.array(z.string()))
1353
+ })
1354
+ )
1355
+ })
471
1356
  );
472
1357
 
1358
+ const orderStatusSchema = z.enum([
1359
+ "pending",
1360
+ "in_progress",
1361
+ "ready",
1362
+ "completed",
1363
+ "cancelled"
1364
+ ]);
1365
+
1366
+ const paymentStatusSchema = z.enum([
1367
+ "unpaid",
1368
+ "paid",
1369
+ "refunded",
1370
+ "authorized",
1371
+ "cash_pending"
1372
+ ]);
1373
+
1374
+ const fetchLatestOrderResponseSchema = z.object({
1375
+ id: z.uuid(),
1376
+ publicId: z.nullable(z.string()),
1377
+ quickReferenceNumber: z.nullable(
1378
+ z.int().min(-9007199254740991).max(9007199254740991)
1379
+ ),
1380
+ get status() {
1381
+ return orderStatusSchema;
1382
+ },
1383
+ get paymentStatus() {
1384
+ return paymentStatusSchema;
1385
+ },
1386
+ get fulfillmentType() {
1387
+ return fulfillmentTypeSchema;
1388
+ },
1389
+ fulfillmentAt: z.nullable(z.string()),
1390
+ orderedAt: z.string(),
1391
+ totalAmount: z.int().min(0).max(9007199254740991),
1392
+ get currency() {
1393
+ return currencySchema;
1394
+ },
1395
+ items: z.array(
1396
+ z.object({
1397
+ id: z.uuid(),
1398
+ metadata: z.nullable(z.object({}).catchall(z.any())),
1399
+ deposit: z.nullable(
1400
+ z.object({
1401
+ depositwareTemplateId: z.string(),
1402
+ name: z.object({}).catchall(z.string()),
1403
+ amount: z.int().min(0).max(9007199254740991),
1404
+ get currency() {
1405
+ return currencySchema;
1406
+ }
1407
+ })
1408
+ ),
1409
+ menuItems: z.array(
1410
+ z.object({
1411
+ menuItemId: z.string(),
1412
+ role: z.nullable(z.string()),
1413
+ quantity: z.number().gt(0),
1414
+ get unit() {
1415
+ return unitSchema;
1416
+ }
1417
+ })
1418
+ )
1419
+ })
1420
+ ),
1421
+ itemCount: z.int().min(0).max(9007199254740991),
1422
+ get totals() {
1423
+ return basketTotalsSchema;
1424
+ },
1425
+ declaredReturns: z.array(
1426
+ z.object({
1427
+ depositwareTemplateId: z.string(),
1428
+ count: z.int().min(0).max(9007199254740991)
1429
+ })
1430
+ )
1431
+ });
1432
+
473
1433
  const fetchMenuBundlesResponseSchema = z.array(
474
1434
  z.object({
475
1435
  id: z.string(),
@@ -480,9 +1440,13 @@ const fetchMenuBundlesResponseSchema = z.array(
480
1440
  tags: z.array(z.string()),
481
1441
  price: z.object({
482
1442
  amount: z.number(),
483
- currency: z.enum(["EUR", "CHF"])
1443
+ get currency() {
1444
+ return currencySchema;
1445
+ }
484
1446
  }),
485
- currency: z.enum(["EUR", "CHF"]),
1447
+ get currency() {
1448
+ return currencySchema;
1449
+ },
486
1450
  taxRateId: z.string(),
487
1451
  isActive: z.boolean(),
488
1452
  sortIndex: z.nullable(z.string()),
@@ -494,98 +1458,213 @@ const fetchMenuBundlesResponseSchema = z.array(
494
1458
  ),
495
1459
  deposit: z.nullable(
496
1460
  z.object({
1461
+ depositwareTemplateId: z.string(),
1462
+ accessor: z.string(),
497
1463
  amount: z.number(),
498
- currency: z.enum(["EUR", "CHF"])
1464
+ get currency() {
1465
+ return currencySchema;
1466
+ }
499
1467
  })
500
1468
  )
501
- }).catchall(z.any())
1469
+ })
502
1470
  );
503
1471
 
1472
+ const menuItemTypeSchema = z.enum(["dish", "beverage"]);
1473
+
504
1474
  const fetchMenuResponseSchema = z.object({
505
1475
  id: z.string(),
506
- venueId: z.string(),
1476
+ name: z.object({}).catchall(z.string()),
507
1477
  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
1478
  metadata: z.nullable(
521
- z.union([
522
- z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
523
- z.array(z.any()),
524
- z.object({}).catchall(z.any())
525
- ])
526
- ),
527
- sortIndex: z.nullable(z.string().max(255)),
528
- deliveryThresholdAmount: z.nullable(
529
- z.int().min(-2147483648).max(2147483647)
530
- ),
531
- deliveryThresholdQuantity: z.nullable(
532
- z.int().min(-2147483648).max(2147483647)
1479
+ z.object({
1480
+ orderingEnabled: z.optional(z.boolean()),
1481
+ compactTags: z.optional(z.array(z.string())),
1482
+ showDepositware: z.optional(z.boolean()),
1483
+ tagSortOrder: z.optional(z.array(z.string())),
1484
+ subscriptionsEnabled: z.optional(z.boolean()),
1485
+ isDeliveryEnabled: z.optional(z.boolean()),
1486
+ assetsEnabled: z.optional(z.boolean())
1487
+ })
533
1488
  ),
534
- createdAt: z.nullable(z.any()),
1489
+ description: z.nullable(z.object({}).catchall(z.string())),
1490
+ sortIndex: z.nullable(z.string()),
535
1491
  updatedAt: z.nullable(z.any()),
536
- createdBy: z.nullable(z.string()),
537
1492
  updatedBy: z.nullable(z.string()),
538
- assets: z.optional(
1493
+ createdAt: z.nullable(z.any()),
1494
+ createdBy: z.nullable(z.string()),
1495
+ venueId: z.string(),
1496
+ deliveryThresholdAmount: z.nullable(z.number()),
1497
+ deliveryThresholdQuantity: z.nullable(z.number()),
1498
+ assets: z.array(
1499
+ z.object({
1500
+ id: z.string(),
1501
+ get type() {
1502
+ return assetTypeSchema;
1503
+ },
1504
+ metadata: z.nullable(
1505
+ z.object({
1506
+ width: z.optional(z.number()),
1507
+ height: z.optional(z.number()),
1508
+ duration: z.optional(z.number())
1509
+ })
1510
+ ),
1511
+ isActive: z.boolean(),
1512
+ sortIndex: z.nullable(z.string()),
1513
+ updatedAt: z.nullable(z.any()),
1514
+ updatedBy: z.nullable(z.string()),
1515
+ createdAt: z.nullable(z.any()),
1516
+ createdBy: z.nullable(z.string()),
1517
+ venueId: z.nullable(z.string()),
1518
+ tags: z.nullable(z.array(z.string())),
1519
+ bucket: z.string(),
1520
+ storagePath: z.string(),
1521
+ filename: z.string(),
1522
+ contentType: z.string(),
1523
+ sizeBytes: z.number(),
1524
+ caption: z.object({}).catchall(z.any()),
1525
+ alt: z.object({}).catchall(z.any()),
1526
+ cropArea: z.nullable(
1527
+ z.object({
1528
+ x: z.number(),
1529
+ y: z.number(),
1530
+ width: z.number(),
1531
+ height: z.number()
1532
+ })
1533
+ ),
1534
+ publicUrl: z.string()
1535
+ })
1536
+ ),
1537
+ items: z.optional(
539
1538
  z.array(
540
1539
  z.object({
541
1540
  id: z.string(),
542
- type: z.enum(["image", "video", "document"]),
1541
+ get type() {
1542
+ return menuItemTypeSchema;
1543
+ },
543
1544
  tags: z.nullable(z.array(z.string())),
544
- bucket: z.string(),
545
- storagePath: z.string(),
546
- filename: z.string(),
547
- contentType: z.string(),
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
- ),
1545
+ priceAdjustment: z.number(),
1546
+ get currency() {
1547
+ return currencySchema;
1548
+ },
573
1549
  isActive: z.boolean(),
574
- sortIndex: z.nullable(z.string().max(255)),
575
- createdAt: z.nullable(z.any()),
576
- updatedAt: z.nullable(z.any()),
577
- createdBy: z.nullable(z.string()),
578
- updatedBy: z.nullable(z.string()),
579
- venueId: z.nullable(z.string()),
580
- publicUrl: z.nullable(z.string())
1550
+ isFeatured: z.boolean(),
1551
+ sortIndex: z.nullable(z.string()),
1552
+ dish: z.nullable(
1553
+ z.object({
1554
+ id: z.string(),
1555
+ accessor: z.string(),
1556
+ name: z.object({}).catchall(z.string()),
1557
+ shortName: z.optional(z.object({}).catchall(z.string())),
1558
+ description: z.nullable(z.object({}).catchall(z.string())),
1559
+ longDescription: z.object({}).catchall(z.string()).nullish(),
1560
+ isVegetarian: z.nullable(z.boolean()),
1561
+ isVegan: z.nullable(z.boolean()),
1562
+ isGlutenFree: z.nullable(z.boolean()),
1563
+ isDairyFree: z.nullable(z.boolean()),
1564
+ spiciness: z.nullable(z.number()),
1565
+ assets: z.optional(
1566
+ z.array(
1567
+ z.object({
1568
+ id: z.string(),
1569
+ get type() {
1570
+ return assetTypeSchema;
1571
+ },
1572
+ metadata: z.nullable(
1573
+ z.object({
1574
+ width: z.optional(z.number()),
1575
+ height: z.optional(z.number()),
1576
+ duration: z.optional(z.number())
1577
+ })
1578
+ ),
1579
+ isActive: z.boolean(),
1580
+ sortIndex: z.nullable(z.string()),
1581
+ updatedAt: z.nullable(z.any()),
1582
+ updatedBy: z.nullable(z.string()),
1583
+ createdAt: z.nullable(z.any()),
1584
+ createdBy: z.nullable(z.string()),
1585
+ venueId: z.nullable(z.string()),
1586
+ tags: z.nullable(z.array(z.string())),
1587
+ bucket: z.string(),
1588
+ storagePath: z.string(),
1589
+ filename: z.string(),
1590
+ contentType: z.string(),
1591
+ sizeBytes: z.number(),
1592
+ caption: z.object({}).catchall(z.any()),
1593
+ alt: z.object({}).catchall(z.any()),
1594
+ cropArea: z.nullable(
1595
+ z.object({
1596
+ x: z.number(),
1597
+ y: z.number(),
1598
+ width: z.number(),
1599
+ height: z.number()
1600
+ })
1601
+ ),
1602
+ publicUrl: z.string()
1603
+ })
1604
+ )
1605
+ )
1606
+ })
1607
+ ),
1608
+ beverage: z.nullable(
1609
+ z.object({
1610
+ id: z.string(),
1611
+ accessor: z.string(),
1612
+ name: z.object({}).catchall(z.string()),
1613
+ shortName: z.optional(z.object({}).catchall(z.string())),
1614
+ description: z.nullable(z.object({}).catchall(z.string())),
1615
+ longDescription: z.object({}).catchall(z.string()).nullish(),
1616
+ assets: z.optional(
1617
+ z.array(
1618
+ z.object({
1619
+ id: z.string(),
1620
+ get type() {
1621
+ return assetTypeSchema;
1622
+ },
1623
+ metadata: z.nullable(
1624
+ z.object({
1625
+ width: z.optional(z.number()),
1626
+ height: z.optional(z.number()),
1627
+ duration: z.optional(z.number())
1628
+ })
1629
+ ),
1630
+ isActive: z.boolean(),
1631
+ sortIndex: z.nullable(z.string()),
1632
+ updatedAt: z.nullable(z.any()),
1633
+ updatedBy: z.nullable(z.string()),
1634
+ createdAt: z.nullable(z.any()),
1635
+ createdBy: z.nullable(z.string()),
1636
+ venueId: z.nullable(z.string()),
1637
+ tags: z.nullable(z.array(z.string())),
1638
+ bucket: z.string(),
1639
+ storagePath: z.string(),
1640
+ filename: z.string(),
1641
+ contentType: z.string(),
1642
+ sizeBytes: z.number(),
1643
+ caption: z.object({}).catchall(z.any()),
1644
+ alt: z.object({}).catchall(z.any()),
1645
+ cropArea: z.nullable(
1646
+ z.object({
1647
+ x: z.number(),
1648
+ y: z.number(),
1649
+ width: z.number(),
1650
+ height: z.number()
1651
+ })
1652
+ ),
1653
+ publicUrl: z.string()
1654
+ })
1655
+ )
1656
+ )
1657
+ })
1658
+ )
581
1659
  })
582
1660
  )
583
- ),
584
- items: z.optional(z.array(z.object({}).catchall(z.any())))
585
- }).catchall(z.any()).describe(
586
- "Menu details. Nested arrays (items, assets, bundles, schedule, etc.) pass through; their shape follows the SDK Menu interface."
1661
+ )
1662
+ }).describe(
1663
+ "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
1664
  );
588
1665
 
1666
+ const subscriptionPeriodSchema = z.enum(["week", "month", "year"]);
1667
+
589
1668
  const fetchMenuSubscriptionsResponseSchema = z.array(
590
1669
  z.object({
591
1670
  id: z.string(),
@@ -596,34 +1675,38 @@ const fetchMenuSubscriptionsResponseSchema = z.array(
596
1675
  description: z.nullable(z.object({}).catchall(z.string())),
597
1676
  scheduleId: z.nullable(z.string()),
598
1677
  allowance: z.number(),
599
- billingPeriod: z.enum(["week", "month", "year"]),
600
- allowancePeriod: z.enum(["week", "month", "year"]),
1678
+ get billingPeriod() {
1679
+ return subscriptionPeriodSchema;
1680
+ },
1681
+ get allowancePeriod() {
1682
+ return subscriptionPeriodSchema;
1683
+ },
601
1684
  expiryInDays: z.number(),
602
1685
  price: z.number(),
603
- currency: z.enum(["EUR", "CHF"]),
1686
+ get currency() {
1687
+ return currencySchema;
1688
+ },
604
1689
  stripeProductId: z.nullable(z.string()),
605
1690
  stripePriceId: z.nullable(z.string()),
606
1691
  isActive: z.boolean(),
607
1692
  sortIndex: z.nullable(z.string()),
608
1693
  subscriberCount: z.number(),
609
1694
  redeemableTagSets: z.array(z.array(z.string())),
610
- posters: z.optional(
611
- z.array(
612
- z.object({
613
- id: z.string(),
614
- menuSubscriptionId: z.string(),
615
- storagePath: z.string(),
616
- publicUrl: z.nullable(z.string()),
617
- filename: z.string(),
618
- contentType: z.string(),
619
- sizeBytes: z.nullable(z.number()),
620
- sortIndex: z.nullable(z.string()),
621
- createdBy: z.nullable(z.string()),
622
- createdAt: z.nullable(z.string())
623
- })
624
- )
1695
+ posters: z.array(
1696
+ z.object({
1697
+ id: z.string(),
1698
+ menuSubscriptionId: z.string(),
1699
+ storagePath: z.string(),
1700
+ publicUrl: z.string(),
1701
+ filename: z.string(),
1702
+ contentType: z.string(),
1703
+ sizeBytes: z.number(),
1704
+ sortIndex: z.nullable(z.string()),
1705
+ createdBy: z.nullable(z.string()),
1706
+ createdAt: z.nullable(z.string())
1707
+ })
625
1708
  )
626
- }).catchall(z.any())
1709
+ })
627
1710
  );
628
1711
 
629
1712
  const fetchTeamOrderResponseSchema = z.object({
@@ -684,19 +1767,15 @@ const fetchTeamOrderResponseSchema = z.object({
684
1767
  items: z.array(
685
1768
  z.object({
686
1769
  id: z.string(),
687
- metadata: z.nullable(z.any()),
1770
+ metadata: z.nullable(z.object({}).catchall(z.any())),
688
1771
  menuItems: z.array(
689
1772
  z.object({
690
1773
  menuItemId: z.string(),
691
1774
  role: z.nullable(z.string()),
692
1775
  quantity: z.number(),
693
- unit: z.enum([
694
- "grams",
695
- "kilograms",
696
- "liters",
697
- "milliliters",
698
- "pieces"
699
- ])
1776
+ get unit() {
1777
+ return unitSchema;
1778
+ }
700
1779
  })
701
1780
  ),
702
1781
  isPaid: z.boolean()
@@ -752,7 +1831,9 @@ const fetchTeamOrderResponseSchema = z.object({
752
1831
  const getAreaAvailabilityResponseSchema = z.object({
753
1832
  from: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
754
1833
  to: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
755
- bookingMode: z.enum(["slot", "day"]),
1834
+ get bookingMode() {
1835
+ return areaBookingModeSchema;
1836
+ },
756
1837
  occupied: z.array(
757
1838
  z.object({
758
1839
  date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
@@ -762,63 +1843,6 @@ const getAreaAvailabilityResponseSchema = z.object({
762
1843
  )
763
1844
  });
764
1845
 
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
1846
  const getBasketTotalsRequestSchema = z.object({
823
1847
  venueAccessor: z.string().min(1),
824
1848
  basketId: z.string().min(1),
@@ -833,7 +1857,9 @@ const getBasketTotalsRequestSchema = z.object({
833
1857
  });
834
1858
 
835
1859
  const getBasketTotalsResponseSchema = z.object({
836
- currency: z.enum(["EUR", "CHF"]),
1860
+ get currency() {
1861
+ return currencySchema;
1862
+ },
837
1863
  itemsTotal: z.int().min(0).max(9007199254740991),
838
1864
  taxAmount: z.int().min(0).max(9007199254740991),
839
1865
  depositCharge: z.int().min(0).max(9007199254740991),
@@ -849,6 +1875,12 @@ const getBasketTotalsResponseSchema = z.object({
849
1875
  )
850
1876
  });
851
1877
 
1878
+ const subscriptionCreditStatusSchema = z.enum([
1879
+ "available",
1880
+ "redeemed",
1881
+ "expired"
1882
+ ]);
1883
+
852
1884
  const getSubscriptionCreditsResponseSchema = z.array(
853
1885
  z.object({
854
1886
  id: z.string(),
@@ -856,7 +1888,9 @@ const getSubscriptionCreditsResponseSchema = z.array(
856
1888
  periodStart: z.string(),
857
1889
  periodEnd: z.string(),
858
1890
  expiresAt: z.nullable(z.string()),
859
- status: z.enum(["available", "redeemed", "expired"]),
1891
+ get status() {
1892
+ return subscriptionCreditStatusSchema;
1893
+ },
860
1894
  redeemedAt: z.nullable(z.string()),
861
1895
  orderId: z.nullable(z.string()),
862
1896
  createdAt: z.nullable(z.string())
@@ -872,12 +1906,18 @@ const getSubscriptionResponseSchema = z.object({
872
1906
  description: z.nullable(z.object({}).catchall(z.string())),
873
1907
  scheduleId: z.nullable(z.string()),
874
1908
  allowance: z.int().max(9007199254740991),
875
- billingPeriod: z.enum(["week", "month", "year"]),
876
- allowancePeriod: z.enum(["week", "month", "year"]),
1909
+ get billingPeriod() {
1910
+ return subscriptionPeriodSchema;
1911
+ },
1912
+ get allowancePeriod() {
1913
+ return subscriptionPeriodSchema;
1914
+ },
877
1915
  redeemableTagSets: z.array(z.array(z.string())),
878
1916
  expiryInDays: z.nullable(z.int().max(9007199254740991)),
879
1917
  price: z.int().min(0).max(9007199254740991),
880
- currency: z.enum(["EUR", "CHF"]),
1918
+ get currency() {
1919
+ return currencySchema;
1920
+ },
881
1921
  isActive: z.boolean(),
882
1922
  sortIndex: z.nullable(z.string()),
883
1923
  posters: z.array(
@@ -912,6 +1952,38 @@ const getVenueResponseSchema = z.object({
912
1952
  "A venue. The public API exposes only the minimal id + accessor + naming + locale fields the CLI's `venues use` / `auth whoami` consume."
913
1953
  );
914
1954
 
1955
+ const integrationNotificationTypeSchema = z.enum([
1956
+ "order_created",
1957
+ "order_cancelled",
1958
+ "order_completed",
1959
+ "team_order_created",
1960
+ "reservation_created",
1961
+ "reservation_confirmed",
1962
+ "reservation_cancelled"
1963
+ ]);
1964
+
1965
+ const integrationTypeSchema = z.enum(["telegram"]);
1966
+
1967
+ const inventoryAssetStatusSchema = z.enum([
1968
+ "available",
1969
+ "in_use",
1970
+ "maintenance",
1971
+ "retired"
1972
+ ]);
1973
+
1974
+ const inventoryCategorySchema = z.enum([
1975
+ "depositware",
1976
+ "furniture",
1977
+ "equipment",
1978
+ "utensil"
1979
+ ]);
1980
+
1981
+ const invitationScenarioSchema = z.enum([
1982
+ "new_user",
1983
+ "already_member",
1984
+ "former_employee"
1985
+ ]);
1986
+
915
1987
  const joinTeamOrderRequestSchema = z.object({
916
1988
  publicId: z.string().min(1),
917
1989
  sessionId: z.string().min(1),
@@ -929,11 +2001,194 @@ const joinTeamOrderResponseSchema = z.object({
929
2001
  alreadyJoined: z.boolean()
930
2002
  });
931
2003
 
932
- const listAreasResponseSchema = z.array(
933
- z.lazy(() => areaSchema).describe(
934
- "A bookable + public area for a venue. Assets are only included when the request expands them."
935
- )
936
- );
2004
+ const jurisdictionSchema = z.enum(["DE", "CH", "FR", "IT"]);
2005
+
2006
+ const localeSchema = z.enum([
2007
+ "aa",
2008
+ "ab",
2009
+ "ae",
2010
+ "af",
2011
+ "ak",
2012
+ "am",
2013
+ "an",
2014
+ "ar",
2015
+ "as",
2016
+ "av",
2017
+ "ay",
2018
+ "az",
2019
+ "ba",
2020
+ "be",
2021
+ "bg",
2022
+ "bh",
2023
+ "bi",
2024
+ "bm",
2025
+ "bn",
2026
+ "bo",
2027
+ "br",
2028
+ "bs",
2029
+ "ca",
2030
+ "ce",
2031
+ "ch",
2032
+ "co",
2033
+ "cr",
2034
+ "cs",
2035
+ "cu",
2036
+ "cv",
2037
+ "cy",
2038
+ "da",
2039
+ "de",
2040
+ "dv",
2041
+ "dz",
2042
+ "ee",
2043
+ "el",
2044
+ "en",
2045
+ "eo",
2046
+ "es",
2047
+ "et",
2048
+ "eu",
2049
+ "fa",
2050
+ "ff",
2051
+ "fi",
2052
+ "fj",
2053
+ "fo",
2054
+ "fr",
2055
+ "fy",
2056
+ "ga",
2057
+ "gd",
2058
+ "gl",
2059
+ "gn",
2060
+ "gu",
2061
+ "gv",
2062
+ "ha",
2063
+ "he",
2064
+ "hi",
2065
+ "ho",
2066
+ "hr",
2067
+ "ht",
2068
+ "hu",
2069
+ "hy",
2070
+ "hz",
2071
+ "ia",
2072
+ "id",
2073
+ "ie",
2074
+ "ig",
2075
+ "ii",
2076
+ "ik",
2077
+ "io",
2078
+ "is",
2079
+ "it",
2080
+ "iu",
2081
+ "ja",
2082
+ "jv",
2083
+ "ka",
2084
+ "kg",
2085
+ "ki",
2086
+ "kj",
2087
+ "kk",
2088
+ "kl",
2089
+ "km",
2090
+ "kn",
2091
+ "ko",
2092
+ "kr",
2093
+ "ks",
2094
+ "ku",
2095
+ "kv",
2096
+ "kw",
2097
+ "ky",
2098
+ "la",
2099
+ "lb",
2100
+ "lg",
2101
+ "li",
2102
+ "ln",
2103
+ "lo",
2104
+ "lt",
2105
+ "lu",
2106
+ "lv",
2107
+ "mg",
2108
+ "mh",
2109
+ "mi",
2110
+ "mk",
2111
+ "ml",
2112
+ "mn",
2113
+ "mr",
2114
+ "ms",
2115
+ "mt",
2116
+ "my",
2117
+ "na",
2118
+ "nb",
2119
+ "nd",
2120
+ "ne",
2121
+ "ng",
2122
+ "nl",
2123
+ "nn",
2124
+ "no",
2125
+ "nr",
2126
+ "nv",
2127
+ "ny",
2128
+ "oc",
2129
+ "oj",
2130
+ "om",
2131
+ "or",
2132
+ "os",
2133
+ "pa",
2134
+ "pi",
2135
+ "pl",
2136
+ "ps",
2137
+ "pt",
2138
+ "qu",
2139
+ "rm",
2140
+ "rn",
2141
+ "ro",
2142
+ "ru",
2143
+ "rw",
2144
+ "sa",
2145
+ "sc",
2146
+ "sd",
2147
+ "se",
2148
+ "sg",
2149
+ "si",
2150
+ "sk",
2151
+ "sl",
2152
+ "sm",
2153
+ "sn",
2154
+ "so",
2155
+ "sq",
2156
+ "sr",
2157
+ "ss",
2158
+ "st",
2159
+ "su",
2160
+ "sv",
2161
+ "sw",
2162
+ "ta",
2163
+ "te",
2164
+ "tg",
2165
+ "th",
2166
+ "ti",
2167
+ "tk",
2168
+ "tl",
2169
+ "tn",
2170
+ "to",
2171
+ "tr",
2172
+ "ts",
2173
+ "tt",
2174
+ "tw",
2175
+ "ty",
2176
+ "ug",
2177
+ "uk",
2178
+ "ur",
2179
+ "uz",
2180
+ "ve",
2181
+ "vi",
2182
+ "vo",
2183
+ "wa",
2184
+ "wo",
2185
+ "xh",
2186
+ "yi",
2187
+ "yo",
2188
+ "za",
2189
+ "zh",
2190
+ "zu"
2191
+ ]);
937
2192
 
938
2193
  const makeReservationRequestSchema = z.object({
939
2194
  venueAccessor: z.string().min(1).describe(
@@ -953,14 +2208,12 @@ const makeReservationRequestSchema = z.object({
953
2208
  customerPhone: z.string().min(1).describe(
954
2209
  "Phone number for reservation confirmations and updates. Include country code for international numbers."
955
2210
  ).nullish(),
956
- contactPreference: z.optional(
957
- z.enum(["email", "phone", "sms", "none"]).describe("Preferred contact method. Defaults to `email` when omitted.")
958
- ),
959
- source: z.optional(
960
- z.enum(["website", "phone", "walk_in"]).describe(
961
- "Origin of the reservation request. Defaults to `website` when omitted."
962
- )
963
- ),
2211
+ get contactPreference() {
2212
+ return contactPreferenceSchema.optional();
2213
+ },
2214
+ get source() {
2215
+ return areaBookingRequestSourceSchema.optional();
2216
+ },
964
2217
  specialRequests: z.string().max(500).describe(
965
2218
  "Any dietary restrictions, allergies, or special occasions (max 500 characters)"
966
2219
  ).nullish(),
@@ -969,6 +2222,16 @@ const makeReservationRequestSchema = z.object({
969
2222
  ).nullish()
970
2223
  }).describe("Request payload for making a new reservation");
971
2224
 
2225
+ const reservationStatusSchema = z.enum([
2226
+ "pending",
2227
+ "confirmed",
2228
+ "arrived",
2229
+ "seated",
2230
+ "completed",
2231
+ "cancelled",
2232
+ "no_show"
2233
+ ]);
2234
+
972
2235
  const makeReservationResponseSchema = z.object({
973
2236
  id: z.uuid().describe("Unique identifier for the reservation"),
974
2237
  venueId: z.uuid().describe("Restaurant/tenant identifier"),
@@ -987,16 +2250,12 @@ const makeReservationResponseSchema = z.object({
987
2250
  customerLastName: z.string().describe("Last name of the customer"),
988
2251
  customerEmail: z.nullable(z.string().describe("Customer email address")),
989
2252
  customerPhone: z.nullable(z.string().describe("Customer phone number")),
990
- contactPreference: z.enum(["email", "phone", "sms", "none"]).describe("Preferred contact method"),
991
- status: z.enum([
992
- "pending",
993
- "confirmed",
994
- "arrived",
995
- "seated",
996
- "completed",
997
- "cancelled",
998
- "no_show"
999
- ]).describe("Current status of the reservation"),
2253
+ get contactPreference() {
2254
+ return contactPreferenceSchema;
2255
+ },
2256
+ get status() {
2257
+ return reservationStatusSchema;
2258
+ },
1000
2259
  confirmationCode: z.nullable(
1001
2260
  z.string().describe("6-character confirmation code for the reservation")
1002
2261
  ),
@@ -1009,13 +2268,15 @@ const makeReservationResponseSchema = z.object({
1009
2268
  cancelledAt: z.nullable(
1010
2269
  z.any().describe("When the reservation was cancelled")
1011
2270
  ),
1012
- cancellationReason: z.nullable(
1013
- z.enum(["customer_request", "restaurant_request"]).describe("Who initiated the cancellation")
1014
- ),
2271
+ get cancellationReason() {
2272
+ return cancellationReasonSchema;
2273
+ },
1015
2274
  cancellationNote: z.nullable(
1016
2275
  z.string().describe("Additional cancellation details")
1017
2276
  ),
1018
- source: z.enum(["website", "phone", "walk_in"]).describe("Origin of the reservation"),
2277
+ get source() {
2278
+ return areaBookingRequestSourceSchema;
2279
+ },
1019
2280
  specialRequests: z.nullable(
1020
2281
  z.string().describe("Any special requirements or notes")
1021
2282
  ),
@@ -1032,13 +2293,39 @@ const makeReservationResponseSchema = z.object({
1032
2293
  updatedAt: z.nullable(z.any().describe("Last update timestamp"))
1033
2294
  }).describe("Successfully created reservation");
1034
2295
 
1035
- const patchFeatureImageRequestSchema = z.object({
2296
+ const mentionEntityTypeSchema = z.enum([
2297
+ "dish",
2298
+ "beverage",
2299
+ "ingredient",
2300
+ "menu",
2301
+ "ritual"
2302
+ ]);
2303
+
2304
+ const mentionFieldFormatterSchema = z.enum([
2305
+ "text",
2306
+ "currency",
2307
+ "integer",
2308
+ "percentage",
2309
+ "boolean"
2310
+ ]);
2311
+
2312
+ const mentionKindSchema = z.enum(["link", "value"]);
2313
+
2314
+ const patchArticleFeatureImageBodySchema = z.object({
1036
2315
  caption: z.optional(z.object({}).catchall(z.any())),
1037
2316
  alt: z.optional(z.object({}).catchall(z.any()))
1038
2317
  }).describe(
1039
2318
  "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
2319
  );
1041
2320
 
2321
+ const pendingSuperadminTransferStatusSchema = z.enum([
2322
+ "pending_invite",
2323
+ "accepted_awaiting_payment",
2324
+ "completed",
2325
+ "cancelled",
2326
+ "expired"
2327
+ ]);
2328
+
1042
2329
  const placeOrderRequestSchema = z.object({
1043
2330
  venueAccessor: z.string().min(1),
1044
2331
  basketId: z.string().min(1),
@@ -1071,14 +2358,18 @@ const placeOrderResponseSchema = z.object({
1071
2358
  quickReferenceNumber: z.nullable(
1072
2359
  z.int().min(-9007199254740991).max(9007199254740991)
1073
2360
  ),
1074
- currency: z.enum(["EUR", "CHF"])
2361
+ get currency() {
2362
+ return currencySchema;
2363
+ }
1075
2364
  });
1076
2365
 
1077
2366
  const reduceDeltaPaymentIntentRequestSchema = z.object({
1078
2367
  venueAccessor: z.string().min(1),
1079
2368
  basketId: z.string().min(1),
1080
2369
  sessionId: z.string().min(1),
1081
- currency: z.enum(["EUR", "CHF"]),
2370
+ get currency() {
2371
+ return currencySchema;
2372
+ },
1082
2373
  declaredReturns: z.optional(
1083
2374
  z.array(
1084
2375
  z.object({
@@ -1104,6 +2395,18 @@ const removeFromBasketResponseSchema = z.object({
1104
2395
  }
1105
2396
  });
1106
2397
 
2398
+ const reservationPromotionStatusSchema = z.enum([
2399
+ "applied",
2400
+ "redeemed",
2401
+ "expired"
2402
+ ]);
2403
+
2404
+ const scanTokenEntityTypeSchema = z.enum(["order", "depositware"]);
2405
+
2406
+ const setArticleFeatureImageUploadBodySchema = z.object({
2407
+ file: z.string().describe("Image file (multipart/form-data field)")
2408
+ });
2409
+
1107
2410
  const setBasketDeclaredReturnsRequestSchema = z.object({
1108
2411
  venueAccessor: z.string().min(1),
1109
2412
  basketId: z.string().min(1),
@@ -1170,7 +2473,21 @@ const setFulfillmentAtTeamOrderResponseSchema = z.object({
1170
2473
  deadlineAt: z.nullable(z.iso.datetime())
1171
2474
  });
1172
2475
 
1173
- const submitAreaBookingRequestSchema = z.object({
2476
+ const setOrderLeadSettledRequestSchema = z.object({
2477
+ publicId: z.string().min(1),
2478
+ sessionId: z.string().min(1),
2479
+ orderId: z.uuid(),
2480
+ settled: z.boolean()
2481
+ });
2482
+
2483
+ const setOrderLeadSettledResponseSchema = z.object({
2484
+ orderId: z.uuid(),
2485
+ leadSettledAt: z.nullable(z.string())
2486
+ });
2487
+
2488
+ const sortOrderSchema = z.enum(["asc", "desc"]);
2489
+
2490
+ const submitAreaBookingPayloadSchema = z.object({
1174
2491
  requestedDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1175
2492
  requestedStartTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
1176
2493
  requestedEndTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
@@ -1180,10 +2497,12 @@ const submitAreaBookingRequestSchema = z.object({
1180
2497
  customerEmail: z.email(),
1181
2498
  customerPhone: z.optional(z.string()),
1182
2499
  message: z.optional(z.string()),
1183
- source: z.optional(z.enum(["website", "phone", "walk_in"]))
2500
+ get source() {
2501
+ return areaBookingRequestSourceSchema.optional();
2502
+ }
1184
2503
  });
1185
2504
 
1186
- const submitAreaBookingResponseSchema = z.object({
2505
+ const submitAreaBookingRequestResponseSchema = z.object({
1187
2506
  id: z.string(),
1188
2507
  venueId: z.string(),
1189
2508
  areaId: z.string(),
@@ -1196,8 +2515,12 @@ const submitAreaBookingResponseSchema = z.object({
1196
2515
  customerEmail: z.string(),
1197
2516
  customerPhone: z.nullable(z.string()),
1198
2517
  message: z.nullable(z.string()),
1199
- source: z.enum(["website", "phone", "walk_in"]),
1200
- status: z.enum(["pending", "approved", "rejected", "cancelled"]),
2518
+ get source() {
2519
+ return areaBookingRequestSourceSchema;
2520
+ },
2521
+ get status() {
2522
+ return areaBookingRequestStatusSchema;
2523
+ },
1201
2524
  areaBookingId: z.nullable(z.string()),
1202
2525
  createdAt: z.nullable(z.string()),
1203
2526
  updatedAt: z.nullable(z.string())
@@ -1219,7 +2542,7 @@ const submitTeamOrderResponseSchema = z.object({
1219
2542
  placedAt: z.iso.datetime()
1220
2543
  });
1221
2544
 
1222
- const subscribeRequestSchema = z.object({
2545
+ const subscribeToSubscriptionBodySchema = z.object({
1223
2546
  email: z.email(),
1224
2547
  firstName: z.optional(z.string()),
1225
2548
  lastName: z.optional(z.string()),
@@ -1228,11 +2551,19 @@ const subscribeRequestSchema = z.object({
1228
2551
  cancelUrl: z.url()
1229
2552
  });
1230
2553
 
1231
- const subscribeResponseSchema = z.object({
2554
+ const subscribeToSubscriptionResponseSchema = z.object({
1232
2555
  checkoutUrl: z.nullable(z.url()),
1233
2556
  sessionId: z.string()
1234
2557
  });
1235
2558
 
2559
+ const subscriberStatusSchema = z.enum([
2560
+ "active",
2561
+ "paused",
2562
+ "cancelled",
2563
+ "past_due",
2564
+ "trialing"
2565
+ ]);
2566
+
1236
2567
  const switchFulfillmentTeamOrderRequestSchema = z.object({
1237
2568
  publicId: z.string().min(1),
1238
2569
  sessionId: z.string().min(1),
@@ -1255,6 +2586,15 @@ const switchFulfillmentTeamOrderResponseSchema = z.object({
1255
2586
  deliveryAddressId: z.nullable(z.string())
1256
2587
  });
1257
2588
 
2589
+ const teamOrderPaymentStatusSchema = z.enum([
2590
+ "authorized",
2591
+ "captured",
2592
+ "cash_pending",
2593
+ "cash_received",
2594
+ "voided",
2595
+ "failed"
2596
+ ]);
2597
+
1258
2598
  const updateDeliveryAddressTeamOrderRequestSchema = z.object({
1259
2599
  publicId: z.string().min(1),
1260
2600
  sessionId: z.string().min(1),
@@ -1268,22 +2608,55 @@ const updateDeliveryAddressTeamOrderResponseSchema = z.object({
1268
2608
  deliveryAddressId: z.string()
1269
2609
  });
1270
2610
 
1271
- const uploadFeatureImageRequestSchema = z.object({
1272
- file: z.any().describe("Image file (multipart/form-data field)")
1273
- });
2611
+ const venueAssetTypeSchema = z.enum([
2612
+ "logomark",
2613
+ "wordmark",
2614
+ "combinationmark_horizontal",
2615
+ "combinationmark_vertical"
2616
+ ]);
2617
+
2618
+ const venueChargeKindSchema = z.enum(["base", "addon"]);
2619
+
2620
+ const venueTypeSchema = z.enum([
2621
+ "restaurant",
2622
+ "fine_dining_restaurant",
2623
+ "ghost_kitchen",
2624
+ "food_truck"
2625
+ ]);
2626
+
2627
+ const venueUserStatusSchema = z.enum(["pending", "confirmed", "revoked"]);
1274
2628
 
1275
2629
  const schemas = {
2630
+ AbandonBasketRequest: abandonBasketRequestSchema,
2631
+ AbandonBasketResponse: abandonBasketResponseSchema,
2632
+ ActorType: actorTypeSchema,
1276
2633
  AddToBasketRequest: addToBasketRequestSchema,
1277
2634
  AddToBasketResponse: addToBasketResponseSchema,
2635
+ AdditiveFunction: additiveFunctionSchema,
2636
+ AreaBookingMode: areaBookingModeSchema,
2637
+ AreaBookingRequestSource: areaBookingRequestSourceSchema,
2638
+ AreaBookingRequestStatus: areaBookingRequestStatusSchema,
2639
+ AreaBookingStatus: areaBookingStatusSchema,
1278
2640
  Area: areaSchema,
2641
+ ArticleEditorSaveState: articleEditorSaveStateSchema,
1279
2642
  ArticleMentionCounts: articleMentionCountsSchema,
2643
+ ArticleStatus: articleStatusSchema,
2644
+ AssetType: assetTypeSchema,
2645
+ AutoExtendFulfillmentIfExpiredRequest: autoExtendFulfillmentIfExpiredRequestSchema,
2646
+ AutoExtendFulfillmentIfExpiredResponse: autoExtendFulfillmentIfExpiredResponseSchema,
2647
+ BasketStatus: basketStatusSchema,
1280
2648
  BasketTotals: basketTotalsSchema,
2649
+ BeverageCategory: beverageCategorySchema,
2650
+ BillingMode: billingModeSchema,
1281
2651
  CancelSubscriptionRequest: cancelSubscriptionRequestSchema,
1282
2652
  CancelSubscriptionResponse: cancelSubscriptionResponseSchema,
1283
2653
  CancelTeamOrderRequest: cancelTeamOrderRequestSchema,
1284
2654
  CancelTeamOrderResponse: cancelTeamOrderResponseSchema,
2655
+ CancellationReason: cancellationReasonSchema,
1285
2656
  ConfirmOrderRequest: confirmOrderRequestSchema,
1286
2657
  ConfirmOrderResponse: confirmOrderResponseSchema,
2658
+ ContactPreference: contactPreferenceSchema,
2659
+ CountryCode: countryCodeSchema,
1287
2660
  CreateDeltaPaymentIntentRequest: createDeltaPaymentIntentRequestSchema,
1288
2661
  CreateDeltaPaymentIntentResponse: createDeltaPaymentIntentResponseSchema,
1289
2662
  CreateEventRequest: createEventRequestSchema,
@@ -1292,42 +2665,73 @@ const schemas = {
1292
2665
  CreatePaymentIntentResponse: createPaymentIntentResponseSchema,
1293
2666
  CreateTeamOrderRequest: createTeamOrderRequestSchema,
1294
2667
  CreateTeamOrderResponse: createTeamOrderResponseSchema,
2668
+ Currency: currencySchema,
2669
+ DayOfWeek: dayOfWeekSchema,
1295
2670
  DeliveryAddress: deliveryAddressSchema,
2671
+ DepositTransactionType: depositTransactionTypeSchema,
2672
+ DepositwareStatus: depositwareStatusSchema,
1296
2673
  EditArticleRequest: editArticleRequestSchema,
1297
2674
  EditArticleResponse: editArticleResponseSchema,
2675
+ EntityOwnerType: entityOwnerTypeSchema,
2676
+ EnumFalse: enumFalseSchema,
2677
+ EnumTrue: enumTrueSchema,
1298
2678
  ExtendDeadlineTeamOrderRequest: extendDeadlineTeamOrderRequestSchema,
1299
2679
  ExtendDeadlineTeamOrderResponse: extendDeadlineTeamOrderResponseSchema,
2680
+ FeatureCategory: featureCategorySchema,
1300
2681
  FeatureImage: featureImageSchema,
2682
+ FeatureStatus: featureStatusSchema,
2683
+ FetchAreaBookingsResponse: fetchAreaBookingsResponseSchema,
2684
+ FetchAreaResponse: fetchAreaResponseSchema,
2685
+ FetchAreasResponse: fetchAreasResponseSchema,
1301
2686
  FetchArticleResponse: fetchArticleResponseSchema,
1302
2687
  FetchArticlesResponse: fetchArticlesResponseSchema,
2688
+ FetchBasketResponse: fetchBasketResponseSchema,
1303
2689
  FetchEventResponse: fetchEventResponseSchema,
1304
2690
  FetchEventsResponse: fetchEventsResponseSchema,
2691
+ FetchLatestOrderResponse: fetchLatestOrderResponseSchema,
1305
2692
  FetchMenuBundlesResponse: fetchMenuBundlesResponseSchema,
1306
2693
  FetchMenuResponse: fetchMenuResponseSchema,
1307
2694
  FetchMenuSubscriptionsResponse: fetchMenuSubscriptionsResponseSchema,
1308
2695
  FetchTeamOrderResponse: fetchTeamOrderResponseSchema,
1309
2696
  FulfillmentType: fulfillmentTypeSchema,
1310
2697
  GetAreaAvailabilityResponse: getAreaAvailabilityResponseSchema,
1311
- GetAreaResponse: getAreaResponseSchema,
1312
2698
  GetBasketTotalsRequest: getBasketTotalsRequestSchema,
1313
2699
  GetBasketTotalsResponse: getBasketTotalsResponseSchema,
1314
2700
  GetSubscriptionCreditsResponse: getSubscriptionCreditsResponseSchema,
1315
2701
  GetSubscriptionResponse: getSubscriptionResponseSchema,
1316
2702
  GetVenueResponse: getVenueResponseSchema,
2703
+ IntegrationNotificationType: integrationNotificationTypeSchema,
2704
+ IntegrationType: integrationTypeSchema,
2705
+ InventoryAssetStatus: inventoryAssetStatusSchema,
2706
+ InventoryCategory: inventoryCategorySchema,
2707
+ InvitationScenario: invitationScenarioSchema,
1317
2708
  JoinTeamOrderRequest: joinTeamOrderRequestSchema,
1318
2709
  JoinTeamOrderResponse: joinTeamOrderResponseSchema,
1319
- ListAreasResponse: listAreasResponseSchema,
2710
+ Jurisdiction: jurisdictionSchema,
2711
+ Locale: localeSchema,
1320
2712
  MakeReservationRequest: makeReservationRequestSchema,
1321
2713
  MakeReservationResponse: makeReservationResponseSchema,
2714
+ MentionEntityType: mentionEntityTypeSchema,
2715
+ MentionFieldFormatter: mentionFieldFormatterSchema,
2716
+ MentionKind: mentionKindSchema,
2717
+ MenuItemType: menuItemTypeSchema,
1322
2718
  OgImage: ogImageSchema,
2719
+ OrderStatus: orderStatusSchema,
1323
2720
  ParticipantStatus: participantStatusSchema,
1324
- PatchFeatureImageRequest: patchFeatureImageRequestSchema,
2721
+ PatchArticleFeatureImageBody: patchArticleFeatureImageBodySchema,
1325
2722
  PaymentMethod: paymentMethodSchema,
2723
+ PaymentStatus: paymentStatusSchema,
2724
+ PendingSuperadminTransferStatus: pendingSuperadminTransferStatusSchema,
1326
2725
  PlaceOrderRequest: placeOrderRequestSchema,
1327
2726
  PlaceOrderResponse: placeOrderResponseSchema,
2727
+ PromotionBenefitType: promotionBenefitTypeSchema,
1328
2728
  ReduceDeltaPaymentIntentRequest: reduceDeltaPaymentIntentRequestSchema,
1329
2729
  ReduceDeltaPaymentIntentResponse: reduceDeltaPaymentIntentResponseSchema,
1330
2730
  RemoveFromBasketResponse: removeFromBasketResponseSchema,
2731
+ ReservationPromotionStatus: reservationPromotionStatusSchema,
2732
+ ReservationStatus: reservationStatusSchema,
2733
+ ScanTokenEntityType: scanTokenEntityTypeSchema,
2734
+ SetArticleFeatureImageUploadBody: setArticleFeatureImageUploadBodySchema,
1331
2735
  SetBasketDeclaredReturnsRequest: setBasketDeclaredReturnsRequestSchema,
1332
2736
  SetBasketDeclaredReturnsResponse: setBasketDeclaredReturnsResponseSchema,
1333
2737
  SetDiningLocationTeamOrderRequest: setDiningLocationTeamOrderRequestSchema,
@@ -1336,18 +2740,30 @@ const schemas = {
1336
2740
  SetDiningTimeTeamOrderResponse: setDiningTimeTeamOrderResponseSchema,
1337
2741
  SetFulfillmentAtTeamOrderRequest: setFulfillmentAtTeamOrderRequestSchema,
1338
2742
  SetFulfillmentAtTeamOrderResponse: setFulfillmentAtTeamOrderResponseSchema,
1339
- SubmitAreaBookingRequest: submitAreaBookingRequestSchema,
1340
- SubmitAreaBookingResponse: submitAreaBookingResponseSchema,
2743
+ SetOrderLeadSettledRequest: setOrderLeadSettledRequestSchema,
2744
+ SetOrderLeadSettledResponse: setOrderLeadSettledResponseSchema,
2745
+ SlotMode: slotModeSchema,
2746
+ SortOrder: sortOrderSchema,
2747
+ SubmitAreaBookingPayload: submitAreaBookingPayloadSchema,
2748
+ SubmitAreaBookingRequestResponse: submitAreaBookingRequestResponseSchema,
1341
2749
  SubmitTeamOrderRequest: submitTeamOrderRequestSchema,
1342
2750
  SubmitTeamOrderResponse: submitTeamOrderResponseSchema,
1343
- SubscribeRequest: subscribeRequestSchema,
1344
- SubscribeResponse: subscribeResponseSchema,
2751
+ SubscribeToSubscriptionBody: subscribeToSubscriptionBodySchema,
2752
+ SubscribeToSubscriptionResponse: subscribeToSubscriptionResponseSchema,
2753
+ SubscriberStatus: subscriberStatusSchema,
2754
+ SubscriptionCreditStatus: subscriptionCreditStatusSchema,
2755
+ SubscriptionPeriod: subscriptionPeriodSchema,
1345
2756
  SwitchFulfillmentTeamOrderRequest: switchFulfillmentTeamOrderRequestSchema,
1346
2757
  SwitchFulfillmentTeamOrderResponse: switchFulfillmentTeamOrderResponseSchema,
2758
+ TeamOrderPaymentStatus: teamOrderPaymentStatusSchema,
1347
2759
  TeamOrderStatus: teamOrderStatusSchema,
2760
+ Unit: unitSchema,
1348
2761
  UpdateDeliveryAddressTeamOrderRequest: updateDeliveryAddressTeamOrderRequestSchema,
1349
2762
  UpdateDeliveryAddressTeamOrderResponse: updateDeliveryAddressTeamOrderResponseSchema,
1350
- UploadFeatureImageRequest: uploadFeatureImageRequestSchema
2763
+ VenueAssetType: venueAssetTypeSchema,
2764
+ VenueChargeKind: venueChargeKindSchema,
2765
+ VenueType: venueTypeSchema,
2766
+ VenueUserStatus: venueUserStatusSchema
1351
2767
  };
1352
2768
 
1353
2769
  export { schemas };