/**
 * This file was auto-generated by Fern from our API Definition.
 */
/// <reference types="node" />
import * as core from "../../../../core";
import { OpenAI } from "../../../..";
import * as fs from "fs";
export declare namespace File_ {
    interface Options {
        token: core.Supplier<core.BearerToken>;
        organization?: core.Supplier<string | undefined>;
        fetcher?: core.FetchFunction;
        streamingFetcher?: core.StreamingFetchFunction;
    }
}
export declare class File_ {
    private readonly options;
    constructor(options: File_.Options);
    /**
     * Returns a list of files that belong to the user's organization.
     * @throws {OpenAI.UnauthorizedError}
     * @throws {OpenAI.RateLimitError}
     * @throws {OpenAI.InternalServerError}
     */
    list(): Promise<OpenAI.ListFilesResponse>;
    /**
     * Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
     *
     * @throws {OpenAI.UnauthorizedError}
     * @throws {OpenAI.RateLimitError}
     * @throws {OpenAI.InternalServerError}
     */
    upload(file: File | fs.ReadStream, request: OpenAI.UploadFileRequest): Promise<OpenAI.OpenAiFile>;
    /**
     * Returns information about a specific file.
     * @throws {OpenAI.UnauthorizedError}
     * @throws {OpenAI.RateLimitError}
     * @throws {OpenAI.InternalServerError}
     */
    retrieve(fileId: OpenAI.FileId): Promise<OpenAI.OpenAiFile>;
    /**
     * Delete a file.
     * @throws {OpenAI.UnauthorizedError}
     * @throws {OpenAI.RateLimitError}
     * @throws {OpenAI.InternalServerError}
     */
    delete(fileId: OpenAI.FileId): Promise<OpenAI.DeleteFileResponse>;
    /**
     * Returns the contents of the specified file
     * @throws {OpenAI.UnauthorizedError}
     * @throws {OpenAI.RateLimitError}
     * @throws {OpenAI.InternalServerError}
     */
    download(fileId: OpenAI.FileId): Promise<string>;
    private _getAuthorizationHeader;
}
