forked from Yara724/api
Extend durable image assessments with explicit Persian vehicle names, deployment severity settings and advisory market prices normalized to rials. Preserve case access and retry boundaries, and remove the retired OpenAI pricing module and routes.
93 lines
3.8 KiB
TypeScript
93 lines
3.8 KiB
TypeScript
import { PersianErrorFilter } from "./common/errors/persian-error.filter";
|
|
import { PersianErrorInterceptor } from "./common/errors/persian-error.interceptor";
|
|
import { ManagementModule } from "./management/management.module";
|
|
import { join } from "node:path";
|
|
import { APP_FILTER, APP_INTERCEPTOR, APP_PIPE } from "@nestjs/core";
|
|
import { Module } from "@nestjs/common";
|
|
import { ConfigModule, ConfigService } from "@nestjs/config";
|
|
import { HttpModule } from "@nestjs/axios";
|
|
import { UnicodeDigitsNormalizeInterceptor } from "./common/interceptors/unicode-digits-normalize.interceptor";
|
|
import { MongooseModule } from "@nestjs/mongoose";
|
|
import { ServeStaticModule } from "@nestjs/serve-static";
|
|
import { AiModule } from "./ai/ai.module";
|
|
import { AuthModule } from "./auth/auth.module";
|
|
import { ClaimRequestManagementModule } from "./claim-request-management/claim-request-management.module";
|
|
import { ClientModule } from "./client/client.module";
|
|
import { ExpertBlameModule } from "./expert-blame/expert-blame.module";
|
|
import { FanavaranModule } from "./fanavaran/fanavaran.module";
|
|
import { ExpertClaimModule } from "./expert-claim/expert-claim.module";
|
|
import { ExpertInsurerModule } from "./expert-insurer/expert-insurer.module";
|
|
import { CaseExpertReportModule } from "./case-expert-report/case-expert-report.module";
|
|
import { LookupsModule } from "./lookups/lookups.module";
|
|
import { ProfileModule } from "./profile/profile.module";
|
|
import { SandHubModule } from "./sand-hub/sand-hub.module";
|
|
import { SystemSettingsModule } from "./system-settings/system-settings.module";
|
|
import { ReportsModule } from "./reports/reports.module";
|
|
import { RequestManagementModule } from "./request-management/request-management.module";
|
|
import { UsersModule } from "./users/users.module";
|
|
import { applyIranFaTimestampPlugin } from "./helpers/mongoose-fa-timestamps.plugin";
|
|
import { CronModule } from "./utils/cron/cron.module";
|
|
import { WorkflowStepManagementModule } from "./workflow-step-management/workflow-step-management.module";
|
|
import { DatabaseModule } from "./core/database/database.module";
|
|
import { AppConfigModule } from "./core/config/config.module";
|
|
import { SuperAdminModule } from "./super-admin/super-admin.module";
|
|
import { createHttpModuleOptions } from "./core/config/http-proxy.factory";
|
|
|
|
@Module({
|
|
imports: [
|
|
ManagementModule,
|
|
HttpModule.registerAsync({
|
|
imports: [ConfigModule],
|
|
inject: [ConfigService],
|
|
useFactory: createHttpModuleOptions,
|
|
}),
|
|
AppConfigModule,
|
|
DatabaseModule,
|
|
CronModule,
|
|
ServeStaticModule.forRoot({
|
|
// process.cwd() is always the project/container root (/app in Docker),
|
|
// so the volume-mounted /app/files is resolved correctly regardless of
|
|
// where the compiled dist files live (__dirname would resolve to
|
|
// /app/dist/src because TypeScript preserves the src/ prefix in outDir).
|
|
rootPath: join(process.cwd(), "files"),
|
|
serveRoot: "/files",
|
|
}),
|
|
UsersModule,
|
|
AuthModule,
|
|
ClientModule,
|
|
ProfileModule,
|
|
RequestManagementModule,
|
|
SandHubModule,
|
|
SystemSettingsModule,
|
|
ExpertBlameModule,
|
|
ClaimRequestManagementModule,
|
|
FanavaranModule,
|
|
ExpertClaimModule,
|
|
CaseExpertReportModule,
|
|
AiModule,
|
|
ReportsModule,
|
|
ExpertInsurerModule,
|
|
LookupsModule,
|
|
WorkflowStepManagementModule,
|
|
SuperAdminModule,
|
|
],
|
|
controllers: [],
|
|
providers: [
|
|
{ provide: APP_FILTER, useClass: PersianErrorFilter },
|
|
{ provide: APP_INTERCEPTOR, useClass: PersianErrorInterceptor },
|
|
{
|
|
provide: APP_INTERCEPTOR,
|
|
useClass: UnicodeDigitsNormalizeInterceptor,
|
|
},
|
|
// {
|
|
// provide: APP_PIPE,
|
|
// useValue: new ValidationPipe({
|
|
// transform: true,
|
|
// whitelist: true,
|
|
// forbidNonWhitelisted: false,
|
|
// }),
|
|
// },
|
|
],
|
|
})
|
|
export class AppModule {}
|