@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
85 lines • 4.5 kB
TypeScript
import type { SlackClient } from '../client';
import type { HealthCheckParams, HealthCheckResponse } from '../schemas';
type ExecuteRequest = SlackClient['executeRequest'];
/**
* Creates the healthCheck resource methods
* OpenAPI Path: /health-check → healthCheck.*
* @description Health check endpoint for Slack service
*/
export declare function createHealthCheckResource(executeRequest: ExecuteRequest): {
/**
* Check Slack service health and connectivity
*
* @fullPath api.slack.healthCheck.get
* @service slack
* @domain system-health
* @dataMethod healthCheckData
* @discoverable true
* @searchTerms ["health", "status", "availability", "ping", "check", "slack service", "webhook connectivity", "integration status"]
* @relatedEndpoints ["api.slack.webHook.create", "api.slack.webHook.refresh.get", "api.joomla.healthCheck.get", "api.commerce.healthCheck.get", "api.customers.healthCheck.get"]
* @commonPatterns ["Health check", "Service status", "Slack connectivity test", "System monitoring", "Integration verification"]
* @workflow ["system-monitoring", "health-checks", "service-discovery", "slack-integration-verification", "webhook-status-check"]
* @prerequisites ["Service is running", "Valid authentication token", "x-site-id header", "Slack API connectivity"]
* @nextSteps ["Use webhook endpoints if healthy", "Verify Slack API connectivity", "Monitor integration metrics", "Test message delivery"]
* @businessRules ["Returns service and Slack connectivity status", "Requires standard authentication", "Standard health check format", "Includes webhook status"]
* @functionalArea "system-monitoring"
* @caching "No caching - real-time status required"
* @performance "Fast response, minimal processing, use for Slack integration monitoring"
*
* @param params Health check parameters with site ID
* @returns Promise<HealthCheckResponse> Service health status with Slack connectivity information
*
* @example
* ```typescript
* // Check if Slack service is healthy
* const response = await client.healthCheck.get({ 'x-site-id': 'SITE123' });
* console.log(response.data.status); // 'healthy'
* console.log(response.data.slack_connectivity); // true/false
* console.log(response.status); // HTTP status code
*
* // Get just the health status
* const status = await client.healthCheckData.get({ 'x-site-id': 'SITE123' });
* console.log(status); // Health data object
* ```
*/
get: (params: HealthCheckParams) => Promise<HealthCheckResponse>;
};
/**
* Creates the healthCheckData resource methods (data-only versions)
*/
export declare function createHealthCheckDataResource(healthCheck: ReturnType<typeof createHealthCheckResource>): {
/**
* Get Slack service health data without full response metadata
*
* @fullPath api.slack.healthCheckData.get
* @service slack
* @domain system-health
* @dataMethod healthCheckData
* @discoverable true
* @searchTerms ["health data", "service status", "slack connectivity", "integration status"]
* @relatedEndpoints ["api.slack.healthCheck.get", "api.slack.webHook.create"]
* @commonPatterns ["Get health status", "Check connectivity", "Service monitoring"]
* @workflow ["system-monitoring", "health-checks", "integration-verification"]
* @prerequisites ["Valid authentication token", "x-site-id header"]
* @nextSteps ["Use Slack endpoints if healthy", "Monitor service metrics"]
* @businessRules ["Returns only health data object", "No response metadata included"]
* @functionalArea "system-monitoring"
* @caching "No caching - real-time status required"
* @performance "Direct data access, faster for simple health checks"
*
* @param params Health check parameters with site ID
* @returns Promise<HealthCheckData> Direct health status data object
*/
get: (params: HealthCheckParams) => Promise<{
status: string;
service: string;
timestamp?: string | undefined;
version?: string | undefined;
slack_connectivity?: boolean | undefined;
webhook_status?: string | undefined;
}>;
};
export type HealthCheckResource = ReturnType<typeof createHealthCheckResource>;
export type HealthCheckDataResource = ReturnType<typeof createHealthCheckDataResource>;
export {};
//# sourceMappingURL=health-check.d.ts.map