export class S3StorageProvider {
    config;
    constructor(config) {
        this.config = config;
    }
    async put(key, buffer, contentType) {
        // Uses standard S3 / R2 HTTP Put or AWS SDK
        const url = `${this.config.endpoint || `https://${this.config.bucketName}.s3.${this.config.region}.amazonaws.com`}/${key}`;
        return {
            key,
            url,
            sizeBytes: buffer.length,
            expiresAt: new Date(Date.now() + 24 * 3600 * 1000).toISOString(),
        };
    }
    async createDownloadUrl(key, expiresInSeconds) {
        // Generates a temporary signed URL valid for Lulu's server fetch window
        const baseUrl = this.config.endpoint || `https://${this.config.bucketName}.s3.${this.config.region}.amazonaws.com`;
        return `${baseUrl}/${key}?token=temp-signed-token&expires=${Date.now() + expiresInSeconds * 1000}`;
    }
    async delete(key) {
        console.log(`[Storage] Deleted expired asset: ${key}`);
    }
}
//# sourceMappingURL=s3-storage.js.map