import { type CopyObjectResponse } from "./copy_object.js";
import { type GetObjectResponse } from "./get_object.js";
import { type HeadObjectResponse } from "./head_object.js";
import { type ListObjectsResponse, type ListParams } from "./list_objects.js";
export declare const metadataPrefix = "x-amz-meta-";
export type HttpRequest = {
    method: string;
    url: string;
    headers: Headers;
    body: Uint8Array | null;
    signal?: AbortSignal;
};
export type HttpResponse = {
    status: number;
    headers: Headers;
    body: Body;
    request?: HttpRequest;
};
export interface Body {
    read(size?: number): Uint8Array | null;
    readAll(): Uint8Array;
    close(): void;
}
export declare class BytesBody implements Body {
    #private;
    constructor(buffer: Uint8Array);
    read(size?: number): Uint8Array | null;
    readAll(): Uint8Array;
    close(): void;
}
export interface HTTPClient {
    Do(req: HttpRequest): Promise<HttpResponse>;
}
export declare class S3 {
    Client: HTTPClient | null;
    Bucket: string;
    Region: string;
    Endpoint: string;
    AccessKey: string;
    SecretKey: string;
    UsePathStyle: boolean;
    URL(path: string): string;
    SignAndSend(req: HttpRequest): Promise<HttpResponse>;
    ListObjects(ctx: AbortSignal | null, params: ListParams, ...optReqFuncs: Array<(req: HttpRequest) => void>): Promise<ListObjectsResponse>;
    GetObject(ctx: AbortSignal | null, key: string, ...optReqFuncs: Array<(req: HttpRequest) => void>): Promise<GetObjectResponse>;
    HeadObject(ctx: AbortSignal | null, key: string, ...optReqFuncs: Array<(req: HttpRequest) => void>): Promise<HeadObjectResponse>;
    CopyObject(ctx: AbortSignal | null, srcKey: string, dstKey: string, ...optReqFuncs: Array<(req: HttpRequest) => void>): Promise<CopyObjectResponse>;
    DeleteObject(ctx: AbortSignal | null, key: string, ...optReqFuncs: Array<(req: HttpRequest) => void>): Promise<void>;
    private sign;
}
export declare function newRequest(ctx: AbortSignal | null, method: string, url: string, body: Uint8Array | null): HttpRequest;
export declare function extractMetadata(headers: Headers): Record<string, string>;
export declare function escapeQuery(values: URLSearchParams): string;
export declare function escapePath(path: string): string;
export type { CopyObjectResponse } from "./copy_object.js";
export { ResponseError } from "./error.js";
export type { GetObjectResponse } from "./get_object.js";
export type { HeadObjectResponse } from "./head_object.js";
export type { ListObjectCommonPrefix, ListObjectContent, ListObjectsResponse, ListParams } from "./list_objects.js";
export { Uploader } from "./uploader.js";
