UNPKG

hook-engine

Version:

Production-grade webhook engine with comprehensive adapter support, security, reliability, structured logging, and CLI tools.

24 lines (23 loc) 800 B
import { StorageAdapter, StoredEvent, StorageStats } from '../types/storage'; import { StorageConfig } from '../types/config'; /** * In-memory storage adapter for development and testing */ export declare class MemoryAdapter implements StorageAdapter { private events; private seenIds; private config; private cleanupTimer?; constructor(config: StorageConfig); isDuplicate(eventId: string): Promise<boolean>; markSeen(eventId: string, metadata?: Record<string, any>): Promise<void>; storeEvent(eventId: string, event: any): Promise<void>; getEvent(eventId: string): Promise<StoredEvent | null>; cleanup(): Promise<void>; close(): Promise<void>; /** * Get storage statistics */ getStats(): StorageStats; private startCleanupTimer; }