import S3 from "aws-sdk/clients/s3.js";
import { Benchmark } from "../types.js";
import { HistoryProviderType, IHistoryProvider } from "./provider.js";
export type S3Config = Pick<S3.Types.ClientConfiguration, "accessKeyId" | "secretAccessKey" | "region" | "endpoint"> & {
    Bucket: string;
    keyPrefix: string;
};
export declare class S3HistoryProvider implements IHistoryProvider {
    private readonly config;
    readonly type = HistoryProviderType.S3;
    private s3;
    constructor(config: S3Config);
    /**
     * Automatically loads credentials from ENV
     *
     * Custom ENVs
     *
     * S3_ACCESS_KEY
     * S3_SECRET_KEY
     * S3_REGION (optional)
     * S3_ENDPOINT (optional)
     *
     * AWS ENVs
     *
     * AWS_ACCESS_KEY_ID
     * AWS_SECRET_ACCESS_KEY
     * AWS_SESSION_TOKEN (optional)
     *
     * https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html
     */
    static fromEnv(): S3HistoryProvider;
    providerInfo(): string;
    readLatestInBranch(branch: string): Promise<Benchmark | null>;
    writeLatestInBranch(branch: string, benchmark: Benchmark): Promise<void>;
    readHistory(maxItems?: number): Promise<Benchmark[]>;
    readHistoryCommit(commitSha: string): Promise<Benchmark | null>;
    writeToHistory(benchmark: Benchmark): Promise<void>;
    private readBenchFileIfExists;
    private readBenchFile;
    /** Write result to CSV + metadata as Embedded Metadata */
    private writeBenchFile;
    private getLatestInBranchKey;
    private getHistoryCommitKey;
    private getHistoryDir;
}
//# sourceMappingURL=s3.d.ts.map