import type { Client } from "@hey-api/client-fetch";
import { Sandbox } from "./Sandbox";
import { CreateSandboxOpts, PaginationOpts, SandboxListOpts, SandboxListResponse, StartSandboxOpts } from "./types";
import { PitcherManagerResponse } from "@codesandbox/pitcher-client";
export declare function startVm(apiClient: Client, sandboxId: string, startOpts?: StartSandboxOpts): Promise<PitcherManagerResponse>;
/**
 * This class provides methods for creating and managing sandboxes.
 */
export declare class Sandboxes {
    private apiClient;
    get defaultTemplateId(): string;
    constructor(apiClient: Client);
    private createGitSandbox;
    private createTemplateSandbox;
    /**
     * Resume a sandbox.
     *
     * - Hibernated with snapshot: It wakes up and continues within 2-3 seconds
     * - Hibernated with expired snapshot: It will start from scratch (CLEAN bootup)
     * - Shutdown: It will start from scratch (CLEAN bootup)
     *
     * Note! On CLEAN bootups the setup will run again. When hibernated a new snapshot will be created.
     */
    resume(sandboxId: string): Promise<Sandbox>;
    /**
     * Shuts down a sandbox. Files will be saved, and the sandbox will be stopped.
     */
    shutdown(sandboxId: string): Promise<void>;
    /**
     * Forks a sandbox. This will create a new sandbox from the given sandbox.
     */
    fork(sandboxId: string, opts?: StartSandboxOpts): Promise<Sandbox>;
    /**
     * Restart the sandbox. This will shutdown the sandbox, and then start it again. Files in
     * the project directory (`/project/sandbox`) will be preserved.
     *
     * Will resolve once the sandbox is restarted with its setup running.
     */
    restart(sandboxId: string, opts?: StartSandboxOpts): Promise<Sandbox>;
    /**
     * Hibernates a sandbox. Files will be saved, and the sandbox will be put to sleep. Next time
     * you resume the sandbox it will continue from the last state it was in.
     */
    hibernate(sandboxId: string): Promise<void>;
    /**
     * Create a sandbox from a template or git repository. By default we will create a sandbox from the default template.
     */
    create(opts?: CreateSandboxOpts & StartSandboxOpts): Promise<Sandbox>;
    /**
     * List sandboxes from the current workspace with optional filters.
     *
     * This method supports two modes of operation:
     * 1. Simple limit-based fetching (default):
     *    ```ts
     *    // Get up to 50 sandboxes (default)
     *    const { sandboxes, totalCount } = await client.list();
     *
     *    // Get up to 200 sandboxes
     *    const { sandboxes, totalCount } = await client.list({ limit: 200 });
     *    ```
     *
     * 2. Manual pagination:
     *    ```ts
     *    // Get first page
     *    const { sandboxes, pagination } = await client.list({
     *      pagination: { page: 1, pageSize: 50 }
     *    });
     *    // pagination = { currentPage: 1, nextPage: 2, pageSize: 50 }
     *
     *    // Get next page if available
     *    if (pagination.nextPage) {
     *      const { sandboxes, pagination: nextPagination } = await client.list({
     *        pagination: { page: pagination.nextPage, pageSize: 50 }
     *      });
     *    }
     *    ```
     */
    list(opts?: SandboxListOpts & {
        limit?: number;
        pagination?: PaginationOpts;
    }): Promise<SandboxListResponse>;
}
