import { type ImageCacheHandler } from '../data.js'; export interface S3CacheOptions { region: string; bucket: string; prefix?: string; accessKeyId?: string; secretAccessKey?: string; endpoint?: string; forcePathStyle?: boolean; useRedirects?: boolean; } export declare class S3Cache implements ImageCacheHandler { useRedirects: boolean; private client; private bucket; private prefix; private clientInitPromise; private isInitialized; private endpoint; private forcePathStyle; constructor(options: S3CacheOptions); getKey(hash: string): Promise<{ value: NodeJS.ReadableStream | Buffer | null; ttl?: number; }>; setKey(hash: string, value: NodeJS.ReadableStream | Buffer, ttl?: number, contentType?: string): Promise; delKey(hash: string): Promise; getPublicUrl(hash: string): Promise<{ url: string | null; ttl?: number; }>; private checkIfFileExists; private initClient; private getObjectKey; private ensureClient; } /** * Creates an S3 cache adapter for image optimization * Note: You must install @aws-sdk/client-s3 package to use this adapter * * @example * ```ts * import { createS3Cache } from 'sveltekit-image-optimize/cache-adapters/s3'; * * const cache = createS3Cache({ * region: 'us-east-1', * bucket: 'my-image-cache', * prefix: 'images', // optional * accessKeyId: 'YOUR_ACCESS_KEY', // optional, can use AWS environment variables * secretAccessKey: 'YOUR_SECRET_KEY', // optional, can use AWS environment variables * endpoint: 'https://custom-endpoint.com', // optional, for S3-compatible services * forcePathStyle: true // optional, for S3-compatible services * }); * ``` */ export default function createS3Cache(options: S3CacheOptions): ImageCacheHandler;