import type { JsonValue } from "@codemation/core"; export interface TestAssertionRecord { readonly id: string; readonly runId: string; readonly testSuiteRunId: string; readonly workflowId: string; readonly nodeId: string; readonly iterationId?: string; readonly itemIndex?: number; readonly name: string; readonly score: number; readonly passThreshold?: number; readonly errored?: true; readonly expected?: JsonValue; readonly actual?: JsonValue; readonly message?: string; readonly details?: Readonly>; readonly createdAt: string; } export interface RecordTestAssertionArgs { readonly id: string; readonly runId: string; readonly testSuiteRunId: string; readonly workflowId: string; readonly nodeId: string; readonly iterationId?: string; readonly itemIndex?: number; readonly name: string; readonly score: number; readonly passThreshold?: number; readonly errored?: true; readonly expected?: JsonValue; readonly actual?: JsonValue; readonly message?: string; readonly details?: Readonly>; readonly createdAt: string; } export interface TestAssertionMeanScoreAggregation { readonly testSuiteRunId: string; readonly name: string; readonly meanScore: number; readonly sampleCount: number; } export interface TestAssertionRepository { record(args: RecordTestAssertionArgs): Promise; listByRun(runId: string): Promise>; listByTestSuiteRun(testSuiteRunId: string): Promise>; deleteByTestSuiteRun(testSuiteRunId: string): Promise; listDistinctNamesByWorkflow(workflowId: string): Promise>; aggregateMeanScoreByNameAndSuiteRun(args: { readonly workflowId: string; readonly names?: ReadonlyArray; }): Promise>; }