export interface NormalizedSearchRequest {
  query: string;
  limit?: number;
  includeDomains?: string[];
  excludeDomains?: string[];
  startPublishedDate?: string;
  endPublishedDate?: string;
  category?: string;
  provider?: string;
}

export interface NormalizedSearchResult {
  id?: string;
  title: string | null;
  url: string;
  publishedDate?: string;
  author?: string;
  score?: number;
}

export interface NormalizedSearchResponse {
  providerName: string;
  requestId?: string;
  searchTime?: number;
  results: NormalizedSearchResult[];
}

export interface NormalizedFetchRequest {
  urls: string[];
  text?: boolean;
  highlights?: boolean;
  summary?: boolean;
  textMaxCharacters?: number;
  provider?: string;
}

export interface NormalizedFetchResult {
  url: string;
  title: string | null;
  text?: string;
  highlights?: string[];
  summary?: string;
  error?: string;
}

export interface NormalizedFetchResponse {
  providerName: string;
  requestIds?: string[];
  results: NormalizedFetchResult[];
}

export interface WebProvider {
  name: string;
  type: string;
  search(request: NormalizedSearchRequest): Promise<NormalizedSearchResponse>;
  fetch(request: NormalizedFetchRequest): Promise<NormalizedFetchResponse>;
}
