order3000 1.1.0 → 1.3.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 +124 -57
- package/dist/client.d.cts +324 -61
- package/dist/client.d.mts +324 -61
- package/dist/client.mjs +124 -57
- package/dist/schemas.cjs +237 -8
- package/dist/schemas.d.cts +226 -29
- package/dist/schemas.d.mts +226 -29
- package/dist/schemas.mjs +237 -8
- package/package.json +2 -2
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;
|
|
@@ -63,6 +62,127 @@ declare abstract class BaseResource {
|
|
|
63
62
|
|
|
64
63
|
interface components {
|
|
65
64
|
schemas: {
|
|
65
|
+
/** FetchAdsResponse */
|
|
66
|
+
FetchAdsResponse: {
|
|
67
|
+
id: string;
|
|
68
|
+
venueId: string;
|
|
69
|
+
ownerEntityType: components["schemas"]["AdOwnerType"];
|
|
70
|
+
ownerEntityId: string;
|
|
71
|
+
channel: components["schemas"]["AdChannel"];
|
|
72
|
+
status: components["schemas"]["AdStatus"];
|
|
73
|
+
content: (string | number | boolean | (null)) | {
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
} | unknown[];
|
|
76
|
+
createdBy: string | null;
|
|
77
|
+
updatedBy: string | null;
|
|
78
|
+
createdAt: unknown;
|
|
79
|
+
updatedAt: unknown;
|
|
80
|
+
}[];
|
|
81
|
+
/** FetchAdResponse */
|
|
82
|
+
FetchAdResponse: {
|
|
83
|
+
id: string;
|
|
84
|
+
venueId: string;
|
|
85
|
+
ownerEntityType: components["schemas"]["AdOwnerType"];
|
|
86
|
+
ownerEntityId: string;
|
|
87
|
+
channel: components["schemas"]["AdChannel"];
|
|
88
|
+
status: components["schemas"]["AdStatus"];
|
|
89
|
+
content: (string | number | boolean | (null)) | {
|
|
90
|
+
[key: string]: unknown;
|
|
91
|
+
} | unknown[];
|
|
92
|
+
createdBy: string | null;
|
|
93
|
+
updatedBy: string | null;
|
|
94
|
+
createdAt: unknown;
|
|
95
|
+
updatedAt: unknown;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* CreateAdRequest
|
|
99
|
+
* @description Request payload for creating a new ad
|
|
100
|
+
*/
|
|
101
|
+
CreateAdRequest: {
|
|
102
|
+
venueAccessor: string;
|
|
103
|
+
ownerEntityType: components["schemas"]["AdOwnerType"];
|
|
104
|
+
ownerEntityId: string;
|
|
105
|
+
channel: components["schemas"]["AdChannel"];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* CreateAdResponse
|
|
109
|
+
* @description Successfully created ad
|
|
110
|
+
*/
|
|
111
|
+
CreateAdResponse: {
|
|
112
|
+
id: string;
|
|
113
|
+
venueId: string;
|
|
114
|
+
ownerEntityType: components["schemas"]["AdOwnerType"];
|
|
115
|
+
ownerEntityId: string;
|
|
116
|
+
channel: components["schemas"]["AdChannel"];
|
|
117
|
+
status: components["schemas"]["AdStatus"];
|
|
118
|
+
content: (string | number | boolean | (null)) | {
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
} | unknown[];
|
|
121
|
+
createdBy: string | null;
|
|
122
|
+
updatedBy: string | null;
|
|
123
|
+
createdAt: unknown;
|
|
124
|
+
updatedAt: unknown;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* EditAdRequest
|
|
128
|
+
* @description Partial-update body for an existing ad
|
|
129
|
+
*/
|
|
130
|
+
EditAdRequest: {
|
|
131
|
+
venueAccessor: string;
|
|
132
|
+
id: string;
|
|
133
|
+
content?: {
|
|
134
|
+
businessName: {
|
|
135
|
+
[key: string]: string;
|
|
136
|
+
};
|
|
137
|
+
headlines: {
|
|
138
|
+
[key: string]: string[];
|
|
139
|
+
};
|
|
140
|
+
descriptions: {
|
|
141
|
+
[key: string]: string[];
|
|
142
|
+
};
|
|
143
|
+
paths: {
|
|
144
|
+
[key: string]: string[];
|
|
145
|
+
};
|
|
146
|
+
/** Format: uri */
|
|
147
|
+
finalUrl: string;
|
|
148
|
+
};
|
|
149
|
+
status?: components["schemas"]["AdStatus"];
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* EditAdResponse
|
|
153
|
+
* @description Successfully updated ad
|
|
154
|
+
*/
|
|
155
|
+
EditAdResponse: {
|
|
156
|
+
id: string;
|
|
157
|
+
venueId: string;
|
|
158
|
+
ownerEntityType: components["schemas"]["AdOwnerType"];
|
|
159
|
+
ownerEntityId: string;
|
|
160
|
+
channel: components["schemas"]["AdChannel"];
|
|
161
|
+
status: components["schemas"]["AdStatus"];
|
|
162
|
+
content: (string | number | boolean | (null)) | {
|
|
163
|
+
[key: string]: unknown;
|
|
164
|
+
} | unknown[];
|
|
165
|
+
createdBy: string | null;
|
|
166
|
+
updatedBy: string | null;
|
|
167
|
+
createdAt: unknown;
|
|
168
|
+
updatedAt: unknown;
|
|
169
|
+
};
|
|
170
|
+
/** DeleteAdResponse */
|
|
171
|
+
DeleteAdResponse: {
|
|
172
|
+
id: string;
|
|
173
|
+
venueId: string;
|
|
174
|
+
ownerEntityType: components["schemas"]["AdOwnerType"];
|
|
175
|
+
ownerEntityId: string;
|
|
176
|
+
channel: components["schemas"]["AdChannel"];
|
|
177
|
+
status: components["schemas"]["AdStatus"];
|
|
178
|
+
content: (string | number | boolean | (null)) | {
|
|
179
|
+
[key: string]: unknown;
|
|
180
|
+
} | unknown[];
|
|
181
|
+
createdBy: string | null;
|
|
182
|
+
updatedBy: string | null;
|
|
183
|
+
createdAt: unknown;
|
|
184
|
+
updatedAt: unknown;
|
|
185
|
+
};
|
|
66
186
|
/**
|
|
67
187
|
* Area
|
|
68
188
|
* @description 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.
|
|
@@ -441,6 +561,42 @@ interface components {
|
|
|
441
561
|
[key: string]: unknown;
|
|
442
562
|
};
|
|
443
563
|
};
|
|
564
|
+
/** FetchAssetsByTagResponse */
|
|
565
|
+
FetchAssetsByTagResponse: {
|
|
566
|
+
id: string;
|
|
567
|
+
type: components["schemas"]["AssetType"];
|
|
568
|
+
metadata: {
|
|
569
|
+
width?: number;
|
|
570
|
+
height?: number;
|
|
571
|
+
duration?: number;
|
|
572
|
+
} | null;
|
|
573
|
+
isActive: boolean;
|
|
574
|
+
sortIndex: string | null;
|
|
575
|
+
updatedAt: unknown;
|
|
576
|
+
updatedBy: string | null;
|
|
577
|
+
createdAt: unknown;
|
|
578
|
+
createdBy: string | null;
|
|
579
|
+
venueId: string | null;
|
|
580
|
+
tags: string[] | null;
|
|
581
|
+
bucket: string;
|
|
582
|
+
storagePath: string;
|
|
583
|
+
filename: string;
|
|
584
|
+
contentType: string;
|
|
585
|
+
sizeBytes: number;
|
|
586
|
+
caption: {
|
|
587
|
+
[key: string]: unknown;
|
|
588
|
+
};
|
|
589
|
+
alt: {
|
|
590
|
+
[key: string]: unknown;
|
|
591
|
+
};
|
|
592
|
+
cropArea: {
|
|
593
|
+
x: number;
|
|
594
|
+
y: number;
|
|
595
|
+
width: number;
|
|
596
|
+
height: number;
|
|
597
|
+
} | null;
|
|
598
|
+
publicUrl: string;
|
|
599
|
+
}[];
|
|
444
600
|
/** BasketTotals */
|
|
445
601
|
BasketTotals: {
|
|
446
602
|
currency: components["schemas"]["Currency"];
|
|
@@ -598,6 +754,8 @@ interface components {
|
|
|
598
754
|
} | null;
|
|
599
755
|
scheduleId: string | null;
|
|
600
756
|
ritualId: string | null;
|
|
757
|
+
occurrenceDate: string | null;
|
|
758
|
+
ritualType: components["schemas"]["RitualType"];
|
|
601
759
|
maxBookings: number | null;
|
|
602
760
|
maxGuests: number | null;
|
|
603
761
|
minPartySize: number | null;
|
|
@@ -688,7 +846,7 @@ interface components {
|
|
|
688
846
|
}[];
|
|
689
847
|
} | null;
|
|
690
848
|
nextOccurrence: string | null;
|
|
691
|
-
|
|
849
|
+
assets: {
|
|
692
850
|
id: string;
|
|
693
851
|
type: components["schemas"]["AssetType"];
|
|
694
852
|
metadata: {
|
|
@@ -839,7 +997,7 @@ interface components {
|
|
|
839
997
|
};
|
|
840
998
|
category: string;
|
|
841
999
|
}[];
|
|
842
|
-
|
|
1000
|
+
assets?: {
|
|
843
1001
|
id: string;
|
|
844
1002
|
bucket: string;
|
|
845
1003
|
storagePath: string;
|
|
@@ -863,12 +1021,12 @@ interface components {
|
|
|
863
1021
|
[key: string]: unknown;
|
|
864
1022
|
} | unknown[]) | null;
|
|
865
1023
|
scheduleId?: string | null;
|
|
1024
|
+
occurrenceDate?: string | null;
|
|
866
1025
|
maxBookings?: number | null;
|
|
867
1026
|
maxGuests?: number | null;
|
|
868
1027
|
minPartySize?: number | null;
|
|
869
1028
|
maxPartySize?: number | null;
|
|
870
1029
|
isPublic?: boolean;
|
|
871
|
-
isRecurring?: boolean;
|
|
872
1030
|
reservationsEnabled?: boolean;
|
|
873
1031
|
bookingOpensAtDays?: number | null;
|
|
874
1032
|
bookingClosesAtOffset?: number | null;
|
|
@@ -908,12 +1066,12 @@ interface components {
|
|
|
908
1066
|
} | unknown[]) | null;
|
|
909
1067
|
scheduleId: string | null;
|
|
910
1068
|
ritualId: string | null;
|
|
1069
|
+
occurrenceDate: string | null;
|
|
911
1070
|
maxBookings: number | null;
|
|
912
1071
|
maxGuests: number | null;
|
|
913
1072
|
minPartySize: number | null;
|
|
914
1073
|
maxPartySize: number | null;
|
|
915
1074
|
isPublic: boolean;
|
|
916
|
-
isRecurring: boolean;
|
|
917
1075
|
reservationsEnabled: boolean;
|
|
918
1076
|
bookingOpensAtDays: number | null;
|
|
919
1077
|
bookingClosesAtOffset: number | null;
|
|
@@ -938,12 +1096,12 @@ interface components {
|
|
|
938
1096
|
[key: string]: unknown;
|
|
939
1097
|
} | unknown[]) | null;
|
|
940
1098
|
scheduleId?: string | null;
|
|
1099
|
+
occurrenceDate?: string | null;
|
|
941
1100
|
maxBookings?: number | null;
|
|
942
1101
|
maxGuests?: number | null;
|
|
943
1102
|
minPartySize?: number | null;
|
|
944
1103
|
maxPartySize?: number | null;
|
|
945
1104
|
isPublic?: boolean;
|
|
946
|
-
isRecurring?: boolean;
|
|
947
1105
|
reservationsEnabled?: boolean;
|
|
948
1106
|
bookingOpensAtDays?: number | null;
|
|
949
1107
|
bookingClosesAtOffset?: number | null;
|
|
@@ -982,12 +1140,12 @@ interface components {
|
|
|
982
1140
|
} | unknown[]) | null;
|
|
983
1141
|
scheduleId: string | null;
|
|
984
1142
|
ritualId: string | null;
|
|
1143
|
+
occurrenceDate: string | null;
|
|
985
1144
|
maxBookings: number | null;
|
|
986
1145
|
maxGuests: number | null;
|
|
987
1146
|
minPartySize: number | null;
|
|
988
1147
|
maxPartySize: number | null;
|
|
989
1148
|
isPublic: boolean;
|
|
990
|
-
isRecurring: boolean;
|
|
991
1149
|
reservationsEnabled: boolean;
|
|
992
1150
|
bookingOpensAtDays: number | null;
|
|
993
1151
|
bookingClosesAtOffset: number | null;
|
|
@@ -1054,12 +1212,12 @@ interface components {
|
|
|
1054
1212
|
} | unknown[]) | null;
|
|
1055
1213
|
scheduleId: string | null;
|
|
1056
1214
|
ritualId: string | null;
|
|
1215
|
+
occurrenceDate: string | null;
|
|
1057
1216
|
maxBookings: number | null;
|
|
1058
1217
|
maxGuests: number | null;
|
|
1059
1218
|
minPartySize: number | null;
|
|
1060
1219
|
maxPartySize: number | null;
|
|
1061
1220
|
isPublic: boolean;
|
|
1062
|
-
isRecurring: boolean;
|
|
1063
1221
|
reservationsEnabled: boolean;
|
|
1064
1222
|
bookingOpensAtDays: number | null;
|
|
1065
1223
|
bookingClosesAtOffset: number | null;
|
|
@@ -1552,6 +1710,12 @@ interface components {
|
|
|
1552
1710
|
specialRequests?: string | null;
|
|
1553
1711
|
/** @description Preferred seating area or table type (e.g., "window seat", "quiet area", "patio") */
|
|
1554
1712
|
tablePreference?: string | null;
|
|
1713
|
+
/** @description Google Ads click identifier from the landing URL (auto-tagging). Stored for server-side conversion reporting. */
|
|
1714
|
+
gclid?: string | null;
|
|
1715
|
+
/** @description Google Ads click identifier for app/web (iOS) where `gclid` is unavailable. */
|
|
1716
|
+
gbraid?: string | null;
|
|
1717
|
+
/** @description Google Ads click identifier for web-to-app (iOS) where `gclid` is unavailable. */
|
|
1718
|
+
wbraid?: string | null;
|
|
1555
1719
|
};
|
|
1556
1720
|
/**
|
|
1557
1721
|
* MakeReservationResponse
|
|
@@ -1613,6 +1777,9 @@ interface components {
|
|
|
1613
1777
|
/** @description Additional cancellation details */
|
|
1614
1778
|
cancellationNote: string | null;
|
|
1615
1779
|
source: components["schemas"]["AreaBookingRequestSource"];
|
|
1780
|
+
gclid: string | null;
|
|
1781
|
+
gbraid: string | null;
|
|
1782
|
+
wbraid: string | null;
|
|
1616
1783
|
/** @description Any special requirements or notes */
|
|
1617
1784
|
specialRequests: string | null;
|
|
1618
1785
|
/** @description Preferred seating location */
|
|
@@ -2055,7 +2222,7 @@ interface components {
|
|
|
2055
2222
|
/** @enum {string} */
|
|
2056
2223
|
IntegrationNotificationType: "order_created" | "order_cancelled" | "order_completed" | "team_order_created" | "reservation_created" | "reservation_confirmed" | "reservation_cancelled";
|
|
2057
2224
|
/** @enum {string} */
|
|
2058
|
-
IntegrationType: "telegram";
|
|
2225
|
+
IntegrationType: "telegram" | "google_ads";
|
|
2059
2226
|
/** @enum {string} */
|
|
2060
2227
|
InventoryAssetStatus: "available" | "in_use" | "maintenance" | "retired";
|
|
2061
2228
|
/** @enum {string} */
|
|
@@ -2089,6 +2256,12 @@ interface components {
|
|
|
2089
2256
|
/** @enum {string} */
|
|
2090
2257
|
Unit: "grams" | "kilograms" | "liters" | "milliliters" | "pieces";
|
|
2091
2258
|
/** @enum {string} */
|
|
2259
|
+
AdChannel: "google";
|
|
2260
|
+
/** @enum {string} */
|
|
2261
|
+
AdOwnerType: "event";
|
|
2262
|
+
/** @enum {string} */
|
|
2263
|
+
AdStatus: "draft" | "ready" | "archived";
|
|
2264
|
+
/** @enum {string} */
|
|
2092
2265
|
MentionEntityType: "dish" | "beverage" | "ingredient" | "menu" | "ritual";
|
|
2093
2266
|
/** @enum {string} */
|
|
2094
2267
|
MentionKind: "link" | "value";
|
|
@@ -2103,6 +2276,10 @@ interface components {
|
|
|
2103
2276
|
/** @enum {string} */
|
|
2104
2277
|
Jurisdiction: "DE" | "CH" | "FR" | "IT";
|
|
2105
2278
|
/** @enum {string} */
|
|
2279
|
+
EventAssetSource: "inherited" | "manual";
|
|
2280
|
+
/** @enum {string} */
|
|
2281
|
+
RitualType: "service" | "special";
|
|
2282
|
+
/** @enum {string} */
|
|
2106
2283
|
DayOfWeek: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
2107
2284
|
/** @enum {string} */
|
|
2108
2285
|
SlotMode: "interval" | "duration";
|
|
@@ -2158,6 +2335,36 @@ interface UploadEventPosterArgs {
|
|
|
2158
2335
|
filename: string;
|
|
2159
2336
|
contentType: string;
|
|
2160
2337
|
}
|
|
2338
|
+
/**
|
|
2339
|
+
* A single ad row — generated-bound to the `FetchAdResponse` component
|
|
2340
|
+
* (`createSelectSchema(ads)` server-side). Carries the polymorphic owner
|
|
2341
|
+
* (`ownerEntityType` / `ownerEntityId`), the `channel`, the paste-ready
|
|
2342
|
+
* Google Search Ad `content` document, and the lifecycle `status`.
|
|
2343
|
+
*/
|
|
2344
|
+
type Ad = schemas['FetchAdResponse'];
|
|
2345
|
+
/**
|
|
2346
|
+
* The ads list response — generated-bound to `FetchAdsResponse` (an array
|
|
2347
|
+
* of {@link Ad}), ordered by `createdAt`. Never hand-rolled.
|
|
2348
|
+
*/
|
|
2349
|
+
type ListAdsResponse = schemas['FetchAdsResponse'];
|
|
2350
|
+
type CreateAdRequest = schemas['CreateAdRequest'];
|
|
2351
|
+
type CreateAdResponse = schemas['CreateAdResponse'];
|
|
2352
|
+
type PatchAdRequest = schemas['EditAdRequest'];
|
|
2353
|
+
type PatchAdResponse = schemas['EditAdResponse'];
|
|
2354
|
+
type DeleteAdResponse = schemas['DeleteAdResponse'];
|
|
2355
|
+
/**
|
|
2356
|
+
* Optional filters for `client.ads.list()`. Each narrows the venue's ad
|
|
2357
|
+
* set; omit all to list every ad. Client ergonomics, mapped to the wire
|
|
2358
|
+
* query string by the resource layer.
|
|
2359
|
+
*/
|
|
2360
|
+
interface ListAdsOptions {
|
|
2361
|
+
/** Filter to ads owning this entity type (e.g. `event`). */
|
|
2362
|
+
ownerEntityType?: string;
|
|
2363
|
+
/** Filter to ads owning this specific entity id. */
|
|
2364
|
+
ownerEntityId?: string;
|
|
2365
|
+
/** Filter to ads on this channel (e.g. `google`). */
|
|
2366
|
+
channel?: string;
|
|
2367
|
+
}
|
|
2161
2368
|
type Article = schemas['FetchArticleResponse'];
|
|
2162
2369
|
type ListArticlesResponse = schemas['FetchArticlesResponse'];
|
|
2163
2370
|
type GetArticleResponse = schemas['FetchArticleResponse'];
|
|
@@ -2234,10 +2441,11 @@ type ScheduleOverride = schemas['FetchEventsResponse'][number]['scheduleOverride
|
|
|
2234
2441
|
*/
|
|
2235
2442
|
type Schedule = NonNullable<schemas['FetchEventsResponse'][number]['schedule']>;
|
|
2236
2443
|
/**
|
|
2237
|
-
* An
|
|
2238
|
-
*
|
|
2444
|
+
* An asset (image/video/document) attached to an event. Generated-bound to the
|
|
2445
|
+
* events list response's `assets[]` element. Use the asset's `tags` (e.g.
|
|
2446
|
+
* `'poster'`) to classify how it's used.
|
|
2239
2447
|
*/
|
|
2240
|
-
type
|
|
2448
|
+
type EventAsset = schemas['FetchEventsResponse'][number]['assets'][number];
|
|
2241
2449
|
/**
|
|
2242
2450
|
* A promotion attached to an event. Generated-bound to the events list
|
|
2243
2451
|
* response's `promotions[]` element.
|
|
@@ -2269,6 +2477,23 @@ interface ListEventsOptions {
|
|
|
2269
2477
|
* (an array of {@link Event}). Never hand-rolled.
|
|
2270
2478
|
*/
|
|
2271
2479
|
type ListEventsResponse = schemas['FetchEventsResponse'];
|
|
2480
|
+
/**
|
|
2481
|
+
* An asset (image/video/document) as returned by the assets-by-tag endpoint,
|
|
2482
|
+
* with its resolved Supabase `publicUrl`. Generated-bound to
|
|
2483
|
+
* `FetchAssetsByTagResponse`'s element — never hand-rolled.
|
|
2484
|
+
*/
|
|
2485
|
+
type Asset = schemas['FetchAssetsByTagResponse'][number];
|
|
2486
|
+
interface ListAssetsOptions {
|
|
2487
|
+
/** Required. Only assets carrying this tag are returned. */
|
|
2488
|
+
tag: string;
|
|
2489
|
+
/** Optional asset-type filter. */
|
|
2490
|
+
type?: 'image' | 'video' | 'document';
|
|
2491
|
+
}
|
|
2492
|
+
/**
|
|
2493
|
+
* The assets-by-tag list response — generated-bound to
|
|
2494
|
+
* `FetchAssetsByTagResponse` (an array of {@link Asset}). Never hand-rolled.
|
|
2495
|
+
*/
|
|
2496
|
+
type ListAssetsResponse = schemas['FetchAssetsByTagResponse'];
|
|
2272
2497
|
/**
|
|
2273
2498
|
* Menu item discriminant — generated-bound to the `type` enum on the
|
|
2274
2499
|
* menu response's `items[]` element. The `fetchMenu` output schema is
|
|
@@ -2330,18 +2555,18 @@ interface GetMenuOptions {
|
|
|
2330
2555
|
type MenuBundle = schemas['FetchMenuBundlesResponse'][number];
|
|
2331
2556
|
type MenuBundleDeposit = NonNullable<MenuBundle['deposit']>;
|
|
2332
2557
|
/**
|
|
2333
|
-
* A single event as returned by the `
|
|
2558
|
+
* A single event as returned by the `events.get` endpoint, with
|
|
2334
2559
|
* optional schedule / menus / posters expansions. Generated-bound to the
|
|
2335
2560
|
* `FetchEventResponse` component (the order3000 `fetchEvent` output
|
|
2336
2561
|
* schema is now precise) — request-shape drift is impossible.
|
|
2337
2562
|
*/
|
|
2338
2563
|
type EventByAccessor = schemas['FetchEventResponse'];
|
|
2339
2564
|
/**
|
|
2340
|
-
* The
|
|
2565
|
+
* The fetched event's schedule sub-object, including the optional
|
|
2341
2566
|
* `scheduleTimeSlots[]` expansion. Generated-bound to the non-null
|
|
2342
2567
|
* `schedule` on `FetchEventResponse`. Kept as a distinct public SDK type
|
|
2343
2568
|
* name (re-exported as `O3KScheduleWithTimeSlots`) for downstream
|
|
2344
|
-
* stability; structurally it is the
|
|
2569
|
+
* stability; structurally it is the single-event-fetch schedule shape.
|
|
2345
2570
|
*/
|
|
2346
2571
|
type ScheduleWithTimeSlots = NonNullable<EventByAccessor['schedule']>;
|
|
2347
2572
|
/**
|
|
@@ -2500,6 +2725,40 @@ type SubscribeRequest = schemas['SubscribeToSubscriptionBody'];
|
|
|
2500
2725
|
type SubscribeResponse = schemas['SubscribeToSubscriptionResponse'];
|
|
2501
2726
|
type SubscriptionCredit = schemas['GetSubscriptionCreditsResponse'][number];
|
|
2502
2727
|
|
|
2728
|
+
declare class AdsResource extends BaseResource {
|
|
2729
|
+
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2730
|
+
/**
|
|
2731
|
+
* List the venue's ads, ordered by `createdAt`. Optionally filter by
|
|
2732
|
+
* `ownerEntityType` (e.g. `event`), `ownerEntityId`, or `channel` (e.g.
|
|
2733
|
+
* `google`). Each ad carries its paste-ready Google Search Ad `content`
|
|
2734
|
+
* document and lifecycle `status`.
|
|
2735
|
+
*/
|
|
2736
|
+
list(options?: ListAdsOptions): Promise<ListAdsResponse>;
|
|
2737
|
+
/**
|
|
2738
|
+
* Fetch a single ad by id within the active venue. Ads have no accessor
|
|
2739
|
+
* — the lookup is always by uuid. Returns the full row including the
|
|
2740
|
+
* `content` document and `status`.
|
|
2741
|
+
*/
|
|
2742
|
+
get(adId: string): Promise<Ad>;
|
|
2743
|
+
/**
|
|
2744
|
+
* Create a new ad for a polymorphic owner entity (an event today). Copy
|
|
2745
|
+
* + status take the DB defaults (empty content, `draft`) and are
|
|
2746
|
+
* populated later via {@link patch}. Returns the created ad.
|
|
2747
|
+
*/
|
|
2748
|
+
create(body: CreateAdRequest): Promise<CreateAdResponse>;
|
|
2749
|
+
/**
|
|
2750
|
+
* Partial-update an ad by id. Pass `content` to write paste-ready Google
|
|
2751
|
+
* Responsive Search Ad copy (the char-limit + count validation is the
|
|
2752
|
+
* self-heal contract) and/or `status` to move the ad through its
|
|
2753
|
+
* lifecycle. Returns the resulting ad.
|
|
2754
|
+
*/
|
|
2755
|
+
patch(adId: string, body: PatchAdRequest): Promise<PatchAdResponse>;
|
|
2756
|
+
/**
|
|
2757
|
+
* Permanently delete an ad by id. Returns the deleted ad row.
|
|
2758
|
+
*/
|
|
2759
|
+
delete(adId: string): Promise<DeleteAdResponse>;
|
|
2760
|
+
}
|
|
2761
|
+
|
|
2503
2762
|
declare class AreasResource extends BaseResource {
|
|
2504
2763
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2505
2764
|
/**
|
|
@@ -2507,9 +2766,10 @@ declare class AreasResource extends BaseResource {
|
|
|
2507
2766
|
*/
|
|
2508
2767
|
list(options?: GetAreaOptions): Promise<Area[]>;
|
|
2509
2768
|
/**
|
|
2510
|
-
* Fetch a single area by id or accessor.
|
|
2769
|
+
* Fetch a single area by id or accessor. The server resolves either
|
|
2770
|
+
* form transparently.
|
|
2511
2771
|
*/
|
|
2512
|
-
|
|
2772
|
+
get(idOrAccessor: string, options?: GetAreaOptions): Promise<Area>;
|
|
2513
2773
|
/**
|
|
2514
2774
|
* List occupied date/time windows for an area between `from` and `to`.
|
|
2515
2775
|
*/
|
|
@@ -2536,9 +2796,10 @@ declare class ArticlesResource extends BaseResource {
|
|
|
2536
2796
|
list(options?: ListArticlesOptions): Promise<ListArticlesResponse>;
|
|
2537
2797
|
/**
|
|
2538
2798
|
* Fetch a single article by id or accessor within the active venue.
|
|
2539
|
-
*
|
|
2799
|
+
* The server resolves either form transparently. Returns the full row
|
|
2800
|
+
* including the TipTap `content` document.
|
|
2540
2801
|
*/
|
|
2541
|
-
|
|
2802
|
+
get(idOrAccessor: string): Promise<Article>;
|
|
2542
2803
|
/**
|
|
2543
2804
|
* Partial-update an article. Locale-keyed fields (slug, title, excerpt)
|
|
2544
2805
|
* merge at the locale level — `{ slug: { en: 'foo' } }` updates `en`
|
|
@@ -2572,6 +2833,22 @@ declare class ArticlesResource extends BaseResource {
|
|
|
2572
2833
|
patchFeatureImage(idOrAccessor: string, body: PatchFeatureImageRequest): Promise<FeatureImage>;
|
|
2573
2834
|
}
|
|
2574
2835
|
|
|
2836
|
+
declare class AssetsResource extends BaseResource {
|
|
2837
|
+
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2838
|
+
/**
|
|
2839
|
+
* List a venue's ACTIVE assets carrying `tag`, ordered by `sortIndex`.
|
|
2840
|
+
*
|
|
2841
|
+
* A binding-agnostic query on the central `assets` table — an asset is
|
|
2842
|
+
* returned regardless of whether it is bound to a ritual, dish, beverage,
|
|
2843
|
+
* event, or is standalone. Each asset carries its resolved Supabase
|
|
2844
|
+
* `publicUrl`.
|
|
2845
|
+
*
|
|
2846
|
+
* @param options - `tag` (required) + optional `type` filter
|
|
2847
|
+
* @returns Array of assets with public URLs
|
|
2848
|
+
*/
|
|
2849
|
+
list(options: ListAssetsOptions): Promise<ListAssetsResponse>;
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2575
2852
|
declare class BasketsResource extends BaseResource {
|
|
2576
2853
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2577
2854
|
/**
|
|
@@ -2643,8 +2920,8 @@ declare class BasketsResource extends BaseResource {
|
|
|
2643
2920
|
}>;
|
|
2644
2921
|
}
|
|
2645
2922
|
|
|
2646
|
-
/** Element type of an expanded event's `
|
|
2647
|
-
type EventPosterEntry = NonNullable<EventByAccessor['
|
|
2923
|
+
/** Element type of an expanded event's `assets[]` array. */
|
|
2924
|
+
type EventPosterEntry = NonNullable<EventByAccessor['assets']>[number];
|
|
2648
2925
|
declare class EventsResource extends BaseResource {
|
|
2649
2926
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2650
2927
|
/**
|
|
@@ -2660,18 +2937,13 @@ declare class EventsResource extends BaseResource {
|
|
|
2660
2937
|
*/
|
|
2661
2938
|
place(event: CreateEventRequest): Promise<CreateEventResponse>;
|
|
2662
2939
|
/**
|
|
2663
|
-
* Get a single event by
|
|
2664
|
-
*
|
|
2665
|
-
* @
|
|
2666
|
-
*/
|
|
2667
|
-
get(eventId: string): Promise<Event>;
|
|
2668
|
-
/**
|
|
2669
|
-
* Get an event by accessor (slug)
|
|
2670
|
-
* @param accessor - The event accessor (e.g., 'lunch-menu')
|
|
2940
|
+
* Get a single event by id or accessor (slug), with optional `expand`
|
|
2941
|
+
* parts. The server resolves either form transparently.
|
|
2942
|
+
* @param idOrAccessor - The event UUID or accessor (e.g., 'lunch-menu')
|
|
2671
2943
|
* @param options - Optional expand options
|
|
2672
2944
|
* @returns The event with optional schedule, timeSlots, menus, and posters
|
|
2673
2945
|
*/
|
|
2674
|
-
|
|
2946
|
+
get(idOrAccessor: string, options?: GetEventOptions): Promise<EventByAccessor>;
|
|
2675
2947
|
private buildQueryString;
|
|
2676
2948
|
/**
|
|
2677
2949
|
* Partial-update an event by id or accessor. Every body field is
|
|
@@ -2689,7 +2961,7 @@ declare class EventsResource extends BaseResource {
|
|
|
2689
2961
|
delete(idOrAccessor: string): Promise<DeleteEventResponse>;
|
|
2690
2962
|
/**
|
|
2691
2963
|
* List the posters attached to an event. Convenience over
|
|
2692
|
-
* `
|
|
2964
|
+
* `get(idOrAccessor, { expand: ['posters'] })` — returns the
|
|
2693
2965
|
* `posters[]` array (empty when the event has none).
|
|
2694
2966
|
*/
|
|
2695
2967
|
listPosters(idOrAccessor: string): Promise<EventPosterEntry[]>;
|
|
@@ -2712,19 +2984,13 @@ declare class EventsResource extends BaseResource {
|
|
|
2712
2984
|
declare class MenusResource extends BaseResource {
|
|
2713
2985
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2714
2986
|
/**
|
|
2715
|
-
* Get a menu by
|
|
2716
|
-
*
|
|
2717
|
-
* @param
|
|
2718
|
-
* @returns The menu with optional items and assets
|
|
2719
|
-
*/
|
|
2720
|
-
get(id: string, options?: GetMenuOptions): Promise<Menu>;
|
|
2721
|
-
/**
|
|
2722
|
-
* Get a menu by accessor
|
|
2723
|
-
* @param accessor - The menu accessor (slug)
|
|
2987
|
+
* Get a menu by id or accessor (slug), with optional `expand` parts.
|
|
2988
|
+
* The server resolves either form transparently.
|
|
2989
|
+
* @param idOrAccessor - The menu UUID or accessor (slug)
|
|
2724
2990
|
* @param options - Optional expand options
|
|
2725
2991
|
* @returns The menu with optional items and assets
|
|
2726
2992
|
*/
|
|
2727
|
-
|
|
2993
|
+
get(idOrAccessor: string, options?: GetMenuOptions): Promise<Menu>;
|
|
2728
2994
|
/**
|
|
2729
2995
|
* Get all bundles for a menu
|
|
2730
2996
|
* @param menuIdOrAccessor - The menu UUID or accessor (slug)
|
|
@@ -2813,17 +3079,12 @@ declare class ReservationsResource extends BaseResource {
|
|
|
2813
3079
|
declare class SubscriptionsResource extends BaseResource {
|
|
2814
3080
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
2815
3081
|
/**
|
|
2816
|
-
* Get a subscription by
|
|
2817
|
-
*
|
|
2818
|
-
* @
|
|
2819
|
-
*/
|
|
2820
|
-
get(id: string): Promise<MenuSubscription>;
|
|
2821
|
-
/**
|
|
2822
|
-
* Get a subscription by accessor
|
|
2823
|
-
* @param accessor - The subscription accessor (slug)
|
|
3082
|
+
* Get a subscription by id or accessor (slug). The server resolves
|
|
3083
|
+
* either form transparently.
|
|
3084
|
+
* @param idOrAccessor - The subscription UUID or accessor (slug)
|
|
2824
3085
|
* @returns The subscription with posters
|
|
2825
3086
|
*/
|
|
2826
|
-
|
|
3087
|
+
get(idOrAccessor: string): Promise<MenuSubscription>;
|
|
2827
3088
|
/**
|
|
2828
3089
|
* Subscribe a customer to a subscription plan via Stripe Checkout
|
|
2829
3090
|
* @param subscriptionIdOrAccessor - The subscription UUID or accessor
|
|
@@ -3355,7 +3616,7 @@ declare class VenuesResource {
|
|
|
3355
3616
|
* — the CLI hits this to prove the accessor exists and to cache the
|
|
3356
3617
|
* resolved UUID + display fields locally.
|
|
3357
3618
|
*/
|
|
3358
|
-
|
|
3619
|
+
get(idOrAccessor: string): Promise<Venue>;
|
|
3359
3620
|
}
|
|
3360
3621
|
|
|
3361
3622
|
type RealtimeEvent = 'INSERT' | 'UPDATE' | 'DELETE' | '*';
|
|
@@ -3563,8 +3824,10 @@ interface O3KClientConfig {
|
|
|
3563
3824
|
tokenUrl?: string;
|
|
3564
3825
|
}
|
|
3565
3826
|
declare class O3KClient {
|
|
3827
|
+
ads: AdsResource;
|
|
3566
3828
|
areas: AreasResource;
|
|
3567
3829
|
articles: ArticlesResource;
|
|
3830
|
+
assets: AssetsResource;
|
|
3568
3831
|
baskets: BasketsResource;
|
|
3569
3832
|
events: EventsResource;
|
|
3570
3833
|
menus: MenusResource;
|
|
@@ -3581,4 +3844,4 @@ declare class O3KClient {
|
|
|
3581
3844
|
}
|
|
3582
3845
|
|
|
3583
3846
|
export { O3KClient, deliveryAddressSchema as O3KDeliveryAddressSchema, fulfillmentTypeEnum as O3KFulfillmentTypeEnum, getScheduleInfo as O3KGetScheduleInfo, participantStatusEnum as O3KParticipantStatusEnum, paymentMethodEnum as O3KPaymentMethodEnum, teamOrderStatusEnum as O3KTeamOrderStatusEnum };
|
|
3584
|
-
export type { AddToBasketRequest as O3KAddToBasketRequest, AddToBasketResponse as O3KAddToBasketResponse, Area as O3KArea, AreaAsset as O3KAreaAsset, AreaAvailabilityResponse as O3KAreaAvailabilityResponse, AreaAvailabilityWindow as O3KAreaAvailabilityWindow, AreaBookingMode as O3KAreaBookingMode, AreaBookingRequestResponse as O3KAreaBookingRequestResponse, AreaBookingRequestSource as O3KAreaBookingRequestSource, AreaBookingRequestStatus as O3KAreaBookingRequestStatus, AreaBookingStatus as O3KAreaBookingStatus, AreaFeature as O3KAreaFeature, Article as O3KArticle, Basket as O3KBasket, BasketItem as O3KBasketItem, BasketItemDeposit as O3KBasketItemDeposit, BasketItemMenuItemRef as O3KBasketItemMenuItemRef, BasketItemMetadata as O3KBasketItemMetadata, BasketStatus as O3KBasketStatus, BasketTotals as O3KBasketTotals, CancelTeamOrderResponse as O3KCancelTeamOrderResponse, O3KClientConfig, ConfirmOrderRequest as O3KConfirmOrderRequest, ConfirmOrderResponse as O3KConfirmOrderResponse, CreateDeltaPaymentIntentRequest as O3KCreateDeltaPaymentIntentRequest, CreateDeltaPaymentIntentResponse as O3KCreateDeltaPaymentIntentResponse, CreateEventRequest as O3KCreateEventRequest, CreateEventResponse as O3KCreateEventResponse, CreatePaymentIntentRequest as O3KCreatePaymentIntentRequest, CreatePaymentIntentResponse as O3KCreatePaymentIntentResponse, CreateTeamOrderRequest as O3KCreateTeamOrderRequest, CreateTeamOrderResponse as O3KCreateTeamOrderResponse, CropArea as O3KCropArea, Currency as O3KCurrency, DayOfWeek as O3KDayOfWeek, DeclaredReturn as O3KDeclaredReturn, DeleteEventResponse as O3KDeleteEventResponse, DeliveryAddress as O3KDeliveryAddress, Event as O3KEvent,
|
|
3847
|
+
export type { Ad as O3KAd, AddToBasketRequest as O3KAddToBasketRequest, AddToBasketResponse as O3KAddToBasketResponse, Area as O3KArea, AreaAsset as O3KAreaAsset, AreaAvailabilityResponse as O3KAreaAvailabilityResponse, AreaAvailabilityWindow as O3KAreaAvailabilityWindow, AreaBookingMode as O3KAreaBookingMode, AreaBookingRequestResponse as O3KAreaBookingRequestResponse, AreaBookingRequestSource as O3KAreaBookingRequestSource, AreaBookingRequestStatus as O3KAreaBookingRequestStatus, AreaBookingStatus as O3KAreaBookingStatus, AreaFeature as O3KAreaFeature, Article as O3KArticle, Asset as O3KAsset, Basket as O3KBasket, BasketItem as O3KBasketItem, BasketItemDeposit as O3KBasketItemDeposit, BasketItemMenuItemRef as O3KBasketItemMenuItemRef, BasketItemMetadata as O3KBasketItemMetadata, BasketStatus as O3KBasketStatus, BasketTotals as O3KBasketTotals, CancelTeamOrderResponse as O3KCancelTeamOrderResponse, O3KClientConfig, ConfirmOrderRequest as O3KConfirmOrderRequest, ConfirmOrderResponse as O3KConfirmOrderResponse, CreateAdRequest as O3KCreateAdRequest, CreateAdResponse as O3KCreateAdResponse, CreateDeltaPaymentIntentRequest as O3KCreateDeltaPaymentIntentRequest, CreateDeltaPaymentIntentResponse as O3KCreateDeltaPaymentIntentResponse, CreateEventRequest as O3KCreateEventRequest, CreateEventResponse as O3KCreateEventResponse, CreatePaymentIntentRequest as O3KCreatePaymentIntentRequest, CreatePaymentIntentResponse as O3KCreatePaymentIntentResponse, CreateTeamOrderRequest as O3KCreateTeamOrderRequest, CreateTeamOrderResponse as O3KCreateTeamOrderResponse, CropArea as O3KCropArea, Currency as O3KCurrency, DayOfWeek as O3KDayOfWeek, DeclaredReturn as O3KDeclaredReturn, DeleteAdResponse as O3KDeleteAdResponse, DeleteEventResponse as O3KDeleteEventResponse, DeliveryAddress as O3KDeliveryAddress, Event as O3KEvent, EventAsset as O3KEventAsset, EventByAccessor as O3KEventByAccessor, EventMenu as O3KEventMenu, EventRow as O3KEventRow, ExtendDeadlineResponse as O3KExtendTeamOrderDeadlineResponse, FeatureImage as O3KFeatureImage, FetchTeamOrderResponse as O3KFetchTeamOrderResponse, GetAreaAvailabilityOptions as O3KGetAreaAvailabilityOptions, GetAreaOptions as O3KGetAreaOptions, GetArticleResponse as O3KGetArticleResponse, GetEventOptions as O3KGetEventOptions, GetMenuOptions as O3KGetMenuOptions, GetVenueResponse as O3KGetVenueResponse, JoinTeamOrderRequest as O3KJoinTeamOrderRequest, JoinTeamOrderResponse as O3KJoinTeamOrderResponse, LatestOrder as O3KLatestOrder, ListAdsOptions as O3KListAdsOptions, ListAdsResponse as O3KListAdsResponse, ListArticlesOptions as O3KListArticlesOptions, ListArticlesResponse as O3KListArticlesResponse, ListAssetsOptions as O3KListAssetsOptions, ListAssetsResponse as O3KListAssetsResponse, ListEventsOptions as O3KListEventsOptions, ListEventsResponse as O3KListEventsResponse, Menu as O3KMenu, MenuAsset as O3KMenuAsset, MenuBeverage as O3KMenuBeverage, MenuBundle as O3KMenuBundle, MenuBundleDeposit as O3KMenuBundleDeposit, MenuDish as O3KMenuDish, MenuItem as O3KMenuItem, MenuItemRow as O3KMenuItemRow, MenuItemType as O3KMenuItemType, MenuSubscription as O3KMenuSubscription, MenuSubscriptionPoster as O3KMenuSubscriptionPoster, OrderFulfillmentType as O3KOrderFulfillmentType, OrderStatus as O3KOrderStatus, PatchAdRequest as O3KPatchAdRequest, PatchAdResponse as O3KPatchAdResponse, PatchArticleRequest as O3KPatchArticleRequest, PatchArticleResponse as O3KPatchArticleResponse, PatchEventRequest as O3KPatchEventRequest, PatchEventResponse as O3KPatchEventResponse, PatchFeatureImageRequest as O3KPatchFeatureImageRequest, PaymentStatus as O3KPaymentStatus, PlaceOrderRequest as O3KPlaceOrderRequest, Promotion as O3KPromotion, RealtimeConfig as O3KRealtimeConfig, RealtimeEvent as O3KRealtimeEvent, RealtimeSubscription as O3KRealtimeSubscription, RemoveFromBasketResponse as O3KRemoveFromBasketResponse, Schedule as O3KSchedule, ScheduleInfo as O3KScheduleInfo, ScheduleOverride as O3KScheduleOverride, ScheduleOverrideRow as O3KScheduleOverrideRow, ScheduleRow as O3KScheduleRow, ScheduleTimeSlot as O3KScheduleTimeSlot, ScheduleWithTimeSlots as O3KScheduleWithTimeSlots, SubmitAreaBookingRequestPayload as O3KSubmitAreaBookingRequestPayload, SubmitTeamOrderResponse as O3KSubmitTeamOrderResponse, SubscribeRequest as O3KSubscribeRequest, SubscribeResponse as O3KSubscribeResponse, SubscriberStatus as O3KSubscriberStatus, SubscriptionCredit as O3KSubscriptionCredit, SubscriptionCreditStatus as O3KSubscriptionCreditStatus, SubscriptionOptions as O3KSubscriptionOptions, SubscriptionPeriod as O3KSubscriptionPeriod, SwitchFulfillmentResponse as O3KSwitchTeamOrderFulfillmentResponse, TeamDeliveryAddress as O3KTeamDeliveryAddress, TeamOrderBasketItem as O3KTeamOrderBasketItem, TeamOrderBasketItemMenuItemRef as O3KTeamOrderBasketItemMenuItemRef, FulfillmentType as O3KTeamOrderFulfillmentType, TeamOrderParticipant as O3KTeamOrderParticipant, ParticipantStatus as O3KTeamOrderParticipantStatus, PaymentMethod as O3KTeamOrderPaymentMethod, TeamOrderStatus as O3KTeamOrderStatus, ThresholdCheck as O3KTeamOrderThresholdCheck, TimeSlot as O3KTimeSlot, Unit as O3KUnit, UpdateDeliveryAddressResponse as O3KUpdateTeamOrderDeliveryAddressResponse, UploadEventPosterArgs as O3KUploadEventPosterArgs, UploadEventPosterResponse as O3KUploadEventPosterResponse, UploadFeatureImageArgs as O3KUploadFeatureImageArgs, Venue as O3KVenue };
|