/**
 * This file was auto-generated by Fern from our API Definition.
 */
import * as environments from "../../../../../../environments";
import * as core from "../../../../../../core";
import * as Merge from "../../../../../index";
import * as stream from "stream";
export declare namespace Files {
    interface Options {
        environment?: core.Supplier<environments.MergeEnvironment | string>;
        /** Specify a custom URL to connect the client to. */
        baseUrl?: core.Supplier<string>;
        apiKey: core.Supplier<core.BearerToken>;
        /** Override the X-Account-Token header */
        accountToken?: core.Supplier<string | undefined>;
        /** Additional headers to include in requests. */
        headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
        fetcher?: core.FetchFunction;
    }
    interface RequestOptions {
        /** The maximum time to wait for a response in seconds. */
        timeoutInSeconds?: number;
        /** The number of times to retry the request. Defaults to 2. */
        maxRetries?: number;
        /** A hook to abort the request. */
        abortSignal?: AbortSignal;
        /** Override the X-Account-Token header */
        accountToken?: string | undefined;
        /** Additional query string parameters to include in the request. */
        queryParams?: Record<string, unknown>;
        /** Additional headers to include in the request. */
        headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
    }
}
export declare class Files {
    protected readonly _options: Files.Options;
    constructor(_options: Files.Options);
    /**
     * Returns a list of `File` objects.
     *
     * @param {Merge.filestorage.FilesListRequest} request
     * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.filestorage.files.list({
     *         cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"
     *     })
     */
    list(request?: Merge.filestorage.FilesListRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Merge.filestorage.PaginatedFileList>;
    private __list;
    /**
     * Creates a `File` object with the given values.
     *
     * @param {Merge.filestorage.FileStorageFileEndpointRequest} request
     * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.filestorage.files.create({
     *         model: {}
     *     })
     */
    create(request: Merge.filestorage.FileStorageFileEndpointRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Merge.filestorage.FileStorageFileResponse>;
    private __create;
    /**
     * Returns a `File` object with the given `id`.
     *
     * @param {string} id
     * @param {Merge.filestorage.FilesRetrieveRequest} request
     * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.filestorage.files.retrieve("id")
     */
    retrieve(id: string, request?: Merge.filestorage.FilesRetrieveRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Merge.filestorage.File_>;
    private __retrieve;
    /**
     * Returns the `File` content with the given `id` as a stream of bytes.
     */
    downloadRetrieve(id: string, request?: Merge.filestorage.FilesDownloadRetrieveRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<stream.Readable>;
    private __downloadRetrieve;
    /**
     * Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party.
     *
     * @param {string} id
     * @param {Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest} request
     * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.filestorage.files.downloadRequestMetaRetrieve("id")
     */
    downloadRequestMetaRetrieve(id: string, request?: Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Merge.filestorage.DownloadRequestMeta>;
    private __downloadRequestMetaRetrieve;
    /**
     * Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party.
     *
     * @param {Merge.filestorage.FilesDownloadRequestMetaListRequest} request
     * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.filestorage.files.downloadRequestMetaList({
     *         cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"
     *     })
     */
    downloadRequestMetaList(request?: Merge.filestorage.FilesDownloadRequestMetaListRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Merge.filestorage.PaginatedDownloadRequestMetaList>;
    private __downloadRequestMetaList;
    /**
     * Returns metadata for `FileStorageFile` POSTs.
     *
     * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @example
     *     await client.filestorage.files.metaPostRetrieve()
     */
    metaPostRetrieve(requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Merge.filestorage.MetaResponse>;
    private __metaPostRetrieve;
    protected _getAuthorizationHeader(): Promise<string>;
}
