/** * State Store for SolidWorks MCP Server * Manages resource states and provides persistence */ import { ResourceState, ResourceStatus } from '../resources/base.js'; export interface StateSnapshot { version: string; timestamp: string; resources: Map; metadata: { totalResources: number; byType: Record; byStatus: Record; }; } export declare class ResourceStateStore { private resources; private stateFilePath; private autoSave; private saveInterval; constructor(stateFilePath?: string, autoSave?: boolean); /** * Add or update a resource state */ setState(resourceId: string, state: ResourceState): Promise; /** * Get a resource state by ID */ getState(resourceId: string): ResourceState | undefined; /** * Get all resource states */ getAllStates(): ResourceState[]; /** * Get states by type */ getStatesByType(type: string): ResourceState[]; /** * Get states by status */ getStatesByStatus(status: ResourceStatus): ResourceState[]; /** * Remove a resource state */ removeState(resourceId: string): Promise; /** * Clear all states */ clear(): Promise; /** * Save state to file */ save(): Promise; /** * Load state from file */ load(): Promise; /** * Create a state snapshot */ createSnapshot(): StateSnapshot; /** * Start auto-save interval */ private startAutoSave; /** * Stop auto-save interval */ stopAutoSave(): void; /** * Get statistics about stored states */ getStatistics(): Record; /** * Get the oldest resource */ private getOldestResource; /** * Get the newest resource */ private getNewestResource; /** * Query states with filters */ queryStates(filters: { type?: string; status?: ResourceStatus; tags?: Record; createdAfter?: string; createdBefore?: string; }): ResourceState[]; /** * Export states to JSON */ exportToJSON(filePath: string): Promise; /** * Import states from JSON */ importFromJSON(filePath: string): Promise; } //# sourceMappingURL=store.d.ts.map