import type { Readable } from "node:stream"; import { DriveDirectory, DriveFile } from "flydrive"; import type { DriverContract, ObjectMetaData, ObjectVisibility, SignedURLOptions, WriteOptions } from "flydrive/types"; export declare class VercelBlobDriver implements DriverContract { bucket(_bucket: string): DriverContract; /** * Return a boolean value indicating if the file exists * or not. */ exists(_key: string): Promise; /** * Return the signed URL for direct uploads. Throw exception * when the driver does not support generating upload URLs. */ getSignedUploadUrl(_key: string, _options?: SignedURLOptions): Promise; /** * Return the file contents as a UTF-8 string. Throw an exception * if the file is missing. */ get(_key: string): Promise; /** * Return contents of an object for the given key as an Uint8Array. * Should throw "E_CANNOT_READ_FILE" error when the file * does not exists. */ getBytes(_key: string): Promise; /** * Return the file contents as a Readable stream. Throw an exception * if the file is missing. */ getStream(_key: string): Promise; /** * Return the file contents as a Uint8Array. Throw an exception * if the file is missing. */ getArrayBuffer(_key: string): Promise; /** * Return metadata of the file. Throw an exception * if the file is missing. */ getMetaData(key: string): Promise; /** * Return visibility of the file. Infer visibility from the initial * config, when the driver does not support the concept of visibility. */ getVisibility(_key: string): Promise; /** * Return the public URL of the file. Throw an exception when the driver * does not support generating URLs. */ getUrl(key: string): Promise; /** * Return the signed URL to serve a private file. Throw exception * when the driver does not support generating URLs. */ getSignedUrl(_key: string, _options?: SignedURLOptions): Promise; /** * Update the visibility of the file. Result in a NOOP * when the driver does not support the concept of * visibility. */ setVisibility(_key: string, _visibility: ObjectVisibility): Promise; /** * Create a new file or update an existing file. The contents * will be a UTF-8 string or "Uint8Array". */ put(key: string, contents: string | Uint8Array): Promise; /** * Create a new file or update an existing file. The contents * will be a Readable stream. */ putStream(_key: string, _contents: Readable, _options?: WriteOptions): Promise; /** * Copy the existing file to the destination. Make sure the new file * has the same visibility as the existing file. It might require * manually fetching the visibility of the "source" file. */ copy(source: string, destination: string): Promise; /** * Move the existing file to the destination. Make sure the new file * has the same visibility as the existing file. It might require * manually fetching the visibility of the "source" file. */ move(_source: string, _destination: string, _options?: WriteOptions): Promise; /** * Delete an existing file. Do not throw an error if the * file is already missing */ delete(key: string): Promise; /** * Delete all files inside a folder. Do not throw an error * if the folder does not exist or is empty. */ deleteAll(prefix: string): Promise; /** * List all files from a given folder or the root of the storage. * Do not throw an error if the request folder does not exist. */ listAll(prefix: string, options?: { recursive?: boolean; paginationToken?: string; }): Promise<{ paginationToken?: string; objects: Iterable; }>; } //# sourceMappingURL=vercel.d.ts.map