- Introduced new endpoints in SubscriptionsController for retrieving SIM top-up pricing and previewing pricing based on quota. - Integrated SimTopUpPricingService into the subscriptions module to handle pricing logic. - Updated TopUpModal component to utilize the new pricing service for dynamic cost calculations and validation. - Enhanced error handling and user feedback in the TopUpModal for improved user experience during data top-up operations. - Refactored order display utilities to support new pricing structures and ensure consistent presentation across the application.
52 lines
1.0 KiB
TypeScript
52 lines
1.0 KiB
TypeScript
/**
|
|
* SIM Domain
|
|
*
|
|
* Exports all SIM-related contracts, schemas, and provider mappers.
|
|
*
|
|
* Types are derived from Zod schemas (Schema-First Approach)
|
|
*/
|
|
|
|
// Constants
|
|
export { SIM_STATUS, SIM_TYPE } from "./contract";
|
|
|
|
// Schemas (includes derived types)
|
|
export * from "./schema";
|
|
export * from "./lifecycle";
|
|
|
|
// Validation functions
|
|
export * from "./validation";
|
|
|
|
// Re-export types for convenience
|
|
export type {
|
|
SimStatus,
|
|
SimType,
|
|
SimDetails,
|
|
RecentDayUsage,
|
|
SimUsage,
|
|
SimTopUpHistoryEntry,
|
|
SimTopUpHistory,
|
|
SimInfo,
|
|
// Request types
|
|
SimTopUpRequest,
|
|
SimPlanChangeRequest,
|
|
SimCancelRequest,
|
|
SimTopUpHistoryRequest,
|
|
SimFeaturesUpdateRequest,
|
|
SimReissueRequest,
|
|
SimConfigureFormData,
|
|
SimCardType,
|
|
ActivationType,
|
|
MnpData,
|
|
// Activation types
|
|
SimOrderActivationRequest,
|
|
SimOrderActivationMnp,
|
|
SimOrderActivationAddons,
|
|
// Pricing types
|
|
SimTopUpPricing,
|
|
SimTopUpPricingPreviewRequest,
|
|
SimTopUpPricingPreviewResponse,
|
|
} from './schema';
|
|
|
|
// Provider adapters
|
|
export * as Providers from "./providers/index";
|