@follow-app/client-sdk
Version:
TypeScript client SDK for Follow RSS Server API
46 lines (39 loc) • 1.12 kB
text/typescript
import { defineModule, defineRoute } from "../../shared/define-module"
import type {
CheckBullMQRequest,
CheckBullMQResponse,
CheckPostgreSQLResponse,
CheckRedisResponse,
GetRSSHubAnalyticsRequest,
GetRSSHubAnalyticsResponse,
} from "./types"
/**
* Probes module for health checks and system monitoring
*/
export const probesModule = defineModule({
name: "probes",
prefix: "/probes",
routes: {
// Check PostgreSQL database health
checkPostgreSQL: defineRoute<never, CheckPostgreSQLResponse>(
"GET",
"/postgresql",
),
// Check Redis health
checkRedis: defineRoute<never, CheckRedisResponse>("GET", "/redis"),
// Check BullMQ queue status
checkBullMQ: defineRoute<CheckBullMQRequest, CheckBullMQResponse>(
"GET",
"/bullmq",
),
// Get RSS Hub analytics
getRSSHubAnalytics: defineRoute<
GetRSSHubAnalyticsRequest,
GetRSSHubAnalyticsResponse
>("GET", "/rsshub"),
},
})
// Export the API type
export type ProbesAPI = typeof probesModule.api
// Re-export types for external consumption
export type * from "./types"