order3000 0.8.1 → 0.9.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 +45 -0
- package/dist/client.d.cts +109 -2
- package/dist/client.d.mts +109 -2
- package/dist/client.mjs +45 -0
- package/package.json +3 -3
package/dist/client.cjs
CHANGED
|
@@ -126,6 +126,49 @@ class BaseResource {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
class BasketsResource extends BaseResource {
|
|
130
|
+
constructor(tokenManager, baseUrl) {
|
|
131
|
+
super(tokenManager, baseUrl, "/baskets");
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get the current basket for a session
|
|
135
|
+
* @param sessionId - The session identifier (from cookie)
|
|
136
|
+
* @returns The basket with all items, or null if no basket exists
|
|
137
|
+
*/
|
|
138
|
+
async get(sessionId) {
|
|
139
|
+
return this.request(
|
|
140
|
+
"GET",
|
|
141
|
+
`?sessionId=${encodeURIComponent(sessionId)}`
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Add an item to the basket
|
|
146
|
+
* Creates basket and guest customer if they don't exist
|
|
147
|
+
* @param request - The add to basket request
|
|
148
|
+
* @returns The response with basket item ID and item count
|
|
149
|
+
*/
|
|
150
|
+
async add(request) {
|
|
151
|
+
return this.request("POST", "/items", request);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Remove an item from the basket.
|
|
155
|
+
*
|
|
156
|
+
* Since each basket item represents a single physical product,
|
|
157
|
+
* removing it removes the entire item. There is no partial removal.
|
|
158
|
+
*
|
|
159
|
+
* @param sessionId - The session identifier
|
|
160
|
+
* @param basketItemId - The basket item ID to remove
|
|
161
|
+
* @returns The response with item count
|
|
162
|
+
*/
|
|
163
|
+
async remove(sessionId, basketItemId) {
|
|
164
|
+
const params = new URLSearchParams({ sessionId });
|
|
165
|
+
return this.request(
|
|
166
|
+
"DELETE",
|
|
167
|
+
`/items/${basketItemId}?${params.toString()}`
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
129
172
|
class EventsResource extends BaseResource {
|
|
130
173
|
constructor(tokenManager, baseUrl) {
|
|
131
174
|
super(tokenManager, baseUrl, "/events");
|
|
@@ -448,6 +491,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
448
491
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
449
492
|
class Order3000Client {
|
|
450
493
|
constructor(config) {
|
|
494
|
+
__publicField(this, "baskets");
|
|
451
495
|
__publicField(this, "events");
|
|
452
496
|
__publicField(this, "menus");
|
|
453
497
|
__publicField(this, "orders");
|
|
@@ -463,6 +507,7 @@ class Order3000Client {
|
|
|
463
507
|
tokenUrl,
|
|
464
508
|
config.venueId
|
|
465
509
|
);
|
|
510
|
+
this.baskets = new BasketsResource(this.tokenManager, this.baseUrl);
|
|
466
511
|
this.events = new EventsResource(this.tokenManager, this.baseUrl);
|
|
467
512
|
this.menus = new MenusResource(this.tokenManager, this.baseUrl);
|
|
468
513
|
this.orders = new OrdersResource(this.tokenManager, this.baseUrl);
|
package/dist/client.d.cts
CHANGED
|
@@ -22,7 +22,7 @@ declare abstract class BaseResource {
|
|
|
22
22
|
protected readonly baseUrl: string;
|
|
23
23
|
protected readonly resourcePath: string;
|
|
24
24
|
constructor(tokenManager: TokenManager, baseUrl: string, resourcePath: string);
|
|
25
|
-
protected request<T>(method: 'GET' | 'POST', path: string, data?:
|
|
25
|
+
protected request<T>(method: 'GET' | 'POST' | 'DELETE', path: string, data?: unknown): Promise<T>;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
interface components {
|
|
@@ -437,6 +437,7 @@ interface MenuDish {
|
|
|
437
437
|
id: string;
|
|
438
438
|
accessor: string;
|
|
439
439
|
name: Record<string, string>;
|
|
440
|
+
shortName?: Record<string, string>;
|
|
440
441
|
description: Record<string, string> | null;
|
|
441
442
|
isVegetarian: boolean | null;
|
|
442
443
|
isVegan: boolean | null;
|
|
@@ -448,6 +449,7 @@ interface MenuBeverage {
|
|
|
448
449
|
id: string;
|
|
449
450
|
accessor: string;
|
|
450
451
|
name: Record<string, string>;
|
|
452
|
+
shortName?: Record<string, string>;
|
|
451
453
|
description: Record<string, string> | null;
|
|
452
454
|
assets?: MenuAsset[];
|
|
453
455
|
}
|
|
@@ -474,6 +476,110 @@ interface GetMenuOptions {
|
|
|
474
476
|
/** Expand related resources (items, assets) */
|
|
475
477
|
expand?: ('items' | 'assets')[];
|
|
476
478
|
}
|
|
479
|
+
type BasketStatus = 'active' | 'abandoned' | 'converted';
|
|
480
|
+
type Currency = 'EUR' | 'CHF';
|
|
481
|
+
/**
|
|
482
|
+
* Unit of measurement for portion tracking.
|
|
483
|
+
*/
|
|
484
|
+
type Unit = 'grams' | 'kilograms' | 'liters' | 'milliliters' | 'pieces';
|
|
485
|
+
/**
|
|
486
|
+
* Reference to a menu item within a basket item.
|
|
487
|
+
*
|
|
488
|
+
* Each menu item can have its own portion size (quantity + unit),
|
|
489
|
+
* allowing for precise tracking like "100g rice, 80g curry".
|
|
490
|
+
*/
|
|
491
|
+
interface BasketItemMenuItemRef {
|
|
492
|
+
menuItemId: string;
|
|
493
|
+
role: string | null;
|
|
494
|
+
quantity: number;
|
|
495
|
+
unit: Unit;
|
|
496
|
+
}
|
|
497
|
+
interface BasketItemMetadata {
|
|
498
|
+
type?: 'tiffinbox' | 'bowl' | 'sushi';
|
|
499
|
+
mode?: 2 | 3;
|
|
500
|
+
upsell?: {
|
|
501
|
+
tinOption: string;
|
|
502
|
+
rollOption: string;
|
|
503
|
+
};
|
|
504
|
+
price?: number;
|
|
505
|
+
[key: string]: unknown;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* A basket item represents a single physical product in the basket.
|
|
509
|
+
*
|
|
510
|
+
* Each basket item can contain multiple menu items (e.g., a TiffinBox
|
|
511
|
+
* with rice, curry, and sides). The itemCount in the response is the
|
|
512
|
+
* COUNT of basket items, not a sum of quantities.
|
|
513
|
+
*/
|
|
514
|
+
interface BasketItem {
|
|
515
|
+
id: string;
|
|
516
|
+
metadata: BasketItemMetadata | null;
|
|
517
|
+
menuItems: BasketItemMenuItemRef[];
|
|
518
|
+
}
|
|
519
|
+
interface Basket {
|
|
520
|
+
id: string;
|
|
521
|
+
sessionId: string;
|
|
522
|
+
status: BasketStatus;
|
|
523
|
+
currency: Currency;
|
|
524
|
+
items: BasketItem[];
|
|
525
|
+
itemCount: number;
|
|
526
|
+
expiresAt: string;
|
|
527
|
+
createdAt: string | null;
|
|
528
|
+
updatedAt: string | null;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Request to add an item to the basket.
|
|
532
|
+
*
|
|
533
|
+
* Menu items can optionally include portion information (quantity/unit).
|
|
534
|
+
* If not provided, defaults to the menu item's configured portion size.
|
|
535
|
+
*/
|
|
536
|
+
interface AddToBasketRequest {
|
|
537
|
+
sessionId: string;
|
|
538
|
+
menuItems: Array<{
|
|
539
|
+
menuItemId: string;
|
|
540
|
+
role?: string;
|
|
541
|
+
quantity?: number;
|
|
542
|
+
unit?: Unit;
|
|
543
|
+
}>;
|
|
544
|
+
metadata?: BasketItemMetadata;
|
|
545
|
+
}
|
|
546
|
+
interface AddToBasketResponse {
|
|
547
|
+
basketItemId: string;
|
|
548
|
+
itemCount: number;
|
|
549
|
+
}
|
|
550
|
+
interface RemoveFromBasketResponse {
|
|
551
|
+
success: boolean;
|
|
552
|
+
basketItemId: string;
|
|
553
|
+
itemCount: number;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
declare class BasketsResource extends BaseResource {
|
|
557
|
+
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
558
|
+
/**
|
|
559
|
+
* Get the current basket for a session
|
|
560
|
+
* @param sessionId - The session identifier (from cookie)
|
|
561
|
+
* @returns The basket with all items, or null if no basket exists
|
|
562
|
+
*/
|
|
563
|
+
get(sessionId: string): Promise<Basket | null>;
|
|
564
|
+
/**
|
|
565
|
+
* Add an item to the basket
|
|
566
|
+
* Creates basket and guest customer if they don't exist
|
|
567
|
+
* @param request - The add to basket request
|
|
568
|
+
* @returns The response with basket item ID and item count
|
|
569
|
+
*/
|
|
570
|
+
add(request: AddToBasketRequest): Promise<AddToBasketResponse>;
|
|
571
|
+
/**
|
|
572
|
+
* Remove an item from the basket.
|
|
573
|
+
*
|
|
574
|
+
* Since each basket item represents a single physical product,
|
|
575
|
+
* removing it removes the entire item. There is no partial removal.
|
|
576
|
+
*
|
|
577
|
+
* @param sessionId - The session identifier
|
|
578
|
+
* @param basketItemId - The basket item ID to remove
|
|
579
|
+
* @returns The response with item count
|
|
580
|
+
*/
|
|
581
|
+
remove(sessionId: string, basketItemId: string): Promise<RemoveFromBasketResponse>;
|
|
582
|
+
}
|
|
477
583
|
|
|
478
584
|
declare class EventsResource extends BaseResource {
|
|
479
585
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
@@ -675,6 +781,7 @@ interface Order3000ClientConfig {
|
|
|
675
781
|
tokenUrl?: string;
|
|
676
782
|
}
|
|
677
783
|
declare class Order3000Client {
|
|
784
|
+
baskets: BasketsResource;
|
|
678
785
|
events: EventsResource;
|
|
679
786
|
menus: MenusResource;
|
|
680
787
|
orders: OrdersResource;
|
|
@@ -685,4 +792,4 @@ declare class Order3000Client {
|
|
|
685
792
|
constructor(config: Order3000ClientConfig);
|
|
686
793
|
}
|
|
687
794
|
|
|
688
|
-
export { type CropArea, type Event, type EventPoster, type EventRow, 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 Schedule, type ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type SubscriptionOptions, type TimeSlot };
|
|
795
|
+
export { type AddToBasketRequest, type AddToBasketResponse, type Basket, type BasketItem, type BasketItemMenuItemRef, type BasketItemMetadata, type BasketStatus, type CropArea, type Currency, type Event, type EventPoster, type EventRow, 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 ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type SubscriptionOptions, type TimeSlot, type Unit };
|
package/dist/client.d.mts
CHANGED
|
@@ -22,7 +22,7 @@ declare abstract class BaseResource {
|
|
|
22
22
|
protected readonly baseUrl: string;
|
|
23
23
|
protected readonly resourcePath: string;
|
|
24
24
|
constructor(tokenManager: TokenManager, baseUrl: string, resourcePath: string);
|
|
25
|
-
protected request<T>(method: 'GET' | 'POST', path: string, data?:
|
|
25
|
+
protected request<T>(method: 'GET' | 'POST' | 'DELETE', path: string, data?: unknown): Promise<T>;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
interface components {
|
|
@@ -437,6 +437,7 @@ interface MenuDish {
|
|
|
437
437
|
id: string;
|
|
438
438
|
accessor: string;
|
|
439
439
|
name: Record<string, string>;
|
|
440
|
+
shortName?: Record<string, string>;
|
|
440
441
|
description: Record<string, string> | null;
|
|
441
442
|
isVegetarian: boolean | null;
|
|
442
443
|
isVegan: boolean | null;
|
|
@@ -448,6 +449,7 @@ interface MenuBeverage {
|
|
|
448
449
|
id: string;
|
|
449
450
|
accessor: string;
|
|
450
451
|
name: Record<string, string>;
|
|
452
|
+
shortName?: Record<string, string>;
|
|
451
453
|
description: Record<string, string> | null;
|
|
452
454
|
assets?: MenuAsset[];
|
|
453
455
|
}
|
|
@@ -474,6 +476,110 @@ interface GetMenuOptions {
|
|
|
474
476
|
/** Expand related resources (items, assets) */
|
|
475
477
|
expand?: ('items' | 'assets')[];
|
|
476
478
|
}
|
|
479
|
+
type BasketStatus = 'active' | 'abandoned' | 'converted';
|
|
480
|
+
type Currency = 'EUR' | 'CHF';
|
|
481
|
+
/**
|
|
482
|
+
* Unit of measurement for portion tracking.
|
|
483
|
+
*/
|
|
484
|
+
type Unit = 'grams' | 'kilograms' | 'liters' | 'milliliters' | 'pieces';
|
|
485
|
+
/**
|
|
486
|
+
* Reference to a menu item within a basket item.
|
|
487
|
+
*
|
|
488
|
+
* Each menu item can have its own portion size (quantity + unit),
|
|
489
|
+
* allowing for precise tracking like "100g rice, 80g curry".
|
|
490
|
+
*/
|
|
491
|
+
interface BasketItemMenuItemRef {
|
|
492
|
+
menuItemId: string;
|
|
493
|
+
role: string | null;
|
|
494
|
+
quantity: number;
|
|
495
|
+
unit: Unit;
|
|
496
|
+
}
|
|
497
|
+
interface BasketItemMetadata {
|
|
498
|
+
type?: 'tiffinbox' | 'bowl' | 'sushi';
|
|
499
|
+
mode?: 2 | 3;
|
|
500
|
+
upsell?: {
|
|
501
|
+
tinOption: string;
|
|
502
|
+
rollOption: string;
|
|
503
|
+
};
|
|
504
|
+
price?: number;
|
|
505
|
+
[key: string]: unknown;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* A basket item represents a single physical product in the basket.
|
|
509
|
+
*
|
|
510
|
+
* Each basket item can contain multiple menu items (e.g., a TiffinBox
|
|
511
|
+
* with rice, curry, and sides). The itemCount in the response is the
|
|
512
|
+
* COUNT of basket items, not a sum of quantities.
|
|
513
|
+
*/
|
|
514
|
+
interface BasketItem {
|
|
515
|
+
id: string;
|
|
516
|
+
metadata: BasketItemMetadata | null;
|
|
517
|
+
menuItems: BasketItemMenuItemRef[];
|
|
518
|
+
}
|
|
519
|
+
interface Basket {
|
|
520
|
+
id: string;
|
|
521
|
+
sessionId: string;
|
|
522
|
+
status: BasketStatus;
|
|
523
|
+
currency: Currency;
|
|
524
|
+
items: BasketItem[];
|
|
525
|
+
itemCount: number;
|
|
526
|
+
expiresAt: string;
|
|
527
|
+
createdAt: string | null;
|
|
528
|
+
updatedAt: string | null;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Request to add an item to the basket.
|
|
532
|
+
*
|
|
533
|
+
* Menu items can optionally include portion information (quantity/unit).
|
|
534
|
+
* If not provided, defaults to the menu item's configured portion size.
|
|
535
|
+
*/
|
|
536
|
+
interface AddToBasketRequest {
|
|
537
|
+
sessionId: string;
|
|
538
|
+
menuItems: Array<{
|
|
539
|
+
menuItemId: string;
|
|
540
|
+
role?: string;
|
|
541
|
+
quantity?: number;
|
|
542
|
+
unit?: Unit;
|
|
543
|
+
}>;
|
|
544
|
+
metadata?: BasketItemMetadata;
|
|
545
|
+
}
|
|
546
|
+
interface AddToBasketResponse {
|
|
547
|
+
basketItemId: string;
|
|
548
|
+
itemCount: number;
|
|
549
|
+
}
|
|
550
|
+
interface RemoveFromBasketResponse {
|
|
551
|
+
success: boolean;
|
|
552
|
+
basketItemId: string;
|
|
553
|
+
itemCount: number;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
declare class BasketsResource extends BaseResource {
|
|
557
|
+
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
558
|
+
/**
|
|
559
|
+
* Get the current basket for a session
|
|
560
|
+
* @param sessionId - The session identifier (from cookie)
|
|
561
|
+
* @returns The basket with all items, or null if no basket exists
|
|
562
|
+
*/
|
|
563
|
+
get(sessionId: string): Promise<Basket | null>;
|
|
564
|
+
/**
|
|
565
|
+
* Add an item to the basket
|
|
566
|
+
* Creates basket and guest customer if they don't exist
|
|
567
|
+
* @param request - The add to basket request
|
|
568
|
+
* @returns The response with basket item ID and item count
|
|
569
|
+
*/
|
|
570
|
+
add(request: AddToBasketRequest): Promise<AddToBasketResponse>;
|
|
571
|
+
/**
|
|
572
|
+
* Remove an item from the basket.
|
|
573
|
+
*
|
|
574
|
+
* Since each basket item represents a single physical product,
|
|
575
|
+
* removing it removes the entire item. There is no partial removal.
|
|
576
|
+
*
|
|
577
|
+
* @param sessionId - The session identifier
|
|
578
|
+
* @param basketItemId - The basket item ID to remove
|
|
579
|
+
* @returns The response with item count
|
|
580
|
+
*/
|
|
581
|
+
remove(sessionId: string, basketItemId: string): Promise<RemoveFromBasketResponse>;
|
|
582
|
+
}
|
|
477
583
|
|
|
478
584
|
declare class EventsResource extends BaseResource {
|
|
479
585
|
constructor(tokenManager: TokenManager, baseUrl: string);
|
|
@@ -675,6 +781,7 @@ interface Order3000ClientConfig {
|
|
|
675
781
|
tokenUrl?: string;
|
|
676
782
|
}
|
|
677
783
|
declare class Order3000Client {
|
|
784
|
+
baskets: BasketsResource;
|
|
678
785
|
events: EventsResource;
|
|
679
786
|
menus: MenusResource;
|
|
680
787
|
orders: OrdersResource;
|
|
@@ -685,4 +792,4 @@ declare class Order3000Client {
|
|
|
685
792
|
constructor(config: Order3000ClientConfig);
|
|
686
793
|
}
|
|
687
794
|
|
|
688
|
-
export { type CropArea, type Event, type EventPoster, type EventRow, 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 Schedule, type ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type SubscriptionOptions, type TimeSlot };
|
|
795
|
+
export { type AddToBasketRequest, type AddToBasketResponse, type Basket, type BasketItem, type BasketItemMenuItemRef, type BasketItemMetadata, type BasketStatus, type CropArea, type Currency, type Event, type EventPoster, type EventRow, 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 ScheduleOverride, type ScheduleOverrideRow, type ScheduleRow, type SubscriptionOptions, type TimeSlot, type Unit };
|
package/dist/client.mjs
CHANGED
|
@@ -124,6 +124,49 @@ class BaseResource {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
class BasketsResource extends BaseResource {
|
|
128
|
+
constructor(tokenManager, baseUrl) {
|
|
129
|
+
super(tokenManager, baseUrl, "/baskets");
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Get the current basket for a session
|
|
133
|
+
* @param sessionId - The session identifier (from cookie)
|
|
134
|
+
* @returns The basket with all items, or null if no basket exists
|
|
135
|
+
*/
|
|
136
|
+
async get(sessionId) {
|
|
137
|
+
return this.request(
|
|
138
|
+
"GET",
|
|
139
|
+
`?sessionId=${encodeURIComponent(sessionId)}`
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Add an item to the basket
|
|
144
|
+
* Creates basket and guest customer if they don't exist
|
|
145
|
+
* @param request - The add to basket request
|
|
146
|
+
* @returns The response with basket item ID and item count
|
|
147
|
+
*/
|
|
148
|
+
async add(request) {
|
|
149
|
+
return this.request("POST", "/items", request);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Remove an item from the basket.
|
|
153
|
+
*
|
|
154
|
+
* Since each basket item represents a single physical product,
|
|
155
|
+
* removing it removes the entire item. There is no partial removal.
|
|
156
|
+
*
|
|
157
|
+
* @param sessionId - The session identifier
|
|
158
|
+
* @param basketItemId - The basket item ID to remove
|
|
159
|
+
* @returns The response with item count
|
|
160
|
+
*/
|
|
161
|
+
async remove(sessionId, basketItemId) {
|
|
162
|
+
const params = new URLSearchParams({ sessionId });
|
|
163
|
+
return this.request(
|
|
164
|
+
"DELETE",
|
|
165
|
+
`/items/${basketItemId}?${params.toString()}`
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
127
170
|
class EventsResource extends BaseResource {
|
|
128
171
|
constructor(tokenManager, baseUrl) {
|
|
129
172
|
super(tokenManager, baseUrl, "/events");
|
|
@@ -446,6 +489,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
446
489
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
447
490
|
class Order3000Client {
|
|
448
491
|
constructor(config) {
|
|
492
|
+
__publicField(this, "baskets");
|
|
449
493
|
__publicField(this, "events");
|
|
450
494
|
__publicField(this, "menus");
|
|
451
495
|
__publicField(this, "orders");
|
|
@@ -461,6 +505,7 @@ class Order3000Client {
|
|
|
461
505
|
tokenUrl,
|
|
462
506
|
config.venueId
|
|
463
507
|
);
|
|
508
|
+
this.baskets = new BasketsResource(this.tokenManager, this.baseUrl);
|
|
464
509
|
this.events = new EventsResource(this.tokenManager, this.baseUrl);
|
|
465
510
|
this.menus = new MenusResource(this.tokenManager, this.baseUrl);
|
|
466
511
|
this.orders = new OrdersResource(this.tokenManager, this.baseUrl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "order3000",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "order3000 node.js sdk",
|
|
5
5
|
"main": "./dist/client.cjs",
|
|
6
6
|
"module": "./dist/client.mjs",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"prettier": "^3.7.4",
|
|
30
30
|
"tsx": "^4.19.2",
|
|
31
31
|
"typescript": "^5.9.3",
|
|
32
|
-
"@kolaveri/
|
|
32
|
+
"@kolaveri/eslint-config": "1.0.9",
|
|
33
33
|
"@kolaveri/tsconfig": "1.0.1",
|
|
34
|
-
"@kolaveri/
|
|
34
|
+
"@kolaveri/prettier-config": "1.0.6"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"dist"
|