barsa a3dbd07183 Enhance ESLint Rules and Refactor Domain Imports
- Updated ESLint configuration to enforce stricter import rules for the @customer-portal/domain package, promoting better import hygiene and preventing deep imports.
- Refactored various files across the BFF and portal applications to comply with the new import rules, ensuring that only the appropriate modules are imported from the domain.
- Cleaned up unused imports and optimized code structure for improved maintainability and clarity.
- Updated documentation to reflect changes in import practices and domain structure.
2025-12-26 14:53:03 +09:00

88 lines
2.0 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,
// 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.js";
// Schemas (includes derived types)
export * from "./schema.js";
// Validation (extended business rules)
export * from "./validation.js";
// Utilities
export * from "./utils.js";
export * from "./events.js";
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.js";
// 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,
OrderListResponse,
// Display types
OrderDisplayItem,
OrderDisplayItemCategory,
OrderDisplayItemCharge,
OrderDisplayItemChargeKind,
} from "./schema.js";
// Provider adapters
// NOTE: Provider adapters are intentionally not exported from the module root.
// Import BFF-only provider adapters from:
// @customer-portal/domain/orders/providers