@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
38 lines • 1.06 kB
JavaScript
import { PingResponseSchema } from '../schemas';
/**
* Creates the ping resource methods
* OpenAPI Path: /ping → ping.get
* @description Ping endpoint for connectivity test
*/
export function createPingResource(executeRequest) {
return {
/**
* Simple connectivity test
* @description Simple connectivity test endpoint (no authentication required)
* @fullPath api.items.ping.get
* @service items
* @domain system-health
* @discoverable true
* @dataMethod pingData.get
*/
get: async () => {
return executeRequest({
method: 'GET',
path: '/ping',
responseSchema: PingResponseSchema,
});
},
};
}
/**
* Creates the pingData resource methods (data-only versions)
*/
export function createPingDataResource(ping) {
return {
get: async () => {
const response = await ping.get();
return response.data;
},
};
}
//# sourceMappingURL=ping.js.map