import type { EntityManager } from '@n8n/typeorm'; import { DataSource, Repository } from '@n8n/typeorm'; import type { DeepPartial } from '@n8n/typeorm/common/DeepPartial'; import type { IDataObject, JsonObject } from 'n8n-workflow'; import { TestCaseExecution } from '../entities'; import type { TestCaseExecutionErrorCode } from '../entities/types-db'; type StatusUpdateOptions = { testRunId: string; pastExecutionId: string; trx?: EntityManager; }; type MarkAsFailedOptions = StatusUpdateOptions & { errorCode?: TestCaseExecutionErrorCode; errorDetails?: IDataObject; }; type MarkAsRunningOptions = StatusUpdateOptions & { executionId: string; }; type MarkAsCompletedOptions = StatusUpdateOptions & { metrics: Record; }; export declare class TestCaseExecutionRepository extends Repository { constructor(dataSource: DataSource); createTestCaseExecution(testCaseExecutionProps: DeepPartial): Promise; getManyByTestRunId(testRunId: string, { offset, limit }: { offset: number; limit: number; }): Promise; countByTestRunId(testRunId: string): Promise; createBatch(testRunId: string, testCases: string[]): Promise; createPendingBatch(testRunId: string, cases: Array<{ runIndex: number; inputs?: JsonObject; }>): Promise; tryMarkCaseAsRunning(id: string): Promise; cancelIfNew(testRunId: string, id: string): Promise; markAsRunning({ testRunId, pastExecutionId, executionId, trx }: MarkAsRunningOptions): Promise; markAsCompleted({ testRunId, pastExecutionId, metrics, trx }: MarkAsCompletedOptions): Promise; markAllPendingAsCancelled(testRunId: string, trx?: EntityManager): Promise; markAsFailed({ testRunId, pastExecutionId, errorCode, errorDetails, trx, }: MarkAsFailedOptions): Promise; } export {};