barsa b65a49bc2f Refactor Salesforce integration and enhance order field handling
- Added OrderFieldConfigModule to Salesforce module for improved order field management.
- Refactored SalesforceOrderService to utilize OrderFieldMapService for building query fields, enhancing maintainability and consistency.
- Removed deprecated order query builder utility functions, centralizing logic within the new OrderFieldMapService.
- Updated OrderBuilder service to leverage field mappings for better clarity and reduced hardcoding of field names.
- Improved address handling in order processing to ensure consistent field usage across services.
2025-11-04 11:26:21 +09:00

82 lines
1.8 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,
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,
} 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";