@labdigital/commercetools-mock 2.9.0 → 2.10.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/dist/index.d.cts CHANGED
@@ -81,6 +81,7 @@ declare class CartRepository extends AbstractResourceRepository<'cart'> {
81
81
  getActiveCart(projectKey: string): Cart | undefined;
82
82
  actions: {
83
83
  addLineItem: (context: RepositoryContext, resource: Writable<Cart>, { productId, variantId, sku, quantity }: CartAddLineItemAction) => void;
84
+ recalculate: () => void;
84
85
  addItemShippingAddress: (context: RepositoryContext, resource: Writable<Cart>, { action, address }: CartAddItemShippingAddressAction) => void;
85
86
  changeLineItemQuantity: (context: RepositoryContext, resource: Writable<Cart>, { lineItemId, lineItemKey, quantity }: CartChangeLineItemQuantityAction) => void;
86
87
  removeLineItem: (context: RepositoryContext, resource: Writable<Cart>, { lineItemId, quantity }: CartRemoveLineItemAction) => void;
package/dist/index.d.ts CHANGED
@@ -81,6 +81,7 @@ declare class CartRepository extends AbstractResourceRepository<'cart'> {
81
81
  getActiveCart(projectKey: string): Cart | undefined;
82
82
  actions: {
83
83
  addLineItem: (context: RepositoryContext, resource: Writable<Cart>, { productId, variantId, sku, quantity }: CartAddLineItemAction) => void;
84
+ recalculate: () => void;
84
85
  addItemShippingAddress: (context: RepositoryContext, resource: Writable<Cart>, { action, address }: CartAddItemShippingAddressAction) => void;
85
86
  changeLineItemQuantity: (context: RepositoryContext, resource: Writable<Cart>, { lineItemId, lineItemKey, quantity }: CartChangeLineItemQuantityAction) => void;
86
87
  removeLineItem: (context: RepositoryContext, resource: Writable<Cart>, { lineItemId, quantity }: CartRemoveLineItemAction) => void;
package/dist/index.js CHANGED
@@ -2315,6 +2315,8 @@ var CartRepository = class extends AbstractResourceRepository {
2315
2315
  }
2316
2316
  resource.totalPrice.centAmount = calculateCartTotalPrice(resource);
2317
2317
  },
2318
+ recalculate: () => {
2319
+ },
2318
2320
  addItemShippingAddress: (context, resource, { action, address }) => {
2319
2321
  const newAddress = createAddress(
2320
2322
  address,