import { CommercetoolsAuthorizationService } from '../../commercetools'; import { Logger } from '../../logger'; import { HandlerResponse } from './types/handler.type'; type HealthCheckStatus = { status: 'OK' | 'Partially Available' | 'Unavailable'; timestamp: string; checks: HealthCheckResult[]; version: string; metadata?: object; }; export type HealthCheckResult = { name: string; status: 'UP' | 'DOWN'; details?: object; message?: string; }; export type HealthCheck = () => Promise | HealthCheckResult; export type StatusHandlerOpts = { timeout: number; checks: HealthCheck[]; metadataFn?: () => Promise | object; log: Logger; }; /** * Handler to check the status of the service * @param opts * @returns */ export declare const statusHandler: (opts: StatusHandlerOpts) => () => Promise>; /** * Check if CoCo permissions are available * @param opts * @returns */ export declare const healthCheckCommercetoolsPermissions: (opts: { ctAuthorizationService: CommercetoolsAuthorizationService; projectKey: string; requiredPermissions: string[]; }) => () => Promise; export {};