/**
 * Catalog Domain - Contract
 * 
 * Constants and types for the catalog domain.
 * Most types are derived from schemas (see schema.ts).
 */

// ============================================================================
// Salesforce Field Mapping (Provider-Specific, Not Validated)
// ============================================================================

/**
 * Salesforce Product2 field mapping
 * This is provider-specific and not validated at runtime
 */
export interface SalesforceProductFieldMap {
  sku: string;
  portalCategory: string;
  portalCatalog: string;
  portalAccessible: string;
  itemClass: string;
  billingCycle: string;
  whmcsProductId: string;
  whmcsProductName: string;
  internetPlanTier: string;
  internetOfferingType: string;
  displayOrder: string;
  bundledAddon: string;
  isBundledAddon: string;
  simDataSize: string;
  simPlanType: string;
  simHasFamilyDiscount: string;
  vpnRegion: string;
}

// ============================================================================
// Pricing and Filter Types
// ============================================================================

/**
 * Pricing tier for display purposes
 */
export interface PricingTier {
  name: string;
  price: number;
  billingCycle: 'Monthly' | 'Onetime' | 'Annual';
  description?: string;
  features?: string[];
  isRecommended?: boolean;
  originalPrice?: number;
}

/**
 * Catalog filtering options
 */
export interface CatalogFilter {
  category?: string;
  priceMin?: number;
  priceMax?: number;
  search?: string;
}

// ============================================================================
// Re-export Types from Schema (Schema-First Approach)
// ============================================================================

export type {
  CatalogProductBase,
  CatalogPricebookEntry,
  // Internet products
  InternetCatalogProduct,
  InternetPlanTemplate,
  InternetPlanCatalogItem,
  InternetInstallationCatalogItem,
  InternetAddonCatalogItem,
  // SIM products
  SimCatalogProduct,
  SimActivationFeeCatalogItem,
  // VPN products
  VpnCatalogProduct,
  // Union type
  CatalogProduct,
} from './schema';
