diff --git a/apps/api/src/app.module.ts b/apps/api/src/app.module.ts index 98a977c..a347c85 100644 --- a/apps/api/src/app.module.ts +++ b/apps/api/src/app.module.ts @@ -19,6 +19,7 @@ import { MessagingModule } from '@modules/messaging'; import { HttpMetricsInterceptor, MetricsModule } from '@modules/metrics'; import { NotificationsModule } from '@modules/notifications'; import { PaymentsModule } from '@modules/payments'; +import { ProjectsModule } from '@modules/projects'; import { ReportsModule } from '@modules/reports'; import { ReviewsModule } from '@modules/reviews'; import { SearchModule } from '@modules/search'; @@ -60,6 +61,7 @@ import { AppController } from './app.controller'; McpIntegrationModule, MessagingModule, ReportsModule, + ProjectsModule, IndustrialModule, TransferModule, diff --git a/apps/api/src/modules/admin/application/commands/adjust-subscription/adjust-subscription.handler.ts b/apps/api/src/modules/admin/application/commands/adjust-subscription/adjust-subscription.handler.ts index f9db3a3..f19b411 100644 --- a/apps/api/src/modules/admin/application/commands/adjust-subscription/adjust-subscription.handler.ts +++ b/apps/api/src/modules/admin/application/commands/adjust-subscription/adjust-subscription.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { type PlanTier } from '@prisma/client'; -import { DomainException, NotFoundException, ValidationException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, PrismaService, LoggerService } from '@modules/shared'; import { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository } from '@modules/subscriptions'; import { SubscriptionAdjustedEvent } from '../../../domain/events/subscription-adjusted.event'; import { AdjustSubscriptionCommand } from './adjust-subscription.command'; diff --git a/apps/api/src/modules/admin/application/commands/approve-kyc/approve-kyc.handler.ts b/apps/api/src/modules/admin/application/commands/approve-kyc/approve-kyc.handler.ts index 038a534..f906884 100644 --- a/apps/api/src/modules/admin/application/commands/approve-kyc/approve-kyc.handler.ts +++ b/apps/api/src/modules/admin/application/commands/approve-kyc/approve-kyc.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { USER_REPOSITORY, type IUserRepository } from '@modules/auth'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { KycApprovedEvent } from '../../../domain/events/kyc-approved.event'; import { ApproveKycCommand } from './approve-kyc.command'; diff --git a/apps/api/src/modules/admin/application/commands/approve-listing/approve-listing.handler.ts b/apps/api/src/modules/admin/application/commands/approve-listing/approve-listing.handler.ts index 7fc2ec3..ef7f085 100644 --- a/apps/api/src/modules/admin/application/commands/approve-listing/approve-listing.handler.ts +++ b/apps/api/src/modules/admin/application/commands/approve-listing/approve-listing.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { LISTING_REPOSITORY, type IListingRepository } from '@modules/listings'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { ListingApprovedEvent } from '../../../domain/events/listing-approved.event'; import { ApproveListingCommand } from './approve-listing.command'; diff --git a/apps/api/src/modules/admin/application/commands/ban-user/ban-user.handler.ts b/apps/api/src/modules/admin/application/commands/ban-user/ban-user.handler.ts index 765a302..f2029eb 100644 --- a/apps/api/src/modules/admin/application/commands/ban-user/ban-user.handler.ts +++ b/apps/api/src/modules/admin/application/commands/ban-user/ban-user.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { USER_REPOSITORY, type IUserRepository } from '@modules/auth'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { UserBannedEvent } from '../../../domain/events/user-banned.event'; import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event'; import { BanUserCommand } from './ban-user.command'; diff --git a/apps/api/src/modules/admin/application/commands/bulk-moderate-listings/bulk-moderate-listings.handler.ts b/apps/api/src/modules/admin/application/commands/bulk-moderate-listings/bulk-moderate-listings.handler.ts index 4cf248c..af6e49a 100644 --- a/apps/api/src/modules/admin/application/commands/bulk-moderate-listings/bulk-moderate-listings.handler.ts +++ b/apps/api/src/modules/admin/application/commands/bulk-moderate-listings/bulk-moderate-listings.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { LISTING_REPOSITORY, type IListingRepository } from '@modules/listings'; -import { DomainException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, ValidationException, LoggerService } from '@modules/shared'; import { ListingApprovedEvent } from '../../../domain/events/listing-approved.event'; import { ListingRejectedEvent } from '../../../domain/events/listing-rejected.event'; import { BulkModerateListingsCommand } from './bulk-moderate-listings.command'; diff --git a/apps/api/src/modules/admin/application/commands/reject-kyc/reject-kyc.handler.ts b/apps/api/src/modules/admin/application/commands/reject-kyc/reject-kyc.handler.ts index 3e6892a..1141a57 100644 --- a/apps/api/src/modules/admin/application/commands/reject-kyc/reject-kyc.handler.ts +++ b/apps/api/src/modules/admin/application/commands/reject-kyc/reject-kyc.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { USER_REPOSITORY, type IUserRepository } from '@modules/auth'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { KycRejectedEvent } from '../../../domain/events/kyc-rejected.event'; import { RejectKycCommand } from './reject-kyc.command'; diff --git a/apps/api/src/modules/admin/application/commands/reject-listing/reject-listing.handler.ts b/apps/api/src/modules/admin/application/commands/reject-listing/reject-listing.handler.ts index 825b63d..25fcd4a 100644 --- a/apps/api/src/modules/admin/application/commands/reject-listing/reject-listing.handler.ts +++ b/apps/api/src/modules/admin/application/commands/reject-listing/reject-listing.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { LISTING_REPOSITORY, type IListingRepository } from '@modules/listings'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { ListingRejectedEvent } from '../../../domain/events/listing-rejected.event'; import { RejectListingCommand } from './reject-listing.command'; diff --git a/apps/api/src/modules/admin/application/commands/update-user-status/update-user-status.handler.ts b/apps/api/src/modules/admin/application/commands/update-user-status/update-user-status.handler.ts index af3a088..d302316 100644 --- a/apps/api/src/modules/admin/application/commands/update-user-status/update-user-status.handler.ts +++ b/apps/api/src/modules/admin/application/commands/update-user-status/update-user-status.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { USER_REPOSITORY, type IUserRepository } from '@modules/auth'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { UserBannedEvent } from '../../../domain/events/user-banned.event'; import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event'; import { UpdateUserStatusCommand } from './update-user-status.command'; diff --git a/apps/api/src/modules/admin/application/listeners/admin-audit.listener.ts b/apps/api/src/modules/admin/application/listeners/admin-audit.listener.ts index edba8f6..b0b1732 100644 --- a/apps/api/src/modules/admin/application/listeners/admin-audit.listener.ts +++ b/apps/api/src/modules/admin/application/listeners/admin-audit.listener.ts @@ -1,6 +1,6 @@ import { Inject, Injectable } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { type KycApprovedEvent } from '../../domain/events/kyc-approved.event'; import { type KycRejectedEvent } from '../../domain/events/kyc-rejected.event'; import { type ListingApprovedEvent } from '../../domain/events/listing-approved.event'; diff --git a/apps/api/src/modules/admin/application/listeners/user-banned.listener.ts b/apps/api/src/modules/admin/application/listeners/user-banned.listener.ts index f082e10..4ac0ef6 100644 --- a/apps/api/src/modules/admin/application/listeners/user-banned.listener.ts +++ b/apps/api/src/modules/admin/application/listeners/user-banned.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { SendNotificationCommand } from '@modules/notifications'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { type UserBannedEvent } from '../../domain/events/user-banned.event'; @Injectable() diff --git a/apps/api/src/modules/admin/application/listeners/user-deactivated.listener.ts b/apps/api/src/modules/admin/application/listeners/user-deactivated.listener.ts index 8092526..a091dd9 100644 --- a/apps/api/src/modules/admin/application/listeners/user-deactivated.listener.ts +++ b/apps/api/src/modules/admin/application/listeners/user-deactivated.listener.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; import { type UserDeactivatedEvent } from '@modules/auth'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; @Injectable() export class UserDeactivatedListener { diff --git a/apps/api/src/modules/admin/application/queries/get-audit-logs/get-audit-logs.handler.ts b/apps/api/src/modules/admin/application/queries/get-audit-logs/get-audit-logs.handler.ts index 7d9eb06..cc4b2e2 100644 --- a/apps/api/src/modules/admin/application/queries/get-audit-logs/get-audit-logs.handler.ts +++ b/apps/api/src/modules/admin/application/queries/get-audit-logs/get-audit-logs.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { AUDIT_LOG_REPOSITORY, type IAuditLogRepository, diff --git a/apps/api/src/modules/admin/application/queries/get-dashboard-stats/get-dashboard-stats.handler.ts b/apps/api/src/modules/admin/application/queries/get-dashboard-stats/get-dashboard-stats.handler.ts index 472a163..85557de 100644 --- a/apps/api/src/modules/admin/application/queries/get-dashboard-stats/get-dashboard-stats.handler.ts +++ b/apps/api/src/modules/admin/application/queries/get-dashboard-stats/get-dashboard-stats.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type DashboardStats } from '../../../domain/repositories/admin-query.repository'; import { GetDashboardStatsQuery } from './get-dashboard-stats.query'; diff --git a/apps/api/src/modules/admin/application/queries/get-kyc-queue/get-kyc-queue.handler.ts b/apps/api/src/modules/admin/application/queries/get-kyc-queue/get-kyc-queue.handler.ts index 96f8c46..3f939fc 100644 --- a/apps/api/src/modules/admin/application/queries/get-kyc-queue/get-kyc-queue.handler.ts +++ b/apps/api/src/modules/admin/application/queries/get-kyc-queue/get-kyc-queue.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type KycQueueResult } from '../../../domain/repositories/admin-query.repository'; import { GetKycQueueQuery } from './get-kyc-queue.query'; diff --git a/apps/api/src/modules/admin/application/queries/get-moderation-queue/get-moderation-queue.handler.ts b/apps/api/src/modules/admin/application/queries/get-moderation-queue/get-moderation-queue.handler.ts index 5b4b6da..f840fcd 100644 --- a/apps/api/src/modules/admin/application/queries/get-moderation-queue/get-moderation-queue.handler.ts +++ b/apps/api/src/modules/admin/application/queries/get-moderation-queue/get-moderation-queue.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type ModerationQueueResult } from '../../../domain/repositories/admin-query.repository'; import { GetModerationQueueQuery } from './get-moderation-queue.query'; diff --git a/apps/api/src/modules/admin/application/queries/get-revenue-stats/get-revenue-stats.handler.ts b/apps/api/src/modules/admin/application/queries/get-revenue-stats/get-revenue-stats.handler.ts index 33329fa..72ecb02 100644 --- a/apps/api/src/modules/admin/application/queries/get-revenue-stats/get-revenue-stats.handler.ts +++ b/apps/api/src/modules/admin/application/queries/get-revenue-stats/get-revenue-stats.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type RevenueStatsItem } from '../../../domain/repositories/admin-query.repository'; import { GetRevenueStatsQuery } from './get-revenue-stats.query'; diff --git a/apps/api/src/modules/admin/application/queries/get-user-detail/get-user-detail.handler.ts b/apps/api/src/modules/admin/application/queries/get-user-detail/get-user-detail.handler.ts index 3dadb78..c74efe7 100644 --- a/apps/api/src/modules/admin/application/queries/get-user-detail/get-user-detail.handler.ts +++ b/apps/api/src/modules/admin/application/queries/get-user-detail/get-user-detail.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, LoggerService } from '@modules/shared'; import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type UserDetail } from '../../../domain/repositories/admin-query.repository'; import { GetUserDetailQuery } from './get-user-detail.query'; diff --git a/apps/api/src/modules/admin/application/queries/get-users/get-users.handler.ts b/apps/api/src/modules/admin/application/queries/get-users/get-users.handler.ts index e6b9fa9..b415cd6 100644 --- a/apps/api/src/modules/admin/application/queries/get-users/get-users.handler.ts +++ b/apps/api/src/modules/admin/application/queries/get-users/get-users.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type UserListResult } from '../../../domain/repositories/admin-query.repository'; import { GetUsersQuery } from './get-users.query'; diff --git a/apps/api/src/modules/admin/infrastructure/repositories/prisma-admin-query.repository.ts b/apps/api/src/modules/admin/infrastructure/repositories/prisma-admin-query.repository.ts index 2f7ff0b..6b232d7 100644 --- a/apps/api/src/modules/admin/infrastructure/repositories/prisma-admin-query.repository.ts +++ b/apps/api/src/modules/admin/infrastructure/repositories/prisma-admin-query.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type IAdminQueryRepository, type ModerationQueueResult, diff --git a/apps/api/src/modules/admin/infrastructure/repositories/prisma-audit-log.repository.ts b/apps/api/src/modules/admin/infrastructure/repositories/prisma-audit-log.repository.ts index 41b1888..52f9bfe 100644 --- a/apps/api/src/modules/admin/infrastructure/repositories/prisma-audit-log.repository.ts +++ b/apps/api/src/modules/admin/infrastructure/repositories/prisma-audit-log.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type AdminAction, type AuditTargetType, type Prisma } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type IAuditLogRepository, type AuditLogEntry, diff --git a/apps/api/src/modules/admin/presentation/controllers/admin-moderation.controller.ts b/apps/api/src/modules/admin/presentation/controllers/admin-moderation.controller.ts index 0175d3f..94413dd 100644 --- a/apps/api/src/modules/admin/presentation/controllers/admin-moderation.controller.ts +++ b/apps/api/src/modules/admin/presentation/controllers/admin-moderation.controller.ts @@ -8,7 +8,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiParam, ApiQuery } from '@nestjs/swagger'; import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth'; import { @@ -31,12 +31,12 @@ import { type ModerationQueueResult, type KycQueueResult, } from '../../domain/repositories/admin-query.repository'; -import { type AdminFeatureListingDto } from '../dto/admin-feature-listing.dto'; -import { type ApproveKycDto } from '../dto/approve-kyc.dto'; -import { type ApproveListingDto } from '../dto/approve-listing.dto'; -import { type BulkModerateDto } from '../dto/bulk-moderate.dto'; -import { type RejectKycDto } from '../dto/reject-kyc.dto'; -import { type RejectListingDto } from '../dto/reject-listing.dto'; +import { AdminFeatureListingDto } from '../dto/admin-feature-listing.dto'; +import { ApproveKycDto } from '../dto/approve-kyc.dto'; +import { ApproveListingDto } from '../dto/approve-listing.dto'; +import { BulkModerateDto } from '../dto/bulk-moderate.dto'; +import { RejectKycDto } from '../dto/reject-kyc.dto'; +import { RejectListingDto } from '../dto/reject-listing.dto'; @ApiTags('admin') @ApiBearerAuth('JWT') diff --git a/apps/api/src/modules/admin/presentation/controllers/admin.controller.ts b/apps/api/src/modules/admin/presentation/controllers/admin.controller.ts index 55dad48..afcb616 100644 --- a/apps/api/src/modules/admin/presentation/controllers/admin.controller.ts +++ b/apps/api/src/modules/admin/presentation/controllers/admin.controller.ts @@ -8,7 +8,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiQuery, ApiParam } from '@nestjs/swagger'; import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth'; import { AdjustSubscriptionCommand } from '../../application/commands/adjust-subscription/adjust-subscription.command'; @@ -29,12 +29,12 @@ import { type UserDetail, } from '../../domain/repositories/admin-query.repository'; import { type AuditLogListResult } from '../../domain/repositories/audit-log.repository'; -import { type AdjustSubscriptionDto } from '../dto/adjust-subscription.dto'; -import { type BanUserDto } from '../dto/ban-user.dto'; -import { type GetAuditLogsQueryDto } from '../dto/get-audit-logs-query.dto'; -import { type GetUsersQueryDto } from '../dto/get-users-query.dto'; -import { type RevenueStatsDto } from '../dto/revenue-stats.dto'; -import { type UpdateUserStatusDto } from '../dto/update-user-status.dto'; +import { AdjustSubscriptionDto } from '../dto/adjust-subscription.dto'; +import { BanUserDto } from '../dto/ban-user.dto'; +import { GetAuditLogsQueryDto } from '../dto/get-audit-logs-query.dto'; +import { GetUsersQueryDto } from '../dto/get-users-query.dto'; +import { RevenueStatsDto } from '../dto/revenue-stats.dto'; +import { UpdateUserStatusDto } from '../dto/update-user-status.dto'; @ApiTags('admin') @ApiBearerAuth('JWT') diff --git a/apps/api/src/modules/agents/application/commands/recalculate-quality-score/recalculate-quality-score.handler.ts b/apps/api/src/modules/agents/application/commands/recalculate-quality-score/recalculate-quality-score.handler.ts index c4e41f1..468d6d5 100644 --- a/apps/api/src/modules/agents/application/commands/recalculate-quality-score/recalculate-quality-score.handler.ts +++ b/apps/api/src/modules/agents/application/commands/recalculate-quality-score/recalculate-quality-score.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, LoggerService } from '@modules/shared'; import { AGENT_REPOSITORY, type IAgentRepository, diff --git a/apps/api/src/modules/agents/application/listeners/review-events.listener.ts b/apps/api/src/modules/agents/application/listeners/review-events.listener.ts index a2fc8a3..79ebc77 100644 --- a/apps/api/src/modules/agents/application/listeners/review-events.listener.ts +++ b/apps/api/src/modules/agents/application/listeners/review-events.listener.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { RecalculateQualityScoreCommand } from '../commands/recalculate-quality-score/recalculate-quality-score.command'; @Injectable() diff --git a/apps/api/src/modules/agents/application/queries/get-agent-dashboard/get-agent-dashboard.handler.ts b/apps/api/src/modules/agents/application/queries/get-agent-dashboard/get-agent-dashboard.handler.ts index a990cc8..75ec160 100644 --- a/apps/api/src/modules/agents/application/queries/get-agent-dashboard/get-agent-dashboard.handler.ts +++ b/apps/api/src/modules/agents/application/queries/get-agent-dashboard/get-agent-dashboard.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, LoggerService } from '@modules/shared'; import { AGENT_REPOSITORY, type AgentDashboardData, diff --git a/apps/api/src/modules/agents/application/queries/get-agent-public-profile/get-agent-public-profile.handler.ts b/apps/api/src/modules/agents/application/queries/get-agent-public-profile/get-agent-public-profile.handler.ts index a172770..2f4ff05 100644 --- a/apps/api/src/modules/agents/application/queries/get-agent-public-profile/get-agent-public-profile.handler.ts +++ b/apps/api/src/modules/agents/application/queries/get-agent-public-profile/get-agent-public-profile.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { AGENT_REPOSITORY, type AgentPublicProfileData, diff --git a/apps/api/src/modules/agents/infrastructure/repositories/prisma-agent.repository.ts b/apps/api/src/modules/agents/infrastructure/repositories/prisma-agent.repository.ts index e1a2d1a..97ac51e 100644 --- a/apps/api/src/modules/agents/infrastructure/repositories/prisma-agent.repository.ts +++ b/apps/api/src/modules/agents/infrastructure/repositories/prisma-agent.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { AgentEntity } from '../../domain/entities/agent.entity'; import { type AgentDashboardData, diff --git a/apps/api/src/modules/agents/presentation/controllers/agents.controller.ts b/apps/api/src/modules/agents/presentation/controllers/agents.controller.ts index 169db83..056bc05 100644 --- a/apps/api/src/modules/agents/presentation/controllers/agents.controller.ts +++ b/apps/api/src/modules/agents/presentation/controllers/agents.controller.ts @@ -1,5 +1,5 @@ import { Controller, Get, NotFoundException, Param, Post, UseGuards } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiBearerAuth, ApiOperation, diff --git a/apps/api/src/modules/analytics/application/commands/generate-report/generate-report.handler.ts b/apps/api/src/modules/analytics/application/commands/generate-report/generate-report.handler.ts index 426bbc2..8e135a8 100644 --- a/apps/api/src/modules/analytics/application/commands/generate-report/generate-report.handler.ts +++ b/apps/api/src/modules/analytics/application/commands/generate-report/generate-report.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { MARKET_INDEX_REPOSITORY, type IMarketIndexRepository, diff --git a/apps/api/src/modules/analytics/application/commands/track-event/track-event.handler.ts b/apps/api/src/modules/analytics/application/commands/track-event/track-event.handler.ts index aed22ad..552c507 100644 --- a/apps/api/src/modules/analytics/application/commands/track-event/track-event.handler.ts +++ b/apps/api/src/modules/analytics/application/commands/track-event/track-event.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { TrackEventCommand } from './track-event.command'; export interface TrackEventResult { diff --git a/apps/api/src/modules/analytics/application/commands/update-market-index/update-market-index.handler.ts b/apps/api/src/modules/analytics/application/commands/update-market-index/update-market-index.handler.ts index 4b6bd95..0184e8d 100644 --- a/apps/api/src/modules/analytics/application/commands/update-market-index/update-market-index.handler.ts +++ b/apps/api/src/modules/analytics/application/commands/update-market-index/update-market-index.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type CacheService, CachePrefix, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, LoggerService } from '@modules/shared'; import { MarketIndexEntity } from '../../../domain/entities/market-index.entity'; import { MARKET_INDEX_REPOSITORY, diff --git a/apps/api/src/modules/analytics/application/event-handlers/listing-created-moderation.handler.ts b/apps/api/src/modules/analytics/application/event-handlers/listing-created-moderation.handler.ts index 3ad8fdd..c7da6f0 100644 --- a/apps/api/src/modules/analytics/application/event-handlers/listing-created-moderation.handler.ts +++ b/apps/api/src/modules/analytics/application/event-handlers/listing-created-moderation.handler.ts @@ -1,7 +1,7 @@ import { Inject } from '@nestjs/common'; -import { EventsHandler, type IEventHandler, type CommandBus } from '@nestjs/cqrs'; +import { EventsHandler, type IEventHandler, CommandBus } from '@nestjs/cqrs'; import { ListingCreatedEvent, ModerateListingCommand } from '@modules/listings'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; import { AI_SERVICE_CLIENT, type IAiServiceClient, diff --git a/apps/api/src/modules/analytics/application/queries/batch-valuation/batch-valuation.handler.ts b/apps/api/src/modules/analytics/application/queries/batch-valuation/batch-valuation.handler.ts index 9a0d7b6..c186773 100644 --- a/apps/api/src/modules/analytics/application/queries/batch-valuation/batch-valuation.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/batch-valuation/batch-valuation.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { CacheService, CachePrefix, CacheTTL, DomainException, type LoggerService } from '@modules/shared'; +import { CacheService, CachePrefix, CacheTTL, DomainException, LoggerService } from '@modules/shared'; import { AVM_SERVICE, type IAVMService, diff --git a/apps/api/src/modules/analytics/application/queries/get-district-stats/get-district-stats.handler.ts b/apps/api/src/modules/analytics/application/queries/get-district-stats/get-district-stats.handler.ts index 508c700..52d86c4 100644 --- a/apps/api/src/modules/analytics/application/queries/get-district-stats/get-district-stats.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/get-district-stats/get-district-stats.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type CacheService, CachePrefix, CacheTTL, Cacheable, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, Cacheable, LoggerService } from '@modules/shared'; import { MARKET_INDEX_REPOSITORY, type IMarketIndexRepository, diff --git a/apps/api/src/modules/analytics/application/queries/get-heatmap/get-heatmap.handler.ts b/apps/api/src/modules/analytics/application/queries/get-heatmap/get-heatmap.handler.ts index 9f715fe..5f5f7b2 100644 --- a/apps/api/src/modules/analytics/application/queries/get-heatmap/get-heatmap.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/get-heatmap/get-heatmap.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared'; import { MARKET_INDEX_REPOSITORY, type IMarketIndexRepository, diff --git a/apps/api/src/modules/analytics/application/queries/get-market-report/get-market-report.handler.ts b/apps/api/src/modules/analytics/application/queries/get-market-report/get-market-report.handler.ts index 3fb0697..d3bcaf0 100644 --- a/apps/api/src/modules/analytics/application/queries/get-market-report/get-market-report.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/get-market-report/get-market-report.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared'; import { MARKET_INDEX_REPOSITORY, type IMarketIndexRepository, diff --git a/apps/api/src/modules/analytics/application/queries/get-price-trend/get-price-trend.handler.ts b/apps/api/src/modules/analytics/application/queries/get-price-trend/get-price-trend.handler.ts index 29b8b29..bd389f9 100644 --- a/apps/api/src/modules/analytics/application/queries/get-price-trend/get-price-trend.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/get-price-trend/get-price-trend.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared'; import { MARKET_INDEX_REPOSITORY, type IMarketIndexRepository, diff --git a/apps/api/src/modules/analytics/application/queries/get-valuation/get-valuation.handler.ts b/apps/api/src/modules/analytics/application/queries/get-valuation/get-valuation.handler.ts index d606f3f..6317f51 100644 --- a/apps/api/src/modules/analytics/application/queries/get-valuation/get-valuation.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/get-valuation/get-valuation.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared'; import { AVM_SERVICE, type IAVMService, diff --git a/apps/api/src/modules/analytics/application/queries/industrial-valuation/industrial-valuation.handler.ts b/apps/api/src/modules/analytics/application/queries/industrial-valuation/industrial-valuation.handler.ts index 343b384..3da5a15 100644 --- a/apps/api/src/modules/analytics/application/queries/industrial-valuation/industrial-valuation.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/industrial-valuation/industrial-valuation.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { AI_SERVICE_CLIENT, type IAiServiceClient, diff --git a/apps/api/src/modules/analytics/application/queries/valuation-comparison/valuation-comparison.handler.ts b/apps/api/src/modules/analytics/application/queries/valuation-comparison/valuation-comparison.handler.ts index 739cb97..c3b0572 100644 --- a/apps/api/src/modules/analytics/application/queries/valuation-comparison/valuation-comparison.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/valuation-comparison/valuation-comparison.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { CacheService, CachePrefix, CacheTTL, DomainException, type LoggerService, type PrismaService } from '@modules/shared'; +import { CacheService, CachePrefix, CacheTTL, DomainException, LoggerService, PrismaService } from '@modules/shared'; import { AVM_SERVICE, type IAVMService, diff --git a/apps/api/src/modules/analytics/application/queries/valuation-history/valuation-history.handler.ts b/apps/api/src/modules/analytics/application/queries/valuation-history/valuation-history.handler.ts index 8597f52..80a2d6b 100644 --- a/apps/api/src/modules/analytics/application/queries/valuation-history/valuation-history.handler.ts +++ b/apps/api/src/modules/analytics/application/queries/valuation-history/valuation-history.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { CacheService, CachePrefix, CacheTTL, DomainException, type LoggerService } from '@modules/shared'; +import { CacheService, CachePrefix, CacheTTL, DomainException, LoggerService } from '@modules/shared'; import { VALUATION_REPOSITORY, type IValuationRepository, diff --git a/apps/api/src/modules/analytics/infrastructure/repositories/prisma-market-index.repository.ts b/apps/api/src/modules/analytics/infrastructure/repositories/prisma-market-index.repository.ts index 6691829..1dee441 100644 --- a/apps/api/src/modules/analytics/infrastructure/repositories/prisma-market-index.repository.ts +++ b/apps/api/src/modules/analytics/infrastructure/repositories/prisma-market-index.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type MarketIndex as PrismaMarketIndex, type PropertyType } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { MarketIndexEntity, type MarketIndexProps } from '../../domain/entities/market-index.entity'; import { type IMarketIndexRepository, diff --git a/apps/api/src/modules/analytics/infrastructure/repositories/prisma-valuation.repository.ts b/apps/api/src/modules/analytics/infrastructure/repositories/prisma-valuation.repository.ts index 55add02..ae83c27 100644 --- a/apps/api/src/modules/analytics/infrastructure/repositories/prisma-valuation.repository.ts +++ b/apps/api/src/modules/analytics/infrastructure/repositories/prisma-valuation.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Prisma, type Valuation as PrismaValuation } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { ValuationEntity, type ValuationProps } from '../../domain/entities/valuation.entity'; import { type IValuationRepository } from '../../domain/repositories/valuation.repository'; diff --git a/apps/api/src/modules/analytics/infrastructure/services/ai-service.client.ts b/apps/api/src/modules/analytics/infrastructure/services/ai-service.client.ts index 4321051..6c3ade1 100644 --- a/apps/api/src/modules/analytics/infrastructure/services/ai-service.client.ts +++ b/apps/api/src/modules/analytics/infrastructure/services/ai-service.client.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; export interface AiPredictRequest { area: number; diff --git a/apps/api/src/modules/analytics/infrastructure/services/avm-retrain-cron.service.ts b/apps/api/src/modules/analytics/infrastructure/services/avm-retrain-cron.service.ts index ccb7988..299c5e8 100644 --- a/apps/api/src/modules/analytics/infrastructure/services/avm-retrain-cron.service.ts +++ b/apps/api/src/modules/analytics/infrastructure/services/avm-retrain-cron.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { Cron } from '@nestjs/schedule'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; @Injectable() export class AvmRetrainCronService { diff --git a/apps/api/src/modules/analytics/infrastructure/services/http-avm.service.ts b/apps/api/src/modules/analytics/infrastructure/services/http-avm.service.ts index 744d741..ac47257 100644 --- a/apps/api/src/modules/analytics/infrastructure/services/http-avm.service.ts +++ b/apps/api/src/modules/analytics/infrastructure/services/http-avm.service.ts @@ -1,5 +1,5 @@ import { Inject, Injectable } from '@nestjs/common'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; import { type IAVMService, type AVMParams, @@ -13,7 +13,7 @@ import { type IAiServiceClient, type AiPredictRequest, } from './ai-service.client'; -import { type PrismaAVMService } from './prisma-avm.service'; +import { PrismaAVMService } from './prisma-avm.service'; /** Max concurrency for batch AI calls to avoid overloading the Python service. */ const BATCH_CONCURRENCY = 5; diff --git a/apps/api/src/modules/analytics/infrastructure/services/market-index-cron.service.ts b/apps/api/src/modules/analytics/infrastructure/services/market-index-cron.service.ts index 3c28472..730eac7 100644 --- a/apps/api/src/modules/analytics/infrastructure/services/market-index-cron.service.ts +++ b/apps/api/src/modules/analytics/infrastructure/services/market-index-cron.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { Cron, CronExpression } from '@nestjs/schedule'; import { PropertyType } from '@prisma/client'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; import { UpdateMarketIndexCommand } from '../../application/commands/update-market-index/update-market-index.command'; interface MarketStats { diff --git a/apps/api/src/modules/analytics/infrastructure/services/neighborhood-score.service.ts b/apps/api/src/modules/analytics/infrastructure/services/neighborhood-score.service.ts index ab0182a..b5a21bd 100644 --- a/apps/api/src/modules/analytics/infrastructure/services/neighborhood-score.service.ts +++ b/apps/api/src/modules/analytics/infrastructure/services/neighborhood-score.service.ts @@ -1,6 +1,6 @@ import { Inject, Injectable } from '@nestjs/common'; import { POIType } from '@prisma/client'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; import { type INeighborhoodScoreService, type NeighborhoodScoreResult, diff --git a/apps/api/src/modules/analytics/infrastructure/services/prisma-avm.service.ts b/apps/api/src/modules/analytics/infrastructure/services/prisma-avm.service.ts index 947addd..4d66a08 100644 --- a/apps/api/src/modules/analytics/infrastructure/services/prisma-avm.service.ts +++ b/apps/api/src/modules/analytics/infrastructure/services/prisma-avm.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type PropertyType } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type IAVMService, type AVMParams, diff --git a/apps/api/src/modules/analytics/presentation/controllers/analytics.controller.ts b/apps/api/src/modules/analytics/presentation/controllers/analytics.controller.ts index 0a3a0c3..04f90ce 100644 --- a/apps/api/src/modules/analytics/presentation/controllers/analytics.controller.ts +++ b/apps/api/src/modules/analytics/presentation/controllers/analytics.controller.ts @@ -7,7 +7,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type QueryBus } from '@nestjs/cqrs'; +import { QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiParam } from '@nestjs/swagger'; import { JwtAuthGuard } from '@modules/auth'; import { EndpointRateLimit, EndpointRateLimitGuard } from '@modules/shared'; @@ -30,14 +30,14 @@ import { ValuationComparisonQuery } from '../../application/queries/valuation-co import { type ValuationHistoryDto as ValuationHistoryResultDto } from '../../application/queries/valuation-history/valuation-history.handler'; import { ValuationHistoryQuery } from '../../application/queries/valuation-history/valuation-history.query'; import { type NeighborhoodScoreResult } from '../../domain/services/neighborhood-score.service'; -import { type BatchValuationDto } from '../dto/batch-valuation.dto'; -import { type GetDistrictStatsDto } from '../dto/get-district-stats.dto'; -import { type GetHeatmapDto } from '../dto/get-heatmap.dto'; -import { type GetMarketReportDto } from '../dto/get-market-report.dto'; -import { type GetPriceTrendDto } from '../dto/get-price-trend.dto'; -import { type GetValuationDto } from '../dto/get-valuation.dto'; -import { type ValuationComparisonDto } from '../dto/valuation-comparison.dto'; -import { type ValuationHistoryDto } from '../dto/valuation-history.dto'; +import { BatchValuationDto } from '../dto/batch-valuation.dto'; +import { GetDistrictStatsDto } from '../dto/get-district-stats.dto'; +import { GetHeatmapDto } from '../dto/get-heatmap.dto'; +import { GetMarketReportDto } from '../dto/get-market-report.dto'; +import { GetPriceTrendDto } from '../dto/get-price-trend.dto'; +import { GetValuationDto } from '../dto/get-valuation.dto'; +import { ValuationComparisonDto } from '../dto/valuation-comparison.dto'; +import { ValuationHistoryDto } from '../dto/valuation-history.dto'; @ApiTags('analytics') @Controller('analytics') diff --git a/apps/api/src/modules/analytics/presentation/controllers/avm.controller.ts b/apps/api/src/modules/analytics/presentation/controllers/avm.controller.ts index acff2a1..684d135 100644 --- a/apps/api/src/modules/analytics/presentation/controllers/avm.controller.ts +++ b/apps/api/src/modules/analytics/presentation/controllers/avm.controller.ts @@ -7,7 +7,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type QueryBus } from '@nestjs/cqrs'; +import { QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiParam, ApiQuery } from '@nestjs/swagger'; import { JwtAuthGuard } from '@modules/auth'; import { EndpointRateLimit, EndpointRateLimitGuard } from '@modules/shared'; @@ -20,10 +20,10 @@ import { type ValuationComparisonDto as ValuationComparisonResultDto } from '../ import { ValuationComparisonQuery } from '../../application/queries/valuation-comparison/valuation-comparison.query'; import { type ValuationHistoryDto as ValuationHistoryResultDto } from '../../application/queries/valuation-history/valuation-history.handler'; import { ValuationHistoryQuery } from '../../application/queries/valuation-history/valuation-history.query'; -import { type AvmCompareQueryDto } from '../dto/avm-compare-query.dto'; -import { type BatchValuationDto } from '../dto/batch-valuation.dto'; -import { type IndustrialValuationDto } from '../dto/industrial-valuation.dto'; -import { type ValuationHistoryDto } from '../dto/valuation-history.dto'; +import { AvmCompareQueryDto } from '../dto/avm-compare-query.dto'; +import { BatchValuationDto } from '../dto/batch-valuation.dto'; +import { IndustrialValuationDto } from '../dto/industrial-valuation.dto'; +import { ValuationHistoryDto } from '../dto/valuation-history.dto'; @ApiTags('avm') @Controller('avm') diff --git a/apps/api/src/modules/auth/application/commands/cancel-user-deletion/cancel-user-deletion.handler.ts b/apps/api/src/modules/auth/application/commands/cancel-user-deletion/cancel-user-deletion.handler.ts index 7b95c15..6cb934a 100644 --- a/apps/api/src/modules/auth/application/commands/cancel-user-deletion/cancel-user-deletion.handler.ts +++ b/apps/api/src/modules/auth/application/commands/cancel-user-deletion/cancel-user-deletion.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { type LoggerService, type PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared'; +import { LoggerService, PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared'; import { CancelUserDeletionCommand } from './cancel-user-deletion.command'; @CommandHandler(CancelUserDeletionCommand) diff --git a/apps/api/src/modules/auth/application/commands/disable-mfa/disable-mfa.handler.ts b/apps/api/src/modules/auth/application/commands/disable-mfa/disable-mfa.handler.ts index 44b0c76..1ac3faf 100644 --- a/apps/api/src/modules/auth/application/commands/disable-mfa/disable-mfa.handler.ts +++ b/apps/api/src/modules/auth/application/commands/disable-mfa/disable-mfa.handler.ts @@ -1,8 +1,8 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, UnauthorizedException, ValidationException } from '@modules/shared'; +import { DomainException, LoggerService, UnauthorizedException, ValidationException } from '@modules/shared'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; -import { type MfaService } from '../../../infrastructure/services/mfa.service'; +import { MfaService } from '../../../infrastructure/services/mfa.service'; import { DisableMfaCommand } from './disable-mfa.command'; @CommandHandler(DisableMfaCommand) diff --git a/apps/api/src/modules/auth/application/commands/export-user-data/export-user-data.handler.ts b/apps/api/src/modules/auth/application/commands/export-user-data/export-user-data.handler.ts index d1997aa..c178822 100644 --- a/apps/api/src/modules/auth/application/commands/export-user-data/export-user-data.handler.ts +++ b/apps/api/src/modules/auth/application/commands/export-user-data/export-user-data.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { type LoggerService, type PrismaService, DomainException, NotFoundException } from '@modules/shared'; +import { LoggerService, PrismaService, DomainException, NotFoundException } from '@modules/shared'; import { ExportUserDataCommand } from './export-user-data.command'; export interface UserDataExport { diff --git a/apps/api/src/modules/auth/application/commands/force-delete-user/force-delete-user.handler.ts b/apps/api/src/modules/auth/application/commands/force-delete-user/force-delete-user.handler.ts index add9723..9fde04c 100644 --- a/apps/api/src/modules/auth/application/commands/force-delete-user/force-delete-user.handler.ts +++ b/apps/api/src/modules/auth/application/commands/force-delete-user/force-delete-user.handler.ts @@ -1,7 +1,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { Prisma } from '@prisma/client'; -import { type LoggerService, type PrismaService, DomainException, NotFoundException } from '@modules/shared'; +import { LoggerService, PrismaService, DomainException, NotFoundException } from '@modules/shared'; import { ForceDeleteUserCommand } from './force-delete-user.command'; @CommandHandler(ForceDeleteUserCommand) diff --git a/apps/api/src/modules/auth/application/commands/generate-kyc-upload-urls/generate-kyc-upload-urls.handler.ts b/apps/api/src/modules/auth/application/commands/generate-kyc-upload-urls/generate-kyc-upload-urls.handler.ts index 81c3403..a68c9b3 100644 --- a/apps/api/src/modules/auth/application/commands/generate-kyc-upload-urls/generate-kyc-upload-urls.handler.ts +++ b/apps/api/src/modules/auth/application/commands/generate-kyc-upload-urls/generate-kyc-upload-urls.handler.ts @@ -3,7 +3,7 @@ import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { NotFoundException, ValidationException, - type LoggerService, + LoggerService, } from '@modules/shared'; import { MEDIA_STORAGE_SERVICE, diff --git a/apps/api/src/modules/auth/application/commands/login-user/login-user.handler.ts b/apps/api/src/modules/auth/application/commands/login-user/login-user.handler.ts index 3b92086..bcca12a 100644 --- a/apps/api/src/modules/auth/application/commands/login-user/login-user.handler.ts +++ b/apps/api/src/modules/auth/application/commands/login-user/login-user.handler.ts @@ -1,12 +1,12 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { type LoggerService, DomainException } from '@modules/shared'; +import { LoggerService, DomainException } from '@modules/shared'; import { MFA_CHALLENGE_REPOSITORY, type IMfaChallengeRepository, } from '../../../domain/repositories/mfa-challenge.repository'; -import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; +import { TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; import { LoginUserCommand } from './login-user.command'; const MFA_CHALLENGE_TTL_MINUTES = 5; diff --git a/apps/api/src/modules/auth/application/commands/process-scheduled-deletions/process-scheduled-deletions.handler.ts b/apps/api/src/modules/auth/application/commands/process-scheduled-deletions/process-scheduled-deletions.handler.ts index 70094db..e34f81f 100644 --- a/apps/api/src/modules/auth/application/commands/process-scheduled-deletions/process-scheduled-deletions.handler.ts +++ b/apps/api/src/modules/auth/application/commands/process-scheduled-deletions/process-scheduled-deletions.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type CommandBus, type ICommandHandler } from '@nestjs/cqrs'; -import { type LoggerService, type PrismaService, DomainException } from '@modules/shared'; +import { CommandHandler, CommandBus, type ICommandHandler } from '@nestjs/cqrs'; +import { LoggerService, PrismaService, DomainException } from '@modules/shared'; import { ForceDeleteUserCommand } from '../force-delete-user/force-delete-user.command'; import { ProcessScheduledDeletionsCommand } from './process-scheduled-deletions.command'; diff --git a/apps/api/src/modules/auth/application/commands/refresh-token/refresh-token.handler.ts b/apps/api/src/modules/auth/application/commands/refresh-token/refresh-token.handler.ts index f361b7c..ebb03b5 100644 --- a/apps/api/src/modules/auth/application/commands/refresh-token/refresh-token.handler.ts +++ b/apps/api/src/modules/auth/application/commands/refresh-token/refresh-token.handler.ts @@ -1,8 +1,8 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { type LoggerService, DomainException, UnauthorizedException } from '@modules/shared'; +import { LoggerService, DomainException, UnauthorizedException } from '@modules/shared'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; -import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; +import { TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; import { RefreshTokenCommand } from './refresh-token.command'; @CommandHandler(RefreshTokenCommand) diff --git a/apps/api/src/modules/auth/application/commands/register-user/register-user.handler.ts b/apps/api/src/modules/auth/application/commands/register-user/register-user.handler.ts index fb2d098..141ed5c 100644 --- a/apps/api/src/modules/auth/application/commands/register-user/register-user.handler.ts +++ b/apps/api/src/modules/auth/application/commands/register-user/register-user.handler.ts @@ -1,13 +1,13 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { ConflictException, DomainException, type LoggerService, ValidationException } from '@modules/shared'; +import { ConflictException, DomainException, LoggerService, ValidationException } from '@modules/shared'; import { UserEntity } from '../../../domain/entities/user.entity'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; import { Email } from '../../../domain/value-objects/email.vo'; import { HashedPassword } from '../../../domain/value-objects/hashed-password.vo'; import { Phone } from '../../../domain/value-objects/phone.vo'; -import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; +import { TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; import { RegisterUserCommand } from './register-user.command'; @CommandHandler(RegisterUserCommand) diff --git a/apps/api/src/modules/auth/application/commands/request-user-deletion/request-user-deletion.handler.ts b/apps/api/src/modules/auth/application/commands/request-user-deletion/request-user-deletion.handler.ts index 6469404..fe3660b 100644 --- a/apps/api/src/modules/auth/application/commands/request-user-deletion/request-user-deletion.handler.ts +++ b/apps/api/src/modules/auth/application/commands/request-user-deletion/request-user-deletion.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { type LoggerService, type PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared'; +import { LoggerService, PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared'; import { RequestUserDeletionCommand } from './request-user-deletion.command'; const DELETION_GRACE_PERIOD_DAYS = 30; diff --git a/apps/api/src/modules/auth/application/commands/setup-mfa/setup-mfa.handler.ts b/apps/api/src/modules/auth/application/commands/setup-mfa/setup-mfa.handler.ts index cbee330..08fd059 100644 --- a/apps/api/src/modules/auth/application/commands/setup-mfa/setup-mfa.handler.ts +++ b/apps/api/src/modules/auth/application/commands/setup-mfa/setup-mfa.handler.ts @@ -1,8 +1,8 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, ValidationException } from '@modules/shared'; +import { DomainException, LoggerService, ValidationException } from '@modules/shared'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; -import { type MfaService, type MfaSetupResult } from '../../../infrastructure/services/mfa.service'; +import { MfaService, type MfaSetupResult } from '../../../infrastructure/services/mfa.service'; import { SetupMfaCommand } from './setup-mfa.command'; export interface SetupMfaResultDto { diff --git a/apps/api/src/modules/auth/application/commands/submit-kyc/submit-kyc.handler.ts b/apps/api/src/modules/auth/application/commands/submit-kyc/submit-kyc.handler.ts index c6d6552..fea52a6 100644 --- a/apps/api/src/modules/auth/application/commands/submit-kyc/submit-kyc.handler.ts +++ b/apps/api/src/modules/auth/application/commands/submit-kyc/submit-kyc.handler.ts @@ -2,7 +2,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { DomainException, - type LoggerService, + LoggerService, NotFoundException, ValidationException, CacheService, diff --git a/apps/api/src/modules/auth/application/commands/update-profile/update-profile.handler.ts b/apps/api/src/modules/auth/application/commands/update-profile/update-profile.handler.ts index 7a7136f..82e80ec 100644 --- a/apps/api/src/modules/auth/application/commands/update-profile/update-profile.handler.ts +++ b/apps/api/src/modules/auth/application/commands/update-profile/update-profile.handler.ts @@ -1,14 +1,14 @@ import { randomInt } from 'crypto'; import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { CachePrefix, CacheService, ConflictException, DomainException, - type LoggerService, + LoggerService, NotFoundException, - type RedisService, + RedisService, ValidationException, } from '@modules/shared'; import { EmailChangeRequestedEvent } from '../../../domain/events/email-change-requested.event'; diff --git a/apps/api/src/modules/auth/application/commands/use-backup-code/use-backup-code.handler.ts b/apps/api/src/modules/auth/application/commands/use-backup-code/use-backup-code.handler.ts index 42c4a77..3b9459e 100644 --- a/apps/api/src/modules/auth/application/commands/use-backup-code/use-backup-code.handler.ts +++ b/apps/api/src/modules/auth/application/commands/use-backup-code/use-backup-code.handler.ts @@ -1,13 +1,13 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, UnauthorizedException } from '@modules/shared'; +import { DomainException, LoggerService, UnauthorizedException } from '@modules/shared'; import { MFA_CHALLENGE_REPOSITORY, type IMfaChallengeRepository, } from '../../../domain/repositories/mfa-challenge.repository'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; -import { type MfaService } from '../../../infrastructure/services/mfa.service'; -import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; +import { MfaService } from '../../../infrastructure/services/mfa.service'; +import { TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; import { UseBackupCodeCommand } from './use-backup-code.command'; @CommandHandler(UseBackupCodeCommand) diff --git a/apps/api/src/modules/auth/application/commands/verify-email-change/verify-email-change.handler.ts b/apps/api/src/modules/auth/application/commands/verify-email-change/verify-email-change.handler.ts index 91c901e..dbfbaef 100644 --- a/apps/api/src/modules/auth/application/commands/verify-email-change/verify-email-change.handler.ts +++ b/apps/api/src/modules/auth/application/commands/verify-email-change/verify-email-change.handler.ts @@ -5,9 +5,9 @@ import { CacheService, ConflictException, DomainException, - type LoggerService, + LoggerService, NotFoundException, - type RedisService, + RedisService, ValidationException, } from '@modules/shared'; import { type IUserRepository, USER_REPOSITORY } from '../../../domain/repositories/user.repository'; diff --git a/apps/api/src/modules/auth/application/commands/verify-kyc/verify-kyc.handler.ts b/apps/api/src/modules/auth/application/commands/verify-kyc/verify-kyc.handler.ts index faf8ab0..236c1c7 100644 --- a/apps/api/src/modules/auth/application/commands/verify-kyc/verify-kyc.handler.ts +++ b/apps/api/src/modules/auth/application/commands/verify-kyc/verify-kyc.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, NotFoundException, CacheService, CachePrefix } from '@modules/shared'; +import { DomainException, LoggerService, NotFoundException, CacheService, CachePrefix } from '@modules/shared'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; import { VerifyKycCommand } from './verify-kyc.command'; diff --git a/apps/api/src/modules/auth/application/commands/verify-mfa-challenge/verify-mfa-challenge.handler.ts b/apps/api/src/modules/auth/application/commands/verify-mfa-challenge/verify-mfa-challenge.handler.ts index d8b39a5..deada39 100644 --- a/apps/api/src/modules/auth/application/commands/verify-mfa-challenge/verify-mfa-challenge.handler.ts +++ b/apps/api/src/modules/auth/application/commands/verify-mfa-challenge/verify-mfa-challenge.handler.ts @@ -1,13 +1,13 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, UnauthorizedException } from '@modules/shared'; +import { DomainException, LoggerService, UnauthorizedException } from '@modules/shared'; import { MFA_CHALLENGE_REPOSITORY, type IMfaChallengeRepository, } from '../../../domain/repositories/mfa-challenge.repository'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; -import { type MfaService } from '../../../infrastructure/services/mfa.service'; -import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; +import { MfaService } from '../../../infrastructure/services/mfa.service'; +import { TokenService, type TokenPair } from '../../../infrastructure/services/token.service'; import { VerifyMfaChallengeCommand } from './verify-mfa-challenge.command'; @CommandHandler(VerifyMfaChallengeCommand) diff --git a/apps/api/src/modules/auth/application/commands/verify-mfa-setup/verify-mfa-setup.handler.ts b/apps/api/src/modules/auth/application/commands/verify-mfa-setup/verify-mfa-setup.handler.ts index 30df2ac..39f63cd 100644 --- a/apps/api/src/modules/auth/application/commands/verify-mfa-setup/verify-mfa-setup.handler.ts +++ b/apps/api/src/modules/auth/application/commands/verify-mfa-setup/verify-mfa-setup.handler.ts @@ -1,8 +1,8 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, ValidationException } from '@modules/shared'; +import { DomainException, LoggerService, ValidationException } from '@modules/shared'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; -import { type MfaService } from '../../../infrastructure/services/mfa.service'; +import { MfaService } from '../../../infrastructure/services/mfa.service'; import { VerifyMfaSetupCommand } from './verify-mfa-setup.command'; export interface VerifyMfaSetupResultDto { diff --git a/apps/api/src/modules/auth/application/commands/verify-phone-change/verify-phone-change.handler.ts b/apps/api/src/modules/auth/application/commands/verify-phone-change/verify-phone-change.handler.ts index 6bf7849..b48bd27 100644 --- a/apps/api/src/modules/auth/application/commands/verify-phone-change/verify-phone-change.handler.ts +++ b/apps/api/src/modules/auth/application/commands/verify-phone-change/verify-phone-change.handler.ts @@ -5,9 +5,9 @@ import { CacheService, ConflictException, DomainException, - type LoggerService, + LoggerService, NotFoundException, - type RedisService, + RedisService, ValidationException, } from '@modules/shared'; import { type IUserRepository, USER_REPOSITORY } from '../../../domain/repositories/user.repository'; diff --git a/apps/api/src/modules/auth/application/queries/get-agent-by-user-id/get-agent-by-user-id.handler.ts b/apps/api/src/modules/auth/application/queries/get-agent-by-user-id/get-agent-by-user-id.handler.ts index fc6fbca..2a8387a 100644 --- a/apps/api/src/modules/auth/application/queries/get-agent-by-user-id/get-agent-by-user-id.handler.ts +++ b/apps/api/src/modules/auth/application/queries/get-agent-by-user-id/get-agent-by-user-id.handler.ts @@ -1,6 +1,6 @@ import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { type PrismaService, DomainException, type LoggerService } from '@modules/shared'; +import { PrismaService, DomainException, LoggerService } from '@modules/shared'; import { GetAgentByUserIdQuery } from './get-agent-by-user-id.query'; export interface AgentDto { diff --git a/apps/api/src/modules/auth/application/queries/get-mfa-status/get-mfa-status.handler.ts b/apps/api/src/modules/auth/application/queries/get-mfa-status/get-mfa-status.handler.ts index 773bea5..3fe2493 100644 --- a/apps/api/src/modules/auth/application/queries/get-mfa-status/get-mfa-status.handler.ts +++ b/apps/api/src/modules/auth/application/queries/get-mfa-status/get-mfa-status.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, ValidationException } from '@modules/shared'; +import { DomainException, LoggerService, ValidationException } from '@modules/shared'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; import { GetMfaStatusQuery } from './get-mfa-status.query'; diff --git a/apps/api/src/modules/auth/application/queries/get-profile/get-profile.handler.ts b/apps/api/src/modules/auth/application/queries/get-profile/get-profile.handler.ts index b2a91f5..2ebbc03 100644 --- a/apps/api/src/modules/auth/application/queries/get-profile/get-profile.handler.ts +++ b/apps/api/src/modules/auth/application/queries/get-profile/get-profile.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, NotFoundException, CacheService, CachePrefix, CacheTTL } from '@modules/shared'; +import { DomainException, LoggerService, NotFoundException, CacheService, CachePrefix, CacheTTL } from '@modules/shared'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; import { GetProfileQuery } from './get-profile.query'; diff --git a/apps/api/src/modules/auth/infrastructure/repositories/prisma-mfa-challenge.repository.ts b/apps/api/src/modules/auth/infrastructure/repositories/prisma-mfa-challenge.repository.ts index f86c8da..11d9d8a 100644 --- a/apps/api/src/modules/auth/infrastructure/repositories/prisma-mfa-challenge.repository.ts +++ b/apps/api/src/modules/auth/infrastructure/repositories/prisma-mfa-challenge.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type IMfaChallengeRepository, type MfaChallengeRecord, diff --git a/apps/api/src/modules/auth/infrastructure/repositories/prisma-refresh-token.repository.ts b/apps/api/src/modules/auth/infrastructure/repositories/prisma-refresh-token.repository.ts index 7295172..cb337c4 100644 --- a/apps/api/src/modules/auth/infrastructure/repositories/prisma-refresh-token.repository.ts +++ b/apps/api/src/modules/auth/infrastructure/repositories/prisma-refresh-token.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type IRefreshTokenRepository, type RefreshTokenRecord, diff --git a/apps/api/src/modules/auth/infrastructure/repositories/prisma-user.repository.ts b/apps/api/src/modules/auth/infrastructure/repositories/prisma-user.repository.ts index 1b15c0b..b6e22fd 100644 --- a/apps/api/src/modules/auth/infrastructure/repositories/prisma-user.repository.ts +++ b/apps/api/src/modules/auth/infrastructure/repositories/prisma-user.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Prisma, type User as PrismaUser } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { UserEntity, type UserProps } from '../../domain/entities/user.entity'; import { type IUserRepository } from '../../domain/repositories/user.repository'; import { Email } from '../../domain/value-objects/email.vo'; diff --git a/apps/api/src/modules/auth/infrastructure/services/oauth.service.ts b/apps/api/src/modules/auth/infrastructure/services/oauth.service.ts index 4c2457c..d19e482 100644 --- a/apps/api/src/modules/auth/infrastructure/services/oauth.service.ts +++ b/apps/api/src/modules/auth/infrastructure/services/oauth.service.ts @@ -1,14 +1,14 @@ import { Inject, Injectable } from '@nestjs/common'; -import { type EventBus } from '@nestjs/cqrs'; +import { EventBus } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; import { type OAuthProvider, type Prisma } from '@prisma/client'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; import { UserEntity } from '../../domain/entities/user.entity'; import { UserRegisteredEvent } from '../../domain/events/user-registered.event'; import { USER_REPOSITORY, type IUserRepository } from '../../domain/repositories/user.repository'; import { Email } from '../../domain/value-objects/email.vo'; import { Phone } from '../../domain/value-objects/phone.vo'; -import { type TokenService, type TokenPair } from './token.service'; +import { TokenService, type TokenPair } from './token.service'; export interface OAuthUserProfile { provider: OAuthProvider; diff --git a/apps/api/src/modules/auth/infrastructure/services/token.service.ts b/apps/api/src/modules/auth/infrastructure/services/token.service.ts index d57e14f..744da7a 100644 --- a/apps/api/src/modules/auth/infrastructure/services/token.service.ts +++ b/apps/api/src/modules/auth/infrastructure/services/token.service.ts @@ -1,6 +1,6 @@ import { randomBytes, createHash } from 'crypto'; import { Inject, Injectable } from '@nestjs/common'; -import { type JwtService } from '@nestjs/jwt'; +import { JwtService } from '@nestjs/jwt'; import { REFRESH_TOKEN_REPOSITORY, type IRefreshTokenRepository, diff --git a/apps/api/src/modules/auth/infrastructure/strategies/google-oauth.strategy.ts b/apps/api/src/modules/auth/infrastructure/strategies/google-oauth.strategy.ts index f498c74..935ea4e 100644 --- a/apps/api/src/modules/auth/infrastructure/strategies/google-oauth.strategy.ts +++ b/apps/api/src/modules/auth/infrastructure/strategies/google-oauth.strategy.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { Strategy, type Profile, type VerifyCallback } from 'passport-google-oauth20'; -import { type OAuthService, type OAuthUserProfile } from '../services/oauth.service'; +import { OAuthService, type OAuthUserProfile } from '../services/oauth.service'; @Injectable() export class GoogleOAuthStrategy extends PassportStrategy(Strategy, 'google') { diff --git a/apps/api/src/modules/auth/infrastructure/strategies/zalo-oauth.strategy.ts b/apps/api/src/modules/auth/infrastructure/strategies/zalo-oauth.strategy.ts index c656607..bf02136 100644 --- a/apps/api/src/modules/auth/infrastructure/strategies/zalo-oauth.strategy.ts +++ b/apps/api/src/modules/auth/infrastructure/strategies/zalo-oauth.strategy.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; -import { type LoggerService } from '@modules/shared'; -import { type OAuthService, type OAuthUserProfile } from '../services/oauth.service'; +import { LoggerService } from '@modules/shared'; +import { OAuthService, type OAuthUserProfile } from '../services/oauth.service'; import { type TokenPair } from '../services/token.service'; /** diff --git a/apps/api/src/modules/auth/presentation/controllers/auth.controller.ts b/apps/api/src/modules/auth/presentation/controllers/auth.controller.ts index d236516..4568305 100644 --- a/apps/api/src/modules/auth/presentation/controllers/auth.controller.ts +++ b/apps/api/src/modules/auth/presentation/controllers/auth.controller.ts @@ -8,7 +8,7 @@ import { Res, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiBody } from '@nestjs/swagger'; import { Throttle } from '@nestjs/throttler'; import { type Request, type Response } from 'express'; @@ -34,19 +34,19 @@ import { type AgentDto } from '../../application/queries/get-agent-by-user-id/ge import { GetAgentByUserIdQuery } from '../../application/queries/get-agent-by-user-id/get-agent-by-user-id.query'; import { type UserProfileDto } from '../../application/queries/get-profile/get-profile.handler'; import { GetProfileQuery } from '../../application/queries/get-profile/get-profile.query'; -import { type TokenService, type JwtPayload, type TokenPair } from '../../infrastructure/services/token.service'; +import { TokenService, type JwtPayload, type TokenPair } from '../../infrastructure/services/token.service'; import { type LocalStrategyResult } from '../../infrastructure/strategies/local.strategy'; import { CurrentUser } from '../decorators/current-user.decorator'; import { Roles } from '../decorators/roles.decorator'; -import { type GenerateKycUploadUrlsDto } from '../dto/generate-kyc-upload-urls.dto'; +import { GenerateKycUploadUrlsDto } from '../dto/generate-kyc-upload-urls.dto'; import { LoginDto } from '../dto/login.dto'; -import { type RefreshTokenDto } from '../dto/refresh-token.dto'; -import { type RegisterDto } from '../dto/register.dto'; -import { type SubmitKycDto } from '../dto/submit-kyc.dto'; -import { type UpdateProfileDto } from '../dto/update-profile.dto'; -import { type VerifyEmailChangeDto } from '../dto/verify-email-change.dto'; -import { type VerifyKycDto } from '../dto/verify-kyc.dto'; -import { type VerifyPhoneChangeDto } from '../dto/verify-phone-change.dto'; +import { RefreshTokenDto } from '../dto/refresh-token.dto'; +import { RegisterDto } from '../dto/register.dto'; +import { SubmitKycDto } from '../dto/submit-kyc.dto'; +import { UpdateProfileDto } from '../dto/update-profile.dto'; +import { VerifyEmailChangeDto } from '../dto/verify-email-change.dto'; +import { VerifyKycDto } from '../dto/verify-kyc.dto'; +import { VerifyPhoneChangeDto } from '../dto/verify-phone-change.dto'; import { JwtAuthGuard } from '../guards/jwt-auth.guard'; import { LocalAuthGuard } from '../guards/local-auth.guard'; import { RolesGuard } from '../guards/roles.guard'; diff --git a/apps/api/src/modules/auth/presentation/controllers/mfa.controller.ts b/apps/api/src/modules/auth/presentation/controllers/mfa.controller.ts index f18d2bf..a3a21e3 100644 --- a/apps/api/src/modules/auth/presentation/controllers/mfa.controller.ts +++ b/apps/api/src/modules/auth/presentation/controllers/mfa.controller.ts @@ -7,7 +7,7 @@ import { Res, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger'; import { Throttle } from '@nestjs/throttler'; import { type Response } from 'express'; @@ -21,13 +21,13 @@ import { VerifyMfaSetupCommand } from '../../application/commands/verify-mfa-set import { type VerifyMfaSetupResultDto } from '../../application/commands/verify-mfa-setup/verify-mfa-setup.handler'; import { type MfaStatusDto } from '../../application/queries/get-mfa-status/get-mfa-status.handler'; import { GetMfaStatusQuery } from '../../application/queries/get-mfa-status/get-mfa-status.query'; -import { type TokenService, type JwtPayload, type TokenPair } from '../../infrastructure/services/token.service'; +import { TokenService, type JwtPayload, type TokenPair } from '../../infrastructure/services/token.service'; import { CurrentUser } from '../decorators/current-user.decorator'; import { - type VerifyMfaSetupDto, - type VerifyMfaChallengeDto, - type UseBackupCodeDto, - type DisableMfaDto, + VerifyMfaSetupDto, + VerifyMfaChallengeDto, + UseBackupCodeDto, + DisableMfaDto, } from '../dto/mfa.dto'; import { JwtAuthGuard } from '../guards/jwt-auth.guard'; diff --git a/apps/api/src/modules/auth/presentation/controllers/oauth.controller.ts b/apps/api/src/modules/auth/presentation/controllers/oauth.controller.ts index ebac0e6..65e7c67 100644 --- a/apps/api/src/modules/auth/presentation/controllers/oauth.controller.ts +++ b/apps/api/src/modules/auth/presentation/controllers/oauth.controller.ts @@ -11,7 +11,7 @@ import { Throttle } from '@nestjs/throttler'; import { type Request, type Response } from 'express'; import { UnauthorizedException } from '@modules/shared'; import { type TokenPair } from '../../infrastructure/services/token.service'; -import { type ZaloOAuthStrategy } from '../../infrastructure/strategies/zalo-oauth.strategy'; +import { ZaloOAuthStrategy } from '../../infrastructure/strategies/zalo-oauth.strategy'; import { GoogleOAuthGuard } from '../guards/google-oauth.guard'; const IS_PRODUCTION = process.env['NODE_ENV'] === 'production'; diff --git a/apps/api/src/modules/auth/presentation/controllers/user-data.controller.ts b/apps/api/src/modules/auth/presentation/controllers/user-data.controller.ts index eb40e41..1cb24ac 100644 --- a/apps/api/src/modules/auth/presentation/controllers/user-data.controller.ts +++ b/apps/api/src/modules/auth/presentation/controllers/user-data.controller.ts @@ -7,7 +7,7 @@ import { Post, UseGuards, } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger'; import { CancelUserDeletionCommand } from '../../application/commands/cancel-user-deletion/cancel-user-deletion.command'; import { ExportUserDataCommand } from '../../application/commands/export-user-data/export-user-data.command'; @@ -17,8 +17,8 @@ import { RequestUserDeletionCommand } from '../../application/commands/request-u import { type JwtPayload } from '../../infrastructure/services/token.service'; import { CurrentUser } from '../decorators/current-user.decorator'; import { Roles } from '../decorators/roles.decorator'; -import { type ForceDeleteUserDto } from '../dto/force-delete-user.dto'; -import { type RequestDeletionDto } from '../dto/request-deletion.dto'; +import { ForceDeleteUserDto } from '../dto/force-delete-user.dto'; +import { RequestDeletionDto } from '../dto/request-deletion.dto'; import { JwtAuthGuard } from '../guards/jwt-auth.guard'; import { RolesGuard } from '../guards/roles.guard'; diff --git a/apps/api/src/modules/auth/presentation/guards/roles.guard.ts b/apps/api/src/modules/auth/presentation/guards/roles.guard.ts index 093bbe1..eb1ae9e 100644 --- a/apps/api/src/modules/auth/presentation/guards/roles.guard.ts +++ b/apps/api/src/modules/auth/presentation/guards/roles.guard.ts @@ -1,7 +1,7 @@ import { Injectable, type CanActivate, type ExecutionContext } from '@nestjs/common'; -import { type Reflector } from '@nestjs/core'; +import { Reflector } from '@nestjs/core'; import { type UserRole } from '@prisma/client'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { ROLES_KEY } from '../decorators/roles.decorator'; @Injectable() diff --git a/apps/api/src/modules/industrial/application/commands/create-industrial-listing/create-industrial-listing.handler.ts b/apps/api/src/modules/industrial/application/commands/create-industrial-listing/create-industrial-listing.handler.ts index c7af99c..d2a0e03 100644 --- a/apps/api/src/modules/industrial/application/commands/create-industrial-listing/create-industrial-listing.handler.ts +++ b/apps/api/src/modules/industrial/application/commands/create-industrial-listing/create-industrial-listing.handler.ts @@ -8,7 +8,7 @@ import { type IIndustrialListingRepository, } from '../../../domain/repositories/industrial-listing.repository'; import { type IIndustrialParkRepository, INDUSTRIAL_PARK_REPOSITORY } from '../../../domain/repositories/industrial-park.repository'; -import { type TypesenseIndustrialService } from '../../../infrastructure/services/typesense-industrial.service'; +import { TypesenseIndustrialService } from '../../../infrastructure/services/typesense-industrial.service'; import { CreateIndustrialListingCommand } from './create-industrial-listing.command'; @CommandHandler(CreateIndustrialListingCommand) diff --git a/apps/api/src/modules/industrial/application/commands/delete-industrial-listing/delete-industrial-listing.handler.ts b/apps/api/src/modules/industrial/application/commands/delete-industrial-listing/delete-industrial-listing.handler.ts index 7927ebe..a23a081 100644 --- a/apps/api/src/modules/industrial/application/commands/delete-industrial-listing/delete-industrial-listing.handler.ts +++ b/apps/api/src/modules/industrial/application/commands/delete-industrial-listing/delete-industrial-listing.handler.ts @@ -5,7 +5,7 @@ import { INDUSTRIAL_LISTING_REPOSITORY, type IIndustrialListingRepository, } from '../../../domain/repositories/industrial-listing.repository'; -import { type TypesenseIndustrialService } from '../../../infrastructure/services/typesense-industrial.service'; +import { TypesenseIndustrialService } from '../../../infrastructure/services/typesense-industrial.service'; import { DeleteIndustrialListingCommand } from './delete-industrial-listing.command'; @CommandHandler(DeleteIndustrialListingCommand) diff --git a/apps/api/src/modules/industrial/application/commands/update-industrial-listing/update-industrial-listing.handler.ts b/apps/api/src/modules/industrial/application/commands/update-industrial-listing/update-industrial-listing.handler.ts index 9edaaae..c79763b 100644 --- a/apps/api/src/modules/industrial/application/commands/update-industrial-listing/update-industrial-listing.handler.ts +++ b/apps/api/src/modules/industrial/application/commands/update-industrial-listing/update-industrial-listing.handler.ts @@ -5,7 +5,7 @@ import { INDUSTRIAL_LISTING_REPOSITORY, type IIndustrialListingRepository, } from '../../../domain/repositories/industrial-listing.repository'; -import { type TypesenseIndustrialService } from '../../../infrastructure/services/typesense-industrial.service'; +import { TypesenseIndustrialService } from '../../../infrastructure/services/typesense-industrial.service'; import { UpdateIndustrialListingCommand } from './update-industrial-listing.command'; @CommandHandler(UpdateIndustrialListingCommand) diff --git a/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-listing.repository.ts b/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-listing.repository.ts index a185f73..ca2515c 100644 --- a/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-listing.repository.ts +++ b/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-listing.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import type { IndustrialLeaseType, IndustrialListingStatus, IndustrialPropertyType, Prisma } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { IndustrialListingEntity } from '../../domain/entities/industrial-listing.entity'; import type { IIndustrialListingRepository, diff --git a/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-park.repository.ts b/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-park.repository.ts index 8166c7b..8fcb8fa 100644 --- a/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-park.repository.ts +++ b/apps/api/src/modules/industrial/infrastructure/repositories/prisma-industrial-park.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import type { Prisma } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { IndustrialParkEntity } from '../../domain/entities/industrial-park.entity'; import type { IIndustrialParkRepository, diff --git a/apps/api/src/modules/industrial/infrastructure/services/typesense-industrial.service.ts b/apps/api/src/modules/industrial/infrastructure/services/typesense-industrial.service.ts index 7ae2657..e1dc0b1 100644 --- a/apps/api/src/modules/industrial/infrastructure/services/typesense-industrial.service.ts +++ b/apps/api/src/modules/industrial/infrastructure/services/typesense-industrial.service.ts @@ -1,8 +1,8 @@ import { Injectable, type OnModuleInit } from '@nestjs/common'; import { type Client as TypesenseClient } from 'typesense'; import { type CollectionCreateSchema } from 'typesense/lib/Typesense/Collections'; -import { type TypesenseClientService } from '@modules/search'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { TypesenseClientService } from '@modules/search'; +import { LoggerService, PrismaService } from '@modules/shared'; export const INDUSTRIAL_PARKS_COLLECTION = 'industrial_parks'; export const INDUSTRIAL_LISTINGS_COLLECTION = 'industrial_listings'; diff --git a/apps/api/src/modules/industrial/presentation/controllers/industrial-listings.controller.ts b/apps/api/src/modules/industrial/presentation/controllers/industrial-listings.controller.ts index eef6e1a..3e0cd71 100644 --- a/apps/api/src/modules/industrial/presentation/controllers/industrial-listings.controller.ts +++ b/apps/api/src/modules/industrial/presentation/controllers/industrial-listings.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, Param, Patch, Post, Query, UseGuards } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiBearerAuth, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { CurrentUser, JwtAuthGuard, type JwtPayload } from '@modules/auth'; import { NotFoundException } from '@modules/shared'; @@ -8,9 +8,9 @@ import { DeleteIndustrialListingCommand } from '../../application/commands/delet import { UpdateIndustrialListingCommand } from '../../application/commands/update-industrial-listing/update-industrial-listing.command'; import { GetIndustrialListingQuery } from '../../application/queries/get-industrial-listing/get-industrial-listing.query'; import { ListIndustrialListingsQuery } from '../../application/queries/list-industrial-listings/list-industrial-listings.query'; -import { type CreateIndustrialListingDto } from '../dto/create-industrial-listing.dto'; -import { type SearchIndustrialListingsDto } from '../dto/search-industrial-listings.dto'; -import { type UpdateIndustrialListingDto } from '../dto/update-industrial-listing.dto'; +import { CreateIndustrialListingDto } from '../dto/create-industrial-listing.dto'; +import { SearchIndustrialListingsDto } from '../dto/search-industrial-listings.dto'; +import { UpdateIndustrialListingDto } from '../dto/update-industrial-listing.dto'; @ApiTags('industrial-listings') @Controller('industrial') diff --git a/apps/api/src/modules/industrial/presentation/controllers/industrial-parks.controller.ts b/apps/api/src/modules/industrial/presentation/controllers/industrial-parks.controller.ts index 3eeb651..7d53135 100644 --- a/apps/api/src/modules/industrial/presentation/controllers/industrial-parks.controller.ts +++ b/apps/api/src/modules/industrial/presentation/controllers/industrial-parks.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, Param, Patch, Post, Query, UseGuards } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiBearerAuth, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { UserRole } from '@prisma/client'; import { JwtAuthGuard, Roles, RolesGuard } from '@modules/auth'; @@ -13,12 +13,12 @@ import { GetIndustrialParkQuery } from '../../application/queries/get-industrial import { IndustrialMarketQuery } from '../../application/queries/industrial-market/industrial-market.query'; import { IndustrialParkStatsQuery } from '../../application/queries/industrial-park-stats/industrial-park-stats.query'; import { ListIndustrialParksQuery } from '../../application/queries/list-industrial-parks/list-industrial-parks.query'; -import { type AnalyzeIndustrialLocationDto } from '../dto/analyze-industrial-location.dto'; -import { type CompareIndustrialParksDto } from '../dto/compare-industrial-parks.dto'; -import { type CreateIndustrialParkDto } from '../dto/create-industrial-park.dto'; -import { type EstimateIndustrialRentDto } from '../dto/estimate-industrial-rent.dto'; -import { type SearchIndustrialParksDto } from '../dto/search-industrial-parks.dto'; -import { type UpdateIndustrialParkDto } from '../dto/update-industrial-park.dto'; +import { AnalyzeIndustrialLocationDto } from '../dto/analyze-industrial-location.dto'; +import { CompareIndustrialParksDto } from '../dto/compare-industrial-parks.dto'; +import { CreateIndustrialParkDto } from '../dto/create-industrial-park.dto'; +import { EstimateIndustrialRentDto } from '../dto/estimate-industrial-rent.dto'; +import { SearchIndustrialParksDto } from '../dto/search-industrial-parks.dto'; +import { UpdateIndustrialParkDto } from '../dto/update-industrial-park.dto'; @ApiTags('industrial-parks') @Controller('industrial') diff --git a/apps/api/src/modules/inquiries/application/commands/create-inquiry/create-inquiry.handler.ts b/apps/api/src/modules/inquiries/application/commands/create-inquiry/create-inquiry.handler.ts index 19f4275..4bf92c1 100644 --- a/apps/api/src/modules/inquiries/application/commands/create-inquiry/create-inquiry.handler.ts +++ b/apps/api/src/modules/inquiries/application/commands/create-inquiry/create-inquiry.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { DomainException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { InquiryEntity } from '../../../domain/entities/inquiry.entity'; import { INQUIRY_REPOSITORY, type IInquiryRepository } from '../../../domain/repositories/inquiry.repository'; import { CreateInquiryCommand } from './create-inquiry.command'; diff --git a/apps/api/src/modules/inquiries/application/commands/mark-inquiry-read/mark-inquiry-read.handler.ts b/apps/api/src/modules/inquiries/application/commands/mark-inquiry-read/mark-inquiry-read.handler.ts index 90c08e2..1bb38ff 100644 --- a/apps/api/src/modules/inquiries/application/commands/mark-inquiry-read/mark-inquiry-read.handler.ts +++ b/apps/api/src/modules/inquiries/application/commands/mark-inquiry-read/mark-inquiry-read.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { INQUIRY_REPOSITORY, type IInquiryRepository } from '../../../domain/repositories/inquiry.repository'; import { MarkInquiryReadCommand } from './mark-inquiry-read.command'; diff --git a/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-agent/get-inquiries-by-agent.handler.ts b/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-agent/get-inquiries-by-agent.handler.ts index a7fa962..6b0ba63 100644 --- a/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-agent/get-inquiries-by-agent.handler.ts +++ b/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-agent/get-inquiries-by-agent.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { type InquiryReadDto } from '../../../domain/repositories/inquiry-read.dto'; import { INQUIRY_REPOSITORY, type IInquiryRepository, type PaginatedResult } from '../../../domain/repositories/inquiry.repository'; import { GetInquiriesByAgentQuery } from './get-inquiries-by-agent.query'; diff --git a/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-listing/get-inquiries-by-listing.handler.ts b/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-listing/get-inquiries-by-listing.handler.ts index 499e939..364ae32 100644 --- a/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-listing/get-inquiries-by-listing.handler.ts +++ b/apps/api/src/modules/inquiries/application/queries/get-inquiries-by-listing/get-inquiries-by-listing.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { type InquiryReadDto } from '../../../domain/repositories/inquiry-read.dto'; import { INQUIRY_REPOSITORY, type IInquiryRepository, type PaginatedResult } from '../../../domain/repositories/inquiry.repository'; import { GetInquiriesByListingQuery } from './get-inquiries-by-listing.query'; diff --git a/apps/api/src/modules/inquiries/infrastructure/repositories/prisma-inquiry.repository.ts b/apps/api/src/modules/inquiries/infrastructure/repositories/prisma-inquiry.repository.ts index 67a033d..fa32b17 100644 --- a/apps/api/src/modules/inquiries/infrastructure/repositories/prisma-inquiry.repository.ts +++ b/apps/api/src/modules/inquiries/infrastructure/repositories/prisma-inquiry.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Inquiry as PrismaInquiry } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { InquiryEntity } from '../../domain/entities/inquiry.entity'; import { type InquiryReadDto } from '../../domain/repositories/inquiry-read.dto'; import { type IInquiryRepository, type PaginatedResult } from '../../domain/repositories/inquiry.repository'; diff --git a/apps/api/src/modules/inquiries/presentation/controllers/inquiries.controller.ts b/apps/api/src/modules/inquiries/presentation/controllers/inquiries.controller.ts index 29c0f18..16812c7 100644 --- a/apps/api/src/modules/inquiries/presentation/controllers/inquiries.controller.ts +++ b/apps/api/src/modules/inquiries/presentation/controllers/inquiries.controller.ts @@ -8,7 +8,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, @@ -24,8 +24,8 @@ import { GetInquiriesByAgentQuery } from '../../application/queries/get-inquirie import { GetInquiriesByListingQuery } from '../../application/queries/get-inquiries-by-listing/get-inquiries-by-listing.query'; import { type InquiryReadDto } from '../../domain/repositories/inquiry-read.dto'; import { type PaginatedResult } from '../../domain/repositories/inquiry.repository'; -import { type CreateInquiryDto } from '../dto/create-inquiry.dto'; -import { type ListInquiriesDto } from '../dto/list-inquiries.dto'; +import { CreateInquiryDto } from '../dto/create-inquiry.dto'; +import { ListInquiriesDto } from '../dto/list-inquiries.dto'; @ApiTags('inquiries') @Controller('inquiries') diff --git a/apps/api/src/modules/leads/application/commands/create-lead/create-lead.handler.ts b/apps/api/src/modules/leads/application/commands/create-lead/create-lead.handler.ts index 89d7abd..6f3c01a 100644 --- a/apps/api/src/modules/leads/application/commands/create-lead/create-lead.handler.ts +++ b/apps/api/src/modules/leads/application/commands/create-lead/create-lead.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { DomainException, NotFoundException, ValidationException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, PrismaService, LoggerService } from '@modules/shared'; import { LeadEntity } from '../../../domain/entities/lead.entity'; import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository'; import { LeadScore } from '../../../domain/value-objects/lead-score.vo'; diff --git a/apps/api/src/modules/leads/application/commands/delete-lead/delete-lead.handler.ts b/apps/api/src/modules/leads/application/commands/delete-lead/delete-lead.handler.ts index 3191341..8af812b 100644 --- a/apps/api/src/modules/leads/application/commands/delete-lead/delete-lead.handler.ts +++ b/apps/api/src/modules/leads/application/commands/delete-lead/delete-lead.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository'; import { DeleteLeadCommand } from './delete-lead.command'; diff --git a/apps/api/src/modules/leads/application/commands/update-lead-status/update-lead-status.handler.ts b/apps/api/src/modules/leads/application/commands/update-lead-status/update-lead-status.handler.ts index 250d05b..4c40291 100644 --- a/apps/api/src/modules/leads/application/commands/update-lead-status/update-lead-status.handler.ts +++ b/apps/api/src/modules/leads/application/commands/update-lead-status/update-lead-status.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { type LeadStatus } from '../../../domain/entities/lead.entity'; import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository'; import { UpdateLeadStatusCommand } from './update-lead-status.command'; diff --git a/apps/api/src/modules/leads/application/queries/get-lead-stats/get-lead-stats.handler.ts b/apps/api/src/modules/leads/application/queries/get-lead-stats/get-lead-stats.handler.ts index 29dddcc..297d0cc 100644 --- a/apps/api/src/modules/leads/application/queries/get-lead-stats/get-lead-stats.handler.ts +++ b/apps/api/src/modules/leads/application/queries/get-lead-stats/get-lead-stats.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { LEAD_REPOSITORY, type ILeadRepository, type LeadStatsData } from '../../../domain/repositories/lead.repository'; import { GetLeadStatsQuery } from './get-lead-stats.query'; diff --git a/apps/api/src/modules/leads/application/queries/get-leads-by-agent/get-leads-by-agent.handler.ts b/apps/api/src/modules/leads/application/queries/get-leads-by-agent/get-leads-by-agent.handler.ts index 36fdccc..22b99be 100644 --- a/apps/api/src/modules/leads/application/queries/get-leads-by-agent/get-leads-by-agent.handler.ts +++ b/apps/api/src/modules/leads/application/queries/get-leads-by-agent/get-leads-by-agent.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { type LeadReadDto } from '../../../domain/repositories/lead-read.dto'; import { LEAD_REPOSITORY, type ILeadRepository, type PaginatedResult } from '../../../domain/repositories/lead.repository'; import { GetLeadsByAgentQuery } from './get-leads-by-agent.query'; diff --git a/apps/api/src/modules/leads/infrastructure/repositories/prisma-lead.repository.ts b/apps/api/src/modules/leads/infrastructure/repositories/prisma-lead.repository.ts index ca6e5e8..926865e 100644 --- a/apps/api/src/modules/leads/infrastructure/repositories/prisma-lead.repository.ts +++ b/apps/api/src/modules/leads/infrastructure/repositories/prisma-lead.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Lead as PrismaLead } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { LeadEntity, type LeadStatus } from '../../domain/entities/lead.entity'; import { type LeadReadDto } from '../../domain/repositories/lead-read.dto'; import { type ILeadRepository, type LeadStatsData, type PaginatedResult } from '../../domain/repositories/lead.repository'; diff --git a/apps/api/src/modules/leads/presentation/controllers/leads.controller.ts b/apps/api/src/modules/leads/presentation/controllers/leads.controller.ts index afb093e..6b4a682 100644 --- a/apps/api/src/modules/leads/presentation/controllers/leads.controller.ts +++ b/apps/api/src/modules/leads/presentation/controllers/leads.controller.ts @@ -9,7 +9,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, @@ -26,9 +26,9 @@ import { GetLeadStatsQuery } from '../../application/queries/get-lead-stats/get- import { GetLeadsByAgentQuery } from '../../application/queries/get-leads-by-agent/get-leads-by-agent.query'; import { type LeadReadDto } from '../../domain/repositories/lead-read.dto'; import { type LeadStatsData, type PaginatedResult } from '../../domain/repositories/lead.repository'; -import { type CreateLeadDto } from '../dto/create-lead.dto'; -import { type ListLeadsDto } from '../dto/list-leads.dto'; -import { type UpdateLeadStatusDto } from '../dto/update-lead-status.dto'; +import { CreateLeadDto } from '../dto/create-lead.dto'; +import { ListLeadsDto } from '../dto/list-leads.dto'; +import { UpdateLeadStatusDto } from '../dto/update-lead-status.dto'; @ApiTags('leads') @ApiBearerAuth('JWT') diff --git a/apps/api/src/modules/listings/application/commands/admin-feature-listing/admin-feature-listing.handler.ts b/apps/api/src/modules/listings/application/commands/admin-feature-listing/admin-feature-listing.handler.ts index db664c7..19b636b 100644 --- a/apps/api/src/modules/listings/application/commands/admin-feature-listing/admin-feature-listing.handler.ts +++ b/apps/api/src/modules/listings/application/commands/admin-feature-listing/admin-feature-listing.handler.ts @@ -4,8 +4,8 @@ import { DomainException, NotFoundException, ValidationException, - type LoggerService, - type PrismaService, + LoggerService, + PrismaService, } from '@modules/shared'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { AdminFeatureListingCommand } from './admin-feature-listing.command'; diff --git a/apps/api/src/modules/listings/application/commands/create-listing/create-listing.handler.ts b/apps/api/src/modules/listings/application/commands/create-listing/create-listing.handler.ts index 86a6f12..20e07ce 100644 --- a/apps/api/src/modules/listings/application/commands/create-listing/create-listing.handler.ts +++ b/apps/api/src/modules/listings/application/commands/create-listing/create-listing.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { DomainException, ValidationException, type CacheService, CachePrefix, type LoggerService } from '@modules/shared'; +import { DomainException, ValidationException, CacheService, CachePrefix, LoggerService } from '@modules/shared'; import { ListingEntity } from '../../../domain/entities/listing.entity'; import { PropertyEntity } from '../../../domain/entities/property.entity'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; diff --git a/apps/api/src/modules/listings/application/commands/feature-listing/feature-listing.handler.ts b/apps/api/src/modules/listings/application/commands/feature-listing/feature-listing.handler.ts index d52adb3..5067c25 100644 --- a/apps/api/src/modules/listings/application/commands/feature-listing/feature-listing.handler.ts +++ b/apps/api/src/modules/listings/application/commands/feature-listing/feature-listing.handler.ts @@ -1,12 +1,12 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type CommandBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, CommandBus, type ICommandHandler } from '@nestjs/cqrs'; import { CreatePaymentCommand, type CreatePaymentResult } from '@modules/payments'; import { DomainException, ForbiddenException, NotFoundException, ValidationException, - type LoggerService, + LoggerService, } from '@modules/shared'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { type FeaturePackage, FeatureListingCommand } from './feature-listing.command'; diff --git a/apps/api/src/modules/listings/application/commands/moderate-listing/moderate-listing.handler.ts b/apps/api/src/modules/listings/application/commands/moderate-listing/moderate-listing.handler.ts index ad2edab..735aead 100644 --- a/apps/api/src/modules/listings/application/commands/moderate-listing/moderate-listing.handler.ts +++ b/apps/api/src/modules/listings/application/commands/moderate-listing/moderate-listing.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, CacheService, CachePrefix, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, NotFoundException, CacheService, CachePrefix, LoggerService } from '@modules/shared'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; // eslint-disable-next-line @typescript-eslint/consistent-type-imports -- NestJS DI needs runtime reference import { ModerationService } from '../../../domain/services/moderation.service'; diff --git a/apps/api/src/modules/listings/application/commands/promote-featured-listing/promote-featured-listing.handler.ts b/apps/api/src/modules/listings/application/commands/promote-featured-listing/promote-featured-listing.handler.ts index 077c93b..64bb060 100644 --- a/apps/api/src/modules/listings/application/commands/promote-featured-listing/promote-featured-listing.handler.ts +++ b/apps/api/src/modules/listings/application/commands/promote-featured-listing/promote-featured-listing.handler.ts @@ -1,12 +1,12 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type CommandBus, type ICommandHandler, type QueryBus } from '@nestjs/cqrs'; +import { CommandHandler, CommandBus, type ICommandHandler, QueryBus } from '@nestjs/cqrs'; import { DomainException, ForbiddenException, NotFoundException, ValidationException, - type LoggerService, - type PrismaService, + LoggerService, + PrismaService, } from '@modules/shared'; import { CheckQuotaQuery, diff --git a/apps/api/src/modules/listings/application/commands/update-listing-status/update-listing-status.handler.ts b/apps/api/src/modules/listings/application/commands/update-listing-status/update-listing-status.handler.ts index 66d6859..6dea29b 100644 --- a/apps/api/src/modules/listings/application/commands/update-listing-status/update-listing-status.handler.ts +++ b/apps/api/src/modules/listings/application/commands/update-listing-status/update-listing-status.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, CacheService, CachePrefix, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, NotFoundException, CacheService, CachePrefix, LoggerService } from '@modules/shared'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; // eslint-disable-next-line @typescript-eslint/consistent-type-imports -- NestJS DI needs runtime reference import { ModerationService } from '../../../domain/services/moderation.service'; diff --git a/apps/api/src/modules/listings/application/commands/update-listing/update-listing.handler.ts b/apps/api/src/modules/listings/application/commands/update-listing/update-listing.handler.ts index d4b6525..197d14a 100644 --- a/apps/api/src/modules/listings/application/commands/update-listing/update-listing.handler.ts +++ b/apps/api/src/modules/listings/application/commands/update-listing/update-listing.handler.ts @@ -1,5 +1,5 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { DomainException, ForbiddenException, @@ -7,7 +7,7 @@ import { ValidationException, CacheService, CachePrefix, - type LoggerService, + LoggerService, } from '@modules/shared'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { PROPERTY_REPOSITORY, type IPropertyRepository } from '../../../domain/repositories/property.repository'; diff --git a/apps/api/src/modules/listings/application/commands/upload-media/upload-media.handler.ts b/apps/api/src/modules/listings/application/commands/upload-media/upload-media.handler.ts index a954583..ff31e62 100644 --- a/apps/api/src/modules/listings/application/commands/upload-media/upload-media.handler.ts +++ b/apps/api/src/modules/listings/application/commands/upload-media/upload-media.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { DomainException, type LoggerService, NotFoundException, ValidationException } from '@modules/shared'; +import { DomainException, LoggerService, NotFoundException, ValidationException } from '@modules/shared'; import { PropertyMediaEntity } from '../../../domain/entities/property-media.entity'; import { PROPERTY_REPOSITORY, type IPropertyRepository } from '../../../domain/repositories/property.repository'; import { MEDIA_STORAGE_SERVICE, type IMediaStorageService } from '../../../infrastructure/services/media-storage.service'; diff --git a/apps/api/src/modules/listings/application/event-handlers/activate-featured-listing.handler.ts b/apps/api/src/modules/listings/application/event-handlers/activate-featured-listing.handler.ts index a1b5770..dc8b600 100644 --- a/apps/api/src/modules/listings/application/event-handlers/activate-featured-listing.handler.ts +++ b/apps/api/src/modules/listings/application/event-handlers/activate-featured-listing.handler.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; import { type PaymentCompletedEvent } from '@modules/payments'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; const PACKAGE_DURATION_DAYS: Record = { '99000': 3, diff --git a/apps/api/src/modules/listings/application/event-handlers/record-price-history.handler.ts b/apps/api/src/modules/listings/application/event-handlers/record-price-history.handler.ts index ec89495..a0a3d36 100644 --- a/apps/api/src/modules/listings/application/event-handlers/record-price-history.handler.ts +++ b/apps/api/src/modules/listings/application/event-handlers/record-price-history.handler.ts @@ -1,5 +1,5 @@ import { EventsHandler, type IEventHandler } from '@nestjs/cqrs'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; import { ListingPriceChangedEvent } from '../../domain/events/listing-price-changed.event'; @EventsHandler(ListingPriceChangedEvent) diff --git a/apps/api/src/modules/listings/application/queries/get-listing/get-listing.handler.ts b/apps/api/src/modules/listings/application/queries/get-listing/get-listing.handler.ts index 4fe4588..fc23f8c 100644 --- a/apps/api/src/modules/listings/application/queries/get-listing/get-listing.handler.ts +++ b/apps/api/src/modules/listings/application/queries/get-listing/get-listing.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared'; import { type ListingDetailData } from '../../../domain/repositories/listing-read.dto'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { GetListingQuery } from './get-listing.query'; diff --git a/apps/api/src/modules/listings/application/queries/get-pending-moderation/get-pending-moderation.handler.ts b/apps/api/src/modules/listings/application/queries/get-pending-moderation/get-pending-moderation.handler.ts index 2b108a5..7d80d83 100644 --- a/apps/api/src/modules/listings/application/queries/get-pending-moderation/get-pending-moderation.handler.ts +++ b/apps/api/src/modules/listings/application/queries/get-pending-moderation/get-pending-moderation.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { type ListingSearchItem } from '../../../domain/repositories/listing-read.dto'; import { LISTING_REPOSITORY, type IListingRepository, type PaginatedResult } from '../../../domain/repositories/listing.repository'; import { GetPendingModerationQuery } from './get-pending-moderation.query'; diff --git a/apps/api/src/modules/listings/application/queries/get-price-history/get-price-history.handler.ts b/apps/api/src/modules/listings/application/queries/get-price-history/get-price-history.handler.ts index e913ef5..13e8bf1 100644 --- a/apps/api/src/modules/listings/application/queries/get-price-history/get-price-history.handler.ts +++ b/apps/api/src/modules/listings/application/queries/get-price-history/get-price-history.handler.ts @@ -1,5 +1,5 @@ import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { GetPriceHistoryQuery } from './get-price-history.query'; export interface PriceHistoryItem { diff --git a/apps/api/src/modules/listings/application/queries/search-listings/search-listings.handler.ts b/apps/api/src/modules/listings/application/queries/search-listings/search-listings.handler.ts index 8a184fc..e081e0e 100644 --- a/apps/api/src/modules/listings/application/queries/search-listings/search-listings.handler.ts +++ b/apps/api/src/modules/listings/application/queries/search-listings/search-listings.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared'; import { type ListingSearchItem } from '../../../domain/repositories/listing-read.dto'; import { LISTING_REPOSITORY, type IListingRepository, type PaginatedResult } from '../../../domain/repositories/listing.repository'; import { SearchListingsQuery } from './search-listings.query'; diff --git a/apps/api/src/modules/listings/infrastructure/repositories/prisma-listing.repository.ts b/apps/api/src/modules/listings/infrastructure/repositories/prisma-listing.repository.ts index 5ae0f16..ce02350 100644 --- a/apps/api/src/modules/listings/infrastructure/repositories/prisma-listing.repository.ts +++ b/apps/api/src/modules/listings/infrastructure/repositories/prisma-listing.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Listing as PrismaListing, type ListingStatus } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { ListingEntity, type ListingProps } from '../../domain/entities/listing.entity'; import { type ListingDetailData, type ListingSearchItem, type ListingSellerItem } from '../../domain/repositories/listing-read.dto'; import { type IListingRepository, type ListingSearchParams, type PaginatedResult } from '../../domain/repositories/listing.repository'; diff --git a/apps/api/src/modules/listings/infrastructure/repositories/prisma-property.repository.ts b/apps/api/src/modules/listings/infrastructure/repositories/prisma-property.repository.ts index d9081a5..89a5858 100644 --- a/apps/api/src/modules/listings/infrastructure/repositories/prisma-property.repository.ts +++ b/apps/api/src/modules/listings/infrastructure/repositories/prisma-property.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Prisma, type PropertyMedia as PrismaMedia, type PropertyType, type Direction } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { PropertyMediaEntity, type PropertyMediaProps } from '../../domain/entities/property-media.entity'; import { PropertyEntity, type PropertyProps } from '../../domain/entities/property.entity'; import { type IPropertyRepository } from '../../domain/repositories/property.repository'; diff --git a/apps/api/src/modules/listings/infrastructure/services/media-storage.service.ts b/apps/api/src/modules/listings/infrastructure/services/media-storage.service.ts index 88c7947..9119472 100644 --- a/apps/api/src/modules/listings/infrastructure/services/media-storage.service.ts +++ b/apps/api/src/modules/listings/infrastructure/services/media-storage.service.ts @@ -9,7 +9,7 @@ import { } from '@aws-sdk/client-s3'; import { getSignedUrl } from '@aws-sdk/s3-request-presigner'; import { Injectable, type OnModuleInit } from '@nestjs/common'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; export const MEDIA_STORAGE_SERVICE = Symbol('MEDIA_STORAGE_SERVICE'); diff --git a/apps/api/src/modules/listings/infrastructure/services/prisma-duplicate-detector.ts b/apps/api/src/modules/listings/infrastructure/services/prisma-duplicate-detector.ts index cc16ab6..a569fd9 100644 --- a/apps/api/src/modules/listings/infrastructure/services/prisma-duplicate-detector.ts +++ b/apps/api/src/modules/listings/infrastructure/services/prisma-duplicate-detector.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type PropertyType } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type DuplicateCandidate, type DuplicateCheckParams, diff --git a/apps/api/src/modules/listings/infrastructure/services/prisma-price-validator.ts b/apps/api/src/modules/listings/infrastructure/services/prisma-price-validator.ts index 4987455..852dc7a 100644 --- a/apps/api/src/modules/listings/infrastructure/services/prisma-price-validator.ts +++ b/apps/api/src/modules/listings/infrastructure/services/prisma-price-validator.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type PropertyType } from '@prisma/client'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; import { type IPriceValidator, type PriceValidationParams, diff --git a/apps/api/src/modules/listings/presentation/controllers/listings.controller.ts b/apps/api/src/modules/listings/presentation/controllers/listings.controller.ts index a083a13..9370e35 100644 --- a/apps/api/src/modules/listings/presentation/controllers/listings.controller.ts +++ b/apps/api/src/modules/listings/presentation/controllers/listings.controller.ts @@ -12,7 +12,7 @@ import { UseGuards, UseInterceptors, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { FileInterceptor } from '@nestjs/platform-express'; import { ApiTags, @@ -46,13 +46,13 @@ import { GetPriceHistoryQuery } from '../../application/queries/get-price-histor import { SearchListingsQuery } from '../../application/queries/search-listings/search-listings.query'; import type { ListingDetailData, ListingSearchItem } from '../../domain/repositories/listing-read.dto'; import type { PaginatedResult } from '../../domain/repositories/listing.repository'; -import type { CreateListingDto } from '../dto/create-listing.dto'; -import type { FeatureListingDto } from '../dto/feature-listing.dto'; -import type { ModerateListingDto } from '../dto/moderate-listing.dto'; -import type { PromoteFeaturedListingDto } from '../dto/promote-featured-listing.dto'; -import { type SearchListingsDto } from '../dto/search-listings.dto'; -import type { UpdateListingStatusDto } from '../dto/update-listing-status.dto'; -import type { UpdateListingDto } from '../dto/update-listing.dto'; +import { CreateListingDto } from '../dto/create-listing.dto'; +import { FeatureListingDto } from '../dto/feature-listing.dto'; +import { ModerateListingDto } from '../dto/moderate-listing.dto'; +import { PromoteFeaturedListingDto } from '../dto/promote-featured-listing.dto'; +import { SearchListingsDto } from '../dto/search-listings.dto'; +import { UpdateListingStatusDto } from '../dto/update-listing-status.dto'; +import { UpdateListingDto } from '../dto/update-listing.dto'; @ApiTags('listings') @Controller('listings') diff --git a/apps/api/src/modules/mcp/mcp.module.ts b/apps/api/src/modules/mcp/mcp.module.ts index 60b43dd..974dbed 100644 --- a/apps/api/src/modules/mcp/mcp.module.ts +++ b/apps/api/src/modules/mcp/mcp.module.ts @@ -1,8 +1,8 @@ -import { McpModule as McpCoreModule, type McpRegistryService } from '@goodgo/mcp-servers'; +import { McpModule as McpCoreModule, McpRegistryService } from '@goodgo/mcp-servers'; import { Module, type OnModuleInit } from '@nestjs/common'; import { AuthModule } from '@modules/auth'; -import { SearchModule, type TypesenseClientService } from '@modules/search'; -import { type LoggerService } from '@modules/shared'; +import { SearchModule, TypesenseClientService } from '@modules/search'; +import { LoggerService } from '@modules/shared'; import { McpTransportController } from './presentation/mcp-transport.controller'; @Module({ diff --git a/apps/api/src/modules/mcp/presentation/mcp-transport.controller.ts b/apps/api/src/modules/mcp/presentation/mcp-transport.controller.ts index b5ea833..2f39d07 100644 --- a/apps/api/src/modules/mcp/presentation/mcp-transport.controller.ts +++ b/apps/api/src/modules/mcp/presentation/mcp-transport.controller.ts @@ -1,4 +1,4 @@ -import { SSEServerTransport, type McpRegistryService } from '@goodgo/mcp-servers'; +import { SSEServerTransport, McpRegistryService } from '@goodgo/mcp-servers'; import { Controller, Get, diff --git a/apps/api/src/modules/messaging/application/commands/create-conversation/create-conversation.handler.ts b/apps/api/src/modules/messaging/application/commands/create-conversation/create-conversation.handler.ts index 0edba8b..6b6376d 100644 --- a/apps/api/src/modules/messaging/application/commands/create-conversation/create-conversation.handler.ts +++ b/apps/api/src/modules/messaging/application/commands/create-conversation/create-conversation.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ValidationException, type EventBusService, type LoggerService } from '@modules/shared'; +import { DomainException, ValidationException, EventBusService, LoggerService } from '@modules/shared'; import type { ConversationEntity } from '../../../domain/entities/conversation.entity'; import { MessageSentEvent } from '../../../domain/events/message-sent.event'; import { diff --git a/apps/api/src/modules/messaging/application/commands/mark-read/mark-read.handler.ts b/apps/api/src/modules/messaging/application/commands/mark-read/mark-read.handler.ts index 5598b23..b304f30 100644 --- a/apps/api/src/modules/messaging/application/commands/mark-read/mark-read.handler.ts +++ b/apps/api/src/modules/messaging/application/commands/mark-read/mark-read.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, NotFoundException, type LoggerService } from '@modules/shared'; +import { DomainException, ForbiddenException, NotFoundException, LoggerService } from '@modules/shared'; import { CONVERSATION_REPOSITORY, type IConversationRepository, diff --git a/apps/api/src/modules/messaging/application/commands/send-message/send-message.handler.ts b/apps/api/src/modules/messaging/application/commands/send-message/send-message.handler.ts index 21f6d7e..3f0c866 100644 --- a/apps/api/src/modules/messaging/application/commands/send-message/send-message.handler.ts +++ b/apps/api/src/modules/messaging/application/commands/send-message/send-message.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, NotFoundException, ValidationException, type EventBusService, type LoggerService } from '@modules/shared'; +import { DomainException, ForbiddenException, NotFoundException, ValidationException, EventBusService, LoggerService } from '@modules/shared'; import type { MessageEntity } from '../../../domain/entities/message.entity'; import { MessageSentEvent } from '../../../domain/events/message-sent.event'; import { diff --git a/apps/api/src/modules/messaging/infrastructure/repositories/prisma-conversation.repository.ts b/apps/api/src/modules/messaging/infrastructure/repositories/prisma-conversation.repository.ts index 9a10b8c..f4ab1c9 100644 --- a/apps/api/src/modules/messaging/infrastructure/repositories/prisma-conversation.repository.ts +++ b/apps/api/src/modules/messaging/infrastructure/repositories/prisma-conversation.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import type { ConversationEntity, ConversationParticipantEntity } from '../../domain/entities/conversation.entity'; import type { IConversationRepository, diff --git a/apps/api/src/modules/messaging/infrastructure/repositories/prisma-message.repository.ts b/apps/api/src/modules/messaging/infrastructure/repositories/prisma-message.repository.ts index 5268bca..60e98e4 100644 --- a/apps/api/src/modules/messaging/infrastructure/repositories/prisma-message.repository.ts +++ b/apps/api/src/modules/messaging/infrastructure/repositories/prisma-message.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Prisma } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import type { MessageEntity } from '../../domain/entities/message.entity'; import type { IMessageRepository, diff --git a/apps/api/src/modules/metrics/infrastructure/metrics.service.ts b/apps/api/src/modules/metrics/infrastructure/metrics.service.ts index 4185af6..93a440e 100644 --- a/apps/api/src/modules/metrics/infrastructure/metrics.service.ts +++ b/apps/api/src/modules/metrics/infrastructure/metrics.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectMetric } from '@willsoto/nestjs-prometheus'; -import { type Counter, type Gauge, type Histogram } from 'prom-client'; +import { Counter, Gauge, Histogram } from 'prom-client'; import { GOODGO_LISTINGS_CREATED_TOTAL, GOODGO_PAYMENTS_PROCESSED_TOTAL, diff --git a/apps/api/src/modules/metrics/presentation/controllers/web-vitals.controller.ts b/apps/api/src/modules/metrics/presentation/controllers/web-vitals.controller.ts index db1eb78..cd82205 100644 --- a/apps/api/src/modules/metrics/presentation/controllers/web-vitals.controller.ts +++ b/apps/api/src/modules/metrics/presentation/controllers/web-vitals.controller.ts @@ -7,8 +7,8 @@ import { Logger, } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; -import { type MetricsService } from '../../infrastructure/metrics.service'; -import { type WebVitalsBatchDto } from '../dto/web-vitals.dto'; +import { MetricsService } from '../../infrastructure/metrics.service'; +import { WebVitalsBatchDto } from '../dto/web-vitals.dto'; /** * Public endpoint for receiving Core Web Vitals from the frontend. diff --git a/apps/api/src/modules/notifications/application/commands/send-notification/send-notification.handler.ts b/apps/api/src/modules/notifications/application/commands/send-notification/send-notification.handler.ts index ba3b56b..3af0b55 100644 --- a/apps/api/src/modules/notifications/application/commands/send-notification/send-notification.handler.ts +++ b/apps/api/src/modules/notifications/application/commands/send-notification/send-notification.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type EventBusService, type LoggerService } from '@modules/shared'; +import { DomainException, EventBusService, LoggerService } from '@modules/shared'; import { NotificationSentEvent } from '../../../domain/events/notification-sent.event'; import { NOTIFICATION_PREFERENCE_REPOSITORY, @@ -10,11 +10,11 @@ import { NOTIFICATION_REPOSITORY, type INotificationRepository, } from '../../../domain/repositories/notification.repository'; -import { type EmailService } from '../../../infrastructure/services/email.service'; -import { type FcmService } from '../../../infrastructure/services/fcm.service'; -import { type StringeeSmsService } from '../../../infrastructure/services/stringee-sms.service'; -import { type TemplateService } from '../../../infrastructure/services/template.service'; -import { type ZaloOaService } from '../../../infrastructure/services/zalo-oa.service'; +import { EmailService } from '../../../infrastructure/services/email.service'; +import { FcmService } from '../../../infrastructure/services/fcm.service'; +import { StringeeSmsService } from '../../../infrastructure/services/stringee-sms.service'; +import { TemplateService } from '../../../infrastructure/services/template.service'; +import { ZaloOaService } from '../../../infrastructure/services/zalo-oa.service'; import { getZaloZnsTemplates } from '../../../infrastructure/services/zalo-zns-templates'; import { SendNotificationCommand } from './send-notification.command'; diff --git a/apps/api/src/modules/notifications/application/listeners/agent-verified.listener.ts b/apps/api/src/modules/notifications/application/listeners/agent-verified.listener.ts index 29783ed..bbdd7c2 100644 --- a/apps/api/src/modules/notifications/application/listeners/agent-verified.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/agent-verified.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type AgentVerifiedEvent } from '@modules/auth'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/email-change-requested.listener.ts b/apps/api/src/modules/notifications/application/listeners/email-change-requested.listener.ts index c2ae80f..35c1b16 100644 --- a/apps/api/src/modules/notifications/application/listeners/email-change-requested.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/email-change-requested.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type EmailChangeRequestedEvent } from '@modules/auth'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/inquiry-received.listener.ts b/apps/api/src/modules/notifications/application/listeners/inquiry-received.listener.ts index a1612b7..76c5f0c 100644 --- a/apps/api/src/modules/notifications/application/listeners/inquiry-received.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/inquiry-received.listener.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; export interface InquiryReceivedEvent { diff --git a/apps/api/src/modules/notifications/application/listeners/listing-approved.listener.ts b/apps/api/src/modules/notifications/application/listeners/listing-approved.listener.ts index 3919aa9..5696b26 100644 --- a/apps/api/src/modules/notifications/application/listeners/listing-approved.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/listing-approved.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type ListingApprovedEvent } from '@modules/admin'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/listing-rejected.listener.ts b/apps/api/src/modules/notifications/application/listeners/listing-rejected.listener.ts index d57d982..cc63f0c 100644 --- a/apps/api/src/modules/notifications/application/listeners/listing-rejected.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/listing-rejected.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type ListingRejectedEvent } from '@modules/admin'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/listing-sold.listener.ts b/apps/api/src/modules/notifications/application/listeners/listing-sold.listener.ts index eb6685b..0511d45 100644 --- a/apps/api/src/modules/notifications/application/listeners/listing-sold.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/listing-sold.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type ListingSoldEvent } from '@modules/listings'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/payment-completed.listener.ts b/apps/api/src/modules/notifications/application/listeners/payment-completed.listener.ts index c3eb852..9835027 100644 --- a/apps/api/src/modules/notifications/application/listeners/payment-completed.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/payment-completed.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type PaymentCompletedEvent } from '@modules/payments'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/payment-failed.listener.ts b/apps/api/src/modules/notifications/application/listeners/payment-failed.listener.ts index b438a44..5b180d4 100644 --- a/apps/api/src/modules/notifications/application/listeners/payment-failed.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/payment-failed.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type PaymentFailedEvent } from '@modules/payments'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/payment-refunded.listener.ts b/apps/api/src/modules/notifications/application/listeners/payment-refunded.listener.ts index b21351b..a8832c5 100644 --- a/apps/api/src/modules/notifications/application/listeners/payment-refunded.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/payment-refunded.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type PaymentRefundedEvent } from '@modules/payments'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/phone-change-requested.listener.ts b/apps/api/src/modules/notifications/application/listeners/phone-change-requested.listener.ts index d33aced..41054ae 100644 --- a/apps/api/src/modules/notifications/application/listeners/phone-change-requested.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/phone-change-requested.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type PhoneChangeRequestedEvent } from '@modules/auth'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/quota-exceeded.listener.ts b/apps/api/src/modules/notifications/application/listeners/quota-exceeded.listener.ts index 7c55b9c..71a76b7 100644 --- a/apps/api/src/modules/notifications/application/listeners/quota-exceeded.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/quota-exceeded.listener.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { type QuotaExceededEvent } from '@modules/subscriptions'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; diff --git a/apps/api/src/modules/notifications/application/listeners/residential-events.listener.ts b/apps/api/src/modules/notifications/application/listeners/residential-events.listener.ts index 6e5d425..d448a34 100644 --- a/apps/api/src/modules/notifications/application/listeners/residential-events.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/residential-events.listener.ts @@ -1,9 +1,9 @@ import { EventsHandler, type IEventHandler } from '@nestjs/cqrs'; -import { ListingApprovedEvent } from '@modules/admin'; -import { InquiryReadEvent } from '@modules/inquiries'; -import { ListingPriceChangedEvent } from '@modules/listings'; -import { type LoggerService, type PrismaService } from '@modules/shared'; -import { type NotificationsGateway } from '../../presentation/gateways/notifications.gateway'; +import { ListingApprovedEvent } from '@modules/admin/domain/events/listing-approved.event'; +import { InquiryReadEvent } from '@modules/inquiries/domain/events/inquiry-read.event'; +import { ListingPriceChangedEvent } from '@modules/listings/domain/events/listing-price-changed.event'; +import { LoggerService, PrismaService } from '@modules/shared'; +import { NotificationsGateway } from '../../presentation/gateways/notifications.gateway'; const CONTEXT = 'ResidentialEventsListener'; diff --git a/apps/api/src/modules/notifications/application/listeners/subscription-expired.listener.ts b/apps/api/src/modules/notifications/application/listeners/subscription-expired.listener.ts index 4bf5dba..0c54917 100644 --- a/apps/api/src/modules/notifications/application/listeners/subscription-expired.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/subscription-expired.listener.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { type SubscriptionExpiredEvent } from '@modules/subscriptions'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; diff --git a/apps/api/src/modules/notifications/application/listeners/subscription-expiring.listener.ts b/apps/api/src/modules/notifications/application/listeners/subscription-expiring.listener.ts index bf4fd0b..5cd929d 100644 --- a/apps/api/src/modules/notifications/application/listeners/subscription-expiring.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/subscription-expiring.listener.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { type SubscriptionCancelledEvent } from '@modules/subscriptions'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; diff --git a/apps/api/src/modules/notifications/application/listeners/subscription-renewed.listener.ts b/apps/api/src/modules/notifications/application/listeners/subscription-renewed.listener.ts index e181cd0..968762a 100644 --- a/apps/api/src/modules/notifications/application/listeners/subscription-renewed.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/subscription-renewed.listener.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { type SubscriptionRenewedEvent } from '@modules/subscriptions'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; diff --git a/apps/api/src/modules/notifications/application/listeners/user-kyc-updated.listener.ts b/apps/api/src/modules/notifications/application/listeners/user-kyc-updated.listener.ts index fa40d01..0750311 100644 --- a/apps/api/src/modules/notifications/application/listeners/user-kyc-updated.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/user-kyc-updated.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type UserKycUpdatedEvent } from '@modules/auth'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/application/listeners/user-registered.listener.ts b/apps/api/src/modules/notifications/application/listeners/user-registered.listener.ts index 8bafb1d..e60d668 100644 --- a/apps/api/src/modules/notifications/application/listeners/user-registered.listener.ts +++ b/apps/api/src/modules/notifications/application/listeners/user-registered.listener.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type UserRegisteredEvent } from '@modules/auth'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; @Injectable() diff --git a/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification-preference.repository.ts b/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification-preference.repository.ts index a5e204e..47ba4f9 100644 --- a/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification-preference.repository.ts +++ b/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification-preference.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type NotificationPreferenceEntity } from '../../domain/entities/notification-preference.entity'; import { type INotificationPreferenceRepository } from '../../domain/repositories/notification-preference.repository'; import { type NotificationChannel } from '../../domain/value-objects/notification-channel.vo'; diff --git a/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification.repository.ts b/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification.repository.ts index 4bd1f7c..0d05c19 100644 --- a/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification.repository.ts +++ b/apps/api/src/modules/notifications/infrastructure/repositories/prisma-notification.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Prisma } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type NotificationEntity, type NotificationStatus } from '../../domain/entities/notification.entity'; import { type INotificationRepository, diff --git a/apps/api/src/modules/notifications/infrastructure/services/email.service.ts b/apps/api/src/modules/notifications/infrastructure/services/email.service.ts index dd2e592..00a2c93 100644 --- a/apps/api/src/modules/notifications/infrastructure/services/email.service.ts +++ b/apps/api/src/modules/notifications/infrastructure/services/email.service.ts @@ -1,6 +1,6 @@ import { Injectable, type OnModuleInit } from '@nestjs/common'; import * as nodemailer from 'nodemailer'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; export interface SendEmailDto { to: string; diff --git a/apps/api/src/modules/notifications/infrastructure/services/fcm.service.ts b/apps/api/src/modules/notifications/infrastructure/services/fcm.service.ts index 56bf4ca..fa1c507 100644 --- a/apps/api/src/modules/notifications/infrastructure/services/fcm.service.ts +++ b/apps/api/src/modules/notifications/infrastructure/services/fcm.service.ts @@ -6,7 +6,7 @@ import { messaging, type ServiceAccount, } from 'firebase-admin'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; export interface SendPushDto { token: string; diff --git a/apps/api/src/modules/notifications/infrastructure/services/sms-rate-limiter.service.ts b/apps/api/src/modules/notifications/infrastructure/services/sms-rate-limiter.service.ts index 3f7f423..a40bab4 100644 --- a/apps/api/src/modules/notifications/infrastructure/services/sms-rate-limiter.service.ts +++ b/apps/api/src/modules/notifications/infrastructure/services/sms-rate-limiter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type LoggerService, type RedisService } from '@modules/shared'; +import { LoggerService, RedisService } from '@modules/shared'; export interface SmsRateLimitOptions { limit: number; diff --git a/apps/api/src/modules/notifications/infrastructure/services/stringee-sms.service.ts b/apps/api/src/modules/notifications/infrastructure/services/stringee-sms.service.ts index bf25105..b6ca52e 100644 --- a/apps/api/src/modules/notifications/infrastructure/services/stringee-sms.service.ts +++ b/apps/api/src/modules/notifications/infrastructure/services/stringee-sms.service.ts @@ -1,5 +1,5 @@ import { HttpStatus, Injectable, type OnModuleInit } from '@nestjs/common'; -import { DomainException, ErrorCode, type LoggerService } from '@modules/shared'; +import { DomainException, ErrorCode, LoggerService } from '@modules/shared'; import type { NotificationChannelPort, SendChannelMessageDto, @@ -8,7 +8,7 @@ import type { import { type NotificationChannel } from '../../domain/value-objects/notification-channel.vo'; import { type SmsRateLimitBucket, - type SmsRateLimiterService, + SmsRateLimiterService, } from './sms-rate-limiter.service'; export interface SendSmsDto { diff --git a/apps/api/src/modules/notifications/infrastructure/services/zalo-oa.service.ts b/apps/api/src/modules/notifications/infrastructure/services/zalo-oa.service.ts index 9d2daf4..346e4cb 100644 --- a/apps/api/src/modules/notifications/infrastructure/services/zalo-oa.service.ts +++ b/apps/api/src/modules/notifications/infrastructure/services/zalo-oa.service.ts @@ -1,5 +1,5 @@ import { Injectable, type OnModuleInit } from '@nestjs/common'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; export interface SendZaloOaDto { /** Zalo user ID (follower UID from OA) */ diff --git a/apps/api/src/modules/notifications/presentation/controllers/notifications.controller.ts b/apps/api/src/modules/notifications/presentation/controllers/notifications.controller.ts index b499898..90fb2d1 100644 --- a/apps/api/src/modules/notifications/presentation/controllers/notifications.controller.ts +++ b/apps/api/src/modules/notifications/presentation/controllers/notifications.controller.ts @@ -20,8 +20,8 @@ import { NOTIFICATION_PREFERENCE_REPOSITORY, type INotificationPreferenceRepository, } from '../../domain'; -import { type TemplateService } from '../../infrastructure/services/template.service'; -import { type NotificationsGateway } from '../gateways/notifications.gateway'; +import { TemplateService } from '../../infrastructure/services/template.service'; +import { NotificationsGateway } from '../gateways/notifications.gateway'; class UpdatePreferenceDto { @ApiProperty({ enum: PrismaChannel, description: 'Notification channel' }) diff --git a/apps/api/src/modules/payments/application/commands/cancel-order/cancel-order.handler.ts b/apps/api/src/modules/payments/application/commands/cancel-order/cancel-order.handler.ts index a98f164..f738cb4 100644 --- a/apps/api/src/modules/payments/application/commands/cancel-order/cancel-order.handler.ts +++ b/apps/api/src/modules/payments/application/commands/cancel-order/cancel-order.handler.ts @@ -1,6 +1,6 @@ import { HttpStatus, Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ErrorCode, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, ErrorCode, LoggerService } from '@modules/shared'; import { ORDER_REPOSITORY, type IOrderRepository } from '../../../domain/repositories/order.repository'; import { CancelOrderCommand } from './cancel-order.command'; diff --git a/apps/api/src/modules/payments/application/commands/confirm-bank-transfer/confirm-bank-transfer.handler.ts b/apps/api/src/modules/payments/application/commands/confirm-bank-transfer/confirm-bank-transfer.handler.ts index a32de6d..916e0f4 100644 --- a/apps/api/src/modules/payments/application/commands/confirm-bank-transfer/confirm-bank-transfer.handler.ts +++ b/apps/api/src/modules/payments/application/commands/confirm-bank-transfer/confirm-bank-transfer.handler.ts @@ -1,17 +1,17 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { type PaymentStatus } from '@prisma/client'; import { DomainException, NotFoundException, ValidationException, - type LoggerService, + LoggerService, } from '@modules/shared'; import { PAYMENT_REPOSITORY, type IPaymentRepository, } from '../../../domain/repositories/payment.repository'; -import { type BankTransferService } from '../../../infrastructure/services/bank-transfer.service'; +import { BankTransferService } from '../../../infrastructure/services/bank-transfer.service'; import { ConfirmBankTransferCommand } from './confirm-bank-transfer.command'; export interface ConfirmBankTransferResult { diff --git a/apps/api/src/modules/payments/application/commands/create-order/create-order.handler.ts b/apps/api/src/modules/payments/application/commands/create-order/create-order.handler.ts index 0bcc621..fb618e2 100644 --- a/apps/api/src/modules/payments/application/commands/create-order/create-order.handler.ts +++ b/apps/api/src/modules/payments/application/commands/create-order/create-order.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { ConflictException, DomainException, ValidationException, type LoggerService } from '@modules/shared'; +import { ConflictException, DomainException, ValidationException, LoggerService } from '@modules/shared'; import { EscrowEntity } from '../../../domain/entities/escrow.entity'; import { OrderEntity } from '../../../domain/entities/order.entity'; import { ESCROW_REPOSITORY, type IEscrowRepository } from '../../../domain/repositories/escrow.repository'; diff --git a/apps/api/src/modules/payments/application/commands/create-payment/create-payment.handler.ts b/apps/api/src/modules/payments/application/commands/create-payment/create-payment.handler.ts index 0fcf0aa..233fca3 100644 --- a/apps/api/src/modules/payments/application/commands/create-payment/create-payment.handler.ts +++ b/apps/api/src/modules/payments/application/commands/create-payment/create-payment.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { ConflictException, DomainException, ValidationException, type LoggerService } from '@modules/shared'; +import { ConflictException, DomainException, ValidationException, LoggerService } from '@modules/shared'; import { PaymentEntity } from '../../../domain/entities/payment.entity'; import { PAYMENT_REPOSITORY, diff --git a/apps/api/src/modules/payments/application/commands/handle-callback/handle-callback.handler.ts b/apps/api/src/modules/payments/application/commands/handle-callback/handle-callback.handler.ts index ab48fa9..69383a7 100644 --- a/apps/api/src/modules/payments/application/commands/handle-callback/handle-callback.handler.ts +++ b/apps/api/src/modules/payments/application/commands/handle-callback/handle-callback.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { type PaymentStatus } from '@prisma/client'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { PAYMENT_REPOSITORY, type IPaymentRepository, diff --git a/apps/api/src/modules/payments/application/commands/hold-escrow/hold-escrow.handler.ts b/apps/api/src/modules/payments/application/commands/hold-escrow/hold-escrow.handler.ts index 55a798d..34f1e17 100644 --- a/apps/api/src/modules/payments/application/commands/hold-escrow/hold-escrow.handler.ts +++ b/apps/api/src/modules/payments/application/commands/hold-escrow/hold-escrow.handler.ts @@ -1,6 +1,6 @@ import { HttpStatus, Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ErrorCode, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, ErrorCode, LoggerService } from '@modules/shared'; import { ESCROW_REPOSITORY, type IEscrowRepository } from '../../../domain/repositories/escrow.repository'; import { ORDER_REPOSITORY, type IOrderRepository } from '../../../domain/repositories/order.repository'; import { HoldEscrowCommand } from './hold-escrow.command'; diff --git a/apps/api/src/modules/payments/application/commands/refund-payment/refund-payment.handler.ts b/apps/api/src/modules/payments/application/commands/refund-payment/refund-payment.handler.ts index 613cc7c..079e449 100644 --- a/apps/api/src/modules/payments/application/commands/refund-payment/refund-payment.handler.ts +++ b/apps/api/src/modules/payments/application/commands/refund-payment/refund-payment.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { PAYMENT_REPOSITORY, type IPaymentRepository, diff --git a/apps/api/src/modules/payments/application/commands/release-escrow/release-escrow.handler.ts b/apps/api/src/modules/payments/application/commands/release-escrow/release-escrow.handler.ts index 1654605..9d33638 100644 --- a/apps/api/src/modules/payments/application/commands/release-escrow/release-escrow.handler.ts +++ b/apps/api/src/modules/payments/application/commands/release-escrow/release-escrow.handler.ts @@ -1,6 +1,6 @@ import { HttpStatus, Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ErrorCode, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, ErrorCode, LoggerService } from '@modules/shared'; import { ESCROW_REPOSITORY, type IEscrowRepository } from '../../../domain/repositories/escrow.repository'; import { ORDER_REPOSITORY, type IOrderRepository } from '../../../domain/repositories/order.repository'; import { ReleaseEscrowCommand } from './release-escrow.command'; diff --git a/apps/api/src/modules/payments/application/queries/get-payment-status/get-payment-status.handler.ts b/apps/api/src/modules/payments/application/queries/get-payment-status/get-payment-status.handler.ts index bc87e30..e9d1e19 100644 --- a/apps/api/src/modules/payments/application/queries/get-payment-status/get-payment-status.handler.ts +++ b/apps/api/src/modules/payments/application/queries/get-payment-status/get-payment-status.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, type LoggerService, NotFoundException } from '@modules/shared'; +import { DomainException, ForbiddenException, LoggerService, NotFoundException } from '@modules/shared'; import { PAYMENT_REPOSITORY, type IPaymentRepository, diff --git a/apps/api/src/modules/payments/application/queries/list-transactions/list-transactions.handler.ts b/apps/api/src/modules/payments/application/queries/list-transactions/list-transactions.handler.ts index 116d7e1..dc23d64 100644 --- a/apps/api/src/modules/payments/application/queries/list-transactions/list-transactions.handler.ts +++ b/apps/api/src/modules/payments/application/queries/list-transactions/list-transactions.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { PAYMENT_REPOSITORY, type IPaymentRepository, diff --git a/apps/api/src/modules/payments/index.ts b/apps/api/src/modules/payments/index.ts index 06d8111..6901e66 100644 --- a/apps/api/src/modules/payments/index.ts +++ b/apps/api/src/modules/payments/index.ts @@ -16,6 +16,7 @@ export type { CreatePaymentResult } from './application/commands/create-payment/ export { PaymentCompletedEvent } from './domain/events/payment-completed.event'; export { PaymentFailedEvent } from './domain/events/payment-failed.event'; export { PaymentRefundedEvent } from './domain/events/payment-refunded.event'; +export { BankTransferConfirmedEvent } from './domain/events/bank-transfer-confirmed.event'; // Domain Events — Order export { OrderCreatedEvent } from './domain/events/order-created.event'; diff --git a/apps/api/src/modules/payments/infrastructure/repositories/prisma-escrow.repository.ts b/apps/api/src/modules/payments/infrastructure/repositories/prisma-escrow.repository.ts index 24f0fcf..2d13541 100644 --- a/apps/api/src/modules/payments/infrastructure/repositories/prisma-escrow.repository.ts +++ b/apps/api/src/modules/payments/infrastructure/repositories/prisma-escrow.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Escrow as PrismaEscrow } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { EscrowEntity, type EscrowProps } from '../../domain/entities/escrow.entity'; import { type IEscrowRepository } from '../../domain/repositories/escrow.repository'; import { Money } from '../../domain/value-objects/money.vo'; diff --git a/apps/api/src/modules/payments/infrastructure/repositories/prisma-order.repository.ts b/apps/api/src/modules/payments/infrastructure/repositories/prisma-order.repository.ts index e82b98b..ae88232 100644 --- a/apps/api/src/modules/payments/infrastructure/repositories/prisma-order.repository.ts +++ b/apps/api/src/modules/payments/infrastructure/repositories/prisma-order.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Prisma, type Order as PrismaOrder, type OrderStatus } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { OrderEntity, type OrderProps } from '../../domain/entities/order.entity'; import { type IOrderRepository } from '../../domain/repositories/order.repository'; import { Money } from '../../domain/value-objects/money.vo'; diff --git a/apps/api/src/modules/payments/infrastructure/repositories/prisma-payment.repository.ts b/apps/api/src/modules/payments/infrastructure/repositories/prisma-payment.repository.ts index 1b682e8..808e777 100644 --- a/apps/api/src/modules/payments/infrastructure/repositories/prisma-payment.repository.ts +++ b/apps/api/src/modules/payments/infrastructure/repositories/prisma-payment.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { Prisma, type Payment as PrismaPayment, type PaymentStatus } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { PaymentEntity, type PaymentProps } from '../../domain/entities/payment.entity'; import { type IPaymentRepository } from '../../domain/repositories/payment.repository'; import { Money } from '../../domain/value-objects/money.vo'; diff --git a/apps/api/src/modules/payments/infrastructure/services/bank-transfer.service.ts b/apps/api/src/modules/payments/infrastructure/services/bank-transfer.service.ts index 87aba81..bdc4622 100644 --- a/apps/api/src/modules/payments/infrastructure/services/bank-transfer.service.ts +++ b/apps/api/src/modules/payments/infrastructure/services/bank-transfer.service.ts @@ -1,8 +1,8 @@ import * as crypto from 'crypto'; import { Injectable } from '@nestjs/common'; -import { type ConfigService } from '@nestjs/config'; +import { ConfigService } from '@nestjs/config'; import { type PaymentProvider } from '@prisma/client'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { type IPaymentGateway, type CreatePaymentUrlParams, diff --git a/apps/api/src/modules/payments/infrastructure/services/momo.service.ts b/apps/api/src/modules/payments/infrastructure/services/momo.service.ts index e321689..e93f3a0 100644 --- a/apps/api/src/modules/payments/infrastructure/services/momo.service.ts +++ b/apps/api/src/modules/payments/infrastructure/services/momo.service.ts @@ -1,8 +1,8 @@ import * as crypto from 'crypto'; import { Injectable } from '@nestjs/common'; -import { type ConfigService } from '@nestjs/config'; +import { ConfigService } from '@nestjs/config'; import { type PaymentProvider } from '@prisma/client'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { type IPaymentGateway, type CreatePaymentUrlParams, diff --git a/apps/api/src/modules/payments/infrastructure/services/payment-gateway.factory.ts b/apps/api/src/modules/payments/infrastructure/services/payment-gateway.factory.ts index cc3bd93..59abb6e 100644 --- a/apps/api/src/modules/payments/infrastructure/services/payment-gateway.factory.ts +++ b/apps/api/src/modules/payments/infrastructure/services/payment-gateway.factory.ts @@ -1,13 +1,13 @@ import { Injectable, BadRequestException } from '@nestjs/common'; import { type PaymentProvider } from '@prisma/client'; -import { type BankTransferService } from './bank-transfer.service'; -import { type MomoService } from './momo.service'; +import { BankTransferService } from './bank-transfer.service'; +import { MomoService } from './momo.service'; import { type IPaymentGateway, type IPaymentGatewayFactory, } from './payment-gateway.interface'; -import { type VnpayService } from './vnpay.service'; -import { type ZalopayService } from './zalopay.service'; +import { VnpayService } from './vnpay.service'; +import { ZalopayService } from './zalopay.service'; @Injectable() export class PaymentGatewayFactory implements IPaymentGatewayFactory { diff --git a/apps/api/src/modules/payments/infrastructure/services/vnpay.service.ts b/apps/api/src/modules/payments/infrastructure/services/vnpay.service.ts index c634da0..1271d24 100644 --- a/apps/api/src/modules/payments/infrastructure/services/vnpay.service.ts +++ b/apps/api/src/modules/payments/infrastructure/services/vnpay.service.ts @@ -1,8 +1,8 @@ import * as crypto from 'crypto'; import { Injectable } from '@nestjs/common'; -import { type ConfigService } from '@nestjs/config'; +import { ConfigService } from '@nestjs/config'; import { type PaymentProvider } from '@prisma/client'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { type IPaymentGateway, type CreatePaymentUrlParams, diff --git a/apps/api/src/modules/payments/infrastructure/services/zalopay.service.ts b/apps/api/src/modules/payments/infrastructure/services/zalopay.service.ts index 7765386..c8d4a69 100644 --- a/apps/api/src/modules/payments/infrastructure/services/zalopay.service.ts +++ b/apps/api/src/modules/payments/infrastructure/services/zalopay.service.ts @@ -1,8 +1,8 @@ import * as crypto from 'crypto'; import { Injectable } from '@nestjs/common'; -import { type ConfigService } from '@nestjs/config'; +import { ConfigService } from '@nestjs/config'; import { type PaymentProvider } from '@prisma/client'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { type IPaymentGateway, type CreatePaymentUrlParams, diff --git a/apps/api/src/modules/payments/presentation/controllers/admin-payments.controller.ts b/apps/api/src/modules/payments/presentation/controllers/admin-payments.controller.ts index 498c188..858a2ec 100644 --- a/apps/api/src/modules/payments/presentation/controllers/admin-payments.controller.ts +++ b/apps/api/src/modules/payments/presentation/controllers/admin-payments.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Param, Post, UseGuards } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { ApiBearerAuth, ApiOperation, @@ -10,7 +10,7 @@ import { import { CurrentUser, JwtAuthGuard, type JwtPayload, Roles, RolesGuard } from '@modules/auth'; import { ConfirmBankTransferCommand } from '../../application/commands/confirm-bank-transfer/confirm-bank-transfer.command'; import { type ConfirmBankTransferResult } from '../../application/commands/confirm-bank-transfer/confirm-bank-transfer.handler'; -import { type ConfirmBankTransferDto } from '../dto/confirm-bank-transfer.dto'; +import { ConfirmBankTransferDto } from '../dto/confirm-bank-transfer.dto'; /** * Admin-only controller for manual payment reconciliation. diff --git a/apps/api/src/modules/payments/presentation/controllers/orders.controller.ts b/apps/api/src/modules/payments/presentation/controllers/orders.controller.ts index d8a39f4..978af8f 100644 --- a/apps/api/src/modules/payments/presentation/controllers/orders.controller.ts +++ b/apps/api/src/modules/payments/presentation/controllers/orders.controller.ts @@ -6,7 +6,7 @@ import { Post, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, @@ -24,8 +24,8 @@ import { ReleaseEscrowCommand } from '../../application/commands/release-escrow/ import { type ReleaseEscrowResult } from '../../application/commands/release-escrow/release-escrow.handler'; import { type OrderStatusDto } from '../../application/queries/get-order-status/get-order-status.handler'; import { GetOrderStatusQuery } from '../../application/queries/get-order-status/get-order-status.query'; -import { type CancelOrderDto } from '../dto/cancel-order.dto'; -import { type CreateOrderDto } from '../dto/create-order.dto'; +import { CancelOrderDto } from '../dto/cancel-order.dto'; +import { CreateOrderDto } from '../dto/create-order.dto'; @ApiTags('orders') @Controller('orders') diff --git a/apps/api/src/modules/payments/presentation/controllers/payments.controller.ts b/apps/api/src/modules/payments/presentation/controllers/payments.controller.ts index 27f9382..e4d6fdf 100644 --- a/apps/api/src/modules/payments/presentation/controllers/payments.controller.ts +++ b/apps/api/src/modules/payments/presentation/controllers/payments.controller.ts @@ -8,7 +8,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, @@ -32,10 +32,10 @@ import { type PaymentStatusDto } from '../../application/queries/get-payment-sta import { GetPaymentStatusQuery } from '../../application/queries/get-payment-status/get-payment-status.query'; import { type TransactionListDto } from '../../application/queries/list-transactions/list-transactions.handler'; import { ListTransactionsQuery } from '../../application/queries/list-transactions/list-transactions.query'; -import { type ConfirmBankTransferDto } from '../dto/confirm-bank-transfer.dto'; -import { type CreatePaymentDto } from '../dto/create-payment.dto'; -import { type ListTransactionsDto } from '../dto/list-transactions.dto'; -import { type RefundPaymentDto } from '../dto/refund-payment.dto'; +import { ConfirmBankTransferDto } from '../dto/confirm-bank-transfer.dto'; +import { CreatePaymentDto } from '../dto/create-payment.dto'; +import { ListTransactionsDto } from '../dto/list-transactions.dto'; +import { RefundPaymentDto } from '../dto/refund-payment.dto'; @ApiTags('payments') @Controller('payments') diff --git a/apps/api/src/modules/projects/infrastructure/repositories/prisma-project-development.repository.ts b/apps/api/src/modules/projects/infrastructure/repositories/prisma-project-development.repository.ts index 87467e3..26d49f7 100644 --- a/apps/api/src/modules/projects/infrastructure/repositories/prisma-project-development.repository.ts +++ b/apps/api/src/modules/projects/infrastructure/repositories/prisma-project-development.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import type { Prisma } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { ProjectDevelopmentEntity } from '../../domain/entities/project-development.entity'; import type { IProjectRepository, diff --git a/apps/api/src/modules/projects/presentation/controllers/projects.controller.ts b/apps/api/src/modules/projects/presentation/controllers/projects.controller.ts index c991c4c..e08c82c 100644 --- a/apps/api/src/modules/projects/presentation/controllers/projects.controller.ts +++ b/apps/api/src/modules/projects/presentation/controllers/projects.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, Param, Patch, Post, Query, UseGuards } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiBearerAuth, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { UserRole } from '@prisma/client'; import { JwtAuthGuard, Roles, RolesGuard } from '@modules/auth'; @@ -8,9 +8,9 @@ import { CreateProjectCommand } from '../../application/commands/create-project/ import { UpdateProjectCommand } from '../../application/commands/update-project/update-project.command'; import { GetProjectQuery } from '../../application/queries/get-project/get-project.query'; import { ListProjectsQuery } from '../../application/queries/list-projects/list-projects.query'; -import { type CreateProjectDto } from '../dto/create-project.dto'; -import { type SearchProjectsDto } from '../dto/search-projects.dto'; -import { type UpdateProjectDto } from '../dto/update-project.dto'; +import { CreateProjectDto } from '../dto/create-project.dto'; +import { SearchProjectsDto } from '../dto/search-projects.dto'; +import { UpdateProjectDto } from '../dto/update-project.dto'; @ApiTags('projects') @Controller('projects') diff --git a/apps/api/src/modules/reports/application/commands/generate-report/generate-report.handler.ts b/apps/api/src/modules/reports/application/commands/generate-report/generate-report.handler.ts index 8d7a419..2fcb7aa 100644 --- a/apps/api/src/modules/reports/application/commands/generate-report/generate-report.handler.ts +++ b/apps/api/src/modules/reports/application/commands/generate-report/generate-report.handler.ts @@ -2,7 +2,7 @@ import { InjectQueue } from '@nestjs/bullmq'; import { Inject } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { type Queue } from 'bullmq'; +import { Queue } from 'bullmq'; import { ReportEntity } from '../../../domain/entities/report.entity'; import { REPORT_REPOSITORY, type IReportRepository } from '../../../domain/repositories/report.repository'; import { GenerateReportCommand } from './generate-report.command'; diff --git a/apps/api/src/modules/reports/infrastructure/repositories/prisma-report.repository.ts b/apps/api/src/modules/reports/infrastructure/repositories/prisma-report.repository.ts index 98579de..8315b39 100644 --- a/apps/api/src/modules/reports/infrastructure/repositories/prisma-report.repository.ts +++ b/apps/api/src/modules/reports/infrastructure/repositories/prisma-report.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Prisma, type Report as PrismaReport } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { ReportEntity } from '../../domain/entities/report.entity'; import { type ReportStatus } from '../../domain/enums/report-status.enum'; import { type ReportType } from '../../domain/enums/report-type.enum'; diff --git a/apps/api/src/modules/reports/infrastructure/services/claude-narrative.service.ts b/apps/api/src/modules/reports/infrastructure/services/claude-narrative.service.ts index 4112209..47e7b80 100644 --- a/apps/api/src/modules/reports/infrastructure/services/claude-narrative.service.ts +++ b/apps/api/src/modules/reports/infrastructure/services/claude-narrative.service.ts @@ -1,6 +1,6 @@ import Anthropic from '@anthropic-ai/sdk'; import { Injectable, Logger } from '@nestjs/common'; -import { type ConfigService } from '@nestjs/config'; +import { ConfigService } from '@nestjs/config'; import { type IAINarrativeService, type NarrativeRequest, diff --git a/apps/api/src/modules/reports/infrastructure/services/infrastructure-data.service.ts b/apps/api/src/modules/reports/infrastructure/services/infrastructure-data.service.ts index b71db2b..96b40b8 100644 --- a/apps/api/src/modules/reports/infrastructure/services/infrastructure-data.service.ts +++ b/apps/api/src/modules/reports/infrastructure/services/infrastructure-data.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type IInfrastructureDataService, type InfrastructureProjectData } from '../../domain/services/infrastructure-data.service'; @Injectable() diff --git a/apps/api/src/modules/reports/infrastructure/services/macro-data.service.ts b/apps/api/src/modules/reports/infrastructure/services/macro-data.service.ts index e13718c..c002a9f 100644 --- a/apps/api/src/modules/reports/infrastructure/services/macro-data.service.ts +++ b/apps/api/src/modules/reports/infrastructure/services/macro-data.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { type IMacroDataService, type MacroDataPoint } from '../../domain/services/macro-data.service'; @Injectable() diff --git a/apps/api/src/modules/reports/presentation/controllers/reports.controller.ts b/apps/api/src/modules/reports/presentation/controllers/reports.controller.ts index 9b2e2b5..5187ac9 100644 --- a/apps/api/src/modules/reports/presentation/controllers/reports.controller.ts +++ b/apps/api/src/modules/reports/presentation/controllers/reports.controller.ts @@ -12,7 +12,7 @@ import { Req, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiQuery } from '@nestjs/swagger'; import { JwtAuthGuard } from '@modules/auth'; import { RequireQuota, QuotaGuard } from '@modules/subscriptions'; @@ -24,8 +24,8 @@ import { type ListReportsResult } from '../../application/queries/list-reports/l import { ListReportsQuery } from '../../application/queries/list-reports/list-reports.query'; import { type ReportEntity } from '../../domain/entities/report.entity'; import { MACRO_DATA_SERVICE, type IMacroDataService } from '../../domain/services/macro-data.service'; -import { type GenerateReportDto } from '../dto/generate-report.dto'; -import { type ListReportsDto } from '../dto/list-reports.dto'; +import { GenerateReportDto } from '../dto/generate-report.dto'; +import { ListReportsDto } from '../dto/list-reports.dto'; interface AuthenticatedRequest { user: { sub: string }; diff --git a/apps/api/src/modules/reviews/application/queries/get-average-rating/get-average-rating.handler.ts b/apps/api/src/modules/reviews/application/queries/get-average-rating/get-average-rating.handler.ts index 5dd0098..bf2f117 100644 --- a/apps/api/src/modules/reviews/application/queries/get-average-rating/get-average-rating.handler.ts +++ b/apps/api/src/modules/reviews/application/queries/get-average-rating/get-average-rating.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { type ReviewStatsData } from '../../../domain/repositories/review-read.dto'; import { REVIEW_REPOSITORY, type IReviewRepository } from '../../../domain/repositories/review.repository'; import { GetAverageRatingQuery } from './get-average-rating.query'; diff --git a/apps/api/src/modules/reviews/application/queries/get-reviews-by-target/get-reviews-by-target.handler.ts b/apps/api/src/modules/reviews/application/queries/get-reviews-by-target/get-reviews-by-target.handler.ts index dfcdfb5..5ff57bc 100644 --- a/apps/api/src/modules/reviews/application/queries/get-reviews-by-target/get-reviews-by-target.handler.ts +++ b/apps/api/src/modules/reviews/application/queries/get-reviews-by-target/get-reviews-by-target.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { type ReviewItemData } from '../../../domain/repositories/review-read.dto'; import { REVIEW_REPOSITORY, type IReviewRepository, type PaginatedResult } from '../../../domain/repositories/review.repository'; import { GetReviewsByTargetQuery } from './get-reviews-by-target.query'; diff --git a/apps/api/src/modules/reviews/application/queries/get-reviews-by-user/get-reviews-by-user.handler.ts b/apps/api/src/modules/reviews/application/queries/get-reviews-by-user/get-reviews-by-user.handler.ts index e0c9b14..df11004 100644 --- a/apps/api/src/modules/reviews/application/queries/get-reviews-by-user/get-reviews-by-user.handler.ts +++ b/apps/api/src/modules/reviews/application/queries/get-reviews-by-user/get-reviews-by-user.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; +import { DomainException, LoggerService } from '@modules/shared'; import { type ReviewItemData } from '../../../domain/repositories/review-read.dto'; import { REVIEW_REPOSITORY, type IReviewRepository, type PaginatedResult } from '../../../domain/repositories/review.repository'; import { GetReviewsByUserQuery } from './get-reviews-by-user.query'; diff --git a/apps/api/src/modules/reviews/presentation/controllers/reviews.controller.ts b/apps/api/src/modules/reviews/presentation/controllers/reviews.controller.ts index 1da9991..a47f981 100644 --- a/apps/api/src/modules/reviews/presentation/controllers/reviews.controller.ts +++ b/apps/api/src/modules/reviews/presentation/controllers/reviews.controller.ts @@ -26,8 +26,8 @@ import { GetReviewsByTargetQuery } from '../../application/queries/get-reviews-b import { GetReviewsByUserQuery } from '../../application/queries/get-reviews-by-user/get-reviews-by-user.query'; import { type ReviewItemData, type ReviewStatsData } from '../../domain/repositories/review-read.dto'; import { type PaginatedResult } from '../../domain/repositories/review.repository'; -import { type CreateReviewDto } from '../dto/create-review.dto'; -import { type ListReviewsByTargetDto, type ReviewStatsDto } from '../dto/list-reviews.dto'; +import { CreateReviewDto } from '../dto/create-review.dto'; +import { ListReviewsByTargetDto, ReviewStatsDto } from '../dto/list-reviews.dto'; @ApiTags('reviews') @Controller('reviews') diff --git a/apps/api/src/modules/search/application/commands/create-saved-search/create-saved-search.handler.ts b/apps/api/src/modules/search/application/commands/create-saved-search/create-saved-search.handler.ts index 1d22b0c..35471e2 100644 --- a/apps/api/src/modules/search/application/commands/create-saved-search/create-saved-search.handler.ts +++ b/apps/api/src/modules/search/application/commands/create-saved-search/create-saved-search.handler.ts @@ -1,8 +1,8 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type CommandBus, type ICommandHandler, type QueryBus } from '@nestjs/cqrs'; +import { CommandHandler, CommandBus, type ICommandHandler, QueryBus } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; import { type SavedSearch, type Prisma } from '@prisma/client'; -import { DomainException, ValidationException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, ValidationException, PrismaService, LoggerService } from '@modules/shared'; import { CheckQuotaQuery, type QuotaCheckResult, MeterUsageCommand } from '@modules/subscriptions'; import { CreateSavedSearchCommand } from './create-saved-search.command'; diff --git a/apps/api/src/modules/search/application/commands/delete-saved-search/delete-saved-search.handler.ts b/apps/api/src/modules/search/application/commands/delete-saved-search/delete-saved-search.handler.ts index 60d31e2..0f871f0 100644 --- a/apps/api/src/modules/search/application/commands/delete-saved-search/delete-saved-search.handler.ts +++ b/apps/api/src/modules/search/application/commands/delete-saved-search/delete-saved-search.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { DeleteSavedSearchCommand } from './delete-saved-search.command'; @CommandHandler(DeleteSavedSearchCommand) diff --git a/apps/api/src/modules/search/application/commands/reindex-all/reindex-all.handler.ts b/apps/api/src/modules/search/application/commands/reindex-all/reindex-all.handler.ts index fed661c..c40c253 100644 --- a/apps/api/src/modules/search/application/commands/reindex-all/reindex-all.handler.ts +++ b/apps/api/src/modules/search/application/commands/reindex-all/reindex-all.handler.ts @@ -1,7 +1,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; -import { type ListingIndexerService } from '../../../infrastructure/services/listing-indexer.service'; +import { DomainException, LoggerService } from '@modules/shared'; +import { ListingIndexerService } from '../../../infrastructure/services/listing-indexer.service'; import { ReindexAllCommand } from './reindex-all.command'; export interface ReindexResult { diff --git a/apps/api/src/modules/search/application/commands/sync-listing/sync-listing.handler.ts b/apps/api/src/modules/search/application/commands/sync-listing/sync-listing.handler.ts index 8131764..344f0d3 100644 --- a/apps/api/src/modules/search/application/commands/sync-listing/sync-listing.handler.ts +++ b/apps/api/src/modules/search/application/commands/sync-listing/sync-listing.handler.ts @@ -1,7 +1,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService } from '@modules/shared'; -import { type ListingIndexerService } from '../../../infrastructure/services/listing-indexer.service'; +import { DomainException, LoggerService } from '@modules/shared'; +import { ListingIndexerService } from '../../../infrastructure/services/listing-indexer.service'; import { SyncListingCommand } from './sync-listing.command'; @CommandHandler(SyncListingCommand) diff --git a/apps/api/src/modules/search/application/commands/update-saved-search/update-saved-search.handler.ts b/apps/api/src/modules/search/application/commands/update-saved-search/update-saved-search.handler.ts index efeb9b4..a413010 100644 --- a/apps/api/src/modules/search/application/commands/update-saved-search/update-saved-search.handler.ts +++ b/apps/api/src/modules/search/application/commands/update-saved-search/update-saved-search.handler.ts @@ -1,7 +1,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { type Prisma } from '@prisma/client'; -import { DomainException, ForbiddenException, NotFoundException, ValidationException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, ForbiddenException, NotFoundException, ValidationException, PrismaService, LoggerService } from '@modules/shared'; import { UpdateSavedSearchCommand } from './update-saved-search.command'; export interface UpdateSavedSearchResult { diff --git a/apps/api/src/modules/search/application/queries/geo-search/geo-search.handler.ts b/apps/api/src/modules/search/application/queries/geo-search/geo-search.handler.ts index 0f5b8f1..9716fa3 100644 --- a/apps/api/src/modules/search/application/queries/geo-search/geo-search.handler.ts +++ b/apps/api/src/modules/search/application/queries/geo-search/geo-search.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { CacheService, CachePrefix, CacheTTL, DomainException, type LoggerService } from '@modules/shared'; +import { CacheService, CachePrefix, CacheTTL, DomainException, LoggerService } from '@modules/shared'; import { SEARCH_REPOSITORY, type ISearchRepository, diff --git a/apps/api/src/modules/search/application/queries/get-saved-search/get-saved-search.handler.ts b/apps/api/src/modules/search/application/queries/get-saved-search/get-saved-search.handler.ts index 7683e3a..667bbff 100644 --- a/apps/api/src/modules/search/application/queries/get-saved-search/get-saved-search.handler.ts +++ b/apps/api/src/modules/search/application/queries/get-saved-search/get-saved-search.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, ForbiddenException, NotFoundException, type LoggerService, type PrismaService } from '@modules/shared'; +import { DomainException, ForbiddenException, NotFoundException, LoggerService, PrismaService } from '@modules/shared'; import { GetSavedSearchQuery } from './get-saved-search.query'; export interface SavedSearchDetail { diff --git a/apps/api/src/modules/search/application/queries/get-saved-searches/get-saved-searches.handler.ts b/apps/api/src/modules/search/application/queries/get-saved-searches/get-saved-searches.handler.ts index 3257bb2..a0e0f93 100644 --- a/apps/api/src/modules/search/application/queries/get-saved-searches/get-saved-searches.handler.ts +++ b/apps/api/src/modules/search/application/queries/get-saved-searches/get-saved-searches.handler.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; -import { DomainException, type LoggerService, type PrismaService } from '@modules/shared'; +import { DomainException, LoggerService, PrismaService } from '@modules/shared'; import { GetSavedSearchesQuery } from './get-saved-searches.query'; export interface SavedSearchItem { diff --git a/apps/api/src/modules/search/application/queries/search-properties/search-properties.handler.ts b/apps/api/src/modules/search/application/queries/search-properties/search-properties.handler.ts index 4bcd515..61fad23 100644 --- a/apps/api/src/modules/search/application/queries/search-properties/search-properties.handler.ts +++ b/apps/api/src/modules/search/application/queries/search-properties/search-properties.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { CacheService, CachePrefix, CacheTTL, DomainException, type LoggerService } from '@modules/shared'; +import { CacheService, CachePrefix, CacheTTL, DomainException, LoggerService } from '@modules/shared'; import { SEARCH_REPOSITORY, type ISearchRepository, diff --git a/apps/api/src/modules/search/infrastructure/cron/saved-search-alert-cron.service.ts b/apps/api/src/modules/search/infrastructure/cron/saved-search-alert-cron.service.ts index f6aa84a..9668c90 100644 --- a/apps/api/src/modules/search/infrastructure/cron/saved-search-alert-cron.service.ts +++ b/apps/api/src/modules/search/infrastructure/cron/saved-search-alert-cron.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { Cron, CronExpression } from '@nestjs/schedule'; import { SendNotificationCommand } from '@modules/notifications'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; /** * Daily cron job that checks saved searches against new listings published since lastAlertAt. diff --git a/apps/api/src/modules/search/infrastructure/event-handlers/listing-approved.handler.ts b/apps/api/src/modules/search/infrastructure/event-handlers/listing-approved.handler.ts index 9519f5f..b9f8c95 100644 --- a/apps/api/src/modules/search/infrastructure/event-handlers/listing-approved.handler.ts +++ b/apps/api/src/modules/search/infrastructure/event-handlers/listing-approved.handler.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; -import { CacheService, CachePrefix, type LoggerService } from '@modules/shared'; -import { type ListingIndexerService } from '../services/listing-indexer.service'; +import { CacheService, CachePrefix, LoggerService } from '@modules/shared'; +import { ListingIndexerService } from '../services/listing-indexer.service'; @Injectable() export class ListingApprovedEventHandler { diff --git a/apps/api/src/modules/search/infrastructure/event-handlers/listing-status-changed.handler.ts b/apps/api/src/modules/search/infrastructure/event-handlers/listing-status-changed.handler.ts index c50a6a4..1042ffc 100644 --- a/apps/api/src/modules/search/infrastructure/event-handlers/listing-status-changed.handler.ts +++ b/apps/api/src/modules/search/infrastructure/event-handlers/listing-status-changed.handler.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; import { type ListingStatusChangedEvent } from '@modules/listings'; -import { CacheService, CachePrefix, type LoggerService } from '@modules/shared'; -import { type ListingIndexerService } from '../services/listing-indexer.service'; +import { CacheService, CachePrefix, LoggerService } from '@modules/shared'; +import { ListingIndexerService } from '../services/listing-indexer.service'; @Injectable() export class ListingStatusChangedHandler { diff --git a/apps/api/src/modules/search/infrastructure/event-handlers/saved-search-alert.handler.ts b/apps/api/src/modules/search/infrastructure/event-handlers/saved-search-alert.handler.ts index fd1c231..20d1e56 100644 --- a/apps/api/src/modules/search/infrastructure/event-handlers/saved-search-alert.handler.ts +++ b/apps/api/src/modules/search/infrastructure/event-handlers/saved-search-alert.handler.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { SendNotificationCommand } from '@modules/notifications'; -import { type PrismaService, type LoggerService } from '@modules/shared'; +import { PrismaService, LoggerService } from '@modules/shared'; /** * When a new listing is approved, check all saved searches with alerts enabled diff --git a/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts b/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts index 5afc2df..d0ed9b9 100644 --- a/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts +++ b/apps/api/src/modules/search/infrastructure/services/listing-indexer.service.ts @@ -1,6 +1,6 @@ import { Inject, Injectable } from '@nestjs/common'; import { Prisma } from '@prisma/client'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { SEARCH_REPOSITORY, type ISearchRepository, diff --git a/apps/api/src/modules/search/infrastructure/services/postgres-search.repository.ts b/apps/api/src/modules/search/infrastructure/services/postgres-search.repository.ts index 9133c71..8943080 100644 --- a/apps/api/src/modules/search/infrastructure/services/postgres-search.repository.ts +++ b/apps/api/src/modules/search/infrastructure/services/postgres-search.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { Prisma } from '@prisma/client'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; import { type ISearchRepository, type ListingDocument, diff --git a/apps/api/src/modules/search/infrastructure/services/resilient-search.repository.ts b/apps/api/src/modules/search/infrastructure/services/resilient-search.repository.ts index dc96b90..f7b4cb2 100644 --- a/apps/api/src/modules/search/infrastructure/services/resilient-search.repository.ts +++ b/apps/api/src/modules/search/infrastructure/services/resilient-search.repository.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; import { InjectMetric } from '@willsoto/nestjs-prometheus'; -import { type Counter } from 'prom-client'; +import { Counter } from 'prom-client'; import { CircuitBreaker, CircuitOpenError, type CircuitState, - type LoggerService, + LoggerService, } from '@modules/shared'; import { type ISearchRepository, @@ -13,8 +13,8 @@ import { type SearchParams, type SearchResult, } from '../../domain/repositories/search.repository'; -import { type PostgresSearchRepository } from './postgres-search.repository'; -import { type TypesenseSearchRepository } from './typesense-search.repository'; +import { PostgresSearchRepository } from './postgres-search.repository'; +import { TypesenseSearchRepository } from './typesense-search.repository'; export const SEARCH_DEGRADATION_TOTAL = 'search_degradation_total'; diff --git a/apps/api/src/modules/search/infrastructure/services/typesense-client.service.ts b/apps/api/src/modules/search/infrastructure/services/typesense-client.service.ts index 7ddaa40..aa5d24e 100644 --- a/apps/api/src/modules/search/infrastructure/services/typesense-client.service.ts +++ b/apps/api/src/modules/search/infrastructure/services/typesense-client.service.ts @@ -1,6 +1,6 @@ import { Injectable, type OnModuleInit } from '@nestjs/common'; import { Client as TypesenseClient } from 'typesense'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; @Injectable() export class TypesenseClientService implements OnModuleInit { diff --git a/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts b/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts index 9f9d860..6742da2 100644 --- a/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts +++ b/apps/api/src/modules/search/infrastructure/services/typesense-search.repository.ts @@ -1,14 +1,14 @@ import { Injectable } from '@nestjs/common'; import { type Client as TypesenseClient } from 'typesense'; import { type CollectionCreateSchema } from 'typesense/lib/Typesense/Collections'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { type ISearchRepository, type ListingDocument, type SearchParams, type SearchResult, } from '../../domain/repositories/search.repository'; -import { type TypesenseClientService } from './typesense-client.service'; +import { TypesenseClientService } from './typesense-client.service'; const COLLECTION_NAME = 'listings'; diff --git a/apps/api/src/modules/search/presentation/controllers/saved-search.controller.ts b/apps/api/src/modules/search/presentation/controllers/saved-search.controller.ts index e623cc7..0282bcc 100644 --- a/apps/api/src/modules/search/presentation/controllers/saved-search.controller.ts +++ b/apps/api/src/modules/search/presentation/controllers/saved-search.controller.ts @@ -9,7 +9,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, @@ -27,7 +27,7 @@ import { type SavedSearchDetail } from '../../application/queries/get-saved-sear import { GetSavedSearchQuery } from '../../application/queries/get-saved-search/get-saved-search.query'; import { type SavedSearchListResult } from '../../application/queries/get-saved-searches/get-saved-searches.handler'; import { GetSavedSearchesQuery } from '../../application/queries/get-saved-searches/get-saved-searches.query'; -import { type CreateSavedSearchDto, type UpdateSavedSearchDto, type SavedSearchListDto } from '../dto/saved-search.dto'; +import { CreateSavedSearchDto, UpdateSavedSearchDto, SavedSearchListDto } from '../dto/saved-search.dto'; @ApiTags('saved-searches') @ApiBearerAuth('JWT') diff --git a/apps/api/src/modules/search/presentation/controllers/search.controller.ts b/apps/api/src/modules/search/presentation/controllers/search.controller.ts index d112bee..a91cffe 100644 --- a/apps/api/src/modules/search/presentation/controllers/search.controller.ts +++ b/apps/api/src/modules/search/presentation/controllers/search.controller.ts @@ -5,7 +5,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, @@ -19,8 +19,8 @@ import { type ReindexResult } from '../../application/commands/reindex-all/reind import { GeoSearchQuery } from '../../application/queries/geo-search/geo-search.query'; import { SearchPropertiesQuery } from '../../application/queries/search-properties/search-properties.query'; import { type SearchResult } from '../../domain/repositories/search.repository'; -import { type GeoSearchDto } from '../dto/geo-search.dto'; -import { type SearchPropertiesDto } from '../dto/search-properties.dto'; +import { GeoSearchDto } from '../dto/geo-search.dto'; +import { SearchPropertiesDto } from '../dto/search-properties.dto'; @ApiTags('search') @Controller('search') diff --git a/apps/api/src/modules/search/search.module.ts b/apps/api/src/modules/search/search.module.ts index 7942636..ae2f584 100644 --- a/apps/api/src/modules/search/search.module.ts +++ b/apps/api/src/modules/search/search.module.ts @@ -1,7 +1,7 @@ import { Module, type OnModuleInit } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; import { makeCounterProvider } from '@willsoto/nestjs-prometheus'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { CreateSavedSearchHandler } from './application/commands/create-saved-search/create-saved-search.handler'; import { DeleteSavedSearchHandler } from './application/commands/delete-saved-search/delete-saved-search.handler'; import { ReindexAllHandler } from './application/commands/reindex-all/reindex-all.handler'; diff --git a/apps/api/src/modules/shared/infrastructure/field-encryption.service.ts b/apps/api/src/modules/shared/infrastructure/field-encryption.service.ts index 591d096..78937e8 100644 --- a/apps/api/src/modules/shared/infrastructure/field-encryption.service.ts +++ b/apps/api/src/modules/shared/infrastructure/field-encryption.service.ts @@ -16,7 +16,7 @@ import { isEncrypted, type FieldEncryptionConfig, } from './field-encryption'; -import { type LoggerService } from './logger.service'; +import { LoggerService } from './logger.service'; // --------------------------------------------------------------------------- // Configuration types diff --git a/apps/api/src/modules/shared/infrastructure/filters/global-exception.filter.ts b/apps/api/src/modules/shared/infrastructure/filters/global-exception.filter.ts index d7dc695..e10e908 100644 --- a/apps/api/src/modules/shared/infrastructure/filters/global-exception.filter.ts +++ b/apps/api/src/modules/shared/infrastructure/filters/global-exception.filter.ts @@ -9,7 +9,7 @@ import { Prisma } from '@prisma/client'; import { type Request, type Response } from 'express'; import { DomainException, type ErrorResponseBody } from '../../domain/domain-exception'; import { ErrorCode } from '../../domain/error-codes'; -import { type LoggerService } from '../logger.service'; +import { LoggerService } from '../logger.service'; @Catch() export class GlobalExceptionFilter implements ExceptionFilter { diff --git a/apps/api/src/modules/shared/infrastructure/guards/endpoint-rate-limit.guard.ts b/apps/api/src/modules/shared/infrastructure/guards/endpoint-rate-limit.guard.ts index f091671..fc74e85 100644 --- a/apps/api/src/modules/shared/infrastructure/guards/endpoint-rate-limit.guard.ts +++ b/apps/api/src/modules/shared/infrastructure/guards/endpoint-rate-limit.guard.ts @@ -5,14 +5,14 @@ import { HttpException, HttpStatus, } from '@nestjs/common'; -import { type Reflector } from '@nestjs/core'; +import { Reflector } from '@nestjs/core'; import { type Request, type Response } from 'express'; import { ENDPOINT_RATE_LIMIT_KEY, type EndpointRateLimitOptions, } from '../decorators/endpoint-rate-limit.decorator'; -import { type LoggerService } from '../logger.service'; -import { type RedisService } from '../redis.service'; +import { LoggerService } from '../logger.service'; +import { RedisService } from '../redis.service'; /** Express request extended with optional JWT user payload. */ interface AuthenticatedRequest extends Request { diff --git a/apps/api/src/modules/shared/infrastructure/guards/user-rate-limit.guard.ts b/apps/api/src/modules/shared/infrastructure/guards/user-rate-limit.guard.ts index 658d692..d028dd0 100644 --- a/apps/api/src/modules/shared/infrastructure/guards/user-rate-limit.guard.ts +++ b/apps/api/src/modules/shared/infrastructure/guards/user-rate-limit.guard.ts @@ -5,10 +5,10 @@ import { HttpException, HttpStatus, } from '@nestjs/common'; -import { type Reflector } from '@nestjs/core'; +import { Reflector } from '@nestjs/core'; import { type UserRole } from '@prisma/client'; -import { type LoggerService } from '../logger.service'; -import { type RedisService } from '../redis.service'; +import { LoggerService } from '../logger.service'; +import { RedisService } from '../redis.service'; /** * Role-based rate limits (requests per window). diff --git a/apps/api/src/modules/shared/infrastructure/middleware/request-logging.middleware.ts b/apps/api/src/modules/shared/infrastructure/middleware/request-logging.middleware.ts index b083119..de43557 100644 --- a/apps/api/src/modules/shared/infrastructure/middleware/request-logging.middleware.ts +++ b/apps/api/src/modules/shared/infrastructure/middleware/request-logging.middleware.ts @@ -1,6 +1,6 @@ import { Injectable, type NestMiddleware } from '@nestjs/common'; import { type NextFunction, type Request, type Response } from 'express'; -import { type LoggerService } from '../logger.service'; +import { LoggerService } from '../logger.service'; @Injectable() export class RequestLoggingMiddleware implements NestMiddleware { diff --git a/apps/api/src/modules/shared/infrastructure/prisma.service.ts b/apps/api/src/modules/shared/infrastructure/prisma.service.ts index 918f224..ac3d485 100644 --- a/apps/api/src/modules/shared/infrastructure/prisma.service.ts +++ b/apps/api/src/modules/shared/infrastructure/prisma.service.ts @@ -4,7 +4,7 @@ import { PrismaClient } from '@prisma/client'; import pg from 'pg'; import { createEncryptionExtension } from './encryption-middleware'; import { FieldEncryptionService } from './field-encryption.service'; -import { type LoggerService } from './logger.service'; +import { LoggerService } from './logger.service'; @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { diff --git a/apps/api/src/modules/subscriptions/application/commands/cancel-subscription/cancel-subscription.handler.ts b/apps/api/src/modules/subscriptions/application/commands/cancel-subscription/cancel-subscription.handler.ts index ab34a08..11d7b45 100644 --- a/apps/api/src/modules/subscriptions/application/commands/cancel-subscription/cancel-subscription.handler.ts +++ b/apps/api/src/modules/subscriptions/application/commands/cancel-subscription/cancel-subscription.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared'; import { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository, diff --git a/apps/api/src/modules/subscriptions/application/commands/create-subscription/create-subscription.handler.ts b/apps/api/src/modules/subscriptions/application/commands/create-subscription/create-subscription.handler.ts index 801fb92..b3074a0 100644 --- a/apps/api/src/modules/subscriptions/application/commands/create-subscription/create-subscription.handler.ts +++ b/apps/api/src/modules/subscriptions/application/commands/create-subscription/create-subscription.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; import { createId } from '@paralleldrive/cuid2'; -import { DomainException, NotFoundException, ConflictException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ConflictException, PrismaService, LoggerService } from '@modules/shared'; import { SubscriptionEntity } from '../../../domain/entities/subscription.entity'; import { SUBSCRIPTION_REPOSITORY, diff --git a/apps/api/src/modules/subscriptions/application/commands/meter-usage/meter-usage.handler.ts b/apps/api/src/modules/subscriptions/application/commands/meter-usage/meter-usage.handler.ts index 0ea7448..b70aacf 100644 --- a/apps/api/src/modules/subscriptions/application/commands/meter-usage/meter-usage.handler.ts +++ b/apps/api/src/modules/subscriptions/application/commands/meter-usage/meter-usage.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, ValidationException, CacheService, CachePrefix, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, ValidationException, CacheService, CachePrefix, PrismaService, LoggerService } from '@modules/shared'; import { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository, diff --git a/apps/api/src/modules/subscriptions/application/commands/upgrade-subscription/upgrade-subscription.handler.ts b/apps/api/src/modules/subscriptions/application/commands/upgrade-subscription/upgrade-subscription.handler.ts index 2f40e28..0e220c2 100644 --- a/apps/api/src/modules/subscriptions/application/commands/upgrade-subscription/upgrade-subscription.handler.ts +++ b/apps/api/src/modules/subscriptions/application/commands/upgrade-subscription/upgrade-subscription.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; -import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs'; -import { DomainException, NotFoundException, ValidationException, CacheService, CachePrefix, type PrismaService, type LoggerService } from '@modules/shared'; +import { CommandHandler, EventBus, type ICommandHandler } from '@nestjs/cqrs'; +import { DomainException, NotFoundException, ValidationException, CacheService, CachePrefix, PrismaService, LoggerService } from '@modules/shared'; import { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository, diff --git a/apps/api/src/modules/subscriptions/application/queries/check-quota/check-quota.handler.ts b/apps/api/src/modules/subscriptions/application/queries/check-quota/check-quota.handler.ts index 115906f..4bca55a 100644 --- a/apps/api/src/modules/subscriptions/application/queries/check-quota/check-quota.handler.ts +++ b/apps/api/src/modules/subscriptions/application/queries/check-quota/check-quota.handler.ts @@ -1,7 +1,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; import { type Plan } from '@prisma/client'; -import { DomainException, NotFoundException, CacheService, CachePrefix, CacheTTL, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, NotFoundException, CacheService, CachePrefix, CacheTTL, PrismaService, LoggerService } from '@modules/shared'; import { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository, diff --git a/apps/api/src/modules/subscriptions/application/queries/get-billing-history/get-billing-history.handler.ts b/apps/api/src/modules/subscriptions/application/queries/get-billing-history/get-billing-history.handler.ts index 0c7ac30..a7cf56c 100644 --- a/apps/api/src/modules/subscriptions/application/queries/get-billing-history/get-billing-history.handler.ts +++ b/apps/api/src/modules/subscriptions/application/queries/get-billing-history/get-billing-history.handler.ts @@ -1,6 +1,6 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { DomainException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, PrismaService, LoggerService } from '@modules/shared'; import { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository, diff --git a/apps/api/src/modules/subscriptions/application/queries/get-plan/get-plan.handler.ts b/apps/api/src/modules/subscriptions/application/queries/get-plan/get-plan.handler.ts index 77505ea..063138a 100644 --- a/apps/api/src/modules/subscriptions/application/queries/get-plan/get-plan.handler.ts +++ b/apps/api/src/modules/subscriptions/application/queries/get-plan/get-plan.handler.ts @@ -1,7 +1,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; import { type Plan } from '@prisma/client'; -import { DomainException, CacheService, CachePrefix, CacheTTL, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; +import { DomainException, CacheService, CachePrefix, CacheTTL, NotFoundException, PrismaService, LoggerService } from '@modules/shared'; import { GetPlanQuery } from './get-plan.query'; export interface PlanDto { diff --git a/apps/api/src/modules/subscriptions/infrastructure/event-handlers/bank-transfer-subscription-activation.handler.ts b/apps/api/src/modules/subscriptions/infrastructure/event-handlers/bank-transfer-subscription-activation.handler.ts index 43db6c4..7a61de9 100644 --- a/apps/api/src/modules/subscriptions/infrastructure/event-handlers/bank-transfer-subscription-activation.handler.ts +++ b/apps/api/src/modules/subscriptions/infrastructure/event-handlers/bank-transfer-subscription-activation.handler.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; import { type BankTransferConfirmedEvent } from '@modules/payments'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { LoggerService, PrismaService } from '@modules/shared'; /** * Handles subscription activation once a bank-transfer payment is confirmed. diff --git a/apps/api/src/modules/subscriptions/infrastructure/event-handlers/listing-created-usage.handler.ts b/apps/api/src/modules/subscriptions/infrastructure/event-handlers/listing-created-usage.handler.ts index d4f0794..4bbbf81 100644 --- a/apps/api/src/modules/subscriptions/infrastructure/event-handlers/listing-created-usage.handler.ts +++ b/apps/api/src/modules/subscriptions/infrastructure/event-handlers/listing-created-usage.handler.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { type CommandBus } from '@nestjs/cqrs'; +import { CommandBus } from '@nestjs/cqrs'; import { OnEvent } from '@nestjs/event-emitter'; import { type ListingCreatedEvent } from '@modules/listings'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { MeterUsageCommand } from '../../application/commands/meter-usage/meter-usage.command'; @Injectable() diff --git a/apps/api/src/modules/subscriptions/infrastructure/repositories/prisma-subscription.repository.ts b/apps/api/src/modules/subscriptions/infrastructure/repositories/prisma-subscription.repository.ts index 482d97a..0b0ad2b 100644 --- a/apps/api/src/modules/subscriptions/infrastructure/repositories/prisma-subscription.repository.ts +++ b/apps/api/src/modules/subscriptions/infrastructure/repositories/prisma-subscription.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { type Subscription as PrismaSubscription, type Plan as PrismaPlan } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import { SubscriptionEntity, type SubscriptionProps } from '../../domain/entities/subscription.entity'; import { type ISubscriptionRepository } from '../../domain/repositories/subscription.repository'; diff --git a/apps/api/src/modules/subscriptions/presentation/controllers/subscriptions.controller.ts b/apps/api/src/modules/subscriptions/presentation/controllers/subscriptions.controller.ts index ef368ae..50eca1e 100644 --- a/apps/api/src/modules/subscriptions/presentation/controllers/subscriptions.controller.ts +++ b/apps/api/src/modules/subscriptions/presentation/controllers/subscriptions.controller.ts @@ -9,7 +9,7 @@ import { Query, UseGuards, } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiTags, ApiOperation, @@ -33,11 +33,11 @@ import { type BillingHistoryDto } from '../../application/queries/get-billing-hi import { GetBillingHistoryQuery } from '../../application/queries/get-billing-history/get-billing-history.query'; import { type PlanDto } from '../../application/queries/get-plan/get-plan.handler'; import { GetPlanQuery } from '../../application/queries/get-plan/get-plan.query'; -import { type BillingHistoryParamsDto } from '../dto/billing-history.dto'; -import { type CancelSubscriptionDto } from '../dto/cancel-subscription.dto'; -import { type CreateSubscriptionDto } from '../dto/create-subscription.dto'; -import { type MeterUsageDto } from '../dto/meter-usage.dto'; -import { type UpgradeSubscriptionDto } from '../dto/upgrade-subscription.dto'; +import { BillingHistoryParamsDto } from '../dto/billing-history.dto'; +import { CancelSubscriptionDto } from '../dto/cancel-subscription.dto'; +import { CreateSubscriptionDto } from '../dto/create-subscription.dto'; +import { MeterUsageDto } from '../dto/meter-usage.dto'; +import { UpgradeSubscriptionDto } from '../dto/upgrade-subscription.dto'; @ApiTags('subscriptions') @Controller('subscriptions') diff --git a/apps/api/src/modules/subscriptions/presentation/guards/quota.guard.ts b/apps/api/src/modules/subscriptions/presentation/guards/quota.guard.ts index ef06370..9dcd08b 100644 --- a/apps/api/src/modules/subscriptions/presentation/guards/quota.guard.ts +++ b/apps/api/src/modules/subscriptions/presentation/guards/quota.guard.ts @@ -4,9 +4,9 @@ import { ForbiddenException, Injectable, } from '@nestjs/common'; -import { type Reflector } from '@nestjs/core'; -import { type QueryBus } from '@nestjs/cqrs'; -import { type EventEmitter2 } from '@nestjs/event-emitter'; +import { Reflector } from '@nestjs/core'; +import { QueryBus } from '@nestjs/cqrs'; +import { EventEmitter2 } from '@nestjs/event-emitter'; import { type QuotaCheckResult } from '../../application/queries/check-quota/check-quota.handler'; import { CheckQuotaQuery } from '../../application/queries/check-quota/check-quota.query'; import { QuotaExceededEvent } from '../../domain/events/quota-exceeded.event'; diff --git a/apps/api/src/modules/transfer/application/commands/moderate-transfer-listing/moderate-transfer-listing.handler.ts b/apps/api/src/modules/transfer/application/commands/moderate-transfer-listing/moderate-transfer-listing.handler.ts index 05e8e6f..383f322 100644 --- a/apps/api/src/modules/transfer/application/commands/moderate-transfer-listing/moderate-transfer-listing.handler.ts +++ b/apps/api/src/modules/transfer/application/commands/moderate-transfer-listing/moderate-transfer-listing.handler.ts @@ -1,6 +1,6 @@ import { Inject } from '@nestjs/common'; import { type ICommandHandler, CommandHandler } from '@nestjs/cqrs'; -import { type EventBusService, NotFoundException } from '@modules/shared'; +import { EventBusService, NotFoundException } from '@modules/shared'; import { TransferListingUpdatedEvent } from '../../../domain/events'; import { TRANSFER_LISTING_REPOSITORY, diff --git a/apps/api/src/modules/transfer/domain/entities/transfer-listing.entity.ts b/apps/api/src/modules/transfer/domain/entities/transfer-listing.entity.ts index 247effe..0fbf1a6 100644 --- a/apps/api/src/modules/transfer/domain/entities/transfer-listing.entity.ts +++ b/apps/api/src/modules/transfer/domain/entities/transfer-listing.entity.ts @@ -143,6 +143,21 @@ export class TransferListingEntity extends AggregateRoot { get expiresAt() { return this._expiresAt; } get publishedAt() { return this._publishedAt; } + approve(moderationScore?: number, notes?: string): void { + this._status = 'ACTIVE'; + this._moderationScore = moderationScore ?? null; + this._moderationNotes = notes ?? null; + this._publishedAt = new Date(); + this.updatedAt = new Date(); + } + + reject(moderationScore?: number, notes?: string): void { + this._status = 'REJECTED'; + this._moderationScore = moderationScore ?? null; + this._moderationNotes = notes ?? null; + this.updatedAt = new Date(); + } + updateDetails(props: Partial): void { if (props.sellerId !== undefined) this._sellerId = props.sellerId; if (props.category !== undefined) this._category = props.category; diff --git a/apps/api/src/modules/transfer/infrastructure/event-handlers/transfer-listing-typesense.handler.ts b/apps/api/src/modules/transfer/infrastructure/event-handlers/transfer-listing-typesense.handler.ts index 3963db0..b0af5a0 100644 --- a/apps/api/src/modules/transfer/infrastructure/event-handlers/transfer-listing-typesense.handler.ts +++ b/apps/api/src/modules/transfer/infrastructure/event-handlers/transfer-listing-typesense.handler.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; -import { type LoggerService } from '@modules/shared'; +import { LoggerService } from '@modules/shared'; import { type TransferListingCreatedEvent } from '../../domain/events/transfer-listing-created.event'; import { type TransferListingUpdatedEvent } from '../../domain/events/transfer-listing-updated.event'; import { type TransferListingDeletedEvent } from '../../domain/events/transfer-listing-deleted.event'; diff --git a/apps/api/src/modules/transfer/infrastructure/repositories/prisma-transfer-listing.repository.ts b/apps/api/src/modules/transfer/infrastructure/repositories/prisma-transfer-listing.repository.ts index 1748168..edcdbb1 100644 --- a/apps/api/src/modules/transfer/infrastructure/repositories/prisma-transfer-listing.repository.ts +++ b/apps/api/src/modules/transfer/infrastructure/repositories/prisma-transfer-listing.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { createId } from '@paralleldrive/cuid2'; import type { Prisma } from '@prisma/client'; -import { type PrismaService } from '@modules/shared'; +import { PrismaService } from '@modules/shared'; import type { CreateTransferItemInput } from '../../application/commands/create-transfer-listing/create-transfer-listing.command'; import { TransferListingEntity } from '../../domain/entities/transfer-listing.entity'; import type { diff --git a/apps/api/src/modules/transfer/infrastructure/services/claude-vision.service.ts b/apps/api/src/modules/transfer/infrastructure/services/claude-vision.service.ts index 000d91a..1ff1acf 100644 --- a/apps/api/src/modules/transfer/infrastructure/services/claude-vision.service.ts +++ b/apps/api/src/modules/transfer/infrastructure/services/claude-vision.service.ts @@ -1,9 +1,9 @@ import { createHash } from 'crypto'; import Anthropic from '@anthropic-ai/sdk'; import { Injectable, Logger } from '@nestjs/common'; -import { type ConfigService } from '@nestjs/config'; +import { ConfigService } from '@nestjs/config'; import type { TransferCategory, TransferCondition } from '@prisma/client'; -import { CachePrefix, type CacheService } from '@modules/shared'; +import { CachePrefix, CacheService } from '@modules/shared'; export interface VisionAssessmentInput { imageUrls?: string[]; diff --git a/apps/api/src/modules/transfer/infrastructure/services/typesense-transfer.service.ts b/apps/api/src/modules/transfer/infrastructure/services/typesense-transfer.service.ts index 38a2942..10b2252 100644 --- a/apps/api/src/modules/transfer/infrastructure/services/typesense-transfer.service.ts +++ b/apps/api/src/modules/transfer/infrastructure/services/typesense-transfer.service.ts @@ -1,8 +1,8 @@ import { Injectable, type OnModuleInit } from '@nestjs/common'; import { type Client as TypesenseClient } from 'typesense'; import { type CollectionCreateSchema } from 'typesense/lib/Typesense/Collections'; -import { type TypesenseClientService } from '@modules/search'; -import { type LoggerService, type PrismaService } from '@modules/shared'; +import { TypesenseClientService } from '@modules/search'; +import { LoggerService, PrismaService } from '@modules/shared'; export const TRANSFER_LISTINGS_COLLECTION = 'transfer_listings'; diff --git a/apps/api/src/modules/transfer/presentation/controllers/transfer.controller.ts b/apps/api/src/modules/transfer/presentation/controllers/transfer.controller.ts index 64e73bb..fd72379 100644 --- a/apps/api/src/modules/transfer/presentation/controllers/transfer.controller.ts +++ b/apps/api/src/modules/transfer/presentation/controllers/transfer.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, Param, Patch, Post, Query, UseGuards } from '@nestjs/common'; -import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; +import { CommandBus, QueryBus } from '@nestjs/cqrs'; import { ApiBearerAuth, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { JwtAuthGuard, CurrentUser } from '@modules/auth'; import { EndpointRateLimit, EndpointRateLimitGuard, NotFoundException } from '@modules/shared'; @@ -11,11 +11,11 @@ import { UpdateTransferListingCommand } from '../../application/commands/update- import { GetTransferListingQuery } from '../../application/queries/get-transfer-listing/get-transfer-listing.query'; import { ListTransferListingsQuery } from '../../application/queries/list-transfer-listings/list-transfer-listings.query'; import { TransferStatsQuery } from '../../application/queries/transfer-stats/transfer-stats.query'; -import { type CreateTransferListingDto } from '../dto/create-transfer-listing.dto'; -import { type EstimateFromPhotosDto } from '../dto/estimate-from-photos.dto'; -import { type EstimateTransferPricesDto } from '../dto/estimate-transfer-prices.dto'; -import { type SearchTransferListingsDto } from '../dto/search-transfer-listings.dto'; -import { type UpdateTransferListingDto } from '../dto/update-transfer-listing.dto'; +import { CreateTransferListingDto } from '../dto/create-transfer-listing.dto'; +import { EstimateFromPhotosDto } from '../dto/estimate-from-photos.dto'; +import { EstimateTransferPricesDto } from '../dto/estimate-transfer-prices.dto'; +import { SearchTransferListingsDto } from '../dto/search-transfer-listings.dto'; +import { UpdateTransferListingDto } from '../dto/update-transfer-listing.dto'; @ApiTags('transfer') @Controller('transfer')