/**
 * AI Domain Events
 *
 * Emitted when significant domain actions occur within the AI service.
 * These can be published to Kafka or consumed by other bounded contexts.
 */

export interface ChatCompletedEvent {
  userId: string;
  sessionId: string;
  messageCount: number;
  hasError: boolean;
  responseTimeMs: number;
  timestamp: string;
}

export interface CreditScoreCalculatedEvent {
  userId: string;
  issuerId: string | null;
  score: number;
  level: string;
  source: 'external' | 'local-fallback';
  timestamp: string;
}

export interface AnomalyDetectedEvent {
  userId: string;
  transactionType: string;
  amount: number;
  riskScore: number;
  reasons: string[];
  source: 'external' | 'local-fallback';
  timestamp: string;
}

export interface PricingSuggestionGeneratedEvent {
  couponId: string;
  suggestedPrice: number;
  confidence: number;
  source: 'external' | 'local-fallback';
  timestamp: string;
}
