UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

107 lines 2.58 kB
/** * Incremental Sync Manager for Optimizely MCP Server * @description Manages incremental synchronization using change history */ import { ChangeHistoryTracker } from './ChangeHistoryTracker.js'; import { CacheManager } from '../cache/CacheManager.js'; import { SQLiteEngine } from '../storage/SQLiteEngine.js'; import { OptimizelyAPIHelper } from '../api/OptimizelyAPIHelper.js'; export interface SyncResult { projectId: string; success: boolean; changesProcessed: number; recordsUpdated: number; recordsCreated: number; recordsDeleted: number; errors: Error[]; duration: number; syncTimestamp: string; message?: string; } /** * Manages incremental synchronization of Optimizely data */ export declare class IncrementalSyncManager { private changeTracker; private cache; private storage; private api; constructor(changeTracker: ChangeHistoryTracker, cache: CacheManager, storage: SQLiteEngine, api: OptimizelyAPIHelper); /** * Gets the project type information from the database */ private getProjectType; /** * Performs incremental sync for a project */ syncProject(projectId: string): Promise<SyncResult>; /** * Syncs a single entity by fetching its latest state */ private syncSingleEntity; /** * Handles deleted or archived entities */ private handleDeletedEntity; /** * Syncs a single flag */ private syncFlag; /** * Syncs a single experiment */ private syncExperiment; /** * Syncs a single feature */ private syncFeature; /** * Syncs a single campaign */ private syncCampaign; /** * Syncs a single audience */ private syncAudience; /** * Syncs a single attribute */ private syncAttribute; /** * Syncs a single event */ private syncEvent; /** * Syncs a single page */ private syncPage; /** * Syncs a single extension */ private syncExtension; /** * Syncs a single webhook */ private syncWebhook; /** * Syncs a single list attribute */ private syncListAttribute; /** * Syncs a single environment */ private syncEnvironment; /** * Syncs a single collaborator */ private syncCollaborator; /** * Categorizes sync errors for better handling */ private categorizeError; /** * Syncs a single group */ private syncGroup; } //# sourceMappingURL=IncrementalSyncManager.d.ts.map