Saving initial generation

This commit is contained in:
Luke Hagar
2024-11-19 21:24:42 -06:00
commit c70b67b33e
403 changed files with 63390 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
# Health
(*health*)
## Overview
### Available Operations
* [check](#check) - Healthcheck
## check
Healthcheck endpoint.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.health.check();
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { healthCheck } from "coolify/funcs/healthCheck.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await healthCheck(coolify);
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[string](../../models/.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| --------------------------------- | --------------------------------- | --------------------------------- |
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | \*/\* |