import type { AxiosInstance } from 'axios'; export type CheckSessionStatus = 'STARTED' | 'PROGRESS' | 'FAILED' | 'PASSED' | 'DEGRADED' | 'PROGRESS_FAILED' | 'PROGRESS_DEGRADED' | 'TIMED_OUT' | 'CANCELLED'; export type FinalCheckSessionStatus = 'PASSED' | 'FAILED' | 'DEGRADED' | 'TIMED_OUT' | 'CANCELLED'; export interface CheckSessionResult { checkResultId: string; checkResultLink: string; checkId: string; checkType: string; name: string; runLocation: string; resultType: 'FINAL' | 'ATTEMPT' | null; hasErrors: boolean; hasFailures: boolean; isDegraded: boolean; aborted: boolean; isCancelled: boolean; responseTime?: number | null; startedAt?: string | null; stoppedAt?: string | null; } export interface CheckSession { checkSessionId: string; checkSessionLink: string; checkId: string; checkType: string; name?: string; status: CheckSessionStatus; startedAt: string; stoppedAt: string | null; timeElapsed: number; runLocations: string[]; runSource: string | null; } export interface CompletedCheckSession extends CheckSession { status: FinalCheckSessionStatus; stoppedAt: string; results: CheckSessionResult[]; } export interface TriggerCheckSessionsRequest { target?: { matchTags?: string[][]; checkId?: string[]; }; refreshCache?: boolean; } export interface TriggerCheckSessionsResponse { sessions: CheckSession[]; } export declare class NoMatchingChecksError extends Error { constructor(options?: ErrorOptions); } export declare class CheckSessionWaitTimeoutError extends Error { checkSessionId: string; constructor(checkSessionId: string); } declare class CheckSessions { api: AxiosInstance; constructor(api: AxiosInstance); trigger(payload: TriggerCheckSessionsRequest): Promise; getCompletion(id: string, maxWaitSeconds?: number): Promise; pollUntilComplete(id: string, deadlineAt?: number): Promise; } export default CheckSessions;