barsa 1220f219e4 Add SIM top-up pricing endpoints and integrate pricing service into subscriptions module
- 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.
2025-11-18 11:14:05 +09:00

90 lines
2.1 KiB
TypeScript

/**
* Orders Domain
*
* Exports all order-related contracts, schemas, and provider mappers.
*
* Types are derived from Zod schemas (Schema-First Approach)
*/
// Business types and constants
export {
type OrderCreationType,
type OrderStatus,
type OrderType,
type OrderTypeValue,
type UserMapping,
// Checkout types
type CheckoutItem,
type CheckoutTotals,
type CheckoutCart,
type OrderCreateResponse,
type OrderFulfillmentValidationResult,
// Constants
ORDER_TYPE,
ORDER_STATUS,
ACTIVATION_TYPE,
type ActivationTypeValue,
SIM_TYPE,
type SimTypeValue,
ACCESS_MODE,
type AccessModeValue,
ORDER_FULFILLMENT_ERROR_CODE,
type OrderFulfillmentErrorCode,
} from "./contract";
// Schemas (includes derived types)
export * from "./schema";
// Validation (extended business rules)
export * from "./validation";
// Utilities
export * from "./utils";
export {
buildSimOrderConfigurations,
normalizeBillingCycle,
normalizeOrderSelections,
buildOrderDisplayItems,
categorizeOrderItem,
type BuildSimOrderConfigurationsOptions,
type OrderStatusDescriptor,
type OrderStatusInput,
type OrderStatusState,
type OrderStatusTone,
type OrderServiceCategory,
type OrderTotalsInputItem,
deriveOrderStatusDescriptor,
getOrderServiceCategory,
calculateOrderTotals,
formatScheduledDate,
} from "./helpers";
// Re-export types for convenience
export type {
// Order item types
OrderItemSummary,
OrderItemDetails,
// Order types
OrderSummary,
OrderDetails,
// Query and creation types
OrderQueryParams,
OrderConfigurationsAddress,
OrderConfigurations,
CreateOrderRequest,
OrderBusinessValidation,
SfOrderIdParam,
// Display types
OrderDisplayItem,
OrderDisplayItemCategory,
OrderDisplayItemCharge,
OrderDisplayItemChargeKind,
} from './schema';
// Provider adapters
export * as Providers from "./providers/index";
// Re-export provider types for convenience
export * from "./providers/whmcs/raw.types";
export * from "./providers/salesforce/raw.types";
export * from "./providers/salesforce/field-map";