import type { DiskConfig, DiskName, FilesystemConfig, LocalDiskConfig, S3DiskConfig } from './types/filesystem'; import type { GetStreamOptions, PresignedUploadPolicy, PresignedUploadPolicyOptions, PresignedUploadUrl, PresignedUploadUrlOptions, PutResult, PutStreamOptions, SignedUrlOptions, StatEntry, StorageAdapter } from './types'; import type { PutFileOptions, UploadedFileLike } from './put-file'; export type { DiskConfig, FilesystemConfig, LocalDiskConfig, S3DiskConfig, } from './types/filesystem'; // ============================================================================= // Exports // ============================================================================= export declare const Storage: StorageManager; // ============================================================================= // Storage Manager // ============================================================================= declare class StorageManager { init(config: Partial): this; disk(name?: DiskName): StorageAdapter; put(path: string, contents: string | Uint8Array | Buffer): Promise; put(file: UploadedFileLike, opts?: PutFileOptions): Promise; put(pathOrFile: string | UploadedFileLike, contentsOrOpts?: string | Uint8Array | Buffer | PutFileOptions): Promise; stat(path: string): Promise; getStream(path: string, options?: GetStreamOptions): Promise>; putStream(path: string, stream: ReadableStream, options?: PutStreamOptions): Promise; copyAcross(source: string, dest: string): Promise; moveAcross(source: string, dest: string): Promise; get(path: string): Promise; exists(path: string): Promise; missing(path: string): Promise; delete(path: string): Promise; copy(from: string, to: string): Promise; move(from: string, to: string): Promise; url(path: string): Promise; signedUrl(path: string, options: SignedUrlOptions): Promise; presignedUploadUrl(options: PresignedUploadUrlOptions): Promise; presignedUploadPolicy(options: PresignedUploadPolicyOptions): Promise; size(path: string): Promise; lastModified(path: string): Promise; mimeType(path: string): Promise; checksum(path: string, algorithm?: 'md5' | 'sha1' | 'sha256'): Promise; makeDirectory(path: string): Promise; deleteDirectory(path: string): Promise; files(path?: string): AsyncIterable<{ path: string; type: 'file' | 'directory' }>; allFiles(path?: string): AsyncIterable<{ path: string; type: 'file' | 'directory' }>; configure(name: string, config: DiskConfig): this; setDefaultDisk(name: string): this; getDiskConfig(name?: string): DiskConfig | undefined; getConfiguredDisks(): string[]; getDefaultDisk(): string; reset(): this; } export { StorageManager };