@mastra/core
Version:
The core foundation of the Mastra framework, providing essential components and interfaces for building AI-powered applications.
35 lines • 1.35 kB
TypeScript
import type { WorkflowRunState } from '../../../workflows';
import type { StorageWorkflowRun, WorkflowRun, WorkflowRuns } from '../../types';
import type { StoreOperations } from '../operations';
import { WorkflowsStorage } from './base';
export type InMemoryWorkflows = Map<string, StorageWorkflowRun>;
export declare class WorkflowsInMemory extends WorkflowsStorage {
operations: StoreOperations;
collection: InMemoryWorkflows;
constructor({ collection, operations }: {
collection: InMemoryWorkflows;
operations: StoreOperations;
});
persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
workflowName: string;
runId: string;
snapshot: WorkflowRunState;
}): Promise<void>;
loadWorkflowSnapshot({ workflowName, runId, }: {
workflowName: string;
runId: string;
}): Promise<WorkflowRunState | null>;
getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
workflowName?: string;
fromDate?: Date;
toDate?: Date;
limit?: number;
offset?: number;
resourceId?: string;
}): Promise<WorkflowRuns>;
getWorkflowRunById({ runId, workflowName, }: {
runId: string;
workflowName?: string;
}): Promise<WorkflowRun | null>;
}
//# sourceMappingURL=inmemory.d.ts.map