@tmlmobilidade/interfaces
Version:
This package provides SDK-style connectors for interacting with databases (e.g., stops, plans, rides, alerts) and external providers (e.g., authentication, storage). It simplifies data access and integration across projects.
11 lines (10 loc) • 458 B
TypeScript
import { Readable } from 'node:stream';
export interface IStorageProvider {
copyFile(source: string, destination: string): Promise<void>;
deleteFile(key: string): Promise<void>;
deleteFiles(keys: string[]): Promise<void>;
fileExists(key: string): Promise<boolean>;
getFileUrl(key: string): Promise<string>;
listFiles(prefix?: string): Promise<string[]>;
uploadFile(key: string, body: Buffer | Readable | string): Promise<void>;
}