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

686
docs/sdks/servers/README.md Normal file
View File

@@ -0,0 +1,686 @@
# Servers
(*servers*)
## Overview
Servers
### Available Operations
* [list](#list) - List
* [create](#create) - Create
* [get](#get) - Get
* [delete](#delete) - Delete
* [update](#update) - Update
* [getResources](#getresources) - Resources
* [getDomains](#getdomains) - Domains
* [validate](#validate) - Validate
## list
List all servers.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.list();
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversList } from "coolify/funcs/serversList.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 serversList(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\<[components.Server[]](../../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 | \*/\* |
## create
Create Server.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.create({
name: "My Server",
description: "My Server Description",
ip: "127.0.0.1",
port: 22,
user: "root",
privateKeyUuid: "og888os",
isBuildServer: false,
instantValidate: false,
proxyType: "traefik",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversCreate } from "coolify/funcs/serversCreate.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 serversCreate(coolify, {
name: "My Server",
description: "My Server Description",
ip: "127.0.0.1",
port: 22,
user: "root",
privateKeyUuid: "og888os",
isBuildServer: false,
instantValidate: false,
proxyType: "traefik",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.CreateServerRequestBody](../../models/operations/createserverrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
| `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\<[operations.CreateServerResponseBody](../../models/operations/createserverresponsebody.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 | \*/\* |
## get
Get server by UUID.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.get({
uuid: "878632ca-cced-4853-8da6-87221abec029",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversGet } from "coolify/funcs/serversGet.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 serversGet(coolify, {
uuid: "878632ca-cced-4853-8da6-87221abec029",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.GetServerByUuidRequest](../../models/operations/getserverbyuuidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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\<[components.Server](../../models/components/server.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 | \*/\* |
## delete
Delete server by UUID.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.delete({
uuid: "183d3ea1-6bc7-4679-83e6-ee71ea432238",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversDelete } from "coolify/funcs/serversDelete.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 serversDelete(coolify, {
uuid: "183d3ea1-6bc7-4679-83e6-ee71ea432238",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.DeleteServerByUuidRequest](../../models/operations/deleteserverbyuuidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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\<[operations.DeleteServerByUuidResponseBody](../../models/operations/deleteserverbyuuidresponsebody.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 | \*/\* |
## update
Update Server.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.update({
uuid: "1c295953-9423-418a-96cd-0fd6e1b41a9e",
requestBody: {},
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversUpdate } from "coolify/funcs/serversUpdate.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 serversUpdate(coolify, {
uuid: "1c295953-9423-418a-96cd-0fd6e1b41a9e",
requestBody: {},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.UpdateServerByUuidRequest](../../models/operations/updateserverbyuuidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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\<[components.Server[]](../../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 | \*/\* |
## getResources
Get resources by server.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.getResources({
uuid: "ce37b3ba-2b08-4d5d-9238-c6a5920c72c9",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversGetResources } from "coolify/funcs/serversGetResources.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 serversGetResources(coolify, {
uuid: "ce37b3ba-2b08-4d5d-9238-c6a5920c72c9",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.GetResourcesByServerUuidRequest](../../models/operations/getresourcesbyserveruuidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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\<[operations.ResponseBody[]](../../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 | \*/\* |
## getDomains
Get domains by server.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.getDomains({
uuid: "03ea70d2-cdac-4a42-b170-cbba7d1cffcf",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversGetDomains } from "coolify/funcs/serversGetDomains.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 serversGetDomains(coolify, {
uuid: "03ea70d2-cdac-4a42-b170-cbba7d1cffcf",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.GetDomainsByServerUuidRequest](../../models/operations/getdomainsbyserveruuidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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\<[operations.GetDomainsByServerUuidResponseBody[]](../../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 | \*/\* |
## validate
Validate server by UUID.
### Example Usage
```typescript
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.validate({
uuid: "ef3bad97-f956-4f33-8e23-85d6e694004d",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { CoolifyCore } from "coolify/core.js";
import { serversValidate } from "coolify/funcs/serversValidate.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 serversValidate(coolify, {
uuid: "ef3bad97-f956-4f33-8e23-85d6e694004d",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [operations.ValidateServerByUuidRequest](../../models/operations/validateserverbyuuidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `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\<[operations.ValidateServerByUuidResponseBody](../../models/operations/validateserverbyuuidresponsebody.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 | \*/\* |