/**
 * ImportState - State persistence for resumable imports
 *
 * Features:
 * - Save/load import progress
 * - 24-hour TTL for stale state cleanup
 * - Error tracking for retry logic
 *
 * @module core/progress/import-state
 */
/**
 * Import error record
 */
export interface ImportError {
    /** Item identifier (e.g., project key) */
    id: string;
    /** Error message */
    error: string;
    /** Timestamp when error occurred */
    timestamp: number;
}
/**
 * Import state structure
 */
export interface ImportState {
    /** Total number of items to import */
    total: number;
    /** Number of items completed (success + failed) */
    completed: number;
    /** Number of successful imports */
    succeeded: number;
    /** Number of failed imports */
    failed: number;
    /** Array of import errors */
    errors: ImportError[];
    /** Timestamp when state was saved */
    timestamp: number;
    /** Whether import was canceled by user */
    canceled: boolean;
    /** Optional: Last successfully processed item ID */
    lastProcessedId?: string;
}
/**
 * Save import state to disk
 *
 * @param state Import state to save
 * @param projectRoot Project root directory
 */
export declare function saveImportState(state: ImportState, projectRoot?: string): Promise<void>;
/**
 * Load import state from disk with TTL validation
 *
 * @param projectRoot Project root directory
 * @param ttlMs Time-to-live in milliseconds (default: 24 hours)
 * @returns Import state if valid, null if expired or missing
 */
export declare function loadImportState(projectRoot?: string, ttlMs?: number): Promise<ImportState | null>;
/**
 * Delete import state file
 *
 * @param projectRoot Project root directory
 */
export declare function deleteImportState(projectRoot?: string): Promise<void>;
/**
 * Check if import state exists (without loading)
 *
 * @param projectRoot Project root directory
 * @returns true if state file exists
 */
export declare function hasImportState(projectRoot?: string): boolean;
//# sourceMappingURL=import-state.d.ts.map