import { CLITransport } from './transport'; import { CLIContextProvider } from './context'; import { CLIE2esService } from './services/e2es'; import { CLIUsersService } from './services/users'; export interface CLIClientConfig { apiKey: string; baseUrl: string; repoPath: string; timeout?: number; } /** * Main CLI client that combines the proven backend services with CLI adaptations * This preserves all the working data structures and API patterns from the backend * while removing VSCode dependencies and complex auth */ export declare class CLIBackendClient { private transport; private contextTransport; private contextProvider; private initialized; e2es: CLIE2esService; users: CLIUsersService; constructor(config: CLIClientConfig); /** * Initialize the client and context */ initialize(): Promise; /** * Test authentication by calling a simple endpoint */ testAuthentication(): Promise<{ success: boolean; user?: any; error?: string; }>; /** * Get context provider for direct access */ getContextProvider(): CLIContextProvider; /** * Get transport for direct access if needed */ getTransport(): CLITransport; /** * Update API key */ updateApiKey(apiKey: string): void; /** * Check if client is initialized */ isInitialized(): boolean; /** * Get current context information */ getContext(): import("./context").CLIContext; /** * Ensure client is initialized before operations */ private ensureInitialized; /** * High-level method to create commit test suite * This matches the functionality expected by E2EManager */ createCommitTestSuite(request: { type?: 'pull_request' | 'commit'; repoName: string; repoPath: string; branchName?: string; branch?: string; commitHash?: string; workingChanges?: Array<{ status: string; file: string; diff?: string; absPath?: string; }>; testDescription: string; key?: string; tunnelKey?: string; publicUrl?: string; testEnvironment?: { url: string; type: 'ngrok_tunnel' | 'direct' | 'localhost'; port?: number; metadata?: Record; }; tunnelUrl?: string; tunnelMetadata?: Record; context?: Record; prNumber?: number; }): Promise<{ success: boolean; testSuiteUuid?: string; tunnelKey?: string; error?: string; }>; /** * High-level method to get commit test suite status */ getCommitTestSuiteStatus(suiteUuid: string): Promise; /** * High-level method to wait for commit test suite completion */ waitForCommitTestSuiteCompletion(suiteUuid: string, options?: { maxWaitTime?: number; pollInterval?: number; onProgress?: (suite: any) => void; }): Promise; /** * Download artifact (for test scripts, recordings, etc.) * Uses the proven redirect handling logic from the IDE */ downloadArtifact(url: string, originalBaseUrl?: string): Promise; /** * Download artifact directly to file (more efficient for large files) * Uses the proven redirect handling logic from the IDE */ downloadArtifactToFile(url: string, filePath: string, originalBaseUrl?: string): Promise; /** * Create tunnel token for a test suite * This gets an ngrok auth token from the backend for the given test suite */ createTunnelToken(suiteUuid: string, subdomain: string): Promise<{ token: string; subdomain: string; }>; /** * Update commit test suite with tunnel information */ updateCommitTestSuite(suiteUuid: string, updates: { publicUrl?: string; testEnvironment?: { url: string; type: string; }; }): Promise; } //# sourceMappingURL=client.d.ts.map