@letsparky/api-v2-client
Version:
TypeScript client for the LetsParky API V2
32 lines (31 loc) • 980 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.System = void 0;
/**
* System-level API endpoints wrapper.
*
* Currently provides access to the `/system/health` endpoint that returns
* the overall health status of the LetsParky backend and its sub-components.
*
* Example usage:
* ```typescript
* const client = new LetsParkyClient({ apiKey: 'your-key' });
* const health = await client.system.getHealth();
* console.log(health.data.overall_status); // "UP" | "DOWN" | "UNKNOWN"
* ```
*/
class System {
constructor(client) {
this.client = client;
}
/**
* Retrieve health information for the API and its dependent services.
*
* Internally performs a GET request to `/system/health` and returns the
* unmarshalled `HealthCheckData` object wrapped in the standard `ApiResponse`.
*/
async getHealth() {
return this.client.get('/system/health');
}
}
exports.System = System;
;