UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

63 lines 2.15 kB
import type { JoomlaClient } from '../client'; import type { HealthCheckResponse } from '../schemas'; type ExecuteRequest = JoomlaClient['executeRequest']; /** * Creates the healthCheck resource methods * OpenAPI Path: /health-check → healthCheck.* * @description Health check endpoint for Joomla service */ export declare function createHealthCheckResource(executeRequest: ExecuteRequest): { /** * Service health check * @fullPath api.joomla.healthCheck.get * @service joomla * @domain system * @dataMethod healthCheckData.get * @discoverable true */ get: () => Promise<HealthCheckResponse>; }; /** * Creates the healthCheckData resource methods (data-only versions) */ export declare function createHealthCheckDataResource(healthCheck: ReturnType<typeof createHealthCheckResource>): { get: () => Promise<{ siteHash: string; siteId: string; } & { [k: string]: unknown; }>; }; /** * Creates the ping resource method * OpenAPI Path: /ping → ping * @description Ping endpoint (no bearer token required) */ export declare function createPingResource(executeRequest: ExecuteRequest): () => Promise<{ params: Record<string, unknown> | unknown[]; data: "pong"; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; /** * Creates the healthData resource methods */ export declare function createHealthDataResource(healthCheck: ReturnType<typeof createHealthCheckResource>, ping: ReturnType<typeof createPingResource>): { check: () => Promise<{ siteHash: string; siteId: string; } & { [k: string]: unknown; }>; ping: () => Promise<"pong">; }; export type HealthCheckResource = ReturnType<typeof createHealthCheckResource>; export type HealthCheckDataResource = ReturnType<typeof createHealthCheckDataResource>; export type PingResource = ReturnType<typeof createPingResource>; export type HealthDataResource = ReturnType<typeof createHealthDataResource>; export {}; //# sourceMappingURL=health-check.d.ts.map