24 lines
640 B
TypeScript
24 lines
640 B
TypeScript
/**
|
|
* API of the server (auto-generated code)
|
|
*/
|
|
import { HTTPMimeType, HTTPRequestModel, ModelResponseHttp, RESTConfig, RESTCallbacks, RESTRequestJson, RESTRequestJsonArray, RESTRequestVoid } from "./rest-tools"
|
|
import {HealthResult, isHealthResult, } from "./model"
|
|
export namespace HealthCheck {
|
|
|
|
/**
|
|
* Get the server state (health)
|
|
*/
|
|
export function getHealth({ restConfig, }: {
|
|
restConfig: RESTConfig,
|
|
}): Promise<HealthResult> {
|
|
return RESTRequestJson({
|
|
restModel: {
|
|
endPoint: "/health_check",
|
|
requestType: HTTPRequestModel.GET,
|
|
accept: HTTPMimeType.JSON,
|
|
},
|
|
restConfig,
|
|
}, isHealthResult);
|
|
};
|
|
}
|