/**
 * @fileoverview Implements the IStorageProvider interface for Cloudflare R2.
 *
 * Performance note: TTL filtering in list operations is not applied at the R2 API level.
 * Expired entries are only removed on get operations. For large datasets, consider
 * implementing periodic cleanup jobs to remove expired entries.
 *
 * @module src/storage/providers/cloudflare/r2Provider
 */
import type { R2Bucket } from '@cloudflare/workers-types';
import type { IStorageProvider, ListOptions, ListResult, StorageOptions } from '../../../storage/core/IStorageProvider.js';
import type { RequestContext } from '../../../utils/internal/requestContext.js';
export declare class R2Provider implements IStorageProvider {
    private readonly bucket;
    constructor(bucket: R2Bucket);
    private getR2Key;
    private buildEnvelope;
    private parseAndValidate;
    get<T>(tenantId: string, key: string, context: RequestContext): Promise<T | null>;
    set(tenantId: string, key: string, value: unknown, context: RequestContext, options?: StorageOptions): Promise<void>;
    /**
     * Deletes a key from the R2 bucket.
     *
     * Note: R2 `delete()` is idempotent and does not report whether the key
     * existed. This method always returns `true` on success — a backend
     * limitation, not a bug. A pre-delete `head()` would add latency and
     * still be racy under eventual consistency.
     */
    delete(tenantId: string, key: string, context: RequestContext): Promise<boolean>;
    list(tenantId: string, prefix: string, context: RequestContext, options?: ListOptions): Promise<ListResult>;
    getMany<T>(tenantId: string, keys: string[], context: RequestContext): Promise<Map<string, T>>;
    setMany(tenantId: string, entries: Map<string, unknown>, context: RequestContext, options?: StorageOptions): Promise<void>;
    /**
     * Deletes multiple keys in a single R2 batch operation.
     *
     * Note: R2 batch delete is idempotent — it does not report which keys actually
     * existed. The returned count reflects the number of keys requested for deletion,
     * not confirmed deletions. This is a backend limitation, not a bug.
     */
    deleteMany(tenantId: string, keys: string[], context: RequestContext): Promise<number>;
    clear(tenantId: string, context: RequestContext): Promise<number>;
}
//# sourceMappingURL=r2Provider.d.ts.map