import { MemoryDocument } from '../../domain/entities/MemoryDocument.js';
import { DocumentPath } from '../../domain/entities/DocumentPath.js';
import { Tag } from '../../domain/entities/Tag.js';
import { JsonPatchService } from '../../domain/jsonpatch/JsonPatchService.js';
import type { IDocumentRepository } from '../../domain/repositories/IDocumentRepository.js';
/**
 * Input for the DocumentWriterService write method
 */
export interface DocumentWriterInput {
    path: DocumentPath;
    content?: Record<string, unknown> | string;
    patches?: any[];
    tags?: Tag[];
}
/**
 * Service responsible for the core logic of writing/patching documents.
 */
export declare class DocumentWriterService {
    private readonly patchService;
    private readonly componentLogger;
    constructor(patchService: JsonPatchService);
    /**
     * Writes or patches a document using the provided repository.
     * Handles common logic like input validation, patch application, and content update/creation.
     * Tag indexing is expected to be handled by the repository's saveDocument implementation.
     *
     * @param repository The specific repository (Branch or Global) to use.
     * @param input The details of the document to write or patch.
     * @returns The saved MemoryDocument.
     * @throws {ApplicationError} If input is invalid, patching fails, or repository interaction fails.
     */
    write(repository: IDocumentRepository, // Assuming a common interface exists or will be created
    input: DocumentWriterInput): Promise<MemoryDocument>;
}
//# sourceMappingURL=DocumentWriterService.d.ts.map