import type { ICredentialDataDecryptedObject } from 'n8n-workflow'; export interface SearchResult { title: string; url: string; snippet: string; source?: string; publishedDate?: string; } export interface SearchResponse { success: boolean; results: SearchResult[]; provider: string; error?: string; meta?: { totalResults?: number; searchTime?: number; query?: string; }; } export interface SearchOptions { maxResults: number; region: string; language: string; safeSearch: boolean; timeRange: 'day' | 'week' | 'month' | 'year' | 'all'; } export interface ValidationConfig { minResults: number; requireTitle: boolean; requireSnippet: boolean; requireUrl: boolean; minSnippetLength: number; } export interface ValidationResult { valid: boolean; reason?: string; } export interface SearchProvider { name: string; search(query: string, options: SearchOptions, credentials: ICredentialDataDecryptedObject): Promise; isConfigured(credentials: ICredentialDataDecryptedObject): boolean; } export interface ProviderConfig { name: string; requiresKey: boolean; keyField: string | null; description: string; } export type ProviderRegistry = Record; export interface WebSearchCredentials { tavilyApiKey?: string; serperApiKey?: string; exaApiKey?: string; googleCseApiKey?: string; googleCseId?: string; braveApiKey?: string; serpApiKey?: string; enableDuckDuckGo?: boolean; }