order3000 0.10.0 → 0.10.1

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
@@ -255,6 +255,14 @@ class MenusResource extends BaseResource {
255
255
  const queryString = this.buildQueryString(options);
256
256
  return this.request("GET", `/${accessor}${queryString}`);
257
257
  }
258
+ /**
259
+ * Get all bundles for a menu
260
+ * @param menuIdOrAccessor - The menu UUID or accessor (slug)
261
+ * @returns Array of menu bundles
262
+ */
263
+ async getBundles(menuIdOrAccessor) {
264
+ return this.request("GET", `/${menuIdOrAccessor}/bundles`);
265
+ }
258
266
  buildQueryString(options) {
259
267
  if (!options?.expand?.length) return "";
260
268
  return `?expand=${options.expand.join(",")}`;
package/dist/client.d.cts CHANGED
@@ -1,3 +1,4 @@
1
+ import { CurrencyCode } from '@kolaveri/money';
1
2
  import { RealtimePostgresChangesPayload, RealtimeChannel, SupabaseClient } from '@supabase/supabase-js';
2
3
 
3
4
  declare class TokenManager {
@@ -67,6 +68,7 @@ interface components {
67
68
  intervalMinutes?: number | null;
68
69
  durationMinutes?: number | null;
69
70
  } | null;
71
+ venueAccessor: string;
70
72
  };
71
73
  /**
72
74
  * CreateEventResponse
@@ -189,6 +191,7 @@ interface components {
189
191
  specialRequests: string | null;
190
192
  /** @description Preferred seating area or table type (e.g., "window seat", "quiet area", "patio") */
191
193
  tablePreference: string | null;
194
+ venueAccessor: string;
192
195
  };
193
196
  /**
194
197
  * MakeReservationResponse
@@ -458,7 +461,8 @@ interface MenuItem {
458
461
  id: string;
459
462
  type: MenuItemType;
460
463
  tags: string[] | null;
461
- price: number;
464
+ /** Price adjustment in cents (adds to bundle base price) */
465
+ priceAdjustment: number;
462
466
  currency: string;
463
467
  isActive: boolean;
464
468
  sortIndex: string | null;
@@ -477,6 +481,24 @@ interface GetMenuOptions {
477
481
  /** Expand related resources (items, assets) */
478
482
  expand?: ('items' | 'assets')[];
479
483
  }
484
+ interface MenuBundleDeposit {
485
+ name: Record<string, string>;
486
+ amount: number;
487
+ currency: CurrencyCode;
488
+ }
489
+ interface MenuBundle {
490
+ id: string;
491
+ menuId: string;
492
+ name: Record<string, string>;
493
+ description: Record<string, string> | null;
494
+ tags: string[];
495
+ price: number;
496
+ currency: CurrencyCode;
497
+ taxRateId: string;
498
+ isActive: boolean;
499
+ sortIndex: string | null;
500
+ deposit: MenuBundleDeposit | null;
501
+ }
480
502
  interface ScheduleTimeSlot {
481
503
  dayOfWeek: DayOfWeek | null;
482
504
  timeSlot: {
@@ -676,6 +698,12 @@ declare class MenusResource extends BaseResource {
676
698
  * @returns The menu with optional items and assets
677
699
  */
678
700
  getByAccessor(accessor: string, options?: GetMenuOptions): Promise<Menu>;
701
+ /**
702
+ * Get all bundles for a menu
703
+ * @param menuIdOrAccessor - The menu UUID or accessor (slug)
704
+ * @returns Array of menu bundles
705
+ */
706
+ getBundles(menuIdOrAccessor: string): Promise<MenuBundle[]>;
679
707
  private buildQueryString;
680
708
  }
681
709
 
@@ -725,7 +753,7 @@ interface MenuItemRow {
725
753
  type: 'dish' | 'beverage';
726
754
  dish_id: string | null;
727
755
  beverage_id: string | null;
728
- price: number;
756
+ price_adjustment: number;
729
757
  currency: string;
730
758
  is_active: boolean;
731
759
  tags: string[] | null;
@@ -869,4 +897,4 @@ declare class Order3000Client {
869
897
  constructor(config: Order3000ClientConfig);
870
898
  }
871
899
 
872
- export { type AddToBasketRequest, type AddToBasketResponse, type Basket, type BasketItem, type BasketItemMenuItemRef, type BasketItemMetadata, type BasketStatus, type CropArea, type Currency, type DayOfWeek, type Event, type EventByAccessor, type EventMenu, type EventPoster, type EventRow, type GetEventOptions, type GetMenuOptions, type ListEventsOptions, type ListEventsResponse, type Menu, type MenuAsset, type MenuBeverage, type MenuDish, type MenuItem, type MenuItemRow, type MenuItemType, Order3000Client, type Order3000ClientConfig, type Promotion, type RealtimeConfig, type RealtimeEvent, type RealtimeSubscription, type RemoveFromBasketResponse, type Schedule, type ScheduleInfo, type ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type ScheduleTimeSlot, type ScheduleWithTimeSlots, type SubscriptionOptions, type TimeSlot, type Unit, getScheduleInfo };
900
+ export { type AddToBasketRequest, type AddToBasketResponse, type Basket, type BasketItem, type BasketItemMenuItemRef, type BasketItemMetadata, type BasketStatus, type CropArea, type Currency, type DayOfWeek, type Event, type EventByAccessor, type EventMenu, type EventPoster, type EventRow, type GetEventOptions, type GetMenuOptions, type ListEventsOptions, type ListEventsResponse, type Menu, type MenuAsset, type MenuBeverage, type MenuBundle, type MenuBundleDeposit, type MenuDish, type MenuItem, type MenuItemRow, type MenuItemType, Order3000Client, type Order3000ClientConfig, type Promotion, type RealtimeConfig, type RealtimeEvent, type RealtimeSubscription, type RemoveFromBasketResponse, type Schedule, type ScheduleInfo, type ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type ScheduleTimeSlot, type ScheduleWithTimeSlots, type SubscriptionOptions, type TimeSlot, type Unit, getScheduleInfo };
package/dist/client.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ import { CurrencyCode } from '@kolaveri/money';
1
2
  import { RealtimePostgresChangesPayload, RealtimeChannel, SupabaseClient } from '@supabase/supabase-js';
2
3
 
3
4
  declare class TokenManager {
@@ -67,6 +68,7 @@ interface components {
67
68
  intervalMinutes?: number | null;
68
69
  durationMinutes?: number | null;
69
70
  } | null;
71
+ venueAccessor: string;
70
72
  };
71
73
  /**
72
74
  * CreateEventResponse
@@ -189,6 +191,7 @@ interface components {
189
191
  specialRequests: string | null;
190
192
  /** @description Preferred seating area or table type (e.g., "window seat", "quiet area", "patio") */
191
193
  tablePreference: string | null;
194
+ venueAccessor: string;
192
195
  };
193
196
  /**
194
197
  * MakeReservationResponse
@@ -458,7 +461,8 @@ interface MenuItem {
458
461
  id: string;
459
462
  type: MenuItemType;
460
463
  tags: string[] | null;
461
- price: number;
464
+ /** Price adjustment in cents (adds to bundle base price) */
465
+ priceAdjustment: number;
462
466
  currency: string;
463
467
  isActive: boolean;
464
468
  sortIndex: string | null;
@@ -477,6 +481,24 @@ interface GetMenuOptions {
477
481
  /** Expand related resources (items, assets) */
478
482
  expand?: ('items' | 'assets')[];
479
483
  }
484
+ interface MenuBundleDeposit {
485
+ name: Record<string, string>;
486
+ amount: number;
487
+ currency: CurrencyCode;
488
+ }
489
+ interface MenuBundle {
490
+ id: string;
491
+ menuId: string;
492
+ name: Record<string, string>;
493
+ description: Record<string, string> | null;
494
+ tags: string[];
495
+ price: number;
496
+ currency: CurrencyCode;
497
+ taxRateId: string;
498
+ isActive: boolean;
499
+ sortIndex: string | null;
500
+ deposit: MenuBundleDeposit | null;
501
+ }
480
502
  interface ScheduleTimeSlot {
481
503
  dayOfWeek: DayOfWeek | null;
482
504
  timeSlot: {
@@ -676,6 +698,12 @@ declare class MenusResource extends BaseResource {
676
698
  * @returns The menu with optional items and assets
677
699
  */
678
700
  getByAccessor(accessor: string, options?: GetMenuOptions): Promise<Menu>;
701
+ /**
702
+ * Get all bundles for a menu
703
+ * @param menuIdOrAccessor - The menu UUID or accessor (slug)
704
+ * @returns Array of menu bundles
705
+ */
706
+ getBundles(menuIdOrAccessor: string): Promise<MenuBundle[]>;
679
707
  private buildQueryString;
680
708
  }
681
709
 
@@ -725,7 +753,7 @@ interface MenuItemRow {
725
753
  type: 'dish' | 'beverage';
726
754
  dish_id: string | null;
727
755
  beverage_id: string | null;
728
- price: number;
756
+ price_adjustment: number;
729
757
  currency: string;
730
758
  is_active: boolean;
731
759
  tags: string[] | null;
@@ -869,4 +897,4 @@ declare class Order3000Client {
869
897
  constructor(config: Order3000ClientConfig);
870
898
  }
871
899
 
872
- export { type AddToBasketRequest, type AddToBasketResponse, type Basket, type BasketItem, type BasketItemMenuItemRef, type BasketItemMetadata, type BasketStatus, type CropArea, type Currency, type DayOfWeek, type Event, type EventByAccessor, type EventMenu, type EventPoster, type EventRow, type GetEventOptions, type GetMenuOptions, type ListEventsOptions, type ListEventsResponse, type Menu, type MenuAsset, type MenuBeverage, type MenuDish, type MenuItem, type MenuItemRow, type MenuItemType, Order3000Client, type Order3000ClientConfig, type Promotion, type RealtimeConfig, type RealtimeEvent, type RealtimeSubscription, type RemoveFromBasketResponse, type Schedule, type ScheduleInfo, type ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type ScheduleTimeSlot, type ScheduleWithTimeSlots, type SubscriptionOptions, type TimeSlot, type Unit, getScheduleInfo };
900
+ export { type AddToBasketRequest, type AddToBasketResponse, type Basket, type BasketItem, type BasketItemMenuItemRef, type BasketItemMetadata, type BasketStatus, type CropArea, type Currency, type DayOfWeek, type Event, type EventByAccessor, type EventMenu, type EventPoster, type EventRow, type GetEventOptions, type GetMenuOptions, type ListEventsOptions, type ListEventsResponse, type Menu, type MenuAsset, type MenuBeverage, type MenuBundle, type MenuBundleDeposit, type MenuDish, type MenuItem, type MenuItemRow, type MenuItemType, Order3000Client, type Order3000ClientConfig, type Promotion, type RealtimeConfig, type RealtimeEvent, type RealtimeSubscription, type RemoveFromBasketResponse, type Schedule, type ScheduleInfo, type ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type ScheduleTimeSlot, type ScheduleWithTimeSlots, type SubscriptionOptions, type TimeSlot, type Unit, getScheduleInfo };
package/dist/client.mjs CHANGED
@@ -253,6 +253,14 @@ class MenusResource extends BaseResource {
253
253
  const queryString = this.buildQueryString(options);
254
254
  return this.request("GET", `/${accessor}${queryString}`);
255
255
  }
256
+ /**
257
+ * Get all bundles for a menu
258
+ * @param menuIdOrAccessor - The menu UUID or accessor (slug)
259
+ * @returns Array of menu bundles
260
+ */
261
+ async getBundles(menuIdOrAccessor) {
262
+ return this.request("GET", `/${menuIdOrAccessor}/bundles`);
263
+ }
256
264
  buildQueryString(options) {
257
265
  if (!options?.expand?.length) return "";
258
266
  return `?expand=${options.expand.join(",")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "order3000",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "order3000 node.js sdk",
5
5
  "main": "./dist/client.cjs",
6
6
  "module": "./dist/client.mjs",
@@ -20,7 +20,8 @@
20
20
  "@types/react-type-animation": "^2.0.0",
21
21
  "i18next": "^25.6.0",
22
22
  "i18next-fs-backend": "^2.6.0",
23
- "react-type-animation": "^3.2.0"
23
+ "react-type-animation": "^3.2.0",
24
+ "@kolaveri/money": "1.1.3"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@types/node": "^24.10.0",
@@ -29,8 +30,8 @@
29
30
  "prettier": "^3.7.4",
30
31
  "tsx": "^4.19.2",
31
32
  "typescript": "^5.9.3",
33
+ "@kolaveri/eslint-config": "1.4.0",
32
34
  "@kolaveri/prettier-config": "1.0.6",
33
- "@kolaveri/eslint-config": "1.0.9",
34
35
  "@kolaveri/tsconfig": "1.0.1"
35
36
  },
36
37
  "files": [