UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

46 lines 1.55 kB
import { HealthCheckResponseSchema } from '../schemas'; /** * Creates the healthCheck resource methods * OpenAPI Path: /health-check → healthCheck.* * @description Health check endpoint for P21 PIM service */ export function createHealthCheckResource(executeRequest) { return { /** * Get service health status * * @fullPath api.p21Pim.healthCheck.get * @service p21-pim * @domain monitoring * @dataMethod healthCheckData.get * @discoverable true * @searchTerms ['health', 'status', 'monitoring', 'availability'] * @relatedEndpoints ['core.healthCheck', 'nexus.healthCheck'] * @commonPatterns ['Monitor service health', 'Check service availability'] * * Monitor service health and availability. * Note: Only requires x-site-id header, no Bearer token needed. * * @returns Service health status and availability information */ 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: async () => { const response = await healthCheck.get(); return response.data; }, }; } //# sourceMappingURL=health-check.js.map