/**
 * GDPR Cross-Border Data Transfer Controls
 * Implements Chapter V GDPR compliance for international data transfers
 */
export interface DataTransfer {
    id: string;
    sourceCountry: string;
    sourceRegion?: string;
    destinationCountry: string;
    destinationRegion?: string;
    dataCategories: DataCategory[];
    dataSubjectCount?: number;
    volumeBytes?: number;
    recipientName: string;
    recipientType: RecipientType;
    purpose: string;
    legalBasis?: TransferLegalBasis;
    sccModules?: SCCModule[];
    supplementaryMeasures?: SupplementaryMeasure[];
    encryptionLevel?: EncryptionLevel;
    timestamp: Date;
    expiresAt?: Date;
    metadata?: Record<string, unknown>;
}
export type DataCategory = 'personal_data' | 'special_category' | 'health_data' | 'biometric_data' | 'genetic_data' | 'political_opinions' | 'religious_beliefs' | 'trade_union_membership' | 'sexual_orientation' | 'criminal_data' | 'financial_data' | 'location_data' | 'communications_data' | 'children_data';
export type RecipientType = 'controller' | 'processor' | 'sub_processor' | 'joint_controller' | 'international_organization';
export type TransferLegalBasis = 'adequacy_decision' | 'standard_contractual_clauses' | 'binding_corporate_rules' | 'explicit_consent' | 'contract_necessity' | 'public_interest' | 'legal_claims' | 'vital_interests' | 'public_register';
export type SCCModule = 'module_1_c2c' | 'module_2_c2p' | 'module_3_p2p' | 'module_4_p2c';
export type SupplementaryMeasure = 'encryption_in_transit' | 'encryption_at_rest' | 'pseudonymization' | 'data_minimization' | 'access_controls' | 'audit_logging' | 'contractual_restrictions' | 'split_processing' | 'zero_knowledge_encryption';
export type EncryptionLevel = 'none' | 'standard' | 'enhanced' | 'zero_knowledge';
export interface TransferDecision {
    allowed: boolean;
    legalBasis?: TransferLegalBasis;
    requiresSCCs: boolean;
    requiredModules?: SCCModule[];
    requiresTIA: boolean;
    requiredSupplementaryMeasures: SupplementaryMeasure[];
    minimumEncryptionLevel: EncryptionLevel;
    warnings: string[];
    blockers: string[];
    expiresAt?: Date;
    conditions?: string[];
}
export interface TransferFilter {
    sourceCountry?: string;
    destinationCountry?: string;
    dataCategories?: DataCategory[];
    recipientName?: string;
    recipientType?: RecipientType;
    legalBasis?: TransferLegalBasis;
    fromDate?: Date;
    toDate?: Date;
    limit?: number;
    offset?: number;
}
export interface RiskAssessment {
    country: string;
    overallRisk: RiskLevel;
    governmentAccessRisk: RiskLevel;
    legalFrameworkRisk: RiskLevel;
    enforcementRisk: RiskLevel;
    factors: RiskFactor[];
    mitigations: string[];
    recommendedMeasures: SupplementaryMeasure[];
    lastAssessed: Date;
    source?: string;
}
export type RiskLevel = 'read' | 'low' | 'medium' | 'high' | 'critical' | 'life_critical';
export interface RiskFactor {
    category: string;
    description: string;
    severity: RiskLevel;
    mitigatable: boolean;
}
export interface AdequacyDecision {
    country: string;
    countryCode: string;
    status: 'full' | 'partial' | 'pending' | 'expired';
    scope?: string;
    adoptedDate: Date;
    expiresAt?: Date;
    reviewDate?: Date;
    restrictions?: string[];
    notes?: string;
}
export interface SCCTemplate {
    id: string;
    name: string;
    version: string;
    modules: SCCModule[];
    effectiveDate: Date;
    content: string;
    annexes: SCCAnnex[];
    isLatest: boolean;
}
export interface SCCAnnex {
    id: string;
    title: string;
    content: string;
    required: boolean;
}
export interface SCCAgreement {
    id: string;
    templateId: string;
    modules: SCCModule[];
    dataExporter: PartyInfo;
    dataImporter: PartyInfo;
    signedDate?: Date;
    effectiveDate?: Date;
    expiresAt?: Date;
    supplementaryMeasures: SupplementaryMeasure[];
    status: 'draft' | 'pending_signature' | 'active' | 'expired' | 'terminated';
    annexData: Record<string, unknown>;
}
export interface PartyInfo {
    name: string;
    address: string;
    country: string;
    contactName: string;
    contactEmail: string;
    role: 'exporter' | 'importer';
    type: RecipientType;
}
export interface TransferImpactAssessment {
    id: string;
    transferId?: string;
    destinationCountry: string;
    dataCategories: DataCategory[];
    recipientType: RecipientType;
    riskAssessment: RiskAssessment;
    dataTypeSensitivity: SensitivityLevel;
    recipientSafeguards: SafeguardEvaluation;
    supplementaryMeasuresAnalysis: MeasuresAnalysis;
    overallConclusion: TIAConclusion;
    completedAt: Date;
    validUntil: Date;
    assessor?: string;
}
export type SensitivityLevel = 'low' | 'medium' | 'high' | 'very_high';
export interface SafeguardEvaluation {
    technicalMeasures: SafeguardDetail[];
    organizationalMeasures: SafeguardDetail[];
    contractualMeasures: SafeguardDetail[];
    overallScore: number;
    gaps: string[];
}
export interface SafeguardDetail {
    name: string;
    implemented: boolean;
    effectiveness: 'low' | 'medium' | 'high';
    notes?: string;
}
export interface MeasuresAnalysis {
    required: SupplementaryMeasure[];
    recommended: SupplementaryMeasure[];
    implemented: SupplementaryMeasure[];
    gaps: SupplementaryMeasure[];
    effectivenessScore: number;
}
export type TIAConclusion = 'transfer_permitted' | 'transfer_permitted_with_measures' | 'transfer_requires_review' | 'transfer_not_permitted';
export interface DataLocalizationConfig {
    id: string;
    name: string;
    preferredRegions: string[];
    allowedCountries: string[];
    blockedCountries: string[];
    processingLocationRequired?: string;
    storageLocationRequired?: string;
    replicationAllowed: boolean;
    allowedReplicationRegions?: string[];
    createdAt: Date;
    updatedAt: Date;
}
export interface ProcessingLocation {
    id: string;
    country: string;
    region?: string;
    provider?: string;
    dataCenter?: string;
    purpose: 'processing' | 'storage' | 'backup' | 'replication';
    dataCategories: DataCategory[];
    validatedAt?: Date;
    isCompliant: boolean;
}
export interface TransferLogEntry {
    id: string;
    transfer: DataTransfer;
    decision: TransferDecision;
    tiaId?: string;
    sccAgreementId?: string;
    loggedAt: Date;
    loggedBy?: string;
}
export interface SchremsIIAssessment {
    destinationCountry: string;
    governmentAccessRisk: GovernmentAccessRisk;
    requiredEncryption: EncryptionLevel;
    technicalMeasures: SupplementaryMeasure[];
    isHighRisk: boolean;
    canTransfer: boolean;
    conditions: string[];
    assessedAt: Date;
}
export interface GovernmentAccessRisk {
    hasSecurityLaws: boolean;
    lawsDescription?: string;
    surveillanceCapability: RiskLevel;
    judicialOversight: boolean;
    dataAccessFrequency: 'unknown' | 'rare' | 'occasional' | 'frequent';
    challengeMechanisms: boolean;
    overallRisk: RiskLevel;
}
export declare class AdequacyDecisionRegistry {
    private decisions;
    private lastUpdated;
    private updateInterval;
    constructor();
    /**
     * Initialize with current EU adequacy decisions (as of 2024)
     */
    private initializeDecisions;
    /**
     * Check if a country has an adequacy decision
     */
    hasAdequacyDecision(countryCode: string): boolean;
    /**
     * Get adequacy decision for a country
     */
    getDecision(countryCode: string): AdequacyDecision | undefined;
    /**
     * Check if adequacy is partial and get restrictions
     */
    isPartialAdequacy(countryCode: string): {
        isPartial: boolean;
        restrictions?: string[];
    };
    /**
     * Get all countries with adequacy decisions
     */
    getAllAdequateCountries(): AdequacyDecision[];
    /**
     * Check if registry needs update
     */
    needsUpdate(): boolean;
    /**
     * Update adequacy decisions (simulated - would call EU API in production)
     */
    updateDecisions(): Promise<void>;
    /**
     * Add or update an adequacy decision
     */
    setDecision(decision: AdequacyDecision): void;
    /**
     * Check if a decision is expiring soon
     */
    isExpiringSoon(countryCode: string, daysThreshold?: number): boolean;
    /**
     * Get all expiring decisions
     */
    getExpiringDecisions(daysThreshold?: number): AdequacyDecision[];
}
export declare class SCCManager {
    private templates;
    private agreements;
    constructor();
    /**
     * Initialize with EU standard SCC templates
     */
    private initializeTemplates;
    /**
     * Get appropriate SCC modules based on party types
     */
    getRequiredModules(exporterType: RecipientType, importerType: RecipientType): SCCModule[];
    /**
     * Get the latest SCC template
     */
    getLatestTemplate(): SCCTemplate | undefined;
    /**
     * Get a specific template by ID
     */
    getTemplate(templateId: string): SCCTemplate | undefined;
    /**
     * Create a new SCC agreement
     */
    createAgreement(dataExporter: PartyInfo, dataImporter: PartyInfo, supplementaryMeasures?: SupplementaryMeasure[]): SCCAgreement;
    /**
     * Sign an SCC agreement
     */
    signAgreement(agreementId: string, signedDate?: Date): SCCAgreement;
    /**
     * Get an agreement by ID
     */
    getAgreement(agreementId: string): SCCAgreement | undefined;
    /**
     * Get all agreements for a party
     */
    getAgreementsForParty(partyName: string): SCCAgreement[];
    /**
     * Check if there's an active SCC agreement for a transfer
     */
    hasActiveSCCAgreement(exporterName: string, importerName: string, importerCountry: string): SCCAgreement | undefined;
    /**
     * Update supplementary measures for an agreement
     */
    updateSupplementaryMeasures(agreementId: string, measures: SupplementaryMeasure[]): SCCAgreement;
    /**
     * Terminate an SCC agreement
     */
    terminateAgreement(agreementId: string): void;
    /**
     * Get recommended supplementary measures based on destination risk
     */
    getRecommendedSupplementaryMeasures(riskLevel: RiskLevel, dataCategories: DataCategory[]): SupplementaryMeasure[];
    private generateAgreementId;
}
export declare class TIAService {
    private assessments;
    private countryRisks;
    constructor();
    /**
     * Initialize country risk data based on Schrems II considerations
     */
    private initializeCountryRisks;
    /**
     * Perform a Transfer Impact Assessment
     */
    performTIA(destinationCountry: string, dataCategories: DataCategory[], recipientType: RecipientType, existingSafeguards?: SafeguardDetail[]): TransferImpactAssessment;
    /**
     * Assess country risk
     */
    assessCountryRisk(countryCode: string): RiskAssessment;
    /**
     * Assess data sensitivity based on categories
     */
    assessDataSensitivity(categories: DataCategory[]): SensitivityLevel;
    /**
     * Evaluate existing safeguards
     */
    evaluateSafeguards(safeguards: SafeguardDetail[]): SafeguardEvaluation;
    /**
     * Analyze supplementary measures
     */
    analyzeSupplementaryMeasures(riskAssessment: RiskAssessment, sensitivity: SensitivityLevel, implemented: SupplementaryMeasure[]): MeasuresAnalysis;
    /**
     * Determine TIA conclusion
     */
    private determineConclusion;
    /**
     * Calculate validity period based on risk
     */
    private calculateValidityPeriod;
    /**
     * Get a TIA by ID
     */
    getTIA(tiaId: string): TransferImpactAssessment | undefined;
    /**
     * Check if a valid TIA exists for a transfer
     */
    hasValidTIA(destinationCountry: string, dataCategories: DataCategory[]): TransferImpactAssessment | undefined;
    private generateTIAId;
}
export declare class SchremsIIService {
    private governmentAccessData;
    constructor();
    /**
     * Initialize government access risk data
     */
    private initializeGovernmentAccessData;
    /**
     * Perform Schrems II assessment for a destination country
     */
    assessSchremsIICompliance(destinationCountry: string, dataCategories: DataCategory[]): SchremsIIAssessment;
    /**
     * Get government access risk for a country
     */
    getGovernmentAccessRisk(countryCode: string): GovernmentAccessRisk;
    /**
     * Check if enhanced encryption is required
     */
    requiresEnhancedEncryption(countryCode: string): boolean;
    /**
     * Get minimum encryption level for a transfer
     */
    getMinimumEncryptionLevel(countryCode: string, dataCategories: DataCategory[]): EncryptionLevel;
}
export declare class DataLocalizationManager {
    private configs;
    private processingLocations;
    /**
     * Create a data localization configuration
     */
    createConfig(config: Omit<DataLocalizationConfig, 'id' | 'createdAt' | 'updatedAt'>): DataLocalizationConfig;
    /**
     * Get a configuration by ID
     */
    getConfig(configId: string): DataLocalizationConfig | undefined;
    /**
     * Update a configuration
     */
    updateConfig(configId: string, updates: Partial<Omit<DataLocalizationConfig, 'id' | 'createdAt' | 'updatedAt'>>): DataLocalizationConfig;
    /**
     * Register a processing location
     */
    registerLocation(location: Omit<ProcessingLocation, 'id'>): ProcessingLocation;
    /**
     * Validate if a location is allowed by a configuration
     */
    validateLocation(configId: string, country: string, region?: string): {
        isValid: boolean;
        reason?: string;
    };
    /**
     * Check if replication is allowed to a region
     */
    isReplicationAllowed(configId: string, targetRegion: string): boolean;
    /**
     * Get all processing locations for a country
     */
    getLocationsByCountry(country: string): ProcessingLocation[];
    /**
     * Validate storage location against requirements
     */
    validateStorageLocation(configId: string, location: ProcessingLocation): {
        isValid: boolean;
        violations: string[];
    };
    private generateConfigId;
    private generateLocationId;
}
export declare class DataTransferService {
    private transfers;
    private transferLog;
    private adequacyRegistry;
    private sccManager;
    private tiaService;
    private schremsIIService;
    private localizationManager;
    constructor();
    /**
     * Validate a proposed data transfer
     */
    validateTransfer(transfer: DataTransfer): Promise<TransferDecision>;
    /**
     * Record a completed data transfer
     */
    recordTransfer(transfer: DataTransfer): Promise<void>;
    /**
     * Get transfer history based on filters
     */
    getTransferHistory(filter: TransferFilter): Promise<DataTransfer[]>;
    /**
     * Assess transfer risk for a destination country
     */
    assessTransferRisk(destination: string): Promise<RiskAssessment>;
    /**
     * Get the adequacy registry for direct access
     */
    getAdequacyRegistry(): AdequacyDecisionRegistry;
    /**
     * Get the SCC manager for direct access
     */
    getSCCManager(): SCCManager;
    /**
     * Get the TIA service for direct access
     */
    getTIAService(): TIAService;
    /**
     * Get the Schrems II service for direct access
     */
    getSchremsIIService(): SchremsIIService;
    /**
     * Get the data localization manager for direct access
     */
    getLocalizationManager(): DataLocalizationManager;
    /**
     * Perform a full Transfer Impact Assessment
     */
    performTIA(destinationCountry: string, dataCategories: DataCategory[], recipientType: RecipientType, existingSafeguards?: SafeguardDetail[]): Promise<TransferImpactAssessment>;
    /**
     * Get transfer log entries
     */
    getTransferLog(fromDate?: Date, toDate?: Date): TransferLogEntry[];
    /**
     * Check if a country is in EU/EEA
     */
    private isEUEEACountry;
    private generateLogId;
}
/**
 * Create a new DataTransferService instance
 */
export declare function createDataTransferService(): DataTransferService;
//# sourceMappingURL=data-transfers.d.ts.map