Initial Commit
This commit is contained in:
28
src/system.ts
Normal file
28
src/system.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user