This commit is contained in:
2025-12-11 13:50:38 +01:00
parent e4c1be628d
commit c7e5de40d6
212 changed files with 2965 additions and 763 deletions

View File

@@ -1,10 +1,11 @@
import { randomUUID } from 'crypto';
import type { IEntity } from '@gridpilot/shared/domain';
import { StepId } from '../value-objects/StepId';
import { SessionState } from '../value-objects/SessionState';
import { HostedSessionConfig } from './HostedSessionConfig';
import type { HostedSessionConfig } from '../types/HostedSessionConfig';
import { AutomationDomainError } from '../errors/AutomationDomainError';
export class AutomationSession {
export class AutomationSession implements IEntity<string> {
private readonly _id: string;
private _currentStep: StepId;
private _state: SessionState;

View File

@@ -1,28 +0,0 @@
export interface HostedSessionConfig {
sessionName: string;
trackId: string;
carIds: string[];
// Optional fields for extended configuration.
serverName?: string;
password?: string;
adminPassword?: string;
maxDrivers?: number;
/** Search term for car selection (alternative to carIds) */
carSearch?: string;
/** Search term for track selection (alternative to trackId) */
trackSearch?: string;
weatherType?: 'static' | 'dynamic';
timeOfDay?: 'morning' | 'afternoon' | 'evening' | 'night';
sessionDuration?: number;
practiceLength?: number;
qualifyingLength?: number;
warmupLength?: number;
raceLength?: number;
startType?: 'standing' | 'rolling';
restarts?: 'single-file' | 'double-file';
damageModel?: 'off' | 'limited' | 'realistic';
trackState?: 'auto' | 'clean' | 'moderately-low' | 'moderately-high' | 'optimum';
}

View File

@@ -1,5 +1,11 @@
import { StepId } from '../value-objects/StepId';
import type { StepId } from '../value-objects/StepId';
/**
* Domain Type: StepExecution
*
* Represents execution metadata for a single automation step.
* This is a pure data shape (DTO-like), not an entity or value object.
*/
export interface StepExecution {
stepId: StepId;
startedAt: Date;