import { APIResource } from "../../../../core/resource.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { PagePromise, TokenPage, type TokenPageParams } from "../../../../core/pagination.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class Files extends APIResource {
    /**
     * Copies inline bytes or a Files API file into a connected execution environment.
     * See
     * [environment files](https://developers.openai.com/api/docs/guides/agents-api/environments/files).
     *
     * @example
     * ```ts
     * const environmentFile =
     *   await client.beta.agents.environments.files.create(
     *     'environment_id',
     *     {
     *       type: 'inline',
     *       path: '/workspace/example.txt',
     *       data: 'SGVsbG8K',
     *     },
     *   );
     * ```
     */
    create(environmentID: string, body: FileCreateParams, options?: RequestOptions): APIPromise<EnvironmentFile>;
    /**
     * Lists live files on a connected execution environment with optional directory
     * filtering and opaque cursor pagination. See
     * [environment files](https://developers.openai.com/api/docs/guides/agents-api/environments/files).
     *
     * @example
     * ```ts
     * // Automatically fetches more pages as needed.
     * for await (const environmentFile of client.beta.agents.environments.files.list(
     *   'environment_id',
     * )) {
     *   // ...
     * }
     * ```
     */
    list(environmentID: string, query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<EnvironmentFilesPage, EnvironmentFile>;
}
export type EnvironmentFilesPage = TokenPage<EnvironmentFile>;
/**
 * A live file in an execution environment.
 */
export interface EnvironmentFile {
    /**
     * The ID of the environment containing this file.
     */
    environment_id: string;
    /**
     * The object type. Always `agent.environment.file`.
     */
    object: 'agent.environment.file';
    /**
     * The absolute file path inside the environment's workspace.
     */
    path: string;
    /**
     * The file size in bytes.
     */
    size_bytes: number;
}
export type FileCreateParams = FileCreateParams.HostedEnvironmentFileParamFileID | FileCreateParams.HostedEnvironmentFileParamInline;
export declare namespace FileCreateParams {
    interface HostedEnvironmentFileParamFileID {
        /**
         * The ID of the uploaded file.
         */
        file_id: string;
        /**
         * The absolute destination path inside `/workspace`.
         */
        path: string;
        /**
         * The type of the object. Always `file_id`.
         */
        type: 'file_id';
    }
    interface HostedEnvironmentFileParamInline {
        /**
         * The standard-base64-encoded file contents.
         */
        data: string;
        /**
         * The absolute destination path inside `/workspace`.
         */
        path: string;
        /**
         * The type of the object. Always `inline`.
         */
        type: 'inline';
    }
}
export interface FileListParams extends Omit<TokenPageParams, 'limit'> {
    /**
     * The maximum number of files to return, between 1 and 100.
     */
    limit?: number | null;
    /**
     * Sort by case-sensitive path components. Defaults to descending.
     *
     * - `asc` - Returns resources in ascending order.
     * - `desc` - Returns resources in descending order.
     */
    order?: 'asc' | 'desc';
    /**
     * Restrict the listing to this absolute workspace directory.
     */
    path?: string | null;
}
export declare namespace Files {
    export { type EnvironmentFile as EnvironmentFile, type EnvironmentFilesPage as EnvironmentFilesPage, type FileCreateParams as FileCreateParams, type FileListParams as FileListParams, };
}
//# sourceMappingURL=files.d.ts.map