import type { TranslationBundle } from '../../i18n/translation-store.js'; import type { ApiDocument } from '../api-document.js'; export interface ExtractTranslationsResult { /** The skeleton, shaped exactly like the schema tree and pre-filled with * the texts written in the source — so a first extraction produces a * ready-to-translate file rather than an empty one, and moving texts out * of the source can be done gradually. */ bundle: TranslationBundle; /** Keys whose last segment isn't a stable identifier (a RegExp-named * parameter, an example's position, a server's environment-dependent * url). Each of these should be given a `docKey`, or its translation * will silently detach the next time the declaration moves. */ unstable: string[]; /** Keys present in `existing` that the document no longer asks for — * renamed or removed declarations, or typos. Reported *and* kept in the * written bundle: deleting someone's translation is their call. */ orphans: string[]; } /** * Walks `document` and returns every documentation key it would look up. * * Deliberately implemented by running the document's *own* `export()` in * collect mode rather than by re-walking the model here: the extractor and * the runtime lookup then share one traversal and one whitelist, so a * skeleton can never list a key the server doesn't ask for (or miss one it * does). * * Note that `docKey` only exists on a document built from its own source — * a document reconstructed from a served schema has none (it's never * exported), so extracting from a URL yields unstable keys wherever one * would have been needed. * * @param document - The document to extract from. * @param existing - A previously translated bundle, whose texts are kept * as-is; only missing keys are filled in from the source. */ export declare function extractTranslations(document: ApiDocument, existing?: TranslationBundle): ExtractTranslationsResult;