wip
This commit is contained in:
46
packages/racing/application/ports/ILiveryCompositor.ts
Normal file
46
packages/racing/application/ports/ILiveryCompositor.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Application Port: ILiveryCompositor
|
||||
*
|
||||
* Defines interface for livery image composition.
|
||||
* Infrastructure will provide image processing implementation.
|
||||
*/
|
||||
|
||||
import type { LiveryDecal } from '../../domain/value-objects/LiveryDecal';
|
||||
|
||||
export interface CompositionResult {
|
||||
success: boolean;
|
||||
composedImageUrl?: string;
|
||||
error?: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
export interface ILiveryCompositor {
|
||||
/**
|
||||
* Composite a livery by layering decals on base image
|
||||
*/
|
||||
composeLivery(
|
||||
baseImageUrl: string,
|
||||
decals: LiveryDecal[]
|
||||
): Promise<CompositionResult>;
|
||||
|
||||
/**
|
||||
* Generate a livery pack (.zip) for all drivers in a season
|
||||
*/
|
||||
generateLiveryPack(
|
||||
seasonId: string,
|
||||
liveryData: Array<{
|
||||
driverId: string;
|
||||
driverName: string;
|
||||
carId: string;
|
||||
composedImageUrl: string;
|
||||
}>
|
||||
): Promise<Buffer>;
|
||||
|
||||
/**
|
||||
* Validate livery image (check for logos/text)
|
||||
*/
|
||||
validateLiveryImage(imageUrl: string): Promise<{
|
||||
isValid: boolean;
|
||||
violations?: string[];
|
||||
}>;
|
||||
}
|
||||
Reference in New Issue
Block a user