export type SyncStatus = 'completed' | 'running' | 'failed' | 'pending' | 'resolved' | 'unresolved';
export type SyncDirection = 'push' | 'pull' | 'bidirectional';
export type SyncConflictType = 'data_mismatch' | 'version_conflict' | 'merge_conflict' | 'validation_error';
export interface SyncStats {
    totalOperations: number;
    activeOperations: number;
    completed: number;
    running: number;
    failed: number;
    pending: number;
    successRate: number;
    unresolvedConflicts: number;
    pushCount: number;
    pullCount: number;
    bidirectionalCount: number;
    averageDuration: number;
}
export interface SyncOperationStats {
    itemsProcessed: number;
    itemsSucceeded: number;
    itemsFailed: number;
    startTime: string;
    endTime?: string;
    duration: number;
}
export interface SyncOperation {
    id: string;
    configId: string;
    status: SyncStatus;
    direction: SyncDirection;
    startedAt: string;
    endedAt?: string;
    duration: number;
    error?: string;
    stats: SyncOperationStats;
    options?: Record<string, unknown>;
}
export interface SyncConflict {
    id: string;
    configId: string;
    type: SyncConflictType;
    status: SyncStatus;
    sourceData: Record<string, unknown>;
    targetData: Record<string, unknown>;
    createdAt: string;
    resolvedAt?: string;
    resolutionStrategy?: string;
    resolutionData?: Record<string, unknown>;
    error?: string;
}
export interface SyncConfig {
    id: string;
    name: string;
    description?: string;
    sourceEndpoint: string;
    targetEndpoint: string;
    direction: SyncDirection;
    schedule?: string;
    options?: {
        batchSize?: number;
        retryAttempts?: number;
        retryDelay?: number;
        timeout?: number;
        validationRules?: Record<string, unknown>;
        transformationRules?: Record<string, unknown>;
    };
    status: SyncStatus;
    createdAt: string;
    updatedAt: string;
}
export interface TriggerSyncResponse {
    configId: string;
    operationId: string;
    status: SyncStatus;
    startedAt: string;
}
export interface ResolveConflictRequest {
    conflictId: string;
    strategy: 'source' | 'target' | 'merge' | 'custom';
    customResolution?: string;
}
export interface ResolveConflictResponse {
    conflictId: string;
    status: SyncStatus;
    resolvedAt: string;
    resolutionStrategy: string;
    resolutionData?: Record<string, unknown>;
}
export interface SyncApiError {
    code: string;
    message: string;
    details?: Record<string, unknown>;
}
export interface SyncApiResponse<T> {
    data: T;
    error?: SyncApiError;
    meta?: {
        page?: number;
        pageSize?: number;
        total?: number;
    };
}
/**
 * Sync Intelligence Types
 */
export interface SyncIntelligenceData {
    health_score: number;
    health_trend: 'up' | 'down' | 'stable';
    health_trend_description: string;
    prediction_accuracy: number;
    healing_success_rate: number;
    patterns: {
        temporal: Array<{
            timestamp: string;
            operations: number;
            success_rate: number;
        }>;
        performance: {
            average_duration: number;
            success_rate: number;
            conflict_rate: number;
        };
        error: Record<string, {
            count: number;
            percentage: number;
        }>;
    };
    healing_strategies: HealingStrategy[];
}
export interface SyncPrediction {
    conflicts: Array<{
        type: string;
        probability: number;
        impact: 'high' | 'medium' | 'low';
        mitigation: string;
    }>;
    performance: {
        expected_success_rate: number;
        expected_duration: number;
        trend: 'up' | 'down' | 'stable';
        trend_description: string;
        sample_size: number;
    };
}
export interface SyncSchedule {
    recommendations: Array<{
        time: string;
        frequency: string;
        expected_success_rate: number;
        confidence: number;
        basis: string[];
    }>;
    current_schedule: {
        next_run: string;
        frequency: string;
        last_run: string;
        status: 'active' | 'paused' | 'error';
    };
}
export interface HealingStrategy {
    operation_id: string;
    type: 'retry' | 'transform' | 'validate' | 'update_config';
    success_rate: number;
    confidence: number;
    actions: Array<{
        type: string;
        description: string;
        parameters?: Record<string, any>;
    }>;
    created_at: string;
    updated_at: string;
}
export interface SyncPattern {
    type: string;
    frequency: number;
    confidence: number;
    impact: 'high' | 'medium' | 'low';
    recommendations: string[];
}
export interface SyncMetrics {
    performance: {
        average_duration: number;
        success_rate: number;
        conflict_rate: number;
        error_rate: number;
        throughput: number;
    };
    resources: {
        cpu_usage: number;
        memory_usage: number;
        network_usage: number;
        disk_usage: number;
    };
    quality: {
        data_accuracy: number;
        data_completeness: number;
        data_consistency: number;
        data_timeliness: number;
    };
}
export interface SyncSecurity {
    vulnerabilities: Array<{
        type: string;
        severity: 'critical' | 'high' | 'medium' | 'low';
        description: string;
        recommendation: string;
    }>;
    compliance: {
        status: 'compliant' | 'non_compliant' | 'partial';
        issues: Array<{
            type: string;
            description: string;
            resolution: string;
        }>;
    };
    audit: {
        last_review: string;
        findings: Array<{
            type: string;
            severity: 'critical' | 'high' | 'medium' | 'low';
            description: string;
            status: 'open' | 'resolved' | 'in_progress';
        }>;
    };
}
export interface SyncEndpointHealth {
    status: 'healthy' | 'degraded' | 'unhealthy';
    latency: number;
    availability: number;
    errors: Array<{
        type: string;
        count: number;
        last_occurrence: string;
    }>;
    last_check: string;
}
export interface SyncDataQuality {
    metrics: {
        accuracy: number;
        completeness: number;
        consistency: number;
        timeliness: number;
        validity: number;
    };
    issues: Array<{
        type: string;
        severity: 'critical' | 'high' | 'medium' | 'low';
        description: string;
        affected_items: number;
        resolution: string;
    }>;
    last_assessment: string;
}
export interface SyncCompliance {
    status: 'compliant' | 'non_compliant' | 'partial';
    standards: Array<{
        name: string;
        status: 'compliant' | 'non_compliant' | 'partial';
        requirements: Array<{
            id: string;
            description: string;
            status: 'compliant' | 'non_compliant' | 'partial';
            evidence: string;
        }>;
    }>;
    last_audit: string;
    next_audit: string;
}
export interface SyncAuditLog {
    id: string;
    timestamp: string;
    type: string;
    user: string;
    action: string;
    details: Record<string, any>;
    status: 'success' | 'failure' | 'warning';
    metadata: {
        ip_address: string;
        user_agent: string;
        session_id: string;
    };
}
//# sourceMappingURL=sync.d.ts.map