/** * Bulk SEO Operations * * This module provides batch processing capabilities for SEO operations, * including metadata updates, content analysis, and schema generation. * It supports chunked processing, progress tracking, retry logic, and dry-run mode. * * @since 2.7.0 */ import { WordPressClient } from "../../client/api.js"; import { SEOCacheManager } from "../../cache/SEOCacheManager.js"; import { SEOToolParams, BulkOperationResult, SEOAnalysisResult } from "../../types/seo.js"; /** * Configuration for bulk operations */ interface BulkOperationConfig { /** Number of items per batch */ batchSize: number; /** Maximum number of retry attempts */ maxRetries: number; /** Initial delay for exponential backoff (ms) */ retryDelayMs: number; /** Maximum delay for exponential backoff (ms) */ maxRetryDelayMs: number; /** Timeout per operation (ms) */ operationTimeoutMs: number; /** Enable progress callbacks */ enableProgress: boolean; } /** * Progress information for bulk operations */ interface BulkProgress { /** Total items to process */ total: number; /** Items processed so far */ processed: number; /** Items successfully completed */ completed: number; /** Items that failed */ failed: number; /** Items that were skipped */ skipped: number; /** Current batch being processed */ currentBatch: number; /** Total number of batches */ totalBatches: number; /** Estimated completion time */ eta?: Date; /** Average processing time per item (ms) */ avgProcessingTime: number; } /** * Type for progress callback function */ type ProgressCallback = (progress: BulkProgress) => void; /** * Bulk SEO Operations Manager */ export declare class BulkOperations { private client; private logger; private config; private metaGenerator; private contentAnalyzer; private cacheManager; constructor(client: WordPressClient, cacheManager?: SEOCacheManager, config?: Partial); /** * Bulk update metadata for multiple posts */ bulkUpdateMetadata(params: SEOToolParams, progressCallback?: ProgressCallback): Promise; /** * Bulk analyze content for multiple posts */ bulkAnalyzeContent(params: SEOToolParams, progressCallback?: ProgressCallback): Promise<{ results: SEOAnalysisResult[]; summary: BulkOperationResult; }>; /** * Process metadata update for a single post */ private processMetadataUpdate; /** * Process content analysis for a single post */ private processContentAnalysis; /** * Retry operation with exponential backoff */ private retryOperation; /** * Check if an error is retryable */ private isRetryableError; /** * Create batches from an array of items */ private createBatches; /** * Promise-based delay utility */ private delay; /** * Get current configuration */ getConfig(): BulkOperationConfig; /** * Update configuration */ updateConfig(config: Partial): void; } export {}; //# sourceMappingURL=BulkOperations.d.ts.map