import { type AxiosInstance } from 'axios'; import { GitInformation } from '../services/util'; import { RetryStrategy, SharedFile } from '../constructs'; import { SequenceId } from '../services/abstract-check-runner'; type RunTestSessionRequest = { name: string; checkRunJobs: any[]; project: { logicalId: string; }; sharedFiles?: SharedFile[]; runLocation: string | { type: 'PUBLIC'; region: string; } | { type: 'PRIVATE'; slugName: string; id: string; }; repoInfo?: GitInformation | null; environment?: string | null; shouldRecord: boolean; streamLogs?: boolean; refreshCache?: boolean; }; type TriggerTestSessionRequest = { name: string; runLocation: string | { type: 'PUBLIC'; region: string; } | { type: 'PRIVATE'; slugName: string; id: string; }; shouldRecord: boolean; targetTags: string[][]; checkRunSuiteId: string; environmentVariables: Array<{ key: string; value: string; }>; repoInfo: GitInformation | null; environment: string | null; testRetryStrategy: RetryStrategy | null; refreshCache?: boolean; }; export type TestResultsShortLinks = { testResultLink: string; testTraceLinks: string[]; videoLinks: string[]; screenshotLinks: string[]; }; export type TriggerTestSessionResponse = { checks: Array; testSessionId: string; testResultIds: Record; sequenceIds: Record; }; export declare class NoMatchingChecksError extends Error { constructor(options?: ErrorOptions); } declare class TestSessions { api: AxiosInstance; constructor(api: AxiosInstance); run(payload: RunTestSessionRequest): Promise>; /** * @throws {NoMatchingChecksError} If no checks matched the request. */ trigger(payload: TriggerTestSessionRequest): Promise>; getShortLink(id: string): Promise>; getResultShortLinks(testSessionId: string, testResultId: string): Promise>; } export default TestSessions;