import { logger } from '@/infrastructure/monitoring/logger';

/**
 * dbis.control.correlation
 * Business-level correlation of internal IDs ↔ rail IDs ↔ message refs.
 */
export class CorrelationService {
	async link(params: {
		txnId: string;
		internalId: string;
		railId?: string;
		messageRef?: string;
		statementLineId?: string;
		confidence?: 'HIGH' | 'MEDIUM' | 'LOW';
		evidence?: Record<string, unknown>;
	}): Promise<{ status: 'LINKED' }> {
		logger.info('CorrelationService.link', { txnId: params.txnId, railId: params.railId });
		// Persist to gateway_correlation (DAO omitted for scaffolding)
		return { status: 'LINKED' as const };
	}
}

export const correlationService = new CorrelationService();

