@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
31 lines • 1.74 kB
TypeScript
import type { StoragePromptBlockType, StorageCreatePromptBlockInput, StorageUpdatePromptBlockInput, StorageListPromptBlocksInput, StorageListPromptBlocksOutput } from '../../types.js';
import type { InMemoryDB } from '../inmemory-db.js';
import type { PromptBlockVersion, CreatePromptBlockVersionInput, ListPromptBlockVersionsInput, ListPromptBlockVersionsOutput } from './base.js';
import { PromptBlocksStorage } from './base.js';
export declare class InMemoryPromptBlocksStorage extends PromptBlocksStorage {
private db;
constructor({ db }: {
db: InMemoryDB;
});
dangerouslyClearAll(): Promise<void>;
getById(id: string): Promise<StoragePromptBlockType | null>;
create(input: {
promptBlock: StorageCreatePromptBlockInput;
}): Promise<StoragePromptBlockType>;
update(input: StorageUpdatePromptBlockInput): Promise<StoragePromptBlockType>;
delete(id: string): Promise<void>;
list(args?: StorageListPromptBlocksInput): Promise<StorageListPromptBlocksOutput>;
createVersion(input: CreatePromptBlockVersionInput): Promise<PromptBlockVersion>;
getVersion(id: string): Promise<PromptBlockVersion | null>;
getVersionByNumber(blockId: string, versionNumber: number): Promise<PromptBlockVersion | null>;
getLatestVersion(blockId: string): Promise<PromptBlockVersion | null>;
listVersions(input: ListPromptBlockVersionsInput): Promise<ListPromptBlockVersionsOutput>;
deleteVersion(id: string): Promise<void>;
deleteVersionsByParentId(entityId: string): Promise<void>;
countVersions(blockId: string): Promise<number>;
private deepCopyBlock;
private deepCopyVersion;
private sortBlocks;
private sortVersions;
}
//# sourceMappingURL=inmemory.d.ts.map