/** * WooCommerce Handler * * Extracts product data from WooCommerce-powered WordPress stores. * Uses the WooCommerce Store API which provides unauthenticated public access. * * API Reference: * - Store API: /wp-json/wc/store/v1/products (public, no auth required) * - Single product: /wp-json/wc/store/v1/products/ * * URL Patterns: * - /product/ * - /shop/ (product listing) * - /product-category// * - /?product= * * Detection Methods: * - Check for WooCommerce REST API endpoint * - Look for wc-blocks script in HTML * - Check for WooCommerce meta tags */ import { BaseSiteHandler, type SiteHandlerResult, type FetchFunction, type SiteHandlerOptions } from './types.js'; export declare class WooCommerceHandler extends BaseSiteHandler { name: string; strategy: "api:woocommerce"; /** * Check if URL might be a WooCommerce store * We can't know for sure without probing the API */ canHandle(url: string): boolean; /** * Extract product data from WooCommerce store */ extract(url: string, fetchFn: FetchFunction, _options: SiteHandlerOptions): Promise; /** * Verify this is a WooCommerce site by checking the Store API */ private verifyWooCommerce; /** * Extract product slug from URL path */ private extractProductSlug; /** * Extract a single product by slug */ private extractProductBySlug; /** * Extract product list */ private extractProductList; /** * Normalize WooCommerce product to our standard format */ private normalizeProduct; /** * Strip HTML tags from content */ private stripHtml; /** * Format price with currency */ private formatPrice; /** * Build result for single product */ private buildProductResult; /** * Build result for product list */ private buildProductListResult; /** * Convert markdown to plain text */ private markdownToText; } export declare const woocommerceHandler: WooCommerceHandler; //# sourceMappingURL=woocommerce-handler.d.ts.map