This commit is contained in:
2025-12-29 22:27:33 +01:00
parent 3f610c1cb6
commit 7a853d4e43
96 changed files with 14790 additions and 111 deletions

View File

@@ -0,0 +1,68 @@
/**
* DTO: EvaluationResultDto
*
* Result of DSL eligibility evaluation with explainable reasons.
*/
export interface EvaluationReason {
/**
* What was evaluated
*/
target: string; // e.g., 'platform.driving', 'external.iracing.iRating'
/**
* Operator used
*/
operator: string; // e.g., '>=', 'between'
/**
* Expected threshold/range
*/
expected: number | [number, number];
/**
* Actual value found
*/
actual: number;
/**
* Whether this condition failed
*/
failed: boolean;
/**
* Human-readable explanation
*/
message?: string;
}
export interface EvaluationResultDto {
/**
* Overall eligibility status
*/
eligible: boolean;
/**
* Individual condition results
*/
reasons: EvaluationReason[];
/**
* Summary message
*/
summary: string;
/**
* Timestamp of evaluation
*/
evaluatedAt: string; // ISO date string
/**
* Optional metadata
*/
metadata?: {
userId?: string;
filter?: string;
[key: string]: unknown;
};
}