2025-10-03 14:26:55 +09:00
|
|
|
/**
|
|
|
|
|
* Orders Domain
|
|
|
|
|
*
|
|
|
|
|
* Exports all order-related contracts, schemas, and provider mappers.
|
2025-10-08 10:33:33 +09:00
|
|
|
*
|
|
|
|
|
* Types are derived from Zod schemas (Schema-First Approach)
|
2025-10-03 14:26:55 +09:00
|
|
|
*/
|
|
|
|
|
|
2025-10-08 13:46:23 +09:00
|
|
|
// Business types and constants
|
|
|
|
|
export {
|
|
|
|
|
type OrderCreationType,
|
|
|
|
|
type OrderStatus,
|
|
|
|
|
type OrderType,
|
2025-10-21 11:44:06 +09:00
|
|
|
type OrderTypeValue,
|
2025-10-08 13:46:23 +09:00
|
|
|
type UserMapping,
|
2025-10-22 11:33:23 +09:00
|
|
|
// Checkout types
|
|
|
|
|
type CheckoutItem,
|
|
|
|
|
type CheckoutTotals,
|
|
|
|
|
type CheckoutCart,
|
|
|
|
|
type OrderCreateResponse,
|
|
|
|
|
type OrderFulfillmentValidationResult,
|
2025-10-08 13:46:23 +09:00
|
|
|
// Constants
|
|
|
|
|
ORDER_TYPE,
|
|
|
|
|
ORDER_STATUS,
|
|
|
|
|
ACTIVATION_TYPE,
|
2025-10-27 16:53:19 +09:00
|
|
|
type ActivationTypeValue,
|
2025-10-08 13:46:23 +09:00
|
|
|
SIM_TYPE,
|
2025-10-27 16:53:19 +09:00
|
|
|
type SimTypeValue,
|
|
|
|
|
ACCESS_MODE,
|
|
|
|
|
type AccessModeValue,
|
2025-10-08 13:46:23 +09:00
|
|
|
ORDER_FULFILLMENT_ERROR_CODE,
|
|
|
|
|
type OrderFulfillmentErrorCode,
|
2025-12-10 15:22:10 +09:00
|
|
|
} from "./contract.js";
|
2025-10-08 10:33:33 +09:00
|
|
|
|
|
|
|
|
// Schemas (includes derived types)
|
2025-12-10 15:22:10 +09:00
|
|
|
export * from "./schema.js";
|
2025-10-03 14:26:55 +09:00
|
|
|
|
2025-10-08 10:33:33 +09:00
|
|
|
// Validation (extended business rules)
|
2025-12-10 15:22:10 +09:00
|
|
|
export * from "./validation.js";
|
2025-10-08 10:33:33 +09:00
|
|
|
|
2025-10-20 13:53:35 +09:00
|
|
|
// Utilities
|
2025-12-10 15:22:10 +09:00
|
|
|
export * from "./utils.js";
|
|
|
|
|
export * from "./events.js";
|
2025-10-21 11:44:06 +09:00
|
|
|
export {
|
|
|
|
|
buildSimOrderConfigurations,
|
2025-11-04 11:14:26 +09:00
|
|
|
normalizeBillingCycle,
|
2025-10-27 15:47:50 +09:00
|
|
|
normalizeOrderSelections,
|
2025-11-18 11:14:05 +09:00
|
|
|
buildOrderDisplayItems,
|
|
|
|
|
categorizeOrderItem,
|
2025-10-21 11:44:06 +09:00
|
|
|
type BuildSimOrderConfigurationsOptions,
|
2025-11-04 11:26:21 +09:00
|
|
|
type OrderStatusDescriptor,
|
|
|
|
|
type OrderStatusInput,
|
|
|
|
|
type OrderStatusState,
|
|
|
|
|
type OrderStatusTone,
|
|
|
|
|
type OrderServiceCategory,
|
|
|
|
|
type OrderTotalsInputItem,
|
|
|
|
|
deriveOrderStatusDescriptor,
|
|
|
|
|
getOrderServiceCategory,
|
|
|
|
|
calculateOrderTotals,
|
|
|
|
|
formatScheduledDate,
|
2025-12-10 15:22:10 +09:00
|
|
|
} from "./helpers.js";
|
2025-10-08 10:33:33 +09:00
|
|
|
// 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,
|
2025-11-18 11:14:05 +09:00
|
|
|
// Display types
|
|
|
|
|
OrderDisplayItem,
|
|
|
|
|
OrderDisplayItemCategory,
|
|
|
|
|
OrderDisplayItemCharge,
|
|
|
|
|
OrderDisplayItemChargeKind,
|
2025-12-10 15:22:10 +09:00
|
|
|
} from './schema.js';
|
2025-10-08 10:33:33 +09:00
|
|
|
|
2025-10-03 14:26:55 +09:00
|
|
|
// Provider adapters
|
2025-12-10 15:22:10 +09:00
|
|
|
export * as Providers from "./providers/index.js";
|
2025-10-03 15:05:46 +09:00
|
|
|
|
|
|
|
|
// Re-export provider types for convenience
|
2025-12-10 15:22:10 +09:00
|
|
|
export * from "./providers/whmcs/raw.types.js";
|
|
|
|
|
export * from "./providers/salesforce/raw.types.js";
|
|
|
|
|
export * from "./providers/salesforce/field-map.js";
|