import { z } from 'zod';
import { APIClient } from '../api.ts';
export declare const FileToWriteSchema: z.ZodObject<{
    path: z.ZodString;
    content: z.ZodString;
}, z.core.$strip>;
export declare const WriteFilesRequestSchema: z.ZodObject<{
    files: z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        content: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
export declare const WriteFilesDataSchema: z.ZodObject<{
    filesWritten: z.ZodNumber;
}, z.core.$strip>;
export declare const WriteFilesResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    success: z.ZodLiteral<false>;
    message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    success: z.ZodLiteral<true>;
    data: z.ZodOptional<z.ZodObject<{
        filesWritten: z.ZodNumber;
    }, z.core.$strip>>;
    filesWritten: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>], "success">;
export declare const WriteFilesParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    files: z.ZodArray<z.ZodCustom<{
        path: string;
        content: Buffer<ArrayBufferLike>;
    }, {
        path: string;
        content: Buffer<ArrayBufferLike>;
    }>>;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type WriteFilesParams = z.infer<typeof WriteFilesParamsSchema>;
export type WriteFilesResult = z.infer<typeof WriteFilesDataSchema>;
/**
 * Writes files to a sandbox workspace.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID and files to write
 * @returns The result including number of files written
 * @throws {SandboxResponseError} If the write request fails
 */
export declare function sandboxWriteFiles(client: APIClient, params: WriteFilesParams): Promise<WriteFilesResult>;
export declare const ReadFileParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    path: z.ZodString;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type ReadFileParams = z.infer<typeof ReadFileParamsSchema>;
/**
 * Reads a file from a sandbox workspace.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID and file path
 * @returns A ReadableStream of the file contents
 * @throws {SandboxResponseError} If the read request fails
 */
export declare function sandboxReadFile(client: APIClient, params: ReadFileParams): Promise<ReadableStream<Uint8Array>>;
export declare const MkDirRequestSchema: z.ZodObject<{
    path: z.ZodString;
    recursive: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const MkDirResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    success: z.ZodLiteral<false>;
    message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    success: z.ZodLiteral<true>;
}, z.core.$strip>], "success">;
export declare const MkDirParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    path: z.ZodString;
    recursive: z.ZodOptional<z.ZodBoolean>;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type MkDirParams = z.infer<typeof MkDirParamsSchema>;
/**
 * Creates a directory in a sandbox workspace.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID, path, and recursive flag
 * @throws {SandboxResponseError} If the mkdir request fails
 */
export declare function sandboxMkDir(client: APIClient, params: MkDirParams): Promise<void>;
export declare const RmDirRequestSchema: z.ZodObject<{
    path: z.ZodString;
    recursive: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const RmDirResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    success: z.ZodLiteral<false>;
    message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    success: z.ZodLiteral<true>;
    found: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, z.core.$strip>], "success">;
export declare const RmDirParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    path: z.ZodString;
    recursive: z.ZodOptional<z.ZodBoolean>;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type RmDirParams = z.infer<typeof RmDirParamsSchema>;
/**
 * Removes a directory from a sandbox workspace.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID, path, and recursive flag
 * @returns Object with `found` indicating whether the directory existed before removal
 * @throws {SandboxResponseError} If the rmdir request fails
 */
export declare function sandboxRmDir(client: APIClient, params: RmDirParams): Promise<{
    found: boolean;
}>;
export declare const RmFileRequestSchema: z.ZodObject<{
    path: z.ZodString;
}, z.core.$strip>;
export declare const RmFileResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    success: z.ZodLiteral<false>;
    message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    success: z.ZodLiteral<true>;
    found: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, z.core.$strip>], "success">;
export declare const RmFileParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    path: z.ZodString;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type RmFileParams = z.infer<typeof RmFileParamsSchema>;
/**
 * Removes a file from a sandbox workspace.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID and path
 * @returns Object with `found` indicating whether the file existed before removal
 * @throws {SandboxResponseError} If the rm request fails
 */
export declare function sandboxRmFile(client: APIClient, params: RmFileParams): Promise<{
    found: boolean;
}>;
export declare const FileInfoSchema: z.ZodObject<{
    path: z.ZodString;
    size: z.ZodNumber;
    isDir: z.ZodBoolean;
    isSymlink: z.ZodOptional<z.ZodBoolean>;
    linkTarget: z.ZodOptional<z.ZodString>;
    mode: z.ZodString;
    modTime: z.ZodString;
}, z.core.$strip>;
export declare const ListFilesDataSchema: z.ZodObject<{
    files: z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        size: z.ZodNumber;
        isDir: z.ZodBoolean;
        isSymlink: z.ZodOptional<z.ZodBoolean>;
        linkTarget: z.ZodOptional<z.ZodString>;
        mode: z.ZodString;
        modTime: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
export declare const ListFilesResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    success: z.ZodLiteral<false>;
    message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    success: z.ZodLiteral<true>;
    data: z.ZodObject<{
        files: z.ZodArray<z.ZodObject<{
            path: z.ZodString;
            size: z.ZodNumber;
            isDir: z.ZodBoolean;
            isSymlink: z.ZodOptional<z.ZodBoolean>;
            linkTarget: z.ZodOptional<z.ZodString>;
            mode: z.ZodString;
            modTime: z.ZodString;
        }, z.core.$strip>>;
    }, z.core.$strip>;
}, z.core.$strip>], "success">;
export type FileInfo = z.infer<typeof FileInfoSchema>;
export declare const ListFilesParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    path: z.ZodOptional<z.ZodString>;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type ListFilesParams = z.infer<typeof ListFilesParamsSchema>;
export type ListFilesResult = z.infer<typeof ListFilesDataSchema>;
/**
 * Lists files in a sandbox workspace directory.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID and optional path
 * @returns The list of files and directories
 * @throws {SandboxResponseError} If the list request fails
 */
export declare function sandboxListFiles(client: APIClient, params: ListFilesParams): Promise<ListFilesResult>;
export type ArchiveFormat = 'zip' | 'tar.gz';
export declare const DownloadArchiveParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    path: z.ZodOptional<z.ZodString>;
    format: z.ZodOptional<z.ZodEnum<{
        zip: "zip";
        "tar.gz": "tar.gz";
    }>>;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type DownloadArchiveParams = z.infer<typeof DownloadArchiveParamsSchema>;
/**
 * Downloads files from a sandbox as a compressed archive.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID, path, and format
 * @returns A ReadableStream of the archive contents
 * @throws {SandboxResponseError} If the download request fails
 */
export declare function sandboxDownloadArchive(client: APIClient, params: DownloadArchiveParams): Promise<ReadableStream<Uint8Array>>;
export declare const UploadArchiveParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    archive: z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<ArrayBuffer, ArrayBuffer>, z.ZodCustom<ReadableStream<Uint8Array<ArrayBufferLike>>, ReadableStream<Uint8Array<ArrayBufferLike>>>]>;
    path: z.ZodOptional<z.ZodString>;
    format: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
        zip: "zip";
        "tar.gz": "tar.gz";
    }>, z.ZodLiteral<"">]>>;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type UploadArchiveParams = z.infer<typeof UploadArchiveParamsSchema>;
export declare const UploadArchiveResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    success: z.ZodLiteral<false>;
    message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    success: z.ZodLiteral<true>;
}, z.core.$strip>], "success">;
/**
 * Uploads a compressed archive to a sandbox and extracts it.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID, archive data, path, and optional format
 * @throws {SandboxResponseError} If the upload request fails
 */
export declare function sandboxUploadArchive(client: APIClient, params: UploadArchiveParams): Promise<void>;
export declare const SetEnvRequestSchema: z.ZodObject<{
    env: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
export declare const SetEnvDataSchema: z.ZodObject<{
    env: z.ZodRecord<z.ZodString, z.ZodString>;
}, z.core.$strip>;
export declare const SetEnvResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    success: z.ZodLiteral<false>;
    message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    success: z.ZodLiteral<true>;
    data: z.ZodObject<{
        env: z.ZodRecord<z.ZodString, z.ZodString>;
    }, z.core.$strip>;
}, z.core.$strip>], "success">;
export declare const SetEnvParamsSchema: z.ZodObject<{
    sandboxId: z.ZodString;
    env: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
    orgId: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
}, z.core.$strip>;
export type SetEnvParams = z.infer<typeof SetEnvParamsSchema>;
export type SetEnvResult = z.infer<typeof SetEnvDataSchema>;
/**
 * Sets environment variables on a sandbox. Pass null to delete a variable.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including sandbox ID and env key/value pairs
 * @returns The current environment variables after the update
 * @throws {SandboxResponseError} If the request fails
 */
export declare function sandboxSetEnv(client: APIClient, params: SetEnvParams): Promise<SetEnvResult>;
//# sourceMappingURL=files.d.ts.map