@codesandbox/sdk
Version:
The CodeSandbox SDK
34 lines (33 loc) • 1.49 kB
TypeScript
import { Client } from "../api-clients/pint/client";
import { IAgentClientShells } from "../agent-client-interface";
import { ShellSize, ShellProcessType, OpenShellDTO, CommandShellDTO, ShellId, TerminalShellDTO, ShellDTO } from "../pitcher-protocol/messages/shell";
export declare class PintShellsClient implements IAgentClientShells {
private apiClient;
private sandboxId;
private openShells;
private subscribeAndEvaluateExecsUpdates;
private onShellExitedEmitter;
onShellExited: import("../utils/event").Event<{
shellId: string;
exitCode: number;
}>;
private onShellOutEmitter;
onShellOut: import("../utils/event").Event<{
shellId: ShellId;
out: string;
}>;
private onShellTerminatedEmitter;
onShellTerminated: import("../utils/event").Event<{
shellId: string;
author: string;
}>;
constructor(apiClient: Client, sandboxId: string);
private convertExecToShellDTO;
create(projectPath: string, size: ShellSize, command?: string, type?: ShellProcessType, isSystemShell?: boolean): Promise<OpenShellDTO>;
delete(shellId: ShellId): Promise<CommandShellDTO | TerminalShellDTO | null>;
getShells(): Promise<ShellDTO[]>;
open(shellId: ShellId, size: ShellSize): Promise<OpenShellDTO>;
rename(shellId: ShellId, name: string): Promise<null>;
restart(shellId: ShellId): Promise<null>;
send(shellId: ShellId, input: string, size: ShellSize): Promise<null>;
}