- 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.
87 lines
2.0 KiB
TypeScript
87 lines
2.0 KiB
TypeScript
/**
|
|
* SIM Domain
|
|
*
|
|
* Exports all SIM-related contracts, schemas, and provider mappers.
|
|
*
|
|
* Types are derived from Zod schemas (Schema-First Approach)
|
|
*/
|
|
|
|
// Constants
|
|
export { SIM_STATUS, SIM_TYPE, SIM_PLAN_CODES, SIM_PLAN_LABELS } from "./contract.js";
|
|
|
|
// Schemas (includes derived types)
|
|
export * from "./schema.js";
|
|
export * from "./lifecycle.js";
|
|
|
|
// Validation functions
|
|
export * from "./validation.js";
|
|
export {
|
|
canManageActiveSim,
|
|
canReissueEsim,
|
|
canCancelSim,
|
|
canTopUpSim,
|
|
formatSimPlanShort,
|
|
SIM_PLAN_OPTIONS,
|
|
getSimPlanLabel,
|
|
buildSimFeaturesUpdatePayload,
|
|
} from "./helpers.js";
|
|
|
|
// Re-export types for convenience
|
|
export type {
|
|
SimStatus,
|
|
SimType,
|
|
SimDetails,
|
|
RecentDayUsage,
|
|
SimUsage,
|
|
SimTopUpHistoryEntry,
|
|
SimTopUpHistory,
|
|
SimInfo,
|
|
// Portal-facing DTOs
|
|
SimAvailablePlan,
|
|
SimAvailablePlanArray,
|
|
SimCancellationMonth,
|
|
SimCancellationPreview,
|
|
SimReissueFullRequest,
|
|
SimCallHistoryPagination,
|
|
SimDomesticCallRecord,
|
|
SimDomesticCallHistoryResponse,
|
|
SimInternationalCallRecord,
|
|
SimInternationalCallHistoryResponse,
|
|
SimSmsRecord,
|
|
SimSmsHistoryResponse,
|
|
SimHistoryMonth,
|
|
SimHistoryAvailableMonths,
|
|
SimCallHistoryImportResult,
|
|
SimSftpFiles,
|
|
SimSftpListResult,
|
|
// Request types
|
|
SimTopUpRequest,
|
|
SimPlanChangeRequest,
|
|
SimCancelRequest,
|
|
SimTopUpHistoryRequest,
|
|
SimFeaturesUpdateRequest,
|
|
SimReissueRequest,
|
|
SimConfigureFormData,
|
|
SimCardType,
|
|
ActivationType,
|
|
MnpData,
|
|
// Enhanced request types
|
|
SimCancelFullRequest,
|
|
SimTopUpFullRequest,
|
|
SimChangePlanFullRequest,
|
|
SimHistoryQuery,
|
|
SimSftpListQuery,
|
|
SimCallHistoryImportQuery,
|
|
SimReissueEsimRequest,
|
|
// Activation types
|
|
SimOrderActivationRequest,
|
|
SimOrderActivationMnp,
|
|
SimOrderActivationAddons,
|
|
// Pricing types
|
|
SimTopUpPricing,
|
|
SimTopUpPricingPreviewRequest,
|
|
SimTopUpPricingPreviewResponse,
|
|
} from "./schema.js";
|
|
export type { SimPlanCode } from "./contract.js";
|
|
export type { SimPlanOption, SimFeatureToggleSnapshot } from "./helpers.js";
|