import { type Either } from '@lokalise/node-core'; import type { FastifyPluginCallback } from 'fastify'; import type { HealthChecker } from './healthcheckCommons.js'; export interface CommonHealthcheckPluginOptions { responsePayload?: Record; logLevel?: 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent'; healthChecks: readonly HealthCheck[]; infoProviders?: readonly InfoProvider[]; isRootRouteEnabled?: boolean; } type HealthcheckResult = { name: string; isMandatory: boolean; result: Either; }; type ResolvedHealthcheckResponse = { isFullyHealthy: boolean; isPartiallyHealthy: boolean; healthChecks: Record; }; export type InfoProvider = { name: string; dataResolver: () => Record; }; export type HealthCheck = { name: string; isMandatory: boolean; checker: HealthChecker; }; export declare function resolveHealthcheckResults(results: HealthcheckResult[], opts: CommonHealthcheckPluginOptions): ResolvedHealthcheckResponse; export declare const commonHealthcheckPlugin: FastifyPluginCallback; export {};