29 lines
559 B
TypeScript
29 lines
559 B
TypeScript
/**
|
|
* System module for Dragonchain system operations
|
|
*/
|
|
|
|
import { DragonchainClient } from './client';
|
|
import { SystemStatus } from './types';
|
|
|
|
export class SystemClient {
|
|
private client: DragonchainClient;
|
|
|
|
constructor(client: DragonchainClient) {
|
|
this.client = client;
|
|
}
|
|
|
|
/**
|
|
* Checks system health
|
|
*/
|
|
async health(): Promise<void> {
|
|
await this.client.get<void>('/api/v1/health');
|
|
}
|
|
|
|
/**
|
|
* Gets system status
|
|
*/
|
|
async status(): Promise<SystemStatus> {
|
|
return this.client.get<SystemStatus>('/api/v1/status');
|
|
}
|
|
}
|