@compassdigital/sdk.typescript 4.65.0 → 4.67.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/lib/index.d.ts +0 -28
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -29
- package/lib/index.js.map +1 -1
- package/lib/interface/delivery.d.ts +1 -1
- package/lib/interface/delivery.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +4 -0
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +5 -0
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +3 -3
- package/lib/interface/task.d.ts.map +1 -1
- package/manifest.json +0 -4
- package/package.json +2 -2
- package/src/index.ts +0 -70
- package/src/interface/delivery.ts +1 -1
- package/src/interface/mealplan.ts +4 -0
- package/src/interface/shoppingcart.ts +6 -0
- package/src/interface/task.ts +4 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compassdigital/sdk.typescript",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.67.0",
|
|
4
4
|
"description": "Compass Digital Labs TypeScript SDK",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/node": "^20.1.0",
|
|
54
54
|
"esbuild": "^0.23.0",
|
|
55
55
|
"jest": "^29.7.0",
|
|
56
|
-
"rimraf": "^
|
|
56
|
+
"rimraf": "^6.0.1",
|
|
57
57
|
"typescript": "^5.0.2"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/index.ts
CHANGED
|
@@ -931,15 +931,6 @@ import {
|
|
|
931
931
|
PostVendorResetPasswordResponse,
|
|
932
932
|
} from "./interface/vendor";
|
|
933
933
|
|
|
934
|
-
import {
|
|
935
|
-
GetDeliveryOrderQuery,
|
|
936
|
-
GetDeliveryOrderResponse,
|
|
937
|
-
GetDeliveryQuery,
|
|
938
|
-
GetDeliveryResponse,
|
|
939
|
-
PostDeliveryAvailabilityBody,
|
|
940
|
-
PostDeliveryAvailabilityResponse,
|
|
941
|
-
} from "./interface/delivery";
|
|
942
|
-
|
|
943
934
|
import {
|
|
944
935
|
GetFrictionlessBrandFrictionlessStatusQuery,
|
|
945
936
|
GetFrictionlessBrandFrictionlessStatusResponse,
|
|
@@ -9798,67 +9789,6 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9798
9789
|
);
|
|
9799
9790
|
}
|
|
9800
9791
|
|
|
9801
|
-
/**
|
|
9802
|
-
* GET /delivery/{id}/order/{order_id} - get delivery for order
|
|
9803
|
-
*
|
|
9804
|
-
* @param id - delivery provider id
|
|
9805
|
-
* @param order_id - order id
|
|
9806
|
-
* @param options - additional request options
|
|
9807
|
-
*/
|
|
9808
|
-
get_delivery_order(
|
|
9809
|
-
id: string,
|
|
9810
|
-
order_id: string,
|
|
9811
|
-
options?: {
|
|
9812
|
-
query?: GetDeliveryOrderQuery;
|
|
9813
|
-
} & RequestOptions,
|
|
9814
|
-
): ResponsePromise<GetDeliveryOrderResponse> {
|
|
9815
|
-
return this.request(
|
|
9816
|
-
"delivery",
|
|
9817
|
-
"get_delivery_order",
|
|
9818
|
-
"get",
|
|
9819
|
-
`/delivery/${id}/order/${order_id}`,
|
|
9820
|
-
null,
|
|
9821
|
-
options,
|
|
9822
|
-
);
|
|
9823
|
-
}
|
|
9824
|
-
|
|
9825
|
-
/**
|
|
9826
|
-
* GET /delivery/{id} - Get all Deliveries for delivery provider
|
|
9827
|
-
*
|
|
9828
|
-
* @param id - delivery provider id
|
|
9829
|
-
* @param options - additional request options
|
|
9830
|
-
*/
|
|
9831
|
-
get_delivery(
|
|
9832
|
-
id: string,
|
|
9833
|
-
options?: {
|
|
9834
|
-
query?: GetDeliveryQuery;
|
|
9835
|
-
} & RequestOptions,
|
|
9836
|
-
): ResponsePromise<GetDeliveryResponse> {
|
|
9837
|
-
return this.request("delivery", "get_delivery", "get", `/delivery/${id}`, null, options);
|
|
9838
|
-
}
|
|
9839
|
-
|
|
9840
|
-
/**
|
|
9841
|
-
* POST /delivery/{id}/availability - Get delivery availability for provided brand and coordinates
|
|
9842
|
-
*
|
|
9843
|
-
* @param id - delivery provider id
|
|
9844
|
-
* @param body - Order object that needs to be created
|
|
9845
|
-
* @param options - additional request options
|
|
9846
|
-
*/
|
|
9847
|
-
post_delivery_availability(
|
|
9848
|
-
id: string,
|
|
9849
|
-
body: PostDeliveryAvailabilityBody,
|
|
9850
|
-
options?: RequestOptions,
|
|
9851
|
-
): ResponsePromise<PostDeliveryAvailabilityResponse> {
|
|
9852
|
-
return this.request(
|
|
9853
|
-
"delivery",
|
|
9854
|
-
"post_delivery_availability",
|
|
9855
|
-
"post",
|
|
9856
|
-
`/delivery/${id}/availability`,
|
|
9857
|
-
body,
|
|
9858
|
-
options,
|
|
9859
|
-
);
|
|
9860
|
-
}
|
|
9861
|
-
|
|
9862
9792
|
/**
|
|
9863
9793
|
* GET /frictionless/brand/{id_brand}/frictionless-status - Check frictionless support of a given brand
|
|
9864
9794
|
*
|
|
@@ -214,6 +214,10 @@ export interface DeleteMealplanTenderBody {
|
|
|
214
214
|
type?: string;
|
|
215
215
|
conversion_amount?: number;
|
|
216
216
|
terminal_id?: string;
|
|
217
|
+
drain_order_type?: {
|
|
218
|
+
taxable?: boolean;
|
|
219
|
+
tax_exempt?: boolean;
|
|
220
|
+
};
|
|
217
221
|
}
|
|
218
222
|
|
|
219
223
|
export interface DeleteMealplanTenderResponse {
|
|
@@ -351,6 +351,7 @@ export interface ShoppingCartResponse {
|
|
|
351
351
|
meta?: {
|
|
352
352
|
// Raw request from any vendor integrated with CDL
|
|
353
353
|
vendor?: Record<string, any>;
|
|
354
|
+
drain_order_type?: DrainOrderType;
|
|
354
355
|
[index: string]: any;
|
|
355
356
|
};
|
|
356
357
|
}
|
|
@@ -471,6 +472,11 @@ export interface PromoItem {
|
|
|
471
472
|
subtotal_amount?: number;
|
|
472
473
|
}
|
|
473
474
|
|
|
475
|
+
export interface DrainOrderType {
|
|
476
|
+
taxable?: boolean;
|
|
477
|
+
tax_exempt?: boolean;
|
|
478
|
+
}
|
|
479
|
+
|
|
474
480
|
// POST /shoppingcart - Create a new ShoppingCart
|
|
475
481
|
|
|
476
482
|
export type PostShoppingcartCartBody = ShoppingCartRequest;
|
package/src/interface/task.ts
CHANGED
|
@@ -41,8 +41,7 @@ export interface Task {
|
|
|
41
41
|
order?: TaskOrder;
|
|
42
42
|
pickup_details?: TaskLocation;
|
|
43
43
|
dropoff_details?: TaskLocation;
|
|
44
|
-
|
|
45
|
-
status?: "new" | "in_progress" | "ready" | "out_for_delivery" | "delivered" | "order_is_ready";
|
|
44
|
+
status?: TaskStatus;
|
|
46
45
|
// Any related metadata information about this Task
|
|
47
46
|
meta?: {
|
|
48
47
|
[index: string]: any;
|
|
@@ -83,14 +82,7 @@ export interface TaskCreate {
|
|
|
83
82
|
order: TaskOrder;
|
|
84
83
|
pickup_details: TaskLocation;
|
|
85
84
|
dropoff_details: TaskLocation;
|
|
86
|
-
|
|
87
|
-
status:
|
|
88
|
-
| "accepted"
|
|
89
|
-
| "in_progress"
|
|
90
|
-
| "ready"
|
|
91
|
-
| "out_for_delivery"
|
|
92
|
-
| "delivered"
|
|
93
|
-
| "order_is_ready";
|
|
85
|
+
status: TaskStatus;
|
|
94
86
|
// Any related metadata information about this Task
|
|
95
87
|
meta?: {
|
|
96
88
|
[index: string]: any;
|
|
@@ -165,7 +157,8 @@ export type TaskStatus =
|
|
|
165
157
|
| "ready"
|
|
166
158
|
| "out_for_delivery"
|
|
167
159
|
| "delivered"
|
|
168
|
-
| "order_is_ready"
|
|
160
|
+
| "order_is_ready"
|
|
161
|
+
| "accepted";
|
|
169
162
|
|
|
170
163
|
// POST /task - Create new Task
|
|
171
164
|
|