@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.cjs CHANGED
@@ -1465,6 +1465,53 @@ var CartClient = class extends StorefrontAPIClient {
1465
1465
  })
1466
1466
  );
1467
1467
  }
1468
+ /**
1469
+ * Evaluate promotions
1470
+ *
1471
+ * @param cartId - The ID of the cart
1472
+ * @returns Promise with evaluated promotions
1473
+ */
1474
+ async evaluatePromotions(cartId) {
1475
+ return this.executeRequest(
1476
+ () => this.client.GET("/carts/{id}/evaluate-promotions", {
1477
+ params: {
1478
+ path: cartId
1479
+ }
1480
+ })
1481
+ );
1482
+ }
1483
+ /**
1484
+ * Evaluate coupons
1485
+ *
1486
+ * @param cartId - The ID of the cart
1487
+ * @returns Promise with evaluated coupons
1488
+ */
1489
+ async evaluateCoupons(cartId) {
1490
+ return this.executeRequest(
1491
+ () => this.client.GET("/carts/{id}/evaluate-coupons", {
1492
+ params: {
1493
+ path: cartId
1494
+ }
1495
+ })
1496
+ );
1497
+ }
1498
+ /**
1499
+ * Update cart customer
1500
+ *
1501
+ * @param cartId - The ID of the cart
1502
+ * @param body - The body of the request
1503
+ * @returns Promise with updated cart
1504
+ */
1505
+ async updateCartCustomer(cartId, body) {
1506
+ return this.executeRequest(
1507
+ () => this.client.POST("/carts/{id}/update-customer", {
1508
+ params: {
1509
+ path: cartId
1510
+ },
1511
+ body
1512
+ })
1513
+ );
1514
+ }
1468
1515
  };
1469
1516
 
1470
1517
  // src/lib/auth.ts