-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathping.ts
More file actions
68 lines (55 loc) · 1.52 KB
/
ping.ts
File metadata and controls
68 lines (55 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
import { APIPromise } from '../core/api-promise';
import { RequestOptions } from '../internal/request-options';
export class Ping extends APIResource {
/**
* Simple health check endpoint that returns 200 OK.
*/
check(options?: RequestOptions): APIPromise<PingCheckResponse> {
return this._client.get('/ping', options);
}
/**
* Comprehensive health check endpoint that queries all underlying services.
*
* Checks the following services:
*
* - PostgreSQL database
* - Redis
* - PGVector store
* - Storage service (Local/S3)
* - ColPali vector store (if enabled)
*/
status(options?: RequestOptions): APIPromise<PingStatusResponse> {
return this._client.get('/health', options);
}
}
/**
* Response for health check endpoint
*/
export interface PingCheckResponse {
message: string;
status: string;
}
/**
* Response for detailed health check endpoint
*/
export interface PingStatusResponse {
services: Array<PingStatusResponse.Service>;
status: string;
timestamp: string;
}
export namespace PingStatusResponse {
/**
* Status of an individual service
*/
export interface Service {
name: string;
status: string;
message?: string | null;
response_time_ms?: number | null;
}
}
export declare namespace Ping {
export { type PingCheckResponse as PingCheckResponse, type PingStatusResponse as PingStatusResponse };
}