order3000 0.13.1 → 0.13.2
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 +15 -6
- package/dist/client.d.mts +15 -6
- package/dist/client.mjs +1 -3
- package/package.json +2 -2
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) */
|
|
@@ -656,7 +664,8 @@ interface CreatePaymentIntentRequest {
|
|
|
656
664
|
currency: Currency;
|
|
657
665
|
sessionId: string;
|
|
658
666
|
fulfillmentType?: OrderFulfillmentType;
|
|
659
|
-
|
|
667
|
+
/** When the order should be fulfilled (ISO 8601 datetime string or Date object) */
|
|
668
|
+
fulfillmentAt: Date | string;
|
|
660
669
|
}
|
|
661
670
|
interface CreatePaymentIntentResponse {
|
|
662
671
|
clientSecret: string;
|
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) */
|
|
@@ -656,7 +664,8 @@ interface CreatePaymentIntentRequest {
|
|
|
656
664
|
currency: Currency;
|
|
657
665
|
sessionId: string;
|
|
658
666
|
fulfillmentType?: OrderFulfillmentType;
|
|
659
|
-
|
|
667
|
+
/** When the order should be fulfilled (ISO 8601 datetime string or Date object) */
|
|
668
|
+
fulfillmentAt: Date | string;
|
|
660
669
|
}
|
|
661
670
|
interface CreatePaymentIntentResponse {
|
|
662
671
|
clientSecret: string;
|
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.2",
|
|
4
4
|
"description": "order3000 node.js sdk",
|
|
5
5
|
"main": "./dist/client.cjs",
|
|
6
6
|
"module": "./dist/client.mjs",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"prettier": "^3.7.4",
|
|
31
31
|
"tsx": "^4.19.2",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
|
-
"@kolaveri/prettier-config": "1.0.6",
|
|
34
33
|
"@kolaveri/eslint-config": "1.4.1",
|
|
34
|
+
"@kolaveri/prettier-config": "1.0.6",
|
|
35
35
|
"@kolaveri/tsconfig": "1.0.1"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|