fix(api): remove type-only imports of injectable classes to fix NestJS DI

Type-only imports (`import { type X }`) strip runtime type metadata
needed by NestJS dependency injection via reflect-metadata. This caused
`UnknownDependenciesException` errors where constructor parameters
resolved to `Function` instead of the actual class.

Fixed 129 files across all modules:
- Services (LoggerService, PrismaService, CacheService, etc.)
- CQRS buses (EventBus, QueryBus, CommandBus)
- DTOs used with @Body()/@Query() decorators in controllers
- Payment gateway services and search repositories

Also fixed E2E test infrastructure:
- auth.fixture.ts: use destructuring pattern for Playwright fixture
- global-teardown.ts: correct column names (Lead.agentId, Transaction.buyerId)
- inquiries.spec.ts: flexible response property checks
- payments-callback.spec.ts: accept 500 for unknown provider

All 111 API E2E tests now pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ho Ngoc Hai
2026-04-12 20:43:35 +07:00
parent 4f406dab02
commit c658e540f0
129 changed files with 256 additions and 252 deletions

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository } from '@modules/subscriptions';
import { SubscriptionAdjustedEvent } from '../../../domain/events/subscription-adjusted.event'; import { SubscriptionAdjustedEvent } from '../../../domain/events/subscription-adjusted.event';
import { AdjustSubscriptionCommand } from './adjust-subscription.command'; import { AdjustSubscriptionCommand } from './adjust-subscription.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { KycApprovedEvent } from '../../../domain/events/kyc-approved.event';
import { ApproveKycCommand } from './approve-kyc.command'; import { ApproveKycCommand } from './approve-kyc.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { ListingApprovedEvent } from '../../../domain/events/listing-approved.event';
import { ApproveListingCommand } from './approve-listing.command'; import { ApproveListingCommand } from './approve-listing.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { UserBannedEvent } from '../../../domain/events/user-banned.event';
import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event'; import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event';
import { BanUserCommand } from './ban-user.command'; import { BanUserCommand } from './ban-user.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { ListingApprovedEvent } from '../../../domain/events/listing-approved.event';
import { ListingRejectedEvent } from '../../../domain/events/listing-rejected.event'; import { ListingRejectedEvent } from '../../../domain/events/listing-rejected.event';
import { BulkModerateListingsCommand } from './bulk-moderate-listings.command'; import { BulkModerateListingsCommand } from './bulk-moderate-listings.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { KycRejectedEvent } from '../../../domain/events/kyc-rejected.event';
import { RejectKycCommand } from './reject-kyc.command'; import { RejectKycCommand } from './reject-kyc.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { ListingRejectedEvent } from '../../../domain/events/listing-rejected.event';
import { RejectListingCommand } from './reject-listing.command'; import { RejectListingCommand } from './reject-listing.command';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { UserBannedEvent } from '../../../domain/events/user-banned.event';
import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event'; import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event';
import { UpdateUserStatusCommand } from './update-user-status.command'; import { UpdateUserStatusCommand } from './update-user-status.command';

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { SendNotificationCommand } from '@modules/notifications'; 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'; import { type UserBannedEvent } from '../../domain/events/user-banned.event';
@Injectable() @Injectable()

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type UserDeactivatedEvent } from '@modules/auth'; import { type UserDeactivatedEvent } from '@modules/auth';
import { type LoggerService, type PrismaService } from '@modules/shared'; import { LoggerService, PrismaService } from '@modules/shared';
@Injectable() @Injectable()
export class UserDeactivatedListener { export class UserDeactivatedListener {

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared'; import { DomainException, LoggerService } from '@modules/shared';
import { import {
AUDIT_LOG_REPOSITORY, AUDIT_LOG_REPOSITORY,
type IAuditLogRepository, type IAuditLogRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type DashboardStats } from '../../../domain/repositories/admin-query.repository';
import { GetDashboardStatsQuery } from './get-dashboard-stats.query'; import { GetDashboardStatsQuery } from './get-dashboard-stats.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type KycQueueResult } from '../../../domain/repositories/admin-query.repository';
import { GetKycQueueQuery } from './get-kyc-queue.query'; import { GetKycQueueQuery } from './get-kyc-queue.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type ModerationQueueResult } from '../../../domain/repositories/admin-query.repository';
import { GetModerationQueueQuery } from './get-moderation-queue.query'; import { GetModerationQueueQuery } from './get-moderation-queue.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type RevenueStatsItem } from '../../../domain/repositories/admin-query.repository';
import { GetRevenueStatsQuery } from './get-revenue-stats.query'; import { GetRevenueStatsQuery } from './get-revenue-stats.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type UserDetail } from '../../../domain/repositories/admin-query.repository';
import { GetUserDetailQuery } from './get-user-detail.query'; import { GetUserDetailQuery } from './get-user-detail.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type UserListResult } from '../../../domain/repositories/admin-query.repository';
import { GetUsersQuery } from './get-users.query'; import { GetUsersQuery } from './get-users.query';

View File

@@ -6,7 +6,7 @@ import {
Query, Query,
UseGuards, UseGuards,
} from '@nestjs/common'; } 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 { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiQuery } from '@nestjs/swagger';
import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth'; import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth';
import { ApproveKycCommand } from '../../application/commands/approve-kyc/approve-kyc.command'; import { ApproveKycCommand } from '../../application/commands/approve-kyc/approve-kyc.command';
@@ -25,11 +25,11 @@ import {
type ModerationQueueResult, type ModerationQueueResult,
type KycQueueResult, type KycQueueResult,
} from '../../domain/repositories/admin-query.repository'; } from '../../domain/repositories/admin-query.repository';
import { type ApproveKycDto } from '../dto/approve-kyc.dto'; import { ApproveKycDto } from '../dto/approve-kyc.dto';
import { type ApproveListingDto } from '../dto/approve-listing.dto'; import { ApproveListingDto } from '../dto/approve-listing.dto';
import { type BulkModerateDto } from '../dto/bulk-moderate.dto'; import { BulkModerateDto } from '../dto/bulk-moderate.dto';
import { type RejectKycDto } from '../dto/reject-kyc.dto'; import { RejectKycDto } from '../dto/reject-kyc.dto';
import { type RejectListingDto } from '../dto/reject-listing.dto'; import { RejectListingDto } from '../dto/reject-listing.dto';
@ApiTags('admin') @ApiTags('admin')
@ApiBearerAuth('JWT') @ApiBearerAuth('JWT')

View File

@@ -8,7 +8,7 @@ import {
Query, Query,
UseGuards, UseGuards,
} from '@nestjs/common'; } 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 { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiQuery, ApiParam } from '@nestjs/swagger';
import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth'; import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth';
import { AdjustSubscriptionCommand } from '../../application/commands/adjust-subscription/adjust-subscription.command'; import { AdjustSubscriptionCommand } from '../../application/commands/adjust-subscription/adjust-subscription.command';
@@ -29,12 +29,12 @@ import {
type UserDetail, type UserDetail,
} from '../../domain/repositories/admin-query.repository'; } from '../../domain/repositories/admin-query.repository';
import { type AuditLogListResult } from '../../domain/repositories/audit-log.repository'; import { type AuditLogListResult } from '../../domain/repositories/audit-log.repository';
import { type AdjustSubscriptionDto } from '../dto/adjust-subscription.dto'; import { AdjustSubscriptionDto } from '../dto/adjust-subscription.dto';
import { type BanUserDto } from '../dto/ban-user.dto'; import { BanUserDto } from '../dto/ban-user.dto';
import { type GetAuditLogsQueryDto } from '../dto/get-audit-logs-query.dto'; import { GetAuditLogsQueryDto } from '../dto/get-audit-logs-query.dto';
import { type GetUsersQueryDto } from '../dto/get-users-query.dto'; import { GetUsersQueryDto } from '../dto/get-users-query.dto';
import { type RevenueStatsDto } from '../dto/revenue-stats.dto'; import { RevenueStatsDto } from '../dto/revenue-stats.dto';
import { type UpdateUserStatusDto } from '../dto/update-user-status.dto'; import { UpdateUserStatusDto } from '../dto/update-user-status.dto';
@ApiTags('admin') @ApiTags('admin')
@ApiBearerAuth('JWT') @ApiBearerAuth('JWT')

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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, type LoggerService } from '@modules/shared'; import { DomainException, LoggerService } from '@modules/shared';
import { import {
AGENT_REPOSITORY, AGENT_REPOSITORY,
type IAgentRepository, type IAgentRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, type LoggerService } from '@modules/shared'; import { DomainException, NotFoundException, LoggerService } from '@modules/shared';
import { import {
AGENT_REPOSITORY, AGENT_REPOSITORY,
type AgentDashboardData, type AgentDashboardData,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared'; import { DomainException, LoggerService } from '@modules/shared';
import { import {
AGENT_REPOSITORY, AGENT_REPOSITORY,
type AgentPublicProfileData, type AgentPublicProfileData,

View File

@@ -1,5 +1,5 @@
import { Controller, Get, NotFoundException, Param, Post, UseGuards } from '@nestjs/common'; 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 { import {
ApiBearerAuth, ApiBearerAuth,
ApiOperation, ApiOperation,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared'; import { DomainException, LoggerService } from '@modules/shared';
import { import {
MARKET_INDEX_REPOSITORY, MARKET_INDEX_REPOSITORY,
type IMarketIndexRepository, type IMarketIndexRepository,

View File

@@ -1,6 +1,6 @@
import { InternalServerErrorException } from '@nestjs/common'; import { InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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'; import { TrackEventCommand } from './track-event.command';
export interface TrackEventResult { export interface TrackEventResult {

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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 { MarketIndexEntity } from '../../../domain/entities/market-index.entity';
import { import {
MARKET_INDEX_REPOSITORY, MARKET_INDEX_REPOSITORY,

View File

@@ -1,7 +1,7 @@
import { Inject } from '@nestjs/common'; 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 { ListingCreatedEvent, ModerateListingCommand } from '@modules/listings';
import { type PrismaService, type LoggerService } from '@modules/shared'; import { PrismaService, LoggerService } from '@modules/shared';
import { import {
AI_SERVICE_CLIENT, AI_SERVICE_CLIENT,
type IAiServiceClient, type IAiServiceClient,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { import {
MARKET_INDEX_REPOSITORY, MARKET_INDEX_REPOSITORY,
type IMarketIndexRepository, type IMarketIndexRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { import {
MARKET_INDEX_REPOSITORY, MARKET_INDEX_REPOSITORY,
type IMarketIndexRepository, type IMarketIndexRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { import {
MARKET_INDEX_REPOSITORY, MARKET_INDEX_REPOSITORY,
type IMarketIndexRepository, type IMarketIndexRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { import {
MARKET_INDEX_REPOSITORY, MARKET_INDEX_REPOSITORY,
type IMarketIndexRepository, type IMarketIndexRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { import {
AVM_SERVICE, AVM_SERVICE,
type IAVMService, type IAVMService,

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { Cron, CronExpression } from '@nestjs/schedule'; import { Cron, CronExpression } from '@nestjs/schedule';
import { PropertyType } from '@prisma/client'; 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'; import { UpdateMarketIndexCommand } from '../../application/commands/update-market-index/update-market-index.command';
interface MarketStats { interface MarketStats {

View File

@@ -4,25 +4,25 @@ import {
Query, Query,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { type QueryBus } from '@nestjs/cqrs'; import { QueryBus } from '@nestjs/cqrs';
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
import { JwtAuthGuard } from '@modules/auth'; import { JwtAuthGuard } from '@modules/auth';
import { RequireQuota, QuotaGuard } from '@modules/subscriptions'; import { RequireQuota, QuotaGuard } from '@modules/subscriptions';
import { type DistrictStatsDto } from '../../application/queries/get-district-stats/get-district-stats.handler'; import { DistrictStatsDto } from '../../application/queries/get-district-stats/get-district-stats.handler';
import { GetDistrictStatsQuery } from '../../application/queries/get-district-stats/get-district-stats.query'; import { GetDistrictStatsQuery } from '../../application/queries/get-district-stats/get-district-stats.query';
import { type HeatmapDto } from '../../application/queries/get-heatmap/get-heatmap.handler'; import { HeatmapDto } from '../../application/queries/get-heatmap/get-heatmap.handler';
import { GetHeatmapQuery } from '../../application/queries/get-heatmap/get-heatmap.query'; import { GetHeatmapQuery } from '../../application/queries/get-heatmap/get-heatmap.query';
import { type MarketReportDto } from '../../application/queries/get-market-report/get-market-report.handler'; import { MarketReportDto } from '../../application/queries/get-market-report/get-market-report.handler';
import { GetMarketReportQuery } from '../../application/queries/get-market-report/get-market-report.query'; import { GetMarketReportQuery } from '../../application/queries/get-market-report/get-market-report.query';
import { type PriceTrendDto } from '../../application/queries/get-price-trend/get-price-trend.handler'; import { PriceTrendDto } from '../../application/queries/get-price-trend/get-price-trend.handler';
import { GetPriceTrendQuery } from '../../application/queries/get-price-trend/get-price-trend.query'; import { GetPriceTrendQuery } from '../../application/queries/get-price-trend/get-price-trend.query';
import { type ValuationDto } from '../../application/queries/get-valuation/get-valuation.handler'; import { ValuationDto } from '../../application/queries/get-valuation/get-valuation.handler';
import { GetValuationQuery } from '../../application/queries/get-valuation/get-valuation.query'; import { GetValuationQuery } from '../../application/queries/get-valuation/get-valuation.query';
import { type GetDistrictStatsDto } from '../dto/get-district-stats.dto'; import { GetDistrictStatsDto } from '../dto/get-district-stats.dto';
import { type GetHeatmapDto } from '../dto/get-heatmap.dto'; import { GetHeatmapDto } from '../dto/get-heatmap.dto';
import { type GetMarketReportDto } from '../dto/get-market-report.dto'; import { GetMarketReportDto } from '../dto/get-market-report.dto';
import { type GetPriceTrendDto } from '../dto/get-price-trend.dto'; import { GetPriceTrendDto } from '../dto/get-price-trend.dto';
import { type GetValuationDto } from '../dto/get-valuation.dto'; import { GetValuationDto } from '../dto/get-valuation.dto';
@ApiTags('analytics') @ApiTags('analytics')
@Controller('analytics') @Controller('analytics')

View File

@@ -1,6 +1,6 @@
import { InternalServerErrorException } from '@nestjs/common'; import { InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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'; import { CancelUserDeletionCommand } from './cancel-user-deletion.command';
@CommandHandler(CancelUserDeletionCommand) @CommandHandler(CancelUserDeletionCommand)

View File

@@ -1,6 +1,6 @@
import { InternalServerErrorException } from '@nestjs/common'; import { InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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'; import { ExportUserDataCommand } from './export-user-data.command';
export interface UserDataExport { export interface UserDataExport {

View File

@@ -1,7 +1,7 @@
import { InternalServerErrorException } from '@nestjs/common'; import { InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { Prisma } from '@prisma/client'; 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'; import { ForceDeleteUserCommand } from './force-delete-user.command';
@CommandHandler(ForceDeleteUserCommand) @CommandHandler(ForceDeleteUserCommand)

View File

@@ -1,12 +1,12 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { createId } from '@paralleldrive/cuid2'; import { createId } from '@paralleldrive/cuid2';
import { type LoggerService, DomainException } from '@modules/shared'; import { LoggerService, DomainException } from '@modules/shared';
import { import {
MFA_CHALLENGE_REPOSITORY, MFA_CHALLENGE_REPOSITORY,
type IMfaChallengeRepository, type IMfaChallengeRepository,
} from '../../../domain/repositories/mfa-challenge.repository'; } 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'; import { LoginUserCommand } from './login-user.command';
const MFA_CHALLENGE_TTL_MINUTES = 5; const MFA_CHALLENGE_TTL_MINUTES = 5;

View File

@@ -1,6 +1,6 @@
import { InternalServerErrorException } from '@nestjs/common'; import { InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type CommandBus, type ICommandHandler } from '@nestjs/cqrs'; import { CommandHandler, CommandBus, type ICommandHandler } from '@nestjs/cqrs';
import { type LoggerService, type PrismaService, DomainException } from '@modules/shared'; import { LoggerService, PrismaService, DomainException } from '@modules/shared';
import { ForceDeleteUserCommand } from '../force-delete-user/force-delete-user.command'; import { ForceDeleteUserCommand } from '../force-delete-user/force-delete-user.command';
import { ProcessScheduledDeletionsCommand } from './process-scheduled-deletions.command'; import { ProcessScheduledDeletionsCommand } from './process-scheduled-deletions.command';

View File

@@ -1,8 +1,8 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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 { 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'; import { RefreshTokenCommand } from './refresh-token.command';
@CommandHandler(RefreshTokenCommand) @CommandHandler(RefreshTokenCommand)

View File

@@ -1,13 +1,13 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { UserEntity } from '../../../domain/entities/user.entity';
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository'; import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
import { Email } from '../../../domain/value-objects/email.vo'; import { Email } from '../../../domain/value-objects/email.vo';
import { HashedPassword } from '../../../domain/value-objects/hashed-password.vo'; import { HashedPassword } from '../../../domain/value-objects/hashed-password.vo';
import { Phone } from '../../../domain/value-objects/phone.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'; import { RegisterUserCommand } from './register-user.command';
@CommandHandler(RegisterUserCommand) @CommandHandler(RegisterUserCommand)

View File

@@ -1,6 +1,6 @@
import { InternalServerErrorException } from '@nestjs/common'; import { InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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'; import { RequestUserDeletionCommand } from './request-user-deletion.command';
const DELETION_GRACE_PERIOD_DAYS = 30; const DELETION_GRACE_PERIOD_DAYS = 30;

View File

@@ -1,8 +1,8 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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 { 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'; import { SetupMfaCommand } from './setup-mfa.command';
export interface SetupMfaResultDto { export interface SetupMfaResultDto {

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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 { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
import { VerifyKycCommand } from './verify-kyc.command'; import { VerifyKycCommand } from './verify-kyc.command';

View File

@@ -1,6 +1,6 @@
import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { Injectable, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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'; import { GetAgentByUserIdQuery } from './get-agent-by-user-id.query';
export interface AgentDto { export interface AgentDto {

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
import { GetMfaStatusQuery } from './get-mfa-status.query'; import { GetMfaStatusQuery } from './get-mfa-status.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
import { GetProfileQuery } from './get-profile.query'; import { GetProfileQuery } from './get-profile.query';

View File

@@ -1,14 +1,14 @@
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { type EventBus } from '@nestjs/cqrs'; import { EventBus } from '@nestjs/cqrs';
import { createId } from '@paralleldrive/cuid2'; import { createId } from '@paralleldrive/cuid2';
import { type OAuthProvider, type Prisma } from '@prisma/client'; 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 { UserEntity } from '../../domain/entities/user.entity';
import { UserRegisteredEvent } from '../../domain/events/user-registered.event'; import { UserRegisteredEvent } from '../../domain/events/user-registered.event';
import { USER_REPOSITORY, type IUserRepository } from '../../domain/repositories/user.repository'; import { USER_REPOSITORY, type IUserRepository } from '../../domain/repositories/user.repository';
import { Email } from '../../domain/value-objects/email.vo'; import { Email } from '../../domain/value-objects/email.vo';
import { Phone } from '../../domain/value-objects/phone.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 { export interface OAuthUserProfile {
provider: OAuthProvider; provider: OAuthProvider;

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport'; import { PassportStrategy } from '@nestjs/passport';
import { Strategy, type Profile, type VerifyCallback } from 'passport-google-oauth20'; 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() @Injectable()
export class GoogleOAuthStrategy extends PassportStrategy(Strategy, 'google') { export class GoogleOAuthStrategy extends PassportStrategy(Strategy, 'google') {

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { LoggerService } from '@modules/shared'; import { LoggerService } from '@modules/shared';
import { type OAuthService, type OAuthUserProfile } from '../services/oauth.service'; import { OAuthService, type OAuthUserProfile } from '../services/oauth.service';
import { type TokenPair } from '../services/token.service'; import { type TokenPair } from '../services/token.service';
/** /**

View File

@@ -8,7 +8,7 @@ import {
Res, Res,
UseGuards, UseGuards,
} from '@nestjs/common'; } 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 { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiBody } from '@nestjs/swagger';
import { Throttle } from '@nestjs/throttler'; import { Throttle } from '@nestjs/throttler';
import { type Request, type Response } from 'express'; import { type Request, type Response } from 'express';
@@ -18,18 +18,18 @@ import { type LoginResult } from '../../application/commands/login-user/login-us
import { RefreshTokenCommand } from '../../application/commands/refresh-token/refresh-token.command'; import { RefreshTokenCommand } from '../../application/commands/refresh-token/refresh-token.command';
import { RegisterUserCommand } from '../../application/commands/register-user/register-user.command'; import { RegisterUserCommand } from '../../application/commands/register-user/register-user.command';
import { VerifyKycCommand } from '../../application/commands/verify-kyc/verify-kyc.command'; import { VerifyKycCommand } from '../../application/commands/verify-kyc/verify-kyc.command';
import { type AgentDto } from '../../application/queries/get-agent-by-user-id/get-agent-by-user-id.handler'; import { AgentDto } from '../../application/queries/get-agent-by-user-id/get-agent-by-user-id.handler';
import { GetAgentByUserIdQuery } from '../../application/queries/get-agent-by-user-id/get-agent-by-user-id.query'; 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 { UserProfileDto } from '../../application/queries/get-profile/get-profile.handler';
import { GetProfileQuery } from '../../application/queries/get-profile/get-profile.query'; 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 { type LocalStrategyResult } from '../../infrastructure/strategies/local.strategy';
import { CurrentUser } from '../decorators/current-user.decorator'; import { CurrentUser } from '../decorators/current-user.decorator';
import { Roles } from '../decorators/roles.decorator'; import { Roles } from '../decorators/roles.decorator';
import { LoginDto } from '../dto/login.dto'; import { LoginDto } from '../dto/login.dto';
import { type RefreshTokenDto } from '../dto/refresh-token.dto'; import { RefreshTokenDto } from '../dto/refresh-token.dto';
import { type RegisterDto } from '../dto/register.dto'; import { RegisterDto } from '../dto/register.dto';
import { type VerifyKycDto } from '../dto/verify-kyc.dto'; import { VerifyKycDto } from '../dto/verify-kyc.dto';
import { JwtAuthGuard } from '../guards/jwt-auth.guard'; import { JwtAuthGuard } from '../guards/jwt-auth.guard';
import { LocalAuthGuard } from '../guards/local-auth.guard'; import { LocalAuthGuard } from '../guards/local-auth.guard';
import { RolesGuard } from '../guards/roles.guard'; import { RolesGuard } from '../guards/roles.guard';

View File

@@ -7,27 +7,27 @@ import {
Res, Res,
UseGuards, UseGuards,
} from '@nestjs/common'; } 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 { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
import { Throttle } from '@nestjs/throttler'; import { Throttle } from '@nestjs/throttler';
import { type Response } from 'express'; import { type Response } from 'express';
import { EndpointRateLimit, EndpointRateLimitGuard } from '@modules/shared'; import { EndpointRateLimit, EndpointRateLimitGuard } from '@modules/shared';
import { DisableMfaCommand } from '../../application/commands/disable-mfa/disable-mfa.command'; import { DisableMfaCommand } from '../../application/commands/disable-mfa/disable-mfa.command';
import { SetupMfaCommand } from '../../application/commands/setup-mfa/setup-mfa.command'; import { SetupMfaCommand } from '../../application/commands/setup-mfa/setup-mfa.command';
import { type SetupMfaResultDto } from '../../application/commands/setup-mfa/setup-mfa.handler'; import { SetupMfaResultDto } from '../../application/commands/setup-mfa/setup-mfa.handler';
import { UseBackupCodeCommand } from '../../application/commands/use-backup-code/use-backup-code.command'; import { UseBackupCodeCommand } from '../../application/commands/use-backup-code/use-backup-code.command';
import { VerifyMfaChallengeCommand } from '../../application/commands/verify-mfa-challenge/verify-mfa-challenge.command'; import { VerifyMfaChallengeCommand } from '../../application/commands/verify-mfa-challenge/verify-mfa-challenge.command';
import { VerifyMfaSetupCommand } from '../../application/commands/verify-mfa-setup/verify-mfa-setup.command'; import { VerifyMfaSetupCommand } from '../../application/commands/verify-mfa-setup/verify-mfa-setup.command';
import { type VerifyMfaSetupResultDto } from '../../application/commands/verify-mfa-setup/verify-mfa-setup.handler'; import { 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 { MfaStatusDto } from '../../application/queries/get-mfa-status/get-mfa-status.handler';
import { GetMfaStatusQuery } from '../../application/queries/get-mfa-status/get-mfa-status.query'; 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 { CurrentUser } from '../decorators/current-user.decorator';
import { import {
type VerifyMfaSetupDto, VerifyMfaSetupDto,
type VerifyMfaChallengeDto, VerifyMfaChallengeDto,
type UseBackupCodeDto, UseBackupCodeDto,
type DisableMfaDto, DisableMfaDto,
} from '../dto/mfa.dto'; } from '../dto/mfa.dto';
import { JwtAuthGuard } from '../guards/jwt-auth.guard'; import { JwtAuthGuard } from '../guards/jwt-auth.guard';

View File

@@ -11,7 +11,7 @@ import { Throttle } from '@nestjs/throttler';
import { type Request, type Response } from 'express'; import { type Request, type Response } from 'express';
import { UnauthorizedException } from '@modules/shared'; import { UnauthorizedException } from '@modules/shared';
import { type TokenPair } from '../../infrastructure/services/token.service'; 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'; import { GoogleOAuthGuard } from '../guards/google-oauth.guard';
const IS_PRODUCTION = process.env['NODE_ENV'] === 'production'; const IS_PRODUCTION = process.env['NODE_ENV'] === 'production';

View File

@@ -7,7 +7,7 @@ import {
Post, Post,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger'; import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
import { CancelUserDeletionCommand } from '../../application/commands/cancel-user-deletion/cancel-user-deletion.command'; import { CancelUserDeletionCommand } from '../../application/commands/cancel-user-deletion/cancel-user-deletion.command';
import { ExportUserDataCommand } from '../../application/commands/export-user-data/export-user-data.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 { type JwtPayload } from '../../infrastructure/services/token.service';
import { CurrentUser } from '../decorators/current-user.decorator'; import { CurrentUser } from '../decorators/current-user.decorator';
import { Roles } from '../decorators/roles.decorator'; import { Roles } from '../decorators/roles.decorator';
import { type ForceDeleteUserDto } from '../dto/force-delete-user.dto'; import { ForceDeleteUserDto } from '../dto/force-delete-user.dto';
import { type RequestDeletionDto } from '../dto/request-deletion.dto'; import { RequestDeletionDto } from '../dto/request-deletion.dto';
import { JwtAuthGuard } from '../guards/jwt-auth.guard'; import { JwtAuthGuard } from '../guards/jwt-auth.guard';
import { RolesGuard } from '../guards/roles.guard'; import { RolesGuard } from '../guards/roles.guard';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { InquiryEntity } from '../../../domain/entities/inquiry.entity';
import { INQUIRY_REPOSITORY, type IInquiryRepository } from '../../../domain/repositories/inquiry.repository'; import { INQUIRY_REPOSITORY, type IInquiryRepository } from '../../../domain/repositories/inquiry.repository';
import { CreateInquiryCommand } from './create-inquiry.command'; import { CreateInquiryCommand } from './create-inquiry.command';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared';
import { INQUIRY_REPOSITORY, type IInquiryRepository } from '../../../domain/repositories/inquiry.repository'; import { INQUIRY_REPOSITORY, type IInquiryRepository } from '../../../domain/repositories/inquiry.repository';
import { MarkInquiryReadCommand } from './mark-inquiry-read.command'; import { MarkInquiryReadCommand } from './mark-inquiry-read.command';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { type InquiryReadDto } from '../../../domain/repositories/inquiry-read.dto';
import { INQUIRY_REPOSITORY, type IInquiryRepository, type PaginatedResult } from '../../../domain/repositories/inquiry.repository'; import { INQUIRY_REPOSITORY, type IInquiryRepository, type PaginatedResult } from '../../../domain/repositories/inquiry.repository';
import { GetInquiriesByAgentQuery } from './get-inquiries-by-agent.query'; import { GetInquiriesByAgentQuery } from './get-inquiries-by-agent.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { type InquiryReadDto } from '../../../domain/repositories/inquiry-read.dto';
import { INQUIRY_REPOSITORY, type IInquiryRepository, type PaginatedResult } from '../../../domain/repositories/inquiry.repository'; import { INQUIRY_REPOSITORY, type IInquiryRepository, type PaginatedResult } from '../../../domain/repositories/inquiry.repository';
import { GetInquiriesByListingQuery } from './get-inquiries-by-listing.query'; import { GetInquiriesByListingQuery } from './get-inquiries-by-listing.query';

View File

@@ -8,7 +8,7 @@ import {
Query, Query,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; import { CommandBus, QueryBus } from '@nestjs/cqrs';
import { import {
ApiTags, ApiTags,
ApiOperation, ApiOperation,
@@ -22,10 +22,10 @@ import { type CreateInquiryResult } from '../../application/commands/create-inqu
import { MarkInquiryReadCommand } from '../../application/commands/mark-inquiry-read/mark-inquiry-read.command'; import { MarkInquiryReadCommand } from '../../application/commands/mark-inquiry-read/mark-inquiry-read.command';
import { GetInquiriesByAgentQuery } from '../../application/queries/get-inquiries-by-agent/get-inquiries-by-agent.query'; import { GetInquiriesByAgentQuery } from '../../application/queries/get-inquiries-by-agent/get-inquiries-by-agent.query';
import { GetInquiriesByListingQuery } from '../../application/queries/get-inquiries-by-listing/get-inquiries-by-listing.query'; import { GetInquiriesByListingQuery } from '../../application/queries/get-inquiries-by-listing/get-inquiries-by-listing.query';
import { type InquiryReadDto } from '../../domain/repositories/inquiry-read.dto'; import { InquiryReadDto } from '../../domain/repositories/inquiry-read.dto';
import { type PaginatedResult } from '../../domain/repositories/inquiry.repository'; import { type PaginatedResult } from '../../domain/repositories/inquiry.repository';
import { type CreateInquiryDto } from '../dto/create-inquiry.dto'; import { CreateInquiryDto } from '../dto/create-inquiry.dto';
import { type ListInquiriesDto } from '../dto/list-inquiries.dto'; import { ListInquiriesDto } from '../dto/list-inquiries.dto';
@ApiTags('inquiries') @ApiTags('inquiries')
@Controller('inquiries') @Controller('inquiries')

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { LeadEntity } from '../../../domain/entities/lead.entity';
import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository'; import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository';
import { LeadScore } from '../../../domain/value-objects/lead-score.vo'; import { LeadScore } from '../../../domain/value-objects/lead-score.vo';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared';
import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository'; import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository';
import { DeleteLeadCommand } from './delete-lead.command'; import { DeleteLeadCommand } from './delete-lead.command';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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, NotFoundException, type PrismaService, type LoggerService } from '@modules/shared'; import { DomainException, ForbiddenException, NotFoundException, PrismaService, LoggerService } from '@modules/shared';
import { type LeadStatus } from '../../../domain/entities/lead.entity'; import { type LeadStatus } from '../../../domain/entities/lead.entity';
import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository'; import { LEAD_REPOSITORY, type ILeadRepository } from '../../../domain/repositories/lead.repository';
import { UpdateLeadStatusCommand } from './update-lead-status.command'; import { UpdateLeadStatusCommand } from './update-lead-status.command';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { LEAD_REPOSITORY, type ILeadRepository, type LeadStatsData } from '../../../domain/repositories/lead.repository';
import { GetLeadStatsQuery } from './get-lead-stats.query'; import { GetLeadStatsQuery } from './get-lead-stats.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { type LeadReadDto } from '../../../domain/repositories/lead-read.dto';
import { LEAD_REPOSITORY, type ILeadRepository, type PaginatedResult } from '../../../domain/repositories/lead.repository'; import { LEAD_REPOSITORY, type ILeadRepository, type PaginatedResult } from '../../../domain/repositories/lead.repository';
import { GetLeadsByAgentQuery } from './get-leads-by-agent.query'; import { GetLeadsByAgentQuery } from './get-leads-by-agent.query';

View File

@@ -9,7 +9,7 @@ import {
Query, Query,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; import { CommandBus, QueryBus } from '@nestjs/cqrs';
import { import {
ApiTags, ApiTags,
ApiOperation, ApiOperation,
@@ -24,11 +24,11 @@ import { DeleteLeadCommand } from '../../application/commands/delete-lead/delete
import { UpdateLeadStatusCommand } from '../../application/commands/update-lead-status/update-lead-status.command'; import { UpdateLeadStatusCommand } from '../../application/commands/update-lead-status/update-lead-status.command';
import { GetLeadStatsQuery } from '../../application/queries/get-lead-stats/get-lead-stats.query'; import { GetLeadStatsQuery } from '../../application/queries/get-lead-stats/get-lead-stats.query';
import { GetLeadsByAgentQuery } from '../../application/queries/get-leads-by-agent/get-leads-by-agent.query'; import { GetLeadsByAgentQuery } from '../../application/queries/get-leads-by-agent/get-leads-by-agent.query';
import { type LeadReadDto } from '../../domain/repositories/lead-read.dto'; import { LeadReadDto } from '../../domain/repositories/lead-read.dto';
import { type LeadStatsData, type PaginatedResult } from '../../domain/repositories/lead.repository'; import { type LeadStatsData, type PaginatedResult } from '../../domain/repositories/lead.repository';
import { type CreateLeadDto } from '../dto/create-lead.dto'; import { CreateLeadDto } from '../dto/create-lead.dto';
import { type ListLeadsDto } from '../dto/list-leads.dto'; import { ListLeadsDto } from '../dto/list-leads.dto';
import { type UpdateLeadStatusDto } from '../dto/update-lead-status.dto'; import { UpdateLeadStatusDto } from '../dto/update-lead-status.dto';
@ApiTags('leads') @ApiTags('leads')
@ApiBearerAuth('JWT') @ApiBearerAuth('JWT')

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { ListingEntity } from '../../../domain/entities/listing.entity';
import { PropertyEntity } from '../../../domain/entities/property.entity'; import { PropertyEntity } from '../../../domain/entities/property.entity';
import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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, NotFoundException, CacheService, CachePrefix, type LoggerService } from '@modules/shared'; import { DomainException, NotFoundException, CacheService, CachePrefix, LoggerService } from '@modules/shared';
import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- NestJS DI needs runtime reference // eslint-disable-next-line @typescript-eslint/consistent-type-imports -- NestJS DI needs runtime reference
import { ModerationService } from '../../../domain/services/moderation.service'; import { ModerationService } from '../../../domain/services/moderation.service';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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, NotFoundException, CacheService, CachePrefix, type LoggerService } from '@modules/shared'; import { DomainException, NotFoundException, CacheService, CachePrefix, LoggerService } from '@modules/shared';
import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- NestJS DI needs runtime reference // eslint-disable-next-line @typescript-eslint/consistent-type-imports -- NestJS DI needs runtime reference
import { ModerationService } from '../../../domain/services/moderation.service'; import { ModerationService } from '../../../domain/services/moderation.service';

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
import { createId } from '@paralleldrive/cuid2'; 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 { PropertyMediaEntity } from '../../../domain/entities/property-media.entity';
import { PROPERTY_REPOSITORY, type IPropertyRepository } from '../../../domain/repositories/property.repository'; import { PROPERTY_REPOSITORY, type IPropertyRepository } from '../../../domain/repositories/property.repository';
import { MEDIA_STORAGE_SERVICE, type IMediaStorageService } from '../../../infrastructure/services/media-storage.service'; import { MEDIA_STORAGE_SERVICE, type IMediaStorageService } from '../../../infrastructure/services/media-storage.service';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
import { DomainException, NotFoundException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared'; import { DomainException, NotFoundException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
import { type ListingDetailData } from '../../../domain/repositories/listing-read.dto'; import { type ListingDetailData } from '../../../domain/repositories/listing-read.dto';
import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository'; import { LISTING_REPOSITORY, type IListingRepository } from '../../../domain/repositories/listing.repository';
import { GetListingQuery } from './get-listing.query'; import { GetListingQuery } from './get-listing.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { type ListingSearchItem } from '../../../domain/repositories/listing-read.dto';
import { LISTING_REPOSITORY, type IListingRepository, type PaginatedResult } from '../../../domain/repositories/listing.repository'; import { LISTING_REPOSITORY, type IListingRepository, type PaginatedResult } from '../../../domain/repositories/listing.repository';
import { GetPendingModerationQuery } from './get-pending-moderation.query'; import { GetPendingModerationQuery } from './get-pending-moderation.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs'; 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 { type ListingSearchItem } from '../../../domain/repositories/listing-read.dto';
import { LISTING_REPOSITORY, type IListingRepository, type PaginatedResult } from '../../../domain/repositories/listing.repository'; import { LISTING_REPOSITORY, type IListingRepository, type PaginatedResult } from '../../../domain/repositories/listing.repository';
import { SearchListingsQuery } from './search-listings.query'; import { SearchListingsQuery } from './search-listings.query';

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type PropertyType } from '@prisma/client'; import { type PropertyType } from '@prisma/client';
import { type PrismaService, type LoggerService } from '@modules/shared'; import { PrismaService, LoggerService } from '@modules/shared';
import { import {
type IPriceValidator, type IPriceValidator,
type PriceValidationParams, type PriceValidationParams,

View File

@@ -10,7 +10,7 @@ import {
UseGuards, UseGuards,
UseInterceptors, UseInterceptors,
} from '@nestjs/common'; } from '@nestjs/common';
import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; import { CommandBus, QueryBus } from '@nestjs/cqrs';
import { FileInterceptor } from '@nestjs/platform-express'; import { FileInterceptor } from '@nestjs/platform-express';
import { import {
ApiTags, ApiTags,
@@ -34,10 +34,10 @@ import { GetPendingModerationQuery } from '../../application/queries/get-pending
import { SearchListingsQuery } from '../../application/queries/search-listings/search-listings.query'; import { SearchListingsQuery } from '../../application/queries/search-listings/search-listings.query';
import { type ListingDetailData, type ListingSearchItem } from '../../domain/repositories/listing-read.dto'; import { type ListingDetailData, type ListingSearchItem } from '../../domain/repositories/listing-read.dto';
import { type PaginatedResult } from '../../domain/repositories/listing.repository'; import { type PaginatedResult } from '../../domain/repositories/listing.repository';
import { type CreateListingDto } from '../dto/create-listing.dto'; import { CreateListingDto } from '../dto/create-listing.dto';
import { type ModerateListingDto } from '../dto/moderate-listing.dto'; import { ModerateListingDto } from '../dto/moderate-listing.dto';
import { type SearchListingsDto } from '../dto/search-listings.dto'; import { SearchListingsDto } from '../dto/search-listings.dto';
import { type UpdateListingStatusDto } from '../dto/update-listing-status.dto'; import { UpdateListingStatusDto } from '../dto/update-listing-status.dto';
@ApiTags('listings') @ApiTags('listings')
@Controller('listings') @Controller('listings')

View File

@@ -1,4 +1,4 @@
import { SSEServerTransport, type McpRegistryService } from '@goodgo/mcp-servers'; import { SSEServerTransport, McpRegistryService } from '@goodgo/mcp-servers';
import { import {
Controller, Controller,
Get, Get,

View File

@@ -8,7 +8,7 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
import { MetricsService } from '../../infrastructure/metrics.service'; import { MetricsService } from '../../infrastructure/metrics.service';
import { type WebVitalsBatchDto } from '../dto/web-vitals.dto'; import { WebVitalsBatchDto } from '../dto/web-vitals.dto';
/** /**
* Public endpoint for receiving Core Web Vitals from the frontend. * Public endpoint for receiving Core Web Vitals from the frontend.

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type AgentVerifiedEvent } from '@modules/auth'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
export interface InquiryReceivedEvent { export interface InquiryReceivedEvent {

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type ListingApprovedEvent } from '@modules/admin'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type ListingRejectedEvent } from '@modules/admin'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type ListingSoldEvent } from '@modules/listings'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type PaymentCompletedEvent } from '@modules/payments'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type PaymentFailedEvent } from '@modules/payments'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type PaymentRefundedEvent } from '@modules/payments'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; 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 { type QuotaExceededEvent } from '@modules/subscriptions';
import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; 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 { type SubscriptionExpiredEvent } from '@modules/subscriptions';
import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; 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 { type SubscriptionCancelledEvent } from '@modules/subscriptions';
import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; 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 { type SubscriptionRenewedEvent } from '@modules/subscriptions';
import { SendNotificationCommand } from '../commands/send-notification/send-notification.command'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type UserKycUpdatedEvent } from '@modules/auth'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { type CommandBus } from '@nestjs/cqrs'; import { CommandBus } from '@nestjs/cqrs';
import { OnEvent } from '@nestjs/event-emitter'; import { OnEvent } from '@nestjs/event-emitter';
import { type UserRegisteredEvent } from '@modules/auth'; 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'; import { SendNotificationCommand } from '../commands/send-notification/send-notification.command';
@Injectable() @Injectable()

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { 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 { PaymentEntity } from '../../../domain/entities/payment.entity';
import { import {
PAYMENT_REPOSITORY, PAYMENT_REPOSITORY,

View File

@@ -1,7 +1,7 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; 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 { type PaymentStatus } from '@prisma/client';
import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared'; import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared';
import { import {
PAYMENT_REPOSITORY, PAYMENT_REPOSITORY,
type IPaymentRepository, type IPaymentRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs'; 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 { import {
PAYMENT_REPOSITORY, PAYMENT_REPOSITORY,
type IPaymentRepository, type IPaymentRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { import {
PAYMENT_REPOSITORY, PAYMENT_REPOSITORY,
type IPaymentRepository, type IPaymentRepository,

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { DomainException, type LoggerService } from '@modules/shared'; import { DomainException, LoggerService } from '@modules/shared';
import { import {
PAYMENT_REPOSITORY, PAYMENT_REPOSITORY,
type IPaymentRepository, type IPaymentRepository,

View File

@@ -8,7 +8,7 @@ import {
Query, Query,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { type CommandBus, type QueryBus } from '@nestjs/cqrs'; import { CommandBus, QueryBus } from '@nestjs/cqrs';
import { import {
ApiTags, ApiTags,
ApiOperation, ApiOperation,
@@ -26,13 +26,13 @@ import { HandleCallbackCommand } from '../../application/commands/handle-callbac
import { type HandleCallbackResult } from '../../application/commands/handle-callback/handle-callback.handler'; import { type HandleCallbackResult } from '../../application/commands/handle-callback/handle-callback.handler';
import { RefundPaymentCommand } from '../../application/commands/refund-payment/refund-payment.command'; import { RefundPaymentCommand } from '../../application/commands/refund-payment/refund-payment.command';
import { type RefundPaymentResult } from '../../application/commands/refund-payment/refund-payment.handler'; import { type RefundPaymentResult } from '../../application/commands/refund-payment/refund-payment.handler';
import { type PaymentStatusDto } from '../../application/queries/get-payment-status/get-payment-status.handler'; import { PaymentStatusDto } from '../../application/queries/get-payment-status/get-payment-status.handler';
import { GetPaymentStatusQuery } from '../../application/queries/get-payment-status/get-payment-status.query'; import { GetPaymentStatusQuery } from '../../application/queries/get-payment-status/get-payment-status.query';
import { type TransactionListDto } from '../../application/queries/list-transactions/list-transactions.handler'; import { TransactionListDto } from '../../application/queries/list-transactions/list-transactions.handler';
import { ListTransactionsQuery } from '../../application/queries/list-transactions/list-transactions.query'; import { ListTransactionsQuery } from '../../application/queries/list-transactions/list-transactions.query';
import { type CreatePaymentDto } from '../dto/create-payment.dto'; import { CreatePaymentDto } from '../dto/create-payment.dto';
import { type ListTransactionsDto } from '../dto/list-transactions.dto'; import { ListTransactionsDto } from '../dto/list-transactions.dto';
import { type RefundPaymentDto } from '../dto/refund-payment.dto'; import { RefundPaymentDto } from '../dto/refund-payment.dto';
@ApiTags('payments') @ApiTags('payments')
@Controller('payments') @Controller('payments')

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { type ReviewStatsData } from '../../../domain/repositories/review-read.dto';
import { REVIEW_REPOSITORY, type IReviewRepository } from '../../../domain/repositories/review.repository'; import { REVIEW_REPOSITORY, type IReviewRepository } from '../../../domain/repositories/review.repository';
import { GetAverageRatingQuery } from './get-average-rating.query'; import { GetAverageRatingQuery } from './get-average-rating.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { type ReviewItemData } from '../../../domain/repositories/review-read.dto';
import { REVIEW_REPOSITORY, type IReviewRepository, type PaginatedResult } from '../../../domain/repositories/review.repository'; import { REVIEW_REPOSITORY, type IReviewRepository, type PaginatedResult } from '../../../domain/repositories/review.repository';
import { GetReviewsByTargetQuery } from './get-reviews-by-target.query'; import { GetReviewsByTargetQuery } from './get-reviews-by-target.query';

View File

@@ -1,6 +1,6 @@
import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Inject, InternalServerErrorException } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs'; 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 { type ReviewItemData } from '../../../domain/repositories/review-read.dto';
import { REVIEW_REPOSITORY, type IReviewRepository, type PaginatedResult } from '../../../domain/repositories/review.repository'; import { REVIEW_REPOSITORY, type IReviewRepository, type PaginatedResult } from '../../../domain/repositories/review.repository';
import { GetReviewsByUserQuery } from './get-reviews-by-user.query'; import { GetReviewsByUserQuery } from './get-reviews-by-user.query';

View File

@@ -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 { 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 ReviewItemData, type ReviewStatsData } from '../../domain/repositories/review-read.dto';
import { type PaginatedResult } from '../../domain/repositories/review.repository'; import { type PaginatedResult } from '../../domain/repositories/review.repository';
import { type CreateReviewDto } from '../dto/create-review.dto'; import { CreateReviewDto } from '../dto/create-review.dto';
import { type ListReviewsByTargetDto, type ReviewStatsDto } from '../dto/list-reviews.dto'; import { ListReviewsByTargetDto, ReviewStatsDto } from '../dto/list-reviews.dto';
@ApiTags('reviews') @ApiTags('reviews')
@Controller('reviews') @Controller('reviews')

Some files were not shown because too many files have changed in this diff Show More