@bitblit/ratchet-epsilon-common
Version:
Tiny adapter to simplify building API gateway Lambda APIS
18 lines (17 loc) • 824 B
TypeScript
import { BackgroundTransactionLogger } from '../config/background/background-transaction-logger.js';
import { BackgroundTransactionLog } from '../config/background/background-transaction-log.js';
import { S3Client } from '@aws-sdk/client-s3';
export declare class S3BackgroundTransactionLogger implements BackgroundTransactionLogger {
private cfg;
private s3TransactionLogCacheRatchet;
constructor(cfg: BackgroundS3TransactionLoggingConfig);
logTransaction(txLog: BackgroundTransactionLog): Promise<void>;
readTransactionLog(txGuid: string): Promise<BackgroundTransactionLog>;
static validateConfig(cfg: BackgroundS3TransactionLoggingConfig): string[];
}
export interface BackgroundS3TransactionLoggingConfig {
s3: S3Client;
bucket: string;
timeToLiveDays: number;
prefix?: string;
}