order3000 1.1.0 → 1.2.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 CHANGED
@@ -170,6 +170,71 @@ class BaseResource {
170
170
  }
171
171
  }
172
172
 
173
+ class AdsResource extends BaseResource {
174
+ constructor(tokenManager, baseUrl) {
175
+ super(tokenManager, baseUrl, "/ads");
176
+ }
177
+ /**
178
+ * List the venue's ads, ordered by `createdAt`. Optionally filter by
179
+ * `ownerEntityType` (e.g. `event`), `ownerEntityId`, or `channel` (e.g.
180
+ * `google`). Each ad carries its paste-ready Google Search Ad `content`
181
+ * document and lifecycle `status`.
182
+ */
183
+ async list(options) {
184
+ const params = new URLSearchParams();
185
+ if (options?.ownerEntityType) {
186
+ params.set("ownerEntityType", options.ownerEntityType);
187
+ }
188
+ if (options?.ownerEntityId) {
189
+ params.set("ownerEntityId", options.ownerEntityId);
190
+ }
191
+ if (options?.channel) {
192
+ params.set("channel", options.channel);
193
+ }
194
+ const qs = params.toString();
195
+ const path = qs ? `?${qs}` : "";
196
+ return this.request("GET", path);
197
+ }
198
+ /**
199
+ * Fetch a single ad by id within the active venue. Ads have no accessor
200
+ * — the lookup is always by uuid. Returns the full row including the
201
+ * `content` document and `status`.
202
+ */
203
+ async get(adId) {
204
+ return this.request("GET", `/${encodeURIComponent(adId)}`);
205
+ }
206
+ /**
207
+ * Create a new ad for a polymorphic owner entity (an event today). Copy
208
+ * + status take the DB defaults (empty content, `draft`) and are
209
+ * populated later via {@link patch}. Returns the created ad.
210
+ */
211
+ async create(body) {
212
+ return this.request("POST", "", body);
213
+ }
214
+ /**
215
+ * Partial-update an ad by id. Pass `content` to write paste-ready Google
216
+ * Responsive Search Ad copy (the char-limit + count validation is the
217
+ * self-heal contract) and/or `status` to move the ad through its
218
+ * lifecycle. Returns the resulting ad.
219
+ */
220
+ async patch(adId, body) {
221
+ return this.request(
222
+ "PATCH",
223
+ `/${encodeURIComponent(adId)}`,
224
+ body
225
+ );
226
+ }
227
+ /**
228
+ * Permanently delete an ad by id. Returns the deleted ad row.
229
+ */
230
+ async delete(adId) {
231
+ return this.request(
232
+ "DELETE",
233
+ `/${encodeURIComponent(adId)}`
234
+ );
235
+ }
236
+ }
237
+
173
238
  class AreasResource extends BaseResource {
174
239
  constructor(tokenManager, baseUrl) {
175
240
  super(tokenManager, baseUrl, "/areas");
@@ -320,6 +385,34 @@ class ArticlesResource extends BaseResource {
320
385
  }
321
386
  }
322
387
 
388
+ class AssetsResource extends BaseResource {
389
+ constructor(tokenManager, baseUrl) {
390
+ super(tokenManager, baseUrl, "/assets");
391
+ }
392
+ /**
393
+ * List a venue's ACTIVE assets carrying `tag`, ordered by `sortIndex`.
394
+ *
395
+ * A binding-agnostic query on the central `assets` table — an asset is
396
+ * returned regardless of whether it is bound to a ritual, dish, beverage,
397
+ * event, or is standalone. Each asset carries its resolved Supabase
398
+ * `publicUrl`.
399
+ *
400
+ * @param options - `tag` (required) + optional `type` filter
401
+ * @returns Array of assets with public URLs
402
+ */
403
+ async list(options) {
404
+ const queryParams = new URLSearchParams();
405
+ queryParams.set("tag", options.tag);
406
+ if (options.type) {
407
+ queryParams.set("type", options.type);
408
+ }
409
+ return this.request(
410
+ "GET",
411
+ `?${queryParams.toString()}`
412
+ );
413
+ }
414
+ }
415
+
323
416
  class BasketsResource extends BaseResource {
324
417
  constructor(tokenManager, baseUrl) {
325
418
  super(tokenManager, baseUrl, "/baskets");
@@ -1310,8 +1403,10 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
1310
1403
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1311
1404
  class O3KClient {
1312
1405
  constructor(config) {
1406
+ __publicField(this, "ads");
1313
1407
  __publicField(this, "areas");
1314
1408
  __publicField(this, "articles");
1409
+ __publicField(this, "assets");
1315
1410
  __publicField(this, "baskets");
1316
1411
  __publicField(this, "events");
1317
1412
  __publicField(this, "menus");
@@ -1332,8 +1427,10 @@ class O3KClient {
1332
1427
  tokenUrl,
1333
1428
  config.venueId
1334
1429
  );
1430
+ this.ads = new AdsResource(this.tokenManager, this.baseUrl);
1335
1431
  this.areas = new AreasResource(this.tokenManager, this.baseUrl);
1336
1432
  this.articles = new ArticlesResource(this.tokenManager, this.baseUrl);
1433
+ this.assets = new AssetsResource(this.tokenManager, this.baseUrl);
1337
1434
  this.baskets = new BasketsResource(this.tokenManager, this.baseUrl);
1338
1435
  this.events = new EventsResource(this.tokenManager, this.baseUrl);
1339
1436
  this.menus = new MenusResource(this.tokenManager, this.baseUrl);
package/dist/client.d.cts CHANGED
@@ -63,6 +63,127 @@ declare abstract class BaseResource {
63
63
 
64
64
  interface components {
65
65
  schemas: {
66
+ /** FetchAdsResponse */
67
+ FetchAdsResponse: {
68
+ id: string;
69
+ venueId: string;
70
+ ownerEntityType: components["schemas"]["AdOwnerType"];
71
+ ownerEntityId: string;
72
+ channel: components["schemas"]["AdChannel"];
73
+ status: components["schemas"]["AdStatus"];
74
+ content: (string | number | boolean | (null)) | {
75
+ [key: string]: unknown;
76
+ } | unknown[];
77
+ createdBy: string | null;
78
+ updatedBy: string | null;
79
+ createdAt: unknown;
80
+ updatedAt: unknown;
81
+ }[];
82
+ /** FetchAdResponse */
83
+ FetchAdResponse: {
84
+ id: string;
85
+ venueId: string;
86
+ ownerEntityType: components["schemas"]["AdOwnerType"];
87
+ ownerEntityId: string;
88
+ channel: components["schemas"]["AdChannel"];
89
+ status: components["schemas"]["AdStatus"];
90
+ content: (string | number | boolean | (null)) | {
91
+ [key: string]: unknown;
92
+ } | unknown[];
93
+ createdBy: string | null;
94
+ updatedBy: string | null;
95
+ createdAt: unknown;
96
+ updatedAt: unknown;
97
+ };
98
+ /**
99
+ * CreateAdRequest
100
+ * @description Request payload for creating a new ad
101
+ */
102
+ CreateAdRequest: {
103
+ venueAccessor: string;
104
+ ownerEntityType: components["schemas"]["AdOwnerType"];
105
+ ownerEntityId: string;
106
+ channel: components["schemas"]["AdChannel"];
107
+ };
108
+ /**
109
+ * CreateAdResponse
110
+ * @description Successfully created ad
111
+ */
112
+ CreateAdResponse: {
113
+ id: string;
114
+ venueId: string;
115
+ ownerEntityType: components["schemas"]["AdOwnerType"];
116
+ ownerEntityId: string;
117
+ channel: components["schemas"]["AdChannel"];
118
+ status: components["schemas"]["AdStatus"];
119
+ content: (string | number | boolean | (null)) | {
120
+ [key: string]: unknown;
121
+ } | unknown[];
122
+ createdBy: string | null;
123
+ updatedBy: string | null;
124
+ createdAt: unknown;
125
+ updatedAt: unknown;
126
+ };
127
+ /**
128
+ * EditAdRequest
129
+ * @description Partial-update body for an existing ad
130
+ */
131
+ EditAdRequest: {
132
+ venueAccessor: string;
133
+ id: string;
134
+ content?: {
135
+ businessName: {
136
+ [key: string]: string;
137
+ };
138
+ headlines: {
139
+ [key: string]: string[];
140
+ };
141
+ descriptions: {
142
+ [key: string]: string[];
143
+ };
144
+ paths: {
145
+ [key: string]: string[];
146
+ };
147
+ /** Format: uri */
148
+ finalUrl: string;
149
+ };
150
+ status?: components["schemas"]["AdStatus"];
151
+ };
152
+ /**
153
+ * EditAdResponse
154
+ * @description Successfully updated ad
155
+ */
156
+ EditAdResponse: {
157
+ id: string;
158
+ venueId: string;
159
+ ownerEntityType: components["schemas"]["AdOwnerType"];
160
+ ownerEntityId: string;
161
+ channel: components["schemas"]["AdChannel"];
162
+ status: components["schemas"]["AdStatus"];
163
+ content: (string | number | boolean | (null)) | {
164
+ [key: string]: unknown;
165
+ } | unknown[];
166
+ createdBy: string | null;
167
+ updatedBy: string | null;
168
+ createdAt: unknown;
169
+ updatedAt: unknown;
170
+ };
171
+ /** DeleteAdResponse */
172
+ DeleteAdResponse: {
173
+ id: string;
174
+ venueId: string;
175
+ ownerEntityType: components["schemas"]["AdOwnerType"];
176
+ ownerEntityId: string;
177
+ channel: components["schemas"]["AdChannel"];
178
+ status: components["schemas"]["AdStatus"];
179
+ content: (string | number | boolean | (null)) | {
180
+ [key: string]: unknown;
181
+ } | unknown[];
182
+ createdBy: string | null;
183
+ updatedBy: string | null;
184
+ createdAt: unknown;
185
+ updatedAt: unknown;
186
+ };
66
187
  /**
67
188
  * Area
68
189
  * @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 +562,42 @@ interface components {
441
562
  [key: string]: unknown;
442
563
  };
443
564
  };
565
+ /** FetchAssetsByTagResponse */
566
+ FetchAssetsByTagResponse: {
567
+ id: string;
568
+ type: components["schemas"]["AssetType"];
569
+ metadata: {
570
+ width?: number;
571
+ height?: number;
572
+ duration?: number;
573
+ } | null;
574
+ isActive: boolean;
575
+ sortIndex: string | null;
576
+ updatedAt: unknown;
577
+ updatedBy: string | null;
578
+ createdAt: unknown;
579
+ createdBy: string | null;
580
+ venueId: string | null;
581
+ tags: string[] | null;
582
+ bucket: string;
583
+ storagePath: string;
584
+ filename: string;
585
+ contentType: string;
586
+ sizeBytes: number;
587
+ caption: {
588
+ [key: string]: unknown;
589
+ };
590
+ alt: {
591
+ [key: string]: unknown;
592
+ };
593
+ cropArea: {
594
+ x: number;
595
+ y: number;
596
+ width: number;
597
+ height: number;
598
+ } | null;
599
+ publicUrl: string;
600
+ }[];
444
601
  /** BasketTotals */
445
602
  BasketTotals: {
446
603
  currency: components["schemas"]["Currency"];
@@ -598,6 +755,8 @@ interface components {
598
755
  } | null;
599
756
  scheduleId: string | null;
600
757
  ritualId: string | null;
758
+ occurrenceDate: string | null;
759
+ ritualType: components["schemas"]["RitualType"];
601
760
  maxBookings: number | null;
602
761
  maxGuests: number | null;
603
762
  minPartySize: number | null;
@@ -688,7 +847,7 @@ interface components {
688
847
  }[];
689
848
  } | null;
690
849
  nextOccurrence: string | null;
691
- posters: {
850
+ assets: {
692
851
  id: string;
693
852
  type: components["schemas"]["AssetType"];
694
853
  metadata: {
@@ -839,7 +998,7 @@ interface components {
839
998
  };
840
999
  category: string;
841
1000
  }[];
842
- posters?: {
1001
+ assets?: {
843
1002
  id: string;
844
1003
  bucket: string;
845
1004
  storagePath: string;
@@ -863,12 +1022,12 @@ interface components {
863
1022
  [key: string]: unknown;
864
1023
  } | unknown[]) | null;
865
1024
  scheduleId?: string | null;
1025
+ occurrenceDate?: string | null;
866
1026
  maxBookings?: number | null;
867
1027
  maxGuests?: number | null;
868
1028
  minPartySize?: number | null;
869
1029
  maxPartySize?: number | null;
870
1030
  isPublic?: boolean;
871
- isRecurring?: boolean;
872
1031
  reservationsEnabled?: boolean;
873
1032
  bookingOpensAtDays?: number | null;
874
1033
  bookingClosesAtOffset?: number | null;
@@ -908,12 +1067,12 @@ interface components {
908
1067
  } | unknown[]) | null;
909
1068
  scheduleId: string | null;
910
1069
  ritualId: string | null;
1070
+ occurrenceDate: string | null;
911
1071
  maxBookings: number | null;
912
1072
  maxGuests: number | null;
913
1073
  minPartySize: number | null;
914
1074
  maxPartySize: number | null;
915
1075
  isPublic: boolean;
916
- isRecurring: boolean;
917
1076
  reservationsEnabled: boolean;
918
1077
  bookingOpensAtDays: number | null;
919
1078
  bookingClosesAtOffset: number | null;
@@ -938,12 +1097,12 @@ interface components {
938
1097
  [key: string]: unknown;
939
1098
  } | unknown[]) | null;
940
1099
  scheduleId?: string | null;
1100
+ occurrenceDate?: string | null;
941
1101
  maxBookings?: number | null;
942
1102
  maxGuests?: number | null;
943
1103
  minPartySize?: number | null;
944
1104
  maxPartySize?: number | null;
945
1105
  isPublic?: boolean;
946
- isRecurring?: boolean;
947
1106
  reservationsEnabled?: boolean;
948
1107
  bookingOpensAtDays?: number | null;
949
1108
  bookingClosesAtOffset?: number | null;
@@ -982,12 +1141,12 @@ interface components {
982
1141
  } | unknown[]) | null;
983
1142
  scheduleId: string | null;
984
1143
  ritualId: string | null;
1144
+ occurrenceDate: string | null;
985
1145
  maxBookings: number | null;
986
1146
  maxGuests: number | null;
987
1147
  minPartySize: number | null;
988
1148
  maxPartySize: number | null;
989
1149
  isPublic: boolean;
990
- isRecurring: boolean;
991
1150
  reservationsEnabled: boolean;
992
1151
  bookingOpensAtDays: number | null;
993
1152
  bookingClosesAtOffset: number | null;
@@ -1054,12 +1213,12 @@ interface components {
1054
1213
  } | unknown[]) | null;
1055
1214
  scheduleId: string | null;
1056
1215
  ritualId: string | null;
1216
+ occurrenceDate: string | null;
1057
1217
  maxBookings: number | null;
1058
1218
  maxGuests: number | null;
1059
1219
  minPartySize: number | null;
1060
1220
  maxPartySize: number | null;
1061
1221
  isPublic: boolean;
1062
- isRecurring: boolean;
1063
1222
  reservationsEnabled: boolean;
1064
1223
  bookingOpensAtDays: number | null;
1065
1224
  bookingClosesAtOffset: number | null;
@@ -1552,6 +1711,12 @@ interface components {
1552
1711
  specialRequests?: string | null;
1553
1712
  /** @description Preferred seating area or table type (e.g., "window seat", "quiet area", "patio") */
1554
1713
  tablePreference?: string | null;
1714
+ /** @description Google Ads click identifier from the landing URL (auto-tagging). Stored for server-side conversion reporting. */
1715
+ gclid?: string | null;
1716
+ /** @description Google Ads click identifier for app/web (iOS) where `gclid` is unavailable. */
1717
+ gbraid?: string | null;
1718
+ /** @description Google Ads click identifier for web-to-app (iOS) where `gclid` is unavailable. */
1719
+ wbraid?: string | null;
1555
1720
  };
1556
1721
  /**
1557
1722
  * MakeReservationResponse
@@ -1613,6 +1778,9 @@ interface components {
1613
1778
  /** @description Additional cancellation details */
1614
1779
  cancellationNote: string | null;
1615
1780
  source: components["schemas"]["AreaBookingRequestSource"];
1781
+ gclid: string | null;
1782
+ gbraid: string | null;
1783
+ wbraid: string | null;
1616
1784
  /** @description Any special requirements or notes */
1617
1785
  specialRequests: string | null;
1618
1786
  /** @description Preferred seating location */
@@ -2055,7 +2223,7 @@ interface components {
2055
2223
  /** @enum {string} */
2056
2224
  IntegrationNotificationType: "order_created" | "order_cancelled" | "order_completed" | "team_order_created" | "reservation_created" | "reservation_confirmed" | "reservation_cancelled";
2057
2225
  /** @enum {string} */
2058
- IntegrationType: "telegram";
2226
+ IntegrationType: "telegram" | "google_ads";
2059
2227
  /** @enum {string} */
2060
2228
  InventoryAssetStatus: "available" | "in_use" | "maintenance" | "retired";
2061
2229
  /** @enum {string} */
@@ -2089,6 +2257,12 @@ interface components {
2089
2257
  /** @enum {string} */
2090
2258
  Unit: "grams" | "kilograms" | "liters" | "milliliters" | "pieces";
2091
2259
  /** @enum {string} */
2260
+ AdChannel: "google";
2261
+ /** @enum {string} */
2262
+ AdOwnerType: "event";
2263
+ /** @enum {string} */
2264
+ AdStatus: "draft" | "ready" | "archived";
2265
+ /** @enum {string} */
2092
2266
  MentionEntityType: "dish" | "beverage" | "ingredient" | "menu" | "ritual";
2093
2267
  /** @enum {string} */
2094
2268
  MentionKind: "link" | "value";
@@ -2103,6 +2277,10 @@ interface components {
2103
2277
  /** @enum {string} */
2104
2278
  Jurisdiction: "DE" | "CH" | "FR" | "IT";
2105
2279
  /** @enum {string} */
2280
+ EventAssetSource: "inherited" | "manual";
2281
+ /** @enum {string} */
2282
+ RitualType: "service" | "special";
2283
+ /** @enum {string} */
2106
2284
  DayOfWeek: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
2107
2285
  /** @enum {string} */
2108
2286
  SlotMode: "interval" | "duration";
@@ -2158,6 +2336,36 @@ interface UploadEventPosterArgs {
2158
2336
  filename: string;
2159
2337
  contentType: string;
2160
2338
  }
2339
+ /**
2340
+ * A single ad row — generated-bound to the `FetchAdResponse` component
2341
+ * (`createSelectSchema(ads)` server-side). Carries the polymorphic owner
2342
+ * (`ownerEntityType` / `ownerEntityId`), the `channel`, the paste-ready
2343
+ * Google Search Ad `content` document, and the lifecycle `status`.
2344
+ */
2345
+ type Ad = schemas['FetchAdResponse'];
2346
+ /**
2347
+ * The ads list response — generated-bound to `FetchAdsResponse` (an array
2348
+ * of {@link Ad}), ordered by `createdAt`. Never hand-rolled.
2349
+ */
2350
+ type ListAdsResponse = schemas['FetchAdsResponse'];
2351
+ type CreateAdRequest = schemas['CreateAdRequest'];
2352
+ type CreateAdResponse = schemas['CreateAdResponse'];
2353
+ type PatchAdRequest = schemas['EditAdRequest'];
2354
+ type PatchAdResponse = schemas['EditAdResponse'];
2355
+ type DeleteAdResponse = schemas['DeleteAdResponse'];
2356
+ /**
2357
+ * Optional filters for `client.ads.list()`. Each narrows the venue's ad
2358
+ * set; omit all to list every ad. Client ergonomics, mapped to the wire
2359
+ * query string by the resource layer.
2360
+ */
2361
+ interface ListAdsOptions {
2362
+ /** Filter to ads owning this entity type (e.g. `event`). */
2363
+ ownerEntityType?: string;
2364
+ /** Filter to ads owning this specific entity id. */
2365
+ ownerEntityId?: string;
2366
+ /** Filter to ads on this channel (e.g. `google`). */
2367
+ channel?: string;
2368
+ }
2161
2369
  type Article = schemas['FetchArticleResponse'];
2162
2370
  type ListArticlesResponse = schemas['FetchArticlesResponse'];
2163
2371
  type GetArticleResponse = schemas['FetchArticleResponse'];
@@ -2234,10 +2442,11 @@ type ScheduleOverride = schemas['FetchEventsResponse'][number]['scheduleOverride
2234
2442
  */
2235
2443
  type Schedule = NonNullable<schemas['FetchEventsResponse'][number]['schedule']>;
2236
2444
  /**
2237
- * An event poster (image/video/document asset attached to an event).
2238
- * Generated-bound to the events list response's `posters[]` element.
2445
+ * An asset (image/video/document) attached to an event. Generated-bound to the
2446
+ * events list response's `assets[]` element. Use the asset's `tags` (e.g.
2447
+ * `'poster'`) to classify how it's used.
2239
2448
  */
2240
- type EventPoster = schemas['FetchEventsResponse'][number]['posters'][number];
2449
+ type EventAsset = schemas['FetchEventsResponse'][number]['assets'][number];
2241
2450
  /**
2242
2451
  * A promotion attached to an event. Generated-bound to the events list
2243
2452
  * response's `promotions[]` element.
@@ -2269,6 +2478,23 @@ interface ListEventsOptions {
2269
2478
  * (an array of {@link Event}). Never hand-rolled.
2270
2479
  */
2271
2480
  type ListEventsResponse = schemas['FetchEventsResponse'];
2481
+ /**
2482
+ * An asset (image/video/document) as returned by the assets-by-tag endpoint,
2483
+ * with its resolved Supabase `publicUrl`. Generated-bound to
2484
+ * `FetchAssetsByTagResponse`'s element — never hand-rolled.
2485
+ */
2486
+ type Asset = schemas['FetchAssetsByTagResponse'][number];
2487
+ interface ListAssetsOptions {
2488
+ /** Required. Only assets carrying this tag are returned. */
2489
+ tag: string;
2490
+ /** Optional asset-type filter. */
2491
+ type?: 'image' | 'video' | 'document';
2492
+ }
2493
+ /**
2494
+ * The assets-by-tag list response — generated-bound to
2495
+ * `FetchAssetsByTagResponse` (an array of {@link Asset}). Never hand-rolled.
2496
+ */
2497
+ type ListAssetsResponse = schemas['FetchAssetsByTagResponse'];
2272
2498
  /**
2273
2499
  * Menu item discriminant — generated-bound to the `type` enum on the
2274
2500
  * menu response's `items[]` element. The `fetchMenu` output schema is
@@ -2500,6 +2726,40 @@ type SubscribeRequest = schemas['SubscribeToSubscriptionBody'];
2500
2726
  type SubscribeResponse = schemas['SubscribeToSubscriptionResponse'];
2501
2727
  type SubscriptionCredit = schemas['GetSubscriptionCreditsResponse'][number];
2502
2728
 
2729
+ declare class AdsResource extends BaseResource {
2730
+ constructor(tokenManager: TokenManager, baseUrl: string);
2731
+ /**
2732
+ * List the venue's ads, ordered by `createdAt`. Optionally filter by
2733
+ * `ownerEntityType` (e.g. `event`), `ownerEntityId`, or `channel` (e.g.
2734
+ * `google`). Each ad carries its paste-ready Google Search Ad `content`
2735
+ * document and lifecycle `status`.
2736
+ */
2737
+ list(options?: ListAdsOptions): Promise<ListAdsResponse>;
2738
+ /**
2739
+ * Fetch a single ad by id within the active venue. Ads have no accessor
2740
+ * — the lookup is always by uuid. Returns the full row including the
2741
+ * `content` document and `status`.
2742
+ */
2743
+ get(adId: string): Promise<Ad>;
2744
+ /**
2745
+ * Create a new ad for a polymorphic owner entity (an event today). Copy
2746
+ * + status take the DB defaults (empty content, `draft`) and are
2747
+ * populated later via {@link patch}. Returns the created ad.
2748
+ */
2749
+ create(body: CreateAdRequest): Promise<CreateAdResponse>;
2750
+ /**
2751
+ * Partial-update an ad by id. Pass `content` to write paste-ready Google
2752
+ * Responsive Search Ad copy (the char-limit + count validation is the
2753
+ * self-heal contract) and/or `status` to move the ad through its
2754
+ * lifecycle. Returns the resulting ad.
2755
+ */
2756
+ patch(adId: string, body: PatchAdRequest): Promise<PatchAdResponse>;
2757
+ /**
2758
+ * Permanently delete an ad by id. Returns the deleted ad row.
2759
+ */
2760
+ delete(adId: string): Promise<DeleteAdResponse>;
2761
+ }
2762
+
2503
2763
  declare class AreasResource extends BaseResource {
2504
2764
  constructor(tokenManager: TokenManager, baseUrl: string);
2505
2765
  /**
@@ -2572,6 +2832,22 @@ declare class ArticlesResource extends BaseResource {
2572
2832
  patchFeatureImage(idOrAccessor: string, body: PatchFeatureImageRequest): Promise<FeatureImage>;
2573
2833
  }
2574
2834
 
2835
+ declare class AssetsResource extends BaseResource {
2836
+ constructor(tokenManager: TokenManager, baseUrl: string);
2837
+ /**
2838
+ * List a venue's ACTIVE assets carrying `tag`, ordered by `sortIndex`.
2839
+ *
2840
+ * A binding-agnostic query on the central `assets` table — an asset is
2841
+ * returned regardless of whether it is bound to a ritual, dish, beverage,
2842
+ * event, or is standalone. Each asset carries its resolved Supabase
2843
+ * `publicUrl`.
2844
+ *
2845
+ * @param options - `tag` (required) + optional `type` filter
2846
+ * @returns Array of assets with public URLs
2847
+ */
2848
+ list(options: ListAssetsOptions): Promise<ListAssetsResponse>;
2849
+ }
2850
+
2575
2851
  declare class BasketsResource extends BaseResource {
2576
2852
  constructor(tokenManager: TokenManager, baseUrl: string);
2577
2853
  /**
@@ -2643,8 +2919,8 @@ declare class BasketsResource extends BaseResource {
2643
2919
  }>;
2644
2920
  }
2645
2921
 
2646
- /** Element type of an expanded event's `posters[]` array. */
2647
- type EventPosterEntry = NonNullable<EventByAccessor['posters']>[number];
2922
+ /** Element type of an expanded event's `assets[]` array. */
2923
+ type EventPosterEntry = NonNullable<EventByAccessor['assets']>[number];
2648
2924
  declare class EventsResource extends BaseResource {
2649
2925
  constructor(tokenManager: TokenManager, baseUrl: string);
2650
2926
  /**
@@ -3563,8 +3839,10 @@ interface O3KClientConfig {
3563
3839
  tokenUrl?: string;
3564
3840
  }
3565
3841
  declare class O3KClient {
3842
+ ads: AdsResource;
3566
3843
  areas: AreasResource;
3567
3844
  articles: ArticlesResource;
3845
+ assets: AssetsResource;
3568
3846
  baskets: BasketsResource;
3569
3847
  events: EventsResource;
3570
3848
  menus: MenusResource;
@@ -3581,4 +3859,4 @@ declare class O3KClient {
3581
3859
  }
3582
3860
 
3583
3861
  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, EventByAccessor as O3KEventByAccessor, EventMenu as O3KEventMenu, EventPoster as O3KEventPoster, 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, ListArticlesOptions as O3KListArticlesOptions, ListArticlesResponse as O3KListArticlesResponse, 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, 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 };
3862
+ 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 };