/** * OpenAPI/Swagger Discovery Module (D-004 Enhanced) * * Automatically discovers OpenAPI/Swagger specifications for websites * and generates LearnedApiPattern objects from them. * * This module: * 1. Probes common OpenAPI/Swagger spec locations * 2. Parses OpenAPI 3.x and Swagger 2.x specifications with full YAML support * 3. Resolves $ref pointers for complete schema access * 4. Generates API patterns from discovered endpoints (GET, POST, PUT, DELETE) * 5. Extracts rate limit information from x-ratelimit extensions * 6. Integrates with ApiPatternRegistry for pattern storage */ import type { LearnedApiPattern, OpenAPIDiscoveryOptions, OpenAPIDiscoveryResult, OpenAPIPatternGenerationResult, ParsedOpenAPISpec } from '../types/api-patterns.js'; /** * Discover OpenAPI/Swagger specification for a domain */ export declare function discoverOpenAPI(domain: string, options?: OpenAPIDiscoveryOptions): Promise; /** * Generate LearnedApiPattern objects from an OpenAPI spec */ export declare function generatePatternsFromSpec(spec: ParsedOpenAPISpec, domain: string): OpenAPIPatternGenerationResult; /** * Get cached discovery result or discover anew * Uses unified discovery cache with tenant isolation and failed domain tracking */ export declare function discoverOpenAPICached(domain: string, options?: OpenAPIDiscoveryOptions): Promise; /** * Clear the spec cache * @param domain - Optional domain to clear, or all if not specified */ export declare function clearSpecCache(domain?: string): Promise; /** * Get cache statistics for OpenAPI discovery */ export declare function getOpenAPICacheStats(): Promise<{ size: number; domains: string[]; }>; /** * Get all generated patterns from an OpenAPI spec * This is the main entry point for pattern generation * Supports GET, POST, PUT, DELETE methods (PATCH is skipped) */ export declare function generatePatternsFromOpenAPISpec(spec: ParsedOpenAPISpec): LearnedApiPattern[]; //# sourceMappingURL=openapi-discovery.d.ts.map