- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { OnModuleInit } from '@nestjs/common';
|
|
import { ConfigService } from '@nestjs/config';
|
|
import { StorageProvider } from '../entities/file.entity';
|
|
export interface PresignedUrlOptions {
|
|
bucket: string;
|
|
key: string;
|
|
contentType: string;
|
|
contentLength: number;
|
|
expiresIn?: number;
|
|
metadata?: Record<string, string>;
|
|
}
|
|
export interface PresignedUrlResult {
|
|
url: string;
|
|
expiresAt: Date;
|
|
}
|
|
export declare class S3Provider implements OnModuleInit {
|
|
private configService;
|
|
private readonly logger;
|
|
private client;
|
|
private bucket;
|
|
private provider;
|
|
private configured;
|
|
constructor(configService: ConfigService);
|
|
onModuleInit(): void;
|
|
isConfigured(): boolean;
|
|
getBucket(): string;
|
|
getProvider(): StorageProvider;
|
|
getUploadUrl(options: PresignedUrlOptions): Promise<PresignedUrlResult>;
|
|
getDownloadUrl(key: string, expiresIn?: number): Promise<PresignedUrlResult>;
|
|
deleteObject(key: string): Promise<void>;
|
|
headObject(key: string): Promise<{
|
|
contentLength: number;
|
|
contentType: string;
|
|
} | null>;
|
|
generatePath(tenantId: string, folder: string, uploadId: string, filename: string): string;
|
|
}
|