mcp-memory-ts
Version:
Cloud-based vector MCP memory service for Claude.ai - TypeScript implementation
28 lines • 1.43 kB
TypeScript
/**
* Database operations for CRUD functionality
*/
import type { DatabaseConnection } from './connection.js';
import type { User, Entity, Memory } from '../types/base.js';
export declare class DatabaseOperations {
private db;
constructor(db: DatabaseConnection);
createUser(user: User): Promise<User>;
getUserById(id: string): Promise<User | null>;
getUserByEmail(email: string): Promise<User | null>;
getUserByApiKey(apiKey: string): Promise<User | null>;
updateUser(id: string, updates: Partial<User>): Promise<User | null>;
deleteUser(id: string): Promise<boolean>;
createEntity(entity: Omit<Entity, 'id'>): Promise<Entity>;
getEntityById(id: number | string, userId: string): Promise<Entity | null>;
getEntitiesByUserId(userId: string, limit?: number): Promise<Entity[]>;
searchEntities(userId: string, query: string, limit?: number): Promise<Entity[]>;
updateEntity(id: string, updates: Partial<Entity>, userId: string): Promise<Entity | null>;
createMemory(memory: Omit<Memory, 'id'>): Promise<Memory>;
getMemoryById(id: number | string, userId: string): Promise<Memory | null>;
getMemoriesByUserId(userId: string, limit?: number): Promise<Memory[]>;
searchMemories(userId: string, query: string, limit?: number): Promise<Memory[]>;
private mapRowToUser;
private mapRowToEntity;
private mapRowToMemory;
}
//# sourceMappingURL=operations.d.ts.map