@mastra/core
Version:
17 lines • 626 B
TypeScript
type ThreadSaveListener = (savedAt: number) => void;
/**
* Reports that messages of a thread were written to storage. `savedAt` is taken
* before the write, so anything produced at or before it is part of the save.
*/
export declare function noteThreadMessagesSaved(args: {
threadId: string;
resourceId?: string;
savedAt: number;
}): void;
/** Listen for saves of a thread; returns the unsubscribe function. */
export declare function onThreadMessagesSaved(args: {
threadId: string;
resourceId?: string;
}, listener: ThreadSaveListener): () => void;
export {};
//# sourceMappingURL=thread-saves.d.ts.map