order3000 0.19.1 → 0.20.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
@@ -184,6 +184,35 @@ class AreasResource extends BaseResource {
184
184
  }
185
185
  }
186
186
 
187
+ class ArticlesResource extends BaseResource {
188
+ constructor(tokenManager, baseUrl) {
189
+ super(tokenManager, baseUrl, "/articles");
190
+ }
191
+ /**
192
+ * List articles for the venue. Default behaviour returns published +
193
+ * active articles, ordered by `priority` (desc) then `publishedAt`
194
+ * (desc). Override defaults via `includeDrafts` / `includeInactive`,
195
+ * or filter by a single tag.
196
+ *
197
+ * `content` on each article is a TipTap JSON document — opaque on the
198
+ * wire. Use the order3000-cli's `articles outline` command (forthcoming)
199
+ * for human-friendly node addressing.
200
+ */
201
+ async list(options) {
202
+ const params = new URLSearchParams();
203
+ if (options?.tag) params.set("tag", options.tag);
204
+ if (options?.includeDrafts !== void 0) {
205
+ params.set("includeDrafts", String(options.includeDrafts));
206
+ }
207
+ if (options?.includeInactive !== void 0) {
208
+ params.set("includeInactive", String(options.includeInactive));
209
+ }
210
+ const qs = params.toString();
211
+ const path = qs ? `?${qs}` : "";
212
+ return this.request("GET", path);
213
+ }
214
+ }
215
+
187
216
  class BasketsResource extends BaseResource {
188
217
  constructor(tokenManager, baseUrl) {
189
218
  super(tokenManager, baseUrl, "/baskets");
@@ -1092,6 +1121,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1092
1121
  class Order3000Client {
1093
1122
  constructor(config) {
1094
1123
  __publicField(this, "areas");
1124
+ __publicField(this, "articles");
1095
1125
  __publicField(this, "baskets");
1096
1126
  __publicField(this, "events");
1097
1127
  __publicField(this, "menus");
@@ -1104,7 +1134,7 @@ class Order3000Client {
1104
1134
  __publicField(this, "baseUrl");
1105
1135
  __publicField(this, "tokenManager");
1106
1136
  this.baseUrl = config.baseUrl || "https://order3000.com/api";
1107
- const tokenUrl = config.tokenUrl || `${this.baseUrl}/auth/token`;
1137
+ const tokenUrl = config.tokenUrl || `${this.baseUrl}/m2m/token`;
1108
1138
  this.tokenManager = new TokenManager(
1109
1139
  config.clientId,
1110
1140
  config.clientSecret,
@@ -1112,6 +1142,7 @@ class Order3000Client {
1112
1142
  config.venueId
1113
1143
  );
1114
1144
  this.areas = new AreasResource(this.tokenManager, this.baseUrl);
1145
+ this.articles = new ArticlesResource(this.tokenManager, this.baseUrl);
1115
1146
  this.baskets = new BasketsResource(this.tokenManager, this.baseUrl);
1116
1147
  this.events = new EventsResource(this.tokenManager, this.baseUrl);
1117
1148
  this.menus = new MenusResource(this.tokenManager, this.baseUrl);
package/dist/client.d.cts CHANGED
@@ -218,6 +218,37 @@ interface components {
218
218
  createdAt: string | null;
219
219
  updatedAt: string | null;
220
220
  };
221
+ /**
222
+ * Article
223
+ * @description A venue's article. `content` is a TipTap JSON document; treat it as opaque on the wire.
224
+ */
225
+ Article: {
226
+ id: string;
227
+ venueId: string;
228
+ accessor: string;
229
+ slug: {
230
+ [key: string]: string;
231
+ };
232
+ title: {
233
+ [key: string]: string;
234
+ };
235
+ excerpt: {
236
+ [key: string]: string;
237
+ };
238
+ content: {
239
+ [key: string]: unknown;
240
+ };
241
+ tags: string[];
242
+ featuredImageId: string | null;
243
+ isActive: boolean;
244
+ isFeatured: boolean;
245
+ priority: number;
246
+ publishedAt: string | null;
247
+ createdAt: string | null;
248
+ updatedAt: string | null;
249
+ };
250
+ /** ListArticlesResponse */
251
+ ListArticlesResponse: components["schemas"]["Article"][];
221
252
  /**
222
253
  * AddToBasketRequest
223
254
  * @description Add an item to the shopping basket
@@ -1077,6 +1108,16 @@ interface components {
1077
1108
  type schemas = components['schemas'];
1078
1109
  type CreateEventRequest = schemas['CreateEventRequest'];
1079
1110
  type CreateEventResponse = schemas['CreateEventResponse'];
1111
+ type Article = schemas['Article'];
1112
+ type ListArticlesResponse = schemas['ListArticlesResponse'];
1113
+ interface ListArticlesOptions {
1114
+ /** Only return articles whose `tags` array contains this value. */
1115
+ tag?: string;
1116
+ /** When `true`, include articles whose `publishedAt` is null. Default `false`. */
1117
+ includeDrafts?: boolean;
1118
+ /** When `true`, include articles whose `isActive` is `false`. Default `false`. */
1119
+ includeInactive?: boolean;
1120
+ }
1080
1121
  /**
1081
1122
  * Order fulfillment type - matches order_fulfillment_type enum in order3000 database.
1082
1123
  * Keep in sync with apps/order3000/src/drizzle/enums.ts
@@ -1853,6 +1894,21 @@ declare class AreasResource extends BaseResource {
1853
1894
  private buildExpandQuery;
1854
1895
  }
1855
1896
 
1897
+ declare class ArticlesResource extends BaseResource {
1898
+ constructor(tokenManager: TokenManager, baseUrl: string);
1899
+ /**
1900
+ * List articles for the venue. Default behaviour returns published +
1901
+ * active articles, ordered by `priority` (desc) then `publishedAt`
1902
+ * (desc). Override defaults via `includeDrafts` / `includeInactive`,
1903
+ * or filter by a single tag.
1904
+ *
1905
+ * `content` on each article is a TipTap JSON document — opaque on the
1906
+ * wire. Use the order3000-cli's `articles outline` command (forthcoming)
1907
+ * for human-friendly node addressing.
1908
+ */
1909
+ list(options?: ListArticlesOptions): Promise<ListArticlesResponse>;
1910
+ }
1911
+
1856
1912
  declare class BasketsResource extends BaseResource {
1857
1913
  constructor(tokenManager: TokenManager, baseUrl: string);
1858
1914
  /**
@@ -2688,13 +2744,17 @@ interface Order3000ClientConfig {
2688
2744
  */
2689
2745
  baseUrl?: string;
2690
2746
  /**
2691
- * OAuth 2.0 token endpoint
2692
- * @default "${baseUrl}/auth/token"
2747
+ * Machine-to-machine token endpoint. The order3000 server hosts user
2748
+ * session routes under `/auth/*` and robot-account M2M token exchange
2749
+ * under `/m2m/token`; the SDK is exclusively an M2M consumer, so the
2750
+ * default points at the latter.
2751
+ * @default "${baseUrl}/m2m/token"
2693
2752
  */
2694
2753
  tokenUrl?: string;
2695
2754
  }
2696
2755
  declare class Order3000Client {
2697
2756
  areas: AreasResource;
2757
+ articles: ArticlesResource;
2698
2758
  baskets: BasketsResource;
2699
2759
  events: EventsResource;
2700
2760
  menus: MenusResource;
@@ -2710,4 +2770,4 @@ declare class Order3000Client {
2710
2770
  }
2711
2771
 
2712
2772
  export { Order3000Client, fulfillmentTypeEnum, getScheduleInfo, participantStatusEnum, paymentMethodEnum, teamOrderStatusEnum };
2713
- export type { AddToBasketRequest, AddToBasketResponse, Area, AreaAsset, AreaAvailabilityResponse, AreaAvailabilityWindow, AreaBookingMode, AreaBookingRequestResponse, AreaBookingRequestSource, AreaBookingRequestStatus, AreaBookingStatus, AreaFeature, Basket, BasketItem, BasketItemDeposit, BasketItemMenuItemRef, BasketItemMetadata, BasketStatus, BasketTotals, CancelTeamOrderResponse, ConfirmOrderRequest, ConfirmOrderResponse, CreateDeltaPaymentIntentRequest, CreateDeltaPaymentIntentResponse, CreatePaymentIntentRequest, CreatePaymentIntentResponse, CreateTeamOrderRequest, CreateTeamOrderResponse, CropArea, Currency, DayOfWeek, DeclaredReturn, Event, EventByAccessor, EventMenu, EventPoster, EventRow, ExtendDeadlineResponse as ExtendTeamOrderDeadlineResponse, FetchTeamOrderResponse, GetAreaAvailabilityOptions, GetAreaOptions, GetEventOptions, GetMenuOptions, JoinTeamOrderRequest, JoinTeamOrderResponse, LatestOrder, ListEventsOptions, ListEventsResponse, Menu, MenuAsset, MenuBeverage, MenuBundle, MenuBundleDeposit, MenuDish, MenuItem, MenuItemRow, MenuItemType, MenuSubscription, MenuSubscriptionPoster, Order3000ClientConfig, OrderFulfillmentType, OrderStatus, PaymentStatus, PlaceOrderRequest, Promotion, RealtimeConfig, RealtimeEvent, RealtimeSubscription, RemoveFromBasketResponse, Schedule, ScheduleInfo, ScheduleOverride, ScheduleOverrideRow, ScheduleRow, ScheduleTimeSlot, ScheduleWithTimeSlots, SubmitAreaBookingRequestPayload, SubmitTeamOrderResponse, SubscribeRequest, SubscribeResponse, SubscriberStatus, SubscriptionCredit, SubscriptionCreditStatus, SubscriptionOptions, SubscriptionPeriod, SwitchFulfillmentResponse as SwitchTeamOrderFulfillmentResponse, TeamDeliveryAddress, TeamOrderBasketItem, TeamOrderBasketItemMenuItemRef, FulfillmentType as TeamOrderFulfillmentType, TeamOrderParticipant, ParticipantStatus as TeamOrderParticipantStatus, PaymentMethod as TeamOrderPaymentMethod, TeamOrderStatus, ThresholdCheck as TeamOrderThresholdCheck, TimeSlot, Unit, UpdateDeliveryAddressResponse as UpdateTeamOrderDeliveryAddressResponse };
2773
+ export type { AddToBasketRequest, AddToBasketResponse, Area, AreaAsset, AreaAvailabilityResponse, AreaAvailabilityWindow, AreaBookingMode, AreaBookingRequestResponse, AreaBookingRequestSource, AreaBookingRequestStatus, AreaBookingStatus, AreaFeature, Article, Basket, BasketItem, BasketItemDeposit, BasketItemMenuItemRef, BasketItemMetadata, BasketStatus, BasketTotals, CancelTeamOrderResponse, ConfirmOrderRequest, ConfirmOrderResponse, CreateDeltaPaymentIntentRequest, CreateDeltaPaymentIntentResponse, CreatePaymentIntentRequest, CreatePaymentIntentResponse, CreateTeamOrderRequest, CreateTeamOrderResponse, CropArea, Currency, DayOfWeek, DeclaredReturn, Event, EventByAccessor, EventMenu, EventPoster, EventRow, ExtendDeadlineResponse as ExtendTeamOrderDeadlineResponse, FetchTeamOrderResponse, GetAreaAvailabilityOptions, GetAreaOptions, GetEventOptions, GetMenuOptions, JoinTeamOrderRequest, JoinTeamOrderResponse, LatestOrder, ListArticlesOptions, ListArticlesResponse, ListEventsOptions, ListEventsResponse, Menu, MenuAsset, MenuBeverage, MenuBundle, MenuBundleDeposit, MenuDish, MenuItem, MenuItemRow, MenuItemType, MenuSubscription, MenuSubscriptionPoster, Order3000ClientConfig, OrderFulfillmentType, OrderStatus, PaymentStatus, PlaceOrderRequest, Promotion, RealtimeConfig, RealtimeEvent, RealtimeSubscription, RemoveFromBasketResponse, Schedule, ScheduleInfo, ScheduleOverride, ScheduleOverrideRow, ScheduleRow, ScheduleTimeSlot, ScheduleWithTimeSlots, SubmitAreaBookingRequestPayload, SubmitTeamOrderResponse, SubscribeRequest, SubscribeResponse, SubscriberStatus, SubscriptionCredit, SubscriptionCreditStatus, SubscriptionOptions, SubscriptionPeriod, SwitchFulfillmentResponse as SwitchTeamOrderFulfillmentResponse, TeamDeliveryAddress, TeamOrderBasketItem, TeamOrderBasketItemMenuItemRef, FulfillmentType as TeamOrderFulfillmentType, TeamOrderParticipant, ParticipantStatus as TeamOrderParticipantStatus, PaymentMethod as TeamOrderPaymentMethod, TeamOrderStatus, ThresholdCheck as TeamOrderThresholdCheck, TimeSlot, Unit, UpdateDeliveryAddressResponse as UpdateTeamOrderDeliveryAddressResponse };
package/dist/client.d.mts CHANGED
@@ -218,6 +218,37 @@ interface components {
218
218
  createdAt: string | null;
219
219
  updatedAt: string | null;
220
220
  };
221
+ /**
222
+ * Article
223
+ * @description A venue's article. `content` is a TipTap JSON document; treat it as opaque on the wire.
224
+ */
225
+ Article: {
226
+ id: string;
227
+ venueId: string;
228
+ accessor: string;
229
+ slug: {
230
+ [key: string]: string;
231
+ };
232
+ title: {
233
+ [key: string]: string;
234
+ };
235
+ excerpt: {
236
+ [key: string]: string;
237
+ };
238
+ content: {
239
+ [key: string]: unknown;
240
+ };
241
+ tags: string[];
242
+ featuredImageId: string | null;
243
+ isActive: boolean;
244
+ isFeatured: boolean;
245
+ priority: number;
246
+ publishedAt: string | null;
247
+ createdAt: string | null;
248
+ updatedAt: string | null;
249
+ };
250
+ /** ListArticlesResponse */
251
+ ListArticlesResponse: components["schemas"]["Article"][];
221
252
  /**
222
253
  * AddToBasketRequest
223
254
  * @description Add an item to the shopping basket
@@ -1077,6 +1108,16 @@ interface components {
1077
1108
  type schemas = components['schemas'];
1078
1109
  type CreateEventRequest = schemas['CreateEventRequest'];
1079
1110
  type CreateEventResponse = schemas['CreateEventResponse'];
1111
+ type Article = schemas['Article'];
1112
+ type ListArticlesResponse = schemas['ListArticlesResponse'];
1113
+ interface ListArticlesOptions {
1114
+ /** Only return articles whose `tags` array contains this value. */
1115
+ tag?: string;
1116
+ /** When `true`, include articles whose `publishedAt` is null. Default `false`. */
1117
+ includeDrafts?: boolean;
1118
+ /** When `true`, include articles whose `isActive` is `false`. Default `false`. */
1119
+ includeInactive?: boolean;
1120
+ }
1080
1121
  /**
1081
1122
  * Order fulfillment type - matches order_fulfillment_type enum in order3000 database.
1082
1123
  * Keep in sync with apps/order3000/src/drizzle/enums.ts
@@ -1853,6 +1894,21 @@ declare class AreasResource extends BaseResource {
1853
1894
  private buildExpandQuery;
1854
1895
  }
1855
1896
 
1897
+ declare class ArticlesResource extends BaseResource {
1898
+ constructor(tokenManager: TokenManager, baseUrl: string);
1899
+ /**
1900
+ * List articles for the venue. Default behaviour returns published +
1901
+ * active articles, ordered by `priority` (desc) then `publishedAt`
1902
+ * (desc). Override defaults via `includeDrafts` / `includeInactive`,
1903
+ * or filter by a single tag.
1904
+ *
1905
+ * `content` on each article is a TipTap JSON document — opaque on the
1906
+ * wire. Use the order3000-cli's `articles outline` command (forthcoming)
1907
+ * for human-friendly node addressing.
1908
+ */
1909
+ list(options?: ListArticlesOptions): Promise<ListArticlesResponse>;
1910
+ }
1911
+
1856
1912
  declare class BasketsResource extends BaseResource {
1857
1913
  constructor(tokenManager: TokenManager, baseUrl: string);
1858
1914
  /**
@@ -2688,13 +2744,17 @@ interface Order3000ClientConfig {
2688
2744
  */
2689
2745
  baseUrl?: string;
2690
2746
  /**
2691
- * OAuth 2.0 token endpoint
2692
- * @default "${baseUrl}/auth/token"
2747
+ * Machine-to-machine token endpoint. The order3000 server hosts user
2748
+ * session routes under `/auth/*` and robot-account M2M token exchange
2749
+ * under `/m2m/token`; the SDK is exclusively an M2M consumer, so the
2750
+ * default points at the latter.
2751
+ * @default "${baseUrl}/m2m/token"
2693
2752
  */
2694
2753
  tokenUrl?: string;
2695
2754
  }
2696
2755
  declare class Order3000Client {
2697
2756
  areas: AreasResource;
2757
+ articles: ArticlesResource;
2698
2758
  baskets: BasketsResource;
2699
2759
  events: EventsResource;
2700
2760
  menus: MenusResource;
@@ -2710,4 +2770,4 @@ declare class Order3000Client {
2710
2770
  }
2711
2771
 
2712
2772
  export { Order3000Client, fulfillmentTypeEnum, getScheduleInfo, participantStatusEnum, paymentMethodEnum, teamOrderStatusEnum };
2713
- export type { AddToBasketRequest, AddToBasketResponse, Area, AreaAsset, AreaAvailabilityResponse, AreaAvailabilityWindow, AreaBookingMode, AreaBookingRequestResponse, AreaBookingRequestSource, AreaBookingRequestStatus, AreaBookingStatus, AreaFeature, Basket, BasketItem, BasketItemDeposit, BasketItemMenuItemRef, BasketItemMetadata, BasketStatus, BasketTotals, CancelTeamOrderResponse, ConfirmOrderRequest, ConfirmOrderResponse, CreateDeltaPaymentIntentRequest, CreateDeltaPaymentIntentResponse, CreatePaymentIntentRequest, CreatePaymentIntentResponse, CreateTeamOrderRequest, CreateTeamOrderResponse, CropArea, Currency, DayOfWeek, DeclaredReturn, Event, EventByAccessor, EventMenu, EventPoster, EventRow, ExtendDeadlineResponse as ExtendTeamOrderDeadlineResponse, FetchTeamOrderResponse, GetAreaAvailabilityOptions, GetAreaOptions, GetEventOptions, GetMenuOptions, JoinTeamOrderRequest, JoinTeamOrderResponse, LatestOrder, ListEventsOptions, ListEventsResponse, Menu, MenuAsset, MenuBeverage, MenuBundle, MenuBundleDeposit, MenuDish, MenuItem, MenuItemRow, MenuItemType, MenuSubscription, MenuSubscriptionPoster, Order3000ClientConfig, OrderFulfillmentType, OrderStatus, PaymentStatus, PlaceOrderRequest, Promotion, RealtimeConfig, RealtimeEvent, RealtimeSubscription, RemoveFromBasketResponse, Schedule, ScheduleInfo, ScheduleOverride, ScheduleOverrideRow, ScheduleRow, ScheduleTimeSlot, ScheduleWithTimeSlots, SubmitAreaBookingRequestPayload, SubmitTeamOrderResponse, SubscribeRequest, SubscribeResponse, SubscriberStatus, SubscriptionCredit, SubscriptionCreditStatus, SubscriptionOptions, SubscriptionPeriod, SwitchFulfillmentResponse as SwitchTeamOrderFulfillmentResponse, TeamDeliveryAddress, TeamOrderBasketItem, TeamOrderBasketItemMenuItemRef, FulfillmentType as TeamOrderFulfillmentType, TeamOrderParticipant, ParticipantStatus as TeamOrderParticipantStatus, PaymentMethod as TeamOrderPaymentMethod, TeamOrderStatus, ThresholdCheck as TeamOrderThresholdCheck, TimeSlot, Unit, UpdateDeliveryAddressResponse as UpdateTeamOrderDeliveryAddressResponse };
2773
+ export type { AddToBasketRequest, AddToBasketResponse, Area, AreaAsset, AreaAvailabilityResponse, AreaAvailabilityWindow, AreaBookingMode, AreaBookingRequestResponse, AreaBookingRequestSource, AreaBookingRequestStatus, AreaBookingStatus, AreaFeature, Article, Basket, BasketItem, BasketItemDeposit, BasketItemMenuItemRef, BasketItemMetadata, BasketStatus, BasketTotals, CancelTeamOrderResponse, ConfirmOrderRequest, ConfirmOrderResponse, CreateDeltaPaymentIntentRequest, CreateDeltaPaymentIntentResponse, CreatePaymentIntentRequest, CreatePaymentIntentResponse, CreateTeamOrderRequest, CreateTeamOrderResponse, CropArea, Currency, DayOfWeek, DeclaredReturn, Event, EventByAccessor, EventMenu, EventPoster, EventRow, ExtendDeadlineResponse as ExtendTeamOrderDeadlineResponse, FetchTeamOrderResponse, GetAreaAvailabilityOptions, GetAreaOptions, GetEventOptions, GetMenuOptions, JoinTeamOrderRequest, JoinTeamOrderResponse, LatestOrder, ListArticlesOptions, ListArticlesResponse, ListEventsOptions, ListEventsResponse, Menu, MenuAsset, MenuBeverage, MenuBundle, MenuBundleDeposit, MenuDish, MenuItem, MenuItemRow, MenuItemType, MenuSubscription, MenuSubscriptionPoster, Order3000ClientConfig, OrderFulfillmentType, OrderStatus, PaymentStatus, PlaceOrderRequest, Promotion, RealtimeConfig, RealtimeEvent, RealtimeSubscription, RemoveFromBasketResponse, Schedule, ScheduleInfo, ScheduleOverride, ScheduleOverrideRow, ScheduleRow, ScheduleTimeSlot, ScheduleWithTimeSlots, SubmitAreaBookingRequestPayload, SubmitTeamOrderResponse, SubscribeRequest, SubscribeResponse, SubscriberStatus, SubscriptionCredit, SubscriptionCreditStatus, SubscriptionOptions, SubscriptionPeriod, SwitchFulfillmentResponse as SwitchTeamOrderFulfillmentResponse, TeamDeliveryAddress, TeamOrderBasketItem, TeamOrderBasketItemMenuItemRef, FulfillmentType as TeamOrderFulfillmentType, TeamOrderParticipant, ParticipantStatus as TeamOrderParticipantStatus, PaymentMethod as TeamOrderPaymentMethod, TeamOrderStatus, ThresholdCheck as TeamOrderThresholdCheck, TimeSlot, Unit, UpdateDeliveryAddressResponse as UpdateTeamOrderDeliveryAddressResponse };
package/dist/client.mjs CHANGED
@@ -182,6 +182,35 @@ class AreasResource extends BaseResource {
182
182
  }
183
183
  }
184
184
 
185
+ class ArticlesResource extends BaseResource {
186
+ constructor(tokenManager, baseUrl) {
187
+ super(tokenManager, baseUrl, "/articles");
188
+ }
189
+ /**
190
+ * List articles for the venue. Default behaviour returns published +
191
+ * active articles, ordered by `priority` (desc) then `publishedAt`
192
+ * (desc). Override defaults via `includeDrafts` / `includeInactive`,
193
+ * or filter by a single tag.
194
+ *
195
+ * `content` on each article is a TipTap JSON document — opaque on the
196
+ * wire. Use the order3000-cli's `articles outline` command (forthcoming)
197
+ * for human-friendly node addressing.
198
+ */
199
+ async list(options) {
200
+ const params = new URLSearchParams();
201
+ if (options?.tag) params.set("tag", options.tag);
202
+ if (options?.includeDrafts !== void 0) {
203
+ params.set("includeDrafts", String(options.includeDrafts));
204
+ }
205
+ if (options?.includeInactive !== void 0) {
206
+ params.set("includeInactive", String(options.includeInactive));
207
+ }
208
+ const qs = params.toString();
209
+ const path = qs ? `?${qs}` : "";
210
+ return this.request("GET", path);
211
+ }
212
+ }
213
+
185
214
  class BasketsResource extends BaseResource {
186
215
  constructor(tokenManager, baseUrl) {
187
216
  super(tokenManager, baseUrl, "/baskets");
@@ -1090,6 +1119,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1090
1119
  class Order3000Client {
1091
1120
  constructor(config) {
1092
1121
  __publicField(this, "areas");
1122
+ __publicField(this, "articles");
1093
1123
  __publicField(this, "baskets");
1094
1124
  __publicField(this, "events");
1095
1125
  __publicField(this, "menus");
@@ -1102,7 +1132,7 @@ class Order3000Client {
1102
1132
  __publicField(this, "baseUrl");
1103
1133
  __publicField(this, "tokenManager");
1104
1134
  this.baseUrl = config.baseUrl || "https://order3000.com/api";
1105
- const tokenUrl = config.tokenUrl || `${this.baseUrl}/auth/token`;
1135
+ const tokenUrl = config.tokenUrl || `${this.baseUrl}/m2m/token`;
1106
1136
  this.tokenManager = new TokenManager(
1107
1137
  config.clientId,
1108
1138
  config.clientSecret,
@@ -1110,6 +1140,7 @@ class Order3000Client {
1110
1140
  config.venueId
1111
1141
  );
1112
1142
  this.areas = new AreasResource(this.tokenManager, this.baseUrl);
1143
+ this.articles = new ArticlesResource(this.tokenManager, this.baseUrl);
1113
1144
  this.baskets = new BasketsResource(this.tokenManager, this.baseUrl);
1114
1145
  this.events = new EventsResource(this.tokenManager, this.baseUrl);
1115
1146
  this.menus = new MenusResource(this.tokenManager, this.baseUrl);
package/dist/schemas.cjs CHANGED
@@ -8,6 +8,9 @@ const GetAreaResponse = zod.z.object({ id: zod.z.string(), venueId: zod.z.string
8
8
  const GetAreaAvailabilityResponse = zod.z.object({ from: zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/), to: zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/), bookingMode: zod.z.enum(["slot", "day"]), occupied: zod.z.array(zod.z.object({ date: zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/), startTime: zod.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable(), endTime: zod.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable() }).strict()) }).strict();
9
9
  const SubmitAreaBookingRequest = zod.z.object({ requestedDate: zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/), requestedStartTime: zod.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).optional(), requestedEndTime: zod.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).optional(), partySize: zod.z.number().int().lte(9007199254740991), customerFirstName: zod.z.string().min(1), customerLastName: zod.z.string().min(1), customerEmail: zod.z.string().regex(/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/).email(), customerPhone: zod.z.string().optional(), message: zod.z.string().optional(), source: zod.z.enum(["website", "phone", "walk_in"]).optional() }).strict();
10
10
  const SubmitAreaBookingResponse = zod.z.object({ id: zod.z.string(), venueId: zod.z.string(), areaId: zod.z.string(), requestedDate: zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/), requestedStartTime: zod.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable(), requestedEndTime: zod.z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable(), partySize: zod.z.number().int().gte(-9007199254740991).lte(9007199254740991), customerFirstName: zod.z.string(), customerLastName: zod.z.string(), customerEmail: zod.z.string(), customerPhone: zod.z.string().nullable(), message: zod.z.string().nullable(), source: zod.z.enum(["website", "phone", "walk_in"]), status: zod.z.enum(["pending", "approved", "rejected", "cancelled"]), areaBookingId: zod.z.string().nullable(), createdAt: zod.z.string().nullable(), updatedAt: zod.z.string().nullable() }).strict();
11
+ const includeDrafts = zod.z.union([zod.z.literal("true"), zod.z.literal("false")]).optional();
12
+ const Article = zod.z.object({ id: zod.z.string(), venueId: zod.z.string(), accessor: zod.z.string(), slug: zod.z.record(zod.z.string()), title: zod.z.record(zod.z.string()), excerpt: zod.z.record(zod.z.string()), content: zod.z.object({}).partial().strict().passthrough(), tags: zod.z.array(zod.z.string()), featuredImageId: zod.z.string().nullable(), isActive: zod.z.boolean(), isFeatured: zod.z.boolean(), priority: zod.z.number().int().gte(-9007199254740991).lte(9007199254740991), publishedAt: zod.z.string().nullable(), createdAt: zod.z.string().nullable(), updatedAt: zod.z.string().nullable() }).strict();
13
+ const ListArticlesResponse = zod.z.array(Article);
11
14
  const AddToBasketRequest = zod.z.object({ venueId: zod.z.string().regex(/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/).uuid(), sessionId: zod.z.string().min(1), menuItems: zod.z.array(zod.z.object({ menuItemId: zod.z.string().min(1), role: zod.z.string().optional(), quantity: zod.z.number().gt(0).optional(), unit: zod.z.enum(["grams", "kilograms", "liters", "milliliters", "pieces"]).optional() }).strict()).min(1), metadata: zod.z.object({}).partial().strict().passthrough().optional() }).strict();
12
15
  const AddToBasketResponse = zod.z.object({ basketItemId: zod.z.string().regex(/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/).uuid(), itemCount: zod.z.number().int().gte(0).lte(9007199254740991), deposit: zod.z.object({ depositwareTemplateId: zod.z.string(), name: zod.z.record(zod.z.string()), amount: zod.z.number().int().gte(0).lte(9007199254740991), currency: zod.z.enum(["EUR", "CHF"]) }).strict().nullable(), totals: zod.z.object({ currency: zod.z.enum(["EUR", "CHF"]), itemsTotal: zod.z.number().int().gte(0).lte(9007199254740991), taxAmount: zod.z.number().int().gte(0).lte(9007199254740991), depositCharge: zod.z.number().int().gte(0).lte(9007199254740991), grossTotal: zod.z.number().int().gte(0).lte(9007199254740991), depositCredit: zod.z.number().int().gte(0).lte(9007199254740991), effectiveTotal: zod.z.number().int().gte(0).lte(9007199254740991), cashRefund: zod.z.number().int().gte(0).lte(9007199254740991), returnable: zod.z.array(zod.z.object({ depositwareTemplateId: zod.z.string(), count: zod.z.number().int().gte(0).lte(9007199254740991) }).strict()) }).strict() }).strict();
13
16
  const RemoveFromBasketResponse = zod.z.object({ success: zod.z.boolean(), basketItemId: zod.z.string().regex(/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/).uuid(), itemCount: zod.z.number().int().gte(0).lte(9007199254740991), totals: zod.z.object({ currency: zod.z.enum(["EUR", "CHF"]), itemsTotal: zod.z.number().int().gte(0).lte(9007199254740991), taxAmount: zod.z.number().int().gte(0).lte(9007199254740991), depositCharge: zod.z.number().int().gte(0).lte(9007199254740991), grossTotal: zod.z.number().int().gte(0).lte(9007199254740991), depositCredit: zod.z.number().int().gte(0).lte(9007199254740991), effectiveTotal: zod.z.number().int().gte(0).lte(9007199254740991), cashRefund: zod.z.number().int().gte(0).lte(9007199254740991), returnable: zod.z.array(zod.z.object({ depositwareTemplateId: zod.z.string(), count: zod.z.number().int().gte(0).lte(9007199254740991) }).strict()) }).strict().nullable() }).strict();
@@ -66,6 +69,9 @@ const schemas = {
66
69
  GetAreaAvailabilityResponse,
67
70
  SubmitAreaBookingRequest,
68
71
  SubmitAreaBookingResponse,
72
+ includeDrafts,
73
+ Article,
74
+ ListArticlesResponse,
69
75
  AddToBasketRequest,
70
76
  AddToBasketResponse,
71
77
  RemoveFromBasketResponse,
@@ -649,6 +649,113 @@ declare const schemas: {
649
649
  createdAt: string | null;
650
650
  updatedAt: string | null;
651
651
  }>;
652
+ includeDrafts: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>;
653
+ Article: z.ZodObject<{
654
+ id: z.ZodString;
655
+ venueId: z.ZodString;
656
+ accessor: z.ZodString;
657
+ slug: z.ZodRecord<z.ZodString, z.ZodString>;
658
+ title: z.ZodRecord<z.ZodString, z.ZodString>;
659
+ excerpt: z.ZodRecord<z.ZodString, z.ZodString>;
660
+ content: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
661
+ tags: z.ZodArray<z.ZodString, "many">;
662
+ featuredImageId: z.ZodNullable<z.ZodString>;
663
+ isActive: z.ZodBoolean;
664
+ isFeatured: z.ZodBoolean;
665
+ priority: z.ZodNumber;
666
+ publishedAt: z.ZodNullable<z.ZodString>;
667
+ createdAt: z.ZodNullable<z.ZodString>;
668
+ updatedAt: z.ZodNullable<z.ZodString>;
669
+ }, "strict", z.ZodTypeAny, {
670
+ id: string;
671
+ venueId: string;
672
+ accessor: string;
673
+ tags: string[];
674
+ createdAt: string | null;
675
+ updatedAt: string | null;
676
+ slug: Record<string, string>;
677
+ title: Record<string, string>;
678
+ excerpt: Record<string, string>;
679
+ content: {} & {
680
+ [k: string]: unknown;
681
+ };
682
+ featuredImageId: string | null;
683
+ isActive: boolean;
684
+ isFeatured: boolean;
685
+ priority: number;
686
+ publishedAt: string | null;
687
+ }, {
688
+ id: string;
689
+ venueId: string;
690
+ accessor: string;
691
+ tags: string[];
692
+ createdAt: string | null;
693
+ updatedAt: string | null;
694
+ slug: Record<string, string>;
695
+ title: Record<string, string>;
696
+ excerpt: Record<string, string>;
697
+ content: {} & {
698
+ [k: string]: unknown;
699
+ };
700
+ featuredImageId: string | null;
701
+ isActive: boolean;
702
+ isFeatured: boolean;
703
+ priority: number;
704
+ publishedAt: string | null;
705
+ }>;
706
+ ListArticlesResponse: z.ZodArray<z.ZodObject<{
707
+ id: z.ZodString;
708
+ venueId: z.ZodString;
709
+ accessor: z.ZodString;
710
+ slug: z.ZodRecord<z.ZodString, z.ZodString>;
711
+ title: z.ZodRecord<z.ZodString, z.ZodString>;
712
+ excerpt: z.ZodRecord<z.ZodString, z.ZodString>;
713
+ content: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
714
+ tags: z.ZodArray<z.ZodString, "many">;
715
+ featuredImageId: z.ZodNullable<z.ZodString>;
716
+ isActive: z.ZodBoolean;
717
+ isFeatured: z.ZodBoolean;
718
+ priority: z.ZodNumber;
719
+ publishedAt: z.ZodNullable<z.ZodString>;
720
+ createdAt: z.ZodNullable<z.ZodString>;
721
+ updatedAt: z.ZodNullable<z.ZodString>;
722
+ }, "strict", z.ZodTypeAny, {
723
+ id: string;
724
+ venueId: string;
725
+ accessor: string;
726
+ tags: string[];
727
+ createdAt: string | null;
728
+ updatedAt: string | null;
729
+ slug: Record<string, string>;
730
+ title: Record<string, string>;
731
+ excerpt: Record<string, string>;
732
+ content: {} & {
733
+ [k: string]: unknown;
734
+ };
735
+ featuredImageId: string | null;
736
+ isActive: boolean;
737
+ isFeatured: boolean;
738
+ priority: number;
739
+ publishedAt: string | null;
740
+ }, {
741
+ id: string;
742
+ venueId: string;
743
+ accessor: string;
744
+ tags: string[];
745
+ createdAt: string | null;
746
+ updatedAt: string | null;
747
+ slug: Record<string, string>;
748
+ title: Record<string, string>;
749
+ excerpt: Record<string, string>;
750
+ content: {} & {
751
+ [k: string]: unknown;
752
+ };
753
+ featuredImageId: string | null;
754
+ isActive: boolean;
755
+ isFeatured: boolean;
756
+ priority: number;
757
+ publishedAt: string | null;
758
+ }>, "many">;
652
759
  AddToBasketRequest: z.ZodObject<{
653
760
  venueId: z.ZodString;
654
761
  sessionId: z.ZodString;
@@ -1082,6 +1189,9 @@ declare const schemas: {
1082
1189
  venueAccessor: string;
1083
1190
  accessor?: string | null | undefined;
1084
1191
  description?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1192
+ isActive?: boolean | undefined;
1193
+ isFeatured?: boolean | undefined;
1194
+ priority?: number | undefined;
1085
1195
  scheduleId?: string | null | undefined;
1086
1196
  maxBookings?: number | null | undefined;
1087
1197
  maxGuests?: number | null | undefined;
@@ -1092,9 +1202,6 @@ declare const schemas: {
1092
1202
  reservationsEnabled?: boolean | undefined;
1093
1203
  bookingOpensAtDays?: number | null | undefined;
1094
1204
  bookingClosesAtHours?: number | null | undefined;
1095
- isActive?: boolean | undefined;
1096
- isFeatured?: boolean | undefined;
1097
- priority?: number | undefined;
1098
1205
  schedule?: {
1099
1206
  timeRanges: {
1100
1207
  startTime: string;
@@ -1115,6 +1222,9 @@ declare const schemas: {
1115
1222
  venueAccessor: string;
1116
1223
  accessor?: string | null | undefined;
1117
1224
  description?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1225
+ isActive?: boolean | undefined;
1226
+ isFeatured?: boolean | undefined;
1227
+ priority?: number | undefined;
1118
1228
  scheduleId?: string | null | undefined;
1119
1229
  maxBookings?: number | null | undefined;
1120
1230
  maxGuests?: number | null | undefined;
@@ -1125,9 +1235,6 @@ declare const schemas: {
1125
1235
  reservationsEnabled?: boolean | undefined;
1126
1236
  bookingOpensAtDays?: number | null | undefined;
1127
1237
  bookingClosesAtHours?: number | null | undefined;
1128
- isActive?: boolean | undefined;
1129
- isFeatured?: boolean | undefined;
1130
- priority?: number | undefined;
1131
1238
  schedule?: {
1132
1239
  timeRanges: {
1133
1240
  startTime: string;
@@ -1174,6 +1281,9 @@ declare const schemas: {
1174
1281
  accessor: string | null;
1175
1282
  name: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null;
1176
1283
  description: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null;
1284
+ isActive: boolean;
1285
+ isFeatured: boolean;
1286
+ priority: number;
1177
1287
  scheduleId: string | null;
1178
1288
  maxBookings: number | null;
1179
1289
  maxGuests: number | null;
@@ -1184,9 +1294,6 @@ declare const schemas: {
1184
1294
  reservationsEnabled: boolean;
1185
1295
  bookingOpensAtDays: number | null;
1186
1296
  bookingClosesAtHours: number | null;
1187
- isActive: boolean;
1188
- isFeatured: boolean;
1189
- priority: number;
1190
1297
  ritualId: string | null;
1191
1298
  createdBy: string | null;
1192
1299
  updatedBy: string | null;
@@ -1198,6 +1305,9 @@ declare const schemas: {
1198
1305
  accessor: string | null;
1199
1306
  name: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null;
1200
1307
  description: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null;
1308
+ isActive: boolean;
1309
+ isFeatured: boolean;
1310
+ priority: number;
1201
1311
  scheduleId: string | null;
1202
1312
  maxBookings: number | null;
1203
1313
  maxGuests: number | null;
@@ -1208,9 +1318,6 @@ declare const schemas: {
1208
1318
  reservationsEnabled: boolean;
1209
1319
  bookingOpensAtDays: number | null;
1210
1320
  bookingClosesAtHours: number | null;
1211
- isActive: boolean;
1212
- isFeatured: boolean;
1213
- priority: number;
1214
1321
  ritualId: string | null;
1215
1322
  createdBy: string | null;
1216
1323
  updatedBy: string | null;
@@ -1743,8 +1850,8 @@ declare const schemas: {
1743
1850
  name: Record<string, string>;
1744
1851
  description: Record<string, string> | null;
1745
1852
  currency: "EUR" | "CHF";
1746
- scheduleId: string | null;
1747
1853
  isActive: boolean;
1854
+ scheduleId: string | null;
1748
1855
  menuId: string;
1749
1856
  shortName: Record<string, string> | null;
1750
1857
  allowance: number;
@@ -1772,8 +1879,8 @@ declare const schemas: {
1772
1879
  name: Record<string, string>;
1773
1880
  description: Record<string, string> | null;
1774
1881
  currency: "EUR" | "CHF";
1775
- scheduleId: string | null;
1776
1882
  isActive: boolean;
1883
+ scheduleId: string | null;
1777
1884
  menuId: string;
1778
1885
  shortName: Record<string, string> | null;
1779
1886
  allowance: number;
@@ -649,6 +649,113 @@ declare const schemas: {
649
649
  createdAt: string | null;
650
650
  updatedAt: string | null;
651
651
  }>;
652
+ includeDrafts: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>;
653
+ Article: z.ZodObject<{
654
+ id: z.ZodString;
655
+ venueId: z.ZodString;
656
+ accessor: z.ZodString;
657
+ slug: z.ZodRecord<z.ZodString, z.ZodString>;
658
+ title: z.ZodRecord<z.ZodString, z.ZodString>;
659
+ excerpt: z.ZodRecord<z.ZodString, z.ZodString>;
660
+ content: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
661
+ tags: z.ZodArray<z.ZodString, "many">;
662
+ featuredImageId: z.ZodNullable<z.ZodString>;
663
+ isActive: z.ZodBoolean;
664
+ isFeatured: z.ZodBoolean;
665
+ priority: z.ZodNumber;
666
+ publishedAt: z.ZodNullable<z.ZodString>;
667
+ createdAt: z.ZodNullable<z.ZodString>;
668
+ updatedAt: z.ZodNullable<z.ZodString>;
669
+ }, "strict", z.ZodTypeAny, {
670
+ id: string;
671
+ venueId: string;
672
+ accessor: string;
673
+ tags: string[];
674
+ createdAt: string | null;
675
+ updatedAt: string | null;
676
+ slug: Record<string, string>;
677
+ title: Record<string, string>;
678
+ excerpt: Record<string, string>;
679
+ content: {} & {
680
+ [k: string]: unknown;
681
+ };
682
+ featuredImageId: string | null;
683
+ isActive: boolean;
684
+ isFeatured: boolean;
685
+ priority: number;
686
+ publishedAt: string | null;
687
+ }, {
688
+ id: string;
689
+ venueId: string;
690
+ accessor: string;
691
+ tags: string[];
692
+ createdAt: string | null;
693
+ updatedAt: string | null;
694
+ slug: Record<string, string>;
695
+ title: Record<string, string>;
696
+ excerpt: Record<string, string>;
697
+ content: {} & {
698
+ [k: string]: unknown;
699
+ };
700
+ featuredImageId: string | null;
701
+ isActive: boolean;
702
+ isFeatured: boolean;
703
+ priority: number;
704
+ publishedAt: string | null;
705
+ }>;
706
+ ListArticlesResponse: z.ZodArray<z.ZodObject<{
707
+ id: z.ZodString;
708
+ venueId: z.ZodString;
709
+ accessor: z.ZodString;
710
+ slug: z.ZodRecord<z.ZodString, z.ZodString>;
711
+ title: z.ZodRecord<z.ZodString, z.ZodString>;
712
+ excerpt: z.ZodRecord<z.ZodString, z.ZodString>;
713
+ content: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
714
+ tags: z.ZodArray<z.ZodString, "many">;
715
+ featuredImageId: z.ZodNullable<z.ZodString>;
716
+ isActive: z.ZodBoolean;
717
+ isFeatured: z.ZodBoolean;
718
+ priority: z.ZodNumber;
719
+ publishedAt: z.ZodNullable<z.ZodString>;
720
+ createdAt: z.ZodNullable<z.ZodString>;
721
+ updatedAt: z.ZodNullable<z.ZodString>;
722
+ }, "strict", z.ZodTypeAny, {
723
+ id: string;
724
+ venueId: string;
725
+ accessor: string;
726
+ tags: string[];
727
+ createdAt: string | null;
728
+ updatedAt: string | null;
729
+ slug: Record<string, string>;
730
+ title: Record<string, string>;
731
+ excerpt: Record<string, string>;
732
+ content: {} & {
733
+ [k: string]: unknown;
734
+ };
735
+ featuredImageId: string | null;
736
+ isActive: boolean;
737
+ isFeatured: boolean;
738
+ priority: number;
739
+ publishedAt: string | null;
740
+ }, {
741
+ id: string;
742
+ venueId: string;
743
+ accessor: string;
744
+ tags: string[];
745
+ createdAt: string | null;
746
+ updatedAt: string | null;
747
+ slug: Record<string, string>;
748
+ title: Record<string, string>;
749
+ excerpt: Record<string, string>;
750
+ content: {} & {
751
+ [k: string]: unknown;
752
+ };
753
+ featuredImageId: string | null;
754
+ isActive: boolean;
755
+ isFeatured: boolean;
756
+ priority: number;
757
+ publishedAt: string | null;
758
+ }>, "many">;
652
759
  AddToBasketRequest: z.ZodObject<{
653
760
  venueId: z.ZodString;
654
761
  sessionId: z.ZodString;
@@ -1082,6 +1189,9 @@ declare const schemas: {
1082
1189
  venueAccessor: string;
1083
1190
  accessor?: string | null | undefined;
1084
1191
  description?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1192
+ isActive?: boolean | undefined;
1193
+ isFeatured?: boolean | undefined;
1194
+ priority?: number | undefined;
1085
1195
  scheduleId?: string | null | undefined;
1086
1196
  maxBookings?: number | null | undefined;
1087
1197
  maxGuests?: number | null | undefined;
@@ -1092,9 +1202,6 @@ declare const schemas: {
1092
1202
  reservationsEnabled?: boolean | undefined;
1093
1203
  bookingOpensAtDays?: number | null | undefined;
1094
1204
  bookingClosesAtHours?: number | null | undefined;
1095
- isActive?: boolean | undefined;
1096
- isFeatured?: boolean | undefined;
1097
- priority?: number | undefined;
1098
1205
  schedule?: {
1099
1206
  timeRanges: {
1100
1207
  startTime: string;
@@ -1115,6 +1222,9 @@ declare const schemas: {
1115
1222
  venueAccessor: string;
1116
1223
  accessor?: string | null | undefined;
1117
1224
  description?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1225
+ isActive?: boolean | undefined;
1226
+ isFeatured?: boolean | undefined;
1227
+ priority?: number | undefined;
1118
1228
  scheduleId?: string | null | undefined;
1119
1229
  maxBookings?: number | null | undefined;
1120
1230
  maxGuests?: number | null | undefined;
@@ -1125,9 +1235,6 @@ declare const schemas: {
1125
1235
  reservationsEnabled?: boolean | undefined;
1126
1236
  bookingOpensAtDays?: number | null | undefined;
1127
1237
  bookingClosesAtHours?: number | null | undefined;
1128
- isActive?: boolean | undefined;
1129
- isFeatured?: boolean | undefined;
1130
- priority?: number | undefined;
1131
1238
  schedule?: {
1132
1239
  timeRanges: {
1133
1240
  startTime: string;
@@ -1174,6 +1281,9 @@ declare const schemas: {
1174
1281
  accessor: string | null;
1175
1282
  name: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null;
1176
1283
  description: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null;
1284
+ isActive: boolean;
1285
+ isFeatured: boolean;
1286
+ priority: number;
1177
1287
  scheduleId: string | null;
1178
1288
  maxBookings: number | null;
1179
1289
  maxGuests: number | null;
@@ -1184,9 +1294,6 @@ declare const schemas: {
1184
1294
  reservationsEnabled: boolean;
1185
1295
  bookingOpensAtDays: number | null;
1186
1296
  bookingClosesAtHours: number | null;
1187
- isActive: boolean;
1188
- isFeatured: boolean;
1189
- priority: number;
1190
1297
  ritualId: string | null;
1191
1298
  createdBy: string | null;
1192
1299
  updatedBy: string | null;
@@ -1198,6 +1305,9 @@ declare const schemas: {
1198
1305
  accessor: string | null;
1199
1306
  name: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null;
1200
1307
  description: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null;
1308
+ isActive: boolean;
1309
+ isFeatured: boolean;
1310
+ priority: number;
1201
1311
  scheduleId: string | null;
1202
1312
  maxBookings: number | null;
1203
1313
  maxGuests: number | null;
@@ -1208,9 +1318,6 @@ declare const schemas: {
1208
1318
  reservationsEnabled: boolean;
1209
1319
  bookingOpensAtDays: number | null;
1210
1320
  bookingClosesAtHours: number | null;
1211
- isActive: boolean;
1212
- isFeatured: boolean;
1213
- priority: number;
1214
1321
  ritualId: string | null;
1215
1322
  createdBy: string | null;
1216
1323
  updatedBy: string | null;
@@ -1743,8 +1850,8 @@ declare const schemas: {
1743
1850
  name: Record<string, string>;
1744
1851
  description: Record<string, string> | null;
1745
1852
  currency: "EUR" | "CHF";
1746
- scheduleId: string | null;
1747
1853
  isActive: boolean;
1854
+ scheduleId: string | null;
1748
1855
  menuId: string;
1749
1856
  shortName: Record<string, string> | null;
1750
1857
  allowance: number;
@@ -1772,8 +1879,8 @@ declare const schemas: {
1772
1879
  name: Record<string, string>;
1773
1880
  description: Record<string, string> | null;
1774
1881
  currency: "EUR" | "CHF";
1775
- scheduleId: string | null;
1776
1882
  isActive: boolean;
1883
+ scheduleId: string | null;
1777
1884
  menuId: string;
1778
1885
  shortName: Record<string, string> | null;
1779
1886
  allowance: number;
package/dist/schemas.mjs CHANGED
@@ -6,6 +6,9 @@ const GetAreaResponse = z.object({ id: z.string(), venueId: z.string(), accessor
6
6
  const GetAreaAvailabilityResponse = z.object({ from: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), to: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), bookingMode: z.enum(["slot", "day"]), occupied: z.array(z.object({ date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), startTime: z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable(), endTime: z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable() }).strict()) }).strict();
7
7
  const SubmitAreaBookingRequest = z.object({ requestedDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), requestedStartTime: z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).optional(), requestedEndTime: z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).optional(), partySize: z.number().int().lte(9007199254740991), customerFirstName: z.string().min(1), customerLastName: z.string().min(1), customerEmail: z.string().regex(/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/).email(), customerPhone: z.string().optional(), message: z.string().optional(), source: z.enum(["website", "phone", "walk_in"]).optional() }).strict();
8
8
  const SubmitAreaBookingResponse = z.object({ id: z.string(), venueId: z.string(), areaId: z.string(), requestedDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), requestedStartTime: z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable(), requestedEndTime: z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).nullable(), partySize: z.number().int().gte(-9007199254740991).lte(9007199254740991), customerFirstName: z.string(), customerLastName: z.string(), customerEmail: z.string(), customerPhone: z.string().nullable(), message: z.string().nullable(), source: z.enum(["website", "phone", "walk_in"]), status: z.enum(["pending", "approved", "rejected", "cancelled"]), areaBookingId: z.string().nullable(), createdAt: z.string().nullable(), updatedAt: z.string().nullable() }).strict();
9
+ const includeDrafts = z.union([z.literal("true"), z.literal("false")]).optional();
10
+ const Article = z.object({ id: z.string(), venueId: z.string(), accessor: z.string(), slug: z.record(z.string()), title: z.record(z.string()), excerpt: z.record(z.string()), content: z.object({}).partial().strict().passthrough(), tags: z.array(z.string()), featuredImageId: z.string().nullable(), isActive: z.boolean(), isFeatured: z.boolean(), priority: z.number().int().gte(-9007199254740991).lte(9007199254740991), publishedAt: z.string().nullable(), createdAt: z.string().nullable(), updatedAt: z.string().nullable() }).strict();
11
+ const ListArticlesResponse = z.array(Article);
9
12
  const AddToBasketRequest = z.object({ venueId: z.string().regex(/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/).uuid(), sessionId: z.string().min(1), menuItems: z.array(z.object({ menuItemId: z.string().min(1), role: z.string().optional(), quantity: z.number().gt(0).optional(), unit: z.enum(["grams", "kilograms", "liters", "milliliters", "pieces"]).optional() }).strict()).min(1), metadata: z.object({}).partial().strict().passthrough().optional() }).strict();
10
13
  const AddToBasketResponse = z.object({ basketItemId: z.string().regex(/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/).uuid(), itemCount: z.number().int().gte(0).lte(9007199254740991), deposit: z.object({ depositwareTemplateId: z.string(), name: z.record(z.string()), amount: z.number().int().gte(0).lte(9007199254740991), currency: z.enum(["EUR", "CHF"]) }).strict().nullable(), totals: z.object({ currency: z.enum(["EUR", "CHF"]), itemsTotal: z.number().int().gte(0).lte(9007199254740991), taxAmount: z.number().int().gte(0).lte(9007199254740991), depositCharge: z.number().int().gte(0).lte(9007199254740991), grossTotal: z.number().int().gte(0).lte(9007199254740991), depositCredit: z.number().int().gte(0).lte(9007199254740991), effectiveTotal: z.number().int().gte(0).lte(9007199254740991), cashRefund: z.number().int().gte(0).lte(9007199254740991), returnable: z.array(z.object({ depositwareTemplateId: z.string(), count: z.number().int().gte(0).lte(9007199254740991) }).strict()) }).strict() }).strict();
11
14
  const RemoveFromBasketResponse = z.object({ success: z.boolean(), basketItemId: z.string().regex(/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/).uuid(), itemCount: z.number().int().gte(0).lte(9007199254740991), totals: z.object({ currency: z.enum(["EUR", "CHF"]), itemsTotal: z.number().int().gte(0).lte(9007199254740991), taxAmount: z.number().int().gte(0).lte(9007199254740991), depositCharge: z.number().int().gte(0).lte(9007199254740991), grossTotal: z.number().int().gte(0).lte(9007199254740991), depositCredit: z.number().int().gte(0).lte(9007199254740991), effectiveTotal: z.number().int().gte(0).lte(9007199254740991), cashRefund: z.number().int().gte(0).lte(9007199254740991), returnable: z.array(z.object({ depositwareTemplateId: z.string(), count: z.number().int().gte(0).lte(9007199254740991) }).strict()) }).strict().nullable() }).strict();
@@ -64,6 +67,9 @@ const schemas = {
64
67
  GetAreaAvailabilityResponse,
65
68
  SubmitAreaBookingRequest,
66
69
  SubmitAreaBookingResponse,
70
+ includeDrafts,
71
+ Article,
72
+ ListArticlesResponse,
67
73
  AddToBasketRequest,
68
74
  AddToBasketResponse,
69
75
  RemoveFromBasketResponse,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "order3000",
3
- "version": "0.19.1",
3
+ "version": "0.20.0",
4
4
  "description": "order3000 node.js sdk",
5
5
  "main": "./dist/client.cjs",
6
6
  "module": "./dist/client.mjs",
@@ -46,8 +46,8 @@
46
46
  "prettier": "^3.7.4",
47
47
  "tsx": "^4.19.2",
48
48
  "typescript": "^5.9.3",
49
+ "@kolaveri/eslint-config": "1.6.0",
49
50
  "@kolaveri/prettier-config": "1.0.6",
50
- "@kolaveri/eslint-config": "1.5.2",
51
51
  "@kolaveri/tsconfig": "1.0.1"
52
52
  },
53
53
  "files": [