/** * Prisma-backed memory store (PostgreSQL). * Import from '@hazeljs/memory/prisma' when you want DB persistence with Prisma. */ /** Minimal Prisma client shape for memory (avoids importing generated client in this file). */ export interface MemoryPrismaClient { memoryItem: { upsert(args: { where: { id: string; }; create: object; update: object; }): Promise; findUnique(args: { where: { id: string; }; }): Promise; findMany(args: { where?: object; orderBy?: object; take?: number; skip?: number; }): Promise; update(args: { where: { id: string; }; data: object; }): Promise; delete(args: { where: { id: string; }; }): Promise; deleteMany(args: { where: object; }): Promise<{ count: number; }>; groupBy(args: { by: string[]; where?: object; _count?: object; }): Promise; aggregate(args: { where?: object; _min?: object; _max?: object; }): Promise<{ _min: { updatedAt: Date | null; }; _max: { updatedAt: Date | null; }; }>; }; $connect(): Promise; $disconnect(): Promise; } import { MemoryItem } from '../../types/memory-item.types'; import { MemoryQuery, MemoryStats, PruneOptions } from '../../types/store.types'; import { MemoryStore } from '../memory-store.interface'; export interface PrismaMemoryStoreOptions { /** Prisma client (with memory schema applied). */ prisma: MemoryPrismaClient; } /** * PostgreSQL-backed memory store using Prisma (same pattern as @hazeljs/flow). * Run migrations with: pnpm prisma migrate dev (from packages/memory). */ export declare class PrismaMemoryStore implements MemoryStore { private readonly prisma; constructor(prisma: MemoryPrismaClient); initialize(): Promise; save(item: MemoryItem): Promise; saveBatch(items: MemoryItem[]): Promise; get(id: string): Promise; update(id: string, updates: Partial): Promise; delete(id: string): Promise; deleteBatch(ids: string[]): Promise; query(options: MemoryQuery): Promise; getStats(userId?: string): Promise; prune(options?: PruneOptions): Promise; } //# sourceMappingURL=prisma.store.d.ts.map