UNPKG

@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.

32 lines (31 loc) 1.19 kB
import { IStorageProvider } from './storage.interface.js'; import { Readable } from 'node:stream'; export interface OCIStorageProviderConfiguration { bucket_name: string; fingerprint: string; namespace: string; private_key?: string; private_key_path?: string; region: string; tenancy: string; user: string; } export declare class OCIStorageProvider implements IStorageProvider { private readonly bucketName; private readonly namespace; private readonly ociClient; private readonly region; constructor(config: OCIStorageProviderConfiguration); /** * Copies a file from one location to another in the same bucket. * @param source - The source object name. * @param destination - The destination object name. */ 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 | ReadableStream, mimeType?: string): Promise<void>; }