/** Raw Aura response observed for a single article page load. */ export type AuraArticleResponse = { status: number; body: string; }; /** * Close the lazily-launched shared Chromium instance, if one was started. * * A `fetch-refs` run may resolve several help-article references in one * process lifetime; launching a new browser per call would be needlessly * slow, so {@link getBrowser} launches once and this function is the * corresponding graceful-shutdown / test-cleanup hook — mirroring * `ReleaseNoteBrowserAdapter.close()` in `release-note-collector.ts`, which * closes a browser scoped to one collection run rather than the module. */ export declare function closeHelpArticleBrowser(): Promise; /** * Drives a real page load for `articleId` and returns the raw Aura response * observed for the article-data request, or `null` on a timeout/browser * error. Never throws. */ declare function fetchAuraResponse(articleId: string, signal?: AbortSignal): Promise; /** * Test-only seam: swap `fetchAuraResponse` for a stub returning a canned * response, so {@link extractArticleContent}'s parsing contract can be * exercised without launching a real browser. Mirrors the `docFetchProvider` * pattern in `secure-fetch.ts` — an ESM named export binding cannot be * stubbed directly under the ts-node/esm loader, but a mutable object * property can. */ export declare const auraFetchProvider: { fetchAuraResponse: typeof fetchAuraResponse; }; /** Clear the in-process content cache. Test-only helper; not part of the public flow. */ export declare function clearHelpArticleCache(): void; /** * Resolve the full DITA/XML article body for a `help.salesforce.com` article * id — the `id=` query value minus its trailing `.htm`, WITH its namespace * prefix (`ind.`, `sf.`, …) intact. This is the same convention * {@link deriveWebReferenceFilename} in `pdf-registry.ts` already reads * verbatim off the `id` param, so a registry entry's `helpArticleId` and its * `url`'s `id=` value are always the identical string. * * Returns the raw `Content__c` body (DITA/XML — feed it to * {@link extractHtmlToMarkdown} same as Atlas content), or `null` when the * article id doesn't resolve (`NotFound`), on a timeout, or on any * browser/network/parse error. Results (including `null`) are cached * in-process for the module lifetime. * * Never throws. */ export declare function resolveHelpArticleContent(articleId: string, signal?: AbortSignal): Promise; /** * Pure extraction of the article body from an observed Aura response. * Exported so the parsing contract can be unit-tested directly, independent * of the browser layer. Returns `null` for a non-2xx status, an * empty/unparseable body, a failed Aura action, or a `{"type":"NotFound"}` * `returnValue` (the confirmed shape for a nonexistent article id). */ export declare function extractArticleContent(response: AuraArticleResponse): string | null; export {};