/** * BulkImporter — 知识库批量导入 * * FR-X04: * - AC1: 导入前校验格式版本兼容性 * - AC2: 逐条冲突检测,冲突条目标记 pending 待人工裁决 * - AC3: 导入完成后生成导入报告 * - AC4: 支持 dry-run 模式 */ import type { KnowledgeEntry } from '../types/index.js'; import type { ExportPackage } from '../bulk-export/bulk-export-types.js'; import type { ImportReport, ImportOptions, ImportValidationResult } from './bulk-import-types.js'; export interface BulkImportTarget { /** 检查条目是否已存在(按 ID) */ exists(id: string): Promise; /** 保存条目 */ save(entry: KnowledgeEntry): Promise; } export declare class BulkImporter { private readonly target; constructor(target: BulkImportTarget); /** * AC1: 校验导入包格式版本兼容性 */ validateFormat(pkg: ExportPackage): ImportValidationResult; /** * 执行批量导入 * AC2: 逐条冲突检测 * AC3: 生成导入报告 * AC4: 支持 dry-run */ import(pkg: ExportPackage, options?: ImportOptions): Promise; /** * 从 JSON 字符串解析并导入 */ importFromJson(json: string, options?: ImportOptions): Promise; } //# sourceMappingURL=bulk-importer.d.ts.map