@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.
@@ -2011,6 +2011,53 @@ var CE_SDK = (() => {
2011
2011
  })
2012
2012
  );
2013
2013
  }
2014
+ /**
2015
+ * Evaluate promotions
2016
+ *
2017
+ * @param cartId - The ID of the cart
2018
+ * @returns Promise with evaluated promotions
2019
+ */
2020
+ async evaluatePromotions(cartId) {
2021
+ return this.executeRequest(
2022
+ () => this.client.GET("/carts/{id}/evaluate-promotions", {
2023
+ params: {
2024
+ path: cartId
2025
+ }
2026
+ })
2027
+ );
2028
+ }
2029
+ /**
2030
+ * Evaluate coupons
2031
+ *
2032
+ * @param cartId - The ID of the cart
2033
+ * @returns Promise with evaluated coupons
2034
+ */
2035
+ async evaluateCoupons(cartId) {
2036
+ return this.executeRequest(
2037
+ () => this.client.GET("/carts/{id}/evaluate-coupons", {
2038
+ params: {
2039
+ path: cartId
2040
+ }
2041
+ })
2042
+ );
2043
+ }
2044
+ /**
2045
+ * Update cart customer
2046
+ *
2047
+ * @param cartId - The ID of the cart
2048
+ * @param body - The body of the request
2049
+ * @returns Promise with updated cart
2050
+ */
2051
+ async updateCartCustomer(cartId, body) {
2052
+ return this.executeRequest(
2053
+ () => this.client.POST("/carts/{id}/update-customer", {
2054
+ params: {
2055
+ path: cartId
2056
+ },
2057
+ body
2058
+ })
2059
+ );
2060
+ }
2014
2061
  };
2015
2062
 
2016
2063
  // src/lib/auth.ts