Files
recipe-app/backend/dist/health/health.service.d.ts
T
Nils-Johan Gynther 969dafdbc6
Test Suite / test (24.15.0) (push) Has been cancelled
Refactor code structure for improved readability and maintainability
2026-05-06 07:37:59 +02:00

42 lines
1.1 KiB
TypeScript

import { PrismaService } from '../prisma/prisma.service';
export interface HealthStatus {
status: 'healthy' | 'degraded' | 'unhealthy';
service: string;
timestamp: string;
uptime: number;
checks: {
database: {
status: 'ok' | 'error';
responseTime: number;
details?: string;
};
};
}
export declare class HealthService {
private readonly prisma;
private readonly startTime;
constructor(prisma: PrismaService);
getOverallHealth(): Promise<{
status: 'healthy' | 'degraded' | 'unhealthy';
statusCode: number;
service: string;
timestamp: string;
uptime: number;
checks: {
database: {
status: 'ok' | 'error';
responseTime: number;
details?: string;
};
};
}>;
getDatabaseHealth(): Promise<{
status: 'ok' | 'error';
database: string;
responseTime: number;
timestamp: string;
details?: string;
statusCode: number;
}>;
}