import type { AuthError } from '@supabase/supabase-js'; export interface UploadOptions { bucket: string; path: string; file: File | Buffer; contentType?: string; cacheControl?: string; upsert?: boolean; } export interface UploadResult { path: string | null; fullPath: string | null; publicUrl: string | null; error: AuthError | Error | null; } export interface DeleteOptions { bucket: string; paths: string | string[]; } export interface DeleteResult { error: AuthError | Error | null; } export interface DownloadOptions { bucket: string; path: string; } export interface DownloadResult { data: Blob | null; error: AuthError | Error | null; } export interface ListOptions { bucket: string; folder?: string; limit?: number; offset?: number; sortBy?: { column: 'name' | 'updated_at' | 'created_at' | 'last_accessed_at'; order: 'asc' | 'desc'; }; } export interface FileObject { name: string; id?: string; updated_at?: string; created_at?: string; last_accessed_at?: string; metadata?: Record; bucket_id?: string; owner?: string; } export interface ListResult { data: FileObject[] | null; error: AuthError | Error | null; } export interface SignedUrlOptions { bucket: string; path: string; expiresIn?: number; transform?: { width?: number; height?: number; resize?: 'contain' | 'cover' | 'fill'; format?: 'origin'; quality?: number; }; } export interface SignedUrlResult { signedUrl: string | null; error: AuthError | Error | null; } /** * Upload file to Supabase Storage */ export declare function uploadFile(options: UploadOptions): Promise; /** * Delete file(s) from Supabase Storage */ export declare function deleteFile(options: DeleteOptions): Promise; /** * Download file from Supabase Storage */ export declare function downloadFile(options: DownloadOptions): Promise; /** * List files in Supabase Storage */ export declare function listFiles(options: ListOptions): Promise; /** * Create signed URL for private files */ export declare function createSignedUrl(options: SignedUrlOptions): Promise; /** * Get public URL for public files */ export declare function getPublicUrl(bucket: string, path: string): string; /** * Move file within the same bucket */ export declare function moveFile(bucket: string, fromPath: string, toPath: string): Promise; /** * Copy file within the same bucket */ export declare function copyFile(bucket: string, fromPath: string, toPath: string): Promise; /** * Get file metadata */ export declare function getFileMetadata(bucket: string, path: string): Promise<{ data: FileObject | null; error: AuthError | Error | null; }>; /** * Upload multiple files */ export declare function uploadFiles(uploads: UploadOptions[]): Promise; /** * Generate unique file path with timestamp */ export declare function generateUniqueFilePath(folder: string, filename: string, userId?: string): string; /** * Validate file type and size */ export interface FileValidationOptions { allowedTypes?: readonly string[] | string[]; maxSizeBytes?: number; minSizeBytes?: number; } export interface FileValidationResult { isValid: boolean; errors: string[]; } export declare function validateFile(file: File | Buffer, options?: FileValidationOptions): FileValidationResult; //# sourceMappingURL=storage.d.ts.map