module creation

This commit is contained in:
2025-12-15 21:44:06 +01:00
parent b834f88bbd
commit 7c7267da72
88 changed files with 12119 additions and 4241 deletions

View File

@@ -0,0 +1,15 @@
import { User } from '../../domain/entities/User';
// No direct import of apps/api DTOs in core module
/**
* Application Use Case: GetCurrentSessionUseCase
*
* Retrieves the current user session information.
*/
export class GetCurrentSessionUseCase {
async execute(userId: string): Promise<User | null> {
// TODO: Implement actual logic to retrieve user and session data
console.warn('GetCurrentSessionUseCase: Method not implemented.');
return null;
}
}

View File

@@ -0,0 +1,20 @@
import { User } from '../../domain/entities/User';
export interface LoginWithIracingCallbackParams {
code: string;
state?: string;
returnTo?: string;
}
/**
* Application Use Case: LoginWithIracingCallbackUseCase
*
* Handles the callback after iRacing authentication.
*/
export class LoginWithIracingCallbackUseCase {
async execute(params: LoginWithIracingCallbackParams): Promise<User> {
// TODO: Implement actual logic for handling iRacing OAuth callback
console.warn('LoginWithIracingCallbackUseCase: Method not implemented.');
throw new Error('Method not implemented.');
}
}

View File

@@ -0,0 +1,20 @@
export interface IracingAuthRedirectResult {
redirectUrl: string;
state: string;
}
/**
* Application Use Case: StartIracingAuthRedirectUseCase
*
* Initiates the iRacing authentication flow.
*/
export class StartIracingAuthRedirectUseCase {
async execute(returnTo?: string): Promise<IracingAuthRedirectResult> {
// TODO: Implement actual logic for initiating iRacing OAuth redirect
console.warn('StartIracingAuthRedirectUseCase: Method not implemented.');
return {
redirectUrl: '/mock-iracing-redirect',
state: 'mock-state',
};
}
}