website refactor

This commit is contained in:
2026-01-16 22:32:55 +01:00
parent 27f5a52e04
commit 9edf64130f
84 changed files with 497 additions and 300 deletions

View File

@@ -8,12 +8,12 @@ import { LogoutUseCase } from '@core/identity/application/use-cases/LogoutUseCas
import { ResetPasswordUseCase } from '@core/identity/application/use-cases/ResetPasswordUseCase';
import { SignupSponsorUseCase } from '@core/identity/application/use-cases/SignupSponsorUseCase';
import { SignupUseCase } from '@core/identity/application/use-cases/SignupUseCase';
import type { IMagicLinkNotificationPort } from '@core/identity/domain/ports/MagicLinkNotificationPort';
import type { IAuthRepository } from '@core/identity/domain/repositories/AuthRepository';
import type { ICompanyRepository } from '@core/identity/domain/repositories/CompanyRepository';
import type { IMagicLinkRepository } from '@core/identity/domain/repositories/MagicLinkRepository';
import type { IPasswordHashingService } from '@core/identity/domain/services/PasswordHashingService';
import type { Logger } from '@core/shared/domain/Logger';
import type { MagicLinkNotificationPort } from '@core/identity/domain/ports/MagicLinkNotificationPort';
import type { AuthRepository } from '@core/identity/domain/repositories/AuthRepository';
import type { CompanyRepository } from '@core/identity/domain/repositories/CompanyRepository';
import type { MagicLinkRepository } from '@core/identity/domain/repositories/MagicLinkRepository';
import type { PasswordHashingService } from '@core/identity/domain/services/PasswordHashingService';
import type { Logger } from '@core/shared/application/UseCaseOutputPort/UseCaseOutputPort/UseCaseOutputPort_TEMP_TEMP';
import {
AUTH_REPOSITORY_TOKEN,
@@ -66,8 +66,8 @@ export const AuthProviders: Provider[] = [
{
provide: LOGIN_USE_CASE_TOKEN,
useFactory: (
authRepo: IAuthRepository,
passwordHashing: IPasswordHashingService,
authRepo: AuthRepository,
passwordHashing: PasswordHashingService,
logger: Logger,
) => new LoginUseCase(authRepo, passwordHashing, logger),
inject: [AUTH_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],
@@ -75,8 +75,8 @@ export const AuthProviders: Provider[] = [
{
provide: SIGNUP_USE_CASE_TOKEN,
useFactory: (
authRepo: IAuthRepository,
passwordHashing: IPasswordHashingService,
authRepo: AuthRepository,
passwordHashing: PasswordHashingService,
logger: Logger,
) => new SignupUseCase(authRepo, passwordHashing, logger),
inject: [AUTH_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],
@@ -84,9 +84,9 @@ export const AuthProviders: Provider[] = [
{
provide: SIGNUP_SPONSOR_USE_CASE_TOKEN,
useFactory: (
authRepo: IAuthRepository,
companyRepo: ICompanyRepository,
passwordHashing: IPasswordHashingService,
authRepo: AuthRepository,
companyRepo: CompanyRepository,
passwordHashing: PasswordHashingService,
logger: Logger,
) => new SignupSponsorUseCase(authRepo, companyRepo, passwordHashing, logger),
inject: [AUTH_REPOSITORY_TOKEN, COMPANY_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],
@@ -119,9 +119,9 @@ export const AuthProviders: Provider[] = [
{
provide: FORGOT_PASSWORD_USE_CASE_TOKEN,
useFactory: (
authRepo: IAuthRepository,
magicLinkRepo: IMagicLinkRepository,
notificationPort: IMagicLinkNotificationPort,
authRepo: AuthRepository,
magicLinkRepo: MagicLinkRepository,
notificationPort: MagicLinkNotificationPort,
logger: Logger,
) => new ForgotPasswordUseCase(authRepo, magicLinkRepo, notificationPort, logger),
inject: [AUTH_REPOSITORY_TOKEN, MAGIC_LINK_REPOSITORY_TOKEN, MAGIC_LINK_NOTIFICATION_PORT_TOKEN, LOGGER_TOKEN],
@@ -129,9 +129,9 @@ export const AuthProviders: Provider[] = [
{
provide: RESET_PASSWORD_USE_CASE_TOKEN,
useFactory: (
authRepo: IAuthRepository,
magicLinkRepo: IMagicLinkRepository,
passwordHashing: IPasswordHashingService,
authRepo: AuthRepository,
magicLinkRepo: MagicLinkRepository,
passwordHashing: PasswordHashingService,
logger: Logger,
) => new ResetPasswordUseCase(authRepo, magicLinkRepo, passwordHashing, logger),
inject: [AUTH_REPOSITORY_TOKEN, MAGIC_LINK_REPOSITORY_TOKEN, PASSWORD_HASHING_SERVICE_TOKEN, LOGGER_TOKEN],

View File

@@ -1,6 +1,6 @@
import { Inject } from '@nestjs/common';
import type { Logger } from '@core/shared/domain/Logger';
import type { Logger } from '@core/shared/application/UseCaseOutputPort/UseCaseOutputPort/UseCaseOutputPort_TEMP_TEMP';
import {
ForgotPasswordUseCase,

View File

@@ -1,7 +1,7 @@
import type { LoginResult } from '@core/identity/application/use-cases/LoginUseCase';
import type { SignupSponsorResult } from '@core/identity/application/use-cases/SignupSponsorUseCase';
import type { SignupResult } from '@core/identity/application/use-cases/SignupUseCase';
import type { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort';
import type { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort/UseCaseOutputPort/UseCaseOutputPort_TEMP_TEMP';
import { AuthenticatedUserDTO } from '../dtos/AuthDto';
type AuthSessionResult = LoginResult | SignupResult | SignupSponsorResult;

View File

@@ -1,5 +1,5 @@
import type { LogoutResult } from '@core/identity/application/use-cases/LogoutUseCase';
import type { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort';
import type { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort/UseCaseOutputPort/UseCaseOutputPort_TEMP_TEMP';
export interface CommandResultDTO {
success: boolean;

View File

@@ -1,5 +1,5 @@
import { ForgotPasswordResult } from '@core/identity/application/use-cases/ForgotPasswordUseCase';
import { UseCaseOutputPort } from '@core/shared/application';
import { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort/UseCaseOutputPort/UseCaseOutputPort_TEMP_TEMP';
import { Injectable } from '@nestjs/common';
@Injectable()

View File

@@ -1,5 +1,5 @@
import { ResetPasswordResult } from '@core/identity/application/use-cases/ResetPasswordUseCase';
import { UseCaseOutputPort } from '@core/shared/application';
import { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort/UseCaseOutputPort/UseCaseOutputPort_TEMP_TEMP';
import { Injectable } from '@nestjs/common';
@Injectable()