/** * Fetch wrapper with certificate verification debugging * Provides detailed error information for TLS/certificate issues * * By default, allows self-signed certificates for testing/development * but tracks warnings for display in test results. */ export interface FetchDebugOptions extends RequestInit { /** * Enable detailed debugging output for certificate verification * Default: true if DEBUG_CERTS environment variable is set */ debugCerts?: boolean; /** * Custom label for debug output (helps identify which request failed) */ debugLabel?: string; } export interface CertificateWarning { type: 'self-signed' | 'expired' | 'not-yet-valid' | 'hostname-mismatch' | 'untrusted-ca'; message: string; hostname: string; issuer?: string; subject?: string; validFrom?: string; validTo?: string; } /** * Get all certificate warnings collected during fetch operations */ export declare function getCertificateWarnings(): CertificateWarning[]; /** * Clear all certificate warnings */ export declare function clearCertificateWarnings(): void; /** * Enhanced fetch with certificate debugging * * When certificate verification fails, this wrapper provides detailed debugging info: * - Certificate details (subject, issuer, valid dates) * - Error code and reason * - Suggestions for resolution * * @param url - URL to fetch * @param options - Fetch options with optional debugging flags * @returns Fetch response */ export declare function fetchWithDebug(url: string | URL, options?: FetchDebugOptions): Promise; /** * Enable certificate debugging for all requests */ export declare function enableCertificateDebugging(): void; /** * Disable certificate debugging */ export declare function disableCertificateDebugging(): void; //# sourceMappingURL=fetch-with-debug.d.ts.map