import type { S3Client } from '@aws-sdk/client-s3';
import type { PathSpec } from '../../types.ts';
import type { S3Config } from '../../resource/s3/config.ts';
export declare function s3Key(path: string, config: S3Config): string;
export declare function s3Prefix(path: string, config: S3Config): string;
export declare function stripKeyPrefix(key: string, config: S3Config): string;
export declare function rawPathOf(path: PathSpec): string;
export interface S3SendClient {
    send: (cmd: unknown) => Promise<Record<string, unknown>>;
    destroy?: () => void;
}
export declare function withClient<T>(config: S3Config, fn: (client: S3SendClient) => Promise<T>): Promise<T>;
export interface S3Module {
    S3Client: new (options: Record<string, unknown>) => S3Client;
    GetObjectCommand: new (input: Record<string, unknown>) => unknown;
    HeadObjectCommand: new (input: Record<string, unknown>) => unknown;
    ListObjectsV2Command: new (input: Record<string, unknown>) => unknown;
    PutObjectCommand: new (input: Record<string, unknown>) => unknown;
    DeleteObjectCommand: new (input: Record<string, unknown>) => unknown;
    DeleteObjectsCommand: new (input: Record<string, unknown>) => unknown;
    CopyObjectCommand: new (input: Record<string, unknown>) => unknown;
}
/**
 * Load the S3 "command module" (GetObjectCommand etc.). When `config`
 * has a presignedUrlProvider — the browser runtime path — skip the AWS
 * SDK entirely and return a set of tagged data-only shim classes that
 * the browser-side client knows how to dispatch via fetch().
 *
 * Mirrors Python's `async_session(config)` abstraction: one seam,
 * two implementations (boto3 vs. presigner+fetch), same call surface.
 */
export declare function loadS3Module(config?: S3Config): Promise<S3Module>;
export declare function createS3Client(config: S3Config): Promise<S3Client>;
export declare function isNotFoundError(err: unknown): boolean;
export declare function streamToBuffer(stream: unknown): Promise<Uint8Array>;
//# sourceMappingURL=client.d.ts.map