@memory-bank/mcp
Version:
Memory-enabled Co-Pilot (MCP) server for managing project documentation and context
93 lines • 2.46 kB
TypeScript
import type { IJsonDocumentRepository } from '../../../domain/repositories/IJsonDocumentRepository.js';
import type { IUseCase } from '../../interfaces/IUseCase.js';
/**
* Input data for read JSON document use case
*/
export interface ReadJsonDocumentInput {
/**
* Branch name (if reading from branch memory bank)
*/
branchName?: string;
/**
* Document path (either path or id must be provided)
*/
path?: string;
/**
* Document ID (either path or id must be provided)
*/
id?: string;
}
/**
* Output data for read JSON document use case
*/
export interface ReadJsonDocumentOutput {
/**
* Document data
*/
document: {
/**
* Document ID
*/
id: string;
/**
* Document path
*/
path: string;
/**
* Document title
*/
title: string;
/**
* Document type
*/
documentType: import('../../../domain/entities/JsonDocument.js').DocumentType;
/**
* Document tags
*/
tags: string[];
/**
* Document content (generic record)
*/
content: Record<string, unknown>;
/**
* Last modified date (ISO string)
*/
lastModified: string;
/**
* Created date (ISO string)
*/
createdAt: string;
/**
* Document version
*/
version: number;
/**
* Branch name (if available)
*/
branch?: string;
};
/**
* Location where document was found (branch name or "global")
*/
location: string;
}
/**
* Use case for reading a JSON document
*/
export declare class ReadJsonDocumentUseCase implements IUseCase<ReadJsonDocumentInput, ReadJsonDocumentOutput> {
private readonly jsonRepository;
private readonly globalRepository?;
/**
* Constructor
* @param jsonRepository JSON document repository
* @param globalRepository Global JSON document repository (optional)
*/
constructor(jsonRepository: IJsonDocumentRepository, globalRepository?: IJsonDocumentRepository | undefined);
/**
* Execute the use case
* @param input Input data
* @returns Promise resolving to output data
*/
execute(input: ReadJsonDocumentInput): Promise<ReadJsonDocumentOutput>;
}
//# sourceMappingURL=ReadJsonDocumentUseCase.d.ts.map