fix: replace relative domain imports with TypeScript path aliases
Some checks failed
CI/CD Pipeline - Xpeditis PreProd / Frontend - Docker Build & Push (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Deploy to PreProd Server (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Run Smoke Tests (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Backend - Build & Test (push) Failing after 5m53s
CI/CD Pipeline - Xpeditis PreProd / Backend - Docker Build & Push (push) Has been skipped
CI/CD Pipeline - Xpeditis PreProd / Frontend - Build & Test (push) Has been cancelled
Some checks failed
CI/CD Pipeline - Xpeditis PreProd / Frontend - Docker Build & Push (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Deploy to PreProd Server (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Run Smoke Tests (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Backend - Build & Test (push) Failing after 5m53s
CI/CD Pipeline - Xpeditis PreProd / Backend - Docker Build & Push (push) Has been skipped
CI/CD Pipeline - Xpeditis PreProd / Frontend - Build & Test (push) Has been cancelled
- Replace all ../../domain/ imports with @domain/ across 67 files - Configure NestJS to use tsconfig.build.json with rootDir - Add tsc-alias to resolve path aliases after build - This fixes 'Cannot find module' TypeScript compilation errors Fixed files: - 30 files in application layer - 37 files in infrastructure layer
This commit is contained in:
parent
b6f6b05a08
commit
4b00ee2601
65
apps/backend/fix-imports.js
Normal file
65
apps/backend/fix-imports.js
Normal file
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Script to fix TypeScript imports from relative paths to path aliases
|
||||
*
|
||||
* Replaces:
|
||||
* - from '../../domain/...' → from '@domain/...'
|
||||
* - from '../../../domain/...' → from '@domain/...'
|
||||
* - from '../domain/...' → from '@domain/...'
|
||||
* - from '../../../../domain/...' → from '@domain/...'
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function fixImportsInFile(filePath) {
|
||||
const content = fs.readFileSync(filePath, 'utf8');
|
||||
let modified = content;
|
||||
|
||||
// Replace all variations of relative domain imports with @domain alias
|
||||
modified = modified.replace(/from ['"]\.\.\/\.\.\/\.\.\/\.\.\/domain\//g, "from '@domain/");
|
||||
modified = modified.replace(/from ['"]\.\.\/\.\.\/\.\.\/domain\//g, "from '@domain/");
|
||||
modified = modified.replace(/from ['"]\.\.\/\.\.\/domain\//g, "from '@domain/");
|
||||
modified = modified.replace(/from ['"]\.\.\/domain\//g, "from '@domain/");
|
||||
|
||||
// Also fix import statements (not just from)
|
||||
modified = modified.replace(/import\s+(['"])\.\.\/\.\.\/\.\.\/\.\.\/domain\//g, "import $1@domain/");
|
||||
modified = modified.replace(/import\s+(['"])\.\.\/\.\.\/\.\.\/domain\//g, "import $1@domain/");
|
||||
modified = modified.replace(/import\s+(['"])\.\.\/\.\.\/domain\//g, "import $1@domain/");
|
||||
modified = modified.replace(/import\s+(['"])\.\.\/domain\//g, "import $1@domain/");
|
||||
|
||||
if (modified !== content) {
|
||||
fs.writeFileSync(filePath, modified, 'utf8');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function walkDir(dir) {
|
||||
const files = fs.readdirSync(dir);
|
||||
let count = 0;
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(dir, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
|
||||
if (stat.isDirectory()) {
|
||||
count += walkDir(filePath);
|
||||
} else if (file.endsWith('.ts')) {
|
||||
if (fixImportsInFile(filePath)) {
|
||||
console.log(`✅ Fixed: ${filePath}`);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
const srcDir = path.join(__dirname, 'src');
|
||||
console.log('🔧 Fixing TypeScript imports...\n');
|
||||
|
||||
const count = walkDir(srcDir);
|
||||
|
||||
console.log(`\n✅ Fixed ${count} files`);
|
||||
@ -10,7 +10,7 @@ import { AuditController } from '../controllers/audit.controller';
|
||||
import { AuditService } from '../services/audit.service';
|
||||
import { AuditLogOrmEntity } from '../../infrastructure/persistence/typeorm/entities/audit-log.orm-entity';
|
||||
import { TypeOrmAuditLogRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-audit-log.repository';
|
||||
import { AUDIT_LOG_REPOSITORY } from '../../domain/ports/out/audit-log.repository';
|
||||
import { AUDIT_LOG_REPOSITORY } from '@domain/ports/out/audit-log.repository';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([AuditLogOrmEntity])],
|
||||
|
||||
@ -8,7 +8,7 @@ import { JwtStrategy } from './jwt.strategy';
|
||||
import { AuthController } from '../controllers/auth.controller';
|
||||
|
||||
// Import domain and infrastructure dependencies
|
||||
import { USER_REPOSITORY } from '../../domain/ports/out/user.repository';
|
||||
import { USER_REPOSITORY } from '@domain/ports/out/user.repository';
|
||||
import { TypeOrmUserRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-user.repository';
|
||||
import { UserOrmEntity } from '../../infrastructure/persistence/typeorm/entities/user.orm-entity';
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@ import {
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import * as argon2 from 'argon2';
|
||||
import { UserRepository, USER_REPOSITORY } from '../../domain/ports/out/user.repository';
|
||||
import { User, UserRole } from '../../domain/entities/user.entity';
|
||||
import { UserRepository, USER_REPOSITORY } from '@domain/ports/out/user.repository';
|
||||
import { User, UserRole } from '@domain/entities/user.entity';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
export interface JwtPayload {
|
||||
|
||||
@ -3,9 +3,9 @@ import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { BookingsController } from '../controllers/bookings.controller';
|
||||
|
||||
// Import domain ports
|
||||
import { BOOKING_REPOSITORY } from '../../domain/ports/out/booking.repository';
|
||||
import { RATE_QUOTE_REPOSITORY } from '../../domain/ports/out/rate-quote.repository';
|
||||
import { USER_REPOSITORY } from '../../domain/ports/out/user.repository';
|
||||
import { BOOKING_REPOSITORY } from '@domain/ports/out/booking.repository';
|
||||
import { RATE_QUOTE_REPOSITORY } from '@domain/ports/out/rate-quote.repository';
|
||||
import { USER_REPOSITORY } from '@domain/ports/out/user.repository';
|
||||
import { TypeOrmBookingRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-booking.repository';
|
||||
import { TypeOrmRateQuoteRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-rate-quote.repository';
|
||||
import { TypeOrmUserRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-user.repository';
|
||||
@ -17,7 +17,7 @@ import { RateQuoteOrmEntity } from '../../infrastructure/persistence/typeorm/ent
|
||||
import { UserOrmEntity } from '../../infrastructure/persistence/typeorm/entities/user.orm-entity';
|
||||
|
||||
// Import services and domain
|
||||
import { BookingService } from '../../domain/services/booking.service';
|
||||
import { BookingService } from '@domain/services/booking.service';
|
||||
import { BookingAutomationService } from '../services/booking-automation.service';
|
||||
import { ExportService } from '../services/export.service';
|
||||
import { FuzzySearchService } from '../services/fuzzy-search.service';
|
||||
|
||||
@ -19,7 +19,7 @@ import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { RolesGuard } from '../guards/roles.guard';
|
||||
import { Roles } from '../decorators/roles.decorator';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
import { AuditLog, AuditAction, AuditStatus } from '../../domain/entities/audit-log.entity';
|
||||
import { AuditLog, AuditAction, AuditStatus } from '@domain/entities/audit-log.entity';
|
||||
|
||||
class AuditLogResponseDto {
|
||||
id: string;
|
||||
|
||||
@ -15,7 +15,7 @@ import { LoginDto, RegisterDto, AuthResponseDto, RefreshTokenDto } from '../dto/
|
||||
import { Public } from '../decorators/public.decorator';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { UserRepository, USER_REPOSITORY } from '../../domain/ports/out/user.repository';
|
||||
import { UserRepository, USER_REPOSITORY } from '@domain/ports/out/user.repository';
|
||||
import { UserMapper } from '../mappers/user.mapper';
|
||||
|
||||
/**
|
||||
|
||||
@ -36,23 +36,23 @@ import { CreateBookingRequestDto, BookingResponseDto, BookingListResponseDto } f
|
||||
import { BookingFilterDto } from '../dto/booking-filter.dto';
|
||||
import { BookingExportDto, ExportFormat } from '../dto/booking-export.dto';
|
||||
import { BookingMapper } from '../mappers';
|
||||
import { BookingService } from '../../domain/services/booking.service';
|
||||
import { BookingRepository, BOOKING_REPOSITORY } from '../../domain/ports/out/booking.repository';
|
||||
import { BookingService } from '@domain/services/booking.service';
|
||||
import { BookingRepository, BOOKING_REPOSITORY } from '@domain/ports/out/booking.repository';
|
||||
import {
|
||||
RateQuoteRepository,
|
||||
RATE_QUOTE_REPOSITORY,
|
||||
} from '../../domain/ports/out/rate-quote.repository';
|
||||
import { BookingNumber } from '../../domain/value-objects/booking-number.vo';
|
||||
} from '@domain/ports/out/rate-quote.repository';
|
||||
import { BookingNumber } from '@domain/value-objects/booking-number.vo';
|
||||
import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
import { ExportService } from '../services/export.service';
|
||||
import { FuzzySearchService } from '../services/fuzzy-search.service';
|
||||
import { AuditService } from '../services/audit.service';
|
||||
import { AuditAction, AuditStatus } from '../../domain/entities/audit-log.entity';
|
||||
import { AuditAction, AuditStatus } from '@domain/entities/audit-log.entity';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { NotificationsGateway } from '../gateways/notifications.gateway';
|
||||
import { WebhookService } from '../services/webhook.service';
|
||||
import { WebhookEvent } from '../../domain/entities/webhook.entity';
|
||||
import { WebhookEvent } from '@domain/entities/webhook.entity';
|
||||
|
||||
@ApiTags('Bookings')
|
||||
@Controller('bookings')
|
||||
|
||||
@ -21,7 +21,7 @@ import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiQuery } from '@ne
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
import { Notification } from '../../domain/entities/notification.entity';
|
||||
import { Notification } from '@domain/entities/notification.entity';
|
||||
|
||||
class NotificationResponseDto {
|
||||
id: string;
|
||||
|
||||
@ -39,8 +39,8 @@ import { OrganizationMapper } from '../mappers/organization.mapper';
|
||||
import {
|
||||
OrganizationRepository,
|
||||
ORGANIZATION_REPOSITORY,
|
||||
} from '../../domain/ports/out/organization.repository';
|
||||
import { Organization, OrganizationType } from '../../domain/entities/organization.entity';
|
||||
} from '@domain/ports/out/organization.repository';
|
||||
import { Organization, OrganizationType } from '@domain/entities/organization.entity';
|
||||
import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { RolesGuard } from '../guards/roles.guard';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
|
||||
@ -20,8 +20,8 @@ import {
|
||||
} from '@nestjs/swagger';
|
||||
import { RateSearchRequestDto, RateSearchResponseDto } from '../dto';
|
||||
import { RateQuoteMapper } from '../mappers';
|
||||
import { RateSearchService } from '../../domain/services/rate-search.service';
|
||||
import { CsvRateSearchService } from '../../domain/services/csv-rate-search.service';
|
||||
import { RateSearchService } from '@domain/services/rate-search.service';
|
||||
import { CsvRateSearchService } from '@domain/services/csv-rate-search.service';
|
||||
import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
import { CsvRateSearchDto, CsvRateSearchResponseDto } from '../dto/csv-rate-search.dto';
|
||||
|
||||
@ -39,8 +39,8 @@ import {
|
||||
UserListResponseDto,
|
||||
} from '../dto/user.dto';
|
||||
import { UserMapper } from '../mappers/user.mapper';
|
||||
import { UserRepository, USER_REPOSITORY } from '../../domain/ports/out/user.repository';
|
||||
import { User, UserRole as DomainUserRole } from '../../domain/entities/user.entity';
|
||||
import { UserRepository, USER_REPOSITORY } from '@domain/ports/out/user.repository';
|
||||
import { User, UserRole as DomainUserRole } from '@domain/entities/user.entity';
|
||||
import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { RolesGuard } from '../guards/roles.guard';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
|
||||
@ -26,7 +26,7 @@ import { JwtAuthGuard } from '../guards/jwt-auth.guard';
|
||||
import { RolesGuard } from '../guards/roles.guard';
|
||||
import { Roles } from '../decorators/roles.decorator';
|
||||
import { CurrentUser, UserPayload } from '../decorators/current-user.decorator';
|
||||
import { Webhook, WebhookEvent } from '../../domain/entities/webhook.entity';
|
||||
import { Webhook, WebhookEvent } from '@domain/entities/webhook.entity';
|
||||
|
||||
class CreateWebhookDto {
|
||||
url: string;
|
||||
|
||||
@ -13,7 +13,7 @@ import {
|
||||
IsUUID,
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { OrganizationType } from '../../domain/entities/organization.entity';
|
||||
import { OrganizationType } from '@domain/entities/organization.entity';
|
||||
|
||||
/**
|
||||
* Address DTO
|
||||
|
||||
@ -17,7 +17,7 @@ import { Server, Socket } from 'socket.io';
|
||||
import { Logger, UseGuards } from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { Notification } from '../../domain/entities/notification.entity';
|
||||
import { Notification } from '@domain/entities/notification.entity';
|
||||
|
||||
/**
|
||||
* WebSocket authentication guard
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Booking } from '../../domain/entities/booking.entity';
|
||||
import { RateQuote } from '../../domain/entities/rate-quote.entity';
|
||||
import { Booking } from '@domain/entities/booking.entity';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import {
|
||||
BookingResponseDto,
|
||||
BookingAddressDto,
|
||||
|
||||
@ -2,7 +2,7 @@ import {
|
||||
Organization,
|
||||
OrganizationAddress,
|
||||
OrganizationDocument,
|
||||
} from '../../domain/entities/organization.entity';
|
||||
} from '@domain/entities/organization.entity';
|
||||
import {
|
||||
OrganizationResponseDto,
|
||||
OrganizationDocumentDto,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { RateQuote } from '../../domain/entities/rate-quote.entity';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import {
|
||||
RateQuoteDto,
|
||||
PortDto,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { User } from '../../domain/entities/user.entity';
|
||||
import { User } from '@domain/entities/user.entity';
|
||||
import { UserResponseDto } from '../dto/user.dto';
|
||||
|
||||
/**
|
||||
|
||||
@ -13,7 +13,7 @@ import { NotificationsGateway } from '../gateways/notifications.gateway';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { NotificationOrmEntity } from '../../infrastructure/persistence/typeorm/entities/notification.orm-entity';
|
||||
import { TypeOrmNotificationRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-notification.repository';
|
||||
import { NOTIFICATION_REPOSITORY } from '../../domain/ports/out/notification.repository';
|
||||
import { NOTIFICATION_REPOSITORY } from '@domain/ports/out/notification.repository';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
||||
@ -3,7 +3,7 @@ import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { OrganizationsController } from '../controllers/organizations.controller';
|
||||
|
||||
// Import domain ports
|
||||
import { ORGANIZATION_REPOSITORY } from '../../domain/ports/out/organization.repository';
|
||||
import { ORGANIZATION_REPOSITORY } from '@domain/ports/out/organization.repository';
|
||||
import { TypeOrmOrganizationRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-organization.repository';
|
||||
import { OrganizationOrmEntity } from '../../infrastructure/persistence/typeorm/entities/organization.orm-entity';
|
||||
|
||||
|
||||
@ -6,13 +6,13 @@ import { CarrierModule } from '../../infrastructure/carriers/carrier.module';
|
||||
import { CsvRateModule } from '../../infrastructure/carriers/csv-loader/csv-rate.module';
|
||||
|
||||
// Import domain services
|
||||
import { RateSearchService } from '../../domain/services/rate-search.service';
|
||||
import { RateSearchService } from '@domain/services/rate-search.service';
|
||||
|
||||
// Import domain ports
|
||||
import { RATE_QUOTE_REPOSITORY } from '../../domain/ports/out/rate-quote.repository';
|
||||
import { PORT_REPOSITORY } from '../../domain/ports/out/port.repository';
|
||||
import { CARRIER_REPOSITORY } from '../../domain/ports/out/carrier.repository';
|
||||
import { CACHE_PORT } from '../../domain/ports/out/cache.port';
|
||||
import { RATE_QUOTE_REPOSITORY } from '@domain/ports/out/rate-quote.repository';
|
||||
import { PORT_REPOSITORY } from '@domain/ports/out/port.repository';
|
||||
import { CARRIER_REPOSITORY } from '@domain/ports/out/carrier.repository';
|
||||
import { CACHE_PORT } from '@domain/ports/out/cache.port';
|
||||
|
||||
// Import infrastructure implementations
|
||||
import { TypeOrmRateQuoteRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-rate-quote.repository';
|
||||
|
||||
@ -5,10 +5,10 @@
|
||||
*/
|
||||
|
||||
import { Injectable, Inject } from '@nestjs/common';
|
||||
import { BOOKING_REPOSITORY } from '../../domain/ports/out/booking.repository';
|
||||
import { BookingRepository } from '../../domain/ports/out/booking.repository';
|
||||
import { RATE_QUOTE_REPOSITORY } from '../../domain/ports/out/rate-quote.repository';
|
||||
import { RateQuoteRepository } from '../../domain/ports/out/rate-quote.repository';
|
||||
import { BOOKING_REPOSITORY } from '@domain/ports/out/booking.repository';
|
||||
import { BookingRepository } from '@domain/ports/out/booking.repository';
|
||||
import { RATE_QUOTE_REPOSITORY } from '@domain/ports/out/rate-quote.repository';
|
||||
import { RateQuoteRepository } from '@domain/ports/out/rate-quote.repository';
|
||||
|
||||
export interface DashboardKPIs {
|
||||
bookingsThisMonth: number;
|
||||
|
||||
@ -7,12 +7,12 @@
|
||||
|
||||
import { Injectable, Logger, Inject } from '@nestjs/common';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { AuditLog, AuditAction, AuditStatus } from '../../domain/entities/audit-log.entity';
|
||||
import { AuditLog, AuditAction, AuditStatus } from '@domain/entities/audit-log.entity';
|
||||
import {
|
||||
AuditLogRepository,
|
||||
AUDIT_LOG_REPOSITORY,
|
||||
AuditLogFilters,
|
||||
} from '../../domain/ports/out/audit-log.repository';
|
||||
} from '@domain/ports/out/audit-log.repository';
|
||||
|
||||
export interface LogAuditInput {
|
||||
action: AuditAction;
|
||||
|
||||
@ -5,15 +5,15 @@
|
||||
*/
|
||||
|
||||
import { Injectable, Logger, Inject } from '@nestjs/common';
|
||||
import { Booking } from '../../domain/entities/booking.entity';
|
||||
import { EmailPort, EMAIL_PORT } from '../../domain/ports/out/email.port';
|
||||
import { PdfPort, PDF_PORT, BookingPdfData } from '../../domain/ports/out/pdf.port';
|
||||
import { StoragePort, STORAGE_PORT } from '../../domain/ports/out/storage.port';
|
||||
import { UserRepository, USER_REPOSITORY } from '../../domain/ports/out/user.repository';
|
||||
import { Booking } from '@domain/entities/booking.entity';
|
||||
import { EmailPort, EMAIL_PORT } from '@domain/ports/out/email.port';
|
||||
import { PdfPort, PDF_PORT, BookingPdfData } from '@domain/ports/out/pdf.port';
|
||||
import { StoragePort, STORAGE_PORT } from '@domain/ports/out/storage.port';
|
||||
import { UserRepository, USER_REPOSITORY } from '@domain/ports/out/user.repository';
|
||||
import {
|
||||
RateQuoteRepository,
|
||||
RATE_QUOTE_REPOSITORY,
|
||||
} from '../../domain/ports/out/rate-quote.repository';
|
||||
} from '@domain/ports/out/rate-quote.repository';
|
||||
|
||||
@Injectable()
|
||||
export class BookingAutomationService {
|
||||
|
||||
@ -4,20 +4,20 @@ import {
|
||||
CsvBooking,
|
||||
CsvBookingStatus,
|
||||
DocumentType,
|
||||
} from '../../domain/entities/csv-booking.entity';
|
||||
import { PortCode } from '../../domain/value-objects/port-code.vo';
|
||||
} from '@domain/entities/csv-booking.entity';
|
||||
import { PortCode } from '@domain/value-objects/port-code.vo';
|
||||
import { TypeOrmCsvBookingRepository } from '../../infrastructure/persistence/typeorm/repositories/csv-booking.repository';
|
||||
import {
|
||||
NotificationRepository,
|
||||
NOTIFICATION_REPOSITORY,
|
||||
} from '../../domain/ports/out/notification.repository';
|
||||
import { EmailPort, EMAIL_PORT } from '../../domain/ports/out/email.port';
|
||||
import { StoragePort, STORAGE_PORT } from '../../domain/ports/out/storage.port';
|
||||
} from '@domain/ports/out/notification.repository';
|
||||
import { EmailPort, EMAIL_PORT } from '@domain/ports/out/email.port';
|
||||
import { StoragePort, STORAGE_PORT } from '@domain/ports/out/storage.port';
|
||||
import {
|
||||
Notification,
|
||||
NotificationType,
|
||||
NotificationPriority,
|
||||
} from '../../domain/entities/notification.entity';
|
||||
} from '@domain/entities/notification.entity';
|
||||
import {
|
||||
CreateCsvBookingDto,
|
||||
CsvBookingResponseDto,
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { Booking } from '../../domain/entities/booking.entity';
|
||||
import { RateQuote } from '../../domain/entities/rate-quote.entity';
|
||||
import { Booking } from '@domain/entities/booking.entity';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { ExportFormat, ExportField } from '../dto/booking-export.dto';
|
||||
import * as ExcelJS from 'exceljs';
|
||||
|
||||
|
||||
@ -10,12 +10,12 @@ import {
|
||||
Notification,
|
||||
NotificationType,
|
||||
NotificationPriority,
|
||||
} from '../../domain/entities/notification.entity';
|
||||
} from '@domain/entities/notification.entity';
|
||||
import {
|
||||
NotificationRepository,
|
||||
NOTIFICATION_REPOSITORY,
|
||||
NotificationFilters,
|
||||
} from '../../domain/ports/out/notification.repository';
|
||||
} from '@domain/ports/out/notification.repository';
|
||||
|
||||
export interface CreateNotificationInput {
|
||||
userId: string;
|
||||
|
||||
@ -9,12 +9,12 @@ import { HttpService } from '@nestjs/axios';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import * as crypto from 'crypto';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { Webhook, WebhookEvent, WebhookStatus } from '../../domain/entities/webhook.entity';
|
||||
import { Webhook, WebhookEvent, WebhookStatus } from '@domain/entities/webhook.entity';
|
||||
import {
|
||||
WebhookRepository,
|
||||
WEBHOOK_REPOSITORY,
|
||||
WebhookFilters,
|
||||
} from '../../domain/ports/out/webhook.repository';
|
||||
} from '@domain/ports/out/webhook.repository';
|
||||
|
||||
export interface CreateWebhookInput {
|
||||
organizationId: string;
|
||||
|
||||
@ -3,7 +3,7 @@ import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { UsersController } from '../controllers/users.controller';
|
||||
|
||||
// Import domain ports
|
||||
import { USER_REPOSITORY } from '../../domain/ports/out/user.repository';
|
||||
import { USER_REPOSITORY } from '@domain/ports/out/user.repository';
|
||||
import { TypeOrmUserRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-user.repository';
|
||||
import { UserOrmEntity } from '../../infrastructure/persistence/typeorm/entities/user.orm-entity';
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import { WebhooksController } from '../controllers/webhooks.controller';
|
||||
import { WebhookService } from '../services/webhook.service';
|
||||
import { WebhookOrmEntity } from '../../infrastructure/persistence/typeorm/entities/webhook.orm-entity';
|
||||
import { TypeOrmWebhookRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-webhook.repository';
|
||||
import { WEBHOOK_REPOSITORY } from '../../domain/ports/out/webhook.repository';
|
||||
import { WEBHOOK_REPOSITORY } from '@domain/ports/out/webhook.repository';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
import { Module, Global } from '@nestjs/common';
|
||||
import { RedisCacheAdapter } from './redis-cache.adapter';
|
||||
import { CACHE_PORT } from '../../domain/ports/out/cache.port';
|
||||
import { CACHE_PORT } from '@domain/ports/out/cache.port';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
import { Injectable, OnModuleInit, OnModuleDestroy, Logger } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import Redis from 'ioredis';
|
||||
import { CachePort } from '../../domain/ports/out/cache.port';
|
||||
import { CachePort } from '@domain/ports/out/cache.port';
|
||||
|
||||
@Injectable()
|
||||
export class RedisCacheAdapter implements CachePort, OnModuleInit, OnModuleDestroy {
|
||||
|
||||
@ -12,10 +12,10 @@ import {
|
||||
CarrierConnectorPort,
|
||||
CarrierRateSearchInput,
|
||||
CarrierAvailabilityInput,
|
||||
} from '../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '../../domain/entities/rate-quote.entity';
|
||||
import { CarrierTimeoutException } from '../../domain/exceptions/carrier-timeout.exception';
|
||||
import { CarrierUnavailableException } from '../../domain/exceptions/carrier-unavailable.exception';
|
||||
} from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { CarrierTimeoutException } from '@domain/exceptions/carrier-timeout.exception';
|
||||
import { CarrierUnavailableException } from '@domain/exceptions/carrier-unavailable.exception';
|
||||
|
||||
export interface CarrierConfig {
|
||||
name: string;
|
||||
|
||||
@ -10,8 +10,8 @@ import {
|
||||
CarrierConnectorPort,
|
||||
CarrierRateSearchInput,
|
||||
CarrierAvailabilityInput,
|
||||
} from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '../../../domain/entities/rate-quote.entity';
|
||||
} from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { BaseCarrierConnector, CarrierConfig } from '../base-carrier.connector';
|
||||
import { CMACGMRequestMapper } from './cma-cgm.mapper';
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CarrierRateSearchInput } from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '../../../domain/entities/rate-quote.entity';
|
||||
import { CarrierRateSearchInput } from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '@domain/entities/rate-quote.entity';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -2,7 +2,7 @@ import { Injectable, Logger } from '@nestjs/common';
|
||||
import { parse } from 'csv-parse/sync';
|
||||
import * as fs from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
import { CsvRateLoaderPort } from '../../../domain/ports/out/csv-rate-loader.port';
|
||||
import { CsvRateLoaderPort } from '@domain/ports/out/csv-rate-loader.port';
|
||||
import { CsvRate } from '@domain/entities/csv-rate.entity';
|
||||
import { PortCode } from '@domain/value-objects/port-code.vo';
|
||||
import { ContainerType } from '@domain/value-objects/container-type.vo';
|
||||
|
||||
@ -10,8 +10,8 @@ import {
|
||||
CarrierConnectorPort,
|
||||
CarrierRateSearchInput,
|
||||
CarrierAvailabilityInput,
|
||||
} from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '../../../domain/entities/rate-quote.entity';
|
||||
} from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { BaseCarrierConnector, CarrierConfig } from '../base-carrier.connector';
|
||||
import { HapagLloydRequestMapper } from './hapag-lloyd.mapper';
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CarrierRateSearchInput } from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '../../../domain/entities/rate-quote.entity';
|
||||
import { CarrierRateSearchInput } from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '@domain/entities/rate-quote.entity';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Maps internal domain format to Maersk API format
|
||||
*/
|
||||
|
||||
import { CarrierRateSearchInput } from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { CarrierRateSearchInput } from '@domain/ports/out/carrier-connector.port';
|
||||
import { MaerskRateSearchRequest } from './maersk.types';
|
||||
|
||||
export class MaerskRequestMapper {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { RateQuote } from '../../../domain/entities/rate-quote.entity';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { MaerskRateSearchResponse, MaerskRateResult, MaerskRouteSegment } from './maersk.types';
|
||||
|
||||
export class MaerskResponseMapper {
|
||||
|
||||
@ -11,8 +11,8 @@ import { BaseCarrierConnector, CarrierConfig } from '../base-carrier.connector';
|
||||
import {
|
||||
CarrierRateSearchInput,
|
||||
CarrierAvailabilityInput,
|
||||
} from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '../../../domain/entities/rate-quote.entity';
|
||||
} from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { MaerskRequestMapper } from './maersk-request.mapper';
|
||||
import { MaerskResponseMapper } from './maersk-response.mapper';
|
||||
import { MaerskRateSearchRequest, MaerskRateSearchResponse } from './maersk.types';
|
||||
|
||||
@ -10,8 +10,8 @@ import {
|
||||
CarrierConnectorPort,
|
||||
CarrierRateSearchInput,
|
||||
CarrierAvailabilityInput,
|
||||
} from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '../../../domain/entities/rate-quote.entity';
|
||||
} from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { BaseCarrierConnector, CarrierConfig } from '../base-carrier.connector';
|
||||
import { MSCRequestMapper } from './msc.mapper';
|
||||
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CarrierRateSearchInput } from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '../../../domain/entities/rate-quote.entity';
|
||||
import { CarrierRateSearchInput } from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '@domain/entities/rate-quote.entity';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -10,8 +10,8 @@ import {
|
||||
CarrierConnectorPort,
|
||||
CarrierRateSearchInput,
|
||||
CarrierAvailabilityInput,
|
||||
} from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '../../../domain/entities/rate-quote.entity';
|
||||
} from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { BaseCarrierConnector, CarrierConfig } from '../base-carrier.connector';
|
||||
import { ONERequestMapper } from './one.mapper';
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CarrierRateSearchInput } from '../../../domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '../../../domain/entities/rate-quote.entity';
|
||||
import { CarrierRateSearchInput } from '@domain/ports/out/carrier-connector.port';
|
||||
import { RateQuote, RouteSegment, Surcharge } from '@domain/entities/rate-quote.entity';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import * as nodemailer from 'nodemailer';
|
||||
import { EmailPort, EmailOptions } from '../../domain/ports/out/email.port';
|
||||
import { EmailPort, EmailOptions } from '@domain/ports/out/email.port';
|
||||
import { EmailTemplates } from './templates/email-templates';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -8,7 +8,7 @@ import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { EmailAdapter } from './email.adapter';
|
||||
import { EmailTemplates } from './templates/email-templates';
|
||||
import { EMAIL_PORT } from '../../domain/ports/out/email.port';
|
||||
import { EMAIL_PORT } from '@domain/ports/out/email.port';
|
||||
|
||||
@Module({
|
||||
imports: [ConfigModule],
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import PDFDocument from 'pdfkit';
|
||||
import { PdfPort, BookingPdfData } from '../../domain/ports/out/pdf.port';
|
||||
import { PdfPort, BookingPdfData } from '@domain/ports/out/pdf.port';
|
||||
|
||||
@Injectable()
|
||||
export class PdfAdapter implements PdfPort {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
import { PdfAdapter } from './pdf.adapter';
|
||||
import { PDF_PORT } from '../../domain/ports/out/pdf.port';
|
||||
import { PDF_PORT } from '@domain/ports/out/pdf.port';
|
||||
|
||||
@Module({
|
||||
providers: [
|
||||
|
||||
@ -9,9 +9,9 @@ import {
|
||||
BookingProps,
|
||||
Party,
|
||||
BookingContainer,
|
||||
} from '../../../../domain/entities/booking.entity';
|
||||
import { BookingNumber } from '../../../../domain/value-objects/booking-number.vo';
|
||||
import { BookingStatus } from '../../../../domain/value-objects/booking-status.vo';
|
||||
} from '@domain/entities/booking.entity';
|
||||
import { BookingNumber } from '@domain/value-objects/booking-number.vo';
|
||||
import { BookingStatus } from '@domain/value-objects/booking-status.vo';
|
||||
import { BookingOrmEntity, PartyJson } from '../entities/booking.orm-entity';
|
||||
import { ContainerOrmEntity } from '../entities/container.orm-entity';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Maps between Carrier domain entity and CarrierOrmEntity
|
||||
*/
|
||||
|
||||
import { Carrier, CarrierProps } from '../../../../domain/entities/carrier.entity';
|
||||
import { Carrier, CarrierProps } from '@domain/entities/carrier.entity';
|
||||
import { CarrierOrmEntity } from '../entities/carrier.orm-entity';
|
||||
|
||||
export class CarrierOrmMapper {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Maps between Organization domain entity and OrganizationOrmEntity
|
||||
*/
|
||||
|
||||
import { Organization, OrganizationProps } from '../../../../domain/entities/organization.entity';
|
||||
import { Organization, OrganizationProps } from '@domain/entities/organization.entity';
|
||||
import { OrganizationOrmEntity } from '../entities/organization.orm-entity';
|
||||
|
||||
export class OrganizationOrmMapper {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Maps between Port domain entity and PortOrmEntity
|
||||
*/
|
||||
|
||||
import { Port, PortProps } from '../../../../domain/entities/port.entity';
|
||||
import { Port, PortProps } from '@domain/entities/port.entity';
|
||||
import { PortOrmEntity } from '../entities/port.orm-entity';
|
||||
|
||||
export class PortOrmMapper {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Maps between RateQuote domain entity and RateQuoteOrmEntity
|
||||
*/
|
||||
|
||||
import { RateQuote, RateQuoteProps } from '../../../../domain/entities/rate-quote.entity';
|
||||
import { RateQuote, RateQuoteProps } from '@domain/entities/rate-quote.entity';
|
||||
import { RateQuoteOrmEntity } from '../entities/rate-quote.orm-entity';
|
||||
|
||||
export class RateQuoteOrmMapper {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Maps between User domain entity and UserOrmEntity
|
||||
*/
|
||||
|
||||
import { User, UserProps } from '../../../../domain/entities/user.entity';
|
||||
import { User, UserProps } from '@domain/entities/user.entity';
|
||||
import { UserOrmEntity } from '../entities/user.orm-entity';
|
||||
|
||||
export class UserOrmMapper {
|
||||
|
||||
@ -2,7 +2,7 @@ import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository, LessThan, MoreThan } from 'typeorm';
|
||||
import { CsvBooking, CsvBookingStatus } from '@domain/entities/csv-booking.entity';
|
||||
import { CsvBookingRepositoryPort } from '../../../../domain/ports/out/csv-booking.repository';
|
||||
import { CsvBookingRepositoryPort } from '@domain/ports/out/csv-booking.repository';
|
||||
import { CsvBookingOrmEntity } from '../entities/csv-booking.orm-entity';
|
||||
import { CsvBookingMapper } from '../mappers/csv-booking.mapper';
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@ import { Repository, In, Between, MoreThanOrEqual, LessThanOrEqual } from 'typeo
|
||||
import {
|
||||
AuditLogRepository,
|
||||
AuditLogFilters,
|
||||
} from '../../../../domain/ports/out/audit-log.repository';
|
||||
import { AuditLog, AuditStatus, AuditAction } from '../../../../domain/entities/audit-log.entity';
|
||||
} from '@domain/ports/out/audit-log.repository';
|
||||
import { AuditLog, AuditStatus, AuditAction } from '@domain/entities/audit-log.entity';
|
||||
import { AuditLogOrmEntity } from '../entities/audit-log.orm-entity';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { Booking } from '../../../../domain/entities/booking.entity';
|
||||
import { BookingNumber } from '../../../../domain/value-objects/booking-number.vo';
|
||||
import { BookingStatus } from '../../../../domain/value-objects/booking-status.vo';
|
||||
import { BookingRepository } from '../../../../domain/ports/out/booking.repository';
|
||||
import { Booking } from '@domain/entities/booking.entity';
|
||||
import { BookingNumber } from '@domain/value-objects/booking-number.vo';
|
||||
import { BookingStatus } from '@domain/value-objects/booking-status.vo';
|
||||
import { BookingRepository } from '@domain/ports/out/booking.repository';
|
||||
import { BookingOrmEntity } from '../entities/booking.orm-entity';
|
||||
import { ContainerOrmEntity } from '../entities/container.orm-entity';
|
||||
import { BookingOrmMapper } from '../mappers/booking-orm.mapper';
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { Carrier } from '../../../../domain/entities/carrier.entity';
|
||||
import { CarrierRepository } from '../../../../domain/ports/out/carrier.repository';
|
||||
import { Carrier } from '@domain/entities/carrier.entity';
|
||||
import { CarrierRepository } from '@domain/ports/out/carrier.repository';
|
||||
import { CarrierOrmEntity } from '../entities/carrier.orm-entity';
|
||||
import { CarrierOrmMapper } from '../mappers/carrier-orm.mapper';
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@ import { Repository, LessThan } from 'typeorm';
|
||||
import {
|
||||
NotificationRepository,
|
||||
NotificationFilters,
|
||||
} from '../../../../domain/ports/out/notification.repository';
|
||||
import { Notification } from '../../../../domain/entities/notification.entity';
|
||||
} from '@domain/ports/out/notification.repository';
|
||||
import { Notification } from '@domain/entities/notification.entity';
|
||||
import { NotificationOrmEntity } from '../entities/notification.orm-entity';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { Organization } from '../../../../domain/entities/organization.entity';
|
||||
import { OrganizationRepository } from '../../../../domain/ports/out/organization.repository';
|
||||
import { Organization } from '@domain/entities/organization.entity';
|
||||
import { OrganizationRepository } from '@domain/ports/out/organization.repository';
|
||||
import { OrganizationOrmEntity } from '../entities/organization.orm-entity';
|
||||
import { OrganizationOrmMapper } from '../mappers/organization-orm.mapper';
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository, ILike } from 'typeorm';
|
||||
import { Port } from '../../../../domain/entities/port.entity';
|
||||
import { PortRepository } from '../../../../domain/ports/out/port.repository';
|
||||
import { Port } from '@domain/entities/port.entity';
|
||||
import { PortRepository } from '@domain/ports/out/port.repository';
|
||||
import { PortOrmEntity } from '../entities/port.orm-entity';
|
||||
import { PortOrmMapper } from '../mappers/port-orm.mapper';
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository, LessThan } from 'typeorm';
|
||||
import { RateQuote } from '../../../../domain/entities/rate-quote.entity';
|
||||
import { RateQuoteRepository } from '../../../../domain/ports/out/rate-quote.repository';
|
||||
import { RateQuote } from '@domain/entities/rate-quote.entity';
|
||||
import { RateQuoteRepository } from '@domain/ports/out/rate-quote.repository';
|
||||
import { RateQuoteOrmEntity } from '../entities/rate-quote.orm-entity';
|
||||
import { RateQuoteOrmMapper } from '../mappers/rate-quote-orm.mapper';
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { User } from '../../../../domain/entities/user.entity';
|
||||
import { UserRepository } from '../../../../domain/ports/out/user.repository';
|
||||
import { User } from '@domain/entities/user.entity';
|
||||
import { UserRepository } from '@domain/ports/out/user.repository';
|
||||
import { UserOrmEntity } from '../entities/user.orm-entity';
|
||||
import { UserOrmMapper } from '../mappers/user-orm.mapper';
|
||||
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { WebhookRepository, WebhookFilters } from '../../../../domain/ports/out/webhook.repository';
|
||||
import { Webhook, WebhookEvent, WebhookStatus } from '../../../../domain/entities/webhook.entity';
|
||||
import { WebhookRepository, WebhookFilters } from '@domain/ports/out/webhook.repository';
|
||||
import { Webhook, WebhookEvent, WebhookStatus } from '@domain/entities/webhook.entity';
|
||||
import { WebhookOrmEntity } from '../entities/webhook.orm-entity';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -21,7 +21,7 @@ import {
|
||||
DownloadOptions,
|
||||
DeleteOptions,
|
||||
StorageObject,
|
||||
} from '../../domain/ports/out/storage.port';
|
||||
} from '@domain/ports/out/storage.port';
|
||||
|
||||
@Injectable()
|
||||
export class S3StorageAdapter implements StoragePort {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { S3StorageAdapter } from './s3-storage.adapter';
|
||||
import { STORAGE_PORT } from '../../domain/ports/out/storage.port';
|
||||
import { STORAGE_PORT } from '@domain/ports/out/storage.port';
|
||||
|
||||
@Module({
|
||||
imports: [ConfigModule],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user