UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

54 lines 2.03 kB
import { HealthCheckResponseSchema } from '../schemas'; /** * Creates the healthCheck resource methods * OpenAPI Path: /health-check → healthCheck.* * @description Health check endpoint for AGR Info service */ export function createHealthCheckResource(executeRequest) { return { /** * Check service health and availability * * @fullPath api.agrInfo.healthCheck.get * @service agr-info * @domain system-health * @dataMethod healthCheckData.get * @discoverable true * @searchTerms ["health", "status", "availability", "ping", "check"] * @relatedEndpoints ["api.customers.healthCheck.get", "api.commerce.healthCheck.get", "api.items.healthCheck.get"] * @commonPatterns ["Health check", "Service status", "API availability"] * @workflow ["system-monitoring", "health-checks", "service-discovery"] * @prerequisites ["Service is running"] * @nextSteps ["Use other endpoints if healthy"] * @businessRules ["Returns service status and basic info"] * @functionalArea "system-monitoring" * @caching "No caching - real-time status" * @performance "Fast response, minimal processing" * * @returns Promise<HealthCheckResponse> Service health status */ get: async () => { return executeRequest({ method: 'GET', path: '/health-check', responseSchema: HealthCheckResponseSchema, }, undefined); }, }; } /** * Creates the healthCheckData resource methods (data-only versions) */ export function createHealthCheckDataResource(healthCheck) { return { /** * Get health check status data only * @returns Promise<string> Health status string */ get: async () => { const response = await healthCheck.get(); return response.data; }, }; } //# sourceMappingURL=health-check.js.map