// Worldwide AML Pattern Language (WAPL) - Type Definitions

export interface WAPLPattern {
  id: string;
  patternCode: string;
  name: string;
  description: string;
  patternDefinition: string; // Pattern syntax
  severity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
  status: 'ACTIVE' | 'DRAFT' | 'SUSPENDED';
}

export interface PatternMatch {
  id: string;
  patternId: string;
  transactionId: string;
  matchScore: number; // 0-1
  matchedConditions: string[];
  alertGenerated: boolean;
  detectedAt: Date;
}

export interface PatternAlert {
  id: string;
  patternMatchId: string;
  transactionId: string;
  patternCode: string;
  severity: string;
  description: string;
  status: 'PENDING' | 'REVIEWED' | 'RESOLVED' | 'FALSE_POSITIVE';
  createdAt: Date;
}

export interface PatternCondition {
  type: 'FX_TRADE' | 'CBDC_TRANSACTION' | 'ENTITY_LINK' | 'VELOCITY' | 'AMOUNT' | 'HOP_COUNT';
  operator: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'LESS_THAN' | 'CONTAINS' | 'OCCURS';
  value: any;
  tolerance?: number;
}

