@djust-b2b/djust-front-sdk 1.20.6 → 1.21.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.
|
@@ -111,13 +111,13 @@ async function getCarts(params) {
|
|
|
111
111
|
* @returns {Promise<GetCartResponse>} - A promise that resolves when the cart is created.
|
|
112
112
|
*/
|
|
113
113
|
async function createCart(params) {
|
|
114
|
-
const { name } = params;
|
|
114
|
+
const { name, type } = params;
|
|
115
115
|
// Ensure required parameter is present
|
|
116
116
|
(0, parameters_validation_1.required)({ name });
|
|
117
117
|
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
118
118
|
method: "POST",
|
|
119
119
|
path: `/v2/shop/carts`,
|
|
120
|
-
body: JSON.stringify({ name }),
|
|
120
|
+
body: JSON.stringify({ name, type: type || "CART" }),
|
|
121
121
|
});
|
|
122
122
|
return data;
|
|
123
123
|
}
|