/** Injectable transport dependencies (fetch, timers, env). */ export interface YouTransportDeps { readonly fetch?: typeof fetch; readonly setTimeout?: typeof setTimeout; readonly clearTimeout?: typeof clearTimeout; readonly env?: NodeJS.ProcessEnv; } /** * Provider-native search request body fields (You.com API field names, * snake_case). The Adapter maps the Provider-neutral `SearchControls` * into these before calling {@link fetchYouSearch}; the transport never * imports a capability contract. */ export interface YouSearchWireRequest { readonly query: string; readonly count?: number; readonly country?: string; readonly freshness?: "day" | "week" | "month" | "year"; readonly include_domains?: readonly string[]; readonly exclude_domains?: readonly string[]; readonly extraction?: { readonly extraction_mode?: "highlights" | "full_page"; }; } /** * Provider-native contents request body fields (You.com API field * names, snake_case). The Adapter wraps the Reader request URL into * `urls: [url]` and always requests the `markdown` format before * calling {@link fetchYouContents}; the transport never imports a * capability contract. */ export interface YouContentsWireRequest { readonly urls: readonly string[]; readonly formats?: readonly ("markdown" | "html" | "metadata")[]; readonly crawl_timeout?: number; readonly max_age?: number; } /** * One page entry from a `/contents` response. The Adapter normalizes * the matching entry into a `ReaderFetchResult`; a null `markdown` * means the page failed to scrape (anti-bot, paywall, 404) and is a * terminal `ApiError`, never an empty-content success. */ export interface YouContentsPageResult { readonly url?: string; readonly title?: string | null; readonly markdown?: string | null; readonly html?: string | null; readonly status?: number; } /** * Provider-native research request body fields (You.com API field * names, snake_case). The Adapter maps the Provider-neutral * `ResearchRequest` into these before calling {@link fetchYouResearch}; * `research_effort` is the You.com-native model tier (`mini` → * `lite`, `auto` → `standard`, `pro` → `deep`). */ export interface YouResearchWireRequest { readonly input: string; readonly research_effort?: "lite" | "standard" | "deep" | "exhaustive" | "frontier"; readonly background?: boolean; readonly source_control?: { readonly include_domains?: readonly string[]; readonly exclude_domains?: readonly string[]; readonly freshness?: string; }; } /** * Perform ONE POST against the You.com /v1/search endpoint. No retry; * no response body in public errors. Returns the parsed JSON body * (raw; the Adapter normalizes it into normalized search sources). * * `request` carries You.com-native API fields (snake_case) already * mapped from `SearchControls` by the Adapter. */ export declare function fetchYouSearch(apiKey: string, request: YouSearchWireRequest, deps?: YouTransportDeps): Promise; /** * Perform ONE POST against the You.com /v1/contents endpoint (index * host). No retry; no response body in public errors. Returns the * parsed JSON body (raw; the Adapter normalizes the matching entry * into a `ReaderFetchResult`). */ export declare function fetchYouContents(apiKey: string, request: YouContentsWireRequest, deps?: YouTransportDeps): Promise; /** * Resolve effective timeout for You.com research requests from environment or default. */ export declare function resolveResearchTimeoutMs(env?: NodeJS.ProcessEnv): number; /** * Perform ONE POST against the You.com /v1/research endpoint (api.you.com * host). No retry; no response body in public errors. Returns the parsed * JSON body (raw; the Adapter normalizes it into a `ResearchResult`). * * Shared execution wraps research invocations with `maxRetries: 0` * (double-charge prevention on a usage-based endpoint), so a transient * POST failure is terminal; the transport performs exactly one attempt. */ export declare function fetchYouResearch(apiKey: string, request: YouResearchWireRequest, deps?: YouTransportDeps, timeoutMsOverride?: number): Promise; //# sourceMappingURL=client.d.ts.map