UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

65 lines 2.61 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createPingResource = createPingResource; exports.createPingDataResource = createPingDataResource; const schemas_1 = require("../schemas"); /** * Creates the ping resource methods * OpenAPI Path: /ping → ping.* * @description Ping connectivity endpoint for Pricing service */ function createPingResource(executeRequest) { return { /** * Send ping request to verify basic connectivity * * @fullPath api.pricing.ping.get * @service pricing * @domain system-connectivity * @dataMethod pingData.get * @discoverable true * @searchTerms ["ping", "pong", "connectivity", "test", "alive", "echo", "network"] * @relatedEndpoints ["api.pricing.healthCheck.get", "api.pricing.priceEngine.get"] * @commonPatterns ["Ping service", "Test connectivity", "Network check", "Basic alive test"] * @workflow ["connectivity-testing", "network-diagnostics", "basic-monitoring", "service-verification"] * @prerequisites ["Service is reachable", "Network connectivity"] * @nextSteps ["Use health check for detailed status", "Implement monitoring dashboards", "Set up alerting"] * @businessRules ["Returns 'pong' response", "Minimal processing for speed", "Used for basic connectivity verification"] * @functionalArea "system-monitoring" * @caching "No caching - real-time connectivity test" * @performance "Ultra-fast response, minimal payload, ideal for monitoring scripts" * * @returns Promise<PingResponse> Ping response (typically 'pong') * * @example * ```typescript * // Basic connectivity test * const response = await client.ping.get(); * console.log(response.data); // Should be 'pong' or similar * * // Get just the ping response * const pong = await client.pingData.get(); * console.log(pong); // Direct response string * ``` */ get: async () => { return executeRequest({ method: 'GET', path: '/ping', responseSchema: schemas_1.PingResponseSchema, }, undefined); }, }; } /** * Creates the pingData resource methods (data-only versions) */ function createPingDataResource(ping) { return { get: async () => { const response = await ping.get(); return response.data; }, }; } //# sourceMappingURL=ping.js.map