order3000 0.13.1 → 0.13.3
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 +1 -3
- package/dist/client.d.cts +21 -9
- package/dist/client.d.mts +21 -9
- package/dist/client.mjs +1 -3
- package/package.json +5 -4
package/dist/client.cjs
CHANGED
|
@@ -294,9 +294,7 @@ class OrdersResource extends BaseResource {
|
|
|
294
294
|
* SDK callers cannot provide these values - they're implicit from the basket contents.
|
|
295
295
|
*/
|
|
296
296
|
async place(order) {
|
|
297
|
-
|
|
298
|
-
const fulfillmentTime = fulfillmentAt ? `${String(fulfillmentAt.getHours()).padStart(2, "0")}:${String(fulfillmentAt.getMinutes()).padStart(2, "0")}` : void 0;
|
|
299
|
-
return this.request("POST", "", { ...rest, fulfillmentTime });
|
|
297
|
+
return this.request("POST", "", order);
|
|
300
298
|
}
|
|
301
299
|
async get(orderId) {
|
|
302
300
|
return this.request("GET", `/${orderId}`);
|
package/dist/client.d.cts
CHANGED
|
@@ -123,7 +123,11 @@ interface components {
|
|
|
123
123
|
currency?: "EUR" | "CHF";
|
|
124
124
|
/** @enum {string|null} */
|
|
125
125
|
fulfillmentType?: "pickup" | "delivery" | null;
|
|
126
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Format: date-time
|
|
128
|
+
* @description When the order should be fulfilled (ISO 8601 datetime string)
|
|
129
|
+
*/
|
|
130
|
+
fulfillmentAt?: string | null;
|
|
127
131
|
orderedAt?: unknown;
|
|
128
132
|
orderedBy: string;
|
|
129
133
|
updatedAt?: unknown;
|
|
@@ -147,7 +151,11 @@ interface components {
|
|
|
147
151
|
currency: "EUR" | "CHF";
|
|
148
152
|
/** @enum {string|null} */
|
|
149
153
|
fulfillmentType: "pickup" | "delivery" | null;
|
|
150
|
-
|
|
154
|
+
/**
|
|
155
|
+
* Format: date-time
|
|
156
|
+
* @description When the order should be fulfilled (ISO 8601 datetime string)
|
|
157
|
+
*/
|
|
158
|
+
fulfillmentAt: string | null;
|
|
151
159
|
orderedAt: unknown;
|
|
152
160
|
orderedBy: string;
|
|
153
161
|
updatedAt: unknown;
|
|
@@ -307,11 +315,11 @@ type CreateEventResponse = schemas['CreateEventResponse'];
|
|
|
307
315
|
* Keep in sync with apps/order3000/src/drizzle/enums.ts
|
|
308
316
|
*/
|
|
309
317
|
type OrderFulfillmentType = 'pickup' | 'delivery';
|
|
310
|
-
type PlaceOrderRequest = Omit<schemas['PlaceOrderRequest'], 'taxAmount' | 'totalAmount'> & {
|
|
318
|
+
type PlaceOrderRequest = Omit<schemas['PlaceOrderRequest'], 'taxAmount' | 'totalAmount' | 'fulfillmentAt'> & {
|
|
311
319
|
/** Fulfillment type for the order (pickup or delivery) */
|
|
312
320
|
fulfillmentType?: OrderFulfillmentType;
|
|
313
|
-
/** When the order should be fulfilled (
|
|
314
|
-
fulfillmentAt
|
|
321
|
+
/** When the order should be fulfilled (ISO 8601 datetime string or Date object) */
|
|
322
|
+
fulfillmentAt: Date | string;
|
|
315
323
|
/** Guest session identifier for customer lookup */
|
|
316
324
|
sessionId?: string;
|
|
317
325
|
/** Customer first name (for cash orders) */
|
|
@@ -471,6 +479,7 @@ interface MenuDish {
|
|
|
471
479
|
name: Record<string, string>;
|
|
472
480
|
shortName?: Record<string, string>;
|
|
473
481
|
description: Record<string, string> | null;
|
|
482
|
+
longDescription?: Record<string, string> | null;
|
|
474
483
|
isVegetarian: boolean | null;
|
|
475
484
|
isVegan: boolean | null;
|
|
476
485
|
isGlutenFree: boolean | null;
|
|
@@ -483,6 +492,7 @@ interface MenuBeverage {
|
|
|
483
492
|
name: Record<string, string>;
|
|
484
493
|
shortName?: Record<string, string>;
|
|
485
494
|
description: Record<string, string> | null;
|
|
495
|
+
longDescription?: Record<string, string> | null;
|
|
486
496
|
assets?: MenuAsset[];
|
|
487
497
|
}
|
|
488
498
|
interface MenuItem {
|
|
@@ -491,7 +501,7 @@ interface MenuItem {
|
|
|
491
501
|
tags: string[] | null;
|
|
492
502
|
/** Price adjustment in cents (adds to bundle base price) */
|
|
493
503
|
priceAdjustment: number;
|
|
494
|
-
currency:
|
|
504
|
+
currency: CurrencyCode;
|
|
495
505
|
isActive: boolean;
|
|
496
506
|
sortIndex: string | null;
|
|
497
507
|
dish: MenuDish | null;
|
|
@@ -656,7 +666,8 @@ interface CreatePaymentIntentRequest {
|
|
|
656
666
|
currency: Currency;
|
|
657
667
|
sessionId: string;
|
|
658
668
|
fulfillmentType?: OrderFulfillmentType;
|
|
659
|
-
|
|
669
|
+
/** When the order should be fulfilled (ISO 8601 datetime string or Date object) */
|
|
670
|
+
fulfillmentAt: Date | string;
|
|
660
671
|
}
|
|
661
672
|
interface CreatePaymentIntentResponse {
|
|
662
673
|
clientSecret: string;
|
|
@@ -930,7 +941,7 @@ interface MenuItemRow {
|
|
|
930
941
|
dish_id: string | null;
|
|
931
942
|
beverage_id: string | null;
|
|
932
943
|
price_adjustment: number;
|
|
933
|
-
currency:
|
|
944
|
+
currency: CurrencyCode;
|
|
934
945
|
is_active: boolean;
|
|
935
946
|
tags: string[] | null;
|
|
936
947
|
sort_index: string | null;
|
|
@@ -1075,4 +1086,5 @@ declare class Order3000Client {
|
|
|
1075
1086
|
constructor(config: Order3000ClientConfig);
|
|
1076
1087
|
}
|
|
1077
1088
|
|
|
1078
|
-
export {
|
|
1089
|
+
export { Order3000Client, getScheduleInfo };
|
|
1090
|
+
export type { AddToBasketRequest, AddToBasketResponse, Basket, BasketItem, BasketItemMenuItemRef, BasketItemMetadata, BasketStatus, ConfirmOrderRequest, ConfirmOrderResponse, CreatePaymentIntentRequest, CreatePaymentIntentResponse, CropArea, Currency, DayOfWeek, Event, EventByAccessor, EventMenu, EventPoster, EventRow, GetEventOptions, GetMenuOptions, ListEventsOptions, ListEventsResponse, Menu, MenuAsset, MenuBeverage, MenuBundle, MenuBundleDeposit, MenuDish, MenuItem, MenuItemRow, MenuItemType, MenuSubscription, MenuSubscriptionPoster, Order3000ClientConfig, OrderFulfillmentType, PlaceOrderRequest, Promotion, RealtimeConfig, RealtimeEvent, RealtimeSubscription, RemoveFromBasketResponse, Schedule, ScheduleInfo, ScheduleOverride, ScheduleOverrideRow, ScheduleRow, ScheduleTimeSlot, ScheduleWithTimeSlots, SubscribeRequest, SubscribeResponse, SubscriberStatus, SubscriptionCredit, SubscriptionCreditStatus, SubscriptionOptions, SubscriptionPeriod, TimeSlot, Unit };
|
package/dist/client.d.mts
CHANGED
|
@@ -123,7 +123,11 @@ interface components {
|
|
|
123
123
|
currency?: "EUR" | "CHF";
|
|
124
124
|
/** @enum {string|null} */
|
|
125
125
|
fulfillmentType?: "pickup" | "delivery" | null;
|
|
126
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Format: date-time
|
|
128
|
+
* @description When the order should be fulfilled (ISO 8601 datetime string)
|
|
129
|
+
*/
|
|
130
|
+
fulfillmentAt?: string | null;
|
|
127
131
|
orderedAt?: unknown;
|
|
128
132
|
orderedBy: string;
|
|
129
133
|
updatedAt?: unknown;
|
|
@@ -147,7 +151,11 @@ interface components {
|
|
|
147
151
|
currency: "EUR" | "CHF";
|
|
148
152
|
/** @enum {string|null} */
|
|
149
153
|
fulfillmentType: "pickup" | "delivery" | null;
|
|
150
|
-
|
|
154
|
+
/**
|
|
155
|
+
* Format: date-time
|
|
156
|
+
* @description When the order should be fulfilled (ISO 8601 datetime string)
|
|
157
|
+
*/
|
|
158
|
+
fulfillmentAt: string | null;
|
|
151
159
|
orderedAt: unknown;
|
|
152
160
|
orderedBy: string;
|
|
153
161
|
updatedAt: unknown;
|
|
@@ -307,11 +315,11 @@ type CreateEventResponse = schemas['CreateEventResponse'];
|
|
|
307
315
|
* Keep in sync with apps/order3000/src/drizzle/enums.ts
|
|
308
316
|
*/
|
|
309
317
|
type OrderFulfillmentType = 'pickup' | 'delivery';
|
|
310
|
-
type PlaceOrderRequest = Omit<schemas['PlaceOrderRequest'], 'taxAmount' | 'totalAmount'> & {
|
|
318
|
+
type PlaceOrderRequest = Omit<schemas['PlaceOrderRequest'], 'taxAmount' | 'totalAmount' | 'fulfillmentAt'> & {
|
|
311
319
|
/** Fulfillment type for the order (pickup or delivery) */
|
|
312
320
|
fulfillmentType?: OrderFulfillmentType;
|
|
313
|
-
/** When the order should be fulfilled (
|
|
314
|
-
fulfillmentAt
|
|
321
|
+
/** When the order should be fulfilled (ISO 8601 datetime string or Date object) */
|
|
322
|
+
fulfillmentAt: Date | string;
|
|
315
323
|
/** Guest session identifier for customer lookup */
|
|
316
324
|
sessionId?: string;
|
|
317
325
|
/** Customer first name (for cash orders) */
|
|
@@ -471,6 +479,7 @@ interface MenuDish {
|
|
|
471
479
|
name: Record<string, string>;
|
|
472
480
|
shortName?: Record<string, string>;
|
|
473
481
|
description: Record<string, string> | null;
|
|
482
|
+
longDescription?: Record<string, string> | null;
|
|
474
483
|
isVegetarian: boolean | null;
|
|
475
484
|
isVegan: boolean | null;
|
|
476
485
|
isGlutenFree: boolean | null;
|
|
@@ -483,6 +492,7 @@ interface MenuBeverage {
|
|
|
483
492
|
name: Record<string, string>;
|
|
484
493
|
shortName?: Record<string, string>;
|
|
485
494
|
description: Record<string, string> | null;
|
|
495
|
+
longDescription?: Record<string, string> | null;
|
|
486
496
|
assets?: MenuAsset[];
|
|
487
497
|
}
|
|
488
498
|
interface MenuItem {
|
|
@@ -491,7 +501,7 @@ interface MenuItem {
|
|
|
491
501
|
tags: string[] | null;
|
|
492
502
|
/** Price adjustment in cents (adds to bundle base price) */
|
|
493
503
|
priceAdjustment: number;
|
|
494
|
-
currency:
|
|
504
|
+
currency: CurrencyCode;
|
|
495
505
|
isActive: boolean;
|
|
496
506
|
sortIndex: string | null;
|
|
497
507
|
dish: MenuDish | null;
|
|
@@ -656,7 +666,8 @@ interface CreatePaymentIntentRequest {
|
|
|
656
666
|
currency: Currency;
|
|
657
667
|
sessionId: string;
|
|
658
668
|
fulfillmentType?: OrderFulfillmentType;
|
|
659
|
-
|
|
669
|
+
/** When the order should be fulfilled (ISO 8601 datetime string or Date object) */
|
|
670
|
+
fulfillmentAt: Date | string;
|
|
660
671
|
}
|
|
661
672
|
interface CreatePaymentIntentResponse {
|
|
662
673
|
clientSecret: string;
|
|
@@ -930,7 +941,7 @@ interface MenuItemRow {
|
|
|
930
941
|
dish_id: string | null;
|
|
931
942
|
beverage_id: string | null;
|
|
932
943
|
price_adjustment: number;
|
|
933
|
-
currency:
|
|
944
|
+
currency: CurrencyCode;
|
|
934
945
|
is_active: boolean;
|
|
935
946
|
tags: string[] | null;
|
|
936
947
|
sort_index: string | null;
|
|
@@ -1075,4 +1086,5 @@ declare class Order3000Client {
|
|
|
1075
1086
|
constructor(config: Order3000ClientConfig);
|
|
1076
1087
|
}
|
|
1077
1088
|
|
|
1078
|
-
export {
|
|
1089
|
+
export { Order3000Client, getScheduleInfo };
|
|
1090
|
+
export type { AddToBasketRequest, AddToBasketResponse, Basket, BasketItem, BasketItemMenuItemRef, BasketItemMetadata, BasketStatus, ConfirmOrderRequest, ConfirmOrderResponse, CreatePaymentIntentRequest, CreatePaymentIntentResponse, CropArea, Currency, DayOfWeek, Event, EventByAccessor, EventMenu, EventPoster, EventRow, GetEventOptions, GetMenuOptions, ListEventsOptions, ListEventsResponse, Menu, MenuAsset, MenuBeverage, MenuBundle, MenuBundleDeposit, MenuDish, MenuItem, MenuItemRow, MenuItemType, MenuSubscription, MenuSubscriptionPoster, Order3000ClientConfig, OrderFulfillmentType, PlaceOrderRequest, Promotion, RealtimeConfig, RealtimeEvent, RealtimeSubscription, RemoveFromBasketResponse, Schedule, ScheduleInfo, ScheduleOverride, ScheduleOverrideRow, ScheduleRow, ScheduleTimeSlot, ScheduleWithTimeSlots, SubscribeRequest, SubscribeResponse, SubscriberStatus, SubscriptionCredit, SubscriptionCreditStatus, SubscriptionOptions, SubscriptionPeriod, TimeSlot, Unit };
|
package/dist/client.mjs
CHANGED
|
@@ -292,9 +292,7 @@ class OrdersResource extends BaseResource {
|
|
|
292
292
|
* SDK callers cannot provide these values - they're implicit from the basket contents.
|
|
293
293
|
*/
|
|
294
294
|
async place(order) {
|
|
295
|
-
|
|
296
|
-
const fulfillmentTime = fulfillmentAt ? `${String(fulfillmentAt.getHours()).padStart(2, "0")}:${String(fulfillmentAt.getMinutes()).padStart(2, "0")}` : void 0;
|
|
297
|
-
return this.request("POST", "", { ...rest, fulfillmentTime });
|
|
295
|
+
return this.request("POST", "", order);
|
|
298
296
|
}
|
|
299
297
|
async get(orderId) {
|
|
300
298
|
return this.request("GET", `/${orderId}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "order3000",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "order3000 node.js sdk",
|
|
5
5
|
"main": "./dist/client.cjs",
|
|
6
6
|
"module": "./dist/client.mjs",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@date-fns/tz": "^1.4.1",
|
|
19
20
|
"@supabase/supabase-js": "^2.49.8",
|
|
20
21
|
"@types/react-type-animation": "^2.0.0",
|
|
21
22
|
"i18next": "^25.6.0",
|
|
@@ -26,13 +27,13 @@
|
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@types/node": "^24.10.0",
|
|
28
29
|
"openapi-typescript": "^7.6.1",
|
|
29
|
-
"pkgroll": "^2.
|
|
30
|
+
"pkgroll": "^2.26.3",
|
|
30
31
|
"prettier": "^3.7.4",
|
|
31
32
|
"tsx": "^4.19.2",
|
|
32
33
|
"typescript": "^5.9.3",
|
|
33
|
-
"@kolaveri/prettier-config": "1.0.6",
|
|
34
34
|
"@kolaveri/eslint-config": "1.4.1",
|
|
35
|
-
"@kolaveri/tsconfig": "1.0.1"
|
|
35
|
+
"@kolaveri/tsconfig": "1.0.1",
|
|
36
|
+
"@kolaveri/prettier-config": "1.0.6"
|
|
36
37
|
},
|
|
37
38
|
"files": [
|
|
38
39
|
"dist"
|