mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-11-06 06:13:45 -05:00
42 lines
900 B
TypeScript
42 lines
900 B
TypeScript
import { ApiClient } from './client';
|
|
|
|
export class StatusApi {
|
|
constructor(private readonly client: ApiClient) {}
|
|
|
|
system(): Promise<Response> {
|
|
return this.client.get('/api/status');
|
|
}
|
|
|
|
downloadClients(): Promise<Response> {
|
|
return this.client.get('/api/status/download-client');
|
|
}
|
|
|
|
arrs(): Promise<Response> {
|
|
return this.client.get('/api/status/arrs');
|
|
}
|
|
}
|
|
|
|
export class HealthApi {
|
|
constructor(private readonly client: ApiClient) {}
|
|
|
|
liveness(): Promise<Response> {
|
|
return this.client.get('/health');
|
|
}
|
|
|
|
readiness(): Promise<Response> {
|
|
return this.client.get('/health/ready');
|
|
}
|
|
|
|
detailed(): Promise<Response> {
|
|
return this.client.get('/health/detailed');
|
|
}
|
|
|
|
downloadClients(): Promise<Response> {
|
|
return this.client.get('/api/health');
|
|
}
|
|
|
|
triggerCheck(): Promise<Response> {
|
|
return this.client.post('/api/health/check');
|
|
}
|
|
}
|