- Updated WHMCS service methods to return normalized product types, enhancing type consistency across services. - Refactored product retrieval logic in WhmcsPaymentService and WhmcsService to streamline data handling. - Removed deprecated utility functions and optimized custom field handling in WHMCS-related services. - Enhanced error handling in subscription processing to improve reliability and clarity. - Cleaned up imports and improved overall code organization for better maintainability.
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
/**
|
|
* Catalog Domain
|
|
*
|
|
* Exports all catalog-related contracts, schemas, and provider mappers.
|
|
*
|
|
* Types are derived from Zod schemas (Schema-First Approach)
|
|
*/
|
|
|
|
// Provider-specific types
|
|
export {
|
|
type SalesforceProductFieldMap,
|
|
type PricingTier,
|
|
type CatalogFilter,
|
|
} from "./contract";
|
|
|
|
// Schemas (includes derived types)
|
|
export * from "./schema";
|
|
|
|
// Re-export types for convenience
|
|
export type {
|
|
CatalogProductBase,
|
|
CatalogPricebookEntry,
|
|
// Internet products
|
|
InternetCatalogProduct,
|
|
InternetPlanTemplate,
|
|
InternetPlanCatalogItem,
|
|
InternetInstallationCatalogItem,
|
|
InternetAddonCatalogItem,
|
|
// SIM products
|
|
SimCatalogProduct,
|
|
SimActivationFeeCatalogItem,
|
|
// VPN products
|
|
VpnCatalogProduct,
|
|
// Union type
|
|
CatalogProduct,
|
|
} from './schema';
|
|
|
|
// Provider adapters
|
|
export * as Providers from "./providers/index";
|
|
|
|
// Re-export provider raw types for convenience
|
|
export * from "./providers/salesforce/raw.types";
|
|
|
|
// Re-export WHMCS provider types
|
|
export type {
|
|
WhmcsCatalogProduct,
|
|
WhmcsCatalogProductListResponse,
|
|
} from "./providers/whmcs/raw.types";
|
|
export type {
|
|
WhmcsCatalogProductNormalized,
|
|
WhmcsCatalogPricing,
|
|
} from "./providers/whmcs/mapper";
|
|
|
|
// Utilities
|
|
export * from "./utils";
|