import { PitcherManagerResponse } from "@codesandbox/pitcher-client";
import { type SessionCreateOptions, type SandboxBrowserSession } from "./types";
import { Client } from "@hey-api/client-fetch";
import { VMTier } from "./VMTier";
import { WebSocketSession } from "./sessions/WebSocketSession";
import { RestSession } from "./sessions/RestSession";
export declare class Sandbox {
    id: string;
    private apiClient;
    private pitcherManagerResponse;
    /**
     * How the Sandbox booted up:
     * - RUNNING: Already running
     * - RESUME: Resumes from hibernation
     * - CLEAN: Clean bootup, no hibernation snapshot or shutdown
     * - FORK: When the sandbox was created from a template
     */
    get bootupType(): "RUNNING" | "CLEAN" | "RESUME" | "FORK";
    /**
     * The cluster the Sandbox is running on.
     */
    get cluster(): string;
    /**
     * Whether the Sandbox Agent version is up to date. Use "restart" to
     * update the agent.
     */
    get isUpToDate(): boolean;
    private get globalSession();
    constructor(id: string, apiClient: Client, pitcherManagerResponse: PitcherManagerResponse);
    /**
     * Updates the specs that this sandbox runs on. It will dynamically scale the sandbox to the
     * new specs without a reboot. Be careful when scaling specs down, if the VM is using more memory
     * than it can scale down to, it can become very slow.
     */
    updateTier(tier: VMTier): Promise<void>;
    /**
     * Updates the hibernation timeout for this sandbox. This is the amount of seconds the sandbox
     * will be kept alive without activity before it is automatically hibernated. Activity can be sessions or interactions with any endpoints exposed by the Sandbox.
     */
    updateHibernationTimeout(timeoutSeconds: number): Promise<void>;
    private createSession;
    /**
     * Connects to the Sandbox using a WebSocket connection, allowing you to interact with it. You can pass a custom session to connect to a specific user workspace, controlling permissions, git credentials and environment variables.
     */
    connect(customSession?: SessionCreateOptions): Promise<WebSocketSession>;
    /**
     * Returns a REST API client connected to this Sandbox, allowing you to interact with it. You can pass a custom session to connect to a specific user workspace, controlling permissions, git credentials and environment variables.
     */
    createRestSession(customSession?: SessionCreateOptions): Promise<RestSession>;
    /**
     * Returns a browser session connected to this Sandbox, allowing you to interact with it. You can pass a custom session to connect to a specific user workspace, controlling permissions, git credentials and environment variables.
     */
    createBrowserSession(customSession?: SessionCreateOptions): Promise<SandboxBrowserSession>;
}
