@commercengine/storefront-sdk 0.4.6 → 0.4.7

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/index.js CHANGED
@@ -1414,6 +1414,53 @@ var CartClient = class extends StorefrontAPIClient {
1414
1414
  })
1415
1415
  );
1416
1416
  }
1417
+ /**
1418
+ * Evaluate promotions
1419
+ *
1420
+ * @param cartId - The ID of the cart
1421
+ * @returns Promise with evaluated promotions
1422
+ */
1423
+ async evaluatePromotions(cartId) {
1424
+ return this.executeRequest(
1425
+ () => this.client.GET("/carts/{id}/evaluate-promotions", {
1426
+ params: {
1427
+ path: cartId
1428
+ }
1429
+ })
1430
+ );
1431
+ }
1432
+ /**
1433
+ * Evaluate coupons
1434
+ *
1435
+ * @param cartId - The ID of the cart
1436
+ * @returns Promise with evaluated coupons
1437
+ */
1438
+ async evaluateCoupons(cartId) {
1439
+ return this.executeRequest(
1440
+ () => this.client.GET("/carts/{id}/evaluate-coupons", {
1441
+ params: {
1442
+ path: cartId
1443
+ }
1444
+ })
1445
+ );
1446
+ }
1447
+ /**
1448
+ * Update cart customer
1449
+ *
1450
+ * @param cartId - The ID of the cart
1451
+ * @param body - The body of the request
1452
+ * @returns Promise with updated cart
1453
+ */
1454
+ async updateCartCustomer(cartId, body) {
1455
+ return this.executeRequest(
1456
+ () => this.client.POST("/carts/{id}/update-customer", {
1457
+ params: {
1458
+ path: cartId
1459
+ },
1460
+ body
1461
+ })
1462
+ );
1463
+ }
1417
1464
  };
1418
1465
 
1419
1466
  // src/lib/auth.ts