UNPKG

safeer-pdf-generator

Version:

Framework-agnostic PDF generation library with chunking, merging, S3 upload, and email delivery

69 lines 1.9 kB
import { S3UploadConfig, S3UploadResult, UploaderAdapter, LoggingAdapter } from '../../types.js'; /** * Default S3 uploader implementation */ export declare class DefaultS3Uploader implements UploaderAdapter { private readonly config; private readonly logger; private s3Client; constructor(config: S3UploadConfig, logger?: LoggingAdapter); /** * Initialize S3 client (lazy loading to avoid requiring AWS SDK) */ private initS3Client; /** * Upload buffer to S3 */ upload(buffer: Buffer, filename: string, mimeType?: string, options?: { folder?: string; acl?: string; }): Promise<S3UploadResult>; /** * Check if object exists in S3 */ exists(key: string): Promise<boolean>; /** * Delete object from S3 */ delete(key: string): Promise<void>; /** * Get object metadata */ getMetadata(key: string): Promise<{ size: number; lastModified: Date; contentType?: string; etag?: string; }>; /** * Generate presigned URL for temporary access */ generatePresignedUrl(key: string, expiresInSeconds?: number): Promise<string>; /** * List objects with prefix */ listObjects(prefix?: string, maxKeys?: number): Promise<Array<{ key: string; size: number; lastModified: Date; etag: string; }>>; /** * Get bucket region */ getBucketRegion(): Promise<string>; /** * Test S3 connectivity and permissions */ testConnection(): Promise<{ success: boolean; canRead: boolean; canWrite: boolean; error?: string; }>; } /** * Create S3 uploader from configuration */ export declare function createS3Uploader(config: S3UploadConfig, logger?: LoggingAdapter): DefaultS3Uploader; //# sourceMappingURL=S3Uploader.d.ts.map