/** * Shipping Rates Hook using TanStack Query * Simplified shipping rates management with automatic cache invalidation */ import { CheckoutData } from '../../core/resources/checkout'; import { ShippingRate } from '../../core/resources/shippingRates'; export interface UseShippingRatesQueryOptions { sessionId?: string; checkout?: CheckoutData; onSuccess?: () => void; enabled?: boolean; } export interface UseShippingRatesQueryResult { shippingRates: ShippingRate[] | undefined; selectedRate: ShippingRate | undefined; selectRate: (rateId: string) => Promise; isLoading: boolean; error: Error | null; clearError: () => void; refetch: () => Promise; /** Preview shipping rates for a country without updating session */ previewRates: (countryCode: string, stateCode?: string) => Promise; /** Rates from the last previewRates call */ previewedRates: ShippingRate[] | undefined; /** Loading state for previewRates */ isPreviewLoading: boolean; } export declare function useShippingRatesQuery(options?: UseShippingRatesQueryOptions): UseShippingRatesQueryResult;