| 19 | } |
| 20 | |
| 21 | export interface WebSearchBackend { |
| 22 | /** Human-readable backend name shown in errors / `qx doctor`. */ |
| 23 | readonly name: string; |
| 24 | /** Whether this backend needs config (api key) to function. Default false. */ |
| 25 | readonly requiresAuth: boolean; |
| 26 | |
| 27 | /** |
| 28 | * Run the search. Should throw on transport-level failure (network, parse), not on |
| 29 | * "zero results" — zero results is a valid empty array. |
| 30 | */ |
| 31 | search(query: string, opts: SearchOptions): Promise<WebSearchResult[]>; |
| 32 | } |
| 33 | |
| 34 | export interface SearchOptions { |
| 35 | /** Max results to return (backend may cap lower). */ |
no outgoing calls
no test coverage detected