/**
 * Central export point for all utility functions
 * Organized by domain responsibility
 */

// HTTP utilities (responses, CORS, XSS protection)
export {
  escapeHtml,
  jsonResponse,
  getAllowedOrigin,
  isAllowedProvisionOrigin
} from './http';

// Validation utilities (type guards, request validation)
export {
  isValidServer,
  isValidVPSBenchmark,
  isValidTechSpec,
  isValidBenchmarkData,
  isValidAIRecommendation,
  validateRecommendRequest
} from './validation';

// Bandwidth estimation utilities
export {
  findUseCaseConfig,
  getDauMultiplier,
  getActiveUserRatio,
  getCdnCacheHitRate,
  estimateBandwidth,
  getProviderBandwidthAllocation,
  calculateBandwidthInfo
} from './bandwidth';
export type { CdnOptions } from './bandwidth';

// Cache and rate limiting utilities
export {
  hashString,
  sanitizeCacheValue,
  generateCacheKey,
  checkRateLimit
} from './cache';

// AI utilities (prompt sanitization)
export {
  sanitizeForAIPrompt
} from './ai';

// Exchange rate utilities
export {
  getExchangeRate,
  EXCHANGE_RATE_FALLBACK
} from './exchange-rate';

// Re-export region utilities from region-utils.ts for backward compatibility
export {
  DEFAULT_ANVIL_REGION_FILTER_SQL,
  COUNTRY_NAME_TO_REGIONS,
  escapeLikePattern,
  buildFlexibleRegionConditions,
  buildFlexibleRegionConditionsAnvil
} from '../region-utils';
