UNPKG

@ahmedhegazee/nestjs-telescope

Version:

Advanced observability and monitoring solution for NestJS applications with ML-powered analytics, enterprise features, and production-ready scaling

20 lines (19 loc) 981 B
import { Repository } from 'typeorm'; import { StorageDriver, StorageStats } from '../interfaces/storage.interface'; import { TelescopeEntry, TelescopeEntryFilter, TelescopeEntryResult } from '../../core/interfaces/telescope-entry.interface'; import { TelescopeEntryEntity } from '../entities/telescope-entry.entity'; export declare class DatabaseStorageDriver implements StorageDriver { private readonly entryRepository; constructor(entryRepository: Repository<TelescopeEntryEntity>); store(entry: TelescopeEntry): Promise<void>; storeBatch(entries: TelescopeEntry[]): Promise<void>; find(filter?: TelescopeEntryFilter): Promise<TelescopeEntryResult>; findById(id: string): Promise<TelescopeEntry | null>; delete(id: string): Promise<boolean>; clear(): Promise<void>; prune(olderThan: Date): Promise<number>; getStats(): Promise<StorageStats>; private getEntriesByType; private entityToEntry; healthCheck(): Promise<boolean>; }