fix(api,ci): remove type-only imports for DI and isolate CI ports from dev
- Remove `type` keyword from NestJS injectable class imports across all modules to fix runtime DI resolution (330+ handler/listener files) - Offset CI docker-compose ports (5433/6380/8109/9002) to avoid conflicts with running dev containers - Update .env.test, playwright.config.ts, and e2e workflow to use isolated CI ports with configurable overrides - Fix prisma/seed.ts to use deterministic IDs for Prisma 7 upsert compatibility (phoneHash replaced phone as unique index) - Add dedicated Docker bridge network for CI service containers Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { type PlanTier } from '@prisma/client';
|
||||
import { DomainException, NotFoundException, ValidationException, type PrismaService, type LoggerService } from '@modules/shared';
|
||||
import { SUBSCRIPTION_REPOSITORY, type ISubscriptionRepository } from '@modules/subscriptions';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { PlanTier } from '@prisma/client';
|
||||
import { DomainException, NotFoundException, ValidationException, PrismaService, LoggerService } from '@modules/shared';
|
||||
import { SUBSCRIPTION_REPOSITORY, ISubscriptionRepository } from '@modules/subscriptions';
|
||||
import { SubscriptionAdjustedEvent } from '../../../domain/events/subscription-adjusted.event';
|
||||
import { AdjustSubscriptionCommand } from './adjust-subscription.command';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared';
|
||||
import { KycApprovedEvent } from '../../../domain/events/kyc-approved.event';
|
||||
import { ApproveKycCommand } from './approve-kyc.command';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LISTING_REPOSITORY, type IListingRepository } from '@modules/listings';
|
||||
import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LISTING_REPOSITORY, IListingRepository } from '@modules/listings';
|
||||
import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared';
|
||||
import { ListingApprovedEvent } from '../../../domain/events/listing-approved.event';
|
||||
import { ApproveListingCommand } from './approve-listing.command';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared';
|
||||
import { UserBannedEvent } from '../../../domain/events/user-banned.event';
|
||||
import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event';
|
||||
import { BanUserCommand } from './ban-user.command';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LISTING_REPOSITORY, type IListingRepository } from '@modules/listings';
|
||||
import { DomainException, ValidationException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LISTING_REPOSITORY, IListingRepository } from '@modules/listings';
|
||||
import { DomainException, ValidationException, LoggerService } from '@modules/shared';
|
||||
import { ListingApprovedEvent } from '../../../domain/events/listing-approved.event';
|
||||
import { ListingRejectedEvent } from '../../../domain/events/listing-rejected.event';
|
||||
import { BulkModerateListingsCommand } from './bulk-moderate-listings.command';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared';
|
||||
import { KycRejectedEvent } from '../../../domain/events/kyc-rejected.event';
|
||||
import { RejectKycCommand } from './reject-kyc.command';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LISTING_REPOSITORY, type IListingRepository } from '@modules/listings';
|
||||
import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LISTING_REPOSITORY, IListingRepository } from '@modules/listings';
|
||||
import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared';
|
||||
import { ListingRejectedEvent } from '../../../domain/events/listing-rejected.event';
|
||||
import { RejectListingCommand } from './reject-listing.command';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { USER_REPOSITORY, IUserRepository } from '@modules/auth';
|
||||
import { DomainException, NotFoundException, ValidationException, LoggerService } from '@modules/shared';
|
||||
import { UserBannedEvent } from '../../../domain/events/user-banned.event';
|
||||
import { UserUnbannedEvent } from '../../../domain/events/user-unbanned.event';
|
||||
import { UpdateUserStatusCommand } from './update-user-status.command';
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { type LoggerService } from '@modules/shared';
|
||||
import { type KycApprovedEvent } from '../../domain/events/kyc-approved.event';
|
||||
import { type KycRejectedEvent } from '../../domain/events/kyc-rejected.event';
|
||||
import { type ListingApprovedEvent } from '../../domain/events/listing-approved.event';
|
||||
import { type ListingRejectedEvent } from '../../domain/events/listing-rejected.event';
|
||||
import { type SubscriptionAdjustedEvent } from '../../domain/events/subscription-adjusted.event';
|
||||
import { type UserBannedEvent } from '../../domain/events/user-banned.event';
|
||||
import { type UserUnbannedEvent } from '../../domain/events/user-unbanned.event';
|
||||
import { LoggerService } from '@modules/shared';
|
||||
import { KycApprovedEvent } from '../../domain/events/kyc-approved.event';
|
||||
import { KycRejectedEvent } from '../../domain/events/kyc-rejected.event';
|
||||
import { ListingApprovedEvent } from '../../domain/events/listing-approved.event';
|
||||
import { ListingRejectedEvent } from '../../domain/events/listing-rejected.event';
|
||||
import { SubscriptionAdjustedEvent } from '../../domain/events/subscription-adjusted.event';
|
||||
import { UserBannedEvent } from '../../domain/events/user-banned.event';
|
||||
import { UserUnbannedEvent } from '../../domain/events/user-unbanned.event';
|
||||
import {
|
||||
AUDIT_LOG_REPOSITORY,
|
||||
type IAuditLogRepository,
|
||||
IAuditLogRepository,
|
||||
} from '../../domain/repositories/audit-log.repository';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type CommandBus } from '@nestjs/cqrs';
|
||||
import { CommandBus } from '@nestjs/cqrs';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { SendNotificationCommand } from '@modules/notifications';
|
||||
import { type LoggerService, type PrismaService } from '@modules/shared';
|
||||
import { type UserBannedEvent } from '../../domain/events/user-banned.event';
|
||||
import { LoggerService, PrismaService } from '@modules/shared';
|
||||
import { UserBannedEvent } from '../../domain/events/user-banned.event';
|
||||
|
||||
@Injectable()
|
||||
export class UserBannedListener {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { type UserDeactivatedEvent } from '@modules/auth';
|
||||
import { type LoggerService, type PrismaService } from '@modules/shared';
|
||||
import { UserDeactivatedEvent } from '@modules/auth';
|
||||
import { LoggerService, PrismaService } from '@modules/shared';
|
||||
|
||||
@Injectable()
|
||||
export class UserDeactivatedListener {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AUDIT_LOG_REPOSITORY,
|
||||
type IAuditLogRepository,
|
||||
IAuditLogRepository,
|
||||
type AuditLogListResult,
|
||||
} from '../../../domain/repositories/audit-log.repository';
|
||||
import { GetAuditLogsQuery } from './get-audit-logs.query';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type DashboardStats } from '../../../domain/repositories/admin-query.repository';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, IAdminQueryRepository, DashboardStats } from '../../../domain/repositories/admin-query.repository';
|
||||
import { GetDashboardStatsQuery } from './get-dashboard-stats.query';
|
||||
|
||||
@QueryHandler(GetDashboardStatsQuery)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type KycQueueResult } from '../../../domain/repositories/admin-query.repository';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, IAdminQueryRepository, KycQueueResult } from '../../../domain/repositories/admin-query.repository';
|
||||
import { GetKycQueueQuery } from './get-kyc-queue.query';
|
||||
|
||||
@QueryHandler(GetKycQueueQuery)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type ModerationQueueResult } from '../../../domain/repositories/admin-query.repository';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, IAdminQueryRepository, ModerationQueueResult } from '../../../domain/repositories/admin-query.repository';
|
||||
import { GetModerationQueueQuery } from './get-moderation-queue.query';
|
||||
|
||||
@QueryHandler(GetModerationQueueQuery)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type RevenueStatsItem } from '../../../domain/repositories/admin-query.repository';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, IAdminQueryRepository, RevenueStatsItem } from '../../../domain/repositories/admin-query.repository';
|
||||
import { GetRevenueStatsQuery } from './get-revenue-stats.query';
|
||||
|
||||
@QueryHandler(GetRevenueStatsQuery)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, NotFoundException, type LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type UserDetail } from '../../../domain/repositories/admin-query.repository';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, NotFoundException, LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, IAdminQueryRepository, UserDetail } from '../../../domain/repositories/admin-query.repository';
|
||||
import { GetUserDetailQuery } from './get-user-detail.query';
|
||||
|
||||
@QueryHandler(GetUserDetailQuery)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository, type UserListResult } from '../../../domain/repositories/admin-query.repository';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import { ADMIN_QUERY_REPOSITORY, IAdminQueryRepository, UserListResult } from '../../../domain/repositories/admin-query.repository';
|
||||
import { GetUsersQuery } from './get-users.query';
|
||||
|
||||
@QueryHandler(GetUsersQuery)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class KycApprovedEvent implements DomainEvent {
|
||||
readonly eventName = 'kyc.approved';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class KycRejectedEvent implements DomainEvent {
|
||||
readonly eventName = 'kyc.rejected';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class ListingApprovedEvent implements DomainEvent {
|
||||
readonly eventName = 'listing.approved_by_admin';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class ListingRejectedEvent implements DomainEvent {
|
||||
readonly eventName = 'listing.rejected_by_admin';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class SubscriptionAdjustedEvent implements DomainEvent {
|
||||
readonly eventName = 'subscription.adjusted_by_admin';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class UserBannedEvent implements DomainEvent {
|
||||
readonly eventName = 'user.banned';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class UserUnbannedEvent implements DomainEvent {
|
||||
readonly eventName = 'user.unbanned';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export { ADMIN_QUERY_REPOSITORY, type IAdminQueryRepository } from './admin-query.repository';
|
||||
export { ADMIN_QUERY_REPOSITORY, IAdminQueryRepository } from './admin-query.repository';
|
||||
export type {
|
||||
ModerationQueueItem,
|
||||
ModerationQueueResult,
|
||||
@@ -9,7 +9,7 @@ export type {
|
||||
} from './admin-query.repository';
|
||||
export {
|
||||
AUDIT_LOG_REPOSITORY,
|
||||
type IAuditLogRepository,
|
||||
IAuditLogRepository,
|
||||
type AuditLogEntry,
|
||||
type AuditLogListResult,
|
||||
type CreateAuditLogInput,
|
||||
|
||||
@@ -3,7 +3,7 @@ export { ListingApprovedEvent } from './domain/events/listing-approved.event';
|
||||
export { ListingRejectedEvent } from './domain/events/listing-rejected.event';
|
||||
export {
|
||||
AUDIT_LOG_REPOSITORY,
|
||||
type IAuditLogRepository,
|
||||
IAuditLogRepository,
|
||||
type AuditLogEntry,
|
||||
type AuditLogListResult,
|
||||
} from './domain/repositories/audit-log.repository';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import {
|
||||
type DashboardStats,
|
||||
type RevenueStatsItem,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type Prisma, type UserRole } from '@prisma/client';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { Prisma, UserRole } from '@prisma/client';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import {
|
||||
type UserListResult,
|
||||
type UserDetail,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import {
|
||||
type IAdminQueryRepository,
|
||||
IAdminQueryRepository,
|
||||
type ModerationQueueResult,
|
||||
type DashboardStats,
|
||||
type RevenueStatsItem,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type AdminAction, type AuditTargetType, type Prisma } from '@prisma/client';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { AdminAction, AuditTargetType, Prisma } from '@prisma/client';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import {
|
||||
type IAuditLogRepository,
|
||||
IAuditLogRepository,
|
||||
type AuditLogEntry,
|
||||
type AuditLogListResult,
|
||||
type CreateAuditLogInput,
|
||||
|
||||
@@ -6,30 +6,30 @@ import {
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
|
||||
import { CommandBus, QueryBus } from '@nestjs/cqrs';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiQuery } from '@nestjs/swagger';
|
||||
import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth';
|
||||
import { JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth';
|
||||
import { ApproveKycCommand } from '../../application/commands/approve-kyc/approve-kyc.command';
|
||||
import { type ApproveKycResult } from '../../application/commands/approve-kyc/approve-kyc.handler';
|
||||
import { ApproveKycResult } from '../../application/commands/approve-kyc/approve-kyc.handler';
|
||||
import { ApproveListingCommand } from '../../application/commands/approve-listing/approve-listing.command';
|
||||
import { type ApproveListingResult } from '../../application/commands/approve-listing/approve-listing.handler';
|
||||
import { ApproveListingResult } from '../../application/commands/approve-listing/approve-listing.handler';
|
||||
import { BulkModerateListingsCommand } from '../../application/commands/bulk-moderate-listings/bulk-moderate-listings.command';
|
||||
import { type BulkModerateResult } from '../../application/commands/bulk-moderate-listings/bulk-moderate-listings.handler';
|
||||
import { BulkModerateResult } from '../../application/commands/bulk-moderate-listings/bulk-moderate-listings.handler';
|
||||
import { RejectKycCommand } from '../../application/commands/reject-kyc/reject-kyc.command';
|
||||
import { type RejectKycResult } from '../../application/commands/reject-kyc/reject-kyc.handler';
|
||||
import { RejectKycResult } from '../../application/commands/reject-kyc/reject-kyc.handler';
|
||||
import { RejectListingCommand } from '../../application/commands/reject-listing/reject-listing.command';
|
||||
import { type RejectListingResult } from '../../application/commands/reject-listing/reject-listing.handler';
|
||||
import { RejectListingResult } from '../../application/commands/reject-listing/reject-listing.handler';
|
||||
import { GetKycQueueQuery } from '../../application/queries/get-kyc-queue/get-kyc-queue.query';
|
||||
import { GetModerationQueueQuery } from '../../application/queries/get-moderation-queue/get-moderation-queue.query';
|
||||
import {
|
||||
type ModerationQueueResult,
|
||||
type KycQueueResult,
|
||||
} from '../../domain/repositories/admin-query.repository';
|
||||
import { type ApproveKycDto } from '../dto/approve-kyc.dto';
|
||||
import { type ApproveListingDto } from '../dto/approve-listing.dto';
|
||||
import { type BulkModerateDto } from '../dto/bulk-moderate.dto';
|
||||
import { type RejectKycDto } from '../dto/reject-kyc.dto';
|
||||
import { type RejectListingDto } from '../dto/reject-listing.dto';
|
||||
import { ApproveKycDto } from '../dto/approve-kyc.dto';
|
||||
import { ApproveListingDto } from '../dto/approve-listing.dto';
|
||||
import { BulkModerateDto } from '../dto/bulk-moderate.dto';
|
||||
import { RejectKycDto } from '../dto/reject-kyc.dto';
|
||||
import { RejectListingDto } from '../dto/reject-listing.dto';
|
||||
|
||||
@ApiTags('admin')
|
||||
@ApiBearerAuth('JWT')
|
||||
|
||||
@@ -8,15 +8,15 @@ import {
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
|
||||
import { CommandBus, QueryBus } from '@nestjs/cqrs';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiQuery, ApiParam } from '@nestjs/swagger';
|
||||
import { type JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth';
|
||||
import { JwtPayload, CurrentUser, Roles, JwtAuthGuard, RolesGuard } from '@modules/auth';
|
||||
import { AdjustSubscriptionCommand } from '../../application/commands/adjust-subscription/adjust-subscription.command';
|
||||
import { type AdjustSubscriptionResult } from '../../application/commands/adjust-subscription/adjust-subscription.handler';
|
||||
import { AdjustSubscriptionResult } from '../../application/commands/adjust-subscription/adjust-subscription.handler';
|
||||
import { BanUserCommand } from '../../application/commands/ban-user/ban-user.command';
|
||||
import { type BanUserResult } from '../../application/commands/ban-user/ban-user.handler';
|
||||
import { BanUserResult } from '../../application/commands/ban-user/ban-user.handler';
|
||||
import { UpdateUserStatusCommand } from '../../application/commands/update-user-status/update-user-status.command';
|
||||
import { type UpdateUserStatusResult } from '../../application/commands/update-user-status/update-user-status.handler';
|
||||
import { UpdateUserStatusResult } from '../../application/commands/update-user-status/update-user-status.handler';
|
||||
import { GetAuditLogsQuery } from '../../application/queries/get-audit-logs/get-audit-logs.query';
|
||||
import { GetDashboardStatsQuery } from '../../application/queries/get-dashboard-stats/get-dashboard-stats.query';
|
||||
import { GetRevenueStatsQuery } from '../../application/queries/get-revenue-stats/get-revenue-stats.query';
|
||||
@@ -28,13 +28,13 @@ import {
|
||||
type UserListResult,
|
||||
type UserDetail,
|
||||
} from '../../domain/repositories/admin-query.repository';
|
||||
import { type AuditLogListResult } from '../../domain/repositories/audit-log.repository';
|
||||
import { type AdjustSubscriptionDto } from '../dto/adjust-subscription.dto';
|
||||
import { type BanUserDto } from '../dto/ban-user.dto';
|
||||
import { type GetAuditLogsQueryDto } from '../dto/get-audit-logs-query.dto';
|
||||
import { type GetUsersQueryDto } from '../dto/get-users-query.dto';
|
||||
import { type RevenueStatsDto } from '../dto/revenue-stats.dto';
|
||||
import { type UpdateUserStatusDto } from '../dto/update-user-status.dto';
|
||||
import { AuditLogListResult } from '../../domain/repositories/audit-log.repository';
|
||||
import { AdjustSubscriptionDto } from '../dto/adjust-subscription.dto';
|
||||
import { BanUserDto } from '../dto/ban-user.dto';
|
||||
import { GetAuditLogsQueryDto } from '../dto/get-audit-logs-query.dto';
|
||||
import { GetUsersQueryDto } from '../dto/get-users-query.dto';
|
||||
import { RevenueStatsDto } from '../dto/revenue-stats.dto';
|
||||
import { UpdateUserStatusDto } from '../dto/update-user-status.dto';
|
||||
|
||||
@ApiTags('admin')
|
||||
@ApiBearerAuth('JWT')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AGENT_REPOSITORY,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
} from '../../../domain/repositories/agent.repository';
|
||||
import { QualityScoreCalculator } from '../../../domain/services/quality-score.service';
|
||||
import { QualityScore } from '../../../domain/value-objects/quality-score.vo';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type CommandBus } from '@nestjs/cqrs';
|
||||
import { CommandBus } from '@nestjs/cqrs';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { type LoggerService } from '@modules/shared';
|
||||
import { LoggerService } from '@modules/shared';
|
||||
import { RecalculateQualityScoreCommand } from '../commands/recalculate-quality-score/recalculate-quality-score.command';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, NotFoundException, type LoggerService } from '@modules/shared';
|
||||
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, NotFoundException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AGENT_REPOSITORY,
|
||||
type AgentDashboardData,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
} from '../../../domain/repositories/agent.repository';
|
||||
import { GetAgentDashboardQuery } from './get-agent-dashboard.query';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AGENT_REPOSITORY,
|
||||
type AgentPublicProfileData,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
} from '../../../domain/repositories/agent.repository';
|
||||
import { GetAgentPublicProfileQuery } from './get-agent-public-profile.query';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AggregateRoot } from '@modules/shared';
|
||||
import { QualityScoreUpdatedEvent } from '../events/quality-score-updated.event';
|
||||
import { type QualityScore } from '../value-objects/quality-score.vo';
|
||||
import { QualityScore } from '../value-objects/quality-score.vo';
|
||||
|
||||
export interface AgentProps {
|
||||
userId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class QualityScoreUpdatedEvent implements DomainEvent {
|
||||
readonly eventName = 'agent.quality_score_updated';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type AgentEntity } from '../entities/agent.entity';
|
||||
import { AgentEntity } from '../entities/agent.entity';
|
||||
|
||||
export const AGENT_REPOSITORY = Symbol('AGENT_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export {
|
||||
AGENT_REPOSITORY,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
type AgentDashboardData,
|
||||
type AgentPublicProfileData,
|
||||
type AgentPublicListingItem,
|
||||
|
||||
@@ -5,7 +5,7 @@ export { QualityScoreUpdatedEvent } from './domain/events/quality-score-updated.
|
||||
export { QualityScoreCalculator } from './domain/services/quality-score.service';
|
||||
export {
|
||||
AGENT_REPOSITORY,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
type AgentDashboardData,
|
||||
type AgentPublicProfileData,
|
||||
type AgentPublicListingItem,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import {
|
||||
type AgentPublicProfileData,
|
||||
type AgentPublicListingItem,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import { AgentEntity } from '../../domain/entities/agent.entity';
|
||||
import {
|
||||
type AgentDashboardData,
|
||||
type AgentPublicProfileData,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
type QualityScoreInputData,
|
||||
} from '../../domain/repositories/agent.repository';
|
||||
import { QualityScore } from '../../domain/value-objects/quality-score.vo';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Controller, Get, NotFoundException, Param, Post, UseGuards } from '@nestjs/common';
|
||||
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
|
||||
import { CommandBus, QueryBus } from '@nestjs/cqrs';
|
||||
import {
|
||||
ApiBearerAuth,
|
||||
ApiOperation,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
import { RecalculateQualityScoreCommand } from '../../application/commands/recalculate-quality-score/recalculate-quality-score.command';
|
||||
import { GetAgentDashboardQuery } from '../../application/queries/get-agent-dashboard/get-agent-dashboard.query';
|
||||
import { GetAgentPublicProfileQuery } from '../../application/queries/get-agent-public-profile/get-agent-public-profile.query';
|
||||
import { type AgentDashboardData, type AgentPublicProfileData } from '../../domain/repositories/agent.repository';
|
||||
import { AgentDashboardData, AgentPublicProfileData } from '../../domain/repositories/agent.repository';
|
||||
|
||||
@ApiTags('agents')
|
||||
@Controller('agents')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export class GenerateReportCommand {
|
||||
constructor(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
MARKET_INDEX_REPOSITORY,
|
||||
type IMarketIndexRepository,
|
||||
IMarketIndexRepository,
|
||||
type MarketReportResult,
|
||||
} from '../../../domain/repositories/market-index.repository';
|
||||
import { GenerateReportCommand } from './generate-report.command';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import { TrackEventCommand } from './track-event.command';
|
||||
|
||||
export interface TrackEventResult {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export class UpdateMarketIndexCommand {
|
||||
constructor(
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type CacheService, CachePrefix, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, LoggerService } from '@modules/shared';
|
||||
import { MarketIndexEntity } from '../../../domain/entities/market-index.entity';
|
||||
import {
|
||||
MARKET_INDEX_REPOSITORY,
|
||||
type IMarketIndexRepository,
|
||||
IMarketIndexRepository,
|
||||
} from '../../../domain/repositories/market-index.repository';
|
||||
import { UpdateMarketIndexCommand } from './update-market-index.command';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Inject } from '@nestjs/common';
|
||||
import { EventsHandler, type IEventHandler, type CommandBus } from '@nestjs/cqrs';
|
||||
import { EventsHandler, IEventHandler, CommandBus } from '@nestjs/cqrs';
|
||||
import { ListingCreatedEvent, ModerateListingCommand } from '@modules/listings';
|
||||
import { type PrismaService, type LoggerService } from '@modules/shared';
|
||||
import { PrismaService, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AI_SERVICE_CLIENT,
|
||||
type IAiServiceClient,
|
||||
IAiServiceClient,
|
||||
} from '../../infrastructure/services/ai-service.client';
|
||||
|
||||
const AUTO_REJECT_THRESHOLD = 0.8;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type CacheService, CachePrefix, CacheTTL, Cacheable, type LoggerService } from '@modules/shared';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, Cacheable, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
MARKET_INDEX_REPOSITORY,
|
||||
type IMarketIndexRepository,
|
||||
IMarketIndexRepository,
|
||||
type DistrictStatsResult,
|
||||
} from '../../../domain/repositories/market-index.repository';
|
||||
import { GetDistrictStatsQuery } from './get-district-stats.query';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
MARKET_INDEX_REPOSITORY,
|
||||
type IMarketIndexRepository,
|
||||
IMarketIndexRepository,
|
||||
type HeatmapDataPoint,
|
||||
} from '../../../domain/repositories/market-index.repository';
|
||||
import { GetHeatmapQuery } from './get-heatmap.query';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
MARKET_INDEX_REPOSITORY,
|
||||
type IMarketIndexRepository,
|
||||
IMarketIndexRepository,
|
||||
type MarketReportResult,
|
||||
} from '../../../domain/repositories/market-index.repository';
|
||||
import { GetMarketReportQuery } from './get-market-report.query';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export class GetMarketReportQuery {
|
||||
constructor(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
MARKET_INDEX_REPOSITORY,
|
||||
type IMarketIndexRepository,
|
||||
IMarketIndexRepository,
|
||||
type PriceTrendPoint,
|
||||
} from '../../../domain/repositories/market-index.repository';
|
||||
import { GetPriceTrendQuery } from './get-price-trend.query';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export class GetPriceTrendQuery {
|
||||
constructor(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { QueryHandler, type IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, type LoggerService } from '@modules/shared';
|
||||
import { QueryHandler, IQueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, CacheService, CachePrefix, CacheTTL, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AVM_SERVICE,
|
||||
type IAVMService,
|
||||
IAVMService,
|
||||
type ValuationResult,
|
||||
} from '../../../domain/services/avm-service';
|
||||
import { GetValuationQuery } from './get-valuation.query';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export class GetValuationQuery {
|
||||
constructor(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
import { AggregateRoot } from '@modules/shared';
|
||||
import { MarketIndexUpdatedEvent } from '../events/market-index-updated.event';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class MarketIndexUpdatedEvent implements DomainEvent {
|
||||
readonly eventName = 'market-index.updated';
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { MARKET_INDEX_REPOSITORY, type IMarketIndexRepository, type MarketReportResult, type HeatmapDataPoint, type PriceTrendPoint, type DistrictStatsResult } from './market-index.repository';
|
||||
export { VALUATION_REPOSITORY, type IValuationRepository } from './valuation.repository';
|
||||
export { MARKET_INDEX_REPOSITORY, IMarketIndexRepository, type MarketReportResult, type HeatmapDataPoint, type PriceTrendPoint, type DistrictStatsResult } from './market-index.repository';
|
||||
export { VALUATION_REPOSITORY, IValuationRepository } from './valuation.repository';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { type MarketIndexEntity } from '../entities/market-index.entity';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
import { MarketIndexEntity } from '../entities/market-index.entity';
|
||||
|
||||
export const MARKET_INDEX_REPOSITORY = Symbol('MARKET_INDEX_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type ValuationEntity } from '../entities/valuation.entity';
|
||||
import { ValuationEntity } from '../entities/valuation.entity';
|
||||
|
||||
export const VALUATION_REPOSITORY = Symbol('VALUATION_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export const AVM_SERVICE = Symbol('AVM_SERVICE');
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { AVM_SERVICE, type IAVMService, type AVMParams, type ValuationResult, type Comparable } from './avm-service';
|
||||
export { AVM_SERVICE, IAVMService, type AVMParams, type ValuationResult, type Comparable } from './avm-service';
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { AnalyticsModule } from './analytics.module';
|
||||
export { MARKET_INDEX_REPOSITORY, type IMarketIndexRepository } from './domain/repositories/market-index.repository';
|
||||
export { VALUATION_REPOSITORY, type IValuationRepository } from './domain/repositories/valuation.repository';
|
||||
export { MARKET_INDEX_REPOSITORY, IMarketIndexRepository } from './domain/repositories/market-index.repository';
|
||||
export { VALUATION_REPOSITORY, IValuationRepository } from './domain/repositories/valuation.repository';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type MarketIndex as PrismaMarketIndex, type PropertyType } from '@prisma/client';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { MarketIndexEntity, type MarketIndexProps } from '../../domain/entities/market-index.entity';
|
||||
import { MarketIndex as PrismaMarketIndex, PropertyType } from '@prisma/client';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import { MarketIndexEntity, MarketIndexProps } from '../../domain/entities/market-index.entity';
|
||||
import {
|
||||
type IMarketIndexRepository,
|
||||
IMarketIndexRepository,
|
||||
type MarketReportResult,
|
||||
type HeatmapDataPoint,
|
||||
type PriceTrendPoint,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type Prisma, type Valuation as PrismaValuation } from '@prisma/client';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { ValuationEntity, type ValuationProps } from '../../domain/entities/valuation.entity';
|
||||
import { type IValuationRepository } from '../../domain/repositories/valuation.repository';
|
||||
import { Prisma, Valuation as PrismaValuation } from '@prisma/client';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import { ValuationEntity, ValuationProps } from '../../domain/entities/valuation.entity';
|
||||
import { IValuationRepository } from '../../domain/repositories/valuation.repository';
|
||||
|
||||
@Injectable()
|
||||
export class PrismaValuationRepository implements IValuationRepository {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type LoggerService } from '@modules/shared';
|
||||
import { LoggerService } from '@modules/shared';
|
||||
|
||||
export interface AiPredictRequest {
|
||||
area: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { type Comparable } from '../../domain/services/avm-service';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
import { Comparable } from '../../domain/services/avm-service';
|
||||
|
||||
const DEFAULT_RADIUS_METERS = 2000;
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { type PrismaService, type LoggerService } from '@modules/shared';
|
||||
import { PrismaService, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
type IAVMService,
|
||||
IAVMService,
|
||||
type AVMParams,
|
||||
type ValuationResult,
|
||||
type Comparable,
|
||||
} from '../../domain/services/avm-service';
|
||||
import {
|
||||
AI_SERVICE_CLIENT,
|
||||
type IAiServiceClient,
|
||||
IAiServiceClient,
|
||||
type AiPredictRequest,
|
||||
} from './ai-service.client';
|
||||
import { type PrismaAVMService } from './prisma-avm.service';
|
||||
import { PrismaAVMService } from './prisma-avm.service';
|
||||
|
||||
@Injectable()
|
||||
export class HttpAVMService implements IAVMService {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type CommandBus } from '@nestjs/cqrs';
|
||||
import { CommandBus } from '@nestjs/cqrs';
|
||||
import { Cron, CronExpression } from '@nestjs/schedule';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
import { type PrismaService, type LoggerService } from '@modules/shared';
|
||||
import { PrismaService, LoggerService } from '@modules/shared';
|
||||
import { UpdateMarketIndexCommand } from '../../application/commands/update-market-index/update-market-index.command';
|
||||
|
||||
interface MarketStats {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import {
|
||||
type IAVMService,
|
||||
IAVMService,
|
||||
type AVMParams,
|
||||
type ValuationResult,
|
||||
type Comparable,
|
||||
|
||||
@@ -4,25 +4,25 @@ import {
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { type QueryBus } from '@nestjs/cqrs';
|
||||
import { QueryBus } from '@nestjs/cqrs';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '@modules/auth';
|
||||
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 { 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 { 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 { 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 { 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 { type GetDistrictStatsDto } from '../dto/get-district-stats.dto';
|
||||
import { type GetHeatmapDto } from '../dto/get-heatmap.dto';
|
||||
import { type GetMarketReportDto } from '../dto/get-market-report.dto';
|
||||
import { type GetPriceTrendDto } from '../dto/get-price-trend.dto';
|
||||
import { type GetValuationDto } from '../dto/get-valuation.dto';
|
||||
import { GetDistrictStatsDto } from '../dto/get-district-stats.dto';
|
||||
import { GetHeatmapDto } from '../dto/get-heatmap.dto';
|
||||
import { GetMarketReportDto } from '../dto/get-market-report.dto';
|
||||
import { GetPriceTrendDto } from '../dto/get-price-trend.dto';
|
||||
import { GetValuationDto } from '../dto/get-valuation.dto';
|
||||
|
||||
@ApiTags('analytics')
|
||||
@Controller('analytics')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { type LoggerService, type PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LoggerService, PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared';
|
||||
import { CancelUserDeletionCommand } from './cancel-user-deletion.command';
|
||||
|
||||
@CommandHandler(CancelUserDeletionCommand)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, UnauthorizedException, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { type MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, UnauthorizedException, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { DisableMfaCommand } from './disable-mfa.command';
|
||||
|
||||
@CommandHandler(DisableMfaCommand)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { type LoggerService, type PrismaService, DomainException, NotFoundException } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LoggerService, PrismaService, DomainException, NotFoundException } from '@modules/shared';
|
||||
import { ExportUserDataCommand } from './export-user-data.command';
|
||||
|
||||
export interface UserDataExport {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { Prisma } from '@prisma/client';
|
||||
import { type LoggerService, type PrismaService, DomainException, NotFoundException } from '@modules/shared';
|
||||
import { LoggerService, PrismaService, DomainException, NotFoundException } from '@modules/shared';
|
||||
import { ForceDeleteUserCommand } from './force-delete-user.command';
|
||||
|
||||
@CommandHandler(ForceDeleteUserCommand)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { createId } from '@paralleldrive/cuid2';
|
||||
import { type LoggerService, DomainException } from '@modules/shared';
|
||||
import { LoggerService, DomainException } from '@modules/shared';
|
||||
import {
|
||||
MFA_CHALLENGE_REPOSITORY,
|
||||
type IMfaChallengeRepository,
|
||||
IMfaChallengeRepository,
|
||||
} from '../../../domain/repositories/mfa-challenge.repository';
|
||||
import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { TokenService, TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { LoginUserCommand } from './login-user.command';
|
||||
|
||||
const MFA_CHALLENGE_TTL_MINUTES = 5;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type CommandBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { type LoggerService, type PrismaService, DomainException } from '@modules/shared';
|
||||
import { CommandHandler, CommandBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LoggerService, PrismaService, DomainException } from '@modules/shared';
|
||||
import { ForceDeleteUserCommand } from '../force-delete-user/force-delete-user.command';
|
||||
import { ProcessScheduledDeletionsCommand } from './process-scheduled-deletions.command';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { type LoggerService, DomainException, UnauthorizedException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LoggerService, DomainException, UnauthorizedException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { TokenService, TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { RefreshTokenCommand } from './refresh-token.command';
|
||||
|
||||
@CommandHandler(RefreshTokenCommand)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { createId } from '@paralleldrive/cuid2';
|
||||
import { ConflictException, DomainException, type LoggerService, ValidationException } from '@modules/shared';
|
||||
import { ConflictException, DomainException, LoggerService, ValidationException } from '@modules/shared';
|
||||
import { UserEntity } from '../../../domain/entities/user.entity';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { Email } from '../../../domain/value-objects/email.vo';
|
||||
import { HashedPassword } from '../../../domain/value-objects/hashed-password.vo';
|
||||
import { Phone } from '../../../domain/value-objects/phone.vo';
|
||||
import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { TokenService, TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { RegisterUserCommand } from './register-user.command';
|
||||
|
||||
@CommandHandler(RegisterUserCommand)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { type LoggerService, type PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { LoggerService, PrismaService, DomainException, NotFoundException, ValidationException } from '@modules/shared';
|
||||
import { RequestUserDeletionCommand } from './request-user-deletion.command';
|
||||
|
||||
const DELETION_GRACE_PERIOD_DAYS = 30;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { type MfaService, type MfaSetupResult } from '../../../infrastructure/services/mfa.service';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { MfaService, MfaSetupResult } from '../../../infrastructure/services/mfa.service';
|
||||
import { SetupMfaCommand } from './setup-mfa.command';
|
||||
|
||||
export interface SetupMfaResultDto {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, UnauthorizedException } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, UnauthorizedException } from '@modules/shared';
|
||||
import {
|
||||
MFA_CHALLENGE_REPOSITORY,
|
||||
type IMfaChallengeRepository,
|
||||
IMfaChallengeRepository,
|
||||
} from '../../../domain/repositories/mfa-challenge.repository';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { type MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { TokenService, TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { UseBackupCodeCommand } from './use-backup-code.command';
|
||||
|
||||
@CommandHandler(UseBackupCodeCommand)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, NotFoundException, CacheService, CachePrefix } from '@modules/shared';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, NotFoundException, CacheService, CachePrefix } from '@modules/shared';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { VerifyKycCommand } from './verify-kyc.command';
|
||||
|
||||
@CommandHandler(VerifyKycCommand)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, UnauthorizedException } from '@modules/shared';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, UnauthorizedException } from '@modules/shared';
|
||||
import {
|
||||
MFA_CHALLENGE_REPOSITORY,
|
||||
type IMfaChallengeRepository,
|
||||
IMfaChallengeRepository,
|
||||
} from '../../../domain/repositories/mfa-challenge.repository';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { type MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { type TokenService, type TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { TokenService, TokenPair } from '../../../infrastructure/services/token.service';
|
||||
import { VerifyMfaChallengeCommand } from './verify-mfa-challenge.command';
|
||||
|
||||
@CommandHandler(VerifyMfaChallengeCommand)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { type MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { MfaService } from '../../../infrastructure/services/mfa.service';
|
||||
import { VerifyMfaSetupCommand } from './verify-mfa-setup.command';
|
||||
|
||||
export interface VerifyMfaSetupResultDto {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable, InternalServerErrorException } from '@nestjs/common';
|
||||
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { type PrismaService, DomainException, type LoggerService } from '@modules/shared';
|
||||
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { PrismaService, DomainException, LoggerService } from '@modules/shared';
|
||||
import { GetAgentByUserIdQuery } from './get-agent-by-user-id.query';
|
||||
|
||||
export interface AgentDto {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, ValidationException } from '@modules/shared';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { GetMfaStatusQuery } from './get-mfa-status.query';
|
||||
|
||||
export interface MfaStatusDto {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService, NotFoundException, CacheService, CachePrefix, CacheTTL } from '@modules/shared';
|
||||
import { USER_REPOSITORY, type IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService, NotFoundException, CacheService, CachePrefix, CacheTTL } from '@modules/shared';
|
||||
import { USER_REPOSITORY, IUserRepository } from '../../../domain/repositories/user.repository';
|
||||
import { GetProfileQuery } from './get-profile.query';
|
||||
|
||||
export interface UserProfileDto {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { type UserRole, type KYCStatus } from '@prisma/client';
|
||||
import { UserRole, type KYCStatus } from '@prisma/client';
|
||||
import { AggregateRoot } from '@modules/shared';
|
||||
import { UserDeactivatedEvent } from '../events/user-deactivated.event';
|
||||
import { UserKycUpdatedEvent } from '../events/user-kyc-updated.event';
|
||||
import { UserRegisteredEvent } from '../events/user-registered.event';
|
||||
import { type Email } from '../value-objects/email.vo';
|
||||
import { type HashedPassword } from '../value-objects/hashed-password.vo';
|
||||
import { type Phone } from '../value-objects/phone.vo';
|
||||
import { Email } from '../value-objects/email.vo';
|
||||
import { HashedPassword } from '../value-objects/hashed-password.vo';
|
||||
import { Phone } from '../value-objects/phone.vo';
|
||||
|
||||
export interface UserProps {
|
||||
email: Email | null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class AgentVerifiedEvent implements DomainEvent {
|
||||
readonly eventName = 'agent.verified';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class UserDeactivatedEvent implements DomainEvent {
|
||||
readonly eventName = 'user.deactivated';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type KYCStatus } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class UserKycUpdatedEvent implements DomainEvent {
|
||||
readonly eventName = 'user.kyc_updated';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type UserRole } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { UserRole } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class UserRegisteredEvent implements DomainEvent {
|
||||
readonly eventName = 'user.registered';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export { USER_REPOSITORY, type IUserRepository } from './user.repository';
|
||||
export { USER_REPOSITORY, IUserRepository } from './user.repository';
|
||||
export {
|
||||
REFRESH_TOKEN_REPOSITORY,
|
||||
type IRefreshTokenRepository,
|
||||
IRefreshTokenRepository,
|
||||
type RefreshTokenRecord,
|
||||
} from './refresh-token.repository';
|
||||
export {
|
||||
MFA_CHALLENGE_REPOSITORY,
|
||||
type IMfaChallengeRepository,
|
||||
IMfaChallengeRepository,
|
||||
type MfaChallengeRecord,
|
||||
} from './mfa-challenge.repository';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type UserEntity } from '../entities/user.entity';
|
||||
import { UserEntity } from '../entities/user.entity';
|
||||
|
||||
export const USER_REPOSITORY = Symbol('USER_REPOSITORY');
|
||||
|
||||
|
||||
@@ -11,4 +11,4 @@ export { AgentVerifiedEvent } from './domain/events/agent-verified.event';
|
||||
export { UserDeactivatedEvent } from './domain/events/user-deactivated.event';
|
||||
export { UserKycUpdatedEvent } from './domain/events/user-kyc-updated.event';
|
||||
export { UserRegisteredEvent } from './domain/events/user-registered.event';
|
||||
export { USER_REPOSITORY, type IUserRepository } from './domain/repositories/user.repository';
|
||||
export { USER_REPOSITORY, IUserRepository } from './domain/repositories/user.repository';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user