mirror of
https://github.com/LukeHagar/Coolify-TypeScript-SDK.git
synced 2025-12-06 12:27:46 +00:00
PrivateKeys
(privateKeys)
Overview
Available Operations
list
List all private keys.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.privateKeys.list();
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { privateKeysList } from "coolify/funcs/privateKeysList.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 privateKeysList(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 | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PrivateKey[]>
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 a new private key.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.privateKeys.create({
privateKey: "<value>",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { privateKeysCreate } from "coolify/funcs/privateKeysCreate.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 privateKeysCreate(coolify, {
privateKey: "<value>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CreatePrivateKeyRequestBody | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.CreatePrivateKeyResponseBody>
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 a private key.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.privateKeys.update({
privateKey: "<value>",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { privateKeysUpdate } from "coolify/funcs/privateKeysUpdate.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 privateKeysUpdate(coolify, {
privateKey: "<value>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdatePrivateKeyRequestBody | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.UpdatePrivateKeyResponseBody>
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 key by UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.privateKeys.get({
uuid: "de612435-5d53-45e6-bbe3-7f2c13a14f66",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { privateKeysGet } from "coolify/funcs/privateKeysGet.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 privateKeysGet(coolify, {
uuid: "de612435-5d53-45e6-bbe3-7f2c13a14f66",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetPrivateKeyByUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PrivateKey>
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.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.NotFound | 501, 505 | application/json |
| errors.APIError | 4XX, 5XX | */* |
delete
Delete a private key.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.privateKeys.delete({
uuid: "d12ec548-7853-4eb5-ad51-3372962d2e05",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { privateKeysDelete } from "coolify/funcs/privateKeysDelete.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 privateKeysDelete(coolify, {
uuid: "d12ec548-7853-4eb5-ad51-3372962d2e05",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeletePrivateKeyByUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.DeletePrivateKeyByUuidResponseBody>
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.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.NotFound | 501, 505 | application/json |
| errors.APIError | 4XX, 5XX | */* |