mirror of
https://github.com/LukeHagar/Coolify-TypeScript-SDK.git
synced 2025-12-07 20:37:44 +00:00
Saving initial generation
This commit is contained in:
249
docs/sdks/deployments/README.md
Normal file
249
docs/sdks/deployments/README.md
Normal file
@@ -0,0 +1,249 @@
|
||||
# Deployments
|
||||
(*deployments*)
|
||||
|
||||
## Overview
|
||||
|
||||
Deployments
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [list](#list) - List
|
||||
* [get](#get) - Get
|
||||
* [deployByTagOrUuid](#deploybytagoruuid) - Deploy
|
||||
|
||||
## list
|
||||
|
||||
List currently running deployments
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { Coolify } from "coolify";
|
||||
|
||||
const coolify = new Coolify({
|
||||
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await coolify.deployments.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 { deploymentsList } from "coolify/funcs/deploymentsList.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 deploymentsList(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.ApplicationDeploymentQueue[]](../../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 | \*/\* |
|
||||
|
||||
## get
|
||||
|
||||
Get deployment 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.deployments.get({
|
||||
uuid: "2ad7d3d7-960f-4230-bfe2-5ed5941b0a65",
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { CoolifyCore } from "coolify/core.js";
|
||||
import { deploymentsGet } from "coolify/funcs/deploymentsGet.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 deploymentsGet(coolify, {
|
||||
uuid: "2ad7d3d7-960f-4230-bfe2-5ed5941b0a65",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.GetDeploymentByUuidRequest](../../models/operations/getdeploymentbyuuidrequest.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.ApplicationDeploymentQueue](../../models/components/applicationdeploymentqueue.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 | \*/\* |
|
||||
|
||||
## deployByTagOrUuid
|
||||
|
||||
Deploy by tag or uuid. `Post` request also accepted.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```typescript
|
||||
import { Coolify } from "coolify";
|
||||
|
||||
const coolify = new Coolify({
|
||||
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const result = await coolify.deployments.deployByTagOrUuid({});
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { CoolifyCore } from "coolify/core.js";
|
||||
import { deploymentsDeployByTagOrUuid } from "coolify/funcs/deploymentsDeployByTagOrUuid.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 deploymentsDeployByTagOrUuid(coolify, {});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.DeployByTagOrUuidRequest](../../models/operations/deploybytagoruuidrequest.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.DeployByTagOrUuidResponseBody](../../models/operations/deploybytagoruuidresponsebody.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 | \*/\* |
|
||||
Reference in New Issue
Block a user