UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

47 lines 1.38 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 endpoint for connectivity test */ function createPingResource(executeRequest) { return { /** * Simple connectivity test * @description Simple connectivity test endpoint (no authentication required) * @fullPath api.vmi.ping.get * @service vmi * @domain system-health * @discoverable true * @dataMethod pingData.get * @example * ```typescript * const pong = await client.ping.get(); * console.log(pong.data); // "pong" * ``` */ get: async () => { return executeRequest({ method: 'GET', path: '/ping', responseSchema: schemas_1.PingResponseSchema, }); }, }; } /** * 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