barsa 18360416a3 feat(workflow): introduce Workflow Module and Case Manager for internal case handling
- Added WorkflowModule to manage internal workflow operations.
- Implemented WorkflowCaseManager for creating various types of internal cases (e.g., order placements, cancellations, ID verifications).
- Integrated WorkflowCaseManager into existing services for handling internet and SIM cancellations, eligibility checks, and ID verification submissions.
- Enhanced error handling and logging for case creation processes.
- Introduced CacheCoordinatorService for coordinating multiple cache invalidation operations with error aggregation.
- Updated relevant modules to include WorkflowModule and refactored services to utilize the new WorkflowCaseManager.
- Improved UI components in the eligibility check process for better user experience.
2026-01-15 18:15:51 +09:00

105 lines
4.3 KiB
TypeScript

import { Module } from "@nestjs/common";
import { FreebitModule } from "@bff/integrations/freebit/freebit.module.js";
import { WhmcsModule } from "@bff/integrations/whmcs/whmcs.module.js";
import { SalesforceModule } from "@bff/integrations/salesforce/salesforce.module.js";
import { MappingsModule } from "@bff/modules/id-mappings/mappings.module.js";
import { SftpModule } from "@bff/integrations/sftp/sftp.module.js";
import { SecurityModule } from "@bff/core/security/security.module.js";
import { SimUsageStoreService } from "../sim-usage-store.service.js";
import { SubscriptionsService } from "../subscriptions.service.js";
import { SimManagementService } from "../sim-management.service.js";
// SimController is registered in SubscriptionsModule to ensure route order
// Import all SIM management services
import { SimOrchestratorService } from "./services/sim-orchestrator.service.js";
import { SimDetailsService } from "./services/sim-details.service.js";
import { SimUsageService } from "./services/sim-usage.service.js";
import { SimTopUpService } from "./services/sim-topup.service.js";
import { SimTopUpPricingService } from "./services/sim-topup-pricing.service.js";
import { SimPlanService } from "./services/sim-plan.service.js";
import { SimCancellationService } from "./services/sim-cancellation.service.js";
import { EsimManagementService } from "./services/esim-management.service.js";
import { SimValidationService } from "./services/sim-validation.service.js";
import { SimNotificationService } from "./services/sim-notification.service.js";
import { SimBillingService } from "./services/sim-billing.service.js";
import { SimScheduleService } from "./services/sim-schedule.service.js";
import { SimManagementQueueService } from "./queue/sim-management.queue.js";
import { SimManagementProcessor } from "./queue/sim-management.processor.js";
import { SimCallHistoryService } from "./services/sim-call-history.service.js";
import { SimCallHistoryParserService } from "./services/sim-call-history-parser.service.js";
import { SimCallHistoryFormatterService } from "./services/sim-call-history-formatter.service.js";
import { ServicesModule } from "@bff/modules/services/services.module.js";
import { NotificationsModule } from "@bff/modules/notifications/notifications.module.js";
import { VoiceOptionsModule, VoiceOptionsService } from "@bff/modules/voice-options/index.js";
import { WorkflowModule } from "@bff/modules/shared/workflow/index.js";
@Module({
imports: [
FreebitModule,
WhmcsModule,
SalesforceModule,
MappingsModule,
ServicesModule,
SftpModule,
NotificationsModule,
SecurityModule,
VoiceOptionsModule,
WorkflowModule,
],
// SimController is registered in SubscriptionsModule to ensure route order
// (more specific routes like :id/sim must be registered before :id)
controllers: [],
providers: [
// Core services that the SIM services depend on
SimUsageStoreService,
SubscriptionsService,
SimManagementService,
// SIM management services
SimValidationService,
SimNotificationService,
SimDetailsService,
SimUsageService,
SimTopUpService,
SimTopUpPricingService,
SimPlanService,
SimCancellationService,
EsimManagementService,
SimOrchestratorService,
SimBillingService,
SimScheduleService,
SimManagementQueueService,
SimManagementProcessor,
// Call history services (split for maintainability)
SimCallHistoryParserService,
SimCallHistoryFormatterService,
SimCallHistoryService,
// Backwards compatibility alias: SimVoiceOptionsService -> VoiceOptionsService
{
provide: "SimVoiceOptionsService",
useExisting: VoiceOptionsService,
},
],
exports: [
SimOrchestratorService,
// Export individual services in case they're needed elsewhere
SimDetailsService,
SimUsageService,
SimTopUpService,
SimTopUpPricingService,
SimPlanService,
SimCancellationService,
EsimManagementService,
SimValidationService,
SimNotificationService,
SimBillingService,
SimScheduleService,
SimManagementQueueService,
SimCallHistoryService,
// VoiceOptionsService is exported from VoiceOptionsModule
// Backwards compatibility: re-export the token
"SimVoiceOptionsService",
],
})
export class SimManagementModule {}