@atomic-solutions/woocommerce-react 0.7.0 → 0.8.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.
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { UseQueryOptions, UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
3
3
  import * as _atomic_solutions_woocommerce_api_client from '@atomic-solutions/woocommerce-api-client';
4
4
  import { WooCommerceClient, ProductCategory, ProductParams, PaginatedResponse, Product, ProductTagsParams, ProductTag, Cart, Checkout, GetOrderInput, StoreApiOrder, ProductImage, CartItemImage, CartItem } from '@atomic-solutions/woocommerce-api-client';
5
- import { Q as QueryKeys, k as StoreContextValue, l as StoreFeatures, S as StoreLocale, n as StoreTheme } from './types-4MW3Y__g.js';
5
+ import { Q as QueryKeys, k as StoreContextValue, l as StoreFeatures, S as StoreLocale, n as StoreTheme } from './types-DABmdACe.js';
6
6
 
7
7
  type QueryOptions<TData, TError = Error> = Omit<UseQueryOptions<TData, TError>, 'queryKey' | 'queryFn'>;
8
8
  type MutationOptions<TData, TError = Error, TVariables = unknown> = Omit<UseMutationOptions<TData, TError, TVariables>, 'mutationFn'>;
@@ -7898,6 +7898,196 @@ declare const useRemoveCoupon: () => _tanstack_react_query.UseMutationResult<{
7898
7898
  }, Error, {
7899
7899
  code: string;
7900
7900
  }, unknown>;
7901
+ declare const useUpdateCartExtensions: () => _tanstack_react_query.UseMutationResult<{
7902
+ totals: {
7903
+ currency_code: string;
7904
+ currency_symbol: string;
7905
+ currency_minor_unit: number;
7906
+ currency_decimal_separator: string;
7907
+ currency_thousand_separator: string;
7908
+ currency_prefix: string;
7909
+ currency_suffix: string;
7910
+ total_items: string;
7911
+ total_items_tax: string;
7912
+ total_fees: string;
7913
+ total_fees_tax: string;
7914
+ total_discount: string;
7915
+ total_discount_tax: string;
7916
+ total_shipping: string | null;
7917
+ total_shipping_tax: string | null;
7918
+ total_price: string;
7919
+ total_tax: string;
7920
+ tax_lines: {
7921
+ name: string;
7922
+ price: string;
7923
+ rate: string;
7924
+ }[];
7925
+ };
7926
+ items: {
7927
+ type: "simple" | "variable" | "grouped" | "external";
7928
+ id: number;
7929
+ name: string;
7930
+ key: string;
7931
+ quantity: number;
7932
+ quantity_limits: {
7933
+ minimum: number;
7934
+ maximum: number;
7935
+ multiple_of: number;
7936
+ editable: boolean;
7937
+ };
7938
+ short_description: string;
7939
+ description: string;
7940
+ sku: string;
7941
+ low_stock_remaining: number | null;
7942
+ backorders_allowed: boolean;
7943
+ show_backorder_badge: boolean;
7944
+ sold_individually: boolean;
7945
+ permalink: string;
7946
+ images: {
7947
+ alt: string;
7948
+ id: number;
7949
+ name: string;
7950
+ sizes: string;
7951
+ src: string;
7952
+ srcset: string;
7953
+ thumbnail: string;
7954
+ }[];
7955
+ variation: {
7956
+ value: string;
7957
+ attribute: string;
7958
+ }[];
7959
+ item_data: {
7960
+ value: string;
7961
+ key: string;
7962
+ }[];
7963
+ prices: {
7964
+ currency_code: string;
7965
+ currency_symbol: string;
7966
+ currency_minor_unit: number;
7967
+ currency_decimal_separator: string;
7968
+ currency_thousand_separator: string;
7969
+ currency_prefix: string;
7970
+ currency_suffix: string;
7971
+ price: string;
7972
+ regular_price: string;
7973
+ sale_price: string;
7974
+ price_range: {
7975
+ min_amount: string;
7976
+ max_amount: string;
7977
+ } | null;
7978
+ raw_prices?: {
7979
+ price: string;
7980
+ regular_price: string;
7981
+ sale_price: string;
7982
+ precision: number;
7983
+ } | undefined;
7984
+ };
7985
+ totals: {
7986
+ currency_code: string;
7987
+ currency_symbol: string;
7988
+ currency_minor_unit: number;
7989
+ currency_decimal_separator: string;
7990
+ currency_thousand_separator: string;
7991
+ currency_prefix: string;
7992
+ currency_suffix: string;
7993
+ line_subtotal: string;
7994
+ line_subtotal_tax: string;
7995
+ line_total: string;
7996
+ line_total_tax: string;
7997
+ };
7998
+ catalog_visibility: string;
7999
+ extensions: Record<string, unknown>;
8000
+ }[];
8001
+ shipping_rates: {
8002
+ name: string;
8003
+ package_id: number;
8004
+ destination: {
8005
+ address_1: string;
8006
+ city: string;
8007
+ state: string;
8008
+ postcode: string;
8009
+ country: string;
8010
+ address_2?: string | undefined;
8011
+ };
8012
+ items: {
8013
+ name: string;
8014
+ key: string;
8015
+ quantity: number;
8016
+ }[];
8017
+ shipping_rates: {
8018
+ currency_code: string;
8019
+ currency_symbol: string;
8020
+ name: string;
8021
+ price: string;
8022
+ description: string;
8023
+ rate_id: string;
8024
+ delivery_time: string;
8025
+ instance_id: number;
8026
+ method_id: string;
8027
+ meta_data: {
8028
+ value: string;
8029
+ key: string;
8030
+ }[];
8031
+ selected: boolean;
8032
+ }[];
8033
+ }[];
8034
+ items_count: number;
8035
+ items_weight: number;
8036
+ needs_payment: boolean;
8037
+ needs_shipping: boolean;
8038
+ payment_methods: ("cod" | "monri")[];
8039
+ payment_requirements: string[];
8040
+ has_calculated_shipping: boolean;
8041
+ shipping_address: {
8042
+ first_name: string;
8043
+ last_name: string;
8044
+ company: string;
8045
+ address_1: string;
8046
+ address_2: string;
8047
+ city: string;
8048
+ state: string;
8049
+ postcode: string;
8050
+ country: string;
8051
+ phone: string;
8052
+ };
8053
+ billing_address: {
8054
+ first_name: string;
8055
+ last_name: string;
8056
+ company: string;
8057
+ address_1: string;
8058
+ address_2: string;
8059
+ city: string;
8060
+ state: string;
8061
+ postcode: string;
8062
+ country: string;
8063
+ phone: string;
8064
+ email: string | null;
8065
+ };
8066
+ coupons: {
8067
+ code: string;
8068
+ totals: {
8069
+ currency_code: string;
8070
+ currency_symbol: string;
8071
+ currency_minor_unit: number;
8072
+ currency_decimal_separator: string;
8073
+ currency_thousand_separator: string;
8074
+ currency_prefix: string;
8075
+ currency_suffix: string;
8076
+ total_discount: string;
8077
+ total_discount_tax: string;
8078
+ };
8079
+ }[];
8080
+ errors: {
8081
+ code: string;
8082
+ message: string;
8083
+ }[];
8084
+ cross_sells: unknown[];
8085
+ fees: unknown[];
8086
+ extensions?: Record<string, unknown> | undefined;
8087
+ }, Error, {
8088
+ data: Record<string, unknown>;
8089
+ namespace: string;
8090
+ }, unknown>;
7901
8091
  declare const useUpdateCustomer: () => _tanstack_react_query.UseMutationResult<{
7902
8092
  totals: {
7903
8093
  currency_code: string;
@@ -8822,4 +9012,4 @@ interface UseOrderViewReturn {
8822
9012
  }
8823
9013
  declare function useOrderView(input: GetOrderInput, options?: UseOrderViewOptions): UseOrderViewReturn;
8824
9014
 
8825
- export { useOrderView as $, type AppliedCoupon as A, getImageUrlOrPlaceholder as B, type CartTotals as C, getMaxAddToCartQuantity as D, getOrderStatusLabel as E, getPrimaryImage as F, getSizedImageUrl as G, getStockSeverity as H, type ImageSize as I, getStockStatusText as J, isLowStock as K, isPurchasable as L, preloadImage as M, preloadImages as N, unavailableReason as O, PLACEHOLDER_IMAGE_URL as P, useAddManyToCart as Q, type ReorderInputItem as R, type ShippingRate as S, useAddToCart as T, type UnavailableReason as U, useApplyCoupon as V, useCart as W, useCartView as X, useCheckout as Y, useInfiniteProducts as Z, useOrder as _, type PaymentMethod as a, useProcessCheckout as a0, useProduct as a1, useProductCategories as a2, useProductCategoryTree as a3, useProductTags as a4, useProductView as a5, useProducts as a6, useProductsFeed as a7, useRemoveCoupon as a8, useRemoveFromCart as a9, useReorderView as aa, useSelectShippingRate as ab, useStore as ac, useStoreFeatures as ad, useStoreLocale as ae, useStoreTheme as af, useUpdateCartItem as ag, useUpdateCustomer as ah, useWooCommerceClient as ai, useWooCommerceQueryKeys as aj, type InfiniteQueryOptions as ak, type MutationOptions as al, type QueryOptions as am, type ProcessedCartItem as b, type ProcessedCategory as c, type ProcessedOrderDetails as d, type ProcessedOrderLineItem as e, type ProcessedProduct as f, type ProcessedProductDetails as g, type ProductCartState as h, type ProductCategoryTreeNode as i, type ReorderItemView as j, type ReorderUnavailableReason as k, type StockDisplayConfig as l, type StockStatus as m, type UseCartViewOptions as n, type UseCartViewReturn as o, type UseOrderViewOptions as p, type UseOrderViewReturn as q, type UseProductViewOptions as r, type UseProductViewReturn as s, type UseProductsFeedOptions as t, type UseProductsFeedReturn as u, type UseReorderViewOptions as v, type UseReorderViewReturn as w, canAddToCart as x, getAllImageUrls as y, getImageUrl as z };
9015
+ export { useOrderView as $, type AppliedCoupon as A, getImageUrlOrPlaceholder as B, type CartTotals as C, getMaxAddToCartQuantity as D, getOrderStatusLabel as E, getPrimaryImage as F, getSizedImageUrl as G, getStockSeverity as H, type ImageSize as I, getStockStatusText as J, isLowStock as K, isPurchasable as L, preloadImage as M, preloadImages as N, unavailableReason as O, PLACEHOLDER_IMAGE_URL as P, useAddManyToCart as Q, type ReorderInputItem as R, type ShippingRate as S, useAddToCart as T, type UnavailableReason as U, useApplyCoupon as V, useCart as W, useCartView as X, useCheckout as Y, useInfiniteProducts as Z, useOrder as _, type PaymentMethod as a, useProcessCheckout as a0, useProduct as a1, useProductCategories as a2, useProductCategoryTree as a3, useProductTags as a4, useProductView as a5, useProducts as a6, useProductsFeed as a7, useRemoveCoupon as a8, useRemoveFromCart as a9, useReorderView as aa, useSelectShippingRate as ab, useStore as ac, useStoreFeatures as ad, useStoreLocale as ae, useStoreTheme as af, useUpdateCartExtensions as ag, useUpdateCartItem as ah, useUpdateCustomer as ai, useWooCommerceClient as aj, useWooCommerceQueryKeys as ak, type InfiniteQueryOptions as al, type MutationOptions as am, type QueryOptions as an, type ProcessedCartItem as b, type ProcessedCategory as c, type ProcessedOrderDetails as d, type ProcessedOrderLineItem as e, type ProcessedProduct as f, type ProcessedProductDetails as g, type ProductCartState as h, type ProductCategoryTreeNode as i, type ReorderItemView as j, type ReorderUnavailableReason as k, type StockDisplayConfig as l, type StockStatus as m, type UseCartViewOptions as n, type UseCartViewReturn as o, type UseOrderViewOptions as p, type UseOrderViewReturn as q, type UseProductViewOptions as r, type UseProductViewReturn as s, type UseProductsFeedOptions as t, type UseProductsFeedReturn as u, type UseReorderViewOptions as v, type UseReorderViewReturn as w, canAddToCart as x, getAllImageUrls as y, getImageUrl as z };
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { UseQueryOptions, UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
3
3
  import * as _atomic_solutions_woocommerce_api_client from '@atomic-solutions/woocommerce-api-client';
4
4
  import { WooCommerceClient, ProductCategory, ProductParams, PaginatedResponse, Product, ProductTagsParams, ProductTag, Cart, Checkout, GetOrderInput, StoreApiOrder, ProductImage, CartItemImage, CartItem } from '@atomic-solutions/woocommerce-api-client';
5
- import { Q as QueryKeys, k as StoreContextValue, l as StoreFeatures, S as StoreLocale, n as StoreTheme } from './types-4MW3Y__g.cjs';
5
+ import { Q as QueryKeys, k as StoreContextValue, l as StoreFeatures, S as StoreLocale, n as StoreTheme } from './types-DABmdACe.cjs';
6
6
 
7
7
  type QueryOptions<TData, TError = Error> = Omit<UseQueryOptions<TData, TError>, 'queryKey' | 'queryFn'>;
8
8
  type MutationOptions<TData, TError = Error, TVariables = unknown> = Omit<UseMutationOptions<TData, TError, TVariables>, 'mutationFn'>;
@@ -7898,6 +7898,196 @@ declare const useRemoveCoupon: () => _tanstack_react_query.UseMutationResult<{
7898
7898
  }, Error, {
7899
7899
  code: string;
7900
7900
  }, unknown>;
7901
+ declare const useUpdateCartExtensions: () => _tanstack_react_query.UseMutationResult<{
7902
+ totals: {
7903
+ currency_code: string;
7904
+ currency_symbol: string;
7905
+ currency_minor_unit: number;
7906
+ currency_decimal_separator: string;
7907
+ currency_thousand_separator: string;
7908
+ currency_prefix: string;
7909
+ currency_suffix: string;
7910
+ total_items: string;
7911
+ total_items_tax: string;
7912
+ total_fees: string;
7913
+ total_fees_tax: string;
7914
+ total_discount: string;
7915
+ total_discount_tax: string;
7916
+ total_shipping: string | null;
7917
+ total_shipping_tax: string | null;
7918
+ total_price: string;
7919
+ total_tax: string;
7920
+ tax_lines: {
7921
+ name: string;
7922
+ price: string;
7923
+ rate: string;
7924
+ }[];
7925
+ };
7926
+ items: {
7927
+ type: "simple" | "variable" | "grouped" | "external";
7928
+ id: number;
7929
+ name: string;
7930
+ key: string;
7931
+ quantity: number;
7932
+ quantity_limits: {
7933
+ minimum: number;
7934
+ maximum: number;
7935
+ multiple_of: number;
7936
+ editable: boolean;
7937
+ };
7938
+ short_description: string;
7939
+ description: string;
7940
+ sku: string;
7941
+ low_stock_remaining: number | null;
7942
+ backorders_allowed: boolean;
7943
+ show_backorder_badge: boolean;
7944
+ sold_individually: boolean;
7945
+ permalink: string;
7946
+ images: {
7947
+ alt: string;
7948
+ id: number;
7949
+ name: string;
7950
+ sizes: string;
7951
+ src: string;
7952
+ srcset: string;
7953
+ thumbnail: string;
7954
+ }[];
7955
+ variation: {
7956
+ value: string;
7957
+ attribute: string;
7958
+ }[];
7959
+ item_data: {
7960
+ value: string;
7961
+ key: string;
7962
+ }[];
7963
+ prices: {
7964
+ currency_code: string;
7965
+ currency_symbol: string;
7966
+ currency_minor_unit: number;
7967
+ currency_decimal_separator: string;
7968
+ currency_thousand_separator: string;
7969
+ currency_prefix: string;
7970
+ currency_suffix: string;
7971
+ price: string;
7972
+ regular_price: string;
7973
+ sale_price: string;
7974
+ price_range: {
7975
+ min_amount: string;
7976
+ max_amount: string;
7977
+ } | null;
7978
+ raw_prices?: {
7979
+ price: string;
7980
+ regular_price: string;
7981
+ sale_price: string;
7982
+ precision: number;
7983
+ } | undefined;
7984
+ };
7985
+ totals: {
7986
+ currency_code: string;
7987
+ currency_symbol: string;
7988
+ currency_minor_unit: number;
7989
+ currency_decimal_separator: string;
7990
+ currency_thousand_separator: string;
7991
+ currency_prefix: string;
7992
+ currency_suffix: string;
7993
+ line_subtotal: string;
7994
+ line_subtotal_tax: string;
7995
+ line_total: string;
7996
+ line_total_tax: string;
7997
+ };
7998
+ catalog_visibility: string;
7999
+ extensions: Record<string, unknown>;
8000
+ }[];
8001
+ shipping_rates: {
8002
+ name: string;
8003
+ package_id: number;
8004
+ destination: {
8005
+ address_1: string;
8006
+ city: string;
8007
+ state: string;
8008
+ postcode: string;
8009
+ country: string;
8010
+ address_2?: string | undefined;
8011
+ };
8012
+ items: {
8013
+ name: string;
8014
+ key: string;
8015
+ quantity: number;
8016
+ }[];
8017
+ shipping_rates: {
8018
+ currency_code: string;
8019
+ currency_symbol: string;
8020
+ name: string;
8021
+ price: string;
8022
+ description: string;
8023
+ rate_id: string;
8024
+ delivery_time: string;
8025
+ instance_id: number;
8026
+ method_id: string;
8027
+ meta_data: {
8028
+ value: string;
8029
+ key: string;
8030
+ }[];
8031
+ selected: boolean;
8032
+ }[];
8033
+ }[];
8034
+ items_count: number;
8035
+ items_weight: number;
8036
+ needs_payment: boolean;
8037
+ needs_shipping: boolean;
8038
+ payment_methods: ("cod" | "monri")[];
8039
+ payment_requirements: string[];
8040
+ has_calculated_shipping: boolean;
8041
+ shipping_address: {
8042
+ first_name: string;
8043
+ last_name: string;
8044
+ company: string;
8045
+ address_1: string;
8046
+ address_2: string;
8047
+ city: string;
8048
+ state: string;
8049
+ postcode: string;
8050
+ country: string;
8051
+ phone: string;
8052
+ };
8053
+ billing_address: {
8054
+ first_name: string;
8055
+ last_name: string;
8056
+ company: string;
8057
+ address_1: string;
8058
+ address_2: string;
8059
+ city: string;
8060
+ state: string;
8061
+ postcode: string;
8062
+ country: string;
8063
+ phone: string;
8064
+ email: string | null;
8065
+ };
8066
+ coupons: {
8067
+ code: string;
8068
+ totals: {
8069
+ currency_code: string;
8070
+ currency_symbol: string;
8071
+ currency_minor_unit: number;
8072
+ currency_decimal_separator: string;
8073
+ currency_thousand_separator: string;
8074
+ currency_prefix: string;
8075
+ currency_suffix: string;
8076
+ total_discount: string;
8077
+ total_discount_tax: string;
8078
+ };
8079
+ }[];
8080
+ errors: {
8081
+ code: string;
8082
+ message: string;
8083
+ }[];
8084
+ cross_sells: unknown[];
8085
+ fees: unknown[];
8086
+ extensions?: Record<string, unknown> | undefined;
8087
+ }, Error, {
8088
+ data: Record<string, unknown>;
8089
+ namespace: string;
8090
+ }, unknown>;
7901
8091
  declare const useUpdateCustomer: () => _tanstack_react_query.UseMutationResult<{
7902
8092
  totals: {
7903
8093
  currency_code: string;
@@ -8822,4 +9012,4 @@ interface UseOrderViewReturn {
8822
9012
  }
8823
9013
  declare function useOrderView(input: GetOrderInput, options?: UseOrderViewOptions): UseOrderViewReturn;
8824
9014
 
8825
- export { useOrderView as $, type AppliedCoupon as A, getImageUrlOrPlaceholder as B, type CartTotals as C, getMaxAddToCartQuantity as D, getOrderStatusLabel as E, getPrimaryImage as F, getSizedImageUrl as G, getStockSeverity as H, type ImageSize as I, getStockStatusText as J, isLowStock as K, isPurchasable as L, preloadImage as M, preloadImages as N, unavailableReason as O, PLACEHOLDER_IMAGE_URL as P, useAddManyToCart as Q, type ReorderInputItem as R, type ShippingRate as S, useAddToCart as T, type UnavailableReason as U, useApplyCoupon as V, useCart as W, useCartView as X, useCheckout as Y, useInfiniteProducts as Z, useOrder as _, type PaymentMethod as a, useProcessCheckout as a0, useProduct as a1, useProductCategories as a2, useProductCategoryTree as a3, useProductTags as a4, useProductView as a5, useProducts as a6, useProductsFeed as a7, useRemoveCoupon as a8, useRemoveFromCart as a9, useReorderView as aa, useSelectShippingRate as ab, useStore as ac, useStoreFeatures as ad, useStoreLocale as ae, useStoreTheme as af, useUpdateCartItem as ag, useUpdateCustomer as ah, useWooCommerceClient as ai, useWooCommerceQueryKeys as aj, type InfiniteQueryOptions as ak, type MutationOptions as al, type QueryOptions as am, type ProcessedCartItem as b, type ProcessedCategory as c, type ProcessedOrderDetails as d, type ProcessedOrderLineItem as e, type ProcessedProduct as f, type ProcessedProductDetails as g, type ProductCartState as h, type ProductCategoryTreeNode as i, type ReorderItemView as j, type ReorderUnavailableReason as k, type StockDisplayConfig as l, type StockStatus as m, type UseCartViewOptions as n, type UseCartViewReturn as o, type UseOrderViewOptions as p, type UseOrderViewReturn as q, type UseProductViewOptions as r, type UseProductViewReturn as s, type UseProductsFeedOptions as t, type UseProductsFeedReturn as u, type UseReorderViewOptions as v, type UseReorderViewReturn as w, canAddToCart as x, getAllImageUrls as y, getImageUrl as z };
9015
+ export { useOrderView as $, type AppliedCoupon as A, getImageUrlOrPlaceholder as B, type CartTotals as C, getMaxAddToCartQuantity as D, getOrderStatusLabel as E, getPrimaryImage as F, getSizedImageUrl as G, getStockSeverity as H, type ImageSize as I, getStockStatusText as J, isLowStock as K, isPurchasable as L, preloadImage as M, preloadImages as N, unavailableReason as O, PLACEHOLDER_IMAGE_URL as P, useAddManyToCart as Q, type ReorderInputItem as R, type ShippingRate as S, useAddToCart as T, type UnavailableReason as U, useApplyCoupon as V, useCart as W, useCartView as X, useCheckout as Y, useInfiniteProducts as Z, useOrder as _, type PaymentMethod as a, useProcessCheckout as a0, useProduct as a1, useProductCategories as a2, useProductCategoryTree as a3, useProductTags as a4, useProductView as a5, useProducts as a6, useProductsFeed as a7, useRemoveCoupon as a8, useRemoveFromCart as a9, useReorderView as aa, useSelectShippingRate as ab, useStore as ac, useStoreFeatures as ad, useStoreLocale as ae, useStoreTheme as af, useUpdateCartExtensions as ag, useUpdateCartItem as ah, useUpdateCustomer as ai, useWooCommerceClient as aj, useWooCommerceQueryKeys as ak, type InfiniteQueryOptions as al, type MutationOptions as am, type QueryOptions as an, type ProcessedCartItem as b, type ProcessedCategory as c, type ProcessedOrderDetails as d, type ProcessedOrderLineItem as e, type ProcessedProduct as f, type ProcessedProductDetails as g, type ProductCartState as h, type ProductCategoryTreeNode as i, type ReorderItemView as j, type ReorderUnavailableReason as k, type StockDisplayConfig as l, type StockStatus as m, type UseCartViewOptions as n, type UseCartViewReturn as o, type UseOrderViewOptions as p, type UseOrderViewReturn as q, type UseProductViewOptions as r, type UseProductViewReturn as s, type UseProductsFeedOptions as t, type UseProductsFeedReturn as u, type UseReorderViewOptions as v, type UseReorderViewReturn as w, canAddToCart as x, getAllImageUrls as y, getImageUrl as z };
package/dist/index.cjs CHANGED
@@ -801,6 +801,19 @@ var useRemoveCoupon = () => {
801
801
  }
802
802
  });
803
803
  };
804
+ var useUpdateCartExtensions = () => {
805
+ const client = useWooCommerceClient();
806
+ const queryKeys = useWooCommerceQueryKeys();
807
+ const queryClient = reactQuery.useQueryClient();
808
+ return reactQuery.useMutation({
809
+ mutationKey: queryKeys.cart.mutations.updateExtensions(),
810
+ mutationFn: (input) => client.cart.updateExtensions(input),
811
+ onSuccess: (cart) => {
812
+ queryClient.setQueryData(queryKeys.cart.details(), cart);
813
+ queryClient.invalidateQueries({ queryKey: queryKeys.cart.all });
814
+ }
815
+ });
816
+ };
804
817
  var useUpdateCustomer = () => {
805
818
  const client = useWooCommerceClient();
806
819
  const queryKeys = useWooCommerceQueryKeys();
@@ -923,6 +936,7 @@ var createQueryKeys = (prefix = ["woocommerce"]) => ({
923
936
  removeItem: () => [...prefix, "cart", "mutation", "removeItem"],
924
937
  applyCoupon: () => [...prefix, "cart", "mutation", "applyCoupon"],
925
938
  removeCoupon: () => [...prefix, "cart", "mutation", "removeCoupon"],
939
+ updateExtensions: () => [...prefix, "cart", "mutation", "updateExtensions"],
926
940
  updateCustomer: () => [...prefix, "cart", "mutation", "updateCustomer"],
927
941
  selectShippingRate: () => [...prefix, "cart", "mutation", "selectShippingRate"]
928
942
  }
@@ -1936,6 +1950,7 @@ exports.useStore = useStore;
1936
1950
  exports.useStoreFeatures = useStoreFeatures;
1937
1951
  exports.useStoreLocale = useStoreLocale;
1938
1952
  exports.useStoreTheme = useStoreTheme;
1953
+ exports.useUpdateCartExtensions = useUpdateCartExtensions;
1939
1954
  exports.useUpdateCartItem = useUpdateCartItem;
1940
1955
  exports.useUpdateCustomer = useUpdateCustomer;
1941
1956
  exports.useWooCommerceClient = useWooCommerceClient;