/** * Supabase Storage Provider * * Production storage using Supabase Storage. * Requires service role key for write operations. * * Security: * - Uses service role key (NOT anon key) * - Bucket should have RLS policies restricting public access * - Signed URLs provide temporary access */ import type { StorageProvider, StorageObject, UploadResult, HealthCheckResult } from "./provider.js"; export interface SupabaseStorageConfig { /** Supabase project URL */ url: string; /** Service role key (NOT anon key) - can be new sb_secret_ format or JWT */ serviceKey: string; /** Storage bucket name */ bucket: string; } /** Default retry configuration */ declare const DEFAULT_RETRY_CONFIG: { maxRetries: number; baseDelayMs: number; maxDelayMs: number; }; /** * Error class for Supabase storage operations */ export declare class SupabaseStorageError extends Error { readonly operation: string; readonly statusCode?: number | undefined; readonly isRetryable: boolean; constructor(message: string, operation: string, statusCode?: number | undefined, isRetryable?: boolean); } export declare class SupabaseStorageProvider implements StorageProvider { readonly name = "supabase"; private storage; private bucket; private retryConfig; constructor(config: SupabaseStorageConfig, retryConfig?: Partial); /** * Execute an operation with retry logic */ private withRetry; upload(localPath: string, remotePath: string): Promise; download(remotePath: string, localPath: string): Promise; list(prefix: string): Promise; getSignedUrl(remotePath: string, expiresInSeconds?: number): Promise; healthCheck(): Promise; delete(remotePath: string): Promise; exists(remotePath: string): Promise; /** * Guess content type from file extension */ private guessContentType; } export {};