barsa 0c63bc5c33 refactor: domain package cleanup
- Remove validation wrapper functions from common/validation.ts (use Zod schemas directly)
- Delete duplicate CheckoutItem/CheckoutTotals/CheckoutCart/OrderCreateResponse from orders/contract.ts
- Delete empty orders/checkout.ts
- Remove unused MIGRATION_STEPS/MIGRATION_TRANSFER_ITEMS UI constants from auth/forms.ts
- Standardize checkout/contract.ts to not re-export schema types
- Fix customer/providers/index.ts to not re-export contract types through providers barrel
2026-02-24 11:57:43 +09:00

63 lines
1.5 KiB
TypeScript

/**
* Orders Domain
*
* Exports orders contracts + schemas.
*
* Provider adapters (BFF-only) live under: `@customer-portal/domain/orders/providers`.
*
* Types are derived from Zod schemas (Schema-First Approach)
*/
// Business types and constants
export {
type OrderCreationType,
type OrderStatus,
type OrderType,
type OrderTypeValue,
type UserMapping,
// 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";
// Provider adapters
// NOTE: Provider adapters are intentionally not exported from the module root.
// Import BFF-only provider adapters from:
// @customer-portal/domain/orders/providers