/**
 * Cloud Storage Abstraction
 *
 * Provides a unified interface for different cloud storage providers.
 */
import type { CloudConfig } from './types.js';
export interface StorageObject {
    key: string;
    size: number;
    lastModified: Date;
    etag?: string;
    metadata?: Record<string, string>;
}
export interface ListOptions {
    prefix?: string;
    maxKeys?: number;
    continuationToken?: string;
}
export interface ListResult {
    objects: StorageObject[];
    truncated: boolean;
    continuationToken?: string;
}
export declare abstract class CloudStorage {
    protected config: CloudConfig;
    protected encryptionKey?: Buffer;
    constructor(config: CloudConfig);
    /**
     * Derive encryption key from passphrase
     */
    protected deriveKey(passphrase: string): Buffer;
    /**
     * Encrypt data
     */
    protected encrypt(data: Buffer): Buffer;
    /**
     * Decrypt data
     */
    protected decrypt(data: Buffer): Buffer;
    /**
     * Generate checksum
     */
    protected checksum(data: Buffer): string;
    /**
     * Get full object key with prefix
     */
    protected getFullKey(key: string): string;
    abstract upload(key: string, data: Buffer, metadata?: Record<string, string>): Promise<void>;
    abstract download(key: string): Promise<Buffer>;
    abstract delete(key: string): Promise<void>;
    abstract list(options?: ListOptions): Promise<ListResult>;
    abstract exists(key: string): Promise<boolean>;
    abstract getMetadata(key: string): Promise<StorageObject | null>;
}
export declare class LocalStorage extends CloudStorage {
    private basePath;
    constructor(config: CloudConfig);
    private getLocalPath;
    upload(key: string, data: Buffer, metadata?: Record<string, string>): Promise<void>;
    download(key: string): Promise<Buffer>;
    delete(key: string): Promise<void>;
    list(options?: ListOptions): Promise<ListResult>;
    private listRecursive;
    exists(key: string): Promise<boolean>;
    getMetadata(key: string): Promise<StorageObject | null>;
}
export declare class S3Storage extends CloudStorage {
    upload(key: string, data: Buffer, _metadata?: Record<string, string>): Promise<void>;
    download(key: string): Promise<Buffer>;
    delete(key: string): Promise<void>;
    list(options?: ListOptions): Promise<ListResult>;
    exists(key: string): Promise<boolean>;
    getMetadata(key: string): Promise<StorageObject | null>;
}
export declare function createCloudStorage(config: CloudConfig): CloudStorage;
