website refactor

This commit is contained in:
2026-01-16 13:48:18 +01:00
parent 20a42c52fd
commit 7e02fc3ea5
796 changed files with 1946 additions and 2545 deletions

View File

@@ -12,7 +12,7 @@ import type {
NotificationDeliveryResult
} from '@core/notifications/application/ports/NotificationGateway';
export class NotificationGatewayRegistry implements INotificationGatewayRegistry {
export class NotificationGatewayRegistry implements NotificationGatewayRegistry {
private gateways: Map<NotificationChannel, NotificationGateway> = new Map();
constructor(initialGateways: NotificationGateway[] = []) {

View File

@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { Logger } from '@core/shared/application';
import type { Logger } from '@core/shared/domain';
import { NotificationPreference } from '@core/notifications/domain/entities/NotificationPreference';
import { InMemoryNotificationPreferenceRepository } from './InMemoryNotificationPreferenceRepository';

View File

@@ -1,8 +1,8 @@
import { INotificationPreferenceRepository } from '@core/notifications/domain/repositories/INotificationPreferenceRepository';
import { NotificationPreferenceRepository } from '@core/notifications/domain/repositories/NotificationPreferenceRepository';
import { NotificationPreference } from '@core/notifications/domain/entities/NotificationPreference';
import { Logger } from '@core/shared/application';
import { Logger } from '@core/shared/domain';
export class InMemoryNotificationPreferenceRepository implements INotificationPreferenceRepository {
export class InMemoryNotificationPreferenceRepository implements NotificationPreferenceRepository {
private preferences: Map<string, NotificationPreference> = new Map();
constructor(private readonly logger: Logger, initialPreferences: NotificationPreference[] = []) {

View File

@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { Logger } from '@core/shared/application';
import type { Logger } from '@core/shared/domain';
import { Notification } from '@core/notifications/domain/entities/Notification';
import { InMemoryNotificationRepository } from './InMemoryNotificationRepository';

View File

@@ -5,11 +5,11 @@
*/
import { Notification } from '@core/notifications/domain/entities/Notification';
import type { INotificationRepository } from '@core/notifications/domain/repositories/INotificationRepository';
import type { NotificationRepository } from '@core/notifications/domain/repositories/NotificationRepository';
import type { NotificationType } from '@core/notifications/domain/types/NotificationTypes';
import type { Logger } from '@core/shared/application';
import type { Logger } from '@core/shared/domain';
export class InMemoryNotificationRepository implements INotificationRepository {
export class InMemoryNotificationRepository implements NotificationRepository {
private notifications: Map<string, Notification> = new Map();
private readonly logger: Logger;

View File

@@ -1,10 +1,10 @@
import type { DataSource } from 'typeorm';
import type { INotificationPreferenceRepository } from '@core/notifications/domain/repositories/INotificationPreferenceRepository';
import type { NotificationPreferenceRepository } from '@core/notifications/domain/repositories/NotificationPreferenceRepository';
import { NotificationPreference } from '@core/notifications/domain/entities/NotificationPreference';
import { NotificationPreferenceOrmEntity } from '../entities/NotificationPreferenceOrmEntity';
import { NotificationPreferenceOrmMapper } from '../mappers/NotificationPreferenceOrmMapper';
export class TypeOrmNotificationPreferenceRepository implements INotificationPreferenceRepository {
export class TypeOrmNotificationPreferenceRepository implements NotificationPreferenceRepository {
constructor(
private readonly dataSource: DataSource,
private readonly mapper: NotificationPreferenceOrmMapper,

View File

@@ -1,11 +1,11 @@
import type { DataSource } from 'typeorm';
import type { INotificationRepository } from '@core/notifications/domain/repositories/INotificationRepository';
import type { NotificationRepository } from '@core/notifications/domain/repositories/NotificationRepository';
import type { NotificationType } from '@core/notifications/domain/types/NotificationTypes';
import { Notification } from '@core/notifications/domain/entities/Notification';
import { NotificationOrmEntity } from '../entities/NotificationOrmEntity';
import { NotificationOrmMapper } from '../mappers/NotificationOrmMapper';
export class TypeOrmNotificationRepository implements INotificationRepository {
export class TypeOrmNotificationRepository implements NotificationRepository {
constructor(
private readonly dataSource: DataSource,
private readonly mapper: NotificationOrmMapper,

View File

@@ -1,11 +1,11 @@
import { IMagicLinkNotificationPort, MagicLinkNotificationInput } from '@core/identity/domain/ports/IMagicLinkNotificationPort';
import { Logger } from '@core/shared/application';
import { MagicLinkNotificationPort, MagicLinkNotificationInput } from '@core/identity/domain/ports/MagicLinkNotificationPort';
import { Logger } from '@core/shared/domain';
/**
* Console adapter for magic link notifications
* Logs to console for development/testing purposes
*/
export class ConsoleMagicLinkNotificationAdapter implements IMagicLinkNotificationPort {
export class ConsoleMagicLinkNotificationAdapter implements MagicLinkNotificationPort {
constructor(private readonly logger: Logger) {}
async sendMagicLink(input: MagicLinkNotificationInput): Promise<void> {

View File

@@ -1,9 +1,9 @@
import type { NotificationService, SendNotificationCommand } from '@core/notifications/application/ports/NotificationService';
import type { INotificationRepository } from '@core/notifications/domain/repositories/INotificationRepository';
import type { INotificationPreferenceRepository } from '@core/notifications/domain/repositories/INotificationPreferenceRepository';
import type { NotificationRepository } from '@core/notifications/domain/repositories/NotificationRepository';
import type { NotificationPreferenceRepository } from '@core/notifications/domain/repositories/NotificationPreferenceRepository';
import type { NotificationGatewayRegistry } from '@core/notifications/application/ports/NotificationGateway';
import { SendNotificationUseCase } from '@core/notifications/application/use-cases/SendNotificationUseCase';
import type { Logger } from '@core/shared/application';
import type { Logger } from '@core/shared/domain';
export class NotificationServiceAdapter implements NotificationService {
private readonly useCase: SendNotificationUseCase;