/** * Catalog Domain - Contract * * Normalized catalog product types used across the portal. * Represents products from Salesforce Product2 objects with PricebookEntry pricing. */ // ============================================================================ // Base Catalog Product // ============================================================================ export interface CatalogProductBase { id: string; sku: string; name: string; description?: string; displayOrder?: number; billingCycle?: string; monthlyPrice?: number; oneTimePrice?: number; unitPrice?: number; } // ============================================================================ // PricebookEntry // ============================================================================ export interface CatalogPricebookEntry { id?: string; name?: string; unitPrice?: number; pricebook2Id?: string; product2Id?: string; isActive?: boolean; } // ============================================================================ // Internet Products // ============================================================================ export interface InternetCatalogProduct extends CatalogProductBase { internetPlanTier?: string; internetOfferingType?: string; features?: string[]; } export interface InternetPlanTemplate { tierDescription: string; description?: string; features?: string[]; } export interface InternetPlanCatalogItem extends InternetCatalogProduct { catalogMetadata?: { tierDescription?: string; features?: string[]; isRecommended?: boolean; }; } export interface InternetInstallationCatalogItem extends InternetCatalogProduct { catalogMetadata?: { installationTerm: "One-time" | "12-Month" | "24-Month"; }; } export interface InternetAddonCatalogItem extends InternetCatalogProduct { isBundledAddon?: boolean; bundledAddonId?: string; } // ============================================================================ // SIM Products // ============================================================================ export interface SimCatalogProduct extends CatalogProductBase { simDataSize?: string; simPlanType?: string; simHasFamilyDiscount?: boolean; isBundledAddon?: boolean; bundledAddonId?: string; } export interface SimActivationFeeCatalogItem extends SimCatalogProduct { catalogMetadata?: { isDefault: boolean; }; } // ============================================================================ // VPN Products // ============================================================================ export interface VpnCatalogProduct extends CatalogProductBase { vpnRegion?: string; } // ============================================================================ // Union Types // ============================================================================ export type CatalogProduct = | InternetPlanCatalogItem | InternetInstallationCatalogItem | InternetAddonCatalogItem | SimCatalogProduct | SimActivationFeeCatalogItem | VpnCatalogProduct | CatalogProductBase;