2025-08-21 15:24:40 +09:00
|
|
|
import { Module } from "@nestjs/common";
|
2025-12-10 16:08:34 +09:00
|
|
|
import { SubscriptionsController } from "./subscriptions.controller.js";
|
2026-01-19 14:15:43 +09:00
|
|
|
import { SubscriptionsOrchestrator } from "./subscriptions-orchestrator.service.js";
|
2025-12-10 16:08:34 +09:00
|
|
|
import { SimUsageStoreService } from "./sim-usage-store.service.js";
|
2026-02-24 11:58:00 +09:00
|
|
|
import { SimOrdersController } from "./sim-orders/sim-orders.controller.js";
|
2025-12-10 16:08:34 +09:00
|
|
|
import { SimOrderActivationService } from "./sim-order-activation.service.js";
|
2025-12-25 19:01:00 +09:00
|
|
|
import { SecurityModule } from "@bff/core/security/security.module.js";
|
2025-12-10 16:08:34 +09:00
|
|
|
import { WhmcsModule } from "@bff/integrations/whmcs/whmcs.module.js";
|
|
|
|
|
import { MappingsModule } from "@bff/modules/id-mappings/mappings.module.js";
|
|
|
|
|
import { FreebitModule } from "@bff/integrations/freebit/freebit.module.js";
|
|
|
|
|
import { SimManagementModule } from "./sim-management/sim-management.module.js";
|
2025-12-23 15:19:20 +09:00
|
|
|
import { InternetManagementModule } from "./internet-management/internet-management.module.js";
|
2025-12-26 18:17:37 +09:00
|
|
|
import { CallHistoryModule } from "./call-history/call-history.module.js";
|
2026-01-05 17:06:25 +09:00
|
|
|
import { CancellationModule } from "./cancellation/cancellation.module.js";
|
2026-01-05 18:35:05 +09:00
|
|
|
// Import controllers to register them directly in this module before SubscriptionsController
|
|
|
|
|
// This ensures more specific routes (like :id/sim, :id/cancel) are matched before :id
|
2026-01-05 15:57:50 +09:00
|
|
|
import { SimController } from "./sim-management/sim.controller.js";
|
2026-01-05 18:35:05 +09:00
|
|
|
import { CancellationController } from "./cancellation/cancellation.controller.js";
|
2025-08-20 18:02:50 +09:00
|
|
|
|
|
|
|
|
@Module({
|
2025-12-23 15:19:20 +09:00
|
|
|
imports: [
|
2025-12-25 19:01:00 +09:00
|
|
|
SecurityModule,
|
2025-12-23 15:19:20 +09:00
|
|
|
WhmcsModule,
|
|
|
|
|
MappingsModule,
|
|
|
|
|
FreebitModule,
|
|
|
|
|
SimManagementModule,
|
|
|
|
|
InternetManagementModule,
|
2025-12-26 18:17:37 +09:00
|
|
|
CallHistoryModule,
|
2026-01-05 17:06:25 +09:00
|
|
|
CancellationModule,
|
2025-12-23 15:19:20 +09:00
|
|
|
],
|
2026-01-05 18:35:05 +09:00
|
|
|
// Register specific route controllers BEFORE SubscriptionsController
|
|
|
|
|
// to ensure routes like :id/sim and :id/cancel are matched before :id
|
|
|
|
|
controllers: [
|
|
|
|
|
SimController,
|
|
|
|
|
CancellationController,
|
|
|
|
|
SubscriptionsController,
|
|
|
|
|
SimOrdersController,
|
|
|
|
|
],
|
2026-01-19 14:15:43 +09:00
|
|
|
providers: [SubscriptionsOrchestrator, SimUsageStoreService, SimOrderActivationService],
|
2025-08-20 18:02:50 +09:00
|
|
|
})
|
|
|
|
|
export class SubscriptionsModule {}
|