import { DataAdapter } from "./data-adapter.js"; import { Diagnostic } from "./diagnostics.js"; import { FragmentIdGenerator } from "./fragment-id-generator.js"; import { Manifest } from "./manifest.js"; import { DiscardObsoleteFragmentType } from "./obsolete-handling.js"; import { LocaleData } from "./runtime/locale-data.js"; import type { Source } from "./source.js"; export declare class DataProcessor { #private; constructor(options: DataProcessor.Options); get dataAdapter(): DataAdapter; /** * Get a source instance for the specified source id. */ getSource(sourceId: string): Source | undefined; /** * Apply updates from disk to the project. */ applyUpdate(update: DataProcessor.Update): DataProcessor.UpdateResult; getFragmentDiagnostics(options: DataProcessor.DiagnosticOptions): Diagnostic[]; generateLocaleData(options: DataProcessor.GenerateLocateDataOptions): Map; generateManifest(options: DataProcessor.GenerateManifestOptions): Manifest; } export declare namespace DataProcessor { interface Options { /** * The data adapter to use. */ dataAdapter: DataAdapter; /** * The fragment id generator to use. * * By default, a new `Base62FragmentIdGenerator` instance is used. */ fragmentIdGenerator?: FragmentIdGenerator; } interface Update { /** Map of source ids to new sources or sources that have been updated on disk */ updatedSources?: Map; /** Set of source ids that have been removed from disk */ removedSources?: Set; /** True to allow modifying sources */ modify?: boolean; /** How to handle discarding obsolete fragments */ discardObsolete?: DiscardObsoleteFragmentType; } interface UpdateResult { /** Map of source ids to update results where the source is modified */ modifiedSources: Map; } interface DiagnosticOptions { sourceLocale: string; translatedLocales: string[]; } interface GenerateLocateDataOptions { namespace: string; sourceLocale: string; translatedLocales: string[]; includeOutdated: boolean; } interface GenerateManifestOptions { /** The project namespace. */ namespace: string; /** The absolute manifest filename. */ manifestFilename: string; /** Map of locale codes to absolute output locale data filenames. */ localeDataFilenames: Map; } }