UNPKG

waterbase

Version:
39 lines (38 loc) 885 B
import Client from '../Client'; import { Files } from '../models/Files'; declare class File implements Files { #private; path: string; constructor(client: Client, path: string); /** * Delete the file * * @return Promise<any> */ delete(): Promise<unknown>; /** * Gets a download url for the file * * @return string */ getDownloadUrl(): Promise<string>; /** * Uploads the param to the file path * * @param file Buffer * * @return Promise<object> */ upload(file: Blob): Promise<object>; /** * Updates the file with a new path or just the file * * @param file Buffer * * @param newPath? string * * @return Promise<object> */ update(file: Blob, newPath?: string): Promise<object>; } export = File;