@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.
21 lines (20 loc) • 708 B
TypeScript
import { S3StorageProviderConfiguration } from './s3-storage.js';
import { IStorageProvider } from './storage.interface.js';
export type StorageConfiguration = {
aws_config: S3StorageProviderConfiguration;
type: 'aws';
} | {
cloudflare_config: S3StorageProviderConfiguration & {
endpoint: string;
};
type: 'cloudflare';
};
export declare class StorageFactory {
/**
* Creates and returns an instance of a storage service based on the provided configuration.
*
* @param config - The storage configuration object.
* @returns An instance of a class that implements IStorageProvider.
*/
static create(config: StorageConfiguration): IStorageProvider;
}