import { P as PageSpeedOptions, C as Category } from './index-CBmIhSX_.js'; import { P as PerformanceResult } from './index-DuWc-W-w.js'; /** * @silverassist/performance-toolkit * * PageSpeed API client for fetching and analyzing performance data. * * @module pagespeed/client * @author Miguel Colmenares * @license PolyForm-Noncommercial-1.0.0 */ /** * PageSpeed Insights API client for fetching performance data */ declare class PageSpeedClient { private apiKey?; private timeout; /** * Creates a new PageSpeed client * @param apiKey - Optional API key for higher rate limits * @param timeout - Request timeout in milliseconds */ constructor(apiKey?: string, timeout?: number); /** * Analyzes a URL using PageSpeed Insights API * @param options - Analysis options * @returns Performance analysis result */ analyze(options: PageSpeedOptions): Promise; /** * Analyzes a URL for both mobile and desktop * @param url - URL to analyze * @param categories - Categories to analyze * @returns Object with mobile and desktop results */ analyzeAll(url: string, categories?: Category[]): Promise<{ mobile: PerformanceResult; desktop: PerformanceResult; }>; /** * Builds the PageSpeed API URL with query parameters */ private buildApiUrl; /** * Fetches URL with timeout using AbortController */ private fetchWithTimeout; /** * Transforms PageSpeed API response to PerformanceResult */ private transformResponse; } /** * Creates a configured PageSpeed client instance * @param apiKey - Optional API key * @returns Configured PageSpeedClient instance */ declare function createPageSpeedClient(apiKey?: string): PageSpeedClient; /** * Quick function to analyze a single URL * @param url - URL to analyze * @param options - Analysis options * @returns Performance result */ declare function analyzeUrl(url: string, options?: Omit): Promise; export { PageSpeedClient as P, analyzeUrl as a, createPageSpeedClient as c };