@grasplabs/grasp
Version:
TypeScript SDK for browser automation and secure command execution in highly available and scalable cloud browser environments
39 lines • 1.33 kB
TypeScript
import { ICDPConnection } from '../services/browser.service';
import { ISandboxConfig, IBrowserConfig } from '../types';
type TLaunchOptions = Partial<ISandboxConfig> & Partial<IBrowserConfig> & {
adblock?: boolean;
type?: 'chrome-stable' | 'chromium';
logLevel?: 'debug' | 'info' | 'warn' | 'error';
keepAliveMS?: number;
liveview?: boolean;
};
declare const servers: Record<string, GraspServer>;
export declare class GraspServer {
private browserService;
private logger;
private config;
private browserConfig;
private browserType;
constructor(sandboxConfig?: TLaunchOptions);
get sandbox(): import("..").SandboxService | undefined;
/**
* Gets current sandbox status
* @returns Sandbox status
*/
getStatus(): import("../types").SandboxStatus | undefined;
/**
* Gets sandbox ID
* @returns Sandbox ID or null
*/
getSandboxId(): string | null | undefined;
connectBrowserTask(sandboxId: string): Promise<ICDPConnection>;
getCDPConnection(): ICDPConnection | null | undefined;
createBrowserTask(): Promise<ICDPConnection>;
/**
* Cleanup resources
* @returns Promise that resolves when cleanup is complete
*/
cleanup(): Promise<void>;
}
export { servers, TLaunchOptions };
//# sourceMappingURL=server.d.ts.map