26 lines
687 B
TypeScript
26 lines
687 B
TypeScript
import { Result } from '@/lib/contracts/Result';
|
|
import { DomainError, Service } from '@/lib/contracts/services/Service';
|
|
import { AuthService } from './AuthService';
|
|
import type { AuthSessionDTO } from '@/lib/types/generated/AuthSessionDTO';
|
|
|
|
/**
|
|
* Session Service
|
|
*
|
|
* Orchestrates session-related operations.
|
|
* Returns raw API DTOs. No ViewModels or UX logic.
|
|
*/
|
|
export class SessionService implements Service {
|
|
private authService: AuthService;
|
|
|
|
constructor() {
|
|
this.authService = new AuthService();
|
|
}
|
|
|
|
/**
|
|
* Get current user session
|
|
*/
|
|
async getSession(): Promise<Result<AuthSessionDTO | null, DomainError>> {
|
|
return this.authService.getSession();
|
|
}
|
|
}
|