UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

43 lines 1.33 kB
import { HealthCheckResponseSchema } from '../schemas'; /** * Creates the healthCheck resource methods * OpenAPI Path: /health-check → healthCheck.* * @description Health check endpoint */ export function createHealthCheckResource(executeRequest) { return { /** * Service health check * @description Verify service health and trigger seed jobs if needed * @fullPath api.vmi.healthCheck.get * @service vmi * @domain system-health * @discoverable true * @dataMethod healthCheckData.get * @example * ```typescript * const health = await client.healthCheck.get(); * console.log('Site:', health.data.siteId, 'Hash:', health.data.siteHash); * ``` */ get: async () => { return executeRequest({ method: 'GET', path: '/health-check', responseSchema: HealthCheckResponseSchema, }); }, }; } /** * 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