export type StorageProvider = "r2" | "s3"; interface R2Credentials { provider: "r2"; accountId: string; accessKeyId: string; secretAccessKey: string; } interface S3Credentials { provider: "s3"; region: string; accessKeyId: string; secretAccessKey: string; } interface S3IamCredentials { provider: "s3-iam"; region: string; } /** @deprecated Legacy R2 credentials format without explicit provider */ interface LegacyR2Credentials { provider?: undefined; accountId: string; accessKeyId: string; secretAccessKey: string; } export type StorageCredentials = R2Credentials | S3Credentials | S3IamCredentials; interface BaseConfig { bucket: string; } type R2BaseConfig = BaseConfig & R2Credentials; type S3BaseConfig = BaseConfig & S3Credentials; type S3IamBaseConfig = BaseConfig & S3IamCredentials; type LegacyR2BaseConfig = BaseConfig & LegacyR2Credentials; export type StorageBaseConfig = R2BaseConfig | S3BaseConfig | S3IamBaseConfig | LegacyR2BaseConfig; export type UploadStreamConfig = StorageBaseConfig & { destinationDir: string; files: { fullPath: string; fileName: string; mimeType?: string; }[]; }; export type UploadBufferConfig = StorageBaseConfig & { destinationDir: string; files: { buffer: Buffer; fileName: string; mimeType?: string; }[]; }; export type FetchConfig = StorageBaseConfig & { prefix: string; withSignedUrl?: boolean; suffix?: string; }; export type DeleteConfig = StorageBaseConfig; /** @deprecated Use UploadStreamConfig instead */ export type R2UploadStreamConfig = UploadStreamConfig; /** @deprecated Use UploadBufferConfig instead */ export type R2UploadBufferConfig = UploadBufferConfig; /** @deprecated Use FetchConfig instead */ export type R2FetchConfig = FetchConfig; /** @deprecated Use DeleteConfig instead */ export type R2DeleteConfig = DeleteConfig; export interface FileMap { [file: string]: string; } export type AsyncTask = () => Promise; export {}; //# sourceMappingURL=types.d.ts.map