order3000 1.2.0 → 1.4.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/client.cjs +27 -57
- package/dist/client.d.cts +111 -77
- package/dist/client.d.mts +111 -77
- package/dist/client.mjs +27 -57
- package/dist/schemas.cjs +104 -28
- package/dist/schemas.d.cts +63 -28
- package/dist/schemas.d.mts +63 -28
- package/dist/schemas.mjs +104 -28
- package/package.json +2 -2
package/dist/client.cjs
CHANGED
|
@@ -116,13 +116,9 @@ class BaseResource {
|
|
|
116
116
|
"Content-Type": "application/json"
|
|
117
117
|
},
|
|
118
118
|
body: data ? JSON.stringify(data) : void 0,
|
|
119
|
-
signal: AbortSignal.timeout(36e4)
|
|
119
|
+
signal: AbortSignal.timeout(36e4),
|
|
120
|
+
cache: cacheOptions?.cache ?? "no-store"
|
|
120
121
|
};
|
|
121
|
-
if (cacheOptions?.next !== void 0) {
|
|
122
|
-
init.next = cacheOptions.next;
|
|
123
|
-
} else {
|
|
124
|
-
init.cache = cacheOptions?.cache ?? "no-store";
|
|
125
|
-
}
|
|
126
122
|
const response = await fetch(url, init);
|
|
127
123
|
if (!response.ok) {
|
|
128
124
|
let body = "";
|
|
@@ -247,11 +243,12 @@ class AreasResource extends BaseResource {
|
|
|
247
243
|
return this.request("GET", queryString);
|
|
248
244
|
}
|
|
249
245
|
/**
|
|
250
|
-
* Fetch a single area by id or accessor.
|
|
246
|
+
* Fetch a single area by id or accessor. The server resolves either
|
|
247
|
+
* form transparently.
|
|
251
248
|
*/
|
|
252
|
-
async
|
|
249
|
+
async get(idOrAccessor, options) {
|
|
253
250
|
const queryString = this.buildExpandQuery(options?.expand);
|
|
254
|
-
return this.request("GET", `/${
|
|
251
|
+
return this.request("GET", `/${idOrAccessor}${queryString}`);
|
|
255
252
|
}
|
|
256
253
|
/**
|
|
257
254
|
* List occupied date/time windows for an area between `from` and `to`.
|
|
@@ -312,9 +309,10 @@ class ArticlesResource extends BaseResource {
|
|
|
312
309
|
}
|
|
313
310
|
/**
|
|
314
311
|
* Fetch a single article by id or accessor within the active venue.
|
|
315
|
-
*
|
|
312
|
+
* The server resolves either form transparently. Returns the full row
|
|
313
|
+
* including the TipTap `content` document.
|
|
316
314
|
*/
|
|
317
|
-
async
|
|
315
|
+
async get(idOrAccessor) {
|
|
318
316
|
return this.request("GET", `/${encodeURIComponent(idOrAccessor)}`);
|
|
319
317
|
}
|
|
320
318
|
/**
|
|
@@ -543,27 +541,15 @@ class EventsResource extends BaseResource {
|
|
|
543
541
|
return this.request("POST", "", event);
|
|
544
542
|
}
|
|
545
543
|
/**
|
|
546
|
-
* Get a single event by
|
|
547
|
-
*
|
|
548
|
-
* @
|
|
549
|
-
*/
|
|
550
|
-
async get(eventId) {
|
|
551
|
-
return this.request("GET", `/${eventId}`);
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* Get an event by accessor (slug)
|
|
555
|
-
* @param accessor - The event accessor (e.g., 'lunch-menu')
|
|
544
|
+
* Get a single event by id or accessor (slug), with optional `expand`
|
|
545
|
+
* parts. The server resolves either form transparently.
|
|
546
|
+
* @param idOrAccessor - The event UUID or accessor (e.g., 'lunch-menu')
|
|
556
547
|
* @param options - Optional expand options
|
|
557
548
|
* @returns The event with optional schedule, timeSlots, menus, and posters
|
|
558
549
|
*/
|
|
559
|
-
async
|
|
550
|
+
async get(idOrAccessor, options) {
|
|
560
551
|
const queryString = this.buildQueryString(options);
|
|
561
|
-
return this.request(
|
|
562
|
-
"GET",
|
|
563
|
-
`/${accessor}${queryString}`,
|
|
564
|
-
void 0,
|
|
565
|
-
{ next: { revalidate: 2700 } }
|
|
566
|
-
);
|
|
552
|
+
return this.request("GET", `/${idOrAccessor}${queryString}`);
|
|
567
553
|
}
|
|
568
554
|
buildQueryString(options) {
|
|
569
555
|
if (!options?.expand?.length) return "";
|
|
@@ -596,11 +582,11 @@ class EventsResource extends BaseResource {
|
|
|
596
582
|
}
|
|
597
583
|
/**
|
|
598
584
|
* List the posters attached to an event. Convenience over
|
|
599
|
-
* `
|
|
585
|
+
* `get(idOrAccessor, { expand: ['posters'] })` — returns the
|
|
600
586
|
* `posters[]` array (empty when the event has none).
|
|
601
587
|
*/
|
|
602
588
|
async listPosters(idOrAccessor) {
|
|
603
|
-
const event = await this.
|
|
589
|
+
const event = await this.get(idOrAccessor, {
|
|
604
590
|
expand: ["posters"]
|
|
605
591
|
});
|
|
606
592
|
return event.posters ?? [];
|
|
@@ -641,24 +627,15 @@ class MenusResource extends BaseResource {
|
|
|
641
627
|
super(tokenManager, baseUrl, "/menus");
|
|
642
628
|
}
|
|
643
629
|
/**
|
|
644
|
-
* Get a menu by
|
|
645
|
-
*
|
|
630
|
+
* Get a menu by id or accessor (slug), with optional `expand` parts.
|
|
631
|
+
* The server resolves either form transparently.
|
|
632
|
+
* @param idOrAccessor - The menu UUID or accessor (slug)
|
|
646
633
|
* @param options - Optional expand options
|
|
647
634
|
* @returns The menu with optional items and assets
|
|
648
635
|
*/
|
|
649
|
-
async get(
|
|
636
|
+
async get(idOrAccessor, options) {
|
|
650
637
|
const queryString = this.buildQueryString(options);
|
|
651
|
-
return this.request("GET", `/${
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Get a menu by accessor
|
|
655
|
-
* @param accessor - The menu accessor (slug)
|
|
656
|
-
* @param options - Optional expand options
|
|
657
|
-
* @returns The menu with optional items and assets
|
|
658
|
-
*/
|
|
659
|
-
async getByAccessor(accessor, options) {
|
|
660
|
-
const queryString = this.buildQueryString(options);
|
|
661
|
-
return this.request("GET", `/${accessor}${queryString}`);
|
|
638
|
+
return this.request("GET", `/${idOrAccessor}${queryString}`);
|
|
662
639
|
}
|
|
663
640
|
/**
|
|
664
641
|
* Get all bundles for a menu
|
|
@@ -787,20 +764,13 @@ class SubscriptionsResource extends BaseResource {
|
|
|
787
764
|
super(tokenManager, baseUrl, "/subscriptions");
|
|
788
765
|
}
|
|
789
766
|
/**
|
|
790
|
-
* Get a subscription by
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
793
|
-
*/
|
|
794
|
-
async get(id) {
|
|
795
|
-
return this.request("GET", `/${id}`);
|
|
796
|
-
}
|
|
797
|
-
/**
|
|
798
|
-
* Get a subscription by accessor
|
|
799
|
-
* @param accessor - The subscription accessor (slug)
|
|
767
|
+
* Get a subscription by id or accessor (slug). The server resolves
|
|
768
|
+
* either form transparently.
|
|
769
|
+
* @param idOrAccessor - The subscription UUID or accessor (slug)
|
|
800
770
|
* @returns The subscription with posters
|
|
801
771
|
*/
|
|
802
|
-
async
|
|
803
|
-
return this.request("GET", `/${
|
|
772
|
+
async get(idOrAccessor) {
|
|
773
|
+
return this.request("GET", `/${idOrAccessor}`);
|
|
804
774
|
}
|
|
805
775
|
/**
|
|
806
776
|
* Subscribe a customer to a subscription plan via Stripe Checkout
|
|
@@ -1053,7 +1023,7 @@ class VenuesResource {
|
|
|
1053
1023
|
* — the CLI hits this to prove the accessor exists and to cache the
|
|
1054
1024
|
* resolved UUID + display fields locally.
|
|
1055
1025
|
*/
|
|
1056
|
-
async
|
|
1026
|
+
async get(idOrAccessor) {
|
|
1057
1027
|
const token = await this.tokenManager.getToken();
|
|
1058
1028
|
const url = `${this.baseUrl}/venues/${encodeURIComponent(idOrAccessor)}`;
|
|
1059
1029
|
const response = await fetch(url, {
|
package/dist/client.d.cts
CHANGED
|
@@ -30,21 +30,20 @@ declare class TokenManager {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Per-call cache override.
|
|
33
|
+
* Per-call cache override. SDK reads are uniformly `cache: 'no-store'`
|
|
34
34
|
* — correct for live-read endpoints (basket, team-order, payment
|
|
35
35
|
* intents) where any caching causes stale responses against realtime
|
|
36
|
-
* mutations.
|
|
37
|
-
* static generation
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
36
|
+
* mutations. No SDK method bakes in ISR: apps that consume near-static
|
|
37
|
+
* data during static generation own caching at the call site by
|
|
38
|
+
* wrapping the SDK call in Next.js `unstable_cache(fn, key, { revalidate })`
|
|
39
|
+
* (e.g. thamarai's `getTiffinBoxEvent` / `getALaCarteMenu`), which is
|
|
40
|
+
* what lets Next.js pre-render the page during the build instead of
|
|
41
|
+
* bailing out to dynamic rendering with `DYNAMIC_SERVER_USAGE`. The
|
|
42
|
+
* `cache` field below remains only as a per-call escape hatch for the
|
|
43
|
+
* rare reader that needs a non-default `RequestCache` value.
|
|
41
44
|
*/
|
|
42
45
|
interface RequestCacheOptions {
|
|
43
46
|
cache?: RequestCache;
|
|
44
|
-
next?: {
|
|
45
|
-
revalidate?: number | false;
|
|
46
|
-
tags?: string[];
|
|
47
|
-
};
|
|
48
47
|
}
|
|
49
48
|
declare abstract class BaseResource {
|
|
50
49
|
protected readonly tokenManager: TokenManager;
|
|
@@ -71,9 +70,18 @@ interface components {
|
|
|
71
70
|
ownerEntityId: string;
|
|
72
71
|
channel: components["schemas"]["AdChannel"];
|
|
73
72
|
status: components["schemas"]["AdStatus"];
|
|
73
|
+
campaignId: string | null;
|
|
74
74
|
content: (string | number | boolean | (null)) | {
|
|
75
75
|
[key: string]: unknown;
|
|
76
76
|
} | unknown[];
|
|
77
|
+
keywords: (string | number | boolean | (null)) | {
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
} | unknown[];
|
|
80
|
+
negativeKeywords: (string | number | boolean | (null)) | {
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
} | unknown[];
|
|
83
|
+
publishedContentHash: string | null;
|
|
84
|
+
publishedAt: unknown;
|
|
77
85
|
createdBy: string | null;
|
|
78
86
|
updatedBy: string | null;
|
|
79
87
|
createdAt: unknown;
|
|
@@ -87,9 +95,18 @@ interface components {
|
|
|
87
95
|
ownerEntityId: string;
|
|
88
96
|
channel: components["schemas"]["AdChannel"];
|
|
89
97
|
status: components["schemas"]["AdStatus"];
|
|
98
|
+
campaignId: string | null;
|
|
90
99
|
content: (string | number | boolean | (null)) | {
|
|
91
100
|
[key: string]: unknown;
|
|
92
101
|
} | unknown[];
|
|
102
|
+
keywords: (string | number | boolean | (null)) | {
|
|
103
|
+
[key: string]: unknown;
|
|
104
|
+
} | unknown[];
|
|
105
|
+
negativeKeywords: (string | number | boolean | (null)) | {
|
|
106
|
+
[key: string]: unknown;
|
|
107
|
+
} | unknown[];
|
|
108
|
+
publishedContentHash: string | null;
|
|
109
|
+
publishedAt: unknown;
|
|
93
110
|
createdBy: string | null;
|
|
94
111
|
updatedBy: string | null;
|
|
95
112
|
createdAt: unknown;
|
|
@@ -116,9 +133,18 @@ interface components {
|
|
|
116
133
|
ownerEntityId: string;
|
|
117
134
|
channel: components["schemas"]["AdChannel"];
|
|
118
135
|
status: components["schemas"]["AdStatus"];
|
|
136
|
+
campaignId: string | null;
|
|
119
137
|
content: (string | number | boolean | (null)) | {
|
|
120
138
|
[key: string]: unknown;
|
|
121
139
|
} | unknown[];
|
|
140
|
+
keywords: (string | number | boolean | (null)) | {
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
} | unknown[];
|
|
143
|
+
negativeKeywords: (string | number | boolean | (null)) | {
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
} | unknown[];
|
|
146
|
+
publishedContentHash: string | null;
|
|
147
|
+
publishedAt: unknown;
|
|
122
148
|
createdBy: string | null;
|
|
123
149
|
updatedBy: string | null;
|
|
124
150
|
createdAt: unknown;
|
|
@@ -160,9 +186,18 @@ interface components {
|
|
|
160
186
|
ownerEntityId: string;
|
|
161
187
|
channel: components["schemas"]["AdChannel"];
|
|
162
188
|
status: components["schemas"]["AdStatus"];
|
|
189
|
+
campaignId: string | null;
|
|
163
190
|
content: (string | number | boolean | (null)) | {
|
|
164
191
|
[key: string]: unknown;
|
|
165
192
|
} | unknown[];
|
|
193
|
+
keywords: (string | number | boolean | (null)) | {
|
|
194
|
+
[key: string]: unknown;
|
|
195
|
+
} | unknown[];
|
|
196
|
+
negativeKeywords: (string | number | boolean | (null)) | {
|
|
197
|
+
[key: string]: unknown;
|
|
198
|
+
} | unknown[];
|
|
199
|
+
publishedContentHash: string | null;
|
|
200
|
+
publishedAt: unknown;
|
|
166
201
|
createdBy: string | null;
|
|
167
202
|
updatedBy: string | null;
|
|
168
203
|
createdAt: unknown;
|
|
@@ -176,9 +211,18 @@ interface components {
|
|
|
176
211
|
ownerEntityId: string;
|
|
177
212
|
channel: components["schemas"]["AdChannel"];
|
|
178
213
|
status: components["schemas"]["AdStatus"];
|
|
214
|
+
campaignId: string | null;
|
|
179
215
|
content: (string | number | boolean | (null)) | {
|
|
180
216
|
[key: string]: unknown;
|
|
181
217
|
} | unknown[];
|
|
218
|
+
keywords: (string | number | boolean | (null)) | {
|
|
219
|
+
[key: string]: unknown;
|
|
220
|
+
} | unknown[];
|
|
221
|
+
negativeKeywords: (string | number | boolean | (null)) | {
|
|
222
|
+
[key: string]: unknown;
|
|
223
|
+
} | unknown[];
|
|
224
|
+
publishedContentHash: string | null;
|
|
225
|
+
publishedAt: unknown;
|
|
182
226
|
createdBy: string | null;
|
|
183
227
|
updatedBy: string | null;
|
|
184
228
|
createdAt: unknown;
|
|
@@ -318,8 +362,8 @@ interface components {
|
|
|
318
362
|
endTime: string | null;
|
|
319
363
|
partySize: number;
|
|
320
364
|
status: components["schemas"]["AreaBookingStatus"];
|
|
321
|
-
|
|
322
|
-
|
|
365
|
+
guestFirstName?: string;
|
|
366
|
+
guestLastName?: string;
|
|
323
367
|
totalPrice?: number;
|
|
324
368
|
currency?: components["schemas"]["Currency"];
|
|
325
369
|
confirmationCode?: string | null;
|
|
@@ -330,11 +374,11 @@ interface components {
|
|
|
330
374
|
requestedStartTime?: string;
|
|
331
375
|
requestedEndTime?: string;
|
|
332
376
|
partySize: number;
|
|
333
|
-
|
|
334
|
-
|
|
377
|
+
guestFirstName: string;
|
|
378
|
+
guestLastName: string;
|
|
335
379
|
/** Format: email */
|
|
336
|
-
|
|
337
|
-
|
|
380
|
+
guestEmail: string;
|
|
381
|
+
guestPhone?: string;
|
|
338
382
|
message?: string;
|
|
339
383
|
source?: components["schemas"]["AreaBookingRequestSource"];
|
|
340
384
|
};
|
|
@@ -347,10 +391,10 @@ interface components {
|
|
|
347
391
|
requestedStartTime: string | null;
|
|
348
392
|
requestedEndTime: string | null;
|
|
349
393
|
partySize: number;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
394
|
+
guestFirstName: string;
|
|
395
|
+
guestLastName: string;
|
|
396
|
+
guestEmail: string;
|
|
397
|
+
guestPhone: string | null;
|
|
354
398
|
message: string | null;
|
|
355
399
|
source: components["schemas"]["AreaBookingRequestSource"];
|
|
356
400
|
status: components["schemas"]["AreaBookingRequestStatus"];
|
|
@@ -1537,9 +1581,9 @@ interface components {
|
|
|
1537
1581
|
fulfillmentType: components["schemas"]["FulfillmentType"];
|
|
1538
1582
|
/** Format: date-time */
|
|
1539
1583
|
fulfillmentAt?: string | null;
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1584
|
+
guestFirstName?: string;
|
|
1585
|
+
guestLastName?: string;
|
|
1586
|
+
guestEmail?: string;
|
|
1543
1587
|
declaredReturns?: {
|
|
1544
1588
|
depositwareTemplateId: string;
|
|
1545
1589
|
count: number;
|
|
@@ -1566,7 +1610,7 @@ interface components {
|
|
|
1566
1610
|
status: string;
|
|
1567
1611
|
publicId: string | null;
|
|
1568
1612
|
quickReferenceNumber: number | null;
|
|
1569
|
-
|
|
1613
|
+
guestId?: string;
|
|
1570
1614
|
};
|
|
1571
1615
|
/** FetchLatestOrderResponse */
|
|
1572
1616
|
FetchLatestOrderResponse: {
|
|
@@ -1618,8 +1662,8 @@ interface components {
|
|
|
1618
1662
|
fulfillmentType: components["schemas"]["FulfillmentType"];
|
|
1619
1663
|
/** Format: date-time */
|
|
1620
1664
|
fulfillmentAt?: string | null;
|
|
1621
|
-
|
|
1622
|
-
|
|
1665
|
+
guestFirstName?: string;
|
|
1666
|
+
guestLastName?: string;
|
|
1623
1667
|
teamOrderPublicId?: string;
|
|
1624
1668
|
declaredReturns?: {
|
|
1625
1669
|
depositwareTemplateId: string;
|
|
@@ -1693,18 +1737,18 @@ interface components {
|
|
|
1693
1737
|
* Format: uuid
|
|
1694
1738
|
* @description UUID of existing customer profile if available
|
|
1695
1739
|
*/
|
|
1696
|
-
|
|
1740
|
+
guestId?: string | null;
|
|
1697
1741
|
/** @description First name of the customer making the reservation */
|
|
1698
|
-
|
|
1742
|
+
guestFirstName: string;
|
|
1699
1743
|
/** @description Last name of the customer making the reservation */
|
|
1700
|
-
|
|
1744
|
+
guestLastName: string;
|
|
1701
1745
|
/**
|
|
1702
1746
|
* Format: email
|
|
1703
1747
|
* @description Email address for reservation confirmations and updates
|
|
1704
1748
|
*/
|
|
1705
|
-
|
|
1749
|
+
guestEmail?: string | null;
|
|
1706
1750
|
/** @description Phone number for reservation confirmations and updates. Include country code for international numbers. */
|
|
1707
|
-
|
|
1751
|
+
guestPhone?: string | null;
|
|
1708
1752
|
contactPreference?: components["schemas"]["ContactPreference"];
|
|
1709
1753
|
source?: components["schemas"]["AreaBookingRequestSource"];
|
|
1710
1754
|
/** @description Any dietary restrictions, allergies, or special occasions (max 500 characters) */
|
|
@@ -1751,15 +1795,15 @@ interface components {
|
|
|
1751
1795
|
* Format: uuid
|
|
1752
1796
|
* @description Link to customer profile if exists
|
|
1753
1797
|
*/
|
|
1754
|
-
|
|
1798
|
+
guestId: string | null;
|
|
1755
1799
|
/** @description First name of the customer */
|
|
1756
|
-
|
|
1800
|
+
guestFirstName: string;
|
|
1757
1801
|
/** @description Last name of the customer */
|
|
1758
|
-
|
|
1802
|
+
guestLastName: string;
|
|
1759
1803
|
/** @description Customer email address */
|
|
1760
|
-
|
|
1804
|
+
guestEmail: string | null;
|
|
1761
1805
|
/** @description Customer phone number */
|
|
1762
|
-
|
|
1806
|
+
guestPhone: string | null;
|
|
1763
1807
|
contactPreference: components["schemas"]["ContactPreference"];
|
|
1764
1808
|
status: components["schemas"]["ReservationStatus"];
|
|
1765
1809
|
/** @description 6-character confirmation code for the reservation */
|
|
@@ -1944,7 +1988,7 @@ interface components {
|
|
|
1944
1988
|
quantity: number | null;
|
|
1945
1989
|
};
|
|
1946
1990
|
participants: {
|
|
1947
|
-
|
|
1991
|
+
guestId: string;
|
|
1948
1992
|
basketId: string | null;
|
|
1949
1993
|
orderId: string | null;
|
|
1950
1994
|
participantNumber: number | null;
|
|
@@ -2013,7 +2057,7 @@ interface components {
|
|
|
2013
2057
|
/** Format: uuid */
|
|
2014
2058
|
teamOrderId: string;
|
|
2015
2059
|
basketId: string;
|
|
2016
|
-
|
|
2060
|
+
guestId: string;
|
|
2017
2061
|
status: components["schemas"]["TeamOrderStatus"];
|
|
2018
2062
|
isLead: boolean;
|
|
2019
2063
|
alreadyJoined: boolean;
|
|
@@ -2299,6 +2343,10 @@ interface components {
|
|
|
2299
2343
|
/** @enum {string} */
|
|
2300
2344
|
ReservationStatus: "pending" | "confirmed" | "arrived" | "seated" | "completed" | "cancelled" | "no_show";
|
|
2301
2345
|
/** @enum {string} */
|
|
2346
|
+
ReservationMessageStatus: "draft" | "sent";
|
|
2347
|
+
/** @enum {string} */
|
|
2348
|
+
VenueEmailSenderStatus: "pending" | "verified" | "failed" | "temporary_failure";
|
|
2349
|
+
/** @enum {string} */
|
|
2302
2350
|
VenueAssetType: "logomark" | "wordmark" | "combinationmark_horizontal" | "combinationmark_vertical";
|
|
2303
2351
|
/** @enum {string} */
|
|
2304
2352
|
VenueUserStatus: "pending" | "confirmed" | "revoked";
|
|
@@ -2556,18 +2604,18 @@ interface GetMenuOptions {
|
|
|
2556
2604
|
type MenuBundle = schemas['FetchMenuBundlesResponse'][number];
|
|
2557
2605
|
type MenuBundleDeposit = NonNullable<MenuBundle['deposit']>;
|
|
2558
2606
|
/**
|
|
2559
|
-
* A single event as returned by the `
|
|
2607
|
+
* A single event as returned by the `events.get` endpoint, with
|
|
2560
2608
|
* optional schedule / menus / posters expansions. Generated-bound to the
|
|
2561
2609
|
* `FetchEventResponse` component (the order3000 `fetchEvent` output
|
|
2562
2610
|
* schema is now precise) — request-shape drift is impossible.
|
|
2563
2611
|
*/
|
|
2564
2612
|
type EventByAccessor = schemas['FetchEventResponse'];
|
|
2565
2613
|
/**
|
|
2566
|
-
* The
|
|
2614
|
+
* The fetched event's schedule sub-object, including the optional
|
|
2567
2615
|
* `scheduleTimeSlots[]` expansion. Generated-bound to the non-null
|
|
2568
2616
|
* `schedule` on `FetchEventResponse`. Kept as a distinct public SDK type
|
|
2569
2617
|
* name (re-exported as `O3KScheduleWithTimeSlots`) for downstream
|
|
2570
|
-
* stability; structurally it is the
|
|
2618
|
+
* stability; structurally it is the single-event-fetch schedule shape.
|
|
2571
2619
|
*/
|
|
2572
2620
|
type ScheduleWithTimeSlots = NonNullable<EventByAccessor['schedule']>;
|
|
2573
2621
|
/**
|
|
@@ -2767,9 +2815,10 @@ declare class AreasResource extends BaseResource {
|
|
|
2767
2815
|
*/
|
|
2768
2816
|
list(options?: GetAreaOptions): Promise<Area[]>;
|
|
2769
2817
|
/**
|
|
2770
|
-
* Fetch a single area by id or accessor.
|
|
2818
|
+
* Fetch a single area by id or accessor. The server resolves either
|
|
2819
|
+
* form transparently.
|
|
2771
2820
|
*/
|
|
2772
|
-
|
|
2821
|
+
get(idOrAccessor: string, options?: GetAreaOptions): Promise<Area>;
|
|
2773
2822
|
/**
|
|
2774
2823
|
* List occupied date/time windows for an area between `from` and `to`.
|
|
2775
2824
|
*/
|
|
@@ -2796,9 +2845,10 @@ declare class ArticlesResource extends BaseResource {
|
|
|
2796
2845
|
list(options?: ListArticlesOptions): Promise<ListArticlesResponse>;
|
|
2797
2846
|
/**
|
|
2798
2847
|
* Fetch a single article by id or accessor within the active venue.
|
|
2799
|
-
*
|
|
2848
|
+
* The server resolves either form transparently. Returns the full row
|
|
2849
|
+
* including the TipTap `content` document.
|
|
2800
2850
|
*/
|
|
2801
|
-
|
|
2851
|
+
get(idOrAccessor: string): Promise<Article>;
|
|
2802
2852
|
/**
|
|
2803
2853
|
* Partial-update an article. Locale-keyed fields (slug, title, excerpt)
|
|
2804
2854
|
* merge at the locale level — `{ slug: { en: 'foo' } }` updates `en`
|
|
@@ -2936,18 +2986,13 @@ declare class EventsResource extends BaseResource {
|
|
|
2936
2986
|
*/
|
|
2937
2987
|
place(event: CreateEventRequest): Promise<CreateEventResponse>;
|
|
2938
2988
|
/**
|
|
2939
|
-
* Get a single event by
|
|
2940
|
-
*
|
|
2941
|
-
* @
|
|
2942
|
-
*/
|
|
2943
|
-
get(eventId: string): Promise<Event>;
|
|
2944
|
-
/**
|
|
2945
|
-
* Get an event by accessor (slug)
|
|
2946
|
-
* @param accessor - The event accessor (e.g., 'lunch-menu')
|
|
2989
|
+
* Get a single event by id or accessor (slug), with optional `expand`
|
|
2990
|
+
* parts. The server resolves either form transparently.
|
|
2991
|
+
* @param idOrAccessor - The event UUID or accessor (e.g., 'lunch-menu')
|
|
2947
2992
|
* @param options - Optional expand options
|
|
2948
2993
|
* @returns The event with optional schedule, timeSlots, menus, and posters
|
|
2949
2994
|
*/
|
|
2950
|
-
|
|
2995
|
+
get(idOrAccessor: string, options?: GetEventOptions): Promise<EventByAccessor>;
|
|
2951
2996
|
private buildQueryString;
|
|
2952
2997
|
/**
|
|
2953
2998
|
* Partial-update an event by id or accessor. Every body field is
|
|
@@ -2965,7 +3010,7 @@ declare class EventsResource extends BaseResource {
|
|
|
2965
3010
|
delete(idOrAccessor: string): Promise<DeleteEventResponse>;
|
|
2966
3011
|
/**
|
|
2967
3012
|
* List the posters attached to an event. Convenience over
|
|
2968
|
-
* `
|
|
3013
|
+
* `get(idOrAccessor, { expand: ['posters'] })` — returns the
|
|
2969
3014
|
* `posters[]` array (empty when the event has none).
|
|
2970
3015
|
*/
|
|
2971
3016
|
listPosters(idOrAccessor: string): Promise<EventPosterEntry[]>;
|
|
@@ -2988,19 +3033,13 @@ declare class EventsResource extends BaseResource {
|
|
|
2988
3033
|
declare class MenusResource extends BaseResource {
|
|
2989
3034
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2990
3035
|
/**
|
|
2991
|
-
* Get a menu by
|
|
2992
|
-
*
|
|
2993
|
-
* @param
|
|
2994
|
-
* @returns The menu with optional items and assets
|
|
2995
|
-
*/
|
|
2996
|
-
get(id: string, options?: GetMenuOptions): Promise<Menu>;
|
|
2997
|
-
/**
|
|
2998
|
-
* Get a menu by accessor
|
|
2999
|
-
* @param accessor - The menu accessor (slug)
|
|
3036
|
+
* Get a menu by id or accessor (slug), with optional `expand` parts.
|
|
3037
|
+
* The server resolves either form transparently.
|
|
3038
|
+
* @param idOrAccessor - The menu UUID or accessor (slug)
|
|
3000
3039
|
* @param options - Optional expand options
|
|
3001
3040
|
* @returns The menu with optional items and assets
|
|
3002
3041
|
*/
|
|
3003
|
-
|
|
3042
|
+
get(idOrAccessor: string, options?: GetMenuOptions): Promise<Menu>;
|
|
3004
3043
|
/**
|
|
3005
3044
|
* Get all bundles for a menu
|
|
3006
3045
|
* @param menuIdOrAccessor - The menu UUID or accessor (slug)
|
|
@@ -3089,17 +3128,12 @@ declare class ReservationsResource extends BaseResource {
|
|
|
3089
3128
|
declare class SubscriptionsResource extends BaseResource {
|
|
3090
3129
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
3091
3130
|
/**
|
|
3092
|
-
* Get a subscription by
|
|
3093
|
-
*
|
|
3094
|
-
* @
|
|
3095
|
-
*/
|
|
3096
|
-
get(id: string): Promise<MenuSubscription>;
|
|
3097
|
-
/**
|
|
3098
|
-
* Get a subscription by accessor
|
|
3099
|
-
* @param accessor - The subscription accessor (slug)
|
|
3131
|
+
* Get a subscription by id or accessor (slug). The server resolves
|
|
3132
|
+
* either form transparently.
|
|
3133
|
+
* @param idOrAccessor - The subscription UUID or accessor (slug)
|
|
3100
3134
|
* @returns The subscription with posters
|
|
3101
3135
|
*/
|
|
3102
|
-
|
|
3136
|
+
get(idOrAccessor: string): Promise<MenuSubscription>;
|
|
3103
3137
|
/**
|
|
3104
3138
|
* Subscribe a customer to a subscription plan via Stripe Checkout
|
|
3105
3139
|
* @param subscriptionIdOrAccessor - The subscription UUID or accessor
|
|
@@ -3277,7 +3311,7 @@ interface TeamOrderParticipantPayment {
|
|
|
3277
3311
|
cardLast4: string | null;
|
|
3278
3312
|
}
|
|
3279
3313
|
interface TeamOrderParticipant {
|
|
3280
|
-
|
|
3314
|
+
guestId: string;
|
|
3281
3315
|
basketId: string | null;
|
|
3282
3316
|
orderId: string | null;
|
|
3283
3317
|
/**
|
|
@@ -3426,7 +3460,7 @@ interface JoinTeamOrderRequest {
|
|
|
3426
3460
|
interface JoinTeamOrderResponse {
|
|
3427
3461
|
teamOrderId: string;
|
|
3428
3462
|
basketId: string;
|
|
3429
|
-
|
|
3463
|
+
guestId: string;
|
|
3430
3464
|
status: TeamOrderStatus;
|
|
3431
3465
|
isLead: boolean;
|
|
3432
3466
|
alreadyJoined: boolean;
|
|
@@ -3631,7 +3665,7 @@ declare class VenuesResource {
|
|
|
3631
3665
|
* — the CLI hits this to prove the accessor exists and to cache the
|
|
3632
3666
|
* resolved UUID + display fields locally.
|
|
3633
3667
|
*/
|
|
3634
|
-
|
|
3668
|
+
get(idOrAccessor: string): Promise<Venue>;
|
|
3635
3669
|
}
|
|
3636
3670
|
|
|
3637
3671
|
type RealtimeEvent = 'INSERT' | 'UPDATE' | 'DELETE' | '*';
|